content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# -*- coding: utf-8 -*- import zmq import cPickle from zsync_logger import MYLOGGER as logging from collections import deque import zhelpers import time
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 1976, 76, 80, 198, 11748, 269, 31686, 293, 198, 6738, 1976, 27261, 62, 6404, 1362, 1330, 17615, 25294, 30373, 355, 18931, 198, 6738, 17268, 1330, 390, 4188, ...
2.962264
53
from django.views.generic import TemplateView, DetailView, CreateView from .models import User
[ 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 37350, 7680, 11, 42585, 7680, 11, 13610, 7680, 198, 198, 6738, 764, 27530, 1330, 11787, 628, 628, 198 ]
3.846154
26
from dataclasses import dataclass @dataclass @dataclass @dataclass @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 628, 198, 31, 19608, 330, 31172, 628, 198, 31, 19608, 330, 31172, 628, 198, 31, 19608, 330, 31172, 628, 198, 31, 19608, 330, 31172, 198 ]
2.606061
33
from django import forms
[ 6738, 42625, 14208, 1330, 5107 ]
4.8
5
# Copyright (c) 2018 ISP RAS (http://www.ispras.ru) # Ivannikov Institute for System Programming of the Russian Academy of Sciences # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # htt...
[ 2, 15069, 357, 66, 8, 2864, 33086, 371, 1921, 357, 4023, 1378, 2503, 13, 271, 1050, 292, 13, 622, 8, 198, 2, 16975, 1236, 1134, 709, 5136, 329, 4482, 30297, 286, 262, 3394, 8581, 286, 13473, 198, 2, 198, 2, 49962, 739, 262, 24843,...
3.743455
191
from django.contrib import admin from rent.models import Rent,Car # Register your models here. admin.site.register(Rent,RentAdmin) admin.site.register(Car,CarAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 5602, 13, 27530, 1330, 29832, 11, 9914, 198, 2, 17296, 534, 4981, 994, 13, 198, 198, 28482, 13, 15654, 13, 30238, 7, 49, 298, 11, 49, 298, 46787, 8, 198, 198, 28482, 13, 1...
3.169811
53
""" Handles /webhooks endpoint Doc: https://developers.mailersend.com/api/v1/webhooks.html """ import requests from mailersend.base import base data = {} class NewWebhook(base.NewAPIClient): """ Instantiates the /webhooks endpoint object """ def __init__(self): """ NewWebhook constr...
[ 37811, 198, 12885, 829, 1220, 12384, 25480, 82, 36123, 198, 23579, 25, 3740, 1378, 16244, 364, 13, 4529, 364, 437, 13, 785, 14, 15042, 14, 85, 16, 14, 12384, 25480, 82, 13, 6494, 198, 37811, 198, 198, 11748, 7007, 198, 6738, 6920, 3...
2.132402
1,503
# -*- coding: utf-8 -*- # # Copyright (C) 2020-2021 CERN. # Copyright (C) 2020-2021 Northwestern University. # # Flask-Resources is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Utility for rendering URI template links.""" from ..ba...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 12131, 12, 1238, 2481, 327, 28778, 13, 198, 2, 15069, 357, 34, 8, 12131, 12, 1238, 2481, 30197, 2059, 13, 198, 2, 198, 2, 46947, 12, ...
2.299029
515
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'Motors_widget.ui' # # Created by: PyQt5 UI code generator 5.13.0 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 47733, 669, 62, 42655, 13, 9019, 6, 198, 2, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, 12454, 2438, 17301, ...
2.83908
87
#!/usr/bin/python # -*- encoding: utf-8 -*- from io import BytesIO import time import base64 import json import requests key = "-fd9YqPnrLnmugQGAhQoimCkQd0t8N8L" secret = "0GLyRIHDnrjKSlDuflLPO8a6U32hyDUy" beautify.url = 'https://api-cn.faceplusplus.com/facepp/v2/beautify' rank.url = 'https://api-cn.faceplusplus...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 11748, 640, 198, 198, 11748, 2779, 2414, 198, 11748, 33918, 198, 11748, 7007, 198, 1...
2.157233
159
#!/usr/bin/env python3 # coding: utf-8 # @Author: ArthurBernard # @Email: arthur.bernard.92@gmail.com # @Date: 2020-09-18 21:15:59 # @Last modified by: ArthurBernard # @Last modified time: 2020-09-18 22:21:22 """ Rolling functions. """ # Built-in packages # Third party packages import numpy as np # Local packages f...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 2488, 13838, 25, 13514, 23927, 446, 198, 2, 2488, 15333, 25, 610, 11098, 13, 33900, 446, 13, 5892, 31, 14816, 13, 785, 198, 2, 2488, 1...
2.178749
1,807
""" Test some basic behaviour of msodde.py Ensure that - doc and docx are read without error - garbage returns error return status - dde-links are found where appropriate """ from __future__ import print_function import unittest from oletools import msodde from tests.test_utils import DATA_BASE_DIR as BASE_DIR impor...
[ 37811, 6208, 617, 4096, 9172, 286, 13845, 375, 2934, 13, 9078, 198, 198, 4834, 19532, 326, 198, 12, 2205, 290, 2205, 87, 389, 1100, 1231, 4049, 198, 12, 15413, 5860, 4049, 1441, 3722, 198, 12, 288, 2934, 12, 28751, 389, 1043, 810, 5...
2.129562
3,288
# -!- coding: utf-8 -!- # Author : AWACS # Time : 2020/06/12 # ------------------------------------ """ batch change place2dTexture Node for texture in Hypershade Editor, if you think the default command that come with maya: ---(hold middle mouse button + Ctrl key ,and drag a place2dTexture to the texture...
[ 2, 532, 0, 12, 19617, 25, 3384, 69, 12, 23, 532, 0, 12, 201, 198, 2, 6434, 220, 1058, 14356, 2246, 50, 201, 198, 2, 3862, 220, 220, 220, 1058, 12131, 14, 3312, 14, 1065, 201, 198, 201, 198, 2, 20368, 650, 201, 198, 201, 198, ...
1.732254
803
U_scr = 0.5 K_scr = 40 T_air = 298.15 T_top = 303.15 g = 9.8 p_air = air_density(T_air) p_top = air_density(T_top) p_mean_air = (p_air + p_top)/2 input_tuple = (U_scr, K_scr, T_air, T_top, g, p_mean_air, p_air, p_top) # The tuple order is U_ src, K_Scr , T_air, T_top, gravitational coefficient,p_mean_air, ...
[ 201, 198, 201, 198, 52, 62, 1416, 81, 796, 657, 13, 20, 201, 198, 42, 62, 1416, 81, 796, 2319, 201, 198, 51, 62, 958, 796, 37576, 13, 1314, 201, 198, 51, 62, 4852, 796, 30727, 13, 1314, 201, 198, 70, 796, 860, 13, 23, 201, 1...
1.885714
210
from marshmallow import fields from ....decorators.pagination import Page from ....util import expand_message_class from .base import AdminHolderMessage @expand_message_class class PresList(AdminHolderMessage): """Presentation get list response message.""" message_type = "presentations-list" class Fiel...
[ 6738, 22397, 42725, 1330, 7032, 198, 198, 6738, 19424, 12501, 273, 2024, 13, 79, 363, 1883, 1330, 7873, 198, 6738, 19424, 22602, 1330, 4292, 62, 20500, 62, 4871, 198, 6738, 764, 8692, 1330, 32053, 39, 19892, 12837, 628, 198, 31, 11201, ...
2.768559
229
#!/usr/bin/env python3 """ Update Wikifeat couchdb databases from 0.4.0a to 0.5.0 Note: Requires python3 Changes: 1. Added getImageFileIndex view to wiki design documents """ import json import common import sys wiki_ddoc = 'wikit' getImageFileIndex = dict() getImageFileIndex['map'] = """ functio...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 198, 220, 220, 220, 10133, 11145, 901, 265, 18507, 9945, 20083, 422, 657, 13, 19, 13, 15, 64, 284, 657, 13, 20, 13, 15, 198, 220, 220, 220, 5740, 25, 26848, 21015, ...
2.569364
692
# Binary Logistic Regression Demo import numpy as np from TinyFlow.Datasets import spiral_data from TinyFlow.Metrics import model_accuracy_sigmoid from TinyFlow.Layers import Layer_Dense from TinyFlow.Activations import Activation_ReLU, Activation_Sigmoid from TinyFlow.Loss import Loss_BinaryCrossEntropy from TinyFlow....
[ 2, 45755, 5972, 2569, 3310, 2234, 34588, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 20443, 37535, 13, 27354, 292, 1039, 1330, 23642, 62, 7890, 198, 6738, 20443, 37535, 13, 9171, 10466, 1330, 2746, 62, 4134, 23843, 62, 82, 17225, 186...
3.111437
1,364
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ FBNet classification models Example code to create the model: from mobile_cv.model_zoo.models.fbnet_v2 import fbnet model = fbnet("fbnet_cse", pretrained=True) model.eval() Full example code is available at ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 1439, 6923, 33876, 198, 198, 37811, 198, 26001, 7934, 17923, 4981, 198, 198, 16281, 2438, 284, 2251, 262, 2746, 25,...
2.463146
909
""" Author: @ayushmankumar7 Paste this file (prepare_train_mask.py) in "leftImg8bit_trainvaltest/leftImg8bit". There are 3 folder in this directory - test, train, val. Paste the file inside the folder containing the 3 folders. In Command Prompt or Terminal : python prepare_train_image.py Link for th...
[ 37811, 198, 13838, 25, 2488, 323, 1530, 805, 74, 44844, 22, 198, 198, 47, 4594, 428, 2393, 357, 46012, 533, 62, 27432, 62, 27932, 13, 9078, 8, 287, 366, 9464, 3546, 70, 23, 2545, 62, 27432, 2100, 9288, 14, 9464, 3546, 70, 23, 2545...
2.509756
410
from django.test import TestCase from .models import * from django.contrib.auth.models import User # Create your tests here. # test for checking instance # test for saving # test for deleting Driver or Editor
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 764, 27530, 1330, 1635, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 2, 13610, 534, 5254, 994, 13, 628, 198, 220, 220, 220, 1303, 1332, 329...
3.515625
64
# @lc app=leetcode id=653 lang=python3 # # [653] Two Sum IV - Input is a BST # # https://leetcode.com/problems/two-sum-iv-input-is-a-bst/description/ # # algorithms # Easy (57.56%) # Likes: 2752 # Dislikes: 175 # Total Accepted: 248.7K # Total Submissions: 430.4K # Testcase Example: '[5,3,6,2,4,null,7]\n9' # # G...
[ 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 46435, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 46435, 60, 4930, 5060, 8363, 532, 23412, 318, 257, 44992, 198, 2, 198, 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, ...
2.136228
1,336
# Given an unsorted array of integers, find the length of longest continuous increasing subsequence. # Example 1: # Input: [1,3,5,4,7] # Output: 3 # Explanation: The longest continuous increasing subsequence is [1,3,5], its length is 3. # Even though [1,3,5,7] is also an increasing subsequence, it's not a continuous ...
[ 2, 11259, 281, 5576, 9741, 7177, 286, 37014, 11, 1064, 262, 4129, 286, 14069, 12948, 3649, 6399, 594, 13, 198, 198, 2, 17934, 352, 25, 198, 2, 23412, 25, 685, 16, 11, 18, 11, 20, 11, 19, 11, 22, 60, 198, 2, 25235, 25, 513, 198...
3.232558
172
''' ############################# # Gerardo Galan Garzafox # # A00821196 # # # # alebrije_lexer.py # # Created_at 2021-09-25 # # # ############################# ''' import sys import ply.lex as lex reserved = { 'program' : 'PROGRAM...
[ 7061, 6, 198, 14468, 7804, 4242, 2, 198, 2, 220, 220, 13573, 13109, 5027, 272, 7164, 89, 1878, 1140, 220, 1303, 198, 2, 220, 220, 317, 25257, 2481, 25272, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303,...
1.777658
1,862
import unittest from travel_distance_map import GPSPoint, Position
[ 11748, 555, 715, 395, 198, 6738, 3067, 62, 30246, 62, 8899, 1330, 15472, 12727, 11, 23158, 628, 198 ]
3.833333
18
import numpy as np import re import json import os if __name__=='__main__': import argparse import os import json from tqdm import tqdm import pickle from multiprocessing import Pool parser = argparse.ArgumentParser() parser.add_argument("--src_dir", help="source dir", required=True ) ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 302, 198, 11748, 33918, 198, 11748, 28686, 198, 198, 361, 11593, 3672, 834, 855, 6, 834, 12417, 834, 10354, 198, 220, 220, 220, 1330, 1822, 29572, 198, 220, 220, 220, 1330, 28686, 198, 220, 2...
2.595432
613
from django.db import migrations, models
[ 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
3.818182
11
"""Insall script.""" from setuptools import setup setup( name="symbexpr", version="0.0.1a1", py_modules=["symbexpr"], zip_safe=True, author="Alan Cristhian", author_email="alan.cristh@gmail.com", description="Systems of equalities, inequalities and constraints.", license="MIT", ke...
[ 37811, 20376, 439, 4226, 526, 15931, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 1837, 2022, 31937, 1600, 198, 220, 220, 220, 2196, 2625, 15, 13, 15, 13, 16, 64, 16, 1600, 198, ...
2.631579
152
#!/usr/bin/env python # Copyright 2016 Andy Chu. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 """ cmd_parse.py - Parse h...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 1584, 12382, 25459, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428,...
2.404145
19,300
from abc import abstractmethod from typing import Union import numpy as np class GLIDEError(Exception): """Raised when an error related to the ASF classes is encountered. """ class GLIDEBase: """ Implements the non-differentiable variant of GLIDE-II as proposed in Ruiz, Francisco, Mariano Luqu...
[ 6738, 450, 66, 1330, 12531, 24396, 198, 6738, 19720, 1330, 4479, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4871, 10188, 2389, 6500, 81, 1472, 7, 16922, 2599, 198, 220, 220, 220, 37227, 21762, 1417, 618, 281, 4049, 3519, 284, ...
2.794184
3,989
import numpy as np from statespace_model import solver from scipy.spatial.distance import cdist from pyomac.misc import mac_value, err_rel
[ 11748, 299, 32152, 355, 45941, 198, 6738, 2585, 10223, 62, 19849, 1330, 1540, 332, 198, 6738, 629, 541, 88, 13, 2777, 34961, 13, 30246, 1330, 269, 17080, 198, 6738, 12972, 296, 330, 13, 44374, 1330, 8352, 62, 8367, 11, 11454, 62, 2411...
3.227273
44
# encoding: utf-8 from __future__ import print_function from pybooru import Danbooru from pybooru import Moebooru konachan = Moebooru("konachan") kona_tags = konachan.tag_list(order='date') print(konachan.last_call) kona_post = konachan.post_list() print(konachan.last_call) lolibooru = Moebooru("lolibooru") kona_ta...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 12972, 2127, 27786, 1330, 6035, 2127, 27786, 198, 6738, 12972, 2127, 27786, 1330, 4270, 1765, 2675, 84, 198, 198, 74, 261, 620, 272, 796, ...
2.401544
259
str_year = input("what is your birth year:") year = int(str_year) age = 2020-year-1 print(f"hello, your age is {age}")
[ 2536, 62, 1941, 796, 5128, 7203, 10919, 318, 534, 4082, 614, 25, 4943, 198, 198, 1941, 796, 493, 7, 2536, 62, 1941, 8, 198, 198, 496, 796, 12131, 12, 1941, 12, 16, 628, 198, 4798, 7, 69, 1, 31373, 11, 534, 2479, 318, 1391, 496, ...
2.583333
48
import threading import base64 import hashlib import webbrowser import secrets from time import sleep from werkzeug.serving import make_server from flask import Flask, request global_dict = { 'received_callback': False, 'received_state': None, 'authorization_code': None, 'error_message': None } a...
[ 11748, 4704, 278, 198, 11748, 2779, 2414, 198, 11748, 12234, 8019, 198, 11748, 3992, 40259, 198, 11748, 13141, 198, 6738, 640, 1330, 3993, 198, 6738, 266, 9587, 2736, 1018, 13, 31293, 1330, 787, 62, 15388, 198, 6738, 42903, 1330, 46947, ...
3.04386
456
# -*- coding: utf-8 -*- from pas.plugins.ldap.plugin import LDAPPlugin from zope.component.hooks import getSite TITLE = "LDAP plugin (pas.plugins.ldap)" def remove_persistent_import_step(context): """Remove broken persistent import step. profile/import_steps.xml defined an import step with id "pas.plug...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 38836, 13, 37390, 13, 335, 499, 13, 33803, 1330, 27178, 2969, 37233, 198, 6738, 1976, 3008, 13, 42895, 13, 25480, 82, 1330, 651, 29123, 628, 198, 49560, 2538, 796,...
3.09375
288
# Copyright 2016 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
[ 2, 15069, 1584, 1168, 9328, 10501, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921,...
3.411523
243
"""This script is responsible for building the API reference. The API reference is located in docs/api. The script scans through all the modules, classes, and functions. It processes the __doc__ of each object and formats it so that MkDocs can process it in turn. """ import argparse import functools import importlib i...
[ 37811, 1212, 4226, 318, 4497, 329, 2615, 262, 7824, 4941, 13, 383, 7824, 4941, 318, 5140, 287, 198, 31628, 14, 15042, 13, 383, 4226, 23824, 832, 477, 262, 13103, 11, 6097, 11, 290, 5499, 13, 632, 7767, 198, 1169, 11593, 15390, 834, ...
2.121015
3,231
# Script to run several runs after each other. The runs are specified by the run-configurations # located in the folder runs/several_runs/ import sys import os sys.path.append('..') import run_script run_files = os.listdir("runs/several_runs/") run_files.sort() for run_file_name in run_files: try: run_...
[ 2, 12327, 284, 1057, 1811, 4539, 706, 1123, 584, 13, 383, 4539, 389, 7368, 416, 262, 1057, 12, 11250, 20074, 220, 198, 2, 5140, 287, 262, 9483, 4539, 14, 28116, 282, 62, 48381, 14, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 198...
2.65625
192
from django.db import models from Client.models import Student, Parent, Teacher, Subject, Course from django.contrib.auth.models import User
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 20985, 13, 27530, 1330, 13613, 11, 16774, 11, 32019, 11, 15540, 11, 20537, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 628, 198 ]
3.864865
37
# stdlib from typing import List from typing import Optional # syft relative from .serde.serializable import Serializable from .uid import UID
[ 2, 14367, 8019, 198, 6738, 19720, 1330, 7343, 198, 6738, 19720, 1330, 32233, 198, 198, 2, 827, 701, 3585, 198, 6738, 764, 2655, 2934, 13, 46911, 13821, 1330, 23283, 13821, 198, 6738, 764, 27112, 1330, 25105, 628 ]
3.918919
37
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Dict, List, Mapping, Optional, Tuple, Union from .. import ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 24118, 687, 10290, 357, 27110, 5235, 8, 16984, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760...
3.537815
119
# -*- coding: utf-8 -*- """Tags for dependency injection.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from django import template from ralph.util.di import get_extra_data register = template.Library() @regi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 36142, 329, 20203, 16954, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 8...
3.463918
97
import sys import os.path from urlparse import urljoin import time import urllib2 from bs4 import BeautifulSoup
[ 11748, 25064, 198, 11748, 28686, 13, 6978, 198, 6738, 19016, 29572, 1330, 19016, 22179, 198, 11748, 640, 198, 11748, 2956, 297, 571, 17, 198, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 628, 220, 220, 220, 220, 220, 220, 220, 220 ...
2.904762
42
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 26144, 35986, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760, 644, 345, 389, 1804, 0, 17202, ...
2.598742
795
# Generated by Django 3.1.5 on 2021-03-24 21:08 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 20, 319, 33448, 12, 3070, 12, 1731, 2310, 25, 2919, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
from core import models from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin """Need to import the default Django user admin, need to change some of the class variables to support our custom user admin using email instead of username""" from django.utils.translation import ...
[ 6738, 4755, 1330, 4981, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 28482, 1330, 11787, 46787, 355, 7308, 12982, 46787, 198, 37811, 23037, 284, 1330, 262, 4277, 37770, ...
3.20306
719
import numpy as np import math from compas.datastructures import Mesh import compas_slicer.utilities as utils import logging import networkx as nx from compas_slicer.slicers.slice_utilities import create_graph_from_mesh_vkeys from compas_slicer.pre_processing.preprocessing_utils.geodesics import get_igl_EXACT_geodesic_...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 6738, 552, 292, 13, 19608, 459, 1356, 942, 1330, 47529, 198, 11748, 552, 292, 62, 82, 677, 263, 13, 315, 2410, 355, 3384, 4487, 198, 11748, 18931, 198, 11748, 3127, 87, 355, 299, ...
2.43133
4,660
#---------------------------------- # Models / new_app #---------------------------------- from django.db import models #------------------------------------------------------------------------- #------------------------------------------------------------------------- #-----------------------------------------...
[ 2, 3880, 438, 198, 2, 220, 197, 197, 220, 32329, 1220, 649, 62, 1324, 198, 2, 3880, 438, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 10097, 45537, 198, 198, 2, 10097, 45537, 198, 198, 2, 10097, 45537 ]
8.380952
42
# Copyright 1999-2021 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
[ 2, 15069, 7358, 12, 1238, 2481, 41992, 4912, 31703, 12052, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, ...
3.651786
224
import logging import platform from pathlib import Path logger = Log("caterpillar_log")
[ 11748, 18931, 198, 11748, 3859, 198, 6738, 3108, 8019, 1330, 10644, 628, 198, 198, 6404, 1362, 796, 5972, 7203, 66, 729, 41643, 62, 6404, 4943, 198 ]
3.5
26
#!/usr/bin/env python3 us_invasion = [{'ip':'10.10.1.2', 'un':'john', 'pw':'allstar'}, {'ip':'10.10.1.3', 'un':'paul', 'pw':'iils20s3'}, {'ip':'10.10.1.4', 'un':'george', 'pw':'hunkydoryzory'}, {'ip':'10.10.1.5', 'un':'stuart', 'pw':'alta3'}, {'ip':'10.10.1.6', 'un':'pete', 'pw':'a8dd827z3'}] listbyusername = sorted(...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 385, 62, 16340, 4247, 796, 685, 90, 6, 541, 10354, 6, 940, 13, 940, 13, 16, 13, 17, 3256, 705, 403, 10354, 6, 30686, 3256, 705, 79, 86, 10354, 6, 439, 7364, 6, 5512, 1...
2.125926
270
from flask_wtf import FlaskForm from wtforms import ValidationError from wtforms.validators import Required, Email, EqualTo from wtforms import StringField, PasswordField, SubmitField from .models import User
[ 6738, 42903, 62, 86, 27110, 1330, 46947, 8479, 198, 6738, 266, 83, 23914, 1330, 3254, 24765, 12331, 198, 6738, 266, 83, 23914, 13, 12102, 2024, 1330, 20906, 11, 9570, 11, 28701, 2514, 198, 6738, 266, 83, 23914, 1330, 10903, 15878, 11, ...
3.872727
55
# # @lc app=leetcode id=362 lang=python3 # # [362] Design Hit Counter # import collections # @lc code=start # Your HitCounter object will be instantiated and called as such: # obj = HitCounter() # ls = [[1],[2],[3],[300],[301]] # for param in ls: # obj.hit(param[0]) # print(obj.q) # # param_2 = obj.getHits(t...
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 35667, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 35667, 60, 8495, 7286, 15034, 198, 2, 198, 11748, 17268, 198, 2, 2488, 44601, 2438, 28, 9688, 628, 198, 198, 2, 3406, 7...
2.562963
135
# date: 2019.07.09 # https://stackoverflow.com/questions/56951383/tkinter-disable-buttons-while-thread-is-running/56953613#56953613 import tkinter as tk from threading import Thread import time #----------------------------------------------------- # counter displayed when thread is running counter ...
[ 198, 2, 3128, 25, 13130, 13, 2998, 13, 2931, 198, 2, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 20, 37381, 1485, 5999, 14, 30488, 3849, 12, 40223, 12, 4360, 27288, 12, 4514, 12, 16663, 12, 271, 12, 20270, 14, 20, ...
2.739394
165
from robot.api import logger class MyLibrary: """マイライブラリ | =タイトル= | =もう一つタイトル= | | 1行1列目 | 1行2列目 | | | 1列目が空白 | | 2列目が空白 | | = カスタムセクション = ここがカスタムセクション = 次のセクション = `カスタムセクション` へのリンク セクションへのリンク - `introduction` - `importing` - `shortcuts` - `keywords` ...
[ 6738, 9379, 13, 15042, 1330, 49706, 628, 198, 4871, 2011, 23377, 25, 198, 220, 220, 220, 37227, 20115, 11482, 9263, 11482, 24001, 9263, 12675, 628, 220, 220, 220, 930, 796, 23376, 42396, 9202, 28, 930, 796, 43266, 29557, 31660, 2515, 97...
1.484848
462
""" Django settings for auswertung project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...)...
[ 37811, 198, 35, 73, 14208, 6460, 329, 257, 385, 86, 861, 2150, 1628, 13, 198, 198, 1890, 517, 1321, 319, 428, 2393, 11, 766, 198, 5450, 1378, 31628, 13, 28241, 648, 404, 305, 752, 13, 785, 14, 268, 14, 16, 13, 22, 14, 4852, 873,...
2.51261
1,705
"""Support for Telegram bot using polling.""" import logging from telegram import Update from telegram.error import NetworkError, RetryAfter, TelegramError, TimedOut from telegram.ext import CallbackContext, TypeHandler, Updater from homeassistant.const import EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP from...
[ 37811, 15514, 329, 50203, 10214, 1262, 13985, 526, 15931, 198, 11748, 18931, 198, 198, 6738, 573, 30536, 1330, 10133, 198, 6738, 573, 30536, 13, 18224, 1330, 7311, 12331, 11, 4990, 563, 3260, 11, 50203, 12331, 11, 5045, 276, 7975, 198, ...
2.734143
741
''' Problem: Xenny and Partially Sorted Strings Accept number of testcases as t for each test case: Given 3 integers N, K, M for each test case. Do the following steps- Accept all N number of strings and store them in a list sort the list by only considering first m charcaters in every element of l...
[ 7061, 6, 198, 40781, 25, 220, 1395, 11870, 290, 2142, 1927, 311, 9741, 4285, 654, 198, 38855, 1271, 286, 1332, 33964, 355, 256, 198, 1640, 1123, 1332, 1339, 25, 198, 220, 220, 220, 11259, 513, 37014, 399, 11, 509, 11, 337, 329, 1123...
3.212973
925
from store.api.handlers.base import BaseView from http import HTTPStatus from typing import Generator from datetime import datetime from aiohttp.web_response import Response from aiohttp.web_exceptions import HTTPNotFound from aiohttp_apispec import docs, request_schema, response_schema from sqlalchemy import and_, or...
[ 6738, 3650, 13, 15042, 13, 4993, 8116, 13, 8692, 1330, 7308, 7680, 198, 198, 6738, 2638, 1330, 14626, 19580, 198, 6738, 19720, 1330, 35986, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 257, 952, 4023, 13, 12384, 62, 26209, 1330, ...
3.484848
198
from enum import Enum from nest import Create, Connect from the_second_level.src.tools.multimeter import add_multimeter
[ 6738, 33829, 1330, 2039, 388, 198, 6738, 16343, 1330, 13610, 11, 8113, 198, 6738, 262, 62, 12227, 62, 5715, 13, 10677, 13, 31391, 13, 16680, 16912, 1330, 751, 62, 16680, 16912, 628, 628 ]
3.727273
33
import pytest from demisto_sdk.commands.common.constants import PACKS_DIR, PLAYBOOKS_DIR from demisto_sdk.commands.common.content.errors import (ContentInitializeError, ContentSerializeError) from demisto_sdk.commands.common.content.objects.abstract_objects impor...
[ 11748, 12972, 9288, 198, 198, 6738, 1357, 396, 78, 62, 21282, 74, 13, 9503, 1746, 13, 11321, 13, 9979, 1187, 1330, 47035, 50, 62, 34720, 11, 28180, 39453, 50, 62, 34720, 198, 6738, 1357, 396, 78, 62, 21282, 74, 13, 9503, 1746, 13, ...
2.339623
318
#!/usr/bin/env python # # Copyright (c) 2016, SICS, Swedish ICT # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, t...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 357, 66, 8, 1584, 11, 311, 19505, 11, 14023, 314, 4177, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 1...
3.108136
971
#!/usr/bin/env python2.6 # # Copyright (C) 2011 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 13, 21, 198, 2, 198, 2, 15069, 357, 34, 8, 2813, 383, 5565, 4946, 8090, 4935, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, ...
3.285714
343
""" In this file, I am messing around with using generator functions to handle things like pattern matching in LifeEventRules and timestep sizes when handling level-of-detail changes """ from abc import abstractmethod from typing import Generator, List, Protocol, Tuple from dataclasses import dataclass from neighborly....
[ 37811, 198, 818, 428, 2393, 11, 314, 716, 37241, 1088, 351, 1262, 17301, 5499, 198, 1462, 5412, 1243, 588, 3912, 12336, 287, 5155, 9237, 37766, 290, 198, 16514, 395, 538, 10620, 618, 9041, 1241, 12, 1659, 12, 49170, 2458, 198, 37811, ...
3.308901
191
""" This file implements different preprocessing utils functions. """ import pandas as pd import re from stopwords import stopwords_nltk, stopwords_specific import spacy import unicodedata def preprocess_string(nlp, input_string): """ Wraps all operations to ensure common normalization. """ processed_...
[ 37811, 198, 1212, 2393, 23986, 1180, 662, 36948, 3384, 4487, 5499, 13, 198, 37811, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 302, 198, 6738, 2245, 10879, 1330, 2245, 10879, 62, 77, 2528, 74, 11, 2245, 10879, 62, 11423, 19...
2.645902
1,220
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import Any, Dict, List, Tuple, Union import torch import torch.utils.checkpoint as checkpoint from fairseq import utils def ch...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 428, 2723, 5509, 13, 198, ...
2.457971
1,035
from dataclasses import dataclass from civic_jabber_ingest.models.base import DataModel from civic_jabber_ingest.utils.xml import get_jinja_template @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 6738, 23265, 62, 27935, 527, 62, 278, 395, 13, 27530, 13, 8692, 1330, 6060, 17633, 198, 6738, 23265, 62, 27935, 527, 62, 278, 395, 13, 26791, 13, 19875, 1330, 651, 62, 18594, ...
3.134615
52
# coding=utf-8 from collections import OrderedDict EXPECTED = OrderedDict( [ ( "bibjson", OrderedDict( [ ( "abstract", "The inflammatory environment of demyelinated lesions in multiple sclerosis (MS)...
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 49864, 9782, 1961, 796, 14230, 1068, 35, 713, 7, 198, 220, 220, 220, 685, 198, 220, 220, 220, 220, 220, 220, 220, 357, 198, 220, 220, 220, 220, ...
1.579424
4,199
# Copyright 2022 The BladeDISC Authors. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or ...
[ 2, 15069, 33160, 383, 11671, 26288, 34, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262...
2.996552
290
import subprocess import os import sys def download_file_from_storage(gs_file_path): """download a file from GCS into ml-engine running container Arguments: gs_ile_path: string path to the MOJO file. Returns: string: path of the downloaded file """ file_name = "{0}"...
[ 11748, 850, 14681, 198, 11748, 28686, 198, 11748, 25064, 628, 198, 4299, 4321, 62, 7753, 62, 6738, 62, 35350, 7, 14542, 62, 7753, 62, 6978, 2599, 198, 220, 220, 220, 37227, 15002, 257, 2393, 422, 402, 7902, 656, 25962, 12, 18392, 2491...
2.314121
347
import csv import os from purchases import Purchase if __name__ == '__main__': main()
[ 11748, 269, 21370, 198, 11748, 28686, 198, 198, 6738, 13339, 1330, 27637, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.939394
33
''' Collection of Text Classification Keras Algorithms for Toxic Comment Classification Challenge. https://www.kaggle.com/c/jigsaw-toxic-comment-classification-challenge ''' # Keras from keras.layers import (Dense, Input, Bidirectional, Activation, Dropout, Embedding, Flatten, CuDNNLSTM, CuDNNGRU, ...
[ 7061, 6, 198, 36307, 286, 8255, 40984, 17337, 292, 978, 7727, 907, 329, 29274, 18957, 40984, 13879, 13, 198, 5450, 1378, 2503, 13, 74, 9460, 293, 13, 785, 14, 66, 14, 73, 45636, 12, 83, 18047, 12, 23893, 12, 4871, 2649, 12, 36747, ...
2.352463
1,969
#!/usr/bin/python import socket from thread import * import threading from terminaltables import AsciiTable from chat_module import * reset="\033[0;0m" red="\033[38;5;9m" byellow="\033[38;5;3m" yellowb="\033[38;5;11m" blue="\033[38;5;27m" purple="\033[1;33;35m" cyan="\033[38;5;6m" white="\033[38;5;7m" orange="\033[3...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 17802, 220, 198, 6738, 4704, 1330, 1635, 198, 11748, 4704, 278, 198, 6738, 5651, 2501, 2977, 1330, 1081, 979, 72, 10962, 198, 6738, 8537, 62, 21412, 1330, 1635, 198, 198, 42503, 2...
1.994048
672
# -*- coding: utf-8 -*- # @Time : 2019/7/11 10:32 # @Author : hoo # @Site : # @File : korok.py # @Software: PyCharm Community Edition ''' 2019/7/9 : 日志清理脚本 ''' import codecs import glob import traceback import tarfile import subprocess import sys import datetime import time import shutil import os import l...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 13130, 14, 22, 14, 1157, 838, 25, 2624, 198, 2, 2488, 13838, 220, 1058, 289, 2238, 198, 2, 2488, 29123, 220, 220, 220, 1058, 220,...
2.116071
1,008
import doctest from pkgutil import iter_modules
[ 11748, 10412, 395, 220, 198, 6738, 279, 10025, 22602, 1330, 11629, 62, 18170, 628 ]
3.571429
14
__version__ = '0.2.9' __title__ = 'tfpromote' __description__ = 'Compare and promote Terraform files from dev to prod environments.' __url__ = 'https://github.com/billtrust/terraform-promote' __author__ = 'Doug Kerwin' __author_email__ = 'dkerwin@billtrust.com' __license__ = 'MIT' __keywords__ = ['terraform']
[ 834, 9641, 834, 796, 705, 15, 13, 17, 13, 24, 6, 201, 198, 834, 7839, 834, 796, 705, 27110, 16963, 1258, 6, 201, 198, 834, 11213, 834, 796, 705, 41488, 290, 7719, 24118, 687, 3696, 422, 1614, 284, 40426, 12493, 2637, 201, 198, 834...
2.780702
114
from zorg.driver import Driver from multiprocessing import Queue from threading import Thread import time
[ 6738, 1976, 2398, 13, 26230, 1330, 12434, 198, 6738, 18540, 305, 919, 278, 1330, 4670, 518, 198, 6738, 4704, 278, 1330, 14122, 198, 11748, 640, 628 ]
4.115385
26
import random import uuid import os import gevent from jumpscale.clients.explorer.models import NextAction, WorkloadType from jumpscale.loader import j from jumpscale.sals.reservation_chatflow import deployer from jumpscale.sals.reservation_chatflow.deployer import DeploymentFailed from .base_component import VDCBase...
[ 11748, 4738, 198, 11748, 334, 27112, 198, 11748, 28686, 198, 198, 11748, 4903, 1151, 198, 6738, 18045, 38765, 13, 565, 2334, 13, 20676, 11934, 13, 27530, 1330, 7406, 12502, 11, 5521, 2220, 6030, 198, 6738, 18045, 38765, 13, 29356, 1330, ...
2.603696
487
"""UR URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based view...
[ 37811, 4261, 10289, 28373, 198, 198, 464, 4600, 6371, 33279, 82, 63, 1351, 11926, 32336, 284, 5009, 13, 1114, 517, 1321, 3387, 766, 25, 198, 220, 220, 220, 3740, 1378, 31628, 13, 28241, 648, 404, 305, 752, 13, 785, 14, 268, 14, 17, ...
2.505863
597
import os from os.path import isfile, join import time import ctypes folderpath = r"E:\All Projects\Auto Wallpaper" all_files = [ f for f in os.listdir(folderpath) if isfile(join(folderpath, f))] for image in all_files: print(image) ctypes.windll.user32.SystemParametersInfoW(20, 0, folderpath+ "\\" + image, ...
[ 11748, 28686, 198, 6738, 28686, 13, 6978, 1330, 318, 7753, 11, 4654, 198, 11748, 640, 198, 11748, 269, 19199, 198, 198, 43551, 6978, 796, 374, 1, 36, 7479, 3237, 29898, 59, 27722, 5007, 20189, 1, 198, 198, 439, 62, 16624, 796, 685, ...
2.685039
127
import matplotlib.pyplot as plt import numpy as np import os import re plotsDir = "plots" # function to add an output, if experiment and value are both defined # function to parse a csv timeFile # with lines s.t. "experiment,logFile,elapsedTime,fileSize,timePerMB" # function to adapt a given "experimentValue" # - ...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 302, 198, 198, 489, 1747, 35277, 796, 366, 489, 1747, 1, 198, 198, 2, 2163, 284, 751, 281, 5072, 11, 611, 63...
2.798623
581
# -*- coding: utf-8 -*- """ DC Resistivity Forward Simulation in 2.5D ========================================= Here we use the module *SimPEG.electromagnetics.static.resistivity* to predict DC resistivity data and plot using a pseudosection. In this tutorial, we focus on the following: - How to define the survey...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 9697, 36136, 3458, 19530, 41798, 287, 362, 13, 20, 35, 198, 10052, 2559, 28, 198, 198, 4342, 356, 779, 262, 8265, 1635, 8890, 47, 7156, 13, 9509, 398, 363,...
2.878471
3,637
#!/bin/env python3 from os import walk from os.path import abspath, dirname, join, realpath, splitext from subprocess import call from sys import argv, stderr checks = [ "clang-analyzer-*", "cppcoreguidelines-*", "llvm-namespace-comment", "modernize-*", "performance-*", "readability-*", ] if _...
[ 2, 48443, 8800, 14, 24330, 21015, 18, 198, 6738, 28686, 1330, 2513, 198, 6738, 28686, 13, 6978, 1330, 2352, 6978, 11, 26672, 3672, 11, 4654, 11, 1103, 6978, 11, 4328, 578, 742, 198, 6738, 850, 14681, 1330, 869, 198, 6738, 25064, 1330,...
1.95977
522
import random from PIL import Image import lmdb import h5py import numpy as np import torch from torch.utils.data import Dataset import torchvision from torchvision.transforms import transforms
[ 11748, 4738, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 300, 9132, 65, 198, 11748, 289, 20, 9078, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 11748, ...
3.618182
55
import pathlib import numbers import random from typing import Any, Optional import numpy as np import torch from torch import Tensor from torch.jit.annotations import List, Tuple import torch.nn.functional as F from torch.utils.data import Dataset, DataLoader from torchvision import transforms import torchvision.data...
[ 11748, 3108, 8019, 198, 11748, 3146, 198, 11748, 4738, 198, 6738, 19720, 1330, 4377, 11, 32233, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 28034, 1330, 309, 22854, 198, 6738, 28034, 13, 45051, 13, 34574, 602, ...
3.0907
871
# Copyright 2021 NREL # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distri...
[ 2, 15069, 33448, 399, 16448, 198, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 407, 198, 2, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 257, 4866, ...
2.572264
1,197
import math from scrappybara.langmodel.token_context import TokenContext from scrappybara.preprocessing.tokenizer import Tokenizer from scrappybara.utils.files import txt_file_reader from scrappybara.utils.mutables import append_to_dict_list
[ 11748, 10688, 198, 198, 6738, 19320, 14097, 39389, 13, 17204, 19849, 13, 30001, 62, 22866, 1330, 29130, 21947, 198, 6738, 19320, 14097, 39389, 13, 3866, 36948, 13, 30001, 7509, 1330, 29130, 7509, 198, 6738, 19320, 14097, 39389, 13, 26791, ...
3.641791
67
#!/usr/bin/env python3 # # Copyright 2016 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Input socket plugin. Waits for events from an output socket plugin running on another Instalog node. See socket_common.py fo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 15069, 1584, 383, 18255, 1505, 7294, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, ...
2.506372
2,668
''' Copyright (C) 2019 Simon D. Levy MIT License ''' from gym.envs.registration import register register( id='Lander-v0', entry_point='gym_copter.envs:Lander2D', max_episode_steps=2000 ) register( id='Lander3D-v0', entry_point='gym_copter.envs:Lander3D', max_episode_steps=20...
[ 7061, 6, 201, 198, 15269, 357, 34, 8, 13130, 11288, 360, 13, 32036, 201, 198, 201, 198, 36393, 13789, 201, 198, 7061, 6, 201, 198, 201, 198, 6738, 11550, 13, 268, 14259, 13, 2301, 33397, 1330, 7881, 201, 198, 201, 198, 30238, 7, 2...
2.064815
324
import ast import logging import argparse import xml.etree.ElementTree as ET import cv2 import vision_genprog.tasks.image_processing as image_processing import vision_genprog.semanticSegmentersPop as semanticSegmentersPop import os import ast import synthetic_heatmap.generators.stop_sign as stop_sign logging.basicConf...
[ 11748, 6468, 198, 11748, 18931, 198, 11748, 1822, 29572, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 11748, 269, 85, 17, 198, 11748, 5761, 62, 5235, 1676, 70, 13, 83, 6791, 13, 9060, 62, 36948, 355, 2939, 62, ...
2.576094
1,531
import sys from textwrap import indent as __indent_text import click CONTEXT_SETTINGS = {'help_option_names': ['-h', '--help']} UNKNOWN_OPTIONS = {'help_option_names': [], 'ignore_unknown_options': True} DEFAULT_INDENT = 4
[ 11748, 25064, 198, 6738, 2420, 37150, 1330, 33793, 355, 11593, 521, 298, 62, 5239, 198, 198, 11748, 3904, 198, 198, 10943, 32541, 62, 28480, 51, 20754, 796, 1391, 6, 16794, 62, 18076, 62, 14933, 10354, 685, 29001, 71, 3256, 705, 438, ...
2.795181
83
# ------------------------------------------------------------------ # Warp Sequencer # (C) 2020 Michael DeHaan <michael@michaeldehaan.net> & contributors # Apache2 Licensed # ------------------------------------------------------------------ # uses the code in smart.py or literal.py to evaluate a symbol that # might ...
[ 2, 16529, 438, 198, 2, 31382, 24604, 12137, 198, 2, 357, 34, 8, 12131, 3899, 1024, 23303, 272, 1279, 76, 40302, 31, 76, 488, 3609, 35209, 3099, 272, 13, 3262, 29, 1222, 20420, 198, 2, 24843, 17, 49962, 198, 2, 16529, 438, 198, 198...
2.741546
414
import logging from typing import Literal import arrow import discord from discord.ext import commands from naotimes.bot import naoTimesBot from naotimes.context import naoTimesContext from naotimes.converters import StealedEmote IconLiteral = Literal[ "mfa_none", "mfa_low", "mfa_medium", "mfa_high...
[ 11748, 18931, 198, 6738, 19720, 1330, 25659, 1691, 198, 198, 11748, 15452, 198, 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 198, 6738, 12385, 313, 999, 13, 13645, 1330, 299, 5488, 28595, 20630, 198, 6738, 12385, 313, 999, ...
2.409357
171
import os import importlib import pbx_gs_python_utils # needed for dependency import from osbot_aws.Globals import Globals from pbx_gs_python_utils.utils.Files import Files from osbot_aws.tmp_utils.Temp_Files import Temp_Files from osbot_aws.apis.Lambda import Lamb...
[ 11748, 28686, 198, 11748, 1330, 8019, 198, 198, 11748, 279, 65, 87, 62, 14542, 62, 29412, 62, 26791, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
2.283237
173
from dji_asdk_to_python.utils.message_builder import MessageBuilder from dji_asdk_to_python.errors import DJIError from dji_asdk_to_python.utils.shared import checkParameters from dji_asdk_to_python.utils.socket_utils import SocketUtils
[ 6738, 288, 7285, 62, 292, 34388, 62, 1462, 62, 29412, 13, 26791, 13, 20500, 62, 38272, 1330, 16000, 32875, 198, 6738, 288, 7285, 62, 292, 34388, 62, 1462, 62, 29412, 13, 48277, 1330, 13004, 40, 12331, 198, 6738, 288, 7285, 62, 292, ...
3.131579
76
# streamlit run pydantic_streamlit_input.py import streamlit as st from pydantic import BaseModel from typing import List, Dict import streamlit_pydantic as sp from pydantic import BaseModel, Field, HttpUrl from enum import Enum st.title("Use of pydantic for complex inputs") data = sp.pydantic_input(key="my_form"...
[ 2, 4269, 18250, 1057, 279, 5173, 5109, 62, 5532, 18250, 62, 15414, 13, 9078, 198, 198, 11748, 4269, 18250, 355, 336, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 198, 6738, 19720, 1330, 7343, 11, 360, 713, 198, 11748, 4269, 18250, 6...
3.057851
121
# Django settings for openlets project. import os # Environment path should match settings/<module name> ENVIRONMENT = os.environ.get('OPENLETS_ENV', 'dev') if ENVIRONMENT == 'dev': from .dev import * elif ENVIRONMENT == 'stage': from .stage import * elif ENVIRONMENT == 'prod': from .prod import * else: raise Imp...
[ 2, 37770, 6460, 329, 1280, 5289, 1628, 13, 198, 198, 11748, 28686, 198, 198, 2, 9344, 3108, 815, 2872, 6460, 14, 27, 21412, 1438, 29, 198, 1677, 53, 4663, 1340, 10979, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 3185, 1677, 2538, 46...
2.848812
926
"""The lightly.models package provides model implementations. *Note that the high-level building blocks will be deprecated with lightly version 1.2.0. Instead, use low-level building blocks to build the models yourself. Have a look at the benchmark code to see a reference implementation:* `lightly benchmarks <https:...
[ 37811, 464, 15376, 13, 27530, 5301, 3769, 2746, 25504, 13, 198, 198, 9, 6425, 326, 262, 1029, 12, 5715, 2615, 7021, 481, 307, 39224, 351, 220, 198, 30945, 2196, 352, 13, 17, 13, 15, 13, 5455, 11, 779, 1877, 12, 5715, 2615, 7021, 2...
3.841216
296
import os def server_lcd(cmd, data): """Changes the local directory Usage: lcd /dir """ pass
[ 11748, 28686, 198, 198, 4299, 4382, 62, 75, 10210, 7, 28758, 11, 1366, 2599, 198, 220, 220, 220, 37227, 29238, 262, 1957, 8619, 628, 220, 220, 220, 29566, 25, 300, 10210, 1220, 15908, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1...
2.533333
45
from typing import Dict class ImagePosition: """ The positions and rotations of the avatar and object for an image. Positions are stored as (x, y, z) dictionaries, for example: `{"x": 0, "y": 0, "z": 0}`. Rotations are stored as (x, y, z, w) dictionaries, for example: `{"x": 0, "y": 0, "z": 0, "w": 1...
[ 6738, 19720, 1330, 360, 713, 628, 198, 4871, 7412, 26545, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 383, 6116, 290, 5724, 602, 286, 262, 30919, 290, 2134, 329, 281, 2939, 13, 628, 220, 220, 220, 18574, 1756, 389, 8574, 355,...
2.325217
575
import TestKit from UnderGUI import * from UnderGUI._Private import * from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * ################################################################################ WIDTH = 800 HEIGHT = 600 g = Global() ################################...
[ 11748, 6208, 20827, 198, 198, 6738, 4698, 40156, 1330, 1635, 198, 6738, 4698, 40156, 13557, 29067, 1330, 1635, 198, 198, 6738, 30672, 13, 8763, 1330, 1635, 198, 6738, 30672, 13, 8763, 52, 1330, 1635, 198, 6738, 30672, 13, 8763, 3843, 13...
2.886297
343