content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# -*- coding: utf-8 -*- """ (c) 2017 - Copyright Red Hat Inc Authors: Pierre-Yves Chibon <pingou@pingoured.fr> """ from __future__ import unicode_literals, absolute_import import unittest import shutil import sys import os import mock sys.path.insert( 0, os.path.join(os.path.dirname(os.path.abspath(__fi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 357, 66, 8, 2177, 532, 15069, 2297, 10983, 3457, 628, 46665, 25, 198, 220, 220, 21204, 12, 56, 1158, 609, 571, 261, 1279, 13886, 280, 31, 13886, 8167,...
2.16732
2,295
# A complete working python program to demonstrate all # inertion methods of linked list # # Node class #function to initialize the node object # Linked list class contains a Node object #function to initialize the head #function to insert a new node at the beginning # Insert a new node after th...
[ 2, 317, 1844, 1762, 21015, 1430, 284, 10176, 477, 198, 2, 29824, 295, 5050, 286, 6692, 1351, 198, 2, 198, 2, 19081, 1398, 198, 220, 220, 220, 1303, 8818, 284, 41216, 262, 10139, 2134, 198, 198, 2, 7502, 276, 1351, 1398, 4909, 257, ...
2.808889
225
from board import Board import pacman as pc import math import queue from itertools import permutations import random import copy import time from create_board import create_board from ipc import PacmanControls from direction import Direction from CONSTANTS import * map_repr = "oooooooooooooooooooooooooooooooWWWWWWWWWW...
[ 6738, 3096, 1330, 5926, 198, 11748, 23503, 805, 355, 40653, 198, 11748, 10688, 198, 11748, 16834, 198, 6738, 340, 861, 10141, 1330, 9943, 32855, 198, 11748, 4738, 198, 11748, 4866, 198, 11748, 640, 198, 6738, 2251, 62, 3526, 1330, 2251, ...
2.364993
2,011
from __future__ import division import os import errno import time def mkdirs(dirname): """Recurcively (and safely) create dir It is equivalent to mkdir -p dirname """ try: os.makedirs(dirname) except OSError as exc: if exc.errno != errno.EEXIST: raise exc
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 28686, 220, 198, 11748, 11454, 3919, 198, 11748, 640, 198, 198, 4299, 33480, 15908, 82, 7, 15908, 3672, 2599, 198, 220, 37227, 6690, 333, 66, 2280, 357, 392, 11512, 8, 2251, 26672, 198, ...
2.557522
113
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-06-28 22: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, 1959, 319, 12131, 12, 3312, 12, 2078, 2534, 25, 4309, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198...
2.709091
55
import csvdata # some import works import pandas as pd import numpy as np import torch from feature.features import features # Generate dummy data datapath = csvdata.csvdatapaths[0] # 输入需要训练的文件 data = pd.read_csv(datapath) # 载入csv文件 date = np.array(data['date']) Time = np.array(data['time']) open = np.array(d...
[ 198, 11748, 269, 21370, 7890, 198, 198, 2, 617, 1330, 2499, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 28034, 628, 198, 198, 6738, 3895, 13, 40890, 1330, 3033, 628, 198, 2, 2980, 378, ...
2.153724
1,262
import os import time import torch import torch.nn as nn from collections import OrderedDict from ipdb import set_trace as st from math import sqrt from tqdm import tqdm from .train_model import TrainModel from networks import networks import util.pytorch_ssim as pytorch_ssim from sklearn.metrics import confusion_ma...
[ 11748, 28686, 198, 11748, 640, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 20966, 9945, 1330, 900, 62, 40546, 355, 336, 198, 198, 6738, 10688, 1330, 19862, 1703...
3.380952
126
from subprocess import Popen, PIPE def runNONMEM: process = Popen(['echo', 'test.py'], stdout=PIPE, stderr=PIPE) stdout, stderr = process.communicate() print stdout
[ 6738, 850, 14681, 1330, 8099, 268, 11, 350, 4061, 36, 201, 198, 201, 198, 4299, 1057, 45, 1340, 44, 3620, 25, 201, 198, 220, 220, 220, 1429, 796, 8099, 268, 7, 17816, 30328, 3256, 705, 9288, 13, 9078, 6, 4357, 14367, 448, 28, 47, ...
2.275
80
import json import pickle import os from typing import Dict, Iterable, TypeVar, Type, List, Union, Any if __package__: from link_analysis.models import Header, DocumentHeader, CleanLink else: from models import Header, DocumentHeader, CleanLink # type: ignore # Don't forget to add to this place new classes w...
[ 11748, 33918, 198, 11748, 2298, 293, 198, 11748, 28686, 198, 6738, 19720, 1330, 360, 713, 11, 40806, 540, 11, 5994, 19852, 11, 5994, 11, 7343, 11, 4479, 11, 4377, 198, 198, 361, 11593, 26495, 834, 25, 198, 220, 220, 220, 422, 2792, ...
2.642229
1,023
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ """ __time__ = '2019/1/31 10:24' import copy import json import os import random import re import logging from tatk.policy.policy import Policy from tatk.task.multiwoz.goal_generator import GoalGenerator from tatk.util.multiwoz.multiwoz_slot_trans import REF_USR_DA...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 37811, 198, 198, 834, 2435, 834, 796, 705, 23344, 14, 16, 14, 3132, 838, 25, 1731, 6, 198, 198...
2.143455
2,391
import pytest from melusine.nlp_tools.normalizer import Normalizer @pytest.mark.parametrize( "input_text, lowercase, output_text", [ ("Héllö WORLD", True, "hello world"), ("Hèllo WÖRLD", False, "Hello WORLD"), ("", False, ""), ], )
[ 11748, 12972, 9288, 198, 6738, 7758, 385, 500, 13, 21283, 79, 62, 31391, 13, 11265, 7509, 1330, 14435, 7509, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7, 198, 220, 220, 220, 366, 15414, 62, 5239, 11, 2793, 7442,...
2.25
120
# Copyright (c) 2013, zameen and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from datetime import datetime,time, timedelta from empg_erp.modules.mustang.employee.employee_roster import EmployeeRoster import json from pypika i...
[ 2, 15069, 357, 66, 8, 2211, 11, 1976, 480, 268, 290, 20420, 198, 2, 1114, 5964, 1321, 11, 3387, 766, 5964, 13, 14116, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 5306, 27768, 198, 6738, 5306, 27...
2.854015
411
# from meta_network import meta_learner from data import Data, MetaData # from utils import subset_index_to_address # from utils import meta_pred_generator, historyPlot, create_data_subsets, dice_coef_loss, auc, mean_iou, dice_coef from visualization import visualize_meta_labels, visualize_meta_features, visualize_regr...
[ 2, 422, 13634, 62, 27349, 1330, 13634, 62, 3238, 1008, 198, 6738, 1366, 1330, 6060, 11, 30277, 6601, 198, 2, 422, 3384, 4487, 1330, 24637, 62, 9630, 62, 1462, 62, 21975, 198, 2, 422, 3384, 4487, 1330, 13634, 62, 28764, 62, 8612, 135...
3.258065
248
from comms import UDP_Comms, Serial_Comms, Radio_Comms import socket, time from binascii import unhexlify, hexlify if __name__ == "__main__": #comms = UDP_Comms('127.0.0.1', 1234, 1235) # comms = Serial_Comms("/dev/ttyUSB2") comms = Radio_Comms('127.0.0.1','127.0.0.1', 5020, 5000) #comms = Radio_Comms(...
[ 6738, 725, 82, 1330, 36428, 62, 5377, 907, 11, 23283, 62, 5377, 907, 11, 8829, 62, 5377, 907, 198, 11748, 17802, 11, 640, 198, 6738, 9874, 292, 979, 72, 1330, 555, 33095, 75, 1958, 11, 17910, 75, 1958, 198, 198, 361, 11593, 3672, ...
2.048883
716
# Link to the problem: https://www.codechef.com/problems/COMPILER if __name__ == "__main__": main()
[ 2, 7502, 284, 262, 1917, 25, 3740, 1378, 2503, 13, 19815, 721, 258, 69, 13, 785, 14, 1676, 22143, 14, 9858, 47, 4146, 1137, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 19...
2.431818
44
from typing import Tuple, List from federatedml.util import LOGGER from federatedml.util import consts tree_type_dict = { 'guest_feat_only': 0, # use only guest feature to build this tree 'host_feat_only': 1, # use only host feature to build this tree 'normal_tree': 2, # a normal decision tree 'laye...
[ 6738, 19720, 1330, 309, 29291, 11, 7343, 198, 6738, 28062, 515, 4029, 13, 22602, 1330, 41605, 30373, 198, 6738, 28062, 515, 4029, 13, 22602, 1330, 1500, 82, 198, 198, 21048, 62, 4906, 62, 11600, 796, 1391, 198, 220, 220, 220, 705, 516...
2.46733
704
from .api import compute_MVBS, compute_MVBS_index_binning, remove_noise
[ 6738, 764, 15042, 1330, 24061, 62, 44, 53, 4462, 11, 24061, 62, 44, 53, 4462, 62, 9630, 62, 8800, 768, 11, 4781, 62, 3919, 786, 198 ]
2.769231
26
import torch import numpy as np
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 628, 628, 628 ]
3.363636
11
''' Processor for IIIF ''' import os from requests.exceptions import RequestException from sandhill import app, catch from sandhill.utils.api import api_get, establish_url from sandhill.utils.generic import get_config from sandhill.utils.error_handling import dp_abort @catch(RequestException, "Call to IIIF Server fail...
[ 7061, 6, 198, 18709, 273, 329, 2873, 5064, 198, 7061, 6, 198, 11748, 28686, 198, 6738, 7007, 13, 1069, 11755, 1330, 19390, 16922, 198, 6738, 6450, 12639, 1330, 598, 11, 4929, 198, 6738, 6450, 12639, 13, 26791, 13, 15042, 1330, 40391, ...
2.585366
533
from temboo.Library.SendGrid.WebAPI.FilterCommands.ActivateApp import ActivateApp, ActivateAppInputSet, ActivateAppResultSet, ActivateAppChoreographyExecution from temboo.Library.SendGrid.WebAPI.FilterCommands.DeactivateApp import DeactivateApp, DeactivateAppInputSet, DeactivateAppResultSet, DeactivateAppChoreographyEx...
[ 6738, 2169, 2127, 78, 13, 23377, 13, 25206, 41339, 13, 13908, 17614, 13, 22417, 6935, 1746, 13, 25526, 378, 4677, 1330, 33120, 4677, 11, 33120, 4677, 20560, 7248, 11, 33120, 4677, 23004, 7248, 11, 33120, 4677, 1925, 382, 4867, 23002, 10...
3.778281
221
import inspect import warnings from enum import Enum class BaseMixin: """Base mixin for etna classes.""" def __repr__(self): """Get default representation of etna object.""" # TODO: add tests default behaviour for all registered objects args_str_representation = "" init_args =...
[ 11748, 10104, 198, 11748, 14601, 198, 6738, 33829, 1330, 2039, 388, 628, 198, 4871, 7308, 35608, 259, 25, 198, 220, 220, 220, 37227, 14881, 5022, 259, 329, 2123, 2616, 6097, 526, 15931, 628, 220, 220, 220, 825, 11593, 260, 1050, 834, ...
2.249581
597
from app_base import * from app_misc import * from app_data import * from app_project import * from app_tag import * from app_field import * from app_table import * from app_annotation import * from app_spacy import * from app_glossary import * from app_search import * from app_action import * if __name__ == '__m...
[ 6738, 598, 62, 8692, 1330, 1635, 198, 6738, 598, 62, 44374, 1330, 1635, 198, 6738, 598, 62, 7890, 1330, 1635, 198, 6738, 598, 62, 16302, 1330, 1635, 198, 6738, 598, 62, 12985, 1330, 1635, 198, 6738, 598, 62, 3245, 1330, 1635, 198, 6...
2.020128
2,335
#!/usr/bin/env python # -*- coding: utf-8 -*- """ # Created by Darren Zhao Xie on 05/28/2018 # Blockchain example by python """ from typing import NamedTuple class Transaction(NamedTuple): """Represents an transaction""" sender: str receiver: str amount: float
[ 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, 220, 1303, 15622, 416, 26203, 29436, 48989, 319, 8870, 14, 2078, 14, 7908, 198, 220, 1303, 29724, 1672, 416...
2.947917
96
# Copyright (c) 2017 Ioannes Bracciano # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, d...
[ 2, 15069, 357, 66, 8, 2177, 27853, 1236, 274, 1709, 4134, 10115, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 3...
4.027397
3,577
from setuptools import setup, find_packages with open("README.md") as f: readme = f.read() with open("LICENSE.txt") as f: license = f.read() setup( name="analyse_phylome", version="0.0.1", description="Analyse phylome data", long_description=readme, url="https://github.com/giacomomutti/a...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 4943, 355, 277, 25, 198, 220, 220, 220, 1100, 1326, 796, 277, 13, 961, 3419, 198, 198, 4480, 1280, 7203, 43, 2149, 24290, ...
2.45
220
n1 = int(input('Digite um numero: ')) n2 = int(input('Digite outro numero: ')) s = n1 + n2 # print('A soma entre ', n1, ' e ', n2, ' vale {}!'.format(s)) print('A soma entre {} e {} vale {}'.format(n1, n2, s))
[ 77, 16, 796, 493, 7, 15414, 10786, 19511, 578, 23781, 997, 3529, 25, 705, 4008, 198, 77, 17, 796, 493, 7, 15414, 10786, 19511, 578, 503, 305, 997, 3529, 25, 705, 4008, 198, 82, 796, 299, 16, 1343, 299, 17, 198, 198, 2, 3601, 107...
2.185567
97
from __future__ import unicode_literals import six import re from .validator import Verdict, Validator from .utils import force_text default_user_regex = \ r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*$" \ r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"$)...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 2237, 198, 198, 11748, 302, 198, 198, 6738, 764, 12102, 1352, 1330, 4643, 11600, 11, 48951, 1352, 198, 6738, 764, 26791, 1330, 2700, 62, 5239, 628, 198, 12286, 62, ...
1.959184
294
""" Copyright 2021 Esri Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
[ 37811, 198, 220, 220, 15069, 33448, 8678, 380, 198, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, ...
2.941071
1,120
"""This module is used for command line publishing of image sequences.""" import os import logging import subprocess import platform handler = logging.basicConfig() log = logging.getLogger("Publish Image Sequences") log.setLevel(logging.DEBUG) error_format = "Failed {plugin.__name__}: {error} -- {error.traceback}" ...
[ 37811, 1212, 8265, 318, 973, 329, 3141, 1627, 12407, 286, 2939, 16311, 526, 15931, 198, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 850, 14681, 198, 11748, 3859, 198, 198, 30281, 796, 18931, 13, 35487, 16934, 3419, 198, 6404, 796, ...
3.279279
111
from google.cloud.proto.datastore.v1 import entity_pb2 from google.cloud.proto.datastore.v1 import query_pb2 import googledatastore import apache_beam as beam from datetime import datetime from apache_beam.options.pipeline_options import PipelineOptions from apache_beam.io.gcp.datastore.v1.datastoreio import ReadFromDa...
[ 6738, 23645, 13, 17721, 13, 1676, 1462, 13, 19608, 459, 382, 13, 85, 16, 1330, 9312, 62, 40842, 17, 198, 6738, 23645, 13, 17721, 13, 1676, 1462, 13, 19608, 459, 382, 13, 85, 16, 1330, 12405, 62, 40842, 17, 198, 11748, 467, 519, 99...
2.786744
347
import numpy as np from pennpaper import Metric, plot_group xs = np.arange(0.1, 5, step=0.01) uni_noise = lambda x: np.random.uniform(size=x.shape) + x funcs = {} funcs['uniform'] = lambda x: np.random.uniform(size=x.shape) + x funcs['weibull'] = lambda x: np.random.weibull(a=1, size=x.shape) + x funcs['beta'] = la...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 22429, 20189, 1330, 3395, 1173, 11, 7110, 62, 8094, 198, 198, 34223, 796, 45941, 13, 283, 858, 7, 15, 13, 16, 11, 642, 11, 2239, 28, 15, 13, 486, 8, 198, 198, 35657, 62, 3919, 786, ...
2.301115
269
from setuptools import setup from Cython.Build import cythonize setup( name='libsgio', version='0.0.4', setup_requires=[ 'setuptools>=45.0', 'Cython', ], ext_modules = cythonize('libsgio.pyx') )
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 6738, 327, 7535, 13, 15580, 1330, 3075, 400, 261, 1096, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 8019, 82, 27769, 3256, 198, 220, 220, 220, 2196, 11639, 15, 13, 15, 13, 19, 3256,...
2.12844
109
# python3 # coding=utf-8 # Copyright 2020 Google LLC. # # 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 ...
[ 2, 21015, 18, 198, 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 12131, 3012, 11419, 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, 2...
2.662813
519
#!/usr/bin/env python3 """Re-arrange tree so that the two basal clades are in increasing and decreasing node order, respectively. If the input tree is already midpoint- rooted, the output tree will shape like a triangle. Usage: trianglize_tree.py input.nwk > output.nwk """ import sys import fileinput from skbio i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 3041, 12, 3258, 858, 5509, 523, 326, 262, 734, 41202, 537, 2367, 389, 287, 3649, 290, 198, 12501, 260, 2313, 10139, 1502, 11, 8148, 13, 1002, 262, 5128, 5509, 318, 1541, 3...
3.107438
121
from sqlalchemy import create_engine, MetaData from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker # from app.settings import test_db from app.settings import setting # db_url = conf.get('db.url', 'pg_url') # uri = f"postgresql://{test_db['user']}:{test_db['password']}@{test...
[ 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 11, 30277, 6601, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 32446, 283, 876, 1330, 2377, 283, 876, 62, 8692, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 6246, 10297, 198, 2, 422, 598, ...
2.89372
207
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE 蓝鲸基础平台 is licensed under the MIT License. License for BK-BASE 蓝鲸基础平台: ------------------------------------------...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 24893, 1087, 318, 10607, 284, 1104, 262, 1280, 2723, 2055, 416, 1642, 347, 42, 12, 33, 11159, 5525, 241, 251, 165, 110, 116, 161, 253, 118, 163, 94, 222, ...
3.336152
473
import numpy as np import matplotlib.pyplot as plt from scipy.io.wavfile import write import wave file = wave.open('Still.wav') audio = file.readframes(-1) audio = np.frombuffer (audio, dtype=np.int16) #plt.plot(audio) #plt.title("Still") #plt.show() alfa = np.array([1.,0.,0.,0]) audio_modificado = np....
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 6738, 629, 541, 88, 13, 952, 13, 45137, 7753, 1330, 3551, 201, 198, 11748, 6769, 201, 198, 201, 198, 7753, 796, 6769, 13, 96...
2.31441
229
# -*- coding:utf-8 -*- """ @author: Alden @email: sunzhenhy@gmail.com @date: 2018/3/31 @version: 1.0.0.0 """ if __name__ == "__main__": s = Solution() print s.isOneBitCharacter([1, 0, 0]) print s.isOneBitCharacter([1, 1, 1, 0]) print s.isOneBitCharacter([0, 1, 0])
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 9800, 25, 15586, 268, 198, 31, 12888, 25, 4252, 46732, 12114, 31, 14816, 13, 785, 198, 31, 4475, 25, 2864, 14, 18, 14, 3132, 198, 31, 9641, 25, 352, 13,...
2.167939
131
"""Per-prefix data, mapping each prefix to a dict of locale:name. Auto-generated file, do not edit by hand. """ from ..util import u # Copyright (C) 2011-2020 The Libphonenumber Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Licens...
[ 37811, 5990, 12, 40290, 1366, 11, 16855, 1123, 21231, 284, 257, 8633, 286, 36693, 25, 3672, 13, 198, 198, 27722, 12, 27568, 2393, 11, 466, 407, 4370, 416, 1021, 13, 198, 37811, 198, 6738, 11485, 22602, 1330, 334, 198, 198, 2, 15069, ...
1.808679
160,552
from flask import Flask, g, redirect, request from app.core import db, jwt, configure_app from flask_cors import CORS from app.models import * from app.helpers.response import response_error from app.routes import init_routes from datetime import datetime import time import decimal import flask.json import logging, lo...
[ 6738, 42903, 1330, 46947, 11, 308, 11, 18941, 11, 2581, 198, 6738, 598, 13, 7295, 1330, 20613, 11, 474, 46569, 11, 17425, 62, 1324, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 198, 6738, 598, 13, 27530, 1330, 1635, 198, 6738, 5...
2.805455
550
from vedastr.utils import Registry COMPONENT = Registry('component') BODIES = Registry('body')
[ 6738, 410, 276, 459, 81, 13, 26791, 1330, 33432, 198, 198, 9858, 47, 1340, 3525, 796, 33432, 10786, 42895, 11537, 198, 33, 3727, 11015, 796, 33432, 10786, 2618, 11537, 198 ]
3.2
30
#!/usr/bin/env python3 from sqlalchemy_utils import create_database from sqlalchemy_utils import drop_database from bot import settings if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 44161, 282, 26599, 62, 26791, 1330, 2251, 62, 48806, 198, 6738, 44161, 282, 26599, 62, 26791, 1330, 4268, 62, 48806, 198, 198, 6738, 10214, 1330, 6460, 628, 198, 198, 361, 11...
3.122807
57
#!/usr/bin/env python3 import collections, os, sys SOURCE_EXTS = set([".cc", ".c", ".h", ".S"]) sizes = collections.defaultdict(CodeSize) if __name__ == '__main__': main(sys.argv)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 17268, 11, 28686, 11, 25064, 198, 198, 47690, 62, 6369, 4694, 796, 900, 26933, 1911, 535, 1600, 27071, 66, 1600, 27071, 71, 1600, 27071, 50, 8973, 8, 198, 198, 82, 43...
2.473684
76
from mapper import BaseMapper
[ 6738, 285, 11463, 1330, 7308, 44, 11463, 198 ]
3.75
8
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import math from model.GCN import GCN from model.GCN import VGAE from torch.autograd import Variable from torch.distributions.kl import kl_divergence from torch.distributions import Normal class VBGE(nn.Module): """ VBGE...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 10688, 198, 6738, 2746, 13, 15916, 45, 1330, 20145, 45, 198, 6738, 2746, 13, ...
2.212411
419
import sys sys.path.append("../..") import hoi4.load import hoi4.unitstats
[ 11748, 25064, 201, 198, 17597, 13, 6978, 13, 33295, 7203, 40720, 492, 4943, 201, 198, 201, 198, 11748, 8169, 72, 19, 13, 2220, 201, 198, 11748, 8169, 72, 19, 13, 20850, 34242 ]
2.46875
32
"""htcanalyze module."""
[ 37811, 4352, 5171, 3400, 2736, 8265, 526, 15931, 198 ]
2.777778
9
import math as math import matplotlib.pyplot as plt import numpy as np import sys import torchfile from matplotlib.ticker import MaxNLocator if __name__ == '__main__': fileName = sys.argv[1] nExamples = 20 data = torchfile.load(fileName) mean = data[0] stdv = data[1] examples = [] for i in ra...
[ 11748, 10688, 355, 10688, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 25064, 198, 11748, 28034, 7753, 198, 6738, 2603, 29487, 8019, 13, 83, 15799, 1330, 5436, 32572, 420, ...
2.01012
1,087
from enum import Enum class CharEnum(str, Enum): """Enum where members are also (and must be) ints"""
[ 198, 6738, 33829, 1330, 2039, 388, 628, 198, 4871, 3178, 4834, 388, 7, 2536, 11, 2039, 388, 2599, 198, 220, 220, 220, 37227, 4834, 388, 810, 1866, 389, 635, 357, 392, 1276, 307, 8, 493, 82, 37811, 198 ]
2.868421
38
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
[ 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2,...
3.824701
251
import xml.etree.ElementTree as et import json import subprocess import pathlib import os try: from AtmlReader.AtmlTestResults import AtmlTestResults except: from AtmlTestResults import AtmlTestResults if __name__ == "__main__": atml_file_path = r'C:\repos\battery-tester\Cycle Test\Batte...
[ 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 2123, 201, 198, 11748, 33918, 201, 198, 11748, 850, 14681, 201, 198, 11748, 3108, 8019, 201, 198, 11748, 28686, 201, 198, 201, 198, 28311, 25, 201, 198, 220, 220, 220, 422, 1629, 4029...
2.366412
262
from aws_cdk import core, aws_lambda as _lambda, aws_ecr as _ecr import datetime
[ 6738, 3253, 82, 62, 10210, 74, 1330, 4755, 11, 3253, 82, 62, 50033, 355, 4808, 50033, 11, 3253, 82, 62, 721, 81, 355, 4808, 721, 81, 198, 11748, 4818, 8079, 628, 628 ]
2.625
32
#!/usr/bin/env python import os import shutil import sys from setuptools import setup, find_packages VERSION = '0.0.1' long_description = """ Fast CPU/CUDA Scattering implementation CuPy/PyTorch CUDA and NumPy/PyTorch CUDA implementation """ setup_info = dict( # Metadata name='scatwave', version=VERSION...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 25064, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 43717, 796, 705, 15, 13, 15, 13, 16, 6, 198, 198, 651...
2.569659
323
############################################################################## # # Copyright (c) 2003-2018 by The University of Queensland # http://www.uq.edu.au # # Primary Business: Queensland, Australia # Licensed under the Apache License, version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # # Development unt...
[ 198, 29113, 29113, 7804, 4242, 2235, 198, 2, 198, 2, 15069, 357, 66, 8, 5816, 12, 7908, 416, 383, 2059, 286, 21105, 198, 2, 2638, 1378, 2503, 13, 84, 80, 13, 15532, 13, 559, 198, 2, 198, 2, 21087, 7320, 25, 21105, 11, 4505, 198,...
7.13606
6,747
import os import xlwt #by 学波 用于词频统计 workDir = "F:\data3st" os.chdir(workDir) # 路径 # 多文件录入 SaveData()
[ 11748, 28686, 198, 11748, 2124, 75, 46569, 198, 2, 1525, 10263, 255, 99, 37345, 95, 13328, 242, 101, 12859, 236, 46237, 235, 165, 95, 239, 163, 119, 253, 164, 106, 94, 198, 1818, 35277, 796, 366, 37, 7479, 7890, 18, 301, 1, 198, 4...
1.36
75
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/12/19 9:27 # @Author : NingAnMe <ninganme@qq.com> import argparse from dateutil.relativedelta import relativedelta import time from datetime import datetime import os import requests from lib.lib_cimiss import get_cimiss_ssi_ssh_tem_data from config i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 220, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 13130, 14, 1065, 14, 1129, 860, 25, 1983, 198, 2, 2488, 13838, 220, 1058, ...
2.289528
487
import json import requests from flask import current_app, request, Response, Blueprint from auth import authenticateApp # Define blueprint module sendmessage = Blueprint('sendmessage', __name__, url_prefix='/sendmessage') # Expose endpoint for testing the mechanism to send a message to Watson Work Services @sendme...
[ 11748, 33918, 198, 11748, 7007, 198, 198, 6738, 42903, 1330, 1459, 62, 1324, 11, 2581, 11, 18261, 11, 39932, 198, 198, 6738, 6284, 1330, 8323, 5344, 4677, 198, 198, 2, 2896, 500, 30881, 8265, 198, 21280, 20500, 796, 39932, 10786, 21280,...
4.314286
140
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021 # by the softwar...
[ 29113, 29113, 14468, 2, 198, 2, 383, 5136, 329, 262, 8495, 286, 13435, 6682, 11998, 35432, 19193, 198, 2, 25161, 357, 41957, 1546, 6101, 8, 373, 4635, 739, 262, 46984, 5136, 329, 262, 198, 2, 8495, 286, 13435, 6682, 11998, 357, 41957,...
3.13799
1,174
from re import findall from json import loads import os from termcolor import colored # class user: # def __init__(self): # pass # username='Public@Krait: ' # paths='//home/cress/Lucy/bin://home/cress/Lucy/applications' # #takes: # #username # #returns: # #use...
[ 6738, 302, 1330, 1064, 439, 198, 6738, 33918, 1330, 15989, 198, 11748, 28686, 198, 6738, 3381, 8043, 1330, 16396, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197...
2.313027
1,067
''' Run this to get html files This file contains code to obtain html data from oslo bors and yahoo finance ''' import argparse import re import threading import time from pprint import pprint from typing import List import sys import pathlib import os import numpy as np import pandas as pd import pypatconsole as ppc...
[ 7061, 6, 198, 10987, 428, 284, 651, 27711, 3696, 198, 198, 1212, 2393, 4909, 2438, 284, 7330, 27711, 1366, 422, 28686, 5439, 275, 669, 290, 331, 12992, 9604, 198, 7061, 6, 198, 11748, 1822, 29572, 198, 11748, 302, 198, 11748, 4704, 27...
2.204941
4,938
from SQLActivitySample import SQLActivitySample from Utilities import check_working_directory import argparse if __name__ == '__main__': check_working_directory() parser = argparse.ArgumentParser(description='Teardown for SQLAcivityPipeline pipeline sample') parser.add_argument('--rds-instance-id', acti...
[ 6738, 16363, 16516, 36674, 1330, 16363, 16516, 36674, 198, 6738, 41086, 1330, 2198, 62, 16090, 62, 34945, 198, 198, 11748, 1822, 29572, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 2198, 62, 16...
3.065868
167
import torch from models.vgg import VGG from models.resnet import resnet from models.wide import wide_resnet def stablize_bn(net, trainloader, device='cuda'): """Iterate over the dataset for stabilizing the BatchNorm statistics. """ net = net.train() for batch, (inputs, _) in enumerate(trainloade...
[ 11748, 28034, 198, 6738, 4981, 13, 85, 1130, 1330, 569, 11190, 198, 6738, 4981, 13, 411, 3262, 1330, 581, 3262, 198, 6738, 4981, 13, 4421, 1330, 3094, 62, 411, 3262, 628, 198, 198, 4299, 8303, 75, 1096, 62, 9374, 7, 3262, 11, 4512, ...
2.73913
138
import json import logging import eel from rf2settings.app_settings import AppSettings from rf2settings.rf2command import CommandQueue, Command from rf2settings.rf2connect import RfactorState @eel.expose @eel.expose
[ 11748, 33918, 198, 11748, 18931, 198, 198, 11748, 304, 417, 198, 198, 6738, 374, 69, 17, 33692, 13, 1324, 62, 33692, 1330, 2034, 26232, 198, 6738, 374, 69, 17, 33692, 13, 41871, 17, 21812, 1330, 9455, 34991, 11, 9455, 198, 6738, 374, ...
3.140845
71
from django.apps import AppConfig as BaseConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 355, 7308, 16934, 628 ]
4.083333
12
# coding: utf-8 from sqlalchemy import Boolean, Column, DateTime, Float, String from sqlalchemy.dialects.postgresql.base import UUID from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy()
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 44161, 282, 26599, 1330, 41146, 11, 29201, 11, 7536, 7575, 11, 48436, 11, 10903, 198, 6738, 44161, 282, 26599, 13, 38969, 478, 82, 13, 7353, 34239, 13976, 13, 8692, 1330, 471, 27586, 198, 6...
3.180328
61
from .pycaffe import SolverParameter, NetParameter, NetState, Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer from ._caffe import init_log, log, set_mode_cpu, set_mode_gpu, set_device, Layer, set_devices, select_device, enumerate_devices, Layer, get_solver, get_solv...
[ 6738, 764, 9078, 66, 21223, 1330, 4294, 332, 36301, 11, 3433, 36301, 11, 3433, 9012, 11, 3433, 11, 26147, 5258, 14375, 11, 399, 7834, 709, 50, 14375, 11, 47395, 42731, 50, 14375, 11, 29820, 4303, 1773, 50, 14375, 11, 47395, 42430, 50,...
2.970954
241
#!/usr/bin/env python # -*- coding: utf-8 -*- from bson.objectid import ObjectId from pymongo import MongoClient from validate_email import validate_email from views.base import base import config import hashlib
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 275, 1559, 13, 15252, 312, 1330, 9515, 7390, 198, 6738, 279, 4948, 25162, 1330, 42591, 11792, 198, 6738, 26571, 6...
3.126761
71
#!/usr/bin/env python # -*- coding: utf-8 -*- """Send input commands to the BTree test app. ins X rem X (etc) """ import random random.seed() # Simple rotations # Double rotations # Simple rotations with weights # Double rotations with weights if __name__ == '__main__': main1() # end.
[ 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, 25206, 5128, 9729, 284, 262, 22205, 631, 1332, 598, 13, 198, 198, 1040, 1395, 198, 2787, 1395, 198, 7, 14...
2.759259
108
from tree import Tree; from tree import deb import datetime from fileDB import FileDB import random; # A collection of tasks # Instances of this class should be able to add a task # to the collection, delete it, update it and provide a list or a subset of # collection for display # create a tree obj based on the in...
[ 6738, 5509, 1330, 12200, 26, 220, 198, 6738, 5509, 1330, 1915, 198, 11748, 4818, 8079, 198, 6738, 2393, 11012, 1330, 9220, 11012, 198, 11748, 4738, 26, 198, 198, 2, 317, 4947, 286, 8861, 220, 198, 2, 2262, 1817, 286, 428, 1398, 815, ...
3.058252
309
from resolwe.process import * class PythonProcessJson(Process): """This is a process description.""" slug = 'test-python-process-json' name = "Python Process that uses JSON field" process_type = 'data:python' version = '0.1.2' requirements = { 'executor': { 'docker': { ...
[ 6738, 581, 349, 732, 13, 14681, 1330, 1635, 628, 198, 4871, 11361, 18709, 41, 1559, 7, 18709, 2599, 198, 220, 220, 220, 37227, 1212, 318, 257, 1429, 6764, 526, 15931, 198, 220, 220, 220, 31065, 796, 705, 9288, 12, 29412, 12, 14681, ...
2.361111
252
# Copyright 2015 IBM Corp. 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
[ 2, 15069, 1853, 19764, 11421, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
2.365072
2,279
import dbus import time import subprocess bus = dbus.SessionBus() dest = 'org.ffado.Control' mixer_object = '/org/ffado/Control/DeviceManager/001486089d5fa7e6/Mixer' discrete_interface='org.ffado.Control.Element.Discrete' continuous_interface='org.ffado.Control.Element.Continuous' mixer_interface='org.ffado.Control.El...
[ 11748, 288, 10885, 198, 11748, 640, 198, 11748, 850, 14681, 198, 198, 10885, 796, 288, 10885, 13, 36044, 16286, 3419, 198, 16520, 796, 705, 2398, 13, 487, 4533, 13, 15988, 6, 198, 19816, 263, 62, 15252, 796, 31051, 2398, 14, 487, 4533...
2.431727
498
#!venv/bin/python import re import os import sys SUBS = [ ('AsyncIteratorByteStream', 'IteratorByteStream'), ('AsyncIterator', 'Iterator'), ('AutoBackend', 'SyncBackend'), ('Async([A-Z][A-Za-z0-9_]*)', r'Sync\2'), ('async def', 'def'), ('async with', 'with'), ('async for', 'for'), ('awa...
[ 2, 0, 574, 85, 14, 8800, 14, 29412, 198, 11748, 302, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 12564, 4462, 796, 685, 198, 220, 220, 220, 19203, 42367, 37787, 40778, 12124, 3256, 705, 37787, 40778, 12124, 33809, 198, 220, 220, 2...
2.193396
424
# Copyright 2021 The TensorFlow 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 applica...
[ 2, 15069, 33448, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 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,...
2.529943
4,208
import numpy as np from ar_track_alvar_msgs.msg import AlvarMarkers from std_msgs.msg import Float64MultiArray,Float64 import rospy import math import kinematics as kin import ArmController as ac import transforms3d as tf # def get_point(self,tag): # try: # rospy.loginfo(len(tag.markers)) #...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 610, 62, 11659, 62, 282, 7785, 62, 907, 14542, 13, 19662, 1330, 978, 7785, 9704, 364, 198, 6738, 14367, 62, 907, 14542, 13, 19662, 1330, 48436, 2414, 29800, 19182, 11, 43879, 2414, 198, 11748, ...
1.949945
1,818
from greentastic.compute_scores import compute_score
[ 6738, 10536, 298, 3477, 13, 5589, 1133, 62, 1416, 2850, 1330, 24061, 62, 26675, 198 ]
3.533333
15
from torchvision.datasets.utils import download_url, check_integrity import torch.utils.data as data from PIL import Image import os from glob import glob import os.path import errno import numpy as np import sys if sys.version_info[0] == 2: import pickle as pickle else: import pickle
[ 198, 6738, 28034, 10178, 13, 19608, 292, 1039, 13, 26791, 1330, 4321, 62, 6371, 11, 2198, 62, 18908, 10138, 198, 11748, 28034, 13, 26791, 13, 7890, 355, 1366, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 28686, 198, 6738, 15095, 1330, ...
3.148936
94
import copy from typing import Optional, Sequence import numpy as np import torch from torch.optim import Optimizer from ...gpu import Device from ...models.builders import create_discrete_q_function from ...models.encoders import EncoderFactory from ...models.optimizers import OptimizerFactory from ...models.q_funct...
[ 11748, 4866, 198, 6738, 19720, 1330, 32233, 11, 45835, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 28034, 13, 40085, 1330, 30011, 7509, 198, 198, 6738, 2644, 46999, 1330, 16232, 198, 6738, 2644, 27530, 13, 50034...
3.846626
163
<caret>if await get_value(): print("Not none") else: print("None")
[ 198, 27, 6651, 83, 29, 361, 25507, 651, 62, 8367, 33529, 198, 220, 220, 220, 3601, 7203, 3673, 4844, 4943, 198, 17772, 25, 198, 220, 220, 220, 3601, 7203, 14202, 4943 ]
2.419355
31
username = 'Tyler85' password = 'surfing29' userInput = input("What is your username?\n (Hint: Tyler85):") if userInput == username: a=input("Password?\n (Hint: surfing29)") if a == password: print("Welcome Tyler!") else: print("Wrong password.") else: print("Wrong username.")
[ 29460, 796, 705, 46807, 5332, 6, 198, 198, 28712, 796, 705, 11793, 28825, 1959, 6, 198, 198, 7220, 20560, 796, 5128, 7203, 2061, 318, 534, 20579, 30, 59, 77, 357, 39, 600, 25, 14886, 5332, 2599, 4943, 198, 198, 361, 2836, 20560, 662...
2.540323
124
# Copyright 2018 Iguazio # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwa...
[ 2, 15069, 2864, 314, 5162, 1031, 952, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, ...
3.015571
578
import inspect from concurrent.futures import ThreadPoolExecutor from functools import wraps from asgiref.sync import sync_to_async as _sync_to_async thread_pool = ThreadPoolExecutor() # Async generator wrapper from https://github.com/django/asgiref/issues/142 iter_async = sync_to_async(iter, thread_sensitive=F...
[ 11748, 10104, 198, 6738, 24580, 13, 69, 315, 942, 1330, 14122, 27201, 23002, 38409, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 198, 6738, 355, 70, 557, 69, 13, 27261, 1330, 17510, 62, 1462, 62, 292, 13361, 355, 4808, 27261, 62, 14...
3.023438
128
"""A setuptools based setup module. See: https://packaging.python.org/guides/distributing-packages-using-setuptools/ https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages import pathlib here = pathlib.Path(__file__).parent.resolve() # Get the ...
[ 37811, 32, 900, 37623, 10141, 1912, 9058, 8265, 13, 198, 6214, 25, 198, 5450, 1378, 8002, 3039, 13, 29412, 13, 2398, 14, 5162, 1460, 14, 17080, 2455, 278, 12, 43789, 12, 3500, 12, 2617, 37623, 10141, 14, 198, 5450, 1378, 12567, 13, ...
2.849379
644
#!/usr/bin/python3 #MAILCHIMPAPIAUDIENCES = { # "audience_name" : "ENTER AUDIENCE NAME", # "company" : "ENTER COMPANY NAME", # "address1" : "ENTER ADDRESS", # "city" : "ENTER CITY", # "state" : "ENTER STATE", # EX: Western Province # "zip_code" : "00300", # "country" : "ENTER COUNTRY", # EX: LK ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 628, 198, 2, 5673, 4146, 3398, 3955, 47, 2969, 3539, 8322, 40, 24181, 1546, 796, 1391, 198, 2, 220, 220, 220, 366, 3885, 1240, 62, 3672, 1, 1058, 366, 3525, 1137, 41260, 42589, 36751, 1600, ...
2.889324
1,021
from django.conf import settings from django.core.cache import cache from djimix.core.database import get_connection, xsql from djimix.sql.departments import ( ACADEMIC_DEPARTMENTS, ALL_DEPARTMENTS, DEPARTMENT_FACULTY, DEPARTMENT_DIVISION_CHAIRS, FACULTY_DEPTS, PERSON_DEPARTMENTS, STAFF_DEPTS, ) from colle...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 23870, 1330, 12940, 198, 198, 6738, 42625, 320, 844, 13, 7295, 13, 48806, 1330, 651, 62, 38659, 11, 2124, 25410, 198, 6738, 42625, 320, 844, 13, 25410, ...
2.136085
1,793
from django.db.models import Q, ExpressionWrapper, F, BooleanField from django.http import JsonResponse from rest_framework import status from rest_framework.decorators import api_view, permission_classes from rest_framework.permissions import AllowAny from rest_framework.serializers import ModelSerializer from rest_f...
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 11, 41986, 36918, 2848, 11, 376, 11, 41146, 15878, 198, 198, 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, ...
3.342105
228
"""Tests for module secread""" import os import pytest from secread import __version__, SecretServer @pytest.fixture
[ 37811, 51, 3558, 329, 8265, 792, 961, 37811, 198, 11748, 28686, 198, 11748, 12972, 9288, 198, 6738, 792, 961, 1330, 11593, 9641, 834, 11, 3943, 10697, 628, 198, 198, 31, 9078, 9288, 13, 69, 9602, 628, 628, 198 ]
3.263158
38
from fastapi import APIRouter from starlette.responses import RedirectResponse router = APIRouter() @router.get('/', summary='Redirect home page to docs', include_in_schema=False)
[ 6738, 3049, 15042, 1330, 3486, 4663, 39605, 198, 6738, 3491, 21348, 13, 16733, 274, 1330, 2297, 1060, 31077, 198, 198, 472, 353, 796, 3486, 4663, 39605, 3419, 628, 198, 31, 472, 353, 13, 1136, 10786, 14, 3256, 10638, 11639, 7738, 1060, ...
3.267857
56
# Copyright (c) 2021 Stephan Gerhold # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and ...
[ 2, 15069, 357, 66, 8, 33448, 20800, 13573, 2946, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, 2810, 326, 262, 1708, 3403,...
3.562637
455
''' Surrounds a panel with lines and a label. Use like a wxPanel, specify label in the constructor. >>> f = wx.Frame(None) >>> box = LineBox(f, label = 'My Controls') >>> button = wx.Button(box, -1, 'Push') ''' import wx, gui if __name__ == '__main__': app = wx.PySimpleApp() f = wx.Frame(None, -1, 'Lin...
[ 7061, 6, 198, 14214, 744, 82, 257, 6103, 351, 3951, 290, 257, 6167, 13, 198, 198, 11041, 588, 257, 266, 87, 26639, 11, 11986, 6167, 287, 262, 23772, 13, 198, 198, 33409, 277, 796, 266, 87, 13, 19778, 7, 14202, 8, 198, 33409, 3091,...
2.192771
332
# Copyright 2018-2019 David Corbett # Copyright 2020-2021 Google LLC # # 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 ...
[ 2, 15069, 2864, 12, 23344, 3271, 2744, 48138, 198, 2, 15069, 12131, 12, 1238, 2481, 3012, 11419, 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, ...
2.569794
437
from collections import defaultdict import logging import random import time import unittest from rd_kafka import * import rd_kafka.config_handles from rd_kafka.partition_reader import PartitionReaderException, ConsumerPartition import example kafka_docker = "kafka:9092" # TODO make portable (see fig.yml etc) loggin...
[ 6738, 17268, 1330, 4277, 11600, 198, 11748, 18931, 198, 11748, 4738, 198, 11748, 640, 198, 11748, 555, 715, 395, 198, 198, 6738, 374, 67, 62, 74, 1878, 4914, 1330, 1635, 198, 11748, 374, 67, 62, 74, 1878, 4914, 13, 11250, 62, 4993, ...
3.063415
205
# -*- coding: utf-8 -*- import copy lcs = {}
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 4866, 628, 198, 75, 6359, 796, 23884, 628, 628, 628 ]
2.08
25
#!/usr/bin/env python # -*- coding: utf-8 -*- #version 1.1 此版本使用pyfasta实现。 import sys,os from pyfasta import Fasta if len(sys.argv) != 3: print 'Usage: *.py inputFile outputFile' sys.exit(0) inputFile = sys.argv[1] outputFile = sys.argv[2] if os.path.isfile(inputFile): f = Fasta(inputFile) for key in f.keys(): ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 9641, 352, 13, 16, 10545, 255, 97, 48304, 17312, 105, 45635, 18796, 101, 9078, 7217, 64, 22522, 252, 163, 236...
2.095618
251
import pytest from plenum.test.helper import send_reqs_batches_and_get_suff_replies from plenum.test.node_catchup.helper import ensure_all_nodes_have_same_data from plenum.test.pool_transactions.helper import add_2_nodes from plenum.test.primary_selection.helper import check_newly_added_nodes # TODO: replace this fu...
[ 11748, 12972, 9288, 198, 198, 6738, 458, 44709, 13, 9288, 13, 2978, 525, 1330, 3758, 62, 42180, 82, 62, 8664, 2052, 62, 392, 62, 1136, 62, 37333, 62, 35666, 444, 198, 6738, 458, 44709, 13, 9288, 13, 17440, 62, 40198, 929, 13, 2978, ...
3.10241
166
import os.path as path import random import copy import numpy as np from chainer import Variable, optimizers, serializers, Chain import chainer.functions as F import chainer.links as L import chainer.computational_graph as c import matplotlib.pyplot as plt class DeepQ_learning(): """ turn (rqeuired parameter)...
[ 11748, 28686, 13, 6978, 355, 3108, 198, 11748, 4738, 198, 11748, 4866, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 6333, 263, 1330, 35748, 11, 6436, 11341, 11, 11389, 11341, 11, 21853, 198, 11748, 6333, 263, 13, 12543, 2733, 355, 376...
2.218728
1,431
import logging from types import SimpleNamespace from torch.utils.data import DataLoader from torch.utils.data import Subset from torch.utils.data.distributed import DistributedSampler from dataset.webnlg_dataset import WebNLGDataset from dataset.tekgen_dataset import TekGenDataset import cfg logger = logging.getLog...
[ 11748, 18931, 198, 6738, 3858, 1330, 17427, 36690, 10223, 198, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 3834, 2617, 198, 6738, 28034, 13, 26791, 13, 7890, 13, 17080, 6169, 13...
2.323951
1,883
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
[ 2, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, ...
3.233779
1,048
#!/usr/bin/env python3 import os drive = find_backup_drive() backup_dir = f'/Volumes/{drive}/home' print(f'Backing up to {backup_dir}...') dirs = ['books', 'code', 'Compositions', 'Documents', 'dotfiles', 'Movies', 'Music', 'Pictures', 'thoughts'] if not os.path.exists(backup_dir): print(f"Please create directo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 198, 19472, 796, 1064, 62, 1891, 929, 62, 19472, 3419, 198, 1891, 929, 62, 15908, 796, 277, 26488, 16598, 8139, 14, 90, 19472, 92, 14, 11195, 6, 198, 4798...
2.394022
368
# -*- coding: utf-8 -*- __author__ = "Lukas Pfeifenberger" import time import numpy as np import argparse import json import os import sys os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' sys.path.append(os.path.abspath('../')) from keras.models import Sequential, Model from keras.layers import Layer, Dense, Activation, LSTM...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 834, 9800, 834, 796, 366, 43, 2724, 292, 350, 5036, 361, 268, 21041, 1, 628, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1822, 29572, 198, 11748, ...
3.274256
773