content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import json from difflib import get_close_matches data = json.load(open("data.json")) word = input("Enter a word: ") try: output = (translate(word)) if (type(output) == list): for item in output: print(item) else: print(output) except KeyError: print("...
[ 11748, 33918, 201, 198, 6738, 814, 8019, 1330, 651, 62, 19836, 62, 6759, 2052, 201, 198, 201, 198, 7890, 796, 33918, 13, 2220, 7, 9654, 7203, 7890, 13, 17752, 48774, 201, 198, 201, 198, 4775, 796, 5128, 7203, 17469, 257, 1573, 25, 3...
2.443878
196
#coding: utf8 """ built-in, . , settingsRUST_RESOURCES """
[ 2, 66, 7656, 25, 3384, 69, 23, 198, 198, 37811, 198, 18780, 12, 259, 11, 764, 198, 11, 6460, 49, 7759, 62, 19535, 2606, 7397, 1546, 198, 37811 ]
2.107143
28
__version_info__ = (0, 1, 5) __version__ = '.'.join([str(v) for v in __version_info__])
[ 834, 9641, 62, 10951, 834, 796, 357, 15, 11, 352, 11, 642, 8, 198, 834, 9641, 834, 796, 705, 2637, 13, 22179, 26933, 2536, 7, 85, 8, 329, 410, 287, 11593, 9641, 62, 10951, 834, 12962, 198 ]
2.378378
37
import os BASE_DIR = os.path.dirname(os.path.abspath(__file__)) DEBUG = True ALLOWED_HOSTS = [] DATABASES = { 'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'djangox509.db'} } SECRET_KEY = 'fn)t*+$)ugeyip6-#txyy$5wf2ervc0d2n#h)qb)y5@ly$t*@w' INSTALLED_APPS = [ 'django.contrib.auth', 'djan...
[ 11748, 28686, 198, 198, 33, 11159, 62, 34720, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834, 7753, 834, 4008, 198, 198, 30531, 796, 6407, 198, 198, 7036, 3913, 1961, 62, 39, 10892, 50, 796, 17...
2.149357
1,011
import config import recv_db import node_rpc_helper import threading from time import sleep, time setup_check_background_result = {"msg": "(uninitialized)"} config = config.readConfig() last_check_time = time() - 10000 # Check the receiver accounts; compare accounts in the node wallets and in the DB #config = confi...
[ 11748, 4566, 198, 11748, 664, 85, 62, 9945, 198, 11748, 10139, 62, 81, 14751, 62, 2978, 525, 198, 198, 11748, 4704, 278, 198, 6738, 640, 1330, 3993, 11, 640, 198, 198, 40406, 62, 9122, 62, 25249, 62, 20274, 796, 19779, 19662, 1298, ...
3.382609
115
# # PySNMP MIB module NSCHippiSonet-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NSCHippiSonet-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:25:03 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Ma...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 10896, 3398, 12715, 31056, 316, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490, 14, 67, 6...
2.675357
8,822
#!/usr/bin/env python3 import os dir_path = os.path.dirname(os.path.realpath(__file__)) file = open(dir_path + "/input.txt", "r") lines = file.readlines() lines = [line.strip() for line in lines] # lines = ["2x3x4", "1x1x10"] total = 0 for line in lines: l, w, h = [int(v) for v in line.split('x')] side1 = ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 198, 15908, 62, 6978, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 4008, 198, 198, 7753, 796, 1280, 7, 15...
2.208451
355
import os from distutils.core import setup from distutils.command.install import INSTALL_SCHEMES from setuptools import find_packages from hypermap import __version__, __description__ setup( name=__description__, version=__version__, author='', author_email='', url='https://github.com/cga-harvard...
[ 11748, 28686, 198, 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 6738, 1233, 26791, 13, 21812, 13, 17350, 1330, 40589, 7036, 62, 50, 3398, 3620, 1546, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 198, 6738, 8718, 8899, 1330, 115...
2.020115
696
from creeps.scheduled_action import ScheduledAction AROUND_OFFSETS = ( ( (-1, -1), (-1, 0), (-1, 1), (0, 1), (0, -1), (1, -1), (1, 0), (1, 1), ), ( (1, -2), (0, -2), (-1, -2), (-2, -2), (-2, -1), ...
[ 6738, 49100, 13, 1416, 704, 6309, 62, 2673, 1330, 27774, 6309, 12502, 628, 198, 1503, 15919, 62, 27977, 28480, 50, 796, 357, 198, 220, 220, 220, 357, 198, 220, 220, 220, 220, 220, 220, 220, 13841, 16, 11, 532, 16, 828, 198, 220, 2...
1.382114
369
# -*- coding: utf-8 -*- import json import logging import os from sockjs.tornado import SockJSRouter, SockJSConnection from tornado.web import RequestHandler, StaticFileHandler from tornado.web import Application from tornado.ioloop import IOLoop from sidecar.utils import log
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 6738, 32263, 8457, 13, 45910, 4533, 1330, 311, 735, 41, 12562, 39605, 11, 311, 735, 20120, 32048, 198, 6738, ...
3.45122
82
import time from z3 import Solver, Implies, sat, Const, Function, IntSort, ForAll, DeclareSort from recognizer.pddl.pddl_planner import applicable from recognizer.pddl.sat_planner import SATPlanner from recognizer.plan_recognizer import PlanRecognizer
[ 11748, 640, 198, 198, 6738, 1976, 18, 1330, 4294, 332, 11, 34347, 444, 11, 3332, 11, 4757, 11, 15553, 11, 2558, 42758, 11, 1114, 3237, 11, 16691, 533, 42758, 198, 198, 6738, 3018, 7509, 13, 79, 1860, 75, 13, 79, 1860, 75, 62, 1157...
3.227848
79
cand = open('lbp-bond/data.cbond') gold = open('data/connor_split.csv') tot,good = 0,0 for line in cand: cand_bonds = [] for v in line.split(): x,y = v.split('-') cand_bonds.append((int(x),int(y))) line = gold.readline() items = line.split() if items[1] != 'test': continue ...
[ 46188, 796, 1280, 10786, 23160, 79, 12, 65, 623, 14, 7890, 13, 21101, 623, 11537, 198, 24267, 796, 1280, 10786, 7890, 14, 1102, 13099, 62, 35312, 13, 40664, 11537, 198, 198, 83, 313, 11, 11274, 796, 657, 11, 15, 198, 1640, 1627, 287...
1.796117
515
import os.path as op import numpy as np import matplotlib.pyplot as plt import mne from nilearn.plotting import plot_anat from config import fname, subject_id, n_jobs report = mne.open_report(fname.report) epochs = mne.read_epochs(fname.epochs) noise_cov = mne.compute_covariance(epochs, tmin=-0.2, tmax=0, method='s...
[ 11748, 28686, 13, 6978, 355, 1034, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 285, 710, 198, 6738, 299, 576, 1501, 13, 29487, 889, 1330, 7110, 62, 272, 265, 198, ...
2.377076
602
# Faa um programa que verifique se uma letra digitada vogal ou consoante. vogais = ['A', 'E', 'I', 'O', 'U'] letra = input('Digite uma letra: ').strip() letra = letra.capitalize() if letra in vogais: print(f'A letra {letra} uma vogal') else: print(f'A letra {letra} uma consoante')
[ 2, 376, 7252, 23781, 1430, 64, 8358, 3326, 361, 2350, 384, 334, 2611, 1309, 430, 16839, 4763, 220, 410, 519, 282, 267, 84, 369, 568, 12427, 13, 198, 198, 85, 10949, 271, 796, 37250, 32, 3256, 705, 36, 3256, 705, 40, 3256, 705, 46,...
2.218045
133
#!/usr/bin/env python # # Copyright (C) 2015 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 req...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 357, 34, 8, 1853, 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, ...
2.351031
2,618
import ast import hashlib import json import os from collections import defaultdict from typing import Tuple, Sequence, Dict, Optional, Union, Any, Set import compress_pickle import matplotlib.pyplot as plt import numpy as np import pandas import pandas as pd from filelock import FileLock from allenact.utils.misc_uti...
[ 11748, 6468, 198, 11748, 12234, 8019, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 19720, 1330, 309, 29291, 11, 45835, 11, 360, 713, 11, 32233, 11, 4479, 11, 4377, 11, 5345, 198, 198, 11748, 2741...
2.056934
2,740
# addition_lambda = lambda x, y: x + y # Test: if __name__ == "__main__": print(addition(78, 98))
[ 198, 198, 2, 3090, 62, 50033, 796, 37456, 2124, 11, 331, 25, 2124, 1343, 331, 198, 198, 2, 6208, 25, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3601, 7, 2860, 653, 7, 3695, 11, 9661, 4008, ...
2.333333
45
import datetime def log(message): ''' prints a line with: elapsed time since this function was first called elapsed time since this function was previously called message Elapsed times are shown in seconds with microsecond resolution although one does not know what the accuracy...
[ 11748, 4818, 8079, 198, 198, 4299, 2604, 7, 20500, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 20842, 257, 1627, 351, 25, 198, 220, 220, 220, 220, 220, 220, 220, 42118, 640, 1201, 428, 2163, 373, 717, 1444, 198, 220, ...
2.553846
325
#!/usr/bin/env python import sys, re # init stdin=None try: sys.argv.index('-h') printHelp() sys.exit(1) except ValueError: pass try: sys.argv.index('--help') printHelp() sys.exit(1) except ValueError: pass if len(sys.argv) < 2: suggestHelp() sys.exit(1) srcname = sys.argv[1] # daisychain o...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 11, 302, 198, 198, 2, 2315, 220, 198, 198, 19282, 259, 28, 14202, 198, 198, 28311, 25, 198, 220, 25064, 13, 853, 85, 13, 9630, 10786, 12, 71, 11537, 198, 220, 36...
2.084866
707
"""Configuration for tests""" import tempfile DEBUG = True TESTING = True WTF_CSRF_ENABLED = False # APP CONFIG # Creating a tempfile SQLALCHEMY_DATABASE_URI = f"sqlite://{tempfile.mkdtemp()}/test.db" # WEBSERVER SUPERSET_WEBSERVER_ADDRESS = "0.0.0.0" SUPERSET_WEBSERVER_PORT = 8080
[ 37811, 38149, 329, 5254, 37811, 198, 11748, 20218, 7753, 198, 198, 30531, 796, 6407, 198, 51, 6465, 2751, 796, 6407, 198, 54, 10234, 62, 7902, 32754, 62, 1677, 6242, 30465, 796, 10352, 198, 198, 2, 43504, 25626, 198, 2, 30481, 257, 20...
2.363636
121
# Copyright 2020-present Kensho Technologies, LLC. from datetime import datetime import glob import os import time from unittest.mock import Mock import funcy import gpg import pytest from . import _UNSAFE_KEY_PASSPHRASE, FAKE_KEYS_DIR, TESTING_ENVVAR, TRUSTED_DIR_ENVVAR from ..check_gpg_keys import ( _verify_tru...
[ 2, 15069, 12131, 12, 25579, 29018, 8873, 21852, 11, 11419, 13, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 15095, 198, 11748, 28686, 198, 11748, 640, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 198, 198, 11748, 1257, ...
1.902689
2,343
import os import re from setuptools import find_packages, setup root = os.path.dirname(__file__) settingsf = open(os.path.join(root, 'qatrack', 'settings.py'), 'r') __version__ = re.findall(r"""VERSION\s+=\s+['"]+(.*)['"]""", settingsf.read())[0] setup( name='qatrackplus', version=__version__, packages...
[ 11748, 28686, 198, 11748, 302, 198, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 15763, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 8, 198, 198, 33692, 69, 796, 1280, 7, 418, 13, 6978, 13, ...
1.868203
2,170
import argparse from torch.utils.data import DataLoader from .model import BERT from .trainer import BERTTrainer from .dataset import DataReader, UnitedVocab, CORALDataset, my_collate, key_lib import pdb import os import json import torch if __name__ == '__main__': main()
[ 11748, 1822, 29572, 198, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 198, 6738, 764, 19849, 1330, 347, 17395, 198, 6738, 764, 2213, 10613, 1330, 347, 17395, 2898, 10613, 198, 6738, 764, 19608, 292, 316, 1330, 6060, 33...
3.010753
93
from haystack import Pipeline from haystack.retriever.anserini import DenseAnseriniRetriever # LOAD COMPONENTS retriever = DenseAnseriniRetriever(prebuilt_index_name="wikipedia-bpr-single-nq-hash", binary=True, query_encoder="castorini/bpr-nq-questi...
[ 6738, 27678, 25558, 1330, 37709, 198, 6738, 27678, 25558, 13, 1186, 380, 964, 13, 504, 263, 5362, 1330, 360, 1072, 2025, 2655, 5362, 9781, 380, 964, 198, 198, 2, 17579, 2885, 24301, 1340, 15365, 198, 1186, 380, 964, 796, 360, 1072, 20...
2.254237
236
#!/usr/bin/env python import rospy from std_msgs.msg import String, Float32 import time import subprocess if __name__ == '__main__': voltage_monitor()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 686, 2777, 88, 198, 6738, 14367, 62, 907, 14542, 13, 19662, 1330, 10903, 11, 48436, 2624, 198, 11748, 640, 198, 11748, 850, 14681, 628, 198, 361, 11593, 3672, 834, 6624, 705, 83...
2.890909
55
from __future__ import annotations from spark_auto_mapper_fhir.fhir_types.uri import FhirUri from spark_auto_mapper_fhir.value_sets.generic_type import GenericTypeCode from spark_auto_mapper.type_definitions.defined_types import AutoMapperTextInputType # This file is auto-generated by generate_classes so do not edi...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 9009, 62, 23736, 62, 76, 11463, 62, 69, 71, 343, 13, 69, 71, 343, 62, 19199, 13, 9900, 1330, 376, 71, 343, 52, 380, 198, 198, 6738, 9009, 62, 23736, 62, 76, 11463, 62, 69, 71...
3.214286
112
import datetime import hashlib import json import os import random import string from PIL import Image from urlparse import urlparse from django.conf import settings from django.db import models, connection from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin, UserManager from django.core.mail imp...
[ 11748, 4818, 8079, 198, 11748, 12234, 8019, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 4731, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 19016, 29572, 1330, 19016, 29572, 198, 198, 6738, 42625, 14208, 13, 10414, ...
2.7951
898
#!/usr/bin/env python # -*- coding: utf-8 -*- from .model import Base from .model import Dense from .model import SeriesNet from .model import NP from .model import CNP from .model import RNN from .model import Seq2Seq from .model import DARNN from .model import RGAN from .model import CRGAN from .model import CGAN...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 764, 19849, 1330, 7308, 198, 6738, 764, 19849, 1330, 360, 1072, 198, 6738, 764, 19849, 1330, 7171, 7934, 198...
3.066667
105
import logging import time # import the original example.py from handler import DigitalBeing as DB logger = logging.getLogger('server_logger') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages fh = logging.FileHandler('grpc_server.log') fh.setLevel(logging.DEBUG) logger.addHandler(f...
[ 11748, 18931, 198, 11748, 640, 198, 198, 2, 1330, 262, 2656, 1672, 13, 9078, 198, 6738, 21360, 1330, 10231, 18357, 355, 20137, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 10786, 15388, 62, 6404, 1362, 11537, 198, 6404, 1362...
3.02924
171
import logging from json import loads from time import time from flask import request, abort from telebot.apihelper import ApiException from telebot.types import Update from app import db, new_functions as nf from app.constants import ( webhook_url_base, webhook_url_path, ids, other_error_answer ) from app.models...
[ 11748, 18931, 198, 6738, 33918, 1330, 15989, 198, 6738, 640, 1330, 640, 198, 198, 6738, 42903, 1330, 2581, 11, 15614, 198, 6738, 5735, 13645, 13, 15042, 2978, 525, 1330, 5949, 72, 16922, 198, 6738, 5735, 13645, 13, 19199, 1330, 10133, 1...
3.293103
116
"""Tools for working with segmented systems.""" from collections import namedtuple import numpy as truenp from .geometry import regular_polygon from .mathops import np Hex = namedtuple('Hex', ['q', 'r', 's']) def add_hex(h1, h2): """Add two hex coordinates together.""" q = h1.q + h2.q r = h1.r + h2.r ...
[ 37811, 33637, 329, 1762, 351, 10618, 276, 3341, 526, 15931, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 11748, 299, 32152, 355, 45768, 268, 79, 198, 198, 6738, 764, 469, 15748, 1330, 3218, 62, 35428, 14520, 198, 6738, 764, 11018,...
2.250777
965
import numpy as np from matplotlib import pyplot as plt from scipy.optimize import curve_fit import random as rd import plotter def model_function(X, a, b, c): """ - the analytical expression for the model that aims at describing the experimental data - the X argument is an array of tuples of the form X=...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 12133, 62, 11147, 198, 11748, 4738, 355, 374, 67, 198, 198, 11748, 7110, 353, 628, 198, 429...
2.53886
193
#!/usr/bin/env python3 # Simple script to compute correlations for inserted and removed tokens import numpy as np import pandas as pd from tqdm import tqdm import os import sqlite3 from datetime import datetime import scipy.stats import scipy.sparse if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 17427, 4226, 284, 24061, 35811, 329, 18846, 290, 4615, 16326, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 256, 80, 36020, 1330, 256...
3.117021
94
from bootstrapvz.base import Task from bootstrapvz.common import phases import os import shutil
[ 6738, 6297, 26418, 85, 89, 13, 8692, 1330, 15941, 198, 6738, 6297, 26418, 85, 89, 13, 11321, 1330, 21164, 198, 11748, 28686, 198, 11748, 4423, 346, 628 ]
3.592593
27
serialized_string = b'gAN9cQBYEAAAAG1vZGVsX3N0YXRlX2RpY3RxAWNjb2xsZWN0aW9ucwpPcmRlcmVkRGljdApxAilScQMoWCEAAABiYXNlLmxheWVycy4wLm1lc3NhZ2VfcGFzc2luZ19tYXRxBGN0b3JjaC5fdXRpbHMKX3JlYnVpbGRfdGVuc29yX3YyCnEFKGN0b3JjaC5zdG9yYWdlCl9sb2FkX2Zyb21fYnl0ZXMKcQZCPJ0AAIACigps/JxG+SBqqFAZLoACTekDLoACfXEAKFgQAAAAcHJvdG9jb2xfdmVyc2lvbn...
[ 46911, 1143, 62, 8841, 796, 275, 6, 70, 1565, 24, 66, 48, 17513, 36, 17922, 38, 16, 85, 57, 38, 23266, 55, 18, 45, 15, 56, 55, 49, 75, 55, 17, 49, 79, 56, 18, 49, 87, 12298, 45, 73, 65, 17, 34223, 57, 29767, 15, 64, 54, ...
1.251403
347,566
from django.db import models # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 198, 2, 13610, 534, 4981, 994, 13, 198 ]
3.625
16
from pwn import * g_local=False e=ELF('/lib/x86_64-linux-gnu/libc-2.23.so') context.log_level='debug' if g_local: sh = process('./candcpp')#, env={'LD_PRELOAD':'./libc-2.23.so'}) gdb.attach(sh) else: sh = remote('154.8.222.144', 9999) MAIN_FUNC = 0x4009A0 LEAK_FUNC = 0x400E10 NAME_BUF = 0x602328 malloc = lambda ...
[ 6738, 279, 675, 1330, 1635, 198, 198, 70, 62, 12001, 28, 25101, 198, 68, 28, 37738, 10786, 14, 8019, 14, 87, 4521, 62, 2414, 12, 23289, 12, 41791, 14, 8019, 66, 12, 17, 13, 1954, 13, 568, 11537, 198, 22866, 13, 6404, 62, 5715, 1...
2.094096
542
################3 old_objects = [] game_objects = { ('wall', 0): {'position': (0, 0), 'passable': False, 'interactable': False, 'char': '#'}, ('wall', 1): {'position': (0, 1), 'passable': False, 'interactable': False, 'char': '#'}, ('coin', 2): {'position': (2, 1), 'passable': True, 'interactable': Tr...
[ 628, 628, 198, 198, 14468, 18, 198, 727, 62, 48205, 796, 17635, 198, 6057, 62, 48205, 796, 1391, 198, 220, 220, 220, 19203, 11930, 3256, 657, 2599, 1391, 6, 9150, 10354, 357, 15, 11, 657, 828, 705, 6603, 540, 10354, 10352, 11, 705, ...
2.910233
557
from django.contrib import admin from trade_system.users.models import Wallet from django.contrib.auth import get_user_model User = get_user_model() admin.site.register(User) admin.site.register(Wallet)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 3292, 62, 10057, 13, 18417, 13, 27530, 1330, 37249, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 628, 198, 12982, 796, 651, 62, 7220, 62,...
3.21875
64
import unittest from mock import Mock from foundations_spec.helpers import let, let_patch_mock, let_patch_instance, set_up from foundations_spec.helpers.spec import Spec from foundations_contrib.models.queued_job import QueuedJob from fakeredis import FakeRedis
[ 198, 11748, 555, 715, 395, 198, 6738, 15290, 1330, 44123, 198, 198, 6738, 19369, 62, 16684, 13, 16794, 364, 1330, 1309, 11, 1309, 62, 17147, 62, 76, 735, 11, 1309, 62, 17147, 62, 39098, 11, 900, 62, 929, 198, 6738, 19369, 62, 16684,...
3.379747
79
""" Defines caching before for user preferences """ import jwt import time from cachetools import TTLCache from typing import Optional
[ 37811, 198, 7469, 1127, 40918, 878, 329, 2836, 15387, 198, 37811, 198, 198, 11748, 474, 46569, 198, 11748, 640, 198, 6738, 40428, 3202, 10141, 1330, 26653, 5639, 4891, 198, 6738, 19720, 1330, 32233, 628 ]
4.029412
34
# -*- coding: utf-8 -*- from numpy import array from numpy.testing import assert_allclose from python_geometry.simple_polygon import SimplePolygon
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 299, 32152, 1330, 7177, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 439, 19836, 198, 198, 6738, 21015, 62, 469, 15748, 13, 36439, 62, 35428, 14520, 1330, 174...
3.125
48
#!/usr/bin/env python3 # validation_curve.py """ Generates the validation curve visualizations for the documentation """ ########################################################################## ## Imports ########################################################################## import os import numpy as np import...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 21201, 62, 22019, 303, 13, 9078, 198, 198, 37811, 198, 8645, 689, 262, 21201, 12133, 5874, 4582, 329, 262, 10314, 198, 37811, 198, 198, 29113, 29113, 7804, 2235, 198, 2235, 1846...
4.357143
280
import caffe import numpy as np import random import os import sys import re import json import spacy from operator import mul GLOVE_EMBEDDING_SIZE = 300 CURRENT_DATA_SHAPE = None SPATIAL_COORD = None GLOVE = None
[ 11748, 21121, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 4738, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 33918, 198, 11748, 599, 1590, 198, 6738, 10088, 1330, 35971, 198, 198, 8763, 46, 6089, 62, 3620, ...
2.881579
76
""" tictoc matlab-like tic and toc functions see https://stackoverflow.com/questions/5849800/what-is-the-python-equivalent-of-matlabs-tic-and-toc-functions """ import time tics = []
[ 37811, 198, 83, 713, 420, 198, 6759, 23912, 12, 2339, 256, 291, 290, 284, 66, 5499, 198, 3826, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 3365, 2920, 7410, 14, 10919, 12, 271, 12, 1169, 12, 29412, 12, 4853, 29540, ...
2.642857
70
import io import zipfile import csv from util.ncconv.experimental.ocg_converter.subocg_converter import SubOcgConverter
[ 11748, 33245, 198, 11748, 19974, 7753, 198, 11748, 269, 21370, 198, 6738, 7736, 13, 77, 535, 261, 85, 13, 23100, 9134, 13, 420, 70, 62, 1102, 332, 353, 13, 7266, 420, 70, 62, 1102, 332, 353, 1330, 3834, 46, 66, 70, 3103, 332, 353,...
2.55102
49
import torch import torch.nn as nn
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 628, 628 ]
3.166667
12
""" Example shows how to use UIAnchorWidget to position widgets on screen. Dummy widgets indicate hovered, pressed and clicked. """ import arcade from arcade.gui import UIManager from arcade.gui.widgets import UIDummy from arcade.gui.widgets.layout import UIAnchorLayout window = UIMockup() arcade.run()
[ 37811, 198, 16281, 2523, 703, 284, 779, 12454, 2025, 354, 273, 38300, 284, 2292, 40803, 319, 3159, 13, 198, 35, 13513, 40803, 7603, 289, 2557, 11, 12070, 290, 28384, 13, 198, 37811, 198, 198, 11748, 27210, 198, 6738, 27210, 13, 48317, ...
3.422222
90
import os import glob import pickle import sys import tensorflow as tf from numba import cuda from python_tools.OSUtils import ensure_dir from offline_predict import get_boxes_from_detection_predictions_data, convert_boxes_to_bboxes, predict_on_image_list, load_skeleton_model DETECTION_RESEARCH_FOLDER = os.path.expand...
[ 11748, 28686, 198, 11748, 15095, 198, 11748, 2298, 293, 198, 11748, 25064, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 997, 7012, 1330, 269, 15339, 198, 6738, 21015, 62, 31391, 13, 2640, 18274, 4487, 1330, 4155, 62, 15908, 198, ...
2.521891
571
#!/usr/bin/python import os import csv import time from datetime import datetime import requests from bs4 import BeautifulSoup url = 'https://www.fundsexplorer.com.br/ranking' # Data Cleansing # 'R$' => '' # '%' => '' # '.0' => '' # '.' => '' # ',' => '.' # 'N/A' => '' print("Starting...{}".format(datetime.now())...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 28686, 198, 11748, 269, 21370, 198, 11748, 640, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 628, 198, 6371, 796...
2.472946
499
""" Module 3D Point Selector Provides functionality view slices and to select points in multiplanar reconstructions. """ import os, time, sys import numpy as np import visvis as vv from visvis.utils.pypoints import Point, Pointset, Aarray import OpenGL.GL as gl import OpenGL.GLU as glu def select3d...
[ 37811, 19937, 513, 35, 6252, 9683, 273, 201, 198, 201, 198, 15946, 1460, 11244, 1570, 24314, 290, 284, 2922, 2173, 287, 5021, 11578, 283, 31081, 507, 13, 201, 198, 37811, 201, 198, 11748, 28686, 11, 640, 11, 25064, 201, 198, 11748, 29...
2.236253
982
from flask import Flask, request, jsonify, Blueprint, json, make_response from flask_restplus import Resource, reqparse, Api, Namespace, fields from ..models.user_model import User api = Namespace('Register Endpoint', description='A collection of register endpoints for the user model') ns = Namespace('Users Endpoints...
[ 6738, 42903, 1330, 46947, 11, 2581, 11, 33918, 1958, 11, 39932, 11, 33918, 11, 787, 62, 26209, 198, 6738, 42903, 62, 2118, 9541, 1330, 20857, 11, 43089, 29572, 11, 5949, 72, 11, 28531, 10223, 11, 7032, 198, 6738, 11485, 27530, 13, 722...
2.40167
1,078
import os import aiohttp from discord.ext import commands import xml.etree.ElementTree as ET from cogs.utils.dataIO import dataIO from .utils import checks from .utils.chat_formatting import escape_mass_mentions from .utils.chat_formatting import box from __main__ import send_cmd_help
[ 11748, 28686, 198, 11748, 257, 952, 4023, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 6738, 269, 18463, 13, 26791, 13, 7890, 9399, 1330, 1366, 9399, 198, 6738, 764, 26791, ...
3.452381
84
from abc import ABC,abstractmethod from Servers.ABCServer import ABCServer
[ 6738, 450, 66, 1330, 9738, 11, 397, 8709, 24396, 198, 6738, 2930, 690, 13, 24694, 10697, 1330, 9738, 10697, 198 ]
3.75
20
from fastapi import Depends from sqlalchemy.ext.asyncio import AsyncEngine from sqlalchemy.orm import sessionmaker from typing import AsyncGenerator from fastapi_crud.session import Session from fastapi_crud.router import ModelRouter from fastapi_crud.types import Model
[ 6738, 3049, 15042, 1330, 2129, 2412, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 292, 13361, 952, 1330, 1081, 13361, 13798, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 6246, 10297, 198, 6738, 19720, 1330, 1081, 13361, 8645, 1352, 198, ...
3.545455
77
"""update blog to add a title. Revision ID: 98f3e3ad195c Revises: 2d98c5165674 Create Date: 2019-12-02 22:58:10.377423 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '98f3e3ad195c' down_revision = '2d98c5165674' branch_labels = None depends_on = None
[ 37811, 19119, 4130, 284, 751, 257, 3670, 13, 198, 198, 18009, 1166, 4522, 25, 9661, 69, 18, 68, 18, 324, 22186, 66, 198, 18009, 2696, 25, 362, 67, 4089, 66, 20, 20986, 45385, 198, 16447, 7536, 25, 13130, 12, 1065, 12, 2999, 2534, ...
2.484127
126
from rest_framework.decorators import api_view, permission_classes from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework import status from users.models import UserProfile from .serializers import MessageSerializer , ThreadSerializer from .models import ...
[ 6738, 1334, 62, 30604, 13, 12501, 273, 2024, 1330, 40391, 62, 1177, 11, 7170, 62, 37724, 198, 6738, 1334, 62, 30604, 13, 525, 8481, 1330, 1148, 47649, 3474, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 3060...
4.416667
84
import PyQt5.QtWidgets as Qtw import PyQt5.QtCore as QtCore from widgets.labels import LabelsWidget DATE_FORMAT = 'yyyy-MM-dd'
[ 11748, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 355, 1195, 4246, 198, 11748, 9485, 48, 83, 20, 13, 48, 83, 14055, 355, 33734, 14055, 198, 198, 6738, 40803, 13, 23912, 1424, 1330, 3498, 1424, 38300, 198, 198, 35, 6158, 62, 213...
2.363636
55
import base64 import concurrent.futures import json import logging import sys import time import traceback as tb import uuid from google.api_core import retry from google.cloud import pubsub_v1 import octue.exceptions import twined.exceptions from octue.cloud.credentials import GCPCredentialsManager from octue.cloud.p...
[ 11748, 2779, 2414, 198, 11748, 24580, 13, 69, 315, 942, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 12854, 1891, 355, 256, 65, 198, 11748, 334, 27112, 198, 6738, 23645, 13, 15042, 62, 7295, 1330...
3.190349
373
from collections import defaultdict g = Graph() g.addEdge(0, [1, 2]) g.addEdge(1, [14, 15]) g.addEdge(2, [3, 4]) g.addEdge(3, [11, 12]) g.addEdge(4, [5, 6, 9]) g.addEdge(5, [8, 9]) g.addEdge(6, [7]) g.addEdge(7, [25]) g.addEdge(8, [10, 21, 25, 26]) g.addEdge(9, [3, 10]) g.addEdge(11, [10, 21]) g.addEdge(12, [13, 14]...
[ 6738, 17268, 1330, 4277, 11600, 628, 198, 198, 70, 796, 29681, 3419, 198, 70, 13, 2860, 37021, 7, 15, 11, 685, 16, 11, 362, 12962, 198, 70, 13, 2860, 37021, 7, 16, 11, 685, 1415, 11, 1315, 12962, 198, 70, 13, 2860, 37021, 7, 17,...
1.84438
347
# coding: utf-8 """ Octopus Server API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 2019.6.7+Branch.tags-2019.6.7.Sha.aa18dc6809953218c66f57eff7d26481d9b23d6a Generated by: https://github.com/swagger-api...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 2556, 25790, 9652, 7824, 628, 220, 220, 220, 1400, 6764, 2810, 357, 27568, 416, 2451, 7928, 6127, 5235, 3740, 1378, 12567, 13, 785, 14, 2032, 7928, 12, 15042, 14, ...
2.477807
383
# ###################### # Some useful utilities. # ###################### import json, os, pickle def listPrettyPrint(l, n): """Prints a list l on n columns to improve readability""" if(n == 5): for a,b,c,d,e in zip(l[::5],l[1::5],l[2::5],l[3::5],l[4::5]): print('{:<22}{:<22}{:<22}{:<22}...
[ 2, 1303, 14468, 4242, 2, 198, 2, 2773, 4465, 20081, 13, 198, 2, 1303, 14468, 4242, 2, 628, 198, 11748, 33918, 11, 28686, 11, 2298, 293, 198, 198, 4299, 1351, 35700, 18557, 7, 75, 11, 299, 2599, 198, 220, 220, 220, 37227, 18557, 82...
1.943678
870
#!/usr/bin/env python3 from algutils.primes import cached_primes
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 628, 198, 6738, 435, 70, 26791, 13, 1050, 999, 1330, 39986, 62, 1050, 999, 628, 198 ]
2.76
25
# -*- coding:utf8 -*- # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
[ 2, 532, 9, 12, 19617, 25, 40477, 23, 532, 9, 12, 198, 2, 220, 220, 15069, 357, 66, 8, 12131, 350, 37382, 47, 37382, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, ...
3.246418
349
from .domain_sampler import SamplingError, SplitSampler from .feature_sampler import FeatureSampler, LateFeatureSampler from .halton import HaltonSampler from .cross_entropy import (CrossEntropySampler, ContinuousCrossEntropySampler, DiscreteCrossEntropySampler) from .random_sampler import RandomSampler from .bayes...
[ 6738, 764, 27830, 62, 37687, 20053, 1330, 3409, 11347, 12331, 11, 27758, 16305, 20053, 198, 6738, 764, 30053, 62, 37687, 20053, 1330, 27018, 16305, 20053, 11, 18319, 38816, 16305, 20053, 198, 6738, 764, 14201, 1122, 1330, 11023, 1122, 16305...
3.445055
182
from setuptools import setup setup(name='gym_iotmarket', version='0.0.1', install_requires=['gym','scipy','numpy'] # And any other dependencies )
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 3672, 11639, 1360, 76, 62, 5151, 10728, 3256, 198, 220, 220, 220, 220, 220, 2196, 11639, 15, 13, 15, 13, 16, 3256, 198, 220, 220, 220, 220, 220, 2721, 62, 47911, 28, 17816, ...
2.606557
61
# Inspired by https://github.com/cogu/cfile c_indent_char = ' ' # line and its subclasses can be used as container classes for sequences, which # can span multiple lines. When used on its own though it's a single line class statement(line): class returnval(line): class typedef(line): class linecomment(line)...
[ 2, 45827, 416, 3740, 1378, 12567, 13, 785, 14, 66, 519, 84, 14, 66, 7753, 198, 198, 66, 62, 521, 298, 62, 10641, 796, 705, 220, 705, 628, 198, 198, 2, 1627, 290, 663, 850, 37724, 460, 307, 973, 355, 9290, 6097, 329, 16311, 11, ...
3.687075
294
from typed_python import Entrypoint, SubclassOf, Class, Final, Function, ListOf def test_can_cast_subclass_of_correctly(): def checkIt(): assert f(C) == "C", f(C) assert f(B) == "B", f(B) assert f(A) == "A", f(A) checkIt() Entrypoint(checkIt)() assert checkItList(ListOf(...
[ 6738, 25683, 62, 29412, 1330, 21617, 4122, 11, 3834, 4871, 5189, 11, 5016, 11, 8125, 11, 15553, 11, 7343, 5189, 628, 628, 198, 198, 4299, 1332, 62, 5171, 62, 2701, 62, 7266, 4871, 62, 1659, 62, 30283, 306, 33529, 628, 220, 220, 220,...
2.225225
222
from vision import * from vision.track import alearn, interpolation from vision import visualize from vision.toymaker import * import os import multiprocessing g = Geppetto() b = Rectangle() b = b.linear((300,300), 100) b = b.linear((0,300), 200) b = b.linear((300,0), 300) g.add(b) path = b.groundtruth() pathdict = d...
[ 6738, 5761, 1330, 1635, 198, 6738, 5761, 13, 11659, 1330, 31341, 1501, 11, 39555, 341, 198, 6738, 5761, 1330, 38350, 198, 6738, 5761, 13, 83, 726, 10297, 1330, 1635, 198, 11748, 28686, 198, 11748, 18540, 305, 919, 278, 198, 198, 70, 7...
2.120588
680
import logging from .base import SimSootStmt l = logging.getLogger('angr.engines.soot.statements.goto')
[ 198, 11748, 18931, 198, 198, 6738, 764, 8692, 1330, 3184, 50, 1025, 1273, 16762, 198, 198, 75, 796, 18931, 13, 1136, 11187, 1362, 10786, 648, 81, 13, 1516, 1127, 13, 568, 313, 13, 14269, 3196, 13, 70, 2069, 11537, 628 ]
2.7
40
import arcade from ..constants import TILE_SIZE, PLAYER_SCALING from ..utils import Vector
[ 11748, 27210, 198, 198, 6738, 11485, 9979, 1187, 1330, 31598, 2538, 62, 33489, 11, 28180, 1137, 62, 6173, 1847, 2751, 198, 6738, 11485, 26791, 1330, 20650, 628, 198 ]
3.357143
28
__version__ = '0.7.1' try: from regularsmooth import * except ImportError: from .regularsmooth import *
[ 834, 9641, 834, 796, 705, 15, 13, 22, 13, 16, 6, 198, 28311, 25, 198, 220, 220, 220, 422, 3218, 5796, 5226, 1330, 1635, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 764, 16338, 5796, 5226, 1330, 1635, 198 ]
2.731707
41
import math import string from itertools import groupby from operator import itemgetter from nltk.corpus import stopwords from nltk.tokenize import wordpunct_tokenize N = 10788.0 # Number of documents, in float to make division work. def runner(job): job.additer(TermMapper, SumReducer, combiner=SumReducer) ...
[ 11748, 10688, 198, 11748, 4731, 198, 198, 6738, 340, 861, 10141, 1330, 1448, 1525, 198, 6738, 10088, 1330, 2378, 1136, 353, 198, 198, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 2245, 10879, 198, 6738, 299, 2528, 74, 13, 30001, 109...
2.848341
211
from django.contrib import admin from admin_interface.models import Theme as Th from .models import Genre, Platform, Screenshot, Artwork, Mode, PlayerPerspective, Engine, Theme, Game admin.site.unregister(Th) admin.site.register(Genre) admin.site.register(Platform) admin.site.register(Mode) admin.site.register(Playe...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 13169, 62, 39994, 13, 27530, 1330, 26729, 355, 536, 198, 198, 6738, 764, 27530, 1330, 5215, 260, 11, 19193, 11, 1446, 26892, 11, 3683, 1818, 11, 10363, 11, 7853, 30946, 806, 4...
3.223684
152
#!/usr/bin/env python import sys import json import matplotlib.pyplot as plt result = json.load(sys.stdin) x = result["hour"] y = result["wbgt"] fig = plt.figure(figsize=(8, 4)) ax1 = fig.add_subplot(1,1,1) ax1.set_xlabel("hour") ax1.set_ylabel("wbgt") ax1.set_xticks(list(range(0,24,1))) ax1.set_yticks(list(range(1...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 20274, 796, 33918, 13, 2220, 7, 17597, 13, 19282, 259, 8, 198, 198, 87, ...
2.118705
278
from functools import cache circuit = dict(map(split_row, open('input').read().splitlines())) print(f"Answer part one: {solve('a')}") solve.cache_clear() circuit['b'] = ('16076',) print(f"Answer part two: {solve('a')}")
[ 6738, 1257, 310, 10141, 1330, 12940, 628, 628, 198, 21170, 5013, 796, 8633, 7, 8899, 7, 35312, 62, 808, 11, 1280, 10786, 15414, 27691, 961, 22446, 35312, 6615, 3419, 4008, 198, 198, 4798, 7, 69, 1, 33706, 636, 530, 25, 1391, 82, 644...
2.568182
88
""" Test nb-only filter """ from io import StringIO from noteout.nb_only import NbonlyFilter as nnbo from .tutils import (read_md, assert_json_equal, filter_doc)
[ 37811, 6208, 299, 65, 12, 8807, 8106, 198, 37811, 198, 198, 6738, 33245, 1330, 10903, 9399, 198, 198, 6738, 3465, 448, 13, 46803, 62, 8807, 1330, 399, 4189, 306, 22417, 355, 299, 77, 2127, 198, 198, 6738, 764, 83, 26791, 1330, 357, ...
2.912281
57
# -*- coding: utf-8 -*- import operator
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 10088, 628 ]
2.333333
18
# !/usr/bin/env python # -*- coding: UTF-8 -*- """ from gevent import monkey monkey.patch_all() from gevent.queue import Queue """ import requests import time import random proxies=[] with open('./ips.txt') as f: proxies = [line.split('@')[0] for line in f] """ url = 'http://icanhazip.com' header ={ 'Accept'...
[ 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 6738, 4903, 1151, 1330, 21657, 198, 49572, 13, 17147, 62, 439, 3419, 198, 6738, 4903, 1151, 13, 36560,...
2.415049
412
import setuptools version = "1.0.0" with open("README.md", "r", encoding="utf-8") as fh: readme = fh.read() setuptools.setup( name="asyncode", version=version, author="Loc Simon", author_email="loic.simon@espci.org", description="Emulating Python's interactive interpreter in asynchronous cont...
[ 11748, 900, 37623, 10141, 198, 198, 9641, 796, 366, 16, 13, 15, 13, 15, 1, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 1600, 21004, 2625, 40477, 12, 23, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 1100, 1326...
2.619048
441
function solution(x1, y1, x2, y2) { const x1 = 8; const y1 = 4; const x2 = 8; const y2 = 10; let soundSum = 0; // 5 if (Math.abs(x1 - x2) + Math.abs(y1 - y2) < 4) return -1; if (3 < x1 && x1 < 13 && 3 < x2 && x2 < 13 && 3 < y1 && y1 < 13 && 3 < y2 && y2 < 13) { // 80 . ...
[ 8818, 4610, 7, 87, 16, 11, 331, 16, 11, 2124, 17, 11, 331, 17, 8, 1391, 198, 220, 1500, 2124, 16, 796, 807, 26, 198, 220, 1500, 331, 16, 796, 604, 26, 198, 220, 1500, 2124, 17, 796, 807, 26, 198, 220, 1500, 331, 17, 796, 838...
1.835507
997
"""========== This script will remove a number of residues from a sequence file in agreement to the intervals and other details supplied. """ from crops.about import __prog__, __description__, __author__, __date__, __version__ import argparse import os from crops.io import check_path from crops.io import outpathgen...
[ 37811, 2559, 855, 198, 1212, 4226, 481, 4781, 257, 1271, 286, 47185, 422, 257, 8379, 2393, 198, 259, 4381, 284, 262, 20016, 290, 584, 3307, 14275, 13, 198, 198, 37811, 198, 198, 6738, 14450, 13, 10755, 1330, 11593, 1676, 70, 834, 11, ...
2.680698
974
#!/usr/bin/env python # coding: utf-8 # In[95]: import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt # get_ipython().run_line_magic('matplotlib', 'inline') from sklearn.neighbors import LocalOutlierFactor from sklearn.model_selection import train_test_split from sklearn.line...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 3865, 5974, 628, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 384, 397, 1211, 35...
2.429361
5,429
from django.contrib.auth import authenticate from msa.utils.ipware import get_ip from msa.views import LoggedAPIView from rest_framework import status from rest_framework.authentication import TokenAuthentication, BasicAuthentication from rest_framework.authtoken.models import Token from rest_framework.permissions impo...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 8323, 5344, 198, 6738, 285, 11400, 13, 26791, 13, 541, 1574, 1330, 651, 62, 541, 198, 6738, 285, 11400, 13, 33571, 1330, 50098, 2969, 3824, 769, 198, 6738, 1334, 62, 30604, 1330, 372...
3.990991
111
#!/use/bin/python import tempfile import os import dicom import pandas import json import numpy as np from os.path import join import glob import errno import shutil
[ 2, 48443, 1904, 14, 8800, 14, 29412, 198, 11748, 20218, 7753, 198, 11748, 28686, 198, 11748, 288, 291, 296, 198, 11748, 19798, 292, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 1174...
3.052632
57
# # Copyright 2018-2020 NXP # SPDX-License-Identifier: Apache-2.0 # # """License text""" import logging from . import sss_api as apis from .keystore import KeyStore from .keyobject import KeyObject from .getkey import Get from .util import get_ecc_cypher_type log = logging.getLogger(__name__)
[ 2, 198, 2, 15069, 2864, 12, 42334, 399, 27481, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 198, 2, 198, 198, 37811, 34156, 2420, 37811, 198, 198, 11748, 18931, 198, 6738, 764, 1330, 264, 824, ...
2.950495
101
#!/usr/bin/env python3 # # To communicate with UDS server by nc: "echo -e "string\c" | sudo nc -q 1 -U /var/run/uds_led" import socket serverAddress = '/tmp/portex_tmp' if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 1675, 10996, 351, 471, 5258, 4382, 416, 299, 66, 25, 366, 30328, 532, 68, 366, 8841, 59, 66, 1, 930, 21061, 299, 66, 532, 80, 352, 532, 52, 1220, 7785, 14, 5143, ...
2.453488
86
# Generated by Django 3.0.3 on 2021-02-19 18:04 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 18, 319, 33448, 12, 2999, 12, 1129, 1248, 25, 3023, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/python3 """ Module 100-singly_linked_list Defines class Node (with private data and next_node) Defines class SinglyLinkedList (with private head and public sorted_insert) """
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 37811, 198, 26796, 1802, 12, 82, 4420, 62, 25614, 62, 4868, 198, 7469, 1127, 1398, 19081, 357, 4480, 2839, 1366, 290, 1306, 62, 17440, 8, 198, 7469, 1127, 1398, 311, 4420, 11280, 276, 8...
3.112903
62
from django.conf.urls import url from . import views app_name = 'campaigns' urlpatterns = [ url( r'^$', views.JsonView.response, name='index' ), url( r'^(?P<app_code>[a-zA-Z0-9]+)/info/$', views.info, name='info' ), url( r'^(?P<app_code>[a-zA-Z0-9]+)/services/$', views.services, name='services' ), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 198, 6738, 764, 1330, 5009, 628, 198, 1324, 62, 3672, 796, 705, 35012, 82, 6, 198, 6371, 33279, 82, 796, 685, 198, 220, 19016, 7, 374, 6, 61, 3, 3256, 5009, 13, 41, ...
2.330827
133
import torch import torch.nn as nn
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198 ]
3.181818
11
import collections from scream.files import Docs, Scream, Tox
[ 11748, 17268, 198, 198, 6738, 8196, 13, 16624, 1330, 14432, 82, 11, 36306, 11, 309, 1140, 628, 198 ]
3.611111
18
''' Python3 implementation of oddball @author: Tao Yu (gloooryyt@gmail.com) ''' import numpy as np from sklearn.linear_model import LinearRegression from sklearn.neighbors import LocalOutlierFactor # feature dictionary which format is {node i's id:Ni, Ei, Wi, w,i}
[ 7061, 6, 198, 37906, 18, 7822, 286, 5629, 1894, 198, 198, 31, 9800, 25, 198, 51, 5488, 10605, 357, 4743, 2238, 652, 20760, 31, 14816, 13, 785, 8, 198, 198, 7061, 6, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, ...
2.956989
93
import logging import os logging.basicConfig( level=logging.INFO, format='%(asctime)s %(filename)s[%(lineno)d] %(levelname)s %(message)s') logger = logging.getLogger() dir_name = os.path.join("/tmp", "tbase") if not os.path.exists(dir_name): os.makedirs(dir_name) handler = logging.FileHandler(os.path.jo...
[ 11748, 18931, 198, 11748, 28686, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 198, 220, 220, 220, 1241, 28, 6404, 2667, 13, 10778, 11, 198, 220, 220, 220, 5794, 11639, 4, 7, 292, 310, 524, 8, 82, 4064, 7, 34345, 8, 82, 58, 4, 7, ...
2.423423
222
# Generated by Django 2.2.4 on 2019-09-28 23:38 import address.models from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 19, 319, 13130, 12, 2931, 12, 2078, 2242, 25, 2548, 198, 198, 11748, 2209, 13, 27530, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, ...
2.979592
49
from functools import partial from django.db import models from standards.fields import CharIdField # MODEL FIXTURES ################################################################################
[ 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 5423, 13, 25747, 1330, 3178, 7390, 15878, 628, 198, 198, 2, 19164, 3698, 44855, 51, 29514, 198, 29113, 29113, 14468, 198 ]
5.205128
39
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F # https://github.com/shelhamer/fcn.berkeleyvision.org/blob/master/surgery.py def get_upsample_filter(size): """Make a 2D bilinear kernel suitable for upsampling""" factor = (size + 1) // 2 if size % 2 == 1: ...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 201, 198, 201, 198, 2, 3740, 1378, 12567, 13, 785, 14, 82, 2978, 71, 238...
2.276
250
from pydantic import BaseModel from typing import List # The models used in this module are being used by the API # for type validation using Pydantic as FastAPI is reliant # on pydantic for Data validation
[ 6738, 279, 5173, 5109, 1330, 7308, 17633, 198, 6738, 19720, 1330, 7343, 198, 198, 2, 383, 4981, 973, 287, 428, 8265, 389, 852, 973, 416, 262, 7824, 198, 2, 329, 2099, 21201, 1262, 350, 5173, 5109, 355, 12549, 17614, 318, 39150, 198, ...
3.962963
54
from django.contrib import admin from .models import Product admin.site.register(Product, ProductAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 8721, 198, 198, 28482, 13, 15654, 13, 30238, 7, 15667, 11, 8721, 46787, 8 ]
3.851852
27
import subprocess f = open("app_list.csv","r") lines = f.readlines() for line in lines: print(line.strip()) command = "node app.js " + line.strip(); display = subprocess.run(command, stdout=subprocess.PIPE, shell=True) # display = subprocess.run(["sudo","-u",username,"tshark", "-r", pcapname, "-Y", disp...
[ 11748, 850, 14681, 198, 198, 69, 796, 1280, 7203, 1324, 62, 4868, 13, 40664, 2430, 81, 4943, 198, 6615, 796, 277, 13, 961, 6615, 3419, 198, 1640, 1627, 287, 3951, 25, 198, 220, 220, 220, 3601, 7, 1370, 13, 36311, 28955, 198, 220, ...
2.675497
151