content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# modulos import math # bibliotecas com adicionais para o python n = int(input('digite o n:')) raiz = math.sqrt(n) print('a raiz de {} e {:.2f}'.format(n, raiz))
[ 2, 953, 377, 418, 198, 198, 11748, 10688, 220, 1303, 275, 29142, 313, 721, 292, 401, 512, 47430, 15152, 31215, 267, 21015, 198, 198, 77, 796, 493, 7, 15414, 10786, 12894, 578, 267, 299, 32105, 4008, 198, 430, 528, 796, 10688, 13, 31...
2.357143
70
#!/usr/bin/env python # coding: utf-8 # In[1]: import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms import numpy as np from torch.utils.tensorboard import SummaryWriter from torch.utils.data import SubsetRandomSampler import rando...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 16, 5974, 628, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 37...
2.381406
1,678
""" fit HDDM model, with history terms, to data from IBL mice Anne Urai, 2019, CSHL """ # ============================================ # # GETTING STARTED # ============================================ # import matplotlib as mpl mpl.use('Agg') # to still plot even when no display is defined from optparse import Opt...
[ 37811, 198, 11147, 5572, 23127, 2746, 11, 351, 2106, 2846, 11, 284, 1366, 422, 314, 9148, 10693, 198, 43227, 471, 430, 72, 11, 13130, 11, 9429, 6581, 198, 198, 37811, 198, 198, 2, 46111, 2559, 18604, 1303, 198, 2, 17151, 48996, 33303,...
2.378462
1,950
from kernel.Entities import Command class User: """ Class that represents a user entity that stores all functionality related to application user. """ def get_id(self): """ Get user id. :return: The user id. """ return self.__id__ def set_id(self, id):...
[ 6738, 9720, 13, 14539, 871, 1330, 9455, 628, 198, 4871, 11787, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 5016, 326, 6870, 257, 2836, 9312, 326, 7000, 477, 11244, 3519, 284, 198, 220, 220, 220, 3586, 2836, 13, 198, 220, 220,...
2.190517
1,181
from bricks_modeling.database import ldraw_colors from typing import List import solvers.brick_heads.config as conf from bricks_modeling.file_IO.model_reader import read_bricks_from_file import os from typing import Tuple from solvers.brick_heads import texture_to_brick from solvers.brick_heads.lego_util import get_ran...
[ 6738, 28902, 62, 4666, 10809, 13, 48806, 1330, 300, 19334, 62, 4033, 669, 198, 6738, 19720, 1330, 7343, 198, 11748, 1540, 690, 13, 1671, 624, 62, 16600, 13, 11250, 355, 1013, 198, 6738, 28902, 62, 4666, 10809, 13, 7753, 62, 9399, 13, ...
1.795597
318
""" This source code is created based on https://github.com/wohlert/keras-squeezenet --------------------------------------------------------------------------------------------------------------------------------------- https://github.com/wohlert/keras-squeezenet MIT License Copyright (c) 2016 Jesper Wohlert Permi...
[ 37811, 198, 1212, 2723, 2438, 318, 2727, 1912, 319, 3740, 1378, 12567, 13, 785, 14, 86, 48988, 861, 14, 6122, 292, 12, 16485, 1453, 4801, 316, 198, 198, 10097, 10097, 26866, 198, 5450, 1378, 12567, 13, 785, 14, 86, 48988, 861, 14, 6...
3.748879
446
#!/usr/bin/env python import functools import json import os import sys import typing import click import click_log import tabulate from natsort import natsorted from sonic_package_manager.database import PackageEntry, PackageDatabase from sonic_package_manager.errors import PackageManagerError from sonic_package_ma...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1257, 310, 10141, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 19720, 198, 198, 11748, 3904, 198, 11748, 3904, 62, 6404, 198, 11748, 7400, 5039, 198, ...
2.394751
5,753
import numpy as np from sklearn.discriminant_analysis import LinearDiscriminantAnalysis from sklearn.model_selection import train_test_split from sklearn import metrics data = np.loadtxt('watermelon_data.csv', delimiter=',') X = data[:, 1:3] y = data[:, 3] X_train, X_test, y_train, y_test = train_test_split(X, y, te...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 15410, 3036, 42483, 62, 20930, 1330, 44800, 15642, 3036, 42483, 32750, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 6738, 1341, 35720, 1330,...
2.38403
263
import logging logger = logging.getLogger(__name__) import numpy as np import cv2 from ipapi.base.ipt_abstract import IptBase from ipapi.base import ip_common as ipc
[ 11748, 18931, 201, 198, 201, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 269, 85, 17, 201, 198, 201, 198, 6738, 20966, 15042, 13, 8692...
2.571429
70
from typing import Any, List from core.config import ConfigurableManager, ConfigurableOptions, Configuration from core.emulator.enumerations import ConfigDataTypes, RegisterTlvs from core.plugins.sdt import Sdt class SessionConfig(ConfigurableManager, ConfigurableOptions): """ Provides session configuration....
[ 6738, 19720, 1330, 4377, 11, 7343, 198, 198, 6738, 4755, 13, 11250, 1330, 17056, 11970, 13511, 11, 17056, 11970, 29046, 11, 28373, 198, 6738, 4755, 13, 368, 8927, 13, 268, 6975, 602, 1330, 17056, 6601, 31431, 11, 17296, 51, 6780, 82, ...
2.307233
1,507
while True: lengths = list(map(int, input().split())) lengths.sort() if lengths[2] == 0: break if lengths[0] ** 2 + lengths[1] ** 2 == lengths[2] ** 2: print('right') else: print('wrong')
[ 4514, 6407, 25, 198, 220, 220, 220, 20428, 796, 1351, 7, 8899, 7, 600, 11, 5128, 22446, 35312, 3419, 4008, 198, 220, 220, 220, 20428, 13, 30619, 3419, 628, 220, 220, 220, 611, 20428, 58, 17, 60, 6624, 657, 25, 198, 220, 220, 220, ...
2.207547
106
import re import falcon RE_CHECKBOX = re.compile(r"(on|yes|1|true)$", re.IGNORECASE) RE_USERNAME = re.compile(r"[a-z][a-z0-9]{1,31}$") RE_PASSWORD = re.compile(r"[A-Za-z0-9@#$%^&+=]{8,}$") RE_DATE = re.compile(r"\d\d\d\d-\d\d-\d\d$") RE_PHONE = re.compile(r"\+[0-9]+( [0-9]+)*$") RE_EMAIL = re.compile(r"(^[-!#$%&'*+/=...
[ 198, 11748, 302, 198, 11748, 24215, 1102, 198, 198, 2200, 62, 50084, 39758, 796, 302, 13, 5589, 576, 7, 81, 18109, 261, 91, 8505, 91, 16, 91, 7942, 8, 3, 1600, 302, 13, 16284, 1581, 2943, 11159, 8, 198, 2200, 62, 29904, 20608, 796...
1.555556
369
#!/usr/bin/env python # -*- coding: utf-8 -*- """Performance benchmark on molecular graphs generated from protein crystal structures.""" import json import sys import os import re from ase import Atoms from graphdot.graph import Graph from graphdot.kernel.molecular import Tang2019MolecularKernel arg_dict = {} for arg ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 32273, 18335, 319, 18955, 28770, 7560, 422, 7532, 15121, 198, 7249, 942, 526, 15931, 198, 11748, 33918, 198, 11748...
2.202035
688
import os if __name__ == '__main__': main()
[ 11748, 28686, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.318182
22
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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 # # U...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 1946, 12, 7908, 383, 9485, 6173, 37, 34152, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, ...
2.167745
2,164
import sqlite3 import tweepy as tw # Author:Mitos-Kotsis Antonios # # cs3028@uoi.gr # #========================================================# db_connection=sqlite3.connect('tweet.db') cursor=db_connection.cursor() update_cursor=db_connection.cursor() #Defining personal dev keys consumer_key='' c...
[ 11748, 44161, 578, 18, 198, 11748, 4184, 538, 88, 355, 665, 198, 2, 197, 197, 197, 197, 13838, 25, 43339, 418, 12, 42, 1747, 271, 9261, 4267, 197, 197, 220, 220, 220, 220, 1303, 198, 2, 197, 197, 197, 197, 197, 197, 6359, 1270, ...
2.566216
740
# Nonlinear regression using variational inference for parameters. # For simplicity we treat output noise variance as a fixed parameter. # Adapted from # https://brendanhasz.github.io/2019/07/23/bayesian-density-net.html import superimport from __future__ import absolute_import from __future__ import division from _...
[ 2, 8504, 29127, 20683, 1262, 5553, 864, 32278, 329, 10007, 13, 198, 2, 1114, 21654, 356, 2190, 5072, 7838, 24198, 355, 257, 5969, 11507, 13, 198, 2, 30019, 276, 422, 198, 2, 3740, 1378, 4679, 358, 272, 10134, 89, 13, 12567, 13, 952,...
2.1221
2,457
from molsysmt._private_tools.exceptions import BadCallError where_set_argument = { 'atom_name' : ['elements'], 'atom_id' : ['elements'], 'atom_type' : ['elements'], 'group_name' : ['elements'], 'group_id' : ['elements'], 'group_type' : ['elements'], 'component_name' : ['elements'], 'co...
[ 6738, 285, 10220, 893, 16762, 13557, 19734, 62, 31391, 13, 1069, 11755, 1330, 7772, 14134, 12331, 198, 198, 3003, 62, 2617, 62, 49140, 796, 1391, 628, 220, 220, 220, 705, 37696, 62, 3672, 6, 1058, 37250, 68, 3639, 6, 4357, 198, 220, ...
2.195946
1,036
#!C:\Python27_64\python.exe # -*- coding: utf-8 -*- # Launcher for Nuitka import nuitka.__main__ nuitka.__main__.main()
[ 2, 0, 34, 7479, 37906, 1983, 62, 2414, 59, 29412, 13, 13499, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 26385, 329, 399, 5013, 4914, 198, 198, 11748, 299, 5013, 4914, 13, 834, 12417, 834, 198, 77, 501...
2.2
55
class SimpleLossCompute: "A simple loss compute and train function."
[ 198, 4871, 17427, 43, 793, 7293, 1133, 25, 198, 220, 220, 220, 366, 32, 2829, 2994, 24061, 290, 4512, 2163, 526, 198 ]
3.363636
22
# Copyright (C) 2019 Project AGI # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
[ 2, 15069, 357, 34, 8, 13130, 4935, 13077, 40, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, ...
2.847619
1,575
import dgl.data import dgl import torch import torch.nn as nn import torch.nn.functional as F import itertools import numpy as np import scipy.sparse as sp dataset = dgl.data.CoraGraphDataset() g = dataset[0] # Split edge set for training and testing u, v = g.edges() eids = np.arange(g.number_of_edges()) eids = np....
[ 11748, 288, 4743, 13, 7890, 198, 198, 11748, 288, 4743, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 340, 861, 10141, 198, 11748, 299, 32152, 355, 45941, ...
2.324015
787
# -*- coding:utf-8 -*- import os import hashlib import time import shutil print "*******************************************************" print "**************AWD_Auto_Defend_Framework****************" print "*******************************************************" global tgt tgt = './backup' while (1): print "*****...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 11748, 12234, 8019, 198, 11748, 640, 220, 198, 11748, 4423, 346, 198, 198, 4798, 366, 17174, 8412, 2466, 8162, 1, 198, 4798, 366, 46068, 1174, 12298, 35, ...
3.207273
275
import re # Correct commas inside of a linked field # Check for valid link # Correct publication lists # Create linked objects # Fetch an object by source_id (numeric identifier used in source DB) # Quick check of the number of lines
[ 11748, 302, 198, 198, 2, 22941, 725, 292, 2641, 286, 257, 6692, 2214, 198, 198, 2, 6822, 329, 4938, 2792, 198, 198, 2, 22941, 9207, 8341, 198, 198, 2, 13610, 6692, 5563, 198, 198, 2, 376, 7569, 281, 2134, 416, 2723, 62, 312, 357, ...
3.809524
63
# -*- coding: utf-8 -*- # Copyright (C) 2012, Almar Klein # # Visvis is distributed under the terms of the (new) BSD License. # The full license can be found in 'license.txt'. import visvis.backends as backends from visvis import BaseFigure def figure(fig=None): """ figure(fig=None) Set the specified fi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 34, 8, 2321, 11, 978, 3876, 22864, 198, 2, 198, 2, 6911, 4703, 318, 9387, 739, 262, 2846, 286, 262, 357, 3605, 8, 347, 10305, 13789, 13, 198, 2, 383...
2.424284
733
# Copyright (c) 2019 - The Procedural Generation for Gazebo authors # For information on the respective copyright owner see the NOTICE file # # 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 # #...
[ 2, 15069, 357, 66, 8, 13130, 532, 383, 23652, 1523, 16588, 329, 21347, 1765, 78, 7035, 198, 2, 1114, 1321, 319, 262, 11756, 6634, 4870, 766, 262, 28536, 2393, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, ...
3.186589
343
import docker from docker.utils import create_host_config from docker.utils.types import Ulimit from requests.exceptions import ConnectionError, ReadTimeout import ob2.config as config
[ 11748, 36253, 198, 6738, 36253, 13, 26791, 1330, 2251, 62, 4774, 62, 11250, 198, 6738, 36253, 13, 26791, 13, 19199, 1330, 471, 32374, 198, 6738, 7007, 13, 1069, 11755, 1330, 26923, 12331, 11, 4149, 48031, 198, 198, 11748, 909, 17, 13, ...
4.108696
46
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Tyler - a python tail supporting rolling files # Copyright (C) 2016 Davide Mastromatteo - @mastro35 # ---------------------------------------------------- import sys import os import time import platform class Tyler(object): """ Creates an iterable object tha...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 14886, 532, 257, 21015, 7894, 6493, 10708, 3696, 198, 2, 15069, 357, 34, 8, 1584, 2544, 485, 30868, 398, ...
1.94964
1,807
from .mdtraj_Topology import from_mdtraj_Topology, to_mdtraj_Topology from .mdtraj_Trajectory import from_mdtraj_Trajectory from .mmtf_MMTFDecoder import from_mmtf_MMTFDecoder from .openmm_PDBFile import from_openmm_PDBFile from .openmm_GromacsGroFile import from_openmm_GromacsGroFile from .openmm_Topology import from_...
[ 6738, 764, 9132, 9535, 73, 62, 9126, 1435, 1330, 422, 62, 9132, 9535, 73, 62, 9126, 1435, 11, 284, 62, 9132, 9535, 73, 62, 9126, 1435, 198, 6738, 764, 9132, 9535, 73, 62, 15721, 752, 652, 1330, 422, 62, 9132, 9535, 73, 62, 15721, ...
2.782383
579
from flask import render_template from app import flask_app @flask_app.route('/') @flask_app.route('/software') @flask_app.route('/publications') @flask_app.errorhandler(404)
[ 6738, 42903, 1330, 8543, 62, 28243, 198, 198, 6738, 598, 1330, 42903, 62, 1324, 628, 198, 31, 2704, 2093, 62, 1324, 13, 38629, 10786, 14, 11537, 628, 198, 31, 2704, 2093, 62, 1324, 13, 38629, 10786, 14, 43776, 11537, 628, 198, 31, 2...
2.746269
67
# -*- coding: utf-8 -*- import mock from mig3_client import SubmissionBuilder def test_minimum_viable_submission(converted_tests): """Should produce something""" submission = SubmissionBuilder("t", "b", converted_tests).build() assert submission is not None def test_configuration_id(converted_tests): ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 15290, 198, 6738, 37011, 18, 62, 16366, 1330, 42641, 32875, 628, 198, 4299, 1332, 62, 39504, 62, 85, 3379, 62, 7266, 3411, 7, 1102, 13658, 62, 41989, 2599, 198, ...
3.333333
456
import click import os import sys import subprocess import termicoder.utils.display as display import json lang_map = { ".py": "python", ".c": "c", ".cpp": "cpp", ".cc": "cpp", ".c++": "cpp", ".java": "java" } # TODO: a default name for code file
[ 11748, 3904, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 850, 14681, 198, 11748, 3381, 291, 12342, 13, 26791, 13, 13812, 355, 3359, 198, 11748, 33918, 198, 198, 17204, 62, 8899, 796, 1391, 198, 220, 220, 220, 27071, 9078, 1298, 36...
2.495495
111
"""Tests for EVMC Python bindings. Note, these tests rely on a valid EVMC implementation. Set the EVMC_MODULE environment variable to your EMVC shared library. For example, if using evmone compiled in the parent directory: $ EVMC_MODULE=../evmone/build/lib/libevmone.so python3 test.py """ import os import unittes...
[ 37811, 51, 3558, 329, 8696, 9655, 11361, 34111, 13, 198, 198, 6425, 11, 777, 5254, 8814, 319, 257, 4938, 8696, 9655, 7822, 13, 5345, 262, 8696, 9655, 62, 33365, 24212, 198, 38986, 7885, 284, 534, 17228, 15922, 4888, 5888, 13, 1114, 16...
2.689119
386
from .context import ezparse import unittest if __name__ == '__main__': unittest.main()
[ 6738, 764, 22866, 1330, 304, 89, 29572, 198, 11748, 555, 715, 395, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.685714
35
""" This file defines class GumbelSoftmax. @author: Clemens Rosenbaum :: cgbr@cs.umass.edu @created: 6/12/18 """ import math import torch import torch.nn as nn from torch.autograd import Variable from ..Decision import Decision class GumbelSoftmax(Decision): """ Class GumbelSoftmax defines a decision making...
[ 37811, 198, 1212, 2393, 15738, 1398, 402, 2178, 417, 18380, 9806, 13, 198, 198, 31, 9800, 25, 3779, 45535, 15564, 24738, 7904, 269, 70, 1671, 31, 6359, 13, 388, 562, 13, 15532, 198, 31, 25598, 25, 718, 14, 1065, 14, 1507, 198, 37811...
3.281407
199
import os import sys from parsers import parse_midas_data import argparse parser = argparse.ArgumentParser() parser.add_argument("subject_id", help="name of subject to process") args = parser.parse_args() subject = args.subject_id subject_sample_time_map = parse_midas_data.parse_subject_sample_time_map() for visno i...
[ 11748, 28686, 198, 11748, 25064, 198, 6738, 13544, 364, 1330, 21136, 62, 13602, 292, 62, 7890, 198, 11748, 1822, 29572, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 48610, 13, 2860, 62, 49140, 7203, 32796, 62, 3...
2.410811
740
import os, sys from incidents import db, IncidentStatus if __name__ == '__main__': if os.path.exists("incidents/incidents.db"): os.remove("incidents/incidents.db") db.create_all() db.session.add(IncidentStatus("Open", 1)) db.session.add(IncidentStatus("Pending", 2)) db.sessio...
[ 11748, 28686, 11, 25064, 201, 198, 201, 198, 6738, 10207, 1330, 20613, 11, 32731, 19580, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 220, 220, 220, 611, 28686, 13, 6978, 13, 1069, 1023, 7203...
2.378882
161
# SPDX-FileCopyrightText: 2009 Fermi Research Alliance, LLC # SPDX-License-Identifier: Apache-2.0 # # Project: # glideinWMS # # File Version: # # Description: # This module implements the functions needed # to monitor the glidein factory # # Author: # Igor Sfiligoi (Dec 11th 2006) # import copy import json im...
[ 2, 30628, 55, 12, 8979, 15269, 8206, 25, 3717, 376, 7780, 72, 4992, 10302, 11, 11419, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 2, 198, 2, 4935, 25, 198, 2, 220, 220, 48089, 259, 54, 5...
2.223425
10,903
# Datetime Packages from time import mktime from datetime import timedelta from datetime import datetime import pytz # Celery Imports from celery.task import Task, PeriodicTask from celery.utils.log import get_task_logger # Feedparser import feedparser # Models from models import Feed, FeedItem # Logger object LOGG...
[ 2, 16092, 8079, 6400, 1095, 198, 6738, 640, 1330, 33480, 2435, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 12972, 22877, 198, 198, 2, 15248, 1924, 1846, 3742, 198, 6738, 18725, 1924, 1...
3.094059
202
import random import yaml from itertools import chain, groupby START_TOK = "<START>" STOP_TOK = "<STOP>" STOP = object() START = object() # instantiate a Markov object with the source file
[ 11748, 4738, 198, 11748, 331, 43695, 198, 6738, 340, 861, 10141, 1330, 6333, 11, 1448, 1525, 198, 198, 2257, 7227, 62, 10468, 42, 796, 33490, 2257, 7227, 24618, 198, 2257, 3185, 62, 10468, 42, 796, 33490, 2257, 3185, 24618, 198, 198, ...
2.909091
66
# -*- coding: utf-8 -*- """Unit test package for desktop_screen_recorder."""
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 26453, 1332, 5301, 329, 11364, 62, 9612, 62, 8344, 2875, 526, 15931, 198 ]
2.689655
29
import base64 import io import json import zlib from requests.structures import CaseInsensitiveDict from .compat import HTTPResponse, text_type
[ 11748, 2779, 2414, 198, 11748, 33245, 198, 11748, 33918, 198, 11748, 1976, 8019, 198, 198, 6738, 7007, 13, 7249, 942, 1330, 8913, 20376, 18464, 35, 713, 198, 198, 6738, 764, 5589, 265, 1330, 7154, 51, 4805, 9774, 2591, 11, 2420, 62, 4...
3.355556
45
# core django imports from django.contrib.sitemaps import Sitemap # app imports from posts.models import Post class PostSiteMap(Sitemap): """ A sitemap class indicating the objects, change frequency, and various pages of our website for better search engine indexing """ changefreq = 'weekly' ...
[ 2, 4755, 42625, 14208, 17944, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 82, 9186, 1686, 1330, 311, 9186, 499, 198, 198, 2, 598, 17944, 198, 6738, 6851, 13, 27530, 1330, 2947, 628, 198, 4871, 2947, 29123, 13912, 7, 50, 9186, 499, 2...
2.831395
172
# Generated by Django 3.0.5 on 2020-04-18 18:55 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 20, 319, 12131, 12, 3023, 12, 1507, 1248, 25, 2816, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
3.04918
61
from ...attrs import LIKE_NUM # Eleven, twelve etc. are written separate: on bir, on iki _num_words = [ "bir", "iki", "üç", "dörd", "beş", "altı", "yeddi", "səkkiz", "doqquz", "on", "iyirmi", "otuz", "qırx", "əlli", "altmış", "yetmiş", "səksən", ...
[ 6738, 2644, 1078, 3808, 1330, 34178, 62, 41359, 628, 198, 2, 37339, 11, 14104, 3503, 13, 389, 3194, 4553, 25, 319, 35122, 11, 319, 220, 5580, 198, 198, 62, 22510, 62, 10879, 796, 685, 198, 220, 220, 220, 366, 65, 343, 1600, 198, 2...
1.618182
605
#Project Euler Queestion 5 #2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. #What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? highest_factor = 20 factor = highest_factor x = highest_factor while x >= 0: if ...
[ 2, 16775, 412, 18173, 4670, 395, 295, 642, 198, 198, 2, 1495, 1238, 318, 262, 18197, 1271, 326, 460, 307, 9086, 416, 1123, 286, 262, 3146, 422, 352, 284, 838, 1231, 597, 17675, 13, 198, 2, 2061, 318, 262, 18197, 3967, 1271, 326, 3...
2.8125
288
""" Define a function to generate dictionary from matrix do the same for other matrix read sequences from fasta file define function with arguments (seq1, seq2, matrix) to score the alignments call the function for each matrix and each alignment print results in some nice way """ BLOSUM=matrix_to_dict("./BLOSUM62_squ...
[ 37811, 198, 7469, 500, 257, 2163, 284, 7716, 22155, 422, 17593, 198, 4598, 262, 976, 329, 584, 17593, 198, 961, 16311, 422, 3049, 64, 2393, 198, 13086, 2163, 351, 7159, 357, 41068, 16, 11, 33756, 17, 11, 17593, 8, 284, 4776, 262, 10...
2.319905
422
from django import forms from post.models import Post from django.forms import ClearableFileInput
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 1281, 13, 27530, 1330, 2947, 198, 198, 6738, 42625, 14208, 13, 23914, 1330, 11459, 540, 8979, 20560 ]
4.083333
24
# USAGE # python cnn_regression.py --dataset Houses-dataset/Houses\ Dataset/ # import the necessary packages from tensorflow.keras.optimizers import Adam from sklearn.model_selection import train_test_split from pyimagesearch import datasets from pyimagesearch import models import numpy as np import argparse import lo...
[ 2, 1294, 11879, 198, 2, 21015, 269, 20471, 62, 2301, 2234, 13, 9078, 1377, 19608, 292, 316, 34336, 12, 19608, 292, 316, 14, 39, 11370, 59, 16092, 292, 316, 14, 198, 198, 2, 1330, 262, 3306, 10392, 198, 6738, 11192, 273, 11125, 13, ...
3.312088
910
# https://www.jianshu.com/p/ba8a27cf7da1 # https://www.cnblogs.com/goldsunshine/p/15259246.html import sqlite3 import peewee import datetime import core.orm as orm db = peewee.SqliteDatabase('../db/auto_work.db') if __name__ == "__main__": pass # test_insert_record() # test_select_record() # ...
[ 2, 3740, 1378, 2503, 13, 73, 1547, 13415, 13, 785, 14, 79, 14, 7012, 23, 64, 1983, 12993, 22, 6814, 16, 198, 2, 3740, 1378, 2503, 13, 31522, 49096, 13, 785, 14, 70, 10119, 403, 19489, 14, 79, 14, 1314, 25191, 26912, 13, 6494, 19...
1.857678
534
from .painters import * from .textures import *
[ 6738, 764, 35436, 1010, 1330, 1635, 198, 6738, 764, 5239, 942, 1330, 1635 ]
3.615385
13
import numpy as np import matplotlib.pylab as plt from .basewidget import BaseWidget from probeinterface.plotting import plot_probe class ProbeMapWidget(BaseWidget): """ Plot the probe of a recording. Parameters ---------- recording: RecordingExtractor The recording extractor object ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 79, 2645, 397, 355, 458, 83, 198, 198, 6738, 764, 12093, 413, 17484, 1330, 7308, 38300, 198, 198, 6738, 12774, 39994, 13, 29487, 889, 1330, 7110, 62, 1676, 1350, 628, 1...
2.892193
269
"""circle_pack.py Compute circle packings according to the Koebe-Thurston-Andreev theory, Following a numerical algorithm by C. R. Collins and K. Stephenson, "A Circle Packing Algorithm", Comp. Geom. Theory and Appl. 2003. """ from __future__ import division from math import pi, acos, sin, e tolerance = 1 + 10e-12 ...
[ 37811, 45597, 62, 8002, 13, 9078, 198, 7293, 1133, 9197, 2353, 654, 1864, 284, 262, 509, 2577, 1350, 12, 817, 333, 3743, 12, 1870, 631, 85, 4583, 11, 198, 14291, 257, 29052, 11862, 416, 327, 13, 371, 13, 14006, 290, 509, 13, 42838, ...
2.552869
2,440
import urllib import os import threading import time import errno from functools import partial import weakref import base64 import json import socket from socketserver import ThreadingMixIn from http.server import SimpleHTTPRequestHandler, HTTPServer from urllib.parse import unquote from urllib.parse import urlparse ...
[ 11748, 2956, 297, 571, 198, 11748, 28686, 198, 11748, 4704, 278, 198, 11748, 640, 198, 11748, 11454, 3919, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 11748, 4939, 5420, 198, 11748, 2779, 2414, 198, 11748, 33918, 198, 11748, 17802, 198...
3.200647
309
from .views import * from django.urls import path urlpatterns = [ path('login/', LoginView.as_view()), path('register/', RegisterView.as_view()), path('me/', UserView.as_view()) ]
[ 6738, 764, 33571, 1330, 1635, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 38235, 14, 3256, 23093, 7680, 13, 292, 62, 1177, 3419, 828, 198, 220, 220, 220, 3...
2.608108
74
import numpy as np from river.utils.skmultiflow_utils import check_random_state from .. import base class Agrawal(base.SyntheticDataset): r"""Agrawal stream generator. The generator was introduced by Agrawal et al. [^1], and was a common source of data for early work on scaling up decision tree learner...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 7850, 13, 26791, 13, 8135, 16680, 361, 9319, 62, 26791, 1330, 2198, 62, 25120, 62, 5219, 198, 198, 6738, 11485, 1330, 2779, 628, 198, 4871, 2449, 1831, 282, 7, 8692, 13, 13940, 429, 6587,...
2.910045
1,334
# -*- coding: utf-8 -*- import frictionless from pprint import pprint class DataSchemaInputBase: """A base class for importing a data schema, querying it, and validating with it. This class assumes imported schema are valid Table Schema. See here: https://specs.frictionlessdata.io/table-schema/ """ ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 23822, 1203, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 4871, 6060, 27054, 2611, 20560, 14881, 25, 198, 220, 220, 220, 37227, 32, 2779, 1398, 329, 3333...
2.365055
641
import time from django.conf import settings from hawkrest import HawkAuthentication from rest_framework.generics import GenericAPIView from rest_framework.response import Response from api.core.permissions import IsAuthenticated from .checks import db_check
[ 11748, 640, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 48710, 2118, 1330, 26698, 47649, 3299, 198, 6738, 1334, 62, 30604, 13, 8612, 873, 1330, 42044, 2969, 3824, 769, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 182...
4.15873
63
import asyncio import os from Yukki.YukkiUtilities.tgcallsrun import ASS_ACC from pyrogram import Client, filters from pyrogram.errors import UserAlreadyParticipant, UserNotParticipant from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message from pytgcalls import StreamType from pytgcalls.types.i...
[ 11748, 30351, 952, 198, 11748, 28686, 198, 6738, 19760, 4106, 13, 56, 2724, 4106, 18274, 2410, 13, 25297, 66, 5691, 5143, 1330, 24994, 62, 26861, 198, 198, 6738, 12972, 39529, 1330, 20985, 11, 16628, 198, 6738, 12972, 39529, 13, 48277, ...
2.988506
348
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import *
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 2829, 17752, 355, 33918, 198, 198, 6738, 435, 541, 323, 13, 64, 404, 13, 15042, 13, 9979, 415, 13, 22973, 3418...
2.58
50
import numpy as np from sklearn.linear_model import Lasso, Ridge from sklearn.preprocessing import scale from math import floor class Regression: """ Info: Regression class which uses sklearn. Includes functions to solve: * Ordinary Least Squares (OLS). * Ridge regression. * Lasso regression. ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 406, 28372, 11, 20614, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 5046, 198, 6738, 10688, 1330, 4314, 628, 198, 4871, 3310, 2234, 25, 198, 220, 220, ...
2.048098
3,181
import pytest from py_ecc.utils import prime_field_inv @pytest.mark.parametrize( 'a,n,result', [ (0, 7, 0), (7, 7, 0), (2, 7, 4), (10, 7, 5), ] )
[ 11748, 12972, 9288, 198, 198, 6738, 12972, 62, 68, 535, 13, 26791, 1330, 6994, 62, 3245, 62, 16340, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7, 198, 220, 220, 220, 705, 64, 11, 77, 11, 20274, 3256, 198, 220, ...
1.678261
115
import googlemaps, requests, scalg, json from geopy.distance import geodesic from datetime import datetime from .utils import find_pollution_coords
[ 11748, 23645, 31803, 11, 7007, 11, 629, 14016, 11, 33918, 198, 6738, 4903, 11081, 13, 30246, 1330, 4903, 4147, 291, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 764, 26791, 1330, 1064, 62, 30393, 1009, 62, 1073, 3669, 198 ]
3.634146
41
''' 将一本小说内容插入到MYSQL中 ''' import time import pymysql from selenium import webdriver from pyquery import PyQuery as pq from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By #url = 'https://book.tianya.cn/chapte...
[ 7061, 6, 198, 49546, 31660, 17312, 105, 22887, 237, 46237, 112, 37863, 227, 22522, 117, 162, 237, 240, 17739, 98, 26344, 108, 44, 16309, 9711, 40792, 198, 7061, 6, 198, 11748, 640, 198, 11748, 279, 4948, 893, 13976, 198, 6738, 384, 11...
2.021236
518
from .matcher import GenericMatcher
[ 6738, 764, 6759, 2044, 1330, 42044, 19044, 2044, 198 ]
4
9
from .model import ImageWidth, ImageHeight, Camera, ImageList, Record, RecordList from .view import OpenDialog, ErrorDialog, MainWindow import datetime from functools import reduce import PIL.ImageQt from PySide2 import QtCore, QtGui, QtWidgets ImageViewWidth = 800 ImageViewHeight = 600
[ 6738, 764, 19849, 1330, 7412, 30916, 11, 7412, 23106, 11, 20432, 11, 7412, 8053, 11, 13266, 11, 13266, 8053, 198, 6738, 764, 1177, 1330, 4946, 44204, 11, 13047, 44204, 11, 8774, 27703, 198, 11748, 4818, 8079, 198, 6738, 1257, 310, 10141...
3.511905
84
# encoding: utf-8 # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import, division,...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 770, 8090, 6127, 5178, 318, 2426, 284, 262, 2846, 286, 262, 29258, 5094, 198, 2, 13789, 11, 410, 13, 362, 13, 15, 13, 1002, 257, 4866, 286, 262, 4904, 43, 373, 407, 9387, 351, 42...
2.214862
2,355
import sys import re from collections import OrderedDict import cipherCheck import playfair_cipher import vigenere_cipher # start of main() cipherList = ['PLF', 'RTS', 'RFC', 'VIG', 'CES'] # Remember that the first argument of the script is the file name, thus start at index 1 cipherName = str(sys.argv[1]) key = str...
[ 11748, 25064, 198, 11748, 302, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 38012, 9787, 198, 11748, 711, 22043, 62, 66, 10803, 198, 11748, 410, 9324, 567, 62, 66, 10803, 198, 198, 2, 923, 286, 1388, 3419, 198, 66, 10803,...
2.921811
243
# Generated by Django 2.2 on 2019-04-04 16:21 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 319, 13130, 12, 3023, 12, 3023, 1467, 25, 2481, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.892857
28
# Generated by Django 2.2.10 on 2020-07-21 17:16 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 940, 319, 12131, 12, 2998, 12, 2481, 1596, 25, 1433, 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.840909
44
from flask import Flask, render_template, request, make_response, send_file, redirect import os import secrets import json import requests import re import difflib from flask_mysqldb import MySQL from difflib import get_close_matches from dotenv import load_dotenv from googleapiclient.http import MediaFileUpload from g...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 11, 787, 62, 26209, 11, 3758, 62, 7753, 11, 18941, 198, 11748, 28686, 198, 11748, 13141, 198, 11748, 33918, 198, 11748, 7007, 198, 11748, 302, 198, 11748, 814, 8019, 198, 6738, ...
2.811545
589
import numpy as np import warnings __all__ = ['WavefieldVectorBase'] if __name__ == '__main__': m = Mesh() W = WavefieldVectorBase(m) MW = MyWFV(m) W._data += np.arange(5).reshape(W._data.shape) MW._data += np.arange(MW._data.shape[0]).reshape(MW._data.shape)
[ 11748, 299, 32152, 355, 45941, 198, 11748, 14601, 628, 198, 834, 439, 834, 796, 37250, 39709, 3245, 38469, 14881, 20520, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 285, 796, 47529, 3419,...
2.38843
121
# Copyright (c) 2020 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
[ 2, 15069, 357, 66, 8, 12131, 8180, 10501, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, ...
2.50995
804
from django.shortcuts import render from django.http import HttpResponse from .models import Cup # Create your views here. # # TEST FUNCTION # FUNCTION FOR HELLO, NAME # FUNCTION FOR NUMBER TIMES 2 # FUNCTION TO ADD NUMBERS TO SUM # FUNCTION TO CREATE NEW CUP OBJECT # FILTERS FOR MANUFACTURE DATE # CHANGE MATER...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 764, 27530, 1330, 5454, 198, 198, 2, 13610, 534, 5009, 994, 13, 198, 2, 198, 2, 43001, 29397, 4177, 2849, 198, 19...
2.866667
135
# Works run by the daemon (using submit) from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): load_dbenv() from aiida.orm import CalculationFactory, DataFactory from aiida.work.run import run, submit, async from aiida.orm.data.structure import StructureData from aiida.orm.data.base import Str,...
[ 198, 2, 10933, 1057, 416, 262, 33386, 357, 3500, 9199, 8, 198, 198, 6738, 257, 72, 3755, 1330, 3440, 62, 9945, 24330, 11, 318, 62, 9945, 24330, 62, 14578, 198, 361, 407, 318, 62, 9945, 24330, 62, 14578, 33529, 198, 220, 220, 220, ...
1.814562
3,516
from utils.mongodb_access import get_references_annotations, get_references_count from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.cluster import DBSCAN from time import time import numpy as np import matplotlib.pyplot as plt from sklearn.datasets.samples_generator import make_blobs from sklearn...
[ 6738, 3384, 4487, 13, 31059, 375, 65, 62, 15526, 1330, 651, 62, 5420, 4972, 62, 34574, 602, 11, 651, 62, 5420, 4972, 62, 9127, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 309, 69, 312, 69, 38469, 7509, 198, ...
2.683817
1,069
# criando um jogo de adivinha from random import randint from time import sleep # fazendo o computador sortear um numero de 0 ate 5 cpu = randint(0, 5) print('<< TENTE ADIVINHAR >>') # pedindo qual numero o jogador vai jogar jogador = int(input('Jogador tente adivinhar o numero entre (0, 5): ')) # analisando se o jogad...
[ 2, 269, 380, 25440, 23781, 474, 24076, 390, 512, 452, 259, 3099, 198, 6738, 4738, 1330, 43720, 600, 198, 6738, 640, 1330, 3993, 198, 2, 277, 1031, 31110, 267, 2653, 7079, 3297, 451, 23781, 997, 3529, 390, 657, 15063, 642, 198, 36166, ...
2.419492
236
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand, CommandError from atados_core.models import Nonprofit, Project
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 11, 9455, 12331, 198, 6738, 379, 22484, 62, 7295, 13, 27530, 1330, 8504, 9183, 11, 4935, 628 ]
3.27907
43
__version__ = '0.9.0.dev1'
[ 834, 9641, 834, 796, 705, 15, 13, 24, 13, 15, 13, 7959, 16, 6, 198 ]
1.8
15
#!/usr/bin/env python import sys sys.path.append('../src') from random import random from threading import RLock from time import sleep from threadingex.threadpoolexecutor import ThreadPoolExecutor lock = RLock() result = {} executor = ThreadPoolExecutor(10) for i in range(100): executor.submit(task, i) ex...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 10677, 11537, 198, 198, 6738, 4738, 1330, 4738, 198, 6738, 4704, 278, 1330, 371, 25392, 198, 6738, 640, 1330, 3993, 198,...
3.038462
130
import setuptools from distutils.core import setup setup( name = 'PqrUploadModule', # How you named your package folder (MyLib) packages = ['PqrUploadModule'], # Chose the same as "name" version = '0.0.12', # Start with a small number and increase it with every change you make license='MIT', ...
[ 11748, 900, 37623, 10141, 198, 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 198, 40406, 7, 198, 220, 1438, 796, 705, 47, 80, 81, 41592, 26796, 3256, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1374, 345, 3706, 534, 5301, 9483, 35...
2.292237
1,095
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ 2, 15069, 33448, 43208, 21852, 1766, 1539, 12052, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198...
3.03587
920
import json from datetime import date, datetime, timedelta from pathlib import Path from typing import Iterator
[ 11748, 33918, 198, 6738, 4818, 8079, 1330, 3128, 11, 4818, 8079, 11, 28805, 12514, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 40806, 1352, 628, 198 ]
4.071429
28
import pytest @pytest.mark.asyncio @pytest.mark.asyncio
[ 11748, 12972, 9288, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 198 ]
2.307692
26
import sys from api.analysis import translators from api.paths import PROJECT_ROOT # allow for imports of translator code as "translator.module" sys.path.append(str(PROJECT_ROOT / "translators")) # allow for imports of adapter code as "adapter.translator.module" sys.path.append(str(PROJECT_ROOT / "nlidbTranslator/a...
[ 11748, 25064, 198, 198, 6738, 40391, 13, 20930, 1330, 4779, 2024, 198, 6738, 40391, 13, 6978, 82, 1330, 21965, 23680, 62, 13252, 2394, 628, 198, 2, 1249, 329, 17944, 286, 33417, 2438, 355, 366, 7645, 41880, 13, 21412, 1, 198, 17597, 1...
3.14433
194
import os import pathlib from invoke import ( task, ) ROOT_PATH = pathlib.Path(__file__).resolve().parent ROOT_PATH_STR = str(ROOT_PATH) @task() def clean(context): """ Clean the project :param context: invoke context """ with context.cd(ROOT_PATH_STR): context.run('git clean -fd') ...
[ 11748, 28686, 198, 11748, 3108, 8019, 198, 6738, 26342, 1330, 357, 198, 220, 220, 220, 4876, 11, 198, 8, 198, 198, 13252, 2394, 62, 34219, 796, 3108, 8019, 13, 15235, 7, 834, 7753, 834, 737, 411, 6442, 22446, 8000, 198, 13252, 2394, ...
2.580093
643
"""Utility functions for manipulating image data. Author: Ryan Eloff Contact: ryan.peter.eloff@gmail.com Date: July 2019 """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from skimage.io import imread def load_image_array(image_pat...
[ 37811, 18274, 879, 5499, 329, 29349, 2939, 1366, 13, 198, 198, 13838, 25, 6047, 2574, 2364, 198, 17829, 25, 374, 4121, 13, 79, 2357, 13, 417, 2364, 31, 14816, 13, 785, 198, 10430, 25, 2901, 13130, 198, 37811, 628, 198, 6738, 11593, ...
2.617021
329
""" @author Claas Voelcker Utils module containing some data utility functions """ import numpy as np from src.util.spn_util import get_categoricals def get_categorical_data(spn, df, dictionary, header=1, types=False, date=False, assert_nan=False): """ :param spn: :param df: :param dictionary: ...
[ 37811, 198, 31, 9800, 27166, 292, 20687, 417, 15280, 198, 198, 18274, 4487, 8265, 7268, 617, 1366, 10361, 5499, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 12351, 13, 22602, 13, 2777, 77, 62, 22602, 1330, 651, 62, ...
2.385006
787
#!/usr/bin/env python3 """Check the status of the Hades database. Try to select data as the different hades users from the database to check if the database is running and accessible. """ import contextlib import logging import os import pwd import sys from typing import Iterable from sqlalchemy import Table, exists,...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 9787, 262, 3722, 286, 262, 36857, 6831, 13, 198, 198, 23433, 284, 2922, 1366, 355, 262, 1180, 550, 274, 2985, 422, 262, 6831, 284, 2198, 611, 198, 1169, 6831, 318, 2491, 2...
2.630522
747
import itertools import gpuscheduler import argparse import os from itertools import product parser = argparse.ArgumentParser(description='Compute script.') parser.add_argument('--dry', action='store_true') parser.add_argument('--verbose', action='store_true') args = parser.parse_args() #s = gpuscheduler.Scheduler('/...
[ 11748, 340, 861, 10141, 198, 11748, 27809, 385, 1740, 18173, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 6738, 340, 861, 10141, 1330, 1720, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 11639, 7293, 1133, 4226,...
2.29328
1,756
from yesaide import YesaideRuntimeError class RawWorker(object): """Deepest worker, root of all the interactions, only ensure that a sqlalchemy database session is available in `self._dbsession`.""" class SupervisedWorker(RawWorker): """Worker intended to be used inside a foreman.""" class MappingMana...
[ 6738, 3763, 64, 485, 1330, 3363, 64, 485, 41006, 12331, 628, 198, 4871, 16089, 12468, 263, 7, 15252, 2599, 198, 220, 220, 220, 37227, 29744, 395, 8383, 11, 6808, 286, 477, 262, 12213, 11, 691, 4155, 326, 198, 220, 220, 220, 257, 441...
2.228316
1,568
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-10-27 12:52 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 18, 319, 2177, 12, 940, 12, 1983, 1105, 25, 4309, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.660714
56
''' 剑指 Offer 16. 数值的整数次方 实现 pow(x, n) ,即计算 x 的 n 次幂函数(即,xn)。不得使用库函数,同时不需要考虑大数问题。 ''' s = Solution() print(s.myPow(2.0, 10) == 1024.0) print(s.myPow(2.1, 3) == 9.261) print(s.myPow(2.0, -2) == 0.25)
[ 7061, 6, 198, 30298, 239, 162, 234, 229, 33085, 1467, 13, 10545, 243, 108, 161, 222, 120, 21410, 46763, 112, 46763, 108, 162, 105, 94, 43095, 198, 22522, 252, 163, 236, 108, 7182, 7, 87, 11, 299, 8, 27332, 120, 234, 39355, 111, 16...
1.069149
188
import json from pygments import highlight from pygments.formatters.terminal import TerminalFormatter from pygments.lexers.data import JsonLexer import taro.client from taro import dto, util from taro.jobs.job import JobInfoCollection,JobInfo from taroapp import printer from taroapp.view import instance as view_inst ...
[ 11748, 33918, 198, 198, 6738, 12972, 11726, 1330, 7238, 198, 6738, 12972, 11726, 13, 18982, 1010, 13, 23705, 282, 1330, 24523, 8479, 1436, 198, 6738, 12972, 11726, 13, 2588, 364, 13, 7890, 1330, 449, 1559, 45117, 263, 198, 198, 11748, 2...
3.606742
89
from dataclasses import dataclass, field from enum import Enum from typing import Dict, Tuple, Union RegisterValue = Union[int, bool] @dataclass __all__ = [ "RegisterType", "ModbusReadSession", "RegisterValueType", ]
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 19720, 1330, 360, 713, 11, 309, 29291, 11, 4479, 628, 628, 198, 38804, 11395, 796, 4479, 58, 600, 11, 20512, 60, 628, 198, 31, 1...
2.890244
82
# Copyright (c) 2009-2016 Simon van Heeringen <simon.vanheeringen@gmail.com> # # This module is free software. You can redistribute it and/or modify it under # the terms of the MIT License, see the file COPYING included with this # distribution. """ Configuration for GimmeMotifs """ import configparser import sysconf...
[ 2, 15069, 357, 66, 8, 3717, 12, 5304, 11288, 5719, 679, 1586, 268, 1279, 14323, 261, 13, 10438, 258, 1586, 268, 31, 14816, 13, 785, 29, 198, 2, 198, 2, 770, 8265, 318, 1479, 3788, 13, 921, 460, 17678, 4163, 340, 290, 14, 273, 13...
2.451517
1,351
# Generated by Django 4.0 on 2022-01-08 14:12 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 604, 13, 15, 319, 33160, 12, 486, 12, 2919, 1478, 25, 1065, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 628 ]
2.904762
42
import pandas as pd import igraph from ndex2.nice_cx_network import NiceCXNetwork import ndex2.client as nc import ndex2 import networkx as nx from fa2 import ForceAtlas2 from .utils import * import math import json import os import numpy as np
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 45329, 1470, 198, 6738, 299, 67, 1069, 17, 13, 44460, 62, 66, 87, 62, 27349, 1330, 18460, 34, 55, 26245, 198, 11748, 299, 67, 1069, 17, 13, 16366, 355, 299, 66, 198, 11748, 299, 67, 106...
2.940476
84
# Import library that lets you control the Pi's GPIO pins import RPi.GPIO as io # Import time for delays from time import sleep # Disables messages about GPIO pins already being in use io.setwarnings(False) # Numbering scheme that corresponds to breakout board and pin layout io.setmode(io.BCM) led_io_pin = 17 butto...
[ 2, 17267, 5888, 326, 8781, 345, 1630, 262, 13993, 338, 50143, 20567, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 33245, 220, 198, 2, 17267, 640, 329, 16119, 220, 198, 6738, 640, 1330, 3993, 198, 198, 2, 3167, 2977, 6218, 546, 50143, ...
2.608808
386
import urllib2 url = "http://www.google.com/" # get response from url response = urllib2.urlopen(url) fh = open('downloaded_file.html', "w") fh.write(response.read()) fh.close()
[ 11748, 2956, 297, 571, 17, 198, 6371, 796, 366, 4023, 1378, 2503, 13, 13297, 13, 785, 30487, 198, 2, 651, 2882, 422, 19016, 198, 26209, 796, 2956, 297, 571, 17, 13, 6371, 9654, 7, 6371, 8, 198, 69, 71, 796, 1280, 10786, 2902, 1457...
2.594203
69