content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
from .logit import Logit
from .logit_embedding import LogitWithEmbedding
from .crnn import CRNN
from .crnn_attention import AttentionCRNN
from .naive_bayes import naiveBayes
from .rocchio import Rocchio
from .knn import KNN
from .svc import SVC_
from .linear_svc import LinearSVC_
from .random_forest import randomForest... | [
6738,
764,
6404,
270,
1330,
5972,
270,
198,
6738,
764,
6404,
270,
62,
20521,
12083,
1330,
5972,
270,
3152,
31567,
6048,
278,
198,
6738,
764,
6098,
20471,
1330,
8740,
6144,
198,
6738,
764,
6098,
20471,
62,
1078,
1463,
1330,
47406,
9419,
... | 2.665323 | 248 |
import sys
inputFile = sys.argv[1]
# Read file and turn into string
with open(inputFile, 'rb') as file:
data = file.read()
# break bit stream down to consituent parts
encoded = (bin(int.from_bytes(data, byteorder="big")))[2:] # remove 0b
garbage = encoded[:8]
if garbage ==... | [
11748,
25064,
220,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
15414,
8979,
796,
25064,
13,
853,
85,
58,
16,
60,
201,
198,
2,
4149,
2393,
290,... | 2.421355 | 871 |
from maps.plugins import OverlayLayer
from maps.utils.layers import register_overlay_layer
from rest_framework.reverse import reverse
register_overlay_layer('Species observations', SpeciesObservations)
register_overlay_layer('Species observations by interview', SpeciesObservationsFilteredByInterview)
| [
6738,
8739,
13,
37390,
1330,
3827,
10724,
49925,
198,
6738,
8739,
13,
26791,
13,
75,
6962,
1330,
7881,
62,
2502,
10724,
62,
29289,
198,
198,
6738,
1334,
62,
30604,
13,
50188,
1330,
9575,
198,
198,
30238,
62,
2502,
10724,
62,
29289,
10... | 4.013158 | 76 |
import math
res = str(math.factorial(100))
digits = [int(c) for c in res]
print(sum(digits)) | [
11748,
10688,
198,
411,
796,
965,
7,
11018,
13,
22584,
5132,
7,
3064,
4008,
198,
12894,
896,
796,
685,
600,
7,
66,
8,
329,
269,
287,
581,
60,
198,
4798,
7,
16345,
7,
12894,
896,
4008
] | 2.555556 | 36 |
# Generated by Django 3.2.12 on 2022-02-11 15:57
from django.db import migrations, models
import wagtail.core.blocks
import wagtail.core.fields
import wagtailmarkdown.blocks
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
1065,
319,
33160,
12,
2999,
12,
1157,
1315,
25,
3553,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
266,
363,
13199,
13,
7295,
13,
27372,
198,
11748,
266,
... | 2.983051 | 59 |
from collections import OrderedDict
import csv
import json
import os
JSON_REPORTS_DIR = 'genomes_final'
CSV_REPORTS_DIR = 'csv_genome_reports'
# CSV_MAP: an OrderedDict defining CSV header and corresponding JSON data.
# The values in this OrderedDict are functions that generate the needed value,
# given a Variant dic... | [
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
11748,
269,
21370,
198,
11748,
33918,
198,
11748,
28686,
198,
198,
40386,
62,
35316,
33002,
62,
34720,
796,
705,
5235,
2586,
62,
20311,
6,
198,
7902,
53,
62,
35316,
33002,
62,
34720,
796,
... | 2.565508 | 748 |
sortname = {
'bubblesort': f'Bubble Sort O(n\N{SUPERSCRIPT TWO})', 'insertionsort': f'Insertion Sort O(n\N{SUPERSCRIPT TWO})',
'selectionsort': f'Selection Sort O(n\N{SUPERSCRIPT TWO})', 'mergesort': 'Merge Sort O(n log n)',
'quicksort': 'Quick Sort O(n log n)', 'heapsort': 'Heap Sort O(n log n)'
} | [
30619,
3672,
796,
1391,
201,
198,
220,
220,
220,
705,
46176,
7689,
419,
10354,
277,
6,
33,
549,
903,
33947,
440,
7,
77,
59,
45,
90,
40331,
4877,
36584,
51,
35288,
30072,
3256,
705,
28463,
507,
419,
10354,
277,
6,
44402,
295,
33947,
... | 2.282609 | 138 |
"""
"""
from .api import \
parse, is_pattern, build, expand, match, get, has, update, remove, apply, \
register, transform, assemble, ANY, is_inverted, get_multi, update_multi, \
remove_multi, match_multi, quote
| [
37811,
198,
37811,
198,
6738,
764,
15042,
1330,
3467,
198,
220,
220,
220,
21136,
11,
318,
62,
33279,
11,
1382,
11,
4292,
11,
2872,
11,
651,
11,
468,
11,
4296,
11,
4781,
11,
4174,
11,
3467,
198,
220,
220,
220,
7881,
11,
6121,
11,
... | 2.947368 | 76 |
import numpy as np
| [
11748,
299,
32152,
355,
45941,
628
] | 3.333333 | 6 |
# Generated by Django 2.1.5 on 2019-01-30 05:06
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
20,
319,
13130,
12,
486,
12,
1270,
8870,
25,
3312,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.766667 | 30 |
# from django.contrib.auth.models import Group
from brumadinho.models import Geolocation, VisitedLocation, FoundPeople
from rest_framework import serializers
| [
2,
422,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
4912,
198,
6738,
865,
388,
17072,
8873,
13,
27530,
1330,
2269,
349,
5040,
11,
6911,
863,
14749,
11,
4062,
8061,
198,
6738,
1334,
62,
30604,
1330,
11389,
11341,
628,
198
... | 3.809524 | 42 |
# https://www.hackerrank.com/challenges/any-or-all/problem
if __name__ == '__main__':
N = int(input())
usr_list = input().split()
positive_condition = list(map(lambda x: x[0] != "-", usr_list))
palindromic_condition = list(map(lambda x: "".join(reversed(x)) == x, usr_list))
lenght = ... | [
198,
2,
3740,
1378,
2503,
13,
31153,
8056,
962,
13,
785,
14,
36747,
34120,
14,
1092,
12,
273,
12,
439,
14,
45573,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
220,
198,
220,
220,
220,
399... | 1.758157 | 521 |
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0
import contextlib
import logging
import os
import socket
from typing import Iterator
import pytest
from pytest_embedded import Dut
@contextlib.contextmanager
@pytest.mark.esp32
@pytest.mark.ip101
@pytest.mark.p... | [
2,
30628,
55,
12,
8979,
15269,
8206,
25,
33160,
20386,
601,
361,
11998,
357,
2484,
272,
20380,
8,
7375,
42513,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
12624,
15,
12,
16,
13,
15,
198,
198,
11748,
4732,
8019,
198,
11748,
... | 2.58296 | 223 |
# -*- coding: utf-8 -*-
from engine import scene
class MenuMain(scene.Scene):
""" The main menu scene. """
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
3113,
1330,
3715,
198,
198,
4871,
21860,
13383,
7,
29734,
13,
36542,
2599,
198,
220,
220,
220,
37227,
383,
1388,
6859,
3715,
13,
37227,
198,
220,
220,
220,
... | 2.469388 | 49 |
import inspect
import os
import numpy as np
import cv2 as cv
import torch
from redrawing.data_interfaces.bodypose import BodyPose
from redrawing.data_interfaces.image import Image
from redrawing.components.stage import Stage
import redrawing.third_models.lightweight_human_modules as lhm
from ..third_models.lightwei... | [
11748,
10104,
198,
11748,
28686,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
269,
85,
17,
355,
269,
85,
198,
11748,
28034,
198,
198,
6738,
2266,
1831,
278,
13,
7890,
62,
3849,
32186,
13,
2618,
3455,
1330,
12290,
47,
577,
198,... | 3.480952 | 210 |
import math
import skimage
from skimage import io, transform, viewer, color, data, filters, feature, morphology, exposure
from pathlib import Path
import matplotlib.pyplot as plt
import numpy as np
from scipy import fftpack
from matplotlib.colors import LogNorm
from scipy import ndimage
from scipy.signal impo... | [
11748,
10688,
201,
198,
11748,
1341,
9060,
201,
198,
6738,
1341,
9060,
1330,
33245,
11,
6121,
11,
19091,
11,
3124,
11,
1366,
11,
16628,
11,
3895,
11,
46320,
11,
7111,
201,
198,
6738,
3108,
8019,
1330,
10644,
201,
198,
11748,
2603,
294... | 2.40027 | 2,221 |
import torch
from process_data.files_utils import init_folders
import shutil
from models.encoders.pointnet import PointNet, PointNetDual
from models.model_gm import PointGMM
from custom_types import *
from tqdm import tqdm
import os
import pickle
import options
DEBUG = False
| [
11748,
28034,
198,
6738,
1429,
62,
7890,
13,
16624,
62,
26791,
1330,
2315,
62,
11379,
364,
198,
11748,
4423,
346,
198,
6738,
4981,
13,
12685,
375,
364,
13,
4122,
3262,
1330,
6252,
7934,
11,
6252,
7934,
36248,
198,
6738,
4981,
13,
1984... | 3.439024 | 82 |
from conans import ConanFile, CMake
| [
6738,
369,
504,
1330,
31634,
8979,
11,
327,
12050,
628,
198
] | 3.454545 | 11 |
from typing import Optional
import abc
import logging
| [
6738,
19720,
1330,
32233,
198,
11748,
450,
66,
198,
11748,
18931,
628
] | 4.583333 | 12 |
import signal
import sys
from math import factorial
import sheduling
from itertools import *
cellsCount = 6 * 2 * len(sheduling.times)
maxFitness = -1000000000
theBestShedule = None
i = 0
# оптимизация. Не используем утро, вечер( крайние отрезки времени) и субботу
cells = list(filter(isB... | [
11748,
6737,
201,
198,
11748,
25064,
201,
198,
6738,
10688,
1330,
1109,
5132,
201,
198,
201,
198,
11748,
14999,
16619,
201,
198,
6738,
340,
861,
10141,
1330,
1635,
201,
198,
201,
198,
46342,
12332,
796,
718,
1635,
362,
1635,
18896,
7,
... | 2.153729 | 657 |
from os.path import join
from poket.core import create_profile, Configmap
from poket.conf import settings
from os.path import join
| [
198,
6738,
28686,
13,
6978,
1330,
4654,
198,
6738,
279,
482,
316,
13,
7295,
1330,
2251,
62,
13317,
11,
17056,
8899,
198,
6738,
279,
482,
316,
13,
10414,
1330,
6460,
198,
6738,
28686,
13,
6978,
1330,
4654,
628
] | 3.5 | 38 |
"""Let's learn Python"""
import string
class StrManipulator(object):
"""First Class"""
def process_string(self, unsan_str):
"""Process string into useful list"""
table = str.maketrans({key: None for key in string.punctuation})
return unsan_str.translate(table).lower().split()
def ... | [
37811,
5756,
338,
2193,
11361,
37811,
198,
11748,
4731,
198,
198,
4871,
4285,
5124,
541,
8927,
7,
15252,
2599,
198,
220,
220,
220,
37227,
5962,
5016,
37811,
628,
220,
220,
220,
825,
1429,
62,
8841,
7,
944,
11,
5576,
272,
62,
2536,
2... | 2.200535 | 374 |
import argparse
import random
import RPi.GPIO as GPIO
import time
parser = argparse.ArgumentParser()
parser.add_argument('k', type=int, help='GPIO number')
args = parser.parse_args()
main(args.k)
| [
11748,
1822,
29572,
198,
11748,
4738,
198,
11748,
25812,
72,
13,
16960,
9399,
355,
50143,
198,
11748,
640,
198,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
3419,
198,
48610,
13,
2860,
62,
49140,
10786,
74,
3256,
2099,
28,
600,... | 3.030769 | 65 |
import pygame, random
from pathlib import PurePath
from GameModules.ColorPalette import ColorPalette
from GameObjects.Sprite import Sprite
class PipeSet:
"""
Represents an obstacle in the game
"""
def __init__(self):
"""
Initializes a new instance of the pipe class
"""
... | [
11748,
12972,
6057,
11,
4738,
198,
6738,
3108,
8019,
1330,
17129,
15235,
198,
6738,
3776,
5841,
5028,
13,
10258,
11531,
5857,
1330,
5315,
11531,
5857,
198,
6738,
3776,
10267,
82,
13,
38454,
578,
1330,
33132,
628,
198,
4871,
36039,
7248,
... | 2.393418 | 2,036 |
import sys
import util
import countries_code_index
import countries_code_individual
if __name__ == "__main__":
run(sys.argv[1])
| [
11748,
25064,
201,
198,
11748,
7736,
201,
198,
11748,
2678,
62,
8189,
62,
9630,
201,
198,
11748,
2678,
62,
8189,
62,
43129,
201,
198,
201,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
201,
198,
220,
220,
220,
1057,
... | 2.692308 | 52 |
from abc import ABC
import numpy
| [
6738,
450,
66,
1330,
9738,
198,
198,
11748,
299,
32152,
628,
628
] | 3.083333 | 12 |
import numpy as np
import nrefocus
from scipy.ndimage import gaussian_filter
import pytest
import qpimage
if __name__ == "__main__":
# Run all tests
_loc = locals()
for _key in list(_loc.keys()):
if _key.startswith("test_") and hasattr(_loc[_key], "__call__"):
_loc[_key]()
| [
11748,
299,
32152,
355,
45941,
198,
11748,
299,
5420,
10901,
198,
6738,
629,
541,
88,
13,
358,
9060,
1330,
31986,
31562,
62,
24455,
198,
198,
11748,
12972,
9288,
198,
198,
11748,
10662,
79,
9060,
628,
628,
198,
361,
11593,
3672,
834,
... | 2.381679 | 131 |
from yacs.config import CfgNode as CN
| [
6738,
331,
16436,
13,
11250,
1330,
327,
40616,
19667,
355,
31171,
628
] | 3.25 | 12 |
import networkx as nx
import matplotlib.pyplot as plt
class Node():
"""This is the base class for a nx node
It has basic electrical properties like
Voltage (All nodes have voltage)
Charge (Pins can collect charge, like capacitors)
Nodes compute functions as well, which based on the
e... | [
11748,
3127,
87,
355,
299,
87,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
628,
198,
4871,
19081,
33529,
198,
220,
220,
220,
37227,
1212,
318,
262,
2779,
1398,
329,
257,
299,
87,
10139,
628,
220,
220,
220,
632,
468... | 2.597353 | 529 |
from flask_api import FlaskAPI
from flask import request
from functools import partial, reduce
from mapping import ResponseMapper
from constants import PROJECT_NAME, APIS
from constants import CACHE_NAME, CACHE_DB, SYNC_INTERVAL
import requests_cache as cache
import requests
import json
import pdb
import os
import re
... | [
6738,
42903,
62,
15042,
1330,
46947,
17614,
198,
6738,
42903,
1330,
2581,
198,
6738,
1257,
310,
10141,
1330,
13027,
11,
4646,
198,
6738,
16855,
1330,
18261,
44,
11463,
198,
6738,
38491,
1330,
21965,
23680,
62,
20608,
11,
3486,
1797,
198,
... | 2.671616 | 1,145 |
import userStory03
import userStory04
(listOfPeople,listOfFamilies)= project3.gedComParse('error.ged')
project3.present(listOfPeople,listOfFamilies)
# (listOfPeople1,listOfFamilies1)= project3.gedComParse('correct.ged')
# project3.present(listOfPeople1,listOfFamilies1)
userStory03.userStory03(listOfPeople)
... | [
11748,
2836,
11605,
3070,
201,
198,
11748,
2836,
11605,
3023,
201,
198,
201,
198,
7,
4868,
5189,
8061,
11,
4868,
5189,
37,
321,
3922,
47505,
1628,
18,
13,
2004,
5377,
10044,
325,
10786,
18224,
13,
2004,
11537,
201,
198,
16302,
18,
13,... | 2.58427 | 178 |
#
#
# File to test current configuration of Pyloric project.
#
# To execute this type of file, type 'nC.bat -python XXX.py' (Windows)
# or 'nC.sh -python XXX.py' (Linux/Mac). Note: you may have to update the
# NC_HOME and NC_MAX_MEMORY variables in nC.bat/nC.sh
#
# Author: Padraig Gleeson
#
# This... | [
2,
201,
198,
2,
201,
198,
2,
220,
220,
9220,
284,
1332,
1459,
8398,
286,
350,
2645,
8146,
1628,
13,
201,
198,
2,
201,
198,
2,
220,
220,
1675,
12260,
428,
2099,
286,
2393,
11,
2099,
705,
77,
34,
13,
8664,
532,
29412,
27713,
13,
... | 2.344426 | 601 |
'''
MIT License
Copyright (c) 2021 Caio Alexandre
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... | [
7061,
6,
198,
36393,
13789,
198,
198,
15269,
357,
66,
8,
33448,
6488,
952,
21000,
260,
198,
198,
5990,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
1659,
428,
3788,
290,
3917,
10314,
3696,
... | 2.955255 | 961 |
import re
import time
from typing import Any, Callable, Dict, List, Optional, Tuple, TypeVar, cast
import wrapt # type: ignore
from robot.libraries.BuiltIn import BuiltIn # type: ignore
from robot.utils import timestr_to_secs # type: ignore
from .utils import AssertionOperator, is_truthy, logger
NumericalOperator... | [
11748,
302,
198,
11748,
640,
198,
6738,
19720,
1330,
4377,
11,
4889,
540,
11,
360,
713,
11,
7343,
11,
32233,
11,
309,
29291,
11,
5994,
19852,
11,
3350,
198,
198,
11748,
7917,
457,
220,
1303,
2099,
25,
8856,
198,
6738,
9379,
13,
75,
... | 2.477401 | 708 |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2015 Cisco Systems, Inc. and others. 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,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
357,
66,
8,
1853,
28289,
11998,
11,
3457,
13,
290,
1854,
13,
220,
1439,
2489,
10395,
13,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,... | 2.642563 | 2,669 |
import os
import sys
import time
import numpy as np
from .network import res2num_blocks
from .model import StyleGANModel
from ..base_executor import ExecutorBase
from ...utils import image_utils, utils
from ...utils.decorator import tpu_decorator
| [
11748,
28686,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
764,
27349,
1330,
581,
17,
22510,
62,
27372,
198,
6738,
764,
19849,
1330,
17738,
45028,
17633,
198,
6738,
11485,
8692,
62,
18558,
38409,
1330... | 3.528571 | 70 |
# vi: set shiftwidth=4 tabstop=4 expandtab:
import datetime
import re
import math
target_area_re = r"^target area: x=([-0-9]+)..([-0-9]+), y=([-0-9]+)..([-0-9]+)$"
# Analysis of the x position
#############################
# step is [0, 1, 2, 3, ..., n
# x-velocity is [vx, vx-1, vx-2, ... | [
2,
25357,
25,
900,
6482,
10394,
28,
19,
7400,
11338,
28,
19,
4292,
8658,
25,
198,
11748,
4818,
8079,
198,
11748,
302,
198,
11748,
10688,
198,
198,
16793,
62,
20337,
62,
260,
796,
374,
1,
61,
16793,
1989,
25,
2124,
16193,
58,
12,
1... | 2.109864 | 1,247 |
import sys
import os
import configparser
from clint.textui import puts, indent, colored
class config(object):
""" This class represents the config file.
:param string path_file: Path to config file
"""
## Check the validity of the config file
def check(self):
""" Check every optio... | [
11748,
25064,
198,
11748,
28686,
198,
11748,
4566,
48610,
198,
198,
6738,
537,
600,
13,
5239,
9019,
1330,
7584,
11,
33793,
11,
16396,
198,
198,
4871,
4566,
7,
15252,
2599,
198,
220,
220,
220,
37227,
220,
220,
220,
770,
1398,
6870,
262... | 2.313826 | 1,555 |
#!/bin/env python
"""
Build and possibly publish product images. It doesn't login to any registry when publishing
but it assumes a `docker login` has been performed before.
Usage: build_product_images.py --help
Example:
build_product_images.py --product zookeeper,kafka -image_version 0.1 --push
This whill build... | [
2,
48443,
8800,
14,
24330,
21015,
198,
37811,
198,
15580,
290,
5457,
7715,
1720,
4263,
13,
632,
1595,
470,
17594,
284,
597,
20478,
618,
12407,
198,
4360,
340,
18533,
257,
4600,
45986,
17594,
63,
468,
587,
6157,
878,
13,
198,
198,
2835... | 2.462759 | 1,450 |
import pytest
from itables import show
from itables.sample_dfs import (
get_countries,
get_dict_of_test_dfs,
get_dict_of_test_series,
get_indicators,
get_population,
)
@pytest.mark.parametrize("df_name,df", get_dict_of_test_dfs().items())
@pytest.mark.parametrize("series_name,series", get_di... | [
11748,
12972,
9288,
198,
198,
6738,
340,
2977,
1330,
905,
198,
6738,
340,
2977,
13,
39873,
62,
7568,
82,
1330,
357,
198,
220,
220,
220,
651,
62,
9127,
1678,
11,
198,
220,
220,
220,
651,
62,
11600,
62,
1659,
62,
9288,
62,
7568,
82,... | 2.423611 | 144 |
import json
import pandas as pd
import numpy as np
import os
import string
import tensorflow as tf
class DataIngestion:
"""Class for ingesting data from the dataset directory""" | [
11748,
33918,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
11748,
4731,
198,
11748,
11192,
273,
11125,
355,
48700,
628,
198,
4871,
6060,
27682,
395,
295,
25,
198,
197,
37811,
9487,
32... | 3.673469 | 49 |
# Copyright (c) 2022 Massachusetts Institute of Technology
# SPDX-License-Identifier: MIT
import collections.abc as abc
import enum
import random
import string
import sys
from dataclasses import dataclass, field as dataclass_field
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type, TypeVar, Union
... | [
2,
15069,
357,
66,
8,
33160,
10140,
5136,
286,
8987,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
17168,
198,
11748,
17268,
13,
39305,
355,
450,
66,
198,
11748,
33829,
198,
11748,
4738,
198,
11748,
4731,
198,
11748,
25064,
198,
... | 2.263849 | 1,751 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
# pip install keyboard
import keyboard
keyboard.add_hotkey('shift', lambda: keyboard.write('on'))
keyboard.add_hotkey('shift', lambda: keyboard.write('off'), trigger_on_release=True)
# Block forever.
keyboard.wait()
# OR, wait Escape:
# keyboar... | [
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,
834,
9800,
834,
796,
705,
541,
21879,
1077,
6,
628,
198,
2,
7347,
2721,
10586,
198,
11748,
10586,
198,
2539,... | 2.806723 | 119 |
from __future__ import division
from scitbx.math import clustering
from scitbx.array_family import flex
if __name__ == '__main__':
run()
| [
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
629,
270,
65,
87,
13,
11018,
1330,
32966,
1586,
198,
6738,
629,
270,
65,
87,
13,
18747,
62,
17989,
1330,
7059,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
... | 3.043478 | 46 |
s=input("Enter a string:")
swap_case(s) #Calling the function
| [
82,
28,
15414,
7203,
17469,
257,
4731,
25,
4943,
198,
2032,
499,
62,
7442,
7,
82,
8,
220,
220,
220,
220,
1303,
48593,
262,
2163,
198,
220,
220,
220,
220
] | 2.333333 | 30 |
#!/usr/bin/env python3
import argparse
from textblob import TextBlob
from textblob.en.sentiments import NaiveBayesAnalyzer
import nltk
def initialize_model():
'''Initializes a textblob naive bayes sentiment analysis model.
'''
nltk.download('movie_reviews')
nltk.download('punkt')
# prevent exposing the learner... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
1822,
29572,
198,
198,
6738,
2420,
2436,
672,
1330,
8255,
3629,
672,
198,
6738,
2420,
2436,
672,
13,
268,
13,
34086,
6800,
1330,
11013,
425,
15262,
274,
37702,
9107,
19... | 3.058962 | 424 |
#!/usr/bin/env python
import os
import subprocess
PROJECT_DIRECTORY = os.path.realpath(os.path.curdir)
def remove_file(filepath):
"""Remove a file if it exists."""
try:
os.remove(os.path.join(PROJECT_DIRECTORY, filepath))
except FileNotFoundError:
pass
def execute(*args, suppress_except... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
28686,
198,
11748,
850,
14681,
198,
198,
31190,
23680,
62,
17931,
23988,
15513,
796,
28686,
13,
6978,
13,
5305,
6978,
7,
418,
13,
6978,
13,
66,
2799,
343,
8,
628,
198,
4299,
4... | 2.397993 | 598 |
""" Copyright (c) 2017-2021 ABBYY Production 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 or agreed to in wr... | [
37811,
15069,
357,
66,
8,
2177,
12,
1238,
2481,
9564,
17513,
56,
19174,
11419,
198,
198,
26656,
15385,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
5832,
743,
407,
779,
428,
2393,
2845,
287,
11846... | 2.692565 | 1,197 |
# 2015-05-22
# rgba_value is a four-tuple
import time
time1 = time.clock()
# for event queue, we are using a priority queue
# we may have site events and circle events with same priority
from core.fortune.SweepLine import *
from core.fortune.arc_tree.ArcTree import *
# from core.priority_queue.P... | [
2,
1853,
12,
2713,
12,
1828,
201,
198,
201,
198,
2,
48670,
7012,
62,
8367,
318,
257,
1440,
12,
83,
29291,
201,
198,
201,
198,
11748,
640,
201,
198,
201,
198,
2435,
16,
796,
640,
13,
15750,
3419,
201,
198,
201,
198,
2,
329,
1785,... | 2.385685 | 8,844 |
# Generated by Django 2.0.5 on 2018-12-04 07:33
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
15,
13,
20,
319,
2864,
12,
1065,
12,
3023,
8753,
25,
2091,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import time
import edgeiq
import pyfrc
from networktables import NetworkTables
import logging
import numpy as np
# Constant for the default confidence (0 being 0% sure and 1 being 100% sure)
default_conf_thres = .75
# TODO: Order the predictions in terms of priority (proximity?)
if __name__ == "__main__":
main(... | [
11748,
640,
198,
11748,
5743,
25011,
198,
11748,
12972,
69,
6015,
198,
6738,
3127,
83,
2977,
1330,
7311,
51,
2977,
198,
11748,
18931,
198,
11748,
299,
32152,
355,
45941,
198,
198,
2,
20217,
329,
262,
4277,
6628,
357,
15,
852,
657,
4,
... | 3.34375 | 96 |
#!/usr/bin/env python
"""
This script is a trick to setup a fake Django environment, since this reusable
app will be developed and tested outside any specifiv Django project.
Via ``settings.configure`` you will be able to set all necessary settings
for your app and run the tests as if you were calling ``./manage.py te... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
1212,
4226,
318,
257,
6908,
284,
9058,
257,
8390,
37770,
2858,
11,
1201,
428,
42339,
198,
1324,
481,
307,
4166,
290,
6789,
2354,
597,
1020,
361,
452,
37770,
1628,
13,
198,
... | 3.279476 | 229 |
lista_pc = []
lista_pc.append ("Processador Intel Core i9 11900K 11ª geração")
lista_pc.append ("Placa de vídeo NVIDIA GeForce RTX 2080TI 11 GB")
lista_pc.append ("Memória 2x 32GB DDR4 3000Mhz")
lista_pc.append ("HD 4TB Seagate 7200 RPM")
lista_pc.append ("SSD 2TB NVME SN850 Leitura 7000MB/s - Gravação 5300MB/s")
... | [
4868,
64,
62,
14751,
796,
17635,
198,
198,
4868,
64,
62,
14751,
13,
33295,
5855,
18709,
7079,
8180,
7231,
1312,
24,
15136,
405,
42,
1367,
126,
103,
308,
8607,
16175,
28749,
4943,
198,
198,
4868,
64,
62,
14751,
13,
33295,
5855,
3646,
... | 2.387543 | 289 |
#!/usr/bin/python
"""
Script used to compile and deploy a tagged configuration on a deployment server.
This script is intended to be called by SVN post-commit hook script.
"""
__version__ = "1.0.3"
__author__ = "Michel Jouvin <jouvin@lal.in2p3.fr>"
import sys
import os
import re
import shutil
from subprocess impor... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
37811,
198,
7391,
973,
284,
17632,
290,
6061,
257,
30509,
8398,
319,
257,
14833,
4382,
13,
198,
1212,
4226,
318,
5292,
284,
307,
1444,
416,
20546,
45,
1281,
12,
41509,
8011,
4226,
13,
... | 2.893234 | 4,168 |
# -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2022 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... | [
2,
220,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
41906,
17174,
4557,
35625,
198,
2,
45593,
2640,
11,
262,
7311,
276,
42410,
6779,
4482,
286,
262,
10373,
57,
198,
2,
15069,
357,
66,
8,
3717,
12,
1238,
1828,
... | 3.28547 | 585 |
from django.apps import AppConfig
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
628
] | 3.888889 | 9 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""This is some demo code showing how a BRSKI proxy would
find a registrar in an ANIMA network using GRASP. This version
also shows how the proxy could advertise itself by flooding
to on-link nodes seeking a proxy. The actual BRSKI transactions
are not included.
"""
impo... | [
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,
1212,
318,
617,
13605,
2438,
4478,
703,
257,
347,
6998,
37845,
15741,
561,
198,
19796,
257,
4214,
20040... | 2.846597 | 2,601 |
# Copyright 2018 Changan Wang
# 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, so... | [
2,
15069,
2864,
22597,
272,
15233,
198,
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,
743,
7... | 2.412068 | 5,817 |
import os
from run import TEST_CASES_DIR, run_test_case
FEATURE_DIR = os.path.join(TEST_CASES_DIR, "02_feature_door")
run_test_case(os.path.join(FEATURE_DIR, "01_01_test_door.py"))
run_test_case(os.path.join(FEATURE_DIR, "01_02_test_door.py"))
| [
11748,
28686,
198,
6738,
1057,
1330,
43001,
62,
34,
1921,
1546,
62,
34720,
11,
1057,
62,
9288,
62,
7442,
628,
198,
15112,
40086,
62,
34720,
796,
28686,
13,
6978,
13,
22179,
7,
51,
6465,
62,
34,
1921,
1546,
62,
34720,
11,
366,
2999,
... | 2.296296 | 108 |
# -*- coding: utf-8 -*-
import numpy as np
from scipy.misc import derivative
import logging
import coloredlogs
logger = logging.getLogger(__name__)
coloredlogs.install(level='DEBUG', logger=logger,fmt='%(asctime)s,%(msecs)03d %(programname)s, %(name)s[%(process)d] %(levelname)s %(message)s')
class approx_DL():
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
13,
44374,
1330,
27255,
198,
198,
11748,
18931,
198,
11748,
16396,
6404,
82,
198,
198,
6404,
1362,
796,
1893... | 2.059965 | 2,835 |
import shutil
from pathlib import Path
from typing import Dict
import pytest
from ethpm_types.manifest import PackageManifest
@pytest.fixture
@pytest.fixture
| [
11748,
4423,
346,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
19720,
1330,
360,
713,
198,
198,
11748,
12972,
9288,
198,
6738,
4555,
4426,
62,
19199,
13,
805,
8409,
1330,
15717,
5124,
8409,
628,
198,
31,
9078,
9288,
13,
69,
9602,
62... | 3.211538 | 52 |
from nate.svonet.graph_svo import generate_ticks, find_max_burst
import networkx as nx
import stop_words as sw
import copy
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
from matplotlib.ticker import MaxNLocator
import numpy as np
from multiprocessing impo... | [
6738,
299,
378,
13,
21370,
36823,
13,
34960,
62,
82,
13038,
1330,
7716,
62,
83,
3378,
11,
1064,
62,
9806,
62,
31961,
198,
11748,
3127,
87,
355,
299,
87,
198,
11748,
2245,
62,
10879,
355,
1509,
198,
11748,
4866,
198,
11748,
19798,
29... | 3.221239 | 113 |
from __future__ import print_function, absolute_import
from __future__ import unicode_literals
import argparse
import logging
import logging.config
import sys
from opentargets_validator.helpers import file_or_resource, URLZSource
from opentargets_validator.validator import validate
if __name__ == '__main__':
sy... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
11,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
11748,
1822,
29572,
198,
11748,
18931,
198,
11748,
18931,
13,
11250,
198,
11748,
25064,
198,
198,
... | 3.383838 | 99 |
# -*- coding: utf-8 -*-
'''
Retrieve Pillar data by doing a SQLite3 query
sqlite3 is included in the stdlib since python2.5.
This module is a concrete implementation of the sql_base ext_pillar for SQLite3.
:maturity: new
:platform: all
Configuring the sqlite3 ext_pillar
=====================================
Use th... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
7061,
6,
198,
9781,
30227,
39179,
1366,
416,
1804,
257,
16363,
578,
18,
12405,
198,
198,
25410,
578,
18,
318,
3017,
287,
262,
14367,
8019,
1201,
21015,
17,
13,
20,
13,... | 2.260064 | 1,242 |
from sklearn.feature_selection import chi2
from sklearn.feature_selection import SelectKBest
from sklearn.feature_selection import VarianceThreshold
'''
For regression: f_regression, mutual_info_regression
For classification: chi2, f_classif, mutual_info_classif
'''
'''
threshold=0.0 means keeps only ... | [
6738,
1341,
35720,
13,
30053,
62,
49283,
1330,
33166,
17,
198,
6738,
1341,
35720,
13,
30053,
62,
49283,
1330,
9683,
42,
13014,
198,
6738,
1341,
35720,
13,
30053,
62,
49283,
1330,
15965,
590,
817,
10126,
628,
198,
7061,
6,
198,
220,
22... | 3.3 | 110 |
import boto3
import subprocess
# By default since code is run from the Organizations account, the account is trusted. Use this variable to add another account as trusted such as an Automation or Security account, from where CI/CD pipelines will be run. If you don't need or have a dedicated account, just use the Organi... | [
11748,
275,
2069,
18,
198,
11748,
850,
14681,
198,
198,
2,
2750,
4277,
1201,
2438,
318,
1057,
422,
262,
41846,
1848,
11,
262,
1848,
318,
13467,
13,
5765,
428,
7885,
284,
751,
1194,
1848,
355,
13467,
884,
355,
281,
17406,
341,
393,
4... | 3.106622 | 891 |
"""
Pythagorean triplet version 1.2.10.20
Copyright (c) 2020 Shahibur Rahaman
Licensed under MIT
"""
print("--------------------------------------------------------")
print("")
hypo = float(input("Enter the length of hypotenuse of triangle: "))
base = float(input("Enter the length of base of triangle: "))
height = fl... | [
37811,
198,
47,
5272,
363,
29456,
15055,
83,
2196,
352,
13,
17,
13,
940,
13,
1238,
198,
198,
15269,
357,
66,
8,
12131,
18381,
38616,
18655,
10546,
198,
26656,
15385,
739,
17168,
198,
37811,
198,
198,
4798,
7203,
43801,
4943,
198,
4798... | 3.402542 | 236 |
""" This script exports the tellor query registry to json
"""
from telliot.queries.query_registry import query_registry
from telliot.queries.query_registry import QueryRegistry
exported = query_registry.json(indent=2)
print(exported)
with open("query_registry_export.json", "w") as f:
f.write(exported)
imported = ... | [
37811,
770,
4226,
15319,
262,
1560,
273,
12405,
20478,
284,
33918,
198,
37811,
198,
6738,
1560,
5151,
13,
421,
10640,
13,
22766,
62,
2301,
4592,
1330,
12405,
62,
2301,
4592,
198,
6738,
1560,
5151,
13,
421,
10640,
13,
22766,
62,
2301,
... | 3.051724 | 116 |
from typing import Union
from genomics_data_index.api.query.SamplesQuery import SamplesQuery
from genomics_data_index.api.query.impl.cluster.ClusterScoreMethod import ClusterScoreMethod
from genomics_data_index.storage.SampleSet import SampleSet
class ClusterScoreMRCAJaccard(ClusterScoreMethod):
"""
A method... | [
6738,
19720,
1330,
4479,
198,
198,
6738,
2429,
31994,
62,
7890,
62,
9630,
13,
15042,
13,
22766,
13,
50,
12629,
20746,
1330,
3409,
2374,
20746,
198,
6738,
2429,
31994,
62,
7890,
62,
9630,
13,
15042,
13,
22766,
13,
23928,
13,
565,
5819,... | 3.5 | 132 |
from __future__ import division, print_function, absolute_import
import copy
import os.path as osp
from collections import defaultdict
import numpy as np
import tarfile
import zipfile
import torch
import operator
from torchreid.utils import read_image, download_url, mkdir_if_missing
class Dataset:
"""An abstra... | [
6738,
11593,
37443,
834,
1330,
7297,
11,
3601,
62,
8818,
11,
4112,
62,
11748,
198,
198,
11748,
4866,
198,
11748,
28686,
13,
6978,
355,
267,
2777,
198,
6738,
17268,
1330,
4277,
11600,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
... | 2.219912 | 3,415 |
'''
Description:
Given a positive integer, return its corresponding column title as appear in an Excel sheet.
For example:
1 -> A
2 -> B
3 -> C
...
26 -> Z
27 -> AA
28 -> AB
...
Example 1:
Input: 1
Output: "A"
Example 2:
Input: 28
Output: "AB"
Example 3:
Input: 701
Output: "ZY"
... | [
7061,
6,
198,
198,
11828,
25,
198,
198,
15056,
257,
3967,
18253,
11,
1441,
663,
11188,
5721,
3670,
355,
1656,
287,
281,
24134,
9629,
13,
198,
198,
1890,
1672,
25,
628,
220,
220,
220,
352,
4613,
317,
198,
220,
220,
220,
362,
4613,
... | 2.818548 | 248 |
from __future__ import annotations
import logging
from abc import abstractmethod
from typing import cast
import docker
| [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
11748,
18931,
198,
6738,
450,
66,
1330,
12531,
24396,
198,
6738,
19720,
1330,
3350,
198,
198,
11748,
36253,
628,
198
] | 4.392857 | 28 |
## UNDERSTANDING DISSIPATION
from __future__ import print_function
path = '/home/mkloewer/python/swm/'
import os; os.chdir(path) # change working directory
import numpy as np
from scipy import sparse
from scipy.integrate import cumtrapz
import matplotlib.pyplot as plt
import time as tictoc
from netCDF4 import Dataset
i... | [
2235,
35219,
2257,
6981,
2751,
13954,
50,
4061,
6234,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
6978,
796,
31051,
11195,
14,
28015,
5439,
413,
263,
14,
29412,
14,
2032,
76,
14,
6,
198,
11748,
28686,
26,
28686,
13,
354,
... | 2.016859 | 1,127 |
import tensorflow as tf
from ..libml.data_augmentations import weak_augment, medium_augment, strong_augment
def ict(x, u, height, width):
"""
Applies medium augmentations on inputs x and u returns augmented tensors.
Args:
x: tensor, labeled batch of images of shape [batch, height, width... | [
11748,
11192,
273,
11125,
355,
48700,
198,
198,
6738,
11485,
8019,
4029,
13,
7890,
62,
559,
5154,
602,
1330,
4939,
62,
559,
5154,
11,
7090,
62,
559,
5154,
11,
1913,
62,
559,
5154,
628,
198,
4299,
220,
713,
7,
87,
11,
334,
11,
6001... | 2.606944 | 720 |
import os
import logging
api_version = os.getenv("MENDER_API_VERSION", "v1")
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
#logging.getLogger("paramiko").setLevel(logging.DEBUG)
logging.info("Setting api_version as: " + api_version)
import authentication
import admission
import deployments
import art... | [
11748,
28686,
198,
11748,
18931,
198,
198,
15042,
62,
9641,
796,
28686,
13,
1136,
24330,
7203,
44,
10619,
1137,
62,
17614,
62,
43717,
1600,
366,
85,
16,
4943,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
3419,
198,
198,
64... | 3.292994 | 157 |
# coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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 applicab... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
2,
198,
2,
15069,
33160,
1058,
33,
6532,
12,
22405,
12,
12041,
25,
19935,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
4943,
198,
2,
345,
743,... | 2.576217 | 1,253 |
from sklearn.ensemble import RandomForestRegressor
from sklearn.datasets.base import load_boston
from sklearn.model_selection import GridSearchCV
from skpro.parametric import ParametricEstimator
from skpro.parametric.estimators import Constant
model = ParametricEstimator(
point=RandomForestRegressor(),
std=Co... | [
6738,
1341,
35720,
13,
1072,
11306,
1330,
14534,
34605,
8081,
44292,
198,
6738,
1341,
35720,
13,
19608,
292,
1039,
13,
8692,
1330,
3440,
62,
65,
5744,
198,
6738,
1341,
35720,
13,
19849,
62,
49283,
1330,
24846,
18243,
33538,
198,
198,
67... | 2.900415 | 241 |
# -*- coding: utf-8 -*-
"""
@date: 2020/12/28 上午10:35
@file: key_word.py
@author: zj
@description:
"""
KEY_OUTPUT = 'output'
KEY_LOSS = 'loss'
KEY_SEP = ',,'
KEY_DATASET = 'data.csv'
KEY_CLASSES = 'cls.csv'
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
31,
4475,
25,
12131,
14,
1065,
14,
2078,
220,
41468,
39355,
230,
940,
25,
2327,
198,
31,
7753,
25,
1994,
62,
4775,
13,
9078,
198,
31,
9800,
25,
1976... | 1.93578 | 109 |
import pygame
import random
screen_size = [360, 600]
screen = pygame.display.set_mode(screen_size)
score = 0
green = (0, 255, 0)
pygame.font.init()
background = load('./img/space_open_space_planets_135213_360x640.jpg')
kill = load('./img/meteorBrown_med1.png')
user = load('./img/playerShip1_orange.png')
user_x =... | [
11748,
12972,
6057,
198,
11748,
4738,
198,
198,
9612,
62,
7857,
796,
685,
15277,
11,
10053,
60,
198,
9612,
796,
12972,
6057,
13,
13812,
13,
2617,
62,
14171,
7,
9612,
62,
7857,
8,
198,
26675,
796,
657,
198,
14809,
796,
357,
15,
11,
... | 2.171589 | 711 |
from pathlib import Path
from rdflib import Graph, Namespace
from rdflib.namespace import TIME
import sys
sys.path.append(str(Path(__file__).parent.parent))
from timefuncs import is_after
TFUN = Namespace("https://w3id.org/timefuncs/")
AFTER = Namespace("https://w3id.org/timefuncs/testdata/after/")
tests_dir = Path(... | [
6738,
3108,
8019,
1330,
10644,
198,
6738,
374,
67,
2704,
571,
1330,
29681,
11,
28531,
10223,
198,
6738,
374,
67,
2704,
571,
13,
14933,
10223,
1330,
20460,
198,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
7,
2536,
7,
15235,
7,
... | 2.840336 | 119 |
from changequantification import IntensityDifferenceMetric
from petstandarduptakevaluecomputation import PETStandardUptakeValueComputation
| [
6738,
1487,
40972,
2649,
1330,
2558,
6377,
28813,
1945,
9171,
1173,
198,
6738,
4273,
20307,
37623,
539,
8367,
785,
1996,
341,
1330,
32043,
23615,
52,
457,
539,
11395,
5377,
1996,
341,
198
] | 4.34375 | 32 |
import torch
| [
11748,
28034,
628
] | 4.666667 | 3 |
from django.apps import AppConfig
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
628
] | 3.888889 | 9 |
from __future__ import absolute_import
import logging
from django.core.cache import cache
from django.core.urlresolvers import reverse
from sentry import http
from sentry import tagstore
from sentry.api.fields.actor import Actor
from sentry.incidents.logic import get_incident_aggregates
from sentry.incidents.models ... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
11748,
18931,
198,
198,
6738,
42625,
14208,
13,
7295,
13,
23870,
1330,
12940,
198,
6738,
42625,
14208,
13,
7295,
13,
6371,
411,
349,
690,
1330,
9575,
198,
198,
6738,
1908,
563,
... | 2.495443 | 1,207 |
#! /usr/bin/env python
import os
import numpy as np
from astropy.io import fits
from astropy import units as u
import sys
import string
import matplotlib.pylab as plot
import nrm_analysis
from nrm_analysis.fringefitting.LG_Model import NRM_Model
from nrm_analysis.misctools import utils
from nrm_analysis import nrm_c... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
6468,
28338,
13,
952,
1330,
11414,
198,
6738,
6468,
28338,
1330,
4991,
355,
334,
198,
11748,
25064,
198,
11748,
4731,
... | 1.941815 | 2,303 |
import random
import numpy as np
import tensorflow as tf
import Constants as Constants
from datasets.COCO.COCO_instance import COCOInstanceDataset
from datasets.Util import Reader
| [
11748,
4738,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
198,
11748,
4757,
1187,
355,
4757,
1187,
198,
6738,
40522,
13,
34,
4503,
46,
13,
34,
4503,
46,
62,
39098,
1330,
327,
4503,
46,
33384... | 3.388889 | 54 |
# Copyright 2008-2020 pydicom authors. See LICENSE file for details.
"""Unit tests for pydicom.data_manager"""
import json
import os
from os.path import basename
from pathlib import Path
import shutil
import pytest
from pydicom.data import (
get_charset_files, get_testdata_files, get_palette_files, fetch_data_fi... | [
2,
15069,
3648,
12,
42334,
279,
5173,
291,
296,
7035,
13,
4091,
38559,
24290,
2393,
329,
3307,
13,
198,
37811,
26453,
5254,
329,
279,
5173,
291,
296,
13,
7890,
62,
37153,
37811,
198,
198,
11748,
33918,
198,
11748,
28686,
198,
6738,
28... | 2.287154 | 3,472 |
# Generated by Django 3.2.7 on 2021-12-04 01:15
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
22,
319,
33448,
12,
1065,
12,
3023,
5534,
25,
1314,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14... | 3.019231 | 52 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import base64
import functools
import hashlib
import imghdr
import httpx
from qcloud_cos import CosConfig, CosS3Client
from epicteller.core.config import Config
config = CosConfig(
Region=Config.COS_REGION,
SecretId=Config.COS_SECRET_ID,
SecretKey=Config.COS_... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
2779,
2414,
198,
11748,
1257,
310,
10141,
198,
11748,
12234,
8019,
198,
11748,
545,
456,
7109,
198,
198,
11748,
... | 2.54386 | 171 |
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import os
import json
import logging
import ctypes as ct
from .._constants import VSCODE_CREDENTIALS_SECTION
try:
import ctypes.wintypes as wt
except (IOError, Valu... | [
2,
20368,
650,
198,
2,
15069,
357,
66,
8,
5413,
10501,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
198,
2,
20368,
650,
198,
11748,
28686,
198,
11748,
33918,
198,
11748,
18931,
198,
11748,
269,
19199,
355,
269,
83,
198,
6738,
1148... | 2.67128 | 289 |
import datetime
import pytz
import json
import string
from urllib.request import Request, urlopen
from autonomus.models import Tag, Event, Link,User
from dateutil import parser
from autonomus.controllers import tags_controller, events_controller
import requests
import re
from autonomus.utils import sms
from concurrent... | [
11748,
4818,
8079,
198,
198,
11748,
12972,
22877,
198,
11748,
33918,
198,
11748,
4731,
198,
6738,
2956,
297,
571,
13,
25927,
1330,
19390,
11,
19016,
9654,
198,
6738,
11827,
385,
13,
27530,
1330,
17467,
11,
8558,
11,
7502,
11,
12982,
198... | 2.95 | 220 |
# from e2e_perf_logger import *
#
# memo_dic = E2EPerfLogger().read_dict_from_csv()
# E2EPerfLogger().log_all_perf(memo_dic)
#
# def printa(text):
# print(text + "-a")
#
#
# class ABC():
# def __init__(self):
# self.func = printa
#
# def wow(self):
# self.func("WOW")
#
# a = ABC()
# a.wow... | [
198,
198,
2,
422,
304,
17,
68,
62,
525,
69,
62,
6404,
1362,
1330,
1635,
198,
2,
198,
2,
16155,
62,
67,
291,
796,
412,
17,
36,
5990,
69,
11187,
1362,
22446,
961,
62,
11600,
62,
6738,
62,
40664,
3419,
198,
2,
412,
17,
36,
5990,
... | 2.380522 | 1,879 |
from GUI.Shapes.Shape import Shape
| [
6738,
25757,
13,
2484,
7916,
13,
33383,
1330,
25959,
628
] | 3.6 | 10 |
from django.contrib import admin
from django_admin_listfilter_dropdown.filters import RelatedDropdownFilter
from mptt.admin import MPTTModelAdmin
from categories.models import Category, RecommendedFor
class CategoryAdmin(MPTTModelAdmin):
""" Class representing category admin
Attributes:
list_display... | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
62,
28482,
62,
4868,
24455,
62,
14781,
2902,
13,
10379,
1010,
1330,
19809,
26932,
2902,
22417,
198,
6738,
285,
457,
83,
13,
28482,
1330,
4904,
15751,
17633,
46787,
... | 3.140351 | 228 |
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle, TA_CENTER
| [
6738,
989,
23912,
13,
8019,
13,
47720,
1330,
651,
36674,
21466,
3347,
316,
11,
2547,
6111,
21466,
11,
21664,
62,
43960,
1137,
628
] | 3.521739 | 23 |
from pygsmmodule.imei.imei import ImeiSupport
| [
6738,
12972,
14542,
3020,
375,
2261,
13,
45519,
13,
45519,
1330,
314,
1326,
72,
15514,
628,
628,
628
] | 2.833333 | 18 |
# Copyright (c) 2018 Science and Technology Facilities Council
# All rights reserved.
# Modifications made as part of the fparser project are distributed
# under the following license:
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following condi... | [
2,
15069,
357,
66,
8,
2864,
5800,
290,
8987,
48939,
4281,
198,
198,
2,
1439,
2489,
10395,
13,
198,
198,
2,
3401,
6637,
925,
355,
636,
286,
262,
277,
48610,
1628,
389,
9387,
198,
2,
739,
262,
1708,
5964,
25,
198,
198,
2,
2297,
39... | 3.284404 | 763 |
from pathlib import Path
import pytest
from .. import file_funcs
@pytest.mark.file_funcs
class TestFileFuncs:
"""Tests all funcs in file_funcs"""
@pytest.mark.skip(reason="New hire work")
def test_delete_files(self, tmp_path: Path):
"""Tests the delete files decorator
Files should be ... | [
6738,
3108,
8019,
1330,
10644,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
11485,
1330,
2393,
62,
12543,
6359,
628,
198,
31,
9078,
9288,
13,
4102,
13,
7753,
62,
12543,
6359,
198,
4871,
6208,
8979,
24629,
6359,
25,
198,
220,
220,
220... | 2.058405 | 1,404 |
#!/usr/bin/env python
import asyncio
import aiohttp
import logging
import time
import ujson
import websockets
import hummingbot.connector.exchange.binance.binance_constants as CONSTANTS
from binance.client import Client as BinanceClient
from typing import (
AsyncIterable,
Dict,
Optional,
Tuple,
)
fr... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
30351,
952,
198,
11748,
257,
952,
4023,
198,
11748,
18931,
198,
11748,
640,
198,
11748,
334,
17752,
198,
11748,
2639,
11603,
198,
198,
11748,
41465,
13645,
13,
8443,
273,
13,... | 3.141509 | 212 |
import math
def hexdump(data: memoryview,
bytes_per_line: int = 16,
bytes_per_chunk: int = 4) -> list:
"""
Returns a list of strings. Each entry will be one line of the hex dump from
the given data.
"""
# Allowing the flexibility for whatever size dump is needed, but still
... | [
11748,
10688,
198,
198,
4299,
17910,
39455,
7,
7890,
25,
4088,
1177,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9881,
62,
525,
62,
1370,
25,
493,
796,
1467,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
2... | 2.301563 | 640 |