content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
from sklearn.metrics import f1_score
import torch
from cogdl.utils import build_args_from_dict
from cogdl.utils import accuracy, multiclass_f1, multilabel_f1, bce_with_logits_loss, cross_entropy_loss
if __name__ == "__main__":
test_build_args_from_dict()
| [
6738,
1341,
35720,
13,
4164,
10466,
1330,
277,
16,
62,
26675,
198,
11748,
28034,
198,
6738,
43072,
25404,
13,
26791,
1330,
1382,
62,
22046,
62,
6738,
62,
11600,
198,
6738,
43072,
25404,
13,
26791,
1330,
9922,
11,
47368,
31172,
62,
69,
... | 2.797872 | 94 |
# -*- coding: utf-8 -*-
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from analogistics.statistics import time_series as ts
from analogistics.supply_chain.information_framework import movementfunctionfromInventory
from analogistics.explore import paretoDataframe
def calculatePopularity(movem... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
6738,
15075,
3969,
13,
14269... | 2.352081 | 4,036 |
from gazette.spiders.base.fecam import FecamGazetteSpider
| [
6738,
308,
1031,
5857,
13,
2777,
4157,
13,
8692,
13,
69,
721,
321,
1330,
376,
721,
321,
38,
1031,
5857,
41294,
628
] | 2.681818 | 22 |
import math
import pandas as pd
from causallearn.utils.ScoreUtils import *
def local_score_BIC(Data, i, PAi, parameters=None):
'''
Calculate the *negative* local score with BIC for the linear Gaussian continue data case
Parameters
----------
Data: ndarray, (sample, features)
i: current inde... | [
11748,
10688,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
6738,
26846,
6765,
1501,
13,
26791,
13,
26595,
18274,
4487,
1330,
1635,
628,
198,
4299,
1957,
62,
26675,
62,
33,
2149,
7,
6601,
11,
1312,
11,
8147,
72,
11,
10007,
28... | 1.754226 | 14,493 |
import sys
import os
# make sure this is a system variable in your bashrc
NASA_ULI_ROOT_DIR = os.environ['NASA_ULI_ROOT_DIR']
XPC3_DIR = NASA_ULI_ROOT_DIR + '/src/'
sys.path.append(XPC3_DIR)
import numpy as np
import xpc3
import xpc3_helper
import time
import os
import mss
import cv2
import settings
screenShot = m... | [
11748,
25064,
198,
11748,
28686,
198,
198,
2,
787,
1654,
428,
318,
257,
1080,
7885,
287,
534,
27334,
6015,
198,
29998,
62,
6239,
40,
62,
13252,
2394,
62,
34720,
796,
28686,
13,
268,
2268,
17816,
29998,
62,
6239,
40,
62,
13252,
2394,
... | 2.19099 | 2,131 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from rsamsg import *
#alice and bob
#alice_pubkey, alice_privkey=gen()
#bob_pubkey, bob_privkey=gen()
alice_pubkey = loadfile("keys/alice_pubkey")
alice_prikey = loadfile("keys/alice_prikey")
bob_pubkey = loadfile("keys/bob_pubkey")
bob_prikey = loadfile("keys/bob_prikey"... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
44608,
4105,
70,
1330,
1635,
198,
2,
282,
501,
290,
29202,
628,
628,
198,
2,
282,
501,
62,
12984,
2539,
11,
435,... | 2.200758 | 264 |
"""Defines the class for a node health check task"""
from __future__ import unicode_literals
import datetime
from django.conf import settings
from job.tasks.base_task import AtomicCounter
from job.tasks.node_task import NodeTask
from node.resources.node_resources import NodeResources
from node.resources.resource imp... | [
37811,
7469,
1127,
262,
1398,
329,
257,
10139,
1535,
2198,
4876,
37811,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
11748,
4818,
8079,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
198,
6738,
1... | 2.458027 | 1,358 |
#!/usr/bin/env python
try:
from components import resistor
from components import capacitor
from components import voltage
from components import tolerance
except:
from bommerge.components import resistor
from bommerge.components import capacitor
from bommerge.components import voltage
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
28311,
25,
198,
220,
220,
220,
422,
6805,
1330,
45032,
198,
220,
220,
220,
422,
6805,
1330,
43212,
198,
220,
220,
220,
422,
6805,
1330,
15004,
198,
220,
220,
220,
422,
6805,
133... | 3.301435 | 209 |
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
import math
import numpy as np
im... | [
2,
15069,
357,
66,
8,
2177,
12,
25579,
11,
3203,
11,
3457,
13,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
770,
2723,
2438,
318,
11971,
739,
262,
5964,
1043,
287,
262,
38559,
24290,
2393,
287,
198,
2,
262,
6808,
8619,
286,
42... | 2.927602 | 442 |
#!/usr/bin/python3
import os
from brownie import VRF_Pizza, VRF_Pizza_RNG, accounts, network, config, interface
STATIC_SEED = 123
| [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
11748,
28686,
198,
6738,
7586,
494,
1330,
6453,
37,
62,
47,
9990,
11,
6453,
37,
62,
47,
9990,
62,
49,
10503,
11,
5504,
11,
3127,
11,
4566,
11,
7071,
198,
198,
35744,
2149,
62,
5188,
... | 2.75 | 48 |
"""Math utilities."""
import numpy as np
from numba import njit
rel_tol = 1e-10
abs_tol = 0.
def is_close(a, b, rel_tol=rel_tol, abs_tol=abs_tol):
"""Tell whether two values are approximately equal."""
if np.isnan(a) or np.isnan(b):
return False
if np.isinf(a) or np.isinf(b):
return Fals... | [
37811,
37372,
20081,
526,
15931,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
997,
7012,
1330,
299,
45051,
198,
198,
2411,
62,
83,
349,
796,
352,
68,
12,
940,
198,
8937,
62,
83,
349,
796,
657,
13,
628,
198,
4299,
318,
62,
1... | 2.147059 | 680 |
"""This module contains `docker image rm` class"""
from docker.errors import APIError
from .command import Command
class Rm(Command):
"""This class implements `docker image rm` command"""
name = "image rm"
require = []
| [
37811,
1212,
8265,
4909,
4600,
45986,
2939,
42721,
63,
1398,
37811,
198,
198,
6738,
36253,
13,
48277,
1330,
7824,
12331,
198,
198,
6738,
764,
21812,
1330,
9455,
628,
198,
4871,
371,
76,
7,
21575,
2599,
198,
220,
220,
220,
37227,
1212,
... | 3.470588 | 68 |
# -*- coding: utf-8 -*-
"""Project and solution file reader classes."""
import abc
import re
from vstools import resources
class FileReader(object):
"""File reader."""
def __init__(self, encoding='utf-8'):
"""Initializes a file reader.
Args:
encoding (str): encoding.
"""
super(FileReader... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
16775,
290,
4610,
2393,
9173,
6097,
526,
15931,
198,
198,
11748,
450,
66,
198,
11748,
302,
198,
198,
6738,
410,
301,
10141,
1330,
4133,
628,
198,
4871,
9220,
3363... | 2.591374 | 8,509 |
from __future__ import unicode_literals
from subprocess import PIPE, Popen as popen
from unittest import TestCase
import responses
from packaging.utils import canonicalize_name
from pip_upgrader import __version__ as VERSION
from pip_upgrader import cli
from pip_upgrader.packages_status_detector import PackagesStat... | [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
850,
14681,
1330,
350,
4061,
36,
11,
8099,
268,
355,
1461,
268,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
11748,
9109,
198,
6738,
16846,
13,
2679... | 3.140909 | 220 |
#! /usr/bin/env python
import sys
speeds = dict()
# counts = dict()
# need this for extension
for line in sys.stdin:
try:
line = line.strip()
station, speed = line.split('\t')
speed = float(speed)
# Add code here to use the data
if station in speeds:
if speeds[station] < spee... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
25064,
198,
198,
4125,
5379,
796,
8633,
3419,
628,
198,
2,
9853,
796,
8633,
3419,
198,
2,
761,
428,
329,
7552,
198,
198,
1640,
1627,
287,
25064,
13,
19282,
259,
25,
198,
2... | 2.419913 | 231 |
#! /usr/bin/env python
import os
import h5py
import random
import time
import copy
import numpy as np
from tqdm import tqdm
from collections import OrderedDict, defaultdict
import torch
import torch.nn as nn
from torch.utils.data import Dataset, IterableDataset
from habitat import logger
from habitat.utils.geometry_... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
28686,
198,
11748,
289,
20,
9078,
198,
11748,
4738,
198,
11748,
640,
198,
11748,
4866,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020... | 2.083876 | 2,456 |
import os
| [
11748,
28686,
198
] | 3.333333 | 3 |
op = {
'plus': lambda x, y: x + y,
'minus': lambda x, y: x - y,
'multiplied': lambda x, y: x * y,
'divided': lambda x, y: x / y,
}
| [
404,
796,
1391,
201,
198,
220,
220,
220,
705,
9541,
10354,
37456,
2124,
11,
331,
25,
2124,
1343,
331,
11,
201,
198,
220,
220,
220,
705,
40191,
10354,
37456,
2124,
11,
331,
25,
2124,
532,
331,
11,
201,
198,
220,
220,
220,
705,
4794... | 1.9375 | 80 |
import numpy as np
import torch
from torch.utils.data import Dataset
| [
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
16092,
292,
316,
628
] | 3.5 | 20 |
TASK_URL = "http://code-lock.ctf.sicamp.ru"
TITLE = "Кодовый замок"
STATEMENT_TEMPLATE = f'''
"Безопасность превыше всего" - сказал ваш приятель и поставил на входную дверь кодовый замок. Но теперь вам срочно нужно попасть к нему домой, а кода вы не знаете. Что же делать?
[{TASK_URL}/{{0}}]({TASK_URL}/{{0}})
'''
... | [
51,
1921,
42,
62,
21886,
796,
366,
4023,
1378,
8189,
12,
5354,
13,
310,
69,
13,
21383,
696,
13,
622,
1,
201,
198,
49560,
2538,
796,
366,
140,
248,
25443,
112,
25443,
110,
45035,
140,
117,
12466,
115,
16142,
43108,
25443,
118,
1,
2... | 1.403655 | 2,517 |
c.IPEngineApp.wait_for_url_file = 30
c.RegistrationFactory.ip = '*'
| [
66,
13,
4061,
13798,
4677,
13,
17077,
62,
1640,
62,
6371,
62,
7753,
796,
1542,
198,
66,
13,
47133,
22810,
13,
541,
796,
705,
9,
6,
628
] | 2.555556 | 27 |
# Copyright 2019 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | [
2,
15069,
13130,
383,
5565,
4946,
8090,
4935,
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.390398 | 2,687 |
# vi: set shiftwidth=4 tabstop=4 expandtab:
import datetime
import re
rules_re = re.compile(r"(?P<min>\d+)-(?P<max>\d+)")
if __name__ == "__main__":
begin = datetime.datetime.now()
run_tests()
get_solutions()
end = datetime.datetime.now()
print(end - begin)
| [
2,
25357,
25,
900,
6482,
10394,
28,
19,
7400,
11338,
28,
19,
4292,
8658,
25,
198,
11748,
4818,
8079,
198,
11748,
302,
198,
198,
38785,
62,
260,
796,
302,
13,
5589,
576,
7,
81,
18109,
30,
47,
27,
1084,
29,
59,
67,
10,
13219,
7,
... | 2.291339 | 127 |
#!/usr/bin/python3
from brownie import Pokemon, accounts, network, config
from scripts.helpful_scripts import fund
import asyncio
import json
| [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
6738,
7586,
494,
1330,
14878,
11,
5504,
11,
3127,
11,
4566,
198,
6738,
14750,
13,
16794,
913,
62,
46521,
1330,
1814,
198,
11748,
30351,
952,
198,
11748,
33918,
628
] | 3.763158 | 38 |
from tensorflow.keras import backend as K
from tensorflow.keras import initializers
from tensorflow.keras.layers import (Activation, BatchNormalization, Conv2D,
Dense, DepthwiseConv2D, Dropout, Flatten,
PReLU)
from tensorflow.keras.regularizers ... | [
198,
6738,
11192,
273,
11125,
13,
6122,
292,
1330,
30203,
355,
509,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
1330,
4238,
11341,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
13,
75,
6962,
1330,
357,
25526,
341,
11,
347,
963,
26447,... | 2.101266 | 158 |
from .__head__ import *
class BaseDataset(torch.utils.data.Dataset):
"""
Base Dataset class to be passed to torch Dataloader so train functions can be unified.
Not particularly designed for end-user, but for pre-training models.
"""
def __len__(self):
"Total number of samples"
ret... | [
6738,
764,
834,
2256,
834,
1330,
1635,
628,
198,
4871,
7308,
27354,
292,
316,
7,
13165,
354,
13,
26791,
13,
7890,
13,
27354,
292,
316,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
7308,
16092,
292,
316,
1398,
284,
307,
3804,... | 2.338109 | 349 |
import tempsensor
import time
import btnlib as btn
import ledlib as led
red = 80
orange = 75
yellow = 70
green = 65
blue = 60
purple = 55
while btn.isOn(btn.switch): #while the switch is on:
led.turn_on(led.white)
temp = tempsensor.tempF() #get the temp
print temp
if temp > red :
led.turn_on_all()
elif temp > ... | [
11748,
2169,
862,
22854,
198,
11748,
640,
198,
11748,
275,
34106,
8019,
355,
275,
34106,
198,
11748,
2957,
8019,
355,
2957,
198,
198,
445,
796,
4019,
198,
43745,
796,
5441,
198,
36022,
796,
4317,
198,
14809,
796,
6135,
198,
17585,
796,
... | 2.110932 | 622 |
import simulator
import numpy as np
'''
TODO Support CNN in the Hardware Evaluation
'''
weights_dir = "./data/mnist-lenet.npz"
image_dir = "./data/dataset/mnist/test.npy"
batch_size = 10 # The number of input picture
weights = np.load(weights_dir)['arr_0'].item()
data = np.load(image_dir)[:batch_size]
... | [
11748,
35375,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
201,
198,
7061,
6,
201,
198,
201,
198,
51,
3727,
46,
7929,
8100,
287,
262,
28715,
34959,
220,
201,
198,
7061,
6,
201,
198,
201,
198,
43775,
62,
15908,
796,
366,
19571,... | 2.467577 | 293 |
#import config
import os
from tweepy import OAuthHandler, Stream
from tweepy.streaming import StreamListener
import json
import logging
import pymongo
import time
client = pymongo.MongoClient("mongodb")
db = client.tweets
time.sleep(10)
api_key = os.getenv('TWITTER_CONSUMER_API_KEY')
api_secret = os.getenv('TWITTER_... | [
2,
11748,
4566,
198,
11748,
28686,
198,
6738,
4184,
538,
88,
1330,
440,
30515,
25060,
11,
13860,
198,
6738,
4184,
538,
88,
13,
5532,
278,
1330,
13860,
33252,
198,
11748,
33918,
198,
11748,
18931,
198,
11748,
279,
4948,
25162,
198,
11748... | 2.80198 | 303 |
import clr
clr.AddReference("Aurora")
clr.AddReference("System.Drawing")
from Aurora import Global
from Aurora.Settings import KeySequence
from Aurora.Devices import DeviceKeys
from Aurora.EffectsEngine import EffectLayer
from System.Drawing import Color
import System
array_device_keys = System.Array[DeviceKeys] | [
11748,
537,
81,
198,
198,
565,
81,
13,
4550,
26687,
7203,
32,
333,
5799,
4943,
198,
565,
81,
13,
4550,
26687,
7203,
11964,
13,
25302,
278,
4943,
198,
198,
6738,
22218,
1330,
8060,
198,
6738,
22218,
13,
26232,
1330,
7383,
44015,
594,
... | 3.674419 | 86 |
from pymoo.model.mutation import Mutation
from pymoo.operators.mutation.no_mutation import NoMutation
from pymoo.operators.mutation.polynomial_mutation import PolynomialMutation
from pymoo.operators.integer_from_float_operator import IntegerFromFloatMutation
from uninas.utils.args import ArgsInterface, Argument, Namesp... | [
6738,
279,
4948,
2238,
13,
19849,
13,
76,
7094,
1330,
337,
7094,
198,
6738,
279,
4948,
2238,
13,
3575,
2024,
13,
76,
7094,
13,
3919,
62,
76,
7094,
1330,
1400,
44,
7094,
198,
6738,
279,
4948,
2238,
13,
3575,
2024,
13,
76,
7094,
13,... | 2.802083 | 384 |
import os
if __name__ == "__main__":
file_list = FileList()
file_list.list_files()
print(file_list.num_files, "files listed")
for f in file_list.files:
print(f)
| [
11748,
28686,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
2393,
62,
4868,
796,
9220,
8053,
3419,
198,
220,
220,
220,
2393,
62,
4868,
13,
4868,
62,
16624,
3419,
198,
220,
220,
220,
3601... | 2.292683 | 82 |
# BSD Licence
# Copyright (c) 2009, Science & Technology Facilities Council (STFC)
# All rights reserved.
#
# See the LICENSE file in the source distribution of this software for
# the full license text.
""" This module contains CSML WFS 2.0 stored query implementations.
To add a new stored query, write the functiona... | [
2,
347,
10305,
10483,
594,
198,
2,
15069,
357,
66,
8,
3717,
11,
5800,
1222,
8987,
48939,
4281,
357,
2257,
4851,
8,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
4091,
262,
38559,
24290,
2393,
287,
262,
2723,
6082,
286,
428,
3788,... | 2.947253 | 455 |
import numpy as np
from numpy.linalg import inv
from scipy.stats import binom
#a1 = failed
#a2 = passed
testPassingProbabilities = [0.7, 0.6, 0.8, 0.9]
noOfSpecialistsCurrent = [100, 70, 50, 60]
wantedSpecialists = 5
wantedWithProbability = 0.9
transitionMatrix = np.zeros((len(testPassingProbabilities) + 2, len(tes... | [
11748,
299,
32152,
355,
45941,
198,
6738,
299,
32152,
13,
75,
1292,
70,
1330,
800,
198,
6738,
629,
541,
88,
13,
34242,
1330,
9874,
296,
198,
198,
2,
64,
16,
796,
4054,
198,
2,
64,
17,
796,
3804,
198,
198,
9288,
14478,
278,
2964,
... | 2.733202 | 506 |
import os
import json
import inspect
import eosfactory.core.logger as logger
import eosfactory.core.errors as errors
import eosfactory.core.setup as setup
import eosfactory.core.interface as interface
import eosfactory.core.teos as teos
if setup.node_api == "cleos":
import eosfactory.core.cleos as cleos
elif setup... | [
11748,
28686,
198,
11748,
33918,
198,
11748,
10104,
198,
198,
11748,
304,
418,
69,
9548,
13,
7295,
13,
6404,
1362,
355,
49706,
198,
11748,
304,
418,
69,
9548,
13,
7295,
13,
48277,
355,
8563,
198,
11748,
304,
418,
69,
9548,
13,
7295,
... | 1.948241 | 4,946 |
from random import randint
x = (randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10))
print('sorteei os numeros:', end='')
for n in x:
print(f'{n}', end=", ")
print(f"\nO maior valor na ordem foi {max(x)}")
print(f"\nO menor valor na ordem foi {min(x)}")
| [
6738,
4738,
1330,
220,
43720,
600,
198,
87,
796,
357,
25192,
600,
7,
16,
11,
838,
828,
43720,
600,
7,
16,
11,
838,
828,
43720,
600,
7,
16,
11,
838,
828,
43720,
600,
7,
16,
11,
838,
828,
43720,
600,
7,
16,
11,
838,
828,
43720,
... | 2.20438 | 137 |
#! /usr/bin/python
# Copyright (C) 2005 Dr. Ralf Schlatterbeck Open Source Consulting.
# Reichergasse 131, A-3411 Weidling.
# Web: http://www.runtux.com Email: office@runtux.com
# All rights reserved
# ****************************************************************************
#
# This program is free software; you c... | [
2,
0,
1220,
14629,
14,
8800,
14,
29412,
198,
2,
15069,
357,
34,
8,
5075,
1583,
13,
371,
1604,
48467,
1436,
27343,
4946,
8090,
41005,
13,
198,
2,
797,
291,
372,
70,
21612,
23134,
11,
317,
12,
2682,
1157,
775,
312,
1359,
13,
198,
... | 2.953181 | 833 |
# -*- coding: UTF-8 -*-
# **********************************************************************************#
# File:
# **********************************************************************************#
import time
from datetime import datetime
from utils.dict import CompositeDict
from utils.decorator import singl... | [
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
2,
41906,
17174,
8412,
1174,
2,
198,
2,
220,
220,
220,
220,
9220,
25,
198,
2,
41906,
17174,
8412,
1174,
2,
198,
11748,
640,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
... | 2.770149 | 335 |
# Generated by Django 2.2.1 on 2019-08-03 05:44
import django.contrib.gis.db.models.fields
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
16,
319,
13130,
12,
2919,
12,
3070,
8870,
25,
2598,
198,
198,
11748,
42625,
14208,
13,
3642,
822,
13,
70,
271,
13,
9945,
13,
27530,
13,
25747,
198,
6738,
42625,
14208,
13,
9945,
1330,
157... | 2.791667 | 48 |
# encoding=utf8
import requests
import datetime
import pytz
import argparse
import random
import json
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='weixin auto sport script.')
parser.add_argument('user', help='your user name', type=str)
parser.add_argument('password', help='your ... | [
2,
21004,
28,
40477,
23,
198,
11748,
7007,
198,
11748,
4818,
8079,
198,
11748,
12972,
22877,
198,
11748,
1822,
29572,
198,
11748,
4738,
198,
11748,
33918,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,... | 2.539326 | 267 |
class ObservationsSummaryDewPt:
""" Defines an object for the observations summary period temp data. """
dewpt = {}
def __init__(self, dewpt_json):
"""
Constructor - this takes an individual observations summary period's dewpoint json.
{
maxC": 5,
... | [
198,
198,
4871,
19243,
602,
22093,
35,
413,
47,
83,
25,
198,
220,
220,
220,
37227,
2896,
1127,
281,
2134,
329,
262,
13050,
10638,
2278,
20218,
1366,
13,
37227,
628,
220,
220,
220,
390,
86,
457,
796,
23884,
628,
220,
220,
220,
825,
... | 2.202156 | 742 |
from PyQt5.QtWidgets import QWidget
from forms.ui_receivePage import Ui_ReceivePage
class ReceivePage(QWidget, Ui_ReceivePage):
"""The page to generate bolt11 invoices"""
def clearForm(self):
"""Reset the form to the default values"""
self.spinValue.setValue(1)
self.lineLabel.setText(... | [
6738,
9485,
48,
83,
20,
13,
48,
83,
54,
312,
11407,
1330,
1195,
38300,
198,
198,
6738,
5107,
13,
9019,
62,
260,
15164,
9876,
1330,
471,
72,
62,
3041,
15164,
9876,
198,
198,
4871,
797,
15164,
9876,
7,
48,
38300,
11,
471,
72,
62,
... | 2.439189 | 444 |
import http.server, requests, json
username_cache = {}
whitelist = ("current.html", "runner64.png", "flags.min.css", "flags.png")
mimes = {
"html": "text/html",
"css": "text/css",
"png": "image/png",
"json": "application/jsonn"
}
PAGE_404 = """<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>404 N... | [
11748,
2638,
13,
15388,
11,
7007,
11,
33918,
198,
198,
29460,
62,
23870,
796,
23884,
198,
1929,
270,
46331,
796,
5855,
14421,
13,
6494,
1600,
366,
16737,
2414,
13,
11134,
1600,
366,
33152,
13,
1084,
13,
25471,
1600,
366,
33152,
13,
11... | 2.239506 | 405 |
from pydantic import BaseModel
from typing import Optional
| [
6738,
279,
5173,
5109,
1330,
7308,
17633,
198,
6738,
19720,
1330,
32233,
628
] | 4.615385 | 13 |
import logging
from typing import Optional
import torch
import tqdm
from torch.utils.data import DataLoader
from phuber.metrics import AccuracyMetric
class Evaluator:
"""Model evaluator
Args:
model: model to be evaluated
device: device on which to evaluate model
loader: dataloader o... | [
11748,
18931,
198,
6738,
19720,
1330,
32233,
198,
198,
11748,
28034,
198,
11748,
256,
80,
36020,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
6060,
17401,
198,
198,
6738,
872,
18478,
13,
4164,
10466,
1330,
33222,
9171,
1173,
628,
198,
4... | 2.194444 | 576 |
import functools
import idna
import logging
import re
import requests
import rfc3339
import time
from bottle import Bottle, request, response, static_file, template, redirect
from datetime import timedelta
from publicsuffixlist import PublicSuffixList
from requests_oauthlib import OAuth1
from urllib.parse import urlsp... | [
11748,
1257,
310,
10141,
198,
11748,
4686,
2616,
198,
11748,
18931,
198,
11748,
302,
198,
11748,
7007,
198,
11748,
374,
16072,
2091,
2670,
198,
11748,
640,
198,
198,
6738,
9294,
1330,
33608,
11,
2581,
11,
2882,
11,
9037,
62,
7753,
11,
... | 2.679245 | 901 |
import myhdl
from myhdl import delay
| [
198,
11748,
616,
71,
25404,
198,
6738,
616,
71,
25404,
1330,
5711,
628
] | 3 | 13 |
import operator
import re
from typing import Any, Dict, List, Tuple, Union
import frappe
from frappe import _
from frappe.query_builder import Criterion, Field, Order
def like(key: str, value: str) -> frappe.qb:
"""Wrapper method for `LIKE`
Args:
key (str): field
value (str): criterion
Returns:
frappe.qb:... | [
11748,
10088,
198,
11748,
302,
198,
6738,
19720,
1330,
4377,
11,
360,
713,
11,
7343,
11,
309,
29291,
11,
4479,
198,
198,
11748,
5306,
27768,
198,
6738,
5306,
27768,
1330,
4808,
198,
6738,
5306,
27768,
13,
22766,
62,
38272,
1330,
10056,
... | 2.401515 | 1,056 |
import json
from decimal import Decimal
from typing import Optional, Dict
from lib.exchange.upbit.model.post_orders_response import PostOrdersResponse
from lib.order.order import Order
from lib.order.order_type import OrderType
from lib.type import JsonString
| [
11748,
33918,
198,
6738,
32465,
1330,
4280,
4402,
198,
6738,
19720,
1330,
32233,
11,
360,
713,
198,
198,
6738,
9195,
13,
1069,
3803,
13,
929,
2545,
13,
19849,
13,
7353,
62,
6361,
62,
26209,
1330,
2947,
35422,
364,
31077,
198,
6738,
91... | 3.742857 | 70 |
import pytest
from lhotse.cut import make_windowed_cuts_from_features
from lhotse.features import Features, FeatureSet
def features(rec_id, start, duration):
"""Helper method for fixture readability (specify only relevant attributes)."""
return Features(
recording_id=rec_id,
channels=0,
... | [
11748,
12972,
9288,
198,
198,
6738,
300,
8940,
325,
13,
8968,
1330,
787,
62,
7972,
6972,
62,
23779,
62,
6738,
62,
40890,
198,
6738,
300,
8940,
325,
13,
40890,
1330,
17571,
11,
27018,
7248,
628,
198,
4299,
3033,
7,
8344,
62,
312,
11,... | 2.483516 | 273 |
import builtins
import collections
import copy
import functools
import itertools
import math
import operator
import types
import warnings
from functools import lru_cache
import numpy
import torch
from . import config
@lru_cache(None)
@lru_cache(None)
def _allowed_function_ids():
"""
Walk torch.* and get t... | [
11748,
3170,
1040,
198,
11748,
17268,
198,
11748,
4866,
198,
11748,
1257,
310,
10141,
198,
11748,
340,
861,
10141,
198,
11748,
10688,
198,
11748,
10088,
198,
11748,
3858,
198,
11748,
14601,
198,
6738,
1257,
310,
10141,
1330,
300,
622,
62,... | 2.743386 | 378 |
from transformers import BertConfig, BertForSequenceClassification, BertTokenizer
import torch
import os
import json
import logging
MAX_CONTEXT_LEN = 120
if __name__ == "__main__":
cloze_model = ClozeMCModel("cuda:0")
split_dir="/mnt/sharedfolder/hpchan/datasets/cased-cnn-dailymail_coref/train"
with op... | [
6738,
6121,
364,
1330,
22108,
16934,
11,
22108,
1890,
44015,
594,
9487,
2649,
11,
22108,
30642,
7509,
198,
11748,
28034,
198,
11748,
28686,
198,
11748,
33918,
198,
11748,
18931,
628,
198,
22921,
62,
10943,
32541,
62,
43,
1677,
796,
7982,
... | 2.431942 | 1,653 |
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from builtins import range
from past.utils import old_div
from .tesisfunctions import Plotim,overlay,padVH
import cv2
import numpy as np
#from invariantMoments import centroid,invmoments,normalizedinvariantmome... | [
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
3170,
1040,
1330,
2837,
198,
6738,
1613,
13,
26791,
1330,
1468,
62,
7146,
198,
198,... | 2.211992 | 2,118 |
import email, smtplib, ssl, sys, imaplib, email.header
import pandas as pd
from config import *
from email import encoders
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
# Loads the csv file given by the CSV_FILE variable
# @return -> list of e... | [
11748,
3053,
11,
895,
83,
489,
571,
11,
264,
6649,
11,
25064,
11,
545,
64,
489,
571,
11,
3053,
13,
25677,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
6738,
4566,
1330,
1635,
198,
6738,
3053,
1330,
2207,
375,
364,
198,
6738,
30... | 3.681128 | 461 |
import sys
from stuff import *
import heapq as hq
ls = lines()#chunks()#nums()
cs = {}
d = {}
for y,l in enumerate(ls):
for x,n in enumerate(l):
n = eval(n)
for Y in range(5):
for X in range(5):
c=complex(x+len(l)*X,y+len(ls)*Y)
cs[c] = (n-1+X+Y)%9+1
... | [
11748,
25064,
198,
6738,
3404,
1330,
1635,
198,
11748,
24575,
80,
355,
289,
80,
198,
198,
7278,
796,
3951,
3419,
2,
354,
14125,
3419,
2,
77,
5700,
3419,
198,
198,
6359,
796,
23884,
198,
67,
796,
23884,
198,
1640,
331,
11,
75,
287,
... | 1.690377 | 478 |
import json
import urllib.parse
from unittest.mock import patch
from uuid import uuid4
from freezegun import freeze_time
from ee.clickhouse.models.event import create_event
from ee.clickhouse.util import ClickhouseTestMixin
from posthog.client import sync_execute
from posthog.models.cohort import Cohort
from posthog.... | [
11748,
33918,
198,
11748,
2956,
297,
571,
13,
29572,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
198,
6738,
334,
27112,
1330,
334,
27112,
19,
198,
198,
6738,
1479,
89,
1533,
403,
1330,
16611,
62,
2435,
198,
198,
6738,
304,
68... | 3.154321 | 162 |
from django.urls import path
import core.views as core_views
urlpatterns = (
path('dataset-snippet/<int:study_id>',
core_views.DatasetSnippetView.as_view(), name='dataset-snippet'),
path('analysis-type-snippet/<int:dataset_id>',
core_views.AnalysisTypeSnippetView.as_view(), name='analysis-ty... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
198,
11748,
4755,
13,
33571,
355,
4755,
62,
33571,
198,
198,
6371,
33279,
82,
796,
357,
198,
220,
220,
220,
3108,
10786,
19608,
292,
316,
12,
16184,
3974,
316,
14,
27,
600,
25,
4451... | 2.630607 | 758 |
disordered = {(10, 5): 'b', (3, 10): 'a', (5, 2): 'c'}
# sort keys, then get values from original - fast
sorted_list = sorted(disordered.items(), key=lambda x: x[0][1], reverse=True)
print(sorted_list) | [
6381,
24071,
796,
1391,
7,
940,
11,
642,
2599,
705,
65,
3256,
357,
18,
11,
838,
2599,
705,
64,
3256,
357,
20,
11,
362,
2599,
705,
66,
6,
92,
198,
198,
2,
3297,
8251,
11,
788,
651,
3815,
422,
2656,
532,
3049,
198,
82,
9741,
62,... | 2.56962 | 79 |
from ichnaea.api.locate.constants import DataAccuracy, DataSource
from ichnaea.api.locate.query import Query
from ichnaea.api.locate.result import (
Position,
PositionResultList,
Region,
RegionResultList,
Result,
ResultList,
)
from ichnaea.models import encode_mac
from ichnaea.tests.factories im... | [
6738,
220,
488,
2616,
18213,
13,
15042,
13,
75,
13369,
13,
9979,
1187,
1330,
6060,
17320,
23843,
11,
6060,
7416,
198,
6738,
220,
488,
2616,
18213,
13,
15042,
13,
75,
13369,
13,
22766,
1330,
43301,
198,
6738,
220,
488,
2616,
18213,
13,... | 2.761905 | 126 |
import os
import sys
import numpy as np
import math
#MWA scripts
from mwa_pb import primary_beam
from vcstools.pointing_utils import sex2deg
from vcstools.metadb_utils import mwa_alt_az_za, get_common_obs_metadata, getmeta
import logging
logger = logging.getLogger(__name__)
def pixel_area(ra_min, ra_max, dec_min, ... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
10688,
198,
198,
2,
14326,
32,
14750,
198,
6738,
285,
10247,
62,
40842,
1330,
4165,
62,
40045,
198,
198,
6738,
410,
66,
301,
10141,
13,
4122,
278,
62,
26... | 2.041022 | 7,752 |
# -*- coding=utf-8 -*-
import os
if __name__ == '__main__':
# ================================================================== #
# Select Sample List #
# ================================================================== #
output = open('ALL.txt', 'w')
... | [
2,
532,
9,
12,
19617,
28,
40477,
12,
23,
532,
9,
12,
198,
11748,
28686,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1303,
38093,
28,
1303,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
... | 2.272109 | 294 |
"""superb URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | [
37811,
16668,
65,
10289,
28373,
198,
198,
464,
4600,
6371,
33279,
82,
63,
1351,
11926,
32336,
284,
5009,
13,
1114,
517,
1321,
3387,
766,
25,
198,
220,
220,
220,
3740,
1378,
31628,
13,
28241,
648,
404,
305,
752,
13,
785,
14,
268,
14,... | 2.819865 | 594 |
from classes.Shell import Shell
from classes.FileSystem import FileSystem
main() | [
6738,
6097,
13,
23248,
1330,
17537,
198,
6738,
6097,
13,
8979,
11964,
1330,
9220,
11964,
198,
12417,
3419
] | 4.444444 | 18 |
version_info = (5, 3, 1)
version = '.'.join(str(v) for v in version_info)
| [
9641,
62,
10951,
796,
357,
20,
11,
513,
11,
352,
8,
198,
9641,
796,
705,
2637,
13,
22179,
7,
2536,
7,
85,
8,
329,
410,
287,
2196,
62,
10951,
8,
198
] | 2.387097 | 31 |
from fontTools.ttLib.tables import otTables
from fontTools.otlLib.builder import buildStatTable
from fontTools.varLib import instancer
import pytest
@pytest.mark.parametrize(
"limits, expected, isNonRIBBI",
[
# Regular
(
{"wght": 400},
{
(1, 3, 1, 0x4... | [
6738,
10369,
33637,
13,
926,
25835,
13,
83,
2977,
1330,
30972,
51,
2977,
198,
6738,
10369,
33637,
13,
313,
75,
25835,
13,
38272,
1330,
1382,
17126,
10962,
198,
6738,
10369,
33637,
13,
7785,
25835,
1330,
916,
8250,
198,
198,
11748,
12972... | 1.635678 | 2,915 |
# Generated by Django 2.2.1 on 2019-05-17 19:15
from django.db import migrations, models
import django.db.models.deletion
import wagtailstreamforms.fields
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
16,
319,
13130,
12,
2713,
12,
1558,
678,
25,
1314,
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.962264 | 53 |
# Velocity Verlet Integrator as a Functor containing the integrator specs
# Initializes Integrator with time step & force field | [
2,
43137,
4643,
1616,
15995,
12392,
355,
257,
11138,
2715,
7268,
262,
4132,
12392,
25274,
628,
220,
220,
220,
1303,
20768,
4340,
15995,
12392,
351,
640,
2239,
1222,
2700,
2214
] | 4.4 | 30 |
import contextlib
import hashlib
import json
import logging
import sys
import time
import threading
from ecdsa import NIST256p
from ecdsa import VerifyingKey
import requests
import utils
MINING_DIFFICULTY = 3
MINING_SENDER = 'THE BLOCKCHAIN'
MINING_REWARD = 1.0
MINING_TIMER_SEC = 20
BLOCKCHAIN_PORT_RANGE = (5000, 5... | [
11748,
4732,
8019,
198,
11748,
12234,
8019,
198,
11748,
33918,
198,
11748,
18931,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
4704,
278,
198,
198,
6738,
9940,
9310,
64,
1330,
399,
8808,
11645,
79,
198,
6738,
9940,
9310,
64,
1330,
46... | 2.57513 | 193 |
#!/home/ocean/anaconda3/bin/python3
from numpy import cos, arccos, sin, arctan, tan, pi, sqrt, e; from numpy import array as ary; import numpy as np; tau = 2*pi
from matplotlib import pyplot as plt
import seaborn as sns
#uses arrows to plot where each point lands after being transformed by the function
LongComputationa... | [
2,
48443,
11195,
14,
78,
5829,
14,
272,
330,
13533,
18,
14,
8800,
14,
29412,
18,
198,
6738,
299,
32152,
1330,
8615,
11,
610,
535,
418,
11,
7813,
11,
610,
310,
272,
11,
25706,
11,
31028,
11,
19862,
17034,
11,
304,
26,
422,
299,
3... | 2.328308 | 1,194 |
from core import settings
from modules.podcast.utils import episode_process_hook
from modules.podcast.models import EpisodeStatus
| [
6738,
4755,
1330,
6460,
198,
6738,
13103,
13,
46032,
13,
26791,
1330,
4471,
62,
14681,
62,
25480,
198,
6738,
13103,
13,
46032,
13,
27530,
1330,
7922,
19580,
628
] | 4.678571 | 28 |
from .RFEExtraTrees import RFEExtraTrees, load_RFEExtraTrees
| [
6738,
764,
32754,
6500,
742,
430,
51,
6037,
1330,
20445,
6500,
742,
430,
51,
6037,
11,
3440,
62,
32754,
6500,
742,
430,
51,
6037,
198
] | 2.44 | 25 |
"""
Pseudo Python command line interface.
It tries to mimic a subset of Python CLI:
https://docs.python.org/3/using/cmdline.html
"""
from __future__ import absolute_import, print_function
import code
import copy
import runpy
import sys
import traceback
from collections import namedtuple
try:
from types import S... | [
37811,
198,
47,
325,
12003,
11361,
3141,
1627,
7071,
13,
198,
198,
1026,
8404,
284,
26332,
257,
24637,
286,
11361,
43749,
25,
198,
5450,
1378,
31628,
13,
29412,
13,
2398,
14,
18,
14,
3500,
14,
28758,
1370,
13,
6494,
198,
37811,
198,
... | 2.362637 | 1,274 |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# ---------------------------------------------------------------------------
# ___ __ __ __ ___
# / | \ | \ | \ / Automatic
# \__ |__/ |__/ |___| \__ Annotation
# \ | | |... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
2,
16529,
32284,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
46444,
220,
220,
11593,
220,
220,
220,
... | 3.076271 | 944 |
"""
A collection of utilities for MF-GP Bandits.
-- kandasamy@cs.cmu.edu
"""
# pylint: disable=import-error
# pylint: disable=no-member
# pylint: disable=invalid-name
# pylint: disable=relative-import
# pylint: disable=super-on-old-class
import numpy as np
# Local imports
from ..opt.function_caller import get_euc_... | [
37811,
198,
220,
317,
4947,
286,
20081,
329,
32850,
12,
16960,
10243,
896,
13,
198,
220,
1377,
479,
392,
292,
14814,
31,
6359,
13,
11215,
84,
13,
15532,
198,
37811,
198,
2,
279,
2645,
600,
25,
15560,
28,
11748,
12,
18224,
198,
2,
... | 2.211703 | 6,665 |
import dairlib
import drake
import numpy as np
# Class to easily convert list of lcmt_osc_tracking_data_t to numpy arrays
| [
11748,
288,
958,
8019,
198,
11748,
28841,
365,
198,
11748,
299,
32152,
355,
45941,
628,
198,
2,
5016,
284,
3538,
10385,
1351,
286,
300,
11215,
83,
62,
17500,
62,
36280,
62,
7890,
62,
83,
284,
299,
32152,
26515,
628
] | 3.205128 | 39 |
import RPi.GPIO as GPIO
from drive import Drive
from dribbler import Dribbler
from field import Field
from enum import Enum
from kicker import Kicker
import time
import numpy as np
#########
# ENUMS #
#
############
# FUNCTIONS
# these should be very generic
###########
# VARIABLES
# used for co... | [
11748,
25812,
72,
13,
16960,
9399,
355,
50143,
201,
198,
6738,
3708,
1330,
9974,
201,
198,
6738,
35003,
43400,
1330,
360,
822,
43400,
201,
198,
6738,
2214,
1330,
7663,
201,
198,
6738,
33829,
1330,
2039,
388,
201,
198,
6738,
38297,
1330,... | 2.87 | 300 |
import simplekml
import json
from polycircles import polycircles
import time
from subprocess import call
'''
https://github.com/LiquidGalaxyLAB/ViewYourData/blob/master/VYD_Project/VYD/Utils/PresentationManager/cylinder_generator.py
https://developers.google.com/maps/documentation/geocoding/intro?h... | [
11748,
2829,
74,
4029,
201,
198,
11748,
33918,
201,
198,
6738,
7514,
66,
343,
5427,
1330,
7514,
66,
343,
5427,
201,
198,
11748,
640,
201,
198,
6738,
850,
14681,
1330,
869,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
... | 2.637795 | 127 |
"""
来点小强+{可选小强数量}
可以艾特一个人使用
"""
import base64
import random
from io import BytesIO
import httpx
from botoy import GroupMsg, S
from botoy import decorators as deco
from botoy.parser import group as gp
from PIL import Image
小强 = Image.open(
BytesIO(
base64.b64decode(
"""
iVBORw0KGgoAAAANSUhEUgA... | [
37811,
198,
30266,
98,
163,
224,
117,
22887,
237,
28156,
118,
10,
90,
20998,
107,
34460,
231,
22887,
237,
28156,
118,
46763,
108,
34932,
237,
92,
198,
198,
20998,
107,
20015,
98,
164,
231,
122,
31965,
117,
31660,
10310,
103,
21689,
45... | 1.29674 | 33,895 |
import abc
| [
11748,
450,
66,
628,
198
] | 2.6 | 5 |
"""Smooth a mesh.
"""
from compas.datastructures import Mesh
from compas.geometry import smooth_area
import compas_rhino
__author__ = ['Tom Van Mele', 'Matthias Rippmann']
__copyright__ = 'Copyright 2017, BRG - ETH Zurich',
__license__ = 'MIT'
__email__ = 'van.mele@arch.ethz.ch'
# select a... | [
37811,
7556,
5226,
257,
19609,
13,
201,
198,
37811,
201,
198,
201,
198,
6738,
552,
292,
13,
19608,
459,
1356,
942,
1330,
47529,
201,
198,
6738,
552,
292,
13,
469,
15748,
1330,
7209,
62,
20337,
201,
198,
201,
198,
11748,
552,
292,
62... | 2.456954 | 453 |
"""
SoftLayer.tests.managers.event_log_tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:license: MIT, see LICENSE for more details.
"""
import SoftLayer
from SoftLayer import fixtures
from SoftLayer import testing
| [
37811,
198,
220,
220,
220,
8297,
49925,
13,
41989,
13,
805,
10321,
13,
15596,
62,
6404,
62,
41989,
198,
220,
220,
220,
220,
27156,
27156,
8728,
4907,
628,
220,
220,
220,
1058,
43085,
25,
17168,
11,
766,
38559,
24290,
329,
517,
3307,
... | 3.629032 | 62 |
import RPi.GPIO as GPIO
import time
#When the mercury is contact, we get a signal on 21
pin = 21
light = 20
GPIO.setmode(GPIO.BCM)
GPIO.setup(pin, GPIO.IN)
GPIO.setup(light, GPIO.OUT)
while True:
if GPIO.input(pin):
print("contact")
GPIO.output(light, GPIO.HIGH)
else:
print("no conta... | [
11748,
25812,
72,
13,
16960,
9399,
355,
50143,
198,
11748,
640,
198,
198,
2,
2215,
262,
27394,
318,
2800,
11,
356,
651,
257,
6737,
319,
2310,
198,
198,
11635,
796,
2310,
198,
2971,
796,
1160,
198,
16960,
9399,
13,
2617,
14171,
7,
16... | 2.230337 | 178 |
from .atomic_node import AtomicNode
| [
6738,
764,
47116,
62,
17440,
1330,
28976,
19667,
628
] | 4.111111 | 9 |
_default_store = "dir"
_default_clevel = 3
_default_codec = "zstd"
_default_workers_backend = "threading"
| [
62,
12286,
62,
8095,
796,
366,
15908,
1,
198,
62,
12286,
62,
2375,
626,
796,
513,
198,
62,
12286,
62,
19815,
721,
796,
366,
89,
19282,
1,
198,
62,
12286,
62,
22896,
62,
1891,
437,
796,
366,
16663,
278,
1,
198
] | 2.585366 | 41 |
import izi
@izi.get("/birthday")
| [
11748,
220,
528,
72,
628,
198,
31,
528,
72,
13,
1136,
7203,
14,
24280,
820,
4943,
198
] | 2.058824 | 17 |
# coding: utf-8
"""
FeersumNLU API
This is the HTTP API for Feersum NLU. See https://github.com/praekelt/feersum-nlu-api-wrappers for examples of how to use the API. # noqa: E501
OpenAPI spec version: 2.0.54.dev2
Contact: nlu@feersum.io
Generated by: https://github.com/swagger-api/swagger-codege... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
5452,
364,
388,
32572,
52,
7824,
628,
220,
220,
220,
770,
318,
262,
14626,
7824,
329,
5452,
364,
388,
22879,
52,
13,
4091,
3740,
1378,
12567,
13,
785,
14,
79,
... | 2.32275 | 16,000 |
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup, find_packages
setup(
name = 'django_fabv',
version = '0.1.1',
url = 'https://pypi.python.org/pypi/django_fabv/0.1.0',
include_package_data=True,
packages=find_packages(),
license = '3... | [
28311,
25,
198,
220,
220,
220,
422,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
422,
1233,
26791,
13,
7295,
1330,
9058,
11,
1064,
62,
43789,
628,
198,
40406,
7,
198,
220,
220... | 2.517073 | 205 |
programmer = Programmer()
tester = Tester()
project = ProjectManagement()
print(project.process(programmer))
print(project.process(tester))
#La clase ProjectManagment es la que se puede extender
#por eso la dejamos asi, ya que cumple con el principio
#Abierto/Cerrado
#(no le entendi muy bien)
| [
628,
198,
23065,
647,
796,
6118,
647,
3419,
198,
4879,
353,
796,
309,
7834,
3419,
198,
198,
16302,
796,
4935,
48032,
3419,
198,
198,
4798,
7,
16302,
13,
14681,
7,
23065,
647,
4008,
198,
4798,
7,
16302,
13,
14681,
7,
4879,
353,
4008,... | 2.839623 | 106 |
# -*- encoding: utf-8 -*-
'''
Current module: mobile.monkeyrunner.driver
Rough version history:
v1.0 Original version to use
********************************************************************
@AUTHOR: Administrator-Bruce Luo(罗科峰)
MAIL: lkf20031988@163.com
RCS: rock4.softtest.pad.hi... | [
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
7061,
6,
201,
198,
11297,
8265,
25,
5175,
13,
2144,
365,
2417,
403,
1008,
13,
26230,
201,
198,
201,
198,
49,
619,
2196,
2106,
25,
201,
198,
85,
16,
13,
15,
22... | 1.888203 | 3,077 |
users = []
| [
18417,
796,
17635,
628,
628,
628,
197,
628,
628,
628
] | 2.3 | 10 |
# -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
import requests
import urllib.request
from moviepy.video.io.VideoFileClip import VideoFileClip
import os
if __name__ == '__main__':
#main('https://arca.live/e/56?target=title&keyword=%EB%9D%BC%EC%98%A4&sort=rank&p=1')
con_download() | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
201,
198,
11748,
7007,
201,
198,
11748,
2956,
297,
571,
13,
25927,
201,
198,
6738,
3807,
9078,
13,
15588,
13,
952,
13,
... | 2.225352 | 142 |
# ============================================================================
#
# Copyright (c) 2007-2010 Integral Technology Solutions Pty Ltd,
# All Rights Reserved.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL... | [
2,
38093,
2559,
18604,
198,
2,
198,
2,
15069,
357,
66,
8,
4343,
12,
10333,
15995,
1373,
8987,
23555,
350,
774,
12052,
11,
220,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
3336,
47466,
3180,
36592,
2389,
1961,
366,
1921,
3180,
1... | 3.194215 | 484 |
def unquote(string):
"""Decode and replace URL percent-escapes in string.
unquote('abc%20def') -> b'abc def'.
Note: If a string, not a bytes object, is passed, it is encoded as UTF-8.
This is only an issue if it contains unescaped non-ASCII characters, which
URIs should not.
"""
if no... | [
4299,
555,
22708,
7,
8841,
2599,
198,
220,
220,
220,
37227,
10707,
1098,
290,
6330,
10289,
1411,
12,
3798,
7916,
287,
4731,
13,
628,
220,
220,
220,
220,
220,
220,
220,
555,
22708,
10786,
39305,
4,
1238,
4299,
11537,
4613,
275,
6,
39... | 2.25072 | 347 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from mongoengine import EmbeddedDocument, StringField, Document, EmailField, EmbeddedDocumentField, DateTimeField
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
285,
25162,
18392,
1330,
13302,
47238,
24941,
11,
10903,
15878,
11,
16854,
11,
9570,
15878,
11,
13302,
47238,
... | 3.22 | 50 |
from app.schemas.appointment import Appointment
import pickle
from redis import Redis
from typing import Any
from datetime import timedelta
from app.models.user import User as UserModel
from .config import settings
| [
6738,
598,
13,
1416,
4411,
292,
13,
1324,
49805,
1330,
2034,
49805,
198,
11748,
2298,
293,
198,
6738,
2266,
271,
1330,
2297,
271,
198,
6738,
19720,
1330,
4377,
198,
6738,
4818,
8079,
1330,
28805,
12514,
198,
198,
6738,
598,
13,
27530,
... | 3.927273 | 55 |
import spidertools.common.nano as nano
import os
| [
198,
11748,
599,
312,
861,
10141,
13,
11321,
13,
77,
5733,
355,
38706,
198,
11748,
28686,
628
] | 3 | 17 |
from shapely.geometry import *
from utils import geomerremovertools
class PrecisionRedux(object):
"""Class PrecisionRedux for managing the precision of geometries
"""
class PrecisionReduxPoint(PrecisionRedux):
"""Derived class for Point"""
class PrecisionReduxMultiPoint(PrecisionRedux):
"""Derived class for Mul... | [
6738,
5485,
306,
13,
469,
15748,
1330,
1635,
198,
6738,
3384,
4487,
1330,
4903,
12057,
2787,
78,
1851,
10141,
198,
198,
4871,
39281,
7738,
2821,
7,
15252,
2599,
198,
197,
37811,
9487,
39281,
7738,
2821,
329,
11149,
262,
15440,
286,
4903... | 3.573427 | 143 |
import json, os, sys
from openpyxl import load_workbook
"""
This script is for creating receipts for Smop coders using data given from mongo
"""
if __name__ == '__main__':
main() | [
11748,
33918,
11,
28686,
11,
25064,
198,
6738,
1280,
9078,
87,
75,
1330,
3440,
62,
1818,
2070,
198,
198,
37811,
198,
1212,
4226,
318,
329,
4441,
29946,
329,
2439,
404,
14873,
364,
1262,
1366,
1813,
422,
285,
25162,
198,
37811,
198,
19... | 3.172414 | 58 |
# -*- coding: utf-8 -*-
# try something like
if not session.met_index:
session.met_index = 0
if not session.met_sort:
session.met_sort = 'ID'
if not session.met_display_flash:
session.met_display_flash = 'No'
if not session.met_filter_cat:
session.met_filter_cat = 'ID'
session.met_filter_text = ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
1949,
1223,
588,
198,
198,
361,
407,
6246,
13,
4164,
62,
9630,
25,
198,
220,
220,
220,
6246,
13,
4164,
62,
9630,
796,
657,
198,
198,
361,
407,
6246,
13,
4164,
6... | 2.477273 | 132 |
import argparse
import gzip
import logging
import os
import re
import subprocess
from pathlib import Path
try:
from checks.drc_checks.magic.converters import magic_drc_to_rdb, magic_drc_to_tcl, magic_drc_to_tr_drc, tr2klayout
except ImportError:
from converters import magic_drc_to_rdb, magic_drc_to_tcl, magic_... | [
11748,
1822,
29572,
198,
11748,
308,
13344,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
850,
14681,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
28311,
25,
198,
220,
220,
220,
422,
8794,
13,
67,
6015,
62,
42116,
... | 2.340509 | 1,022 |