content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import os import random import time import numpy as np from memory_profiler import memory_usage from mpi4py import MPI from mpi4py.futures import MPICommExecutor import traceback from csv_modules.csv_writer import write_in_file from experiment.utils_general import remove_get_dirs from general_utils.pdb_utils import g...
[ 11748, 28686, 198, 11748, 4738, 198, 11748, 640, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 4088, 62, 5577, 5329, 1330, 4088, 62, 26060, 198, 6738, 285, 14415, 19, 9078, 1330, 4904, 40, 198, 6738, 285, 14415, 19, 9078, 13, 69...
2.978903
237
import numpy as np MAX_VOCAB_SIZE = 60702 import pickle dist_mat_list = np.load('aux_files/sdist_mat_dic_%d.npy' % (MAX_VOCAB_SIZE)) dist_mat_order = np.load('aux_files/sdist_order_%d.npy' % (MAX_VOCAB_SIZE)) with open('aux_files/dataset_%d.pkl' %MAX_VOCAB_SIZE, 'rb') as f: dataset = pickle.load(f) # print(np.shap...
[ 11748, 299, 32152, 355, 45941, 198, 22921, 62, 53, 4503, 6242, 62, 33489, 796, 3126, 36680, 198, 11748, 2298, 293, 198, 17080, 62, 6759, 62, 4868, 796, 45941, 13, 2220, 10786, 14644, 62, 16624, 14, 82, 17080, 62, 6759, 62, 67, 291, ...
2.1242
781
#!/usr/bin/env python3 import sys import argparse import numpy as np from generate_traffic import * from HomaPkt import * if __name__=="__main__": load = 0.70 numOfSpines = 4 numOfSubtrees = 2 numOfToRsPerSubtree = 2 numOfServersPerRack = 4 evaluatedPrefix = "1.0." linkSpeed = 100e6 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 7716, 62, 9535, 2108, 1330, 1635, 198, 6738, 367, 6086, 47, 21841, 1330, 1635, 628, ...
2.13217
1,203
import random from config import * import time import os from utils import datacheck import threading id_now = 0 available_level = [-3, -2, -1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] # if __name__ == "__main__": # id_now = 0 # gen_path = os.path.join("test_data", "aut...
[ 11748, 4738, 198, 6738, 4566, 1330, 1635, 198, 11748, 640, 198, 11748, 28686, 198, 6738, 3384, 4487, 1330, 4818, 4891, 694, 198, 11748, 4704, 278, 198, 198, 312, 62, 2197, 796, 657, 198, 15182, 62, 5715, 796, 25915, 18, 11, 532, 17, ...
2.077399
323
#!/usr/bin/env python import re import subprocess import platform import os import sys get_ios.guid = {} get_mac.guid = None
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 302, 198, 11748, 850, 14681, 198, 11748, 3859, 198, 11748, 28686, 198, 11748, 25064, 628, 198, 1136, 62, 4267, 13, 5162, 312, 796, 23884, 198, 198, 1136, 62, 20285, 13, 5162, 31...
2.886364
44
from __future__ import absolute_import from chainer.functions import accuracy import chainer import numpy as np from chainer.links import CLink from chainer.links.eBNN.link_binary_linear import BinaryLinear from chainer.links.eBNN.link_softmax_cross_entropy import SoftmaxCrossEntropy from chainer.utils import binary_...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 6333, 263, 13, 12543, 2733, 1330, 9922, 198, 11748, 6333, 263, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 6333, 263, 13, 28751, 1330, 7852, 676, 198, 6738, 6333, ...
3.43
100
from django.contrib.admin.widgets import FilteredSelectMultiple
[ 6738, 42625, 14208, 13, 3642, 822, 13, 28482, 13, 28029, 11407, 1330, 7066, 4400, 17563, 31217, 628 ]
3.823529
17
import boto3 import functools import logging import os from crhelper import CfnResource helper = CfnResource(json_logging=False, log_level='DEBUG', boto_level='CRITICAL') s3 = boto3.resource("s3") client = boto3.client("s3") logger = logging.getLogger() logger.setLevel(os.getenv("LogLevel", lo...
[ 11748, 275, 2069, 18, 198, 11748, 1257, 310, 10141, 198, 11748, 18931, 198, 11748, 28686, 198, 198, 6738, 1067, 2978, 525, 1330, 327, 22184, 26198, 628, 198, 2978, 525, 796, 327, 22184, 26198, 7, 17752, 62, 6404, 2667, 28, 25101, 11, ...
2.632287
223
#!/usr/bin/env python3 import basic_plot_functions as bpf import binning_utils as bu import predefined_configs as pconf from collections.abc import Iterable from collections import defaultdict from copy import deepcopy import collections import datetime as dt import diag_utils as du import inspect import logging impor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 4096, 62, 29487, 62, 12543, 2733, 355, 275, 79, 69, 198, 11748, 9874, 768, 62, 26791, 355, 809, 198, 11748, 2747, 18156, 62, 11250, 82, 355, 279, 10414, 198, 6738, 17...
2.750207
3,631
""" Test if we can have a list of "allowable levels" and if a user requests the display of a level not in that list we CANCEL the zoom operation. Usage: test_displayable_levels.py [-d] [-h] [-t (OSM|GMT)] """ import sys import wx import pyslip # initialize the logging system import pyslip.log as log try: log = ...
[ 37811, 198, 14402, 611, 356, 460, 423, 257, 1351, 286, 366, 12154, 540, 2974, 1, 290, 611, 257, 2836, 7007, 198, 1169, 3359, 286, 257, 1241, 407, 287, 326, 1351, 356, 15628, 34, 3698, 262, 19792, 4905, 13, 198, 198, 28350, 25, 1332,...
2.739437
710
""" Ex 20 - the same teacher from the previous challenge wants to raffle off the order of students' school assignments. Make a program that reads the names of the four students and shows the order of the names drawn """ from random import shuffle Est_1 = str(input('Type the first student: ')) Est_2 = str(input('Type ...
[ 37811, 198, 3109, 1160, 532, 262, 976, 4701, 422, 262, 2180, 4427, 3382, 284, 374, 30697, 572, 262, 1502, 286, 2444, 6, 1524, 25815, 13, 6889, 257, 1430, 326, 9743, 262, 3891, 286, 262, 1440, 2444, 290, 2523, 262, 1502, 286, 262, 38...
3.25
168
""" Rick Towler Midwater Assessment and Conservation Engineering NOAA Alaska Fisheries Science Center rick.towler@noaa.gov """ from PyQt4.QtCore import * from PyQt4.QtGui import * from QIVPolygonItem import QIVPolygonItem from QIVMarkerText import QIVMarkerText class QIVPolygon(QGraphicsItemGroup): """ QIVPol...
[ 37811, 198, 33048, 24324, 1754, 198, 22622, 7050, 25809, 290, 23702, 14044, 198, 15285, 3838, 12926, 49179, 5800, 3337, 198, 5557, 13, 83, 30014, 31, 3919, 7252, 13, 9567, 198, 37811, 198, 198, 6738, 9485, 48, 83, 19, 13, 48, 83, 1405...
2.108154
5,261
from abc import ABC, abstractmethod import enum import numpy as np from logging import Logger
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 11748, 33829, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 18931, 1330, 5972, 1362, 628, 198 ]
3.84
25
import os from telapy.api.t2d import Telemac2d from telapy.api.t3d import Telemac3d from telapy.api.wac import Tomawac from telapy.api.sis import Sisyphe from mpi4py import MPI import numpy as np from .apitelemacaws import ApiTelemacAWS modules = { "telemac2d":Telemac2d, "telemac3d":Telemac3d, "tomawac":Tomawac...
[ 11748, 28686, 198, 6738, 13632, 12826, 13, 15042, 13, 83, 17, 67, 1330, 1665, 10671, 330, 17, 67, 198, 6738, 13632, 12826, 13, 15042, 13, 83, 18, 67, 1330, 1665, 10671, 330, 18, 67, 198, 6738, 13632, 12826, 13, 15042, 13, 86, 330, ...
2.13617
235
""" Analytical expressions of information theoretical quantities. """ from scipy.linalg import det, inv from numpy import log, prod, absolute, exp, pi, trace, dot, cumsum, \ hstack, ix_, sqrt, eye, diag, array, sum from ite.shared import compute_h2 def analytical_value_h_shannon(...
[ 37811, 16213, 22869, 14700, 286, 1321, 16200, 17794, 13, 37227, 198, 198, 6738, 629, 541, 88, 13, 75, 1292, 70, 1330, 1062, 11, 800, 198, 6738, 299, 32152, 1330, 2604, 11, 40426, 11, 4112, 11, 1033, 11, 31028, 11, 12854, 11, 16605, ...
2.045043
16,140
from IEX_29id.utils.strings import ClearCalcOut from time import sleep from epics import caget, caput from IEX_29id.scans.setup import Scan_FillIn, Scan_Go from IEX_29id.devices.detectors import cts def AD_ROI_SetUp(AD,ROInum,xcenter=500,ycenter=500,xsize=50,ysize=50,binX=1,binY=1): """ AD = "29id_ps4"...
[ 6738, 314, 6369, 62, 1959, 312, 13, 26791, 13, 37336, 1330, 11459, 9771, 66, 7975, 198, 6738, 640, 1330, 3993, 198, 6738, 2462, 873, 1330, 269, 363, 316, 11, 1451, 315, 198, 6738, 314, 6369, 62, 1959, 312, 13, 1416, 504, 13, 40406, ...
1.919036
1,618
# interpcl: interpolate angular power spectra # # author: Nicolas Tessore <n.tessore@ucl.ac.uk> # license: MIT ''' Interpolate angular power spectra (:mod:`interpcl`) =================================================== .. currentmodule:: interpcl A very small package that does interpolation of angular power spectra ...
[ 2, 987, 79, 565, 25, 39555, 378, 32558, 1176, 5444, 430, 198, 2, 198, 2, 1772, 25, 29737, 39412, 382, 1279, 77, 13, 83, 408, 382, 31, 36616, 13, 330, 13, 2724, 29, 198, 2, 5964, 25, 17168, 198, 7061, 6, 198, 198, 9492, 16104, ...
2.760101
792
# DO NOT MODIFY THIS FILE # Run me via: python3 -m unittest test_naive_priority_queue import unittest import time from naive_priority_queue import NaivePriorityQueue from job import Job class TestNaivePriorityQueue(unittest.TestCase): """ Initialization """ def test_instantiation(self): """ ...
[ 2, 8410, 5626, 19164, 5064, 56, 12680, 45811, 198, 2, 5660, 502, 2884, 25, 21015, 18, 532, 76, 555, 715, 395, 1332, 62, 2616, 425, 62, 49336, 62, 36560, 198, 198, 11748, 555, 715, 395, 198, 11748, 640, 198, 6738, 24354, 62, 49336, ...
2.153752
4,091
import sys import os import time import json import math from datetime import datetime import subprocess import threading import numpy as np from os.path import join, dirname, basename, abspath from std_msgs.msg import ( Header ) from sensor_msgs.msg import ( PointCloud2, PointField, NavSatStatus, ...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 33918, 198, 11748, 10688, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 850, 14681, 198, 11748, 4704, 278, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 28686, 13, 6978...
2.701275
549
#!/usr/bin/env python from KPIForecaster.forecaster import KPIForecaster from configuration.settings import Conf from database.sql_connect import SQLDatabase from datetime import datetime import pandas as pd import sys import os.path import time path = sys.argv[0].rsplit("/", 1)[0] # Create configuration and Database...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 45814, 5064, 382, 17970, 13, 754, 17970, 1330, 45814, 5064, 382, 17970, 198, 6738, 8398, 13, 33692, 1330, 7326, 198, 6738, 6831, 13, 25410, 62, 8443, 1330, 16363, 38105, 198, 6738,...
2.133813
2,780
from __future__ import division # python libs import sys # 3rd party importerrors = [] try: import statsmodels.nonparametric.kde as kde except ImportError as ie: importerrors.append(ie) try: import matplotlib as mpl except ImportError as ie: importerrors.append(ie) if len(importerrors) != 0: for it...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 2, 21015, 9195, 82, 198, 11748, 25064, 198, 2, 513, 4372, 2151, 198, 320, 26634, 5965, 796, 17635, 198, 28311, 25, 198, 220, 220, 220, 1330, 9756, 27530, 13, 13159, 17143, 19482, 13, 74, 2934,...
2.399523
1,259
from setuptools import setup, find_packages __version__ = '0.2.4' setup(name='python-seafile-api', version=__version__, license='BSD', description='Client interface for Seafile Web API', author='Igor Rumyantsev', author_email='igorrum@mail.ru', url='https://github.com/Widly/python...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 834, 9641, 834, 796, 705, 15, 13, 17, 13, 19, 6, 628, 198, 40406, 7, 3672, 11639, 29412, 12, 325, 1878, 576, 12, 15042, 3256, 198, 220, 220, 220, 220, 220, 2196, ...
2.341637
281
# -*- coding:utf-8 -*- # Author: Kei Choi(hanul93@gmail.com) import bz2 import kernel # ------------------------------------------------------------------------- # KavMain 클래스 # ------------------------------------------------------------------------- # ----------------------------------------------------------...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 6434, 25, 3873, 72, 42198, 7, 7637, 377, 6052, 31, 14816, 13, 785, 8, 628, 198, 11748, 275, 89, 17, 198, 11748, 9720, 628, 198, 2, 16529, 45537, 198, 2, 509, 615, ...
1.904897
1,409
"""The machinery of importlib: finders, loaders, hooks, etc.""" import _imp from ._bootstrap import (SOURCE_SUFFIXES, DEBUG_BYTECODE_SUFFIXES, OPTIMIZED_BYTECODE_SUFFIXES, BYTECODE_SUFFIXES) from ._bootstrap import BuiltinImporter from ._bootstrap import FrozenImporter from ._bootstrap import...
[ 37811, 464, 20230, 286, 1330, 8019, 25, 1064, 364, 11, 3440, 364, 11, 26569, 11, 3503, 526, 15931, 198, 198, 11748, 4808, 11011, 198, 198, 6738, 47540, 18769, 26418, 1330, 357, 47690, 62, 12564, 5777, 10426, 1546, 11, 16959, 62, 17513, ...
2.914439
187
# coding=utf-8 import os import cv2 import sys import json import numpy as np import shutil print('开始转换,并清除无效标注...') conver('train') print('训练集转换完毕') conver('val') print('验证集转换完毕')
[ 2, 19617, 28, 40477, 12, 23, 198, 11748, 28686, 198, 11748, 269, 85, 17, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4423, 346, 628, 198, 198, 4798, 10786, 28156, 222, 34650, 233, 164, 121, 10...
1.528926
121
#!/usr/bin/env python # -*- coding: utf-8 -*- """FINet: Fraction Detection Normalization Network for Image Restoration. """ from __future__ import annotations from typing import Optional import torch from torch import nn from torch import Tensor from onevision.factory import DEBLUR from onevision.factory import DE...
[ 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, 20032, 316, 25, 376, 7861, 46254, 14435, 1634, 7311, 329, 7412, 36155, 13, 198, 37811, 198, 198, 6738, 1159...
2.341634
1,285
from django.db import models from django.contrib.auth.models import User class UserDocumentInteraction(models.Model): """Tracks an instance of a document being downloaded""" user = models.ForeignKey(User, on_delete=models.CASCADE) design_document = models.ForeignKey('core.DesignDocument', on_delete=models....
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 198, 4871, 11787, 24941, 9492, 2673, 7, 27530, 13, 17633, 2599, 198, 220, 220, 220, 37227, 2898, 4595, 281, 4554, ...
3.31068
103
################################################################################ # # sage_interface.py # # description: interface between Boole and Sage # # Converts Boole expressions to Sage symbolic expressions and back. # # In the forward direction, the user specifies the symbolic ring, by # default the_SymbolicRing...
[ 29113, 29113, 14468, 198, 2, 198, 2, 35021, 62, 39994, 13, 9078, 198, 2, 198, 2, 6764, 25, 7071, 1022, 21458, 293, 290, 28733, 198, 2, 198, 2, 1482, 24040, 21458, 293, 14700, 284, 28733, 18975, 14700, 290, 736, 13, 198, 2, 198, 2,...
2.995319
1,709
#Create a script that lets the user submit a password until they have satisfied three conditions: #1. Password contains at least one number #2. Contains one uppercase letter #3. It is at least 5 chars long #Print out message "Passowrd is not fine" if the user didn't create a correct password while True: psw...
[ 2, 16447, 257, 4226, 326, 8781, 262, 2836, 9199, 257, 9206, 1566, 484, 423, 11378, 1115, 3403, 25, 201, 198, 2, 16, 13, 30275, 4909, 379, 1551, 530, 1271, 201, 198, 2, 17, 13, 49850, 530, 334, 39921, 589, 3850, 201, 198, 2, 18, ...
2.823834
193
import argparse import sys import cv2 from albumentations import Compose, SmallestMaxSize, CenterCrop from pietoolbelt.viz import ColormapVisualizer from segmentation import Segmentation if __name__ == '__main__': parser = argparse.ArgumentParser(description='Segmentation example') parser.add_argument('-i', ...
[ 11748, 1822, 29572, 198, 11748, 25064, 198, 198, 11748, 269, 85, 17, 198, 6738, 435, 65, 1713, 602, 1330, 3082, 577, 11, 10452, 395, 11518, 10699, 11, 3337, 34, 1773, 198, 6738, 279, 1155, 970, 37976, 13, 85, 528, 1330, 1623, 579, 4...
2.307947
906
import unittest import javalang from coastSHARK.util.complexity_java import ComplexityJava, SourcemeterConversion BINOP_TEST = """package de.ugoe.cs.coast; public class BinopTest { public void test1() { Boolean a = true; Boolean b = true; Boolean c = true; Boolean d = true; ...
[ 11748, 555, 715, 395, 198, 11748, 474, 9226, 648, 198, 198, 6738, 7051, 9693, 14175, 13, 22602, 13, 41887, 414, 62, 12355, 1330, 19157, 414, 29584, 11, 8090, 27231, 3103, 9641, 628, 198, 33, 1268, 3185, 62, 51, 6465, 796, 37227, 26495...
1.913484
7,987
from Pessoa import Pessoa
[ 6738, 350, 408, 12162, 1330, 350, 408, 12162 ]
3.125
8
from .boost import * from .logger import * from .utils import *
[ 6738, 764, 39521, 1330, 1635, 198, 6738, 764, 6404, 1362, 1330, 1635, 198, 6738, 764, 26791, 1330, 1635, 198 ]
3.368421
19
from django.db import models from datetime import datetime, timedelta # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 2, 13610, 534, 4981, 994, 13 ]
4
24
import random import matplotlib.pyplot as plt trial = 20 # 模拟实验次数 amp = 2.0 # 上下振幅(对称乘除) cash = 1.0 # 初始现金 days = 200 # 每次模拟实验观察天数 print("\n多次实验,每次实验的最终股价与总资产的对比:\n") for i in range(trial): money = value = cash / 2 # 一半买为股票,一半保留现金 price ...
[ 11748, 4738, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 45994, 796, 1160, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10545, 101, 94, 162, 233, 253, 22522, ...
1.20069
1,450
''' This module will handle the text generation with beam search. ''' import torch import torch.nn as nn import torch.nn.functional as F from transformer.Beam import Beam from transformer.Models import Transformer class Translator(object): ''' Load with trained model and handle the beam search ''' ...
[ 7061, 6, 770, 8265, 481, 5412, 262, 2420, 5270, 351, 15584, 2989, 13, 705, 7061, 201, 198, 201, 198, 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 201, 198, 67...
2.04328
1,756
from classes.data_splitters.DataSplitter import DataSplitter from classes.handlers.ParamsHandler import ParamsHandler import numpy as np import pandas as pd import os import random import copy
[ 6738, 6097, 13, 7890, 62, 35312, 1010, 13, 6601, 26568, 1967, 1330, 6060, 26568, 1967, 198, 6738, 6097, 13, 4993, 8116, 13, 10044, 4105, 25060, 1330, 2547, 4105, 25060, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 35...
3.679245
53
import os # https://stackoverflow.com/questions/10492869/how-to-perform-leet-with-python from utilitybelt import change_charset origspace = "abcdefghijklmnopqrstuvwxyz" keyspace = "abcd3fgh1jklmnopqr57uvwxyz" # print(change_charset("leetspeak",origspace, keyspace)) reverse_file='invertido.txt' with open(reverse_f...
[ 11748, 28686, 198, 198, 2, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 940, 2920, 2078, 3388, 14, 4919, 12, 1462, 12, 525, 687, 12, 293, 316, 12, 4480, 12, 29412, 198, 6738, 10361, 37976, 1330, 1487, 62, 354, 945, ...
2.463277
177
from __future__ import annotations from spark_auto_mapper_fhir.fhir_types.uri import FhirUri from spark_auto_mapper_fhir.value_sets.generic_type import GenericTypeCode from spark_auto_mapper.type_definitions.defined_types import AutoMapperTextInputType # This file is auto-generated by generate_classes so do not edi...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 9009, 62, 23736, 62, 76, 11463, 62, 69, 71, 343, 13, 69, 71, 343, 62, 19199, 13, 9900, 1330, 376, 71, 343, 52, 380, 198, 198, 6738, 9009, 62, 23736, 62, 76, 11463, 62, 69, 71...
2.871363
653
# -*- coding: utf-8 -*- # @Author: yancz1989 # @Date: 2016-06-20 11:00:29 # @Last Modified by: yancz1989 # @Last Modified time: 2016-06-20 11:00:31 import numpy as np import tunas.core.arch.theano_mod.ops as ops reload(ops) from tunas.core.arch.theano_mod.ops import * np.random.seed(2012310818) x = theano.shared...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 13838, 25, 331, 1192, 89, 25475, 198, 2, 2488, 10430, 25, 220, 220, 1584, 12, 3312, 12, 1238, 1367, 25, 405, 25, 1959, 198, 2, 2488, 5956, 40499, 416, 25, ...
2.325862
580
from tool.runners.python import SubmissionPy
[ 6738, 2891, 13, 36740, 13, 29412, 1330, 42641, 20519, 628 ]
4.6
10
# Generated by Django 2.1.7 on 2019-03-21 01:26 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 22, 319, 13130, 12, 3070, 12, 2481, 5534, 25, 2075, 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
import argparse import logging import sys import pandas as pd import sklearn from model_nb_tree_classifier import ModelNBTreeClassifier if __name__ == "__main__": run_main()
[ 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 25064, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 1341, 35720, 198, 198, 6738, 2746, 62, 46803, 62, 21048, 62, 4871, 7483, 1330, 9104, 45, 19313, 631, 9487, 7483, 628, 628, ...
3
62
import unittest import numpy import chainer from chainer import functions from chainer import testing from chainer.testing import attr import chainerx if chainerx.is_available(): import chainerx.testing @testing.parameterize(*testing.product_dict( [ {'shape': (3, 4)}, {'shape': ()}, ],...
[ 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 198, 198, 11748, 6333, 263, 198, 6738, 6333, 263, 1330, 5499, 198, 6738, 6333, 263, 1330, 4856, 198, 6738, 6333, 263, 13, 33407, 1330, 708, 81, 198, 11748, 6333, 263, 87, 628, 198, ...
1.9573
726
""" Copyright 2021 Cesar Miranda Meza (alias: Mortrack) 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...
[ 198, 37811, 198, 220, 220, 15069, 33448, 327, 18964, 29575, 2185, 4496, 357, 26011, 25, 10788, 39638, 8, 628, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 220, 220, 345, 743, 407,...
2.132538
66,796
import logging from datetime import timedelta from django.core.management.base import BaseCommand from django.utils import timezone from geotrek.feedback.models import Report logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 198, 6738, 4903, 313, 37818, 13, 12363, ...
3.540984
61
import logging import time from haipproxy.utils import get_redis_conn logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 11748, 640, 198, 198, 6738, 387, 3974, 42059, 13, 26791, 1330, 651, 62, 445, 271, 62, 37043, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628 ]
3.055556
36
from src.interpreter.function_deco import setupFunctions from src.interpreter.run import runCode # stolen from https://stackoverflow.com/questions/287871/how-do-i-print-colored-text-to-the-terminal # muhahahahahahaha 😈 if __name__ == "__main__": setupFunctions() print(Colours.WARNING + "Starting test.....
[ 6738, 12351, 13, 3849, 3866, 353, 13, 8818, 62, 12501, 78, 1330, 9058, 24629, 2733, 198, 198, 6738, 12351, 13, 3849, 3866, 353, 13, 5143, 1330, 1057, 10669, 628, 198, 2, 9909, 422, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, ...
2.55298
302
import asyncio from typing import Callable, Any import json import logging import requests import numpy as np log = logging.getLogger('pool')
[ 11748, 30351, 952, 198, 6738, 19720, 1330, 4889, 540, 11, 4377, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 7007, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 10786, 7742, 11537 ]
3.736842
38
#!/usr/bin/env python3 import argparse import csv import glob import subprocess import sys import time import re parser = argparse.ArgumentParser() parser.add_argument("--debug", action="store_true") parser.add_argument("--dry-run", action="store_true") parser.add_argument("output", type=argparse.FileType('w')) args ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 269, 21370, 198, 11748, 15095, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 302, 198, 198, 48610, 796, 1822, 29572, 13...
2.493333
300
import json import math import os from typing import List import cv2 from detectron2.structures import BoxMode from detectron2.utils.visualizer import Visualizer from detectron2.data import DatasetCatalog, MetadataCatalog OBJECT_CATEGORIES = { "Vehicle": 0, "Cyclist": 1, "Pedestrian": 2, } DATASET_TRAIN...
[ 11748, 33918, 198, 11748, 10688, 198, 11748, 28686, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, 269, 85, 17, 198, 198, 6738, 4886, 1313, 17, 13, 7249, 942, 1330, 8315, 19076, 198, 6738, 4886, 1313, 17, 13, 26791, 13, 41464, 7509, 1...
2.253555
422
import sys from copy import deepcopy from swift.codegen.lib import ql from swift.codegen.test.utils import * @pytest.mark.parametrize("params,expected_local_var", [ (["a", "b", "c"], "x"), (["a", "x", "c"], "x_"), (["a", "x", "x_", "c"], "x__"), (["a", "x", "x_", "x__"], "x___"), ]) @pytest.mar...
[ 11748, 25064, 198, 6738, 4866, 1330, 2769, 30073, 198, 198, 6738, 14622, 13, 8189, 5235, 13, 8019, 1330, 10662, 75, 198, 6738, 14622, 13, 8189, 5235, 13, 9288, 13, 26791, 1330, 1635, 628, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143,...
2.243028
251
from zoneinfo import ZoneInfo from datetime import datetime, timezone from flurry.core import predicate as P from flurry.core.utils import visit_predicate from flurry.postgres.postgres import _PostgreSQLSimplifier DATETIME_A = datetime(2022, 1, 27, 13, 6, 47, 799859, tzinfo=ZoneInfo("UTC")) DATETIME_B = datetime(202...
[ 6738, 6516, 10951, 1330, 13035, 12360, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 640, 11340, 628, 198, 6738, 36418, 13, 7295, 1330, 44010, 355, 350, 198, 6738, 36418, 13, 7295, 13, 26791, 1330, 3187, 62, 28764, 5344, 198, 6738, 36418...
1.7
910
#!/usr/bin/env python # coding: utf-8 import sys from collections import Counter from rosalind import fasta ACIDS = "ACGT" if __name__ == "__main__": with open("data/rosalind_cons.txt") as f: cons, matrix = consensus(fasta(f.read()).values()) print(''.join(cons)) for x in ACIDS: ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 25064, 198, 6738, 17268, 1330, 15034, 198, 6738, 686, 21680, 521, 1330, 3049, 64, 628, 198, 2246, 14255, 796, 366, 2246, 19555, 1, 62...
2.313253
166
from kivy.uix.stacklayout import StackLayout from kivy.lang import Builder import pathlib from service.widget import Widget from datetime import datetime, timedelta Builder.load_file(str(pathlib.Path(__file__).parent.absolute()) + pathlib.os.sep + 'weather3.kv')
[ 6738, 479, 452, 88, 13, 84, 844, 13, 25558, 39786, 1330, 23881, 32517, 198, 6738, 479, 452, 88, 13, 17204, 1330, 35869, 198, 11748, 3108, 8019, 198, 6738, 2139, 13, 42655, 1330, 370, 17484, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11,...
3.154762
84
"""Classes for RoboDaniel""" import importlib import logging import re from data import commands from datetime import datetime from groupy import Bot as GroupyBot from groupy import Group from groupy import config class Bot: """RoboDaniel bot class""" def gather_commands(self): """gather !command fu...
[ 37811, 9487, 274, 329, 39702, 19962, 37811, 198, 198, 11748, 1330, 8019, 198, 11748, 18931, 198, 11748, 302, 198, 6738, 1366, 1330, 9729, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 1448, 88, 1330, 18579, 355, 4912, 88, 20630, 1...
2.151946
1,619
# -*- coding: utf-8 -*- from __future__ import print_function, absolute_import from builtins import range # pylint: disable=redefined-builtin import dash_table import collections import os import fnmatch import glob import xlsxwriter from xlsxwriter.utility import xl_rowcol_to_cell import xlrd import dash import d...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 4112, 62, 11748, 198, 6738, 3170, 1040, 1330, 2837, 220, 1303, 279, 2645, 600, 25, 15560, 28, 445, 18156, 12, 18780, ...
2.53387
4,842
import json from collections import OrderedDict from importlib import import_module from django.conf import settings from django.http import HttpResponse from django.shortcuts import render from fhir.models import SupportedResourceType from fhir.utils import kickout_400 from fhir.views.utils import check_access_inte...
[ 11748, 33918, 198, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 1330, 8019, 1330, 1330, 62, 21412, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 4...
3.440678
118
#!/usr/bin/env python # -*- coding: utf-8 -*- """ __author__ = 'Justin' __mtime__ = '2018-11-05' """ import time import os from skimage import color import numpy as np from skimage import io import cv2 import torch from core.util import read_csv_file, get_project_root, get_seeds from preparation.hsd_transform impor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 834, 9800, 834, 796, 705, 33229, 6, 198, 834, 76, 2435, 834, 796, 705, 7908, 12, 1157, 12, 2713, 6, 198...
1.90072
4,442
import time import event_model from pytest import fixture import scipy.misc from xicam.core.data.bluesky_utils import run_from_doc_stream @fixture
[ 11748, 640, 198, 198, 11748, 1785, 62, 19849, 198, 6738, 12972, 9288, 1330, 29220, 198, 11748, 629, 541, 88, 13, 44374, 198, 198, 6738, 2124, 291, 321, 13, 7295, 13, 7890, 13, 2436, 947, 2584, 62, 26791, 1330, 1057, 62, 6738, 62, 15...
2.923077
52
""" It is well known that if the square root of a natural number is not an integer, then it is irrational. The decimal expansion of such square roots is infinite without any repeating pattern at all. The square root of two is 1.41421356237309504880..., and the digital sum of the first one hundred decimal digits is 475...
[ 37811, 198, 1026, 318, 880, 1900, 326, 611, 262, 6616, 6808, 286, 257, 3288, 1271, 318, 407, 281, 18253, 11, 788, 340, 318, 25086, 13, 383, 32465, 7118, 286, 884, 6616, 11135, 318, 15541, 1231, 597, 20394, 3912, 379, 477, 13, 198, 1...
2.946237
372
# -*- coding: utf-8 -*- """ Created on Tue Jun 8 09:44:40 2021 @author: limy """ import cv2 import numpy as np import pandas as pd import os if __name__ == '__main__': if not os.path.exists('data_info.csv'): print('请将data_info.csv文件放在程序根目录!') ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 30030, 7653, 220, 807, 7769, 25, 2598, 25, 1821, 33448, 201, 198, 201, 198, 31, 9800, 25, 1761, 88, 201, 198, 37811, 201, 198, 201, ...
1.339797
3,146
import unittest from click.testing import CliRunner from openvariant.commands.openvar import openvar
[ 11748, 555, 715, 395, 198, 198, 6738, 3904, 13, 33407, 1330, 1012, 72, 49493, 198, 198, 6738, 1280, 25641, 415, 13, 9503, 1746, 13, 9654, 7785, 1330, 1280, 7785, 628 ]
3.466667
30
import numpy as np import pandas as pd from scipy.stats import zscore from sklearn.linear_model import LogisticRegression, LassoLars from tqdm import tqdm import matplotlib.pyplot as plt import seaborn as sb def createDataset(n, d=100, d_inf=5, is_classification=True, no_signal=False): """ n is number of sam...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 629, 541, 88, 13, 34242, 1330, 1976, 26675, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 5972, 2569, 8081, 2234, 11, 406, 28372, 43, 945, 198,...
2.047735
2,472
from django.contrib import admin from .models import Board, Post, Topic @admin.register(Board) admin.site.register(Post) admin.site.register(Topic)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 5926, 11, 2947, 11, 47373, 628, 198, 31, 28482, 13, 30238, 7, 29828, 8, 628, 198, 28482, 13, 15654, 13, 30238, 7, 6307, 8, 198, 28482, 13, 15654, 13, 30238...
3.282609
46
# babysitterWageCalc.py # A program that accepts a starting time and ending time in hours and minutes # to calculate the total babysitting bill. The start and end times are in a # single 24 hour period. Partial hours are prorated. """A babysitter charges $2.50 an hour until 9:00 PM when the rate drops to $1.75 an hour ...
[ 2, 46711, 1967, 54, 496, 9771, 66, 13, 9078, 198, 2, 317, 1430, 326, 18178, 257, 3599, 640, 290, 7464, 640, 287, 2250, 290, 2431, 198, 2, 284, 15284, 262, 2472, 46711, 2535, 2855, 13, 383, 923, 290, 886, 1661, 389, 287, 257, 198, ...
3.919255
161
import responses import unittest import harperdb import harperdb_testcase
[ 11748, 9109, 198, 11748, 555, 715, 395, 198, 198, 11748, 3971, 525, 9945, 198, 11748, 3971, 525, 9945, 62, 9288, 7442, 628 ]
3.454545
22
import triangle from shapely.geometry import Polygon, MultiPolygon, Point from shapely.ops import unary_union def triangulate(vertex_list, boundary_vertices=None, boundary_indexes=None): """ Uses a Python wrapper of Triangle (Shechuck, 1996) to triangulate a set of points. Triangulation is constrai...
[ 11748, 22950, 201, 198, 6738, 5485, 306, 13, 469, 15748, 1330, 12280, 14520, 11, 15237, 34220, 14520, 11, 6252, 201, 198, 6738, 5485, 306, 13, 2840, 1330, 555, 560, 62, 24592, 201, 198, 201, 198, 201, 198, 4299, 1333, 648, 5039, 7, ...
2.209936
3,744
import os import random import string import subprocess as sp import sys import time import uuid from scripts.util import timestamp, makedirs, indent from scripts.globals import god # FIXME: add support for SLURM # FIXME: add starcluster cluster name argument (SGE) # FIXME: proc constraints for SGE submissions? # TOD...
[ 11748, 28686, 198, 11748, 4738, 198, 11748, 4731, 198, 11748, 850, 14681, 355, 599, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 334, 27112, 198, 198, 6738, 14750, 13, 22602, 1330, 41033, 11, 285, 4335, 17062, 11, 33793, 198, 6738, 1...
3.666667
153
import bpy bl_info ={ "name": "Camera", "author" : "Kayla Man", "version" : (1,0), "blender" : (2,91,0), "location" : " ", "description" : "creating cameras in Blender", "warning": "", "wiki_url": "", "category": "Camera" } import bpy from bpy.props import PointerProper...
[ 11748, 275, 9078, 201, 198, 2436, 62, 10951, 796, 90, 201, 198, 220, 220, 220, 366, 3672, 1298, 366, 35632, 1600, 201, 198, 220, 220, 220, 366, 9800, 1, 1058, 366, 37247, 5031, 1869, 1600, 201, 198, 220, 220, 220, 366, 9641, 1, 10...
2.055556
198
import sys import numpy as np import keras.backend as K from keras.callbacks import Callback from keras.models import Model, Sequential
[ 11748, 25064, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 41927, 292, 13, 1891, 437, 355, 509, 201, 198, 6738, 41927, 292, 13, 13345, 10146, 1330, 4889, 1891, 201, 198, 6738, 41927, 292, 13, 27530, 1330, 9104, 11, 24604, ...
3.108696
46
from rest_framework.response import Response from django.core.exceptions import PermissionDenied from django.utils.translation import ugettext as _ from misago.acl import add_acl from misago.categories import THREADS_ROOT_NAME from misago.categories.models import Category from misago.threads.permissions import can_st...
[ 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 2448, 3411, 21306, 798, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 355, 4808, 198, 198, 6738, 2984,...
3.59434
106
import pigpio import time INTERVAL = 0.1 pi = pigpio.pi() h = pi.spi_open(0, 1000000, 0) try: while True: print(read_adc_ch0(pi, h) * 3.3) time.sleep(INTERVAL) except KeyboardInterrupt: pass pi.spi_close(h) pi.stop()
[ 11748, 12967, 79, 952, 198, 11748, 640, 198, 198, 41358, 23428, 796, 657, 13, 16, 628, 198, 198, 14415, 796, 12967, 79, 952, 13, 14415, 3419, 198, 71, 796, 31028, 13, 2777, 72, 62, 9654, 7, 15, 11, 1802, 2388, 11, 657, 8, 198, 1...
1.991935
124
# Imports from 3rd party libraries import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output from joblib import load import pandas as pd # Imports from this application from app import app #Pipeline pipeline ...
[ 2, 1846, 3742, 422, 513, 4372, 2151, 12782, 198, 11748, 14470, 198, 11748, 14470, 62, 18769, 26418, 62, 5589, 3906, 355, 288, 15630, 198, 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 198, 11748, 14470, 62, 6494, 62, 5589, 39...
1.714427
4,041
import click from parsec.cli import pass_context, json_loads from parsec.decorators import custom_exception, list_output @click.command('get_ftp_files') @click.option( "--deleted", help="Whether to include deleted files", is_flag=True ) @pass_context @custom_exception @list_output def cli(ctx, deleted=Fal...
[ 11748, 3904, 198, 6738, 1582, 2363, 13, 44506, 1330, 1208, 62, 22866, 11, 33918, 62, 46030, 198, 6738, 1582, 2363, 13, 12501, 273, 2024, 1330, 2183, 62, 1069, 4516, 11, 1351, 62, 22915, 628, 198, 31, 12976, 13, 21812, 10786, 1136, 62,...
2.79661
177
import os from installed_clients.KBaseReportClient import KBaseReport from installed_clients.DataFileUtilClient import DataFileUtil
[ 11748, 28686, 198, 198, 6738, 6589, 62, 565, 2334, 13, 42, 14881, 19100, 11792, 1330, 14204, 589, 19100, 198, 6738, 6589, 62, 565, 2334, 13, 6601, 8979, 18274, 346, 11792, 1330, 6060, 8979, 18274, 346, 628 ]
3.722222
36
import re from pathlib import Path from tempfile import TemporaryDirectory from typing import Dict, List from ..models import RegistryEndpointModel, RepoModel DOCKER_LOGIN: str = ( "echo ${SCCI_TARGET_REGISTRY_PASSWORD} | " "docker login ${SCCI_TARGET_REGISTRY_ADDRESS} --username ${SCCI_TARGET_REGISTRY_USER} ...
[ 11748, 302, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 20218, 7753, 1330, 46042, 43055, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 198, 198, 6738, 11485, 27530, 1330, 33432, 12915, 4122, 17633, 11, 1432, 78, 17633, 198, 198, 35, 11...
2.134463
885
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------- # noc.core.text legacy wrappers # flake8: noqa # ---------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # ---------------------------------...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 23031, 198, 2, 299, 420, 13, 7295, 13, 5239, 10655, 7917, 11799, 198, 2, 781, 539, 23, 25, 645, 20402, 198, 2, 16529, 23031, 198, 2, 15069, 357, 34, 8, 4...
2.902579
349
# -*- coding: utf-8 -*- import json from xml.etree import ElementTree import utils from cloud import Cloud def toDateTime(c): """ FIXME """ return None class TypeAbstractPlatformObject(TypeabstractPlatformObjectBase): """ Format: attributes @id: string @systemId: string @label: string @detail: string @res...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 33918, 198, 6738, 35555, 13, 316, 631, 1330, 11703, 27660, 198, 11748, 3384, 4487, 198, 6738, 6279, 1330, 10130, 198, 198, 4299, 284, 10430, 7575, 7, 66, 259...
2.539484
6,319
import nuke
[ 11748, 299, 4649, 198 ]
3
4
#!/usr/bin/env python """ Unit tests for Jet Stream delphixpy """ import sys import unittest import js_branch import js_container import js_template from lib.GetSession import GetSession class JetStreamBranchTests(unittest.TestCase): """ Creates, activates, lists destroys JS Branches Requirements: Pa...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 26453, 5254, 329, 19013, 13860, 1619, 746, 844, 9078, 198, 37811, 198, 198, 11748, 25064, 198, 11748, 555, 715, 395, 198, 198, 11748, 44804, 62, 1671, 3702, 198, 11748, ...
2.994792
192
from typing import Union import numpy as np import pytest from numpy.testing import assert_array_almost_equal from docknet.function.activation_function import relu, sigmoid, tanh sigmoid_test_cases = [ (np.array([-100., 0., 100]), np.array([0., 0.5, 1.])), (-100., 0.), (0., 0.5), (100., 1.), (np...
[ 6738, 19720, 1330, 4479, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 18747, 62, 28177, 62, 40496, 198, 198, 6738, 23423, 3262, 13, 8818, 13, 48545, 62, 8818, 1330, ...
2.184539
401
from __future__ import print_function import argparse import keras from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten from keras.layers import Conv2D, MaxPooling2D from keras import backend as K import math import tensorflow as tf from kungfu import cur...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 1822, 29572, 198, 11748, 41927, 292, 198, 6738, 41927, 292, 13, 19608, 292, 1039, 1330, 285, 77, 396, 198, 6738, 41927, 292, 13, 27530, 1330, 24604, 1843, 198, 6738, 41927, 292,...
2.42801
1,528
try: from parser.benchmark import Benchmark except: from benchmark import Benchmark import json import collections def merge_dict(to_update: collections.defaultdict(list), other: collections.defaultdict(list)): """ Merge benchmarks dictionnaries together >>> from collections impor...
[ 28311, 25, 198, 220, 220, 220, 422, 30751, 13, 26968, 4102, 1330, 25187, 4102, 198, 16341, 25, 198, 220, 220, 220, 422, 18335, 1330, 25187, 4102, 198, 198, 11748, 33918, 198, 11748, 17268, 628, 198, 198, 4299, 20121, 62, 11600, 7, 146...
2.184659
352
# Functions for generating user input events. # We would like to use QTest for this purpose, but it seems to be broken. # See: http://stackoverflow.com/questions/16299779/qt-qgraphicsview-unit-testing-how-to-keep-the-mouse-in-a-pressed-state from ..Qt import QtCore, QtGui, QT_LIB
[ 198, 2, 40480, 329, 15453, 2836, 5128, 2995, 13, 220, 198, 2, 775, 561, 588, 284, 779, 1195, 14402, 329, 428, 4007, 11, 475, 340, 2331, 284, 307, 5445, 13, 198, 2, 4091, 25, 2638, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, ...
2.854369
103
from django.shortcuts import render_to_response from django.template import RequestContext
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 62, 1462, 62, 26209, 198, 6738, 42625, 14208, 13, 28243, 1330, 19390, 21947, 628, 198 ]
4.043478
23
# Copyright 2016 The Bazel 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 la...
[ 2, 15069, 1584, 383, 347, 41319, 46665, 13, 1439, 2489, 10395, 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, ...
2.959153
661
from fabric.state import env from fabtools.require.files import (directory, put) from fabtools.utils import (run_as_root) from fabric.api import (cd, run) #alias fabric's env for simple unit-testing of the rainbow api fabric_env = env
[ 6738, 9664, 13, 5219, 1330, 17365, 198, 6738, 7843, 31391, 13, 46115, 13, 16624, 1330, 357, 34945, 11, 1234, 8, 198, 6738, 7843, 31391, 13, 26791, 1330, 357, 5143, 62, 292, 62, 15763, 8, 198, 6738, 9664, 13, 15042, 1330, 357, 10210, ...
3.434783
69
from django.db.models.signals import post_save
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281, 62, 21928, 628 ]
3.2
15
import torch import torch.nn as nn import torch.nn.functional as F from torch.distributions.categorical import Categorical from torch.distributions.one_hot_categorical import OneHotCategorical from torch.distributions.relaxed_categorical import RelaxedOneHotCategorical from torch.distributions.normal import Normal from...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 17080, 2455, 507, 13, 66, 2397, 12409, 1330, 327, 2397, 12409, 198, 6738, 28034, 13, 17080, 2455, 507, ...
3.555556
198
import rmf_adapter.geometry as geometry # CIRCLE ====================================================================== # Check construction
[ 11748, 42721, 69, 62, 324, 3429, 13, 469, 15748, 355, 22939, 628, 198, 2, 327, 4663, 29931, 38093, 1421, 28, 198, 2, 6822, 5103, 198 ]
5.72
25
#!/usr/bin/env python ''' Created on 23/02/2016 @author: Paul Wang (ppswang@gmail.com) Generate example data set from CML samples - need to combine from multiple samples as a way to annonymise patient ID ''' import os import HTSeq import vcf import sys # ============================== # =======================...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 7061, 6, 198, 41972, 319, 2242, 14, 2999, 14, 5304, 198, 198, 31, 9800, 25, 3362, 15233, 357, 381, 2032, 648, 31, 14816, 13, 785, 8, 198, 198, 8645, 378, 1672, 1366, 900, 422, 327,...
1.800217
3,689
import datetime import random import pytest from flask import url_for from .create_event_data import flip, fake, create_multiple_events, event_object_factory, \ create_multiple_assets, create_multiple_teams, create_events_assets, create_events_teams, \ create_events_persons, create_events_participants, create...
[ 11748, 4818, 8079, 198, 11748, 4738, 198, 198, 11748, 12972, 9288, 198, 6738, 42903, 1330, 19016, 62, 1640, 198, 198, 6738, 764, 17953, 62, 15596, 62, 7890, 1330, 14283, 11, 8390, 11, 2251, 62, 48101, 62, 31534, 11, 1785, 62, 15252, 6...
2.794702
604
import wave import numpy as np import pygame as pg pg.init() screen_size = [1000,800] screen = pg.display.set_mode(screen_size) wav = wave.open("/home/anjaro/Android/Projects/AnimaWar/android/assets/Sounds/FireBig.wav", mode="r") nchannels,sampwidth,framerate,nframes,comptype,compname = wav.getparams() content = wav.re...
[ 11748, 6769, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 6057, 355, 23241, 198, 6024, 13, 15003, 3419, 198, 9612, 62, 7857, 796, 685, 12825, 11, 7410, 60, 198, 9612, 796, 23241, 13, 13812, 13, 2617, 62, 14171, 7, 9612, 62, ...
2.105751
539
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 from nbhelpers import nbhelpers import boto3 import argparse batch = boto3.client("batch") if __name__ == "__main__": ### Command line parser args, _ = _parse_args() response = submit_download_dat...
[ 2, 15069, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 6738, 299, 65, 16794, 364, 1330, 299, 65, 16794, 364, 198, 11...
2.453061
245
# ---------------------------------------------------------------------------- # Copyright (c) 2019--, gemelli development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # -----------------------------------------------...
[ 2, 16529, 10541, 198, 2, 15069, 357, 66, 8, 13130, 438, 11, 16840, 23225, 2478, 1074, 13, 198, 2, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 40499, 347, 10305, 13789, 13, 198, 2, 198, 2, 383, 1336, 5964, 318, 287, 262, 2393, ...
3.011742
511
# Generated by Django 2.1.4 on 2018-12-12 09:27 from django.conf import settings from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 19, 319, 2864, 12, 1065, 12, 1065, 7769, 25, 1983, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
3.1
40
import pymel.core as pm import logging log = logging.getLogger("ui")
[ 11748, 279, 4948, 417, 13, 7295, 355, 9114, 198, 11748, 18931, 198, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7203, 9019, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.938776
49
import sys import re import math from transformers import BertTokenizer, BertModel import torch.nn as nn import torch.nn.functional as F import torch import numpy as np import booknlp.common.crf as crf import booknlp.common.sequence_eval as sequence_eval from torch.nn import CrossEntropyLoss
[ 11748, 25064, 198, 11748, 302, 198, 11748, 10688, 198, 6738, 6121, 364, 1330, 22108, 30642, 7509, 11, 22108, 17633, 220, 198, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 280...
3.402299
87
from text2chem.chemical_structure import ChemicalStructure from text2chem.core.default_processing import DefaultProcessing from text2chem.chemical_data import list_of_elements, name2element, diatomic_molecules
[ 6738, 2420, 17, 15245, 13, 31379, 62, 301, 5620, 1330, 24872, 1273, 5620, 198, 6738, 2420, 17, 15245, 13, 7295, 13, 12286, 62, 36948, 1330, 15161, 18709, 278, 198, 6738, 2420, 17, 15245, 13, 31379, 62, 7890, 1330, 1351, 62, 1659, 62, ...
3.719298
57