content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# Copyright (c) 2013 Shotgun Software Inc. # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit # Source Code License included in this distribution package. See LICENSE. # By accessing, using, copying or modifying this work you indicate your # agreement to the S...
[ 2, 15069, 357, 66, 8, 2211, 34198, 10442, 3457, 13, 198, 2, 198, 2, 7102, 37, 25256, 12576, 5357, 4810, 3185, 7112, 2767, 13153, 198, 2, 198, 2, 770, 670, 318, 2810, 366, 1921, 3180, 1, 290, 2426, 284, 262, 34198, 37709, 16984, 15...
3.975
160
import os _ROOT = os.path.abspath(os.path.dirname(__file__))
[ 11748, 28686, 198, 62, 13252, 2394, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 198 ]
2.259259
27
""" Usage: briltag insertdata [options] Options: -h --help Show this screen. -c CONNECT Service name [default: onlinew] -p AUTHPATH Authentication file --name TAGNAME Name of the data tag --comments COMMENTS Comments on the t...
[ 37811, 220, 220, 220, 220, 198, 28350, 25, 198, 220, 865, 2326, 363, 7550, 7890, 685, 25811, 60, 198, 198, 29046, 25, 198, 220, 220, 220, 220, 220, 532, 71, 1377, 16794, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.270642
218
from rendering.manager import * from rendering.scenes import * from rendering.training import * import random import glm import os import numpy as np import math __VOLUME_RECONSTRUCTION_SHADERS__ = os.path.dirname(__file__)+"/shaders/VR" compile_shader_sources(__VOLUME_RECONSTRUCTION_SHADERS__)
[ 6738, 14837, 13, 37153, 1330, 1635, 198, 6738, 14837, 13, 28123, 1330, 1635, 198, 6738, 14837, 13, 34409, 1330, 1635, 198, 11748, 4738, 198, 11748, 1278, 76, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, ...
2.970874
103
# test if __name__ == '__main__': print(_merge_sort([1, 3, 2]))
[ 201, 198, 2, 1332, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 220, 220, 220, 3601, 28264, 647, 469, 62, 30619, 26933, 16, 11, 513, 11, 362, 60, 4008 ]
2.028571
35
# - *- coding: utf- 8 - *- import time from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.chrome.options import Options options = Options() options.headless = True path = 'path/to/chromedriver.exe' # You need to change this parser()
[ 2, 532, 1635, 12, 19617, 25, 3384, 69, 12, 807, 532, 1635, 12, 201, 198, 201, 198, 11748, 640, 201, 198, 201, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 201, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 13083, ...
2.743363
113
import numpy as np import matplotlib.pyplot as plt from scipy.optimize import curve_fit t = np.linspace(0, 5, 500) s0 = 0.5 v0 = 2.0 a = 1.5 s_noise = 0.5 * np.random.normal(size=t.size) s = cinematica(t,s0,v0,a) sdata = s + s_noise coefs, pcov = curve_fit(cinematica, t, sdata) plt.plot(t, sdata, 'b-', label='D...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 12133, 62, 11147, 198, 197, 198, 83, 796, 45941, 13, 21602, 10223, 7, 15, 11, 642, 11, 5323...
2.047138
297
import pandas as pd import numpy as np import optuna import xgboost train = pd.read_csv("~/kaggledatasets/riiid-test-answer-prediction/train.csv", nrows=3e6, dtype={'row_id': 'int64', 'timestamp': 'int64', 'user_id': 'int32', ...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 2172, 9613, 220, 198, 198, 11748, 2124, 70, 39521, 198, 198, 27432, 796, 279, 67, 13, 961, 62, 40664, 7203, 93, 14, 74, 9460, 992, 265, 292, 1039,...
1.606195
452
from typing import Optional, Dict from pathlib import Path from copy import deepcopy from tqdm import tqdm import torch as pt from torch import Tensor, nn from torch.optim import Adam
[ 6738, 19720, 1330, 32233, 11, 360, 713, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 28034, 355, 42975, 198, 6738, 28034, 1330, 309, 22854, 11, 299,...
3.7
50
from django.db import models from django.conf import settings from django.db.models.signals import post_save def user_was_created(sender, instance, created, ** kwargs): """ Listen for when a user is creted and create a profile""" created and Profile.objects.create( user=instance, username=instance.us...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281, 62, 21928, 628, 198, 198, 4299, 2836, 62, 9776, 62, 25598, 7, 82, 2194...
3.083969
131
import numpy as np # Compute normalized mutual information between two parcellations z1 and z2 # (Approximately) return whether an array is symmetric
[ 11748, 299, 32152, 355, 45941, 198, 198, 2, 3082, 1133, 39279, 13584, 1321, 1022, 734, 1582, 3846, 602, 1976, 16, 290, 1976, 17, 198, 198, 2, 357, 4677, 24378, 8, 1441, 1771, 281, 7177, 318, 23606, 19482 ]
4.081081
37
import pytest from xigt import XigtCorpus, Igt, Tier, Item, Metadata, Meta, MetaChild from xigt.errors import XigtError, XigtStructureError
[ 11748, 12972, 9288, 198, 198, 6738, 2124, 328, 83, 1330, 1395, 328, 83, 45680, 385, 11, 314, 13655, 11, 15917, 11, 9097, 11, 3395, 14706, 11, 30277, 11, 30277, 16424, 198, 6738, 2124, 328, 83, 13, 48277, 1330, 1395, 328, 83, 12331, ...
2.773585
53
from django.http import JsonResponse
[ 198, 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077 ]
3.7
10
from sensor import Sensor from stepper import Stepper sensor = Sensor() stepper = Stepper(100) #stepper.start() while True: print(sensor.measure())
[ 6738, 12694, 1330, 35367, 198, 6738, 2876, 2848, 1330, 2441, 2848, 198, 198, 82, 22854, 796, 35367, 3419, 198, 4169, 2848, 796, 2441, 2848, 7, 3064, 8, 198, 198, 2, 4169, 2848, 13, 9688, 3419, 198, 198, 4514, 6407, 25, 198, 220, 220...
2.943396
53
# Generated by Django 2.2.4 on 2019-08-18 16:16 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 19, 319, 13130, 12, 2919, 12, 1507, 1467, 25, 1433, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
# # PySNMP MIB module HP-ICF-IPV6-RA-GUARD-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HP-ICF-IPV6-RA-GUARD-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:34:21 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7....
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 6574, 12, 2149, 37, 12, 4061, 53, 21, 12, 3861, 12, 38022, 9795, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 272...
2.620875
2,970
from transformers import RobertaTokenizer tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
[ 6738, 6121, 364, 1330, 5199, 64, 30642, 7509, 198, 30001, 7509, 796, 5199, 64, 30642, 7509, 13, 6738, 62, 5310, 13363, 7203, 305, 4835, 64, 12, 8692, 4943 ]
3.642857
28
import numpy as np from .fasthist import hist2d stdquant = np.ndarray(13) stdquant[0] = (0.0000316712418331200) #-4 sdev stdquant[1] = (0.0013498980316301000) #-3 sdev stdquant[2] = (0.0227501319481792000) #-2 sdev stdquant[3] = (0.05) stdquant[4] = (0.1586552539314570000) #-1 sdev or lsdev stdquant[5] = (0.25) ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 764, 69, 292, 400, 396, 1330, 1554, 17, 67, 198, 198, 19282, 40972, 796, 45941, 13, 358, 18747, 7, 1485, 8, 198, 19282, 40972, 58, 15, 60, 796, 357, 15, 13, 2388, 18, 21940, 17464, 1507, 2...
1.863636
374
# coding: utf-8 """ Copyright 2016 SmartBear Software 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 applica...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 15269, 1584, 10880, 36352, 10442, 628, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 220, 220, 220, 345, 743, 407, 779,...
2.766739
463
from sys import stdin for line in stdin: n = int(line) if n == 42: break print(n)
[ 6738, 25064, 1330, 14367, 259, 198, 198, 1640, 1627, 287, 14367, 259, 25, 198, 197, 77, 796, 493, 7, 1370, 8, 198, 197, 361, 299, 6624, 5433, 25, 198, 197, 197, 9032, 198, 197, 4798, 7, 77, 8, 628 ]
2.282051
39
# -*- coding: utf-8 -*- if __name__=="__main__": print(remainder(20,7)) print(remainder(20,divisor=7)) print(remainder(number=20,divisor=7)) print(remainder(divisor=7,number=20)) print(flow_rate(0.5,3)) print(flow_rate(6,3,100))
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 361, 11593, 3672, 834, 855, 1, 834, 12417, 834, 1298, 198, 220, 3601, 7, 2787, 391, 1082, 7, 1238, 11, 22, 4008, 198, 220, 3601, 7, 2787, 391, 1082, 7, 1238, ...
2.059322
118
############################## ## cread purified h5ad file ## ############################## # input: annotation table and the whole expression profile # output: purified h5ad file import os import pandas as pd import anndata import argparse import gc import numpy as np parser = argparse.ArgumentParser(description='...
[ 14468, 7804, 4242, 2235, 198, 2235, 269, 961, 46075, 289, 20, 324, 2393, 22492, 198, 14468, 7804, 4242, 2235, 198, 198, 2, 5128, 25, 23025, 3084, 290, 262, 2187, 5408, 7034, 198, 2, 5072, 25, 46075, 289, 20, 324, 2393, 198, 198, 117...
3.385827
254
# -*- coding: utf-8 -*- """ Created on Thu Nov 29 13:56:44 2018 @author: RomanGutin """ import pandas as pd import numpy as np #Frequency Tuning Loop amino_letter = ['A','R','D','N','C','E','Q','G','H','I','L','K','M','F','P','S','T','W','Y','V'] length_scores =[4,8,6,6,5,7,7,4,7,5,6,8,7,8,5,5,5,9,8,5] FM_df = pd.Dat...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 26223, 5267, 2808, 1511, 25, 3980, 25, 2598, 2864, 198, 198, 31, 9800, 25, 7993, 38, 315, 259, 198, 37811, 198, 11748, 19798, 292, 355, 279, 67...
2.184049
652
from kafka import KafkaConsumer
[ 6738, 479, 1878, 4914, 1330, 46906, 49106, 198 ]
4
8
# utilities import os from re import sub import uuid import subprocess # Image To Pdf import img2pdf # PDF To Images from pdf2image import convert_from_path # PDF To Word from pdf2docx import parse _BASE_DIR = os.getcwd() _BASE_DIR_FILE = os.path.join(_BASE_DIR, "files")
[ 2, 20081, 198, 11748, 28686, 198, 6738, 302, 1330, 850, 198, 11748, 334, 27112, 198, 11748, 850, 14681, 198, 198, 2, 7412, 1675, 350, 7568, 198, 11748, 33705, 17, 12315, 198, 198, 2, 12960, 1675, 5382, 198, 6738, 37124, 17, 9060, 1330...
2.772277
101
from kivy.uix.screenmanager import Screen from kivy.properties import StringProperty, ObjectProperty, NumericProperty, ListProperty, BooleanProperty from kivy.app import App from kivy.logger import Logger from library_widgets import TrackingScreenMixin from utils import import_kv import_kv(__file__)
[ 6738, 479, 452, 88, 13, 84, 844, 13, 9612, 37153, 1330, 15216, 198, 6738, 479, 452, 88, 13, 48310, 1330, 10903, 21746, 11, 9515, 21746, 11, 399, 39223, 21746, 11, 7343, 21746, 11, 41146, 21746, 198, 6738, 479, 452, 88, 13, 1324, 133...
3.426966
89
"""Train logistic regression model on hdf5 features for classification Modified from: https://gurus.pyimagesearch.com/topic/transfer-learning-example-dogs-and-cats/ """ import pickle from sklearn.linear_model import LogisticRegression from sklearn.metrics import classification_report def train_model(h5py_db, mod...
[ 37811, 44077, 2604, 2569, 20683, 2746, 319, 289, 7568, 20, 3033, 329, 17923, 198, 198, 5841, 1431, 422, 25, 198, 220, 220, 220, 3740, 1378, 70, 31891, 13, 9078, 17566, 3679, 13, 785, 14, 26652, 14, 39437, 12, 40684, 12, 20688, 12, 2...
2.627119
472
import pandas as pd v_4 = pd.read_csv('50/predictions_dev_queries_50k_normalized_exp.csv') temp = list(v_4['query_id']) v_4['query_id'] = list(v_4['reference_id']) v_4['reference_id'] = temp v_5 = pd.read_csv('ibn/predictions_dev_queries_50k_normalized_exp.csv') temp = list(v_5['query_id']) v_5['query_id'] = list(v_5...
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 85, 62, 19, 796, 279, 67, 13, 961, 62, 40664, 10786, 1120, 14, 28764, 9278, 62, 7959, 62, 421, 10640, 62, 1120, 74, 62, 11265, 1143, 62, 11201, 13, 40664, 11537, 198, 29510, 796, 1351, 7,...
2.092747
841
from src.utils.cache import cache
[ 6738, 12351, 13, 26791, 13, 23870, 1330, 12940, 628, 198 ]
3.6
10
from threading import Thread from flask_mail import Mail, Message from resources.errors import InternalServerError mail = Mail(app=None) app = None
[ 6738, 4704, 278, 1330, 14122, 198, 6738, 42903, 62, 4529, 1330, 11099, 11, 16000, 198, 6738, 4133, 13, 48277, 1330, 18628, 10697, 12331, 198, 198, 4529, 796, 11099, 7, 1324, 28, 14202, 8, 198, 1324, 796, 6045, 628, 628 ]
3.897436
39
import base64 import json from OpenSSL.SSL import ( VERIFY_PEER, VERIFY_FAIL_IF_NO_PEER_CERT, VERIFY_NONE, SSLv3_METHOD, SSLv23_METHOD, TLSv1_METHOD) from twisted.web.http_headers import Headers from twisted.internet.defer import inlineCallbacks, fail, succeed from vxsandbox.resources.http import ( HttpC...
[ 11748, 2779, 2414, 198, 11748, 33918, 198, 198, 6738, 4946, 31127, 13, 31127, 1330, 357, 198, 220, 220, 220, 33310, 5064, 56, 62, 11401, 1137, 11, 33310, 5064, 56, 62, 7708, 4146, 62, 5064, 62, 15285, 62, 11401, 1137, 62, 34, 17395, ...
2.88024
167
from lightutils import get_free_tcp_port port = get_free_tcp_port() print(port) print(type(port))
[ 6738, 1657, 26791, 1330, 651, 62, 5787, 62, 83, 13155, 62, 634, 198, 198, 634, 796, 651, 62, 5787, 62, 83, 13155, 62, 634, 3419, 198, 4798, 7, 634, 8, 198, 4798, 7, 4906, 7, 634, 4008, 198 ]
2.605263
38
from .accessor import Accessor from . import parsers import inspect def populateAccessors(): """ Find all filetype-specific Accessor subclasses in the parsers file (i.e. NVSPL, SRCID, etc.) and instantiate them. This way, one instance of each Accessor is added to the soundDB namespace under the name of th...
[ 6738, 764, 15526, 273, 1330, 8798, 273, 198, 6738, 764, 1330, 13544, 364, 198, 198, 11748, 10104, 198, 198, 4299, 48040, 15457, 669, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 9938, 477, 2393, 4906, 12, 11423, 8798, 273, 85...
3.281818
220
from datetime import datetime from sqlalchemy import ( Column, Integer, Text, DateTime, SmallInteger, BigInteger, String, Date, ForeignKey, UniqueConstraint ) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm.exc import NoResultFound from sqlalchemy....
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 44161, 282, 26599, 1330, 357, 198, 220, 220, 220, 29201, 11, 198, 220, 220, 220, 34142, 11, 198, 220, 220, 220, 8255, 11, 198, 220, 220, 220, 7536, 7575, 11, 198, 220, 220, 220, 10452, ...
2.708108
185
import nose import os from ogcserver.WMS import BaseWMSFactory
[ 11748, 9686, 198, 11748, 28686, 198, 6738, 267, 36484, 15388, 13, 54, 5653, 1330, 7308, 54, 5653, 22810, 198 ]
3.315789
19
from django.db import models from .base import Base
[ 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 764, 8692, 1330, 7308, 628 ]
3.6
15
import setuptools try: with open('README.md', 'r') as fh: long_description = fh.read() except: long_description = '' setuptools.setup( name='blackout', version='1.0.4', author='Mike Malinowski', author_email='mike@twisted.space', description='A python package making it...
[ 11748, 900, 37623, 10141, 201, 198, 201, 198, 28311, 25, 201, 198, 220, 220, 220, 351, 1280, 10786, 15675, 11682, 13, 9132, 3256, 705, 81, 11537, 355, 277, 71, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 890, 62, 11213, 796, ...
2.482759
348
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function import os import argparse from subprocess import call from .vk_music import VkMusic from .exceptions import AlreadyRunningError from .defaults import SafeFsStorage if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 6738, 850, 14681, 1330, 869, 1...
2.93
100
__author__ = "Jens Honer" __copyright__ = "Copyright 2018, Jens Honer Tracking Toolbox" __email__ = "-" __license__ = "mit" __version__ = "1.0" __status__ = "Prototype" import numpy as np _bbox_sign_factors = np.asarray( [ [1.0, 1.0], [0.0, 1.0], [-1.0, 1.0], [...
[ 834, 9800, 834, 796, 366, 41, 641, 8835, 263, 1, 198, 834, 22163, 4766, 834, 796, 366, 15269, 2864, 11, 449, 641, 8835, 263, 37169, 16984, 3524, 1, 198, 834, 12888, 834, 796, 366, 21215, 198, 834, 43085, 834, 796, 366, 2781, 1, 19...
1.622776
281
from .base import * # noqa DEBUG = True SECURE_SSL_REDIRECT = False # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = "CHANGEME!!!" # Enable FE component library PATTERN_LIBRARY_ENABLED = True INTERNAL_IPS = ("127.0.0.1", "10.0.2.2") BASE_URL = "http://localhost:8000" # URL to dire...
[ 6738, 764, 8692, 1330, 1635, 220, 1303, 645, 20402, 198, 198, 30531, 796, 6407, 198, 198, 23683, 11335, 62, 31127, 62, 22083, 40, 23988, 796, 10352, 198, 198, 2, 10729, 4261, 9050, 39410, 25, 1394, 262, 3200, 1994, 973, 287, 3227, 320...
2.664615
325
import swig_example swig_example.swig_example_hello() swig_example.link_liba_hello()
[ 11748, 1509, 328, 62, 20688, 198, 2032, 328, 62, 20688, 13, 2032, 328, 62, 20688, 62, 31373, 3419, 198, 2032, 328, 62, 20688, 13, 8726, 62, 8019, 64, 62, 31373, 3419 ]
2.709677
31
from torch.utils.data import Dataset from torchvision.transforms import transforms from sklearn.model_selection import train_test_split import os import glob import torch import numpy as np from PIL import Image import pdb
[ 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 6738, 28034, 10178, 13, 7645, 23914, 1330, 31408, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 198, 11748, 28686, 198, 11748, 15095, 19...
3.75
60
# Generated by Django 3.1.7 on 2021-04-15 22:46 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 22, 319, 33448, 12, 3023, 12, 1314, 2534, 25, 3510, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.891892
37
from tutils import pdb from tutils import subprocess from tutils import Counter from tutils import partial from tutils import reduce from tutils import wraps from tutils import count from tutils import groupby from tutils import product from tutils import prod from tutils import itemgetter from tutils import Path from ...
[ 6738, 9732, 4487, 1330, 279, 9945, 198, 6738, 9732, 4487, 1330, 850, 14681, 198, 6738, 9732, 4487, 1330, 15034, 198, 6738, 9732, 4487, 1330, 13027, 198, 6738, 9732, 4487, 1330, 4646, 198, 6738, 9732, 4487, 1330, 27521, 198, 6738, 9732, ...
3.513158
684
from setuptools import setup setup( name='weather', version='0.1', description='CLI frontend for querying weather', packages=['weather'], entry_points={ 'console_scripts': ['weather = weather.__main__:main'] }, author='Aleksi Kauppila', author_email='aleksi.kauppila@gmail.com' )...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 23563, 3256, 198, 220, 220, 220, 2196, 11639, 15, 13, 16, 3256, 198, 220, 220, 220, 6764, 11639, 5097, 40, 2166, 437, 329, 42517, 1112, 6193, ...
2.523438
128
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from .models import * admin.site.register(CharacterEvent) admin.site.register(Event) admin.site.register(CharacterOwner) admin.site.register(Character) admin.site.register(User, UserAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 28482, 1330, 11787, 46787, 198, 6738, 764, 27530, 1330, 1635, 198, 198, 28482, 13, 15654, 13, 30238, 7, 27275, 9237, 8, 198, 28482, ...
3.3875
80
#coding=utf-8 import tkinter as tk from tkinter import ttk from tkinter import scrolledtext from tkinter import messagebox as mBox from tkinter import filedialog import matplotlib matplotlib.use('TkAgg') from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg import matplotlib.pyplot as plt import datetime i...
[ 2, 66, 7656, 28, 40477, 12, 23, 198, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 6738, 256, 74, 3849, 1330, 256, 30488, 198, 6738, 256, 74, 3849, 1330, 629, 8375, 5239, 198, 6738, 256, 74, 3849, 1330, 3275, 3524, 355, 285, 14253...
2.307522
2,260
"""Example of assigning a variable.""" user_name = input("What is your name? ")
[ 37811, 16281, 286, 38875, 257, 7885, 526, 15931, 198, 7220, 62, 3672, 796, 5128, 7203, 2061, 318, 534, 1438, 30, 366, 8, 198 ]
3.478261
23
from .common import layers, grid, plotter, DEFAULT_COLORS, set_axes_equal from .atoms import plot_atoms, plot_points from .SiteNetworkPlotter import SiteNetworkPlotter from .SiteTrajectoryPlotter import SiteTrajectoryPlotter
[ 6738, 764, 11321, 1330, 11685, 11, 10706, 11, 7110, 353, 11, 5550, 38865, 62, 25154, 20673, 11, 900, 62, 897, 274, 62, 40496, 198, 198, 6738, 764, 265, 3150, 1330, 7110, 62, 265, 3150, 11, 7110, 62, 13033, 198, 198, 6738, 764, 29123...
3.304348
69
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2017-2022 Anderson Bravalheri, Univertity of Bristol # High Performance Networks Group # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Yo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 2177, 12, 1238, 1828, 9918, 9718, 2100, 372, 72, 11, 791, 1428, 83, 414, 286, 25040, 198, 2, 220, 220, 22...
3.210526
228
""" Python 2/3 Compatibility ======================== Not sure we need to support anything but Python 2.7 at this point , but copied this module over from flask-peewee for the time being. """ import sys PY2 = sys.version_info[0] == 2 if PY2: text_type = unicode string_types = (str, unicode) unichr = u...
[ 37811, 198, 198, 37906, 362, 14, 18, 46021, 198, 4770, 2559, 198, 198, 3673, 1654, 356, 761, 284, 1104, 1997, 475, 11361, 362, 13, 22, 379, 428, 966, 837, 475, 18984, 198, 5661, 8265, 625, 422, 42903, 12, 431, 413, 1453, 329, 262, ...
2.754601
163
# from discord.ext.commands import Cog # from discord_slash import SlashContext, cog_ext # from discord_slash.utils.manage_commands import create_option # # # class TicTacToeAI(Cog): # def __init__(self, client): # self.client = client # # @cog_ext.cog_subcommand( # base="tictactoe", # b...
[ 2, 422, 36446, 13, 2302, 13, 9503, 1746, 1330, 327, 519, 198, 2, 422, 36446, 62, 6649, 1077, 1330, 26616, 21947, 11, 43072, 62, 2302, 198, 2, 422, 36446, 62, 6649, 1077, 13, 26791, 13, 805, 496, 62, 9503, 1746, 1330, 2251, 62, 180...
2.055556
432
"""This module defines the karma_test rule.""" load("@infra-sk_npm//@bazel/typescript:index.bzl", "ts_library") load("@infra-sk_npm//@bazel/rollup:index.bzl", "rollup_bundle") load("@infra-sk_npm//karma:index.bzl", _generated_karma_test = "karma_test") def karma_test(name, srcs, deps, entry_point = None): """Runs...
[ 37811, 1212, 8265, 15738, 262, 31789, 62, 9288, 3896, 526, 15931, 198, 198, 2220, 7203, 31, 10745, 430, 12, 8135, 62, 77, 4426, 1003, 31, 65, 41319, 14, 28004, 3798, 1968, 25, 9630, 13, 65, 48274, 1600, 366, 912, 62, 32016, 4943, 19...
2.275524
1,430
from fileutils.fileutils import save_output_to_file, select_option_from_menu
[ 6738, 2393, 26791, 13, 7753, 26791, 1330, 3613, 62, 22915, 62, 1462, 62, 7753, 11, 2922, 62, 18076, 62, 6738, 62, 26272, 628 ]
3.391304
23
import xallennlp.training.mlflow_callback import xallennlp.training.mlflow_checkpointer
[ 11748, 2124, 439, 1697, 34431, 13, 34409, 13, 76, 1652, 9319, 62, 47423, 198, 11748, 2124, 439, 1697, 34431, 13, 34409, 13, 76, 1652, 9319, 62, 9122, 29536, 198 ]
3.034483
29
# -*- coding: utf-8 -*- """colabUtil.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1KX9x-rqyj0XfUkLtfOVh8t8T_kW0hs0u #Colab Util This is a collection of utility functions that simplifies data science researchin using colab. I wrote this while ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 4033, 397, 18274, 346, 13, 541, 2047, 65, 198, 198, 38062, 4142, 7560, 416, 1623, 4820, 2870, 13, 198, 198, 20556, 2393, 318, 5140, 379, 198, 220, 220, 220, 374...
2.90841
2,271
""" Base common features for product readers """ __classification__ = "UNCLASSIFIED" __author__ = "Thomas McCullough" from typing import Sequence, List, Tuple, Union from sarpy.io.general.base import AbstractReader from sarpy.io.product.sidd1_elements.SIDD import SIDDType as SIDDType1 from sarpy.io.product.sidd2_el...
[ 37811, 198, 14881, 2219, 3033, 329, 1720, 7183, 198, 37811, 198, 198, 834, 4871, 2649, 834, 796, 366, 4944, 45449, 1, 198, 834, 9800, 834, 796, 366, 22405, 45026, 619, 1, 628, 198, 6738, 19720, 1330, 45835, 11, 7343, 11, 309, 29291, ...
2.869863
146
from django.conf import settings from redis import StrictRedis from rest_framework.response import Response from rest_framework.views import APIView from PersonManage.role.models import Role from PersonManage.role.serializer import OneRole, ManyRole from PersonManage.jurisdiction.models import Jurisdiction
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 2266, 271, 1330, 520, 2012, 7738, 271, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 30604, 13, 33571, 1330, 3486, 3824, 769, 198, 6738, 7755, 5124, 496, ...
3.8625
80
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See LICENSE file distributed along with the datalad_osf package for the # copyright and license terms. # # ## ##...
[ 2, 795, 16436, 25, 532, 9, 12, 4235, 25, 21015, 26, 12972, 12, 521, 298, 12, 28968, 25, 604, 26, 7400, 12, 10394, 25, 604, 26, 33793, 12, 8658, 82, 12, 14171, 25, 18038, 532, 9, 12, 198, 2, 409, 25, 900, 39747, 28, 19, 40379, ...
2.419355
1,550
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Module that contains Qt observer pattern related functions and classes """ from __future__ import print_function, division, absolute_import from uuid import uuid4 from functools import partial from Qt.QtCore import Signal, QObject
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 26796, 326, 4909, 33734, 22890, 3912, 3519, 5499, 290, 6097, 198, 37811, 198, 198, 6738, 11593, 37443, ...
3.404762
84
"""Advent of Code 2019 Day 12.""" from functools import lru_cache import re def simulate_steps(moons, steps=None): """Simulate number steps of moons. Returns moons after number of steps. If steps is None returns cycles of moons.""" cycles = {} initial_moons = moons step = 0 while not ste...
[ 37811, 2782, 1151, 286, 6127, 13130, 3596, 1105, 526, 15931, 198, 6738, 1257, 310, 10141, 1330, 300, 622, 62, 23870, 198, 11748, 302, 628, 198, 198, 4299, 29308, 62, 20214, 7, 5908, 684, 11, 4831, 28, 14202, 2599, 198, 220, 220, 220, ...
2.34375
1,248
from django.utils.encoding import force_text from django.utils.text import slugify try: from rest_framework.serializers import ManyRelatedField except ImportError: ManyRelatedField = type(None) try: from rest_framework.serializers import ListSerializer except ImportError: ListSerializer = type(None) ...
[ 6738, 42625, 14208, 13, 26791, 13, 12685, 7656, 1330, 2700, 62, 5239, 198, 6738, 42625, 14208, 13, 26791, 13, 5239, 1330, 31065, 1958, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 1334, 62, 30604, 13, 46911, 11341, 1330, 4650, 9819, ...
2.903981
427
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'Ui_ZhkuMainWindow.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import Qt...
[ 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, 52, 72, 62, 57, 71, 23063, 13383, 27703, 13, 9019, 6, 198, 2, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, ...
2.888
125
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
import numpy as np from pyNTCIREVAL import Labeler from pyNTCIREVAL.metrics import MSnDCG from collections import defaultdict from ntcir15_tools.data import en_query_ids, ja_query_ids, en_labels, ja_labels
[ 11748, 299, 32152, 355, 45941, 198, 6738, 12972, 45, 4825, 41736, 23428, 1330, 36052, 263, 198, 6738, 12972, 45, 4825, 41736, 23428, 13, 4164, 10466, 1330, 6579, 77, 9697, 38, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 299, 23047, ...
2.971429
70
from .contrastive import SupConLoss, NoiseConLoss
[ 6738, 764, 3642, 5685, 425, 1330, 5200, 3103, 43, 793, 11, 30964, 3103, 43, 793, 198 ]
3.125
16
C = int(input("Insira um valor: ")) Fire = (9 * C / 5) + 32 print(Fire)
[ 34, 796, 493, 7, 15414, 7203, 20376, 8704, 23781, 1188, 273, 25, 366, 4008, 198, 13543, 796, 357, 24, 1635, 327, 1220, 642, 8, 1343, 3933, 198, 4798, 7, 13543, 8 ]
2.290323
31
""" filename: test.py author: Supriya Sudarshan version: 19.04.2021 description: Takes in the images and predicts (Covid or Non-Covid/Normal) using the *.h5 models """ import numpy as np import matplotlib.pyplot as plt import os from tensorflow.keras.models import load_model from tensorflow.keras.preprocessing impor...
[ 37811, 198, 34345, 25, 1332, 13, 9078, 198, 9800, 25, 5200, 380, 3972, 14818, 5406, 272, 198, 9641, 25, 678, 13, 3023, 13, 1238, 2481, 198, 11213, 25, 33687, 287, 262, 4263, 290, 26334, 357, 34, 709, 312, 393, 8504, 12, 34, 709, 3...
2.532468
847
"""Problem 41 of https://projecteuler.net""" from itertools import permutations from projecteuler.inspectors import is_prime def problem_41(): """Solution to problem 41.""" # All 8 and 9 digit pandigitals are divisible by 3. perms = [int(''.join(x)) for x in permutations('1234567')] return max(x for...
[ 37811, 40781, 6073, 286, 3740, 1378, 16302, 68, 18173, 13, 3262, 37811, 198, 198, 6738, 340, 861, 10141, 1330, 9943, 32855, 198, 198, 6738, 1628, 68, 18173, 13, 1040, 806, 669, 1330, 318, 62, 35505, 628, 198, 4299, 1917, 62, 3901, 335...
2.92437
119
import re import numpy as np from tqdm import tqdm from ..decorators import print_step from multiprocessing import Pool # Compiling for optimization re_sub_1 = re.compile(r"(:(?=\s))|((?<=\s):)") re_sub_2 = re.compile(r"(\d+\.)+\d+") re_sub_3 = re.compile(r"\d{2}:\d{2}:\d{2}") re_sub_4 = re.compile(r"Mar|Apr|Dec|Jan|...
[ 11748, 302, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 11485, 12501, 273, 2024, 1330, 3601, 62, 9662, 198, 6738, 18540, 305, 919, 278, 1330, 19850, 628, 198, 2, 3082, 4386, 329, 239...
1.95122
246
import os from dataset.data_config import DataConfig images_data_base_dir = os.path.abspath('../../../data/datasets_coco/') data_conf = { DataConfig.IMAGE_BASEDIR: images_data_base_dir, DataConfig.TRAIN: [ { DataConfig.NICKNAME: 'decay_train', DataConfig.AN...
[ 11748, 28686, 198, 198, 6738, 27039, 13, 7890, 62, 11250, 1330, 6060, 16934, 628, 198, 17566, 62, 7890, 62, 8692, 62, 15908, 796, 28686, 13, 6978, 13, 397, 2777, 776, 10786, 40720, 40720, 40720, 7890, 14, 19608, 292, 1039, 62, 66, 256...
1.614224
2,784
from django.urls import reverse from projectroles.tests.test_permissions import TestProjectPermissionBase from beaconsite.tests.factories import ConsortiumFactory, SiteFactory
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 1628, 305, 829, 13, 41989, 13, 9288, 62, 525, 8481, 1330, 6208, 16775, 5990, 3411, 14881, 198, 198, 6738, 307, 37256, 578, 13, 41989, 13, 22584, 1749, 1330, 42727, 22810, 11, 14...
3.934783
46
from django.forms import ModelForm from backend.models import Image, Image2 from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from django import forms
[ 6738, 42625, 14208, 13, 23914, 1330, 9104, 8479, 198, 6738, 30203, 13, 27530, 1330, 7412, 11, 7412, 17, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 11787, 12443, 341, 8479, 198, 6738, 42625, 14208, 13, 3642, 822,...
3.690909
55
""" Created on Mar 7 2018 @author: MCC """ from ctypes import (CDLL, CFUNCTYPE, Structure, c_uint, c_int, c_longlong, POINTER, c_double, c_char, py_object, c_ulonglong, cast, c_char_p, c_byte) from enum import IntEnum from .ul_structs import DaqDeviceDescriptor, AiQueueElement, ...
[ 37811, 198, 41972, 319, 1526, 767, 2864, 198, 198, 31, 9800, 25, 337, 4093, 198, 37811, 198, 6738, 269, 19199, 1330, 357, 8610, 3069, 11, 18551, 4944, 4177, 56, 11401, 11, 32522, 11, 269, 62, 28611, 11, 269, 62, 600, 11, 269, 62, ...
2.320205
4,291
""" Given a Singly Linked List which has data members sorted in ascending order. Construct a Balanced Binary Search Tree which has same data members as the given Linked List. """ from typing import Optional from binary_tree_node import Node # type: ignore from tree_traversal import inorder # type: ignore if __n...
[ 37811, 198, 15056, 257, 311, 4420, 7502, 276, 7343, 543, 468, 1366, 1866, 23243, 287, 41988, 1502, 13, 198, 42316, 257, 38984, 45755, 11140, 12200, 543, 468, 976, 1366, 1866, 355, 262, 1813, 7502, 276, 7343, 13, 198, 37811, 198, 6738, ...
2.592593
297
import numpy as np import matplotlib.pyplot as plt from modules.conversions import enu2uvw data = np.load("uv-array.npy") e = data[0,:].transpose() n = data[1,:].transpose() uvarray = [] for i in range(120): u,v = enu2uvw( wavelength=1.690, hour_angle=i/30, declination=...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 13103, 13, 1102, 47178, 1330, 551, 84, 17, 14795, 86, 198, 198, 7890, 796, 45941, 13, 2220, 7203, 14795, 12, 18747, 13, 77, 9078, ...
1.7375
320
# Author: Bishal Sarang import json import os import pickle import time import bs4 import colorama import requests from colorama import Back, Fore from ebooklib import epub from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By fro...
[ 2, 6434, 25, 347, 680, 282, 6866, 648, 201, 198, 11748, 33918, 201, 198, 11748, 28686, 201, 198, 11748, 2298, 293, 201, 198, 11748, 640, 201, 198, 201, 198, 11748, 275, 82, 19, 201, 198, 11748, 3124, 1689, 201, 198, 11748, 7007, 201...
3.011561
346
# Adapted from Magenta console commands import os from magenta.models.arbitrary_image_stylization import arbitrary_image_stylization_build_model as build_model from magenta.models.image_stylization import image_utils import numpy as np import tensorflow.compat.v1 as tf import tf_slim as slim magenta_model = Magenta...
[ 2, 30019, 276, 422, 2944, 29188, 8624, 9729, 198, 198, 11748, 28686, 198, 6738, 2153, 29188, 13, 27530, 13, 283, 2545, 11619, 62, 9060, 62, 301, 2645, 1634, 1330, 14977, 62, 9060, 62, 301, 2645, 1634, 62, 11249, 62, 19849, 355, 1382, ...
2.454545
308
import re from pathlib import PurePosixPath from typing import TYPE_CHECKING, Optional, Type from lisa.executable import Tool from lisa.tools.ls import Ls from lisa.tools.mkdir import Mkdir from lisa.tools.powershell import PowerShell from lisa.tools.rm import Rm from lisa.util import LisaException, is_valid_url if T...
[ 11748, 302, 198, 6738, 3108, 8019, 1330, 17129, 21604, 844, 15235, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 11, 32233, 11, 5994, 198, 198, 6738, 300, 9160, 13, 18558, 18187, 1330, 16984, 198, 6738, 300, 9160, 13, 31391, 13, 7278,...
3.220339
118
# Load other business attributes and set meta prefix from pandas.io.json import json_normalize flat_cafes = json_normalize(data["businesses"], sep="_", record_path="categories", meta=['name', 'alias', ...
[ 2, 8778, 584, 1597, 12608, 290, 900, 13634, 21231, 198, 6738, 19798, 292, 13, 952, 13, 17752, 1330, 33918, 62, 11265, 1096, 628, 198, 38568, 62, 66, 1878, 274, 796, 33918, 62, 11265, 1096, 7, 7890, 14692, 22680, 274, 33116, 198, 220, ...
1.751961
1,020
import sys infn = sys.argv[1] outfn = infn.split(".py")[0]+"_INST.py" code = [] for l in open(infn): code.append(l) outf = open(outfn, 'w') outf.write("import covertool\n") ln = 0 inComment = False justEnded = False currentIndent = 0 lineIndent = 0 okChangeIndent = False skipNext = False doNotInstrument = ["cl...
[ 11748, 25064, 198, 198, 10745, 77, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 448, 22184, 796, 1167, 77, 13, 35312, 7, 1911, 9078, 4943, 58, 15, 48688, 1, 62, 38604, 13, 9078, 1, 198, 198, 8189, 796, 17635, 198, 198, 1640, 300, 2...
2.010444
1,149
import json import os import sys import time try: from urlparse import urlparse except ImportError: # python3 from urllib.parse import urlparse from django.conf.urls import url from django.conf.urls.static import static from django.http import HttpResponse, Http404 from django.shortcuts import render_to_re...
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 28311, 25, 198, 220, 220, 220, 422, 19016, 29572, 1330, 19016, 29572, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 1303, 21015, 18, 198, 220, 220, 220, 422, ...
2.386322
1,623
import cocotb from cocotb.clock import Clock from cocotb.triggers import ClockCycles, RisingEdge, FallingEdge, NextTimeStep, ReadWrite N = 16 test_input = list(range(N)) # FIXME add more unit tests here
[ 11748, 8954, 313, 65, 198, 6738, 8954, 313, 65, 13, 15750, 1330, 21328, 198, 6738, 8954, 313, 65, 13, 2213, 328, 5355, 1330, 21328, 20418, 5427, 11, 17658, 37021, 11, 42914, 37021, 11, 7406, 7575, 8600, 11, 4149, 16594, 198, 198, 45, ...
2.957746
71
from django.shortcuts import render, redirect from notes.app.forms import ProfileForm, NoteForm, NoteDeleteForm from notes.app.models import Profile, Note
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 198, 6738, 4710, 13, 1324, 13, 23914, 1330, 13118, 8479, 11, 5740, 8479, 11, 5740, 38727, 8479, 198, 6738, 4710, 13, 1324, 13, 27530, 1330, 13118, 11, 5740, 628, 628, 6...
3.790698
43
# -*- coding: utf-8 -*- """ Created on Tue Jul 2 00:56:18 2019 @author: tang """ seed=102 vocab="vocab.bin" train_file="train.bin" dropout=0.3 hidden_size=256 embed_size=100 action_embed_size=100 field_embed_size=32 type_embed_size=32 lr_decay=0.5 beam_size=5 patience=2 lstm='lstm' col_att='affine' model_name='wiki' ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 5979, 220, 362, 3571, 25, 3980, 25, 1507, 13130, 198, 198, 31, 9800, 25, 13875, 198, 37811, 198, 28826, 28, 15377, 198, 18893, 397, 2625, ...
2.140988
688
import unittest from django.test import Client
[ 11748, 555, 715, 395, 198, 6738, 42625, 14208, 13, 9288, 1330, 20985, 628, 628 ]
3.571429
14
import unittest from unittest.mock import patch from jc_decrypter.main import process, main
[ 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 6738, 474, 66, 62, 12501, 563, 42104, 13, 12417, 1330, 1429, 11, 1388, 628, 198 ]
3.064516
31
import mock
[ 11748, 15290, 628 ]
4.333333
3
import datetime from template_maker.database import db from template_maker.generator.models import DocumentBase, DocumentPlaceholder from template_maker.builder.models import TemplateBase, TemplatePlaceholders from template_maker.data.placeholders import get_template_placeholders def get_all_documents(): ''' R...
[ 11748, 4818, 8079, 198, 6738, 11055, 62, 10297, 13, 48806, 1330, 20613, 198, 6738, 11055, 62, 10297, 13, 8612, 1352, 13, 27530, 1330, 16854, 14881, 11, 16854, 27271, 13829, 198, 6738, 11055, 62, 10297, 13, 38272, 13, 27530, 1330, 37350, ...
3.267742
310
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base from .config import settings SQLALCHEMY_DATABASE_URL = 'postgresql://{user}:{password}@{host}:{port}/{db}'.format( user=settings.DB_USER, password=settings.DB_PASSWORD, hos...
[ 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 6246, 10297, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 32446, 283, 876, 1330, 2377, 283, 876, 62, 8692, 198, 198, 6738, 764, 11250, 1330, 6...
2.257202
486
import scrapy from scrapy.selector import Selector from katph.items import StackItem
[ 11748, 15881, 88, 198, 6738, 15881, 88, 13, 19738, 273, 1330, 9683, 273, 198, 6738, 479, 265, 746, 13, 23814, 1330, 23881, 7449, 628 ]
3.583333
24
# Generated by Django 4.0.1 on 2022-02-07 17:53 import django.core.validators from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 604, 13, 15, 13, 16, 319, 33160, 12, 2999, 12, 2998, 1596, 25, 4310, 198, 198, 11748, 42625, 14208, 13, 7295, 13, 12102, 2024, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.95122
41
import numpy as np from walkers import ScalableWalker DEFAULT_SCENE = "scenes/walker.ttt" DEFAULT_WALKER = ScalableWalker N_MRPH_PARAMS = [3, 3, 6] N_CTRL_PARAMS = [4, 8, 8] MORPHOLOGY_BOUNDS = [ [[0.7] * 3, [1.4] * 3], [[0.7] * 3, [1.4] * 3], [[0.7] * 6, [1.4] * 6] ] CONTROLLER_BOUNDS = [ [[1, -np...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 2513, 364, 1330, 34529, 540, 39950, 198, 198, 7206, 38865, 62, 6173, 39267, 796, 366, 28123, 14, 20783, 13, 926, 83, 1, 198, 7206, 38865, 62, 54, 28082, 1137, 796, 34529, 540, 39950, 198,...
1.721649
291
from solid import * from solid.utils import * import util from util import inch_to_mm, tube, ABIT, corners, pipe from fixings import M3 from math import tan, radians """ Sub-miniature analog joy-sticks. There's not much useful in documentation of their measurements. I'm going to treat it like a sphere with a 14mm ...
[ 198, 198, 6738, 4735, 1330, 1635, 198, 6738, 4735, 13, 26791, 1330, 1635, 198, 11748, 7736, 198, 6738, 7736, 1330, 11111, 62, 1462, 62, 3020, 11, 12403, 11, 9564, 2043, 11, 14371, 11, 12656, 198, 198, 6738, 4259, 654, 1330, 337, 18, ...
3.181373
204
from typing import List from collections import deque def copyCoords(self): return Line(self.start_x, self.start_y, self.end_x, self.end_y, dots=[]) def shift(self, dx=0, dy=0): self.start_x += dx self.start_y += dy self.end_x += dx self.end_y += dy for i in ra...
[ 6738, 19720, 1330, 7343, 198, 6738, 17268, 1330, 390, 4188, 628, 198, 220, 220, 220, 825, 4866, 7222, 3669, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 6910, 7, 944, 13, 9688, 62, 87, 11, 2116, 13, 9688, 62, 88, ...
2.118519
270
from hw_asr.model.baseline_model import BaselineModel, BasicLSTM, BasicGRU from hw_asr.model.QuartzNet import QuartzNet __all__ = [ "BaselineModel", "BasicLSTM", "BasicGRU", "QuartzNet" ]
[ 6738, 289, 86, 62, 292, 81, 13, 19849, 13, 12093, 4470, 62, 19849, 1330, 6455, 4470, 17633, 11, 14392, 43, 2257, 44, 11, 14392, 10761, 52, 198, 6738, 289, 86, 62, 292, 81, 13, 19849, 13, 4507, 13636, 7934, 1330, 45976, 7934, 198, ...
2.303371
89
'''********************************************** CODE TO IMPLEMENT FISHER'S LDA - Given two dimensional dataset with two classes 0 and 1, Perform Fisher's LDA on the dataset, Perform dimensionality reduction and find the suitable vector to project it onto, Find the threshold value for separation of the two classes **...
[ 7061, 6, 17174, 46068, 1174, 198, 34, 16820, 5390, 30023, 2538, 10979, 376, 1797, 16879, 6, 50, 406, 5631, 532, 198, 15056, 734, 38517, 27039, 351, 734, 6097, 657, 290, 352, 11, 198, 5990, 687, 14388, 338, 406, 5631, 319, 262, 27039, ...
2.586387
1,528
import matplotlib.pyplot as plt import torch n_input = 1 # n_hidden should be very big to make dropout's effect more clear n_hidden = 100 n_output = 1 EPOCH = 1000 LR = 0.01 torch.manual_seed(1) # reproducible N_SAMPLES = 20 # training data x = torch.unsqueeze(torch.linspace(-1, 1, N_SAMPLES), 1) y = x + 0.3 * torc...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 28034, 198, 198, 77, 62, 15414, 796, 352, 198, 2, 299, 62, 30342, 815, 307, 845, 1263, 284, 787, 4268, 448, 338, 1245, 517, 1598, 198, 77, 62, 30342, 796, 1802, ...
2.121781
1,437
""" Twiss module. Compute twiss parameters from amplitude & phase data. Twiss filtering & processing. """ import numpy import torch import pandas from scipy import odr from .util import mod, generate_pairs, generate_other from .statistics import weighted_mean, weighted_variance from .statistics import median, biwei...
[ 37811, 198, 5080, 747, 8265, 13, 198, 7293, 1133, 665, 747, 10007, 422, 37188, 1222, 7108, 1366, 13, 198, 5080, 747, 25431, 1222, 7587, 13, 198, 198, 37811, 198, 198, 11748, 299, 32152, 198, 11748, 28034, 198, 11748, 19798, 292, 198, ...
2.029146
18,836