content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import json import logging import os import sys from io import BytesIO from io import StringIO import py import pytest from freezegun import freeze_time from pathlib import Path from pytest_benchmark import plugin from pytest_benchmark.plugin import BenchmarkSession from pytest_benchmark.plugin import pytest_benchmar...
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 6738, 33245, 1330, 10903, 9399, 198, 198, 11748, 12972, 198, 11748, 12972, 9288, 198, 6738, 1479, 89, 1533, 403, 1330, 1...
2.74475
619
# -*- coding: utf-8 -*- """Class definition for DFTimewolf modules.""" import threading class BaseModule(threading.Thread): """Base class for Modules. Attributes: critical: Boolean indicating whether the execution of this module is critical to the execution of the recipe. If set to True, and the mod...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 9487, 6770, 329, 360, 9792, 320, 413, 4024, 13103, 526, 15931, 198, 198, 11748, 4704, 278, 628, 198, 4871, 7308, 26796, 7, 16663, 278, 13, 16818, 2599, 198, 220, ...
3.36
425
from __future__ import print_function from orphics import maps,io,cosmology,stats from pixell import enmap import numpy as np import os,sys import soapack.interfaces as sints from tilec import kspace,utils as tutils from actsims import noise as simnoise from enlib import bench region = 'deep56' version = "test_sim_gal...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 393, 746, 873, 1330, 8739, 11, 952, 11, 6966, 29126, 11, 34242, 198, 6738, 279, 844, 695, 1330, 551, 8899, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 11, 17597, 198...
2.013078
1,147
#private method #private method
[ 198, 220, 220, 220, 1303, 19734, 2446, 628, 220, 220, 220, 220, 1303, 19734, 2446, 628, 198 ]
2.647059
17
import argparse import os import pickle
[ 11748, 1822, 29572, 201, 198, 11748, 28686, 201, 198, 11748, 2298, 293, 201, 198, 201, 198, 201, 198 ]
2.611111
18
"""Top-level package for worldview_dl.""" __author__ = """Leif Denby""" __email__ = 'leif@denby.eu' __version__ = '0.2.0' from .worldview_dl import download_image
[ 37811, 9126, 12, 5715, 5301, 329, 29081, 62, 25404, 526, 15931, 198, 198, 834, 9800, 834, 796, 37227, 3123, 361, 5601, 1525, 37811, 198, 834, 12888, 834, 796, 705, 293, 361, 31, 6559, 1525, 13, 12496, 6, 198, 834, 9641, 834, 796, 70...
2.66129
62
# Generated by Django 3.1 on 2020-08-28 13:50 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 319, 12131, 12, 2919, 12, 2078, 1511, 25, 1120, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.892857
28
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-11-25 16:20 from __future__ import unicode_literals from django.contrib.auth.models import Permission from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 20, 319, 2177, 12, 1157, 12, 1495, 1467, 25, 1238, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.857143
70
from setuptools import setup extras_require = { "develop": [ "check-manifest", "pytest~=5.2", "pytest-cov~=2.8", "pytest-console-scripts~=0.2", "bumpversion~=0.5", "pyflakes", "pre-commit", "black", "twine", ], } extras_require["complete"]...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 2302, 8847, 62, 46115, 796, 1391, 198, 220, 220, 220, 366, 16244, 1298, 685, 198, 220, 220, 220, 220, 220, 220, 220, 366, 9122, 12, 805, 8409, 1600, 198, 220, 220, 220, 220, 220, 220, ...
2.062762
239
# -*- coding: utf-8 -*- """ Created on Wed May 6 08:47:35 2020 @author: Cassio (chmendonca) Description: This class will have the details to insert a button to start playing the game """ import pygame.font
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 1737, 220, 718, 8487, 25, 2857, 25, 2327, 12131, 198, 31, 9800, 25, 14154, 952, 357, 354, 76, 43153, 6888, 8, 198, 11828, 25, 770, 1398, ...
2.971831
71
from PIL import Image, ImageDraw, ImageFont from number_dict import number_dict import boto3 from io import BytesIO destination_bucket = '2048gameyash' s3 = boto3.resource('s3') if extension in ['.png']: format = 'PNG' buffer = BytesIO() img.save(buffer, format) buffer.seek(0) obj = s3.Obje...
[ 6738, 350, 4146, 1330, 7412, 11, 7412, 25302, 11, 7412, 23252, 198, 6738, 1271, 62, 11600, 1330, 1271, 62, 11600, 198, 11748, 275, 2069, 18, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 198, 16520, 1883, 62, 27041, 316, 796, 705, 12...
2.353211
218
EVENT_PREFIX = 'event#' EVENT_PREFIX_ARITHM = EVENT_PREFIX + 'arithm#' EVENT_ARITHM_ADD = EVENT_PREFIX_ARITHM + 'add' EVENT_ARITHM_SUB = EVENT_PREFIX_ARITHM + 'sub' EVENT_ARITHM_UNCLAIMED = EVENT_PREFIX_ARITHM + 'unclaimed'
[ 20114, 3525, 62, 47, 31688, 10426, 796, 705, 15596, 2, 6, 198, 20114, 3525, 62, 47, 31688, 10426, 62, 1503, 10554, 44, 796, 49261, 62, 47, 31688, 10426, 1343, 705, 283, 342, 76, 2, 6, 198, 20114, 3525, 62, 1503, 10554, 44, 62, 292...
2.055046
109
import hmac from functools import wraps from django.conf import settings # Request does not have 'Sign' in headers # 'Sign' does not match # Generate HMAC 'Sign' # Formating a message(e.g. ’2BTCUSDT’) # 'obj' could be a dict or request.POST # Verify 'Sign' in Request # Assign 'Sign' to Response
[ 11748, 289, 20285, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 2, 19390, 857, 407, 423, 705, 11712, 6, 287, 24697, 198, 2, 705, 11712, 6, 857, 407, 2872, 628, 198, 2, 2980...
2.886792
106
############################################################################### # Module: factory # Purpose: Builds instances of stream producers and consumers # # Notes: # ############################################################################### from .kafka_producer import KafkaProducer from .kafka_consumer im...
[ 29113, 29113, 7804, 4242, 21017, 198, 2, 19937, 25, 220, 8860, 198, 2, 32039, 25, 10934, 82, 10245, 286, 4269, 11408, 290, 7008, 198, 2, 198, 2, 11822, 25, 198, 2, 198, 29113, 29113, 7804, 4242, 21017, 198, 198, 6738, 764, 74, 1878,...
5
83
#/usr/bin/env python #coding=utf-8 """ 定义特征抽取相关的util function """ import os import sys sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../") from sklearn.feature_extraction.text import CountVectorizer import math import numpy as np from mt_metrics.bleu import compute_bleu from mt_metric...
[ 2, 14, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 66, 7656, 28, 40477, 12, 23, 201, 198, 201, 198, 37811, 201, 198, 22522, 248, 20046, 231, 31965, 117, 36181, 223, 162, 232, 121, 20998, 244, 33566, 116, 17739, 111, 21410, 22602...
2.161388
2,968
import setuptools with open('README.rst', 'r') as f: long_description = f.read() with open('tda/version.py', 'r') as f: '''Version looks like `version = '1.2.3'`''' version = [s.strip() for s in f.read().strip().split('=')][1] version = version[1:-1] setuptools.setup( name='tda-api', version=...
[ 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 10786, 15675, 11682, 13, 81, 301, 3256, 705, 81, 11537, 355, 277, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 13, 961, 3419, 198, 198, 4480, 1280, 10786, 83, 6814, 14, 9641, 13, ...
2.430599
634
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
[ 2, 15069, 33448, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 733...
2.183843
1,931
import pandas as pd import numpy as np class DummyData: """Generate dummy data.""" def __init__( self, num_rows=1000, num_cols=5, rate=10, jitter=0.05, start_date="2018-01-01", seed=42, round=6, ): """ Initialize the datafram...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4871, 360, 13513, 6601, 25, 198, 220, 220, 220, 37227, 8645, 378, 31548, 1366, 526, 15931, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 198, 220, 220, ...
2.052871
1,097
import turtle import random tt = turtle.Turtle() tt.speed(0) tt.color('blue') for _ in range(random.randint(1, 100)): tt.forward(random.randint(0, 50)) tt.setheading(random.randint(0, 360)) turtle.done()
[ 11748, 28699, 198, 11748, 4738, 198, 198, 926, 796, 28699, 13, 51, 17964, 3419, 198, 926, 13, 12287, 7, 15, 8, 198, 926, 13, 8043, 10786, 17585, 11537, 198, 198, 1640, 4808, 287, 2837, 7, 25120, 13, 25192, 600, 7, 16, 11, 1802, 8,...
2.388889
90
import pytest import unittest from logo_app import generate_logo import io import pathlib
[ 11748, 12972, 9288, 201, 198, 11748, 555, 715, 395, 201, 198, 6738, 11112, 62, 1324, 1330, 7716, 62, 6404, 78, 201, 198, 11748, 33245, 201, 198, 11748, 3108, 8019, 201, 198 ]
3.064516
31
import os import math from itertools import islice from uvcgan.config import Args from uvcgan.data import get_data from uvcgan.torch.funcs import get_torch_device_smart, seed_everything from uvcgan.cgan import construct_model from uvcgan.utils.model_state import ModelState
[ 11748, 28686, 198, 11748, 10688, 198, 6738, 340, 861, 10141, 1330, 318, 75, 501, 198, 198, 6738, 334, 28435, 1030, 13, 11250, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1330, 943, 14542, 198, 6738, 334, 28435, 1030, 13, ...
2.453846
130
from labellines import labelLines, labelLine from datetime import datetime import numpy as np import matplotlib.pyplot as plt from matplotlib.dates import DayLocator, DateFormatter, UTC from numpy.testing import assert_raises import warnings import pytest @pytest.mark.mpl_image_compare @pytest.mark.mpl_image_compare...
[ 6738, 2248, 695, 1127, 1330, 6167, 43, 1127, 11, 6167, 13949, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 13, ...
2.594937
237
from django.contrib import admin from django.urls import path from . import views from django.views.generic.base import TemplateView urlpatterns = [ path('', views.upload_file, name='index'), #path('song/<int:id>/', views.song), #path('hello-webpack/', TemplateView.as_view(...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 13, 8692, 1330, 37350, 7680, 198, 198, 6371, 33279, 82, 796, ...
2.343915
189
"""Support for Sure Petcare cat/pet flaps.""" from __future__ import annotations import logging from typing import Any from surepy import ( MESTART_RESOURCE, SureLockStateID, SurePetcare, SurePetcareAuthenticationError, SurePetcareError, SurepyProduct, ) import voluptuous as vol from homeassi...
[ 37811, 15514, 329, 10889, 4767, 6651, 3797, 14, 6449, 781, 1686, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 18931, 198, 6738, 19720, 1330, 4377, 198, 198, 6738, 1654, 9078, 1330, 357, 198, 220, 220, 220, 337...
2.018972
3,637
from __future__ import annotations from copy import copy from functools import partial, wraps import sys import traceback import itertools from dataclasses import dataclass from math import prod from typing import Callable, Dict, List, Tuple, Union from collections.abc import Sequence import torch from typing_extensi...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 6738, 4866, 1330, 4866, 198, 6738, 1257, 310, 10141, 1330, 13027, 11, 27521, 198, 11748, 25064, 198, 198, 11748, 12854, 1891, 198, 11748, 340, 861, 10141, 198, 6738, 4818, 330, 28958, 1330, 4818,...
2.563397
1,672
__all__ = ( 'configure', ) def configure(repl): """ Configuration method. This is called during the start-up of ptpython. :param repl: `PythonRepl` instance. """ # Use this colorscheme for the code. repl.use_code_colorscheme('fruity')
[ 198, 834, 439, 834, 796, 357, 198, 220, 220, 220, 705, 11250, 495, 3256, 198, 8, 198, 198, 4299, 17425, 7, 35666, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 28373, 2446, 13, 770, 318, 1444, 1141, 262, 923, 12, 929, 286, ...
2.72449
98
#!/usr/bin/env python from contextlib import contextmanager # resource management def resourcemanager(acquire, release): """ Create a resource management function wrapped by contextlib.contextmanager. The supplied functions are used in the appropriate lifecycle phases. Example: class Disposable(...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 198, 2, 8271, 4542, 198, 198, 4299, 8271, 37153, 7, 330, 29782, 11, 2650, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 13610, 2...
2.65098
255
/home/runner/.cache/pip/pool/1a/e4/7d/230fe3cd9464c9e989e475fcac1ff0446c642017019b5aa1e78afbce19
[ 14, 11195, 14, 16737, 11757, 23870, 14, 79, 541, 14, 7742, 14, 16, 64, 14, 68, 19, 14, 22, 67, 14, 19214, 5036, 18, 10210, 5824, 2414, 66, 24, 68, 42520, 68, 32576, 16072, 330, 16, 487, 15, 27260, 66, 2414, 5539, 30484, 65, 20, ...
1.811321
53
from setuptools import find_packages, setup setup( name="HelloWorld", version="1.1.1.beta10", packages=find_packages(), scripts=["say_hello.py"], # Project uses reStructuredText, so ensure that the docutils get # installed or upgraded on the target machine install_requires=["docutils>=0.3"]...
[ 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 15496, 10603, 1600, 198, 220, 220, 220, 2196, 2625, 16, 13, 16, 13, 16, 13, 31361, 940, 1600, 198, 220, 220, 220, 10392, ...
2.658654
208
from functools import reduce alist = [1,-5,-8,3,-15,8,4,34,76,3,48,64,-7,6,-9,53] print(alist) blist = sorted(alist,key=lambda x:(x<0,abs(x + 1))) clist = list(filter(lambda x:x % 3 == 0,alist)) print(blist) print(clist) clist = reduce(lambda a, b: '{}, {}'.format(a,b), [1, 2, 3, 4, 5, 6, 7, 8, 9]) print(cl...
[ 6738, 1257, 310, 10141, 1330, 4646, 201, 198, 201, 198, 49845, 796, 685, 16, 12095, 20, 12095, 23, 11, 18, 12095, 1314, 11, 23, 11, 19, 11, 2682, 11, 4304, 11, 18, 11, 2780, 11, 2414, 12095, 22, 11, 21, 12095, 24, 11, 4310, 60, ...
2.025
160
# Pyrogram - Telegram MTProto API Client Library for Python # Copyright (C) 2017-2018 Dan Tès <https://github.com/delivrance> # # This file is part of Pyrogram. # # Pyrogram is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free S...
[ 2, 9485, 39529, 532, 50203, 19308, 2964, 1462, 7824, 20985, 10074, 329, 11361, 198, 2, 15069, 357, 34, 8, 2177, 12, 7908, 6035, 309, 14064, 82, 1279, 5450, 1378, 12567, 13, 785, 14, 12381, 452, 8132, 29, 198, 2, 198, 2, 770, 2393, ...
3.695833
240
from django.db import models from django.utils import timezone from django.contrib.postgres.fields import JSONField # Create your models here. # Extra fields to be added in the json file: related_entity, reputation_dimension, sentiment_score # Table to store training set of tweets # Table for statistics, the front...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 7353, 34239, 13, 25747, 1330, 19449, 15878, 198, 2, 13610, 534, 4981, 994, 13, 198, 2, 17221, ...
4
93
import os import torch import pandas as pd outF = open("random_results.csv", "w") for i in range(26, 100): thread_function(str(i)) if i < 10: name = "0" + str(i) else: name = str(i) heatmap = torch.load("mt_with_identity_newidset_moepli_randomlabelsExp" + name + "/a...
[ 11748, 28686, 201, 198, 11748, 28034, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 220, 220, 220, 220, 201, 198, 220, 220, 220, 220, 201, 198, 448, 37, 796, 1280, 7203, 25120, 62, 43420, 13, 40664, 1600, 366, 86, 4943, 201, ...
2.015251
1,377
from torch import nn from mmdet.utils import build_from_cfg from .registry import (BACKBONES, DETECTORS, HEADS, LOSSES, NECKS, ROI_EXTRACTORS, SHARED_HEADS, PAIR_MODULE)
[ 6738, 28034, 1330, 299, 77, 198, 198, 6738, 8085, 15255, 13, 26791, 1330, 1382, 62, 6738, 62, 37581, 198, 6738, 764, 2301, 4592, 1330, 357, 31098, 33, 39677, 11, 38267, 9782, 20673, 11, 39837, 50, 11, 406, 18420, 1546, 11, 399, 25171,...
2.193548
93
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import torch import torch.nn as nn
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, ...
3.75
44
#!/usr/bin/python # -*- coding: utf-8 -*- # --------------------------------------------------------------------------------------------- # MIT License # # Copyright (c) 2020, Solace Corporation, Ricardo Gomez-Ulmke (ricardo.gomez-ulmke@solace.com) # Copyright (c) 2020, Solace Corporation, Swen-Helge Huber <swen-helge....
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 1783, 32501, 198, 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 12131, 11, 4294, 558, 10501, 11, 38847, 33...
3.444126
698
from sys import maxsize
[ 6738, 25064, 1330, 3509, 7857 ]
4.6
5
from multiprocessing import Process from scrapers.poland import PolandScraper from scrapers.moldova_ro import MoldovaScraper from scrapers.hungary_hu import HungaryScraper from scrapers.romaina_ro import RomaniaScraper # # Country switch. # if __name__ == "__main__": # # Default value which is 'ALL'. # ...
[ 6738, 18540, 305, 919, 278, 1330, 10854, 198, 6738, 15881, 364, 13, 16104, 392, 1330, 12873, 3351, 38545, 198, 6738, 15881, 364, 13, 76, 727, 10071, 62, 305, 1330, 29684, 10071, 3351, 38545, 198, 6738, 15881, 364, 13, 43274, 560, 62, ...
2.601587
630
from abc import ABC, abstractmethod import itertools import numpy as np from rlpy.tools import __rlpy_location__ from pathlib import Path from .grid_world import GridWorld __license__ = "BSD 3-Clause" __author__ = "Yuji Kanagawa" class LifeLike(ABC): """Rule of life-like cellular automaton """ @abstra...
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 11748, 340, 861, 10141, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 374, 75, 9078, 13, 31391, 1330, 11593, 45895, 9078, 62, 24886, 834, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, ...
2.697595
291
from django.db import models # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 198, 2, 13610, 534, 4981, 994, 13, 628, 198 ]
3.529412
17
import re import irregularData import xml.etree.ElementTree as ET #tools for extractive endings from xml files #provides a list of irregualar nouns #provides a list of irregualar numerals #checks if input word is an irregular noun #returns true if so #checks if input word is an irregular numeral #ret...
[ 11748, 302, 201, 198, 11748, 21388, 6601, 201, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 201, 198, 201, 198, 2, 31391, 329, 7925, 425, 38168, 422, 35555, 3696, 201, 198, 201, 198, 2, 15234, 1460, 257, 1351, 286, ...
3.037879
132
import re
[ 11748, 302, 198 ]
3.333333
3
t = int(input()) n = int(input) while(t !=0): x = list(map(int,input().strip(' ').split(' '))) f = [] d = [] j = 1 i = 0 while (j<len(x)-1 or i < len(x)-1): f.append(x[i]) i = i + 2 d.append(x[j]) j = j + 2 i= 0 min_fuel = 1 last = 0 while(i<len(f...
[ 83, 796, 493, 7, 15414, 28955, 198, 77, 796, 493, 7, 15414, 8, 198, 4514, 7, 83, 14512, 15, 2599, 198, 220, 220, 220, 2124, 796, 1351, 7, 8899, 7, 600, 11, 15414, 22446, 36311, 10786, 705, 737, 35312, 10786, 705, 22305, 198, 220, ...
1.679012
324
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from typing import Any, Dict, List, Optional, Tuple import torch from fairseq.data.legacy.masked_lm_dictionary import MaskedLMDictionary from pytext.common.constants import SpecialTokens from pytext.config.component import C...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 1439, 6923, 33876, 198, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 32233, 11, 309, 29291, 198, 198...
3.085714
350
#Automatically created by SCRAM import os __path__.append(os.path.dirname(os.path.abspath(__file__).rsplit('/SUEPProd/Auxiliary/',1)[0])+'/cfipython/slc7_amd64_gcc700/SUEPProd/Auxiliary')
[ 2, 38062, 4142, 2727, 416, 6374, 24115, 198, 11748, 28686, 198, 834, 6978, 834, 13, 33295, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834, 7753, 834, 737, 3808, 489, 270, 10786, 14, 12564, 8905, 29...
2.292683
82
from .ops_det import * from .ops_img import *
[ 6738, 764, 2840, 62, 15255, 1330, 1635, 198, 6738, 764, 2840, 62, 9600, 1330, 1635, 198 ]
2.875
16
from classes import currency_converter converter = currency_converter.ABCurrencyConv()
[ 6738, 6097, 1330, 7395, 62, 1102, 332, 353, 198, 198, 1102, 332, 353, 796, 7395, 62, 1102, 332, 353, 13, 24694, 13382, 3103, 85, 3419, 628, 628 ]
3.37037
27
# -*- coding: utf-8 -*- __author__ = 'Oswaldo Ludwig' __version__ = '1.01' import numpy as np text = open('dialog_simple', 'r') q = open('context', 'w') a = open('answers', 'w') pre_pre_previous_raw='' pre_previous_raw='' previous_raw='' person = ' ' previous_person=' ' l1 = ['won’t','won\'t','wouldn’t','wouldn\'t'...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 796, 705, 46, 2032, 41476, 44476, 6, 198, 834, 9641, 834, 796, 705, 16, 13, 486, 6, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 5239, 796...
2.069682
818
from itertools import islice from passes import Pass from passes import PassResult from tasks import FusedTask from tasks import Sink
[ 6738, 340, 861, 10141, 1330, 318, 75, 501, 198, 6738, 8318, 1330, 6251, 198, 6738, 8318, 1330, 6251, 23004, 198, 6738, 8861, 1330, 376, 1484, 25714, 198, 6738, 8861, 1330, 311, 676, 628 ]
4.090909
33
from __future__ import print_function import argparse import difflib import os from os import path from collections import namedtuple VERSION="0.1" RATIO = "ratio" KEYWORD = "keyword" FOLLOW_LINKS_DEFAULT = True INCLUDE_HIDDEN_DEFAULT = False AppConfig = namedtuple("AppConfig", [ "version", "follow_links", "inc...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 1822, 29572, 198, 11748, 814, 8019, 198, 11748, 28686, 198, 6738, 28686, 1330, 3108, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 43717, 2625, 15, 13, 16, 1, 198, 198, 4...
2.722543
173
import os from io import BytesIO from PIL import Image as pilim from django.db.models.fields.files import FieldFile from reportlab.lib import colors from reportlab.lib.enums import TA_LEFT, TA_RIGHT, TA_CENTER from reportlab.lib.pagesizes import A4 from reportlab.lib.styles import getSampleStyleSheet from reportlab.li...
[ 11748, 28686, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 198, 6738, 350, 4146, 1330, 7412, 355, 5560, 320, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 25747, 13, 16624, 1330, 7663, 8979, 198, 6738, 989, 23912, 13, 8019, 1330, ...
2.081296
3,764
""" Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Example 1: Input: [1,3,null,null,2] 1 / 3 \ 2 Output: [3,1,null,null,2] 3 / 1 \ 2 Example 2: Input: [3,1,4,null,null,2] 3 / \ 1 4 / 2 Output: [2,1,4,null,null,...
[ 37811, 198, 7571, 4847, 286, 257, 13934, 2989, 5509, 357, 33, 2257, 8, 389, 37245, 416, 7457, 13, 198, 198, 6690, 2502, 262, 5509, 1231, 5609, 663, 4645, 13, 198, 198, 16281, 352, 25, 198, 198, 20560, 25, 685, 16, 11, 18, 11, 8423...
1.135135
851
import argparse import os from starfish.image import ImageStack from starfish.pipeline.pipelinecomponent import PipelineComponent from starfish.util.argparse import FsExistsType from . import _base from . import gaussian from . import local_max_peak_finder
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 198, 6738, 3491, 11084, 13, 9060, 1330, 7412, 25896, 198, 6738, 3491, 11084, 13, 79, 541, 4470, 13, 79, 541, 4470, 42895, 1330, 37709, 21950, 198, 6738, 3491, 11084, 13, 22602, 13, 853, 29572,...
3.647887
71
# -*- coding: utf-8 -*- from django.forms import ModelForm from django import forms from portal.models import * from django.forms.widgets import ClearableFileInput from django.contrib.admin.widgets import AdminDateWidget # class TurmaForm(forms.ModelForm): # class Meta: # # model = Turma # #inst...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 42625, 14208, 13, 23914, 1330, 9104, 8479, 198, 6738, 42625, 14208, 1330, 5107, 198, 198, 6738, 17898, 13, 27530, 1330, 1635, 198, 6738, 42625, 14208, 13, 23914...
1.955373
2,308
import argparse import asyncio import asyncio.subprocess import os import signal import subprocess import wbml.out as out spawned = [] def read_values(xs, sep, *values): """Read values from a string. Args: xs (str): Values as one string. sep (str): Separator separating the values in the str...
[ 11748, 1822, 29572, 198, 11748, 30351, 952, 198, 11748, 30351, 952, 13, 7266, 14681, 198, 11748, 28686, 198, 11748, 6737, 198, 11748, 850, 14681, 198, 198, 11748, 266, 65, 4029, 13, 448, 355, 503, 198, 198, 48183, 276, 796, 17635, 628, ...
2.245705
1,921
import logging from fastapi import APIRouter from app.utils.clustering.clustering_mvp import batch_cluster # global variables and services router = APIRouter() log = logging.getLogger(__name__) @router.post("/cluster") async def cluster_endpoint(sub: dict): """Endpoint takes a list of cohort and submission ob...
[ 11748, 18931, 198, 198, 6738, 3049, 15042, 1330, 3486, 4663, 39605, 198, 198, 6738, 598, 13, 26791, 13, 565, 436, 1586, 13, 565, 436, 1586, 62, 76, 36133, 1330, 15458, 62, 565, 5819, 628, 198, 2, 3298, 9633, 290, 2594, 198, 472, 353...
1.910766
1,031
import collections import itertools import statistics from .. import stats from . import base from . import confusion __all__ = [ 'MacroPrecision', 'MicroPrecision', 'Precision', 'RollingMacroPrecision', 'RollingMicroPrecision', 'RollingPrecision' ] class Precision(stats.Mean, BasePrecisi...
[ 11748, 17268, 198, 11748, 340, 861, 10141, 198, 11748, 7869, 198, 198, 6738, 11485, 1330, 9756, 198, 198, 6738, 764, 1330, 2779, 198, 6738, 764, 1330, 10802, 628, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 14155, 305, 6719...
2.210132
2,270
""" Debugger for Ignition Python scripts. """ __copyright__ = """Copyright (C) 2020 Corso Systems""" __license__ = 'Apache 2.0' __maintainer__ = 'Andrew Geiger' __email__ = 'andrew.geiger@corsosystems.com'
[ 37811, 198, 220, 220, 220, 31687, 1362, 329, 16583, 653, 11361, 14750, 13, 198, 37811, 628, 198, 834, 22163, 4766, 834, 796, 37227, 15269, 357, 34, 8, 12131, 2744, 568, 11998, 37811, 198, 834, 43085, 834, 796, 705, 25189, 4891, 362, 1...
2.776316
76
import numpy as np from scipy.optimize import root_scalar from .conf import default_motor_parameter import warnings import math class PmsmModel: """ Technical Model of a Permanent Magnet Synchronous Motor (PMSM). Description: This class contains the technical properties of a PMSM. ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 6808, 62, 1416, 282, 283, 198, 6738, 764, 10414, 1330, 4277, 62, 76, 20965, 62, 17143, 2357, 198, 11748, 14601, 198, 11748, 10688, 628, 198, 4871, 350, 907...
2.201471
5,301
# Copyright 2018 WolkAbout Technology s.r.o. # # 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 l...
[ 2, 220, 220, 15069, 2864, 370, 13597, 8585, 8987, 264, 13, 81, 13, 78, 13, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 345, 743, 407, 779, 428,...
3.060367
381
import spidev import time spi = spidev.SpiDev() spi.open(0,0) spi.max_speed_hz = 1 while True: resp = spi.xfer2([0xDE]) print resp[0] time.sleep(1)
[ 11748, 599, 485, 85, 198, 11748, 640, 198, 2777, 72, 796, 599, 485, 85, 13, 4561, 72, 13603, 3419, 198, 2777, 72, 13, 9654, 7, 15, 11, 15, 8, 198, 2777, 72, 13, 9806, 62, 12287, 62, 32179, 796, 352, 198, 4514, 6407, 25, 198, 1...
1.950617
81
import datetime import logging import random from typing import List, Tuple, Union from conflowgen.tools.weekly_distribution import WeeklyDistribution from ..domain_models.arrival_information import TruckArrivalInformationForPickup from ..domain_models.container import Container from ..domain_models.distribution_repos...
[ 11748, 4818, 8079, 198, 11748, 18931, 198, 11748, 4738, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 4479, 198, 198, 6738, 1013, 9319, 5235, 13, 31391, 13, 45291, 62, 17080, 3890, 1330, 18168, 20344, 3890, 198, 6738, 11485, 27830, ...
3.796296
162
# encoding: utf-8 from numpy import array from matplotlib import pyplot as plt # 参数依次为list,抬头,X轴标签,Y轴标签,XY轴的范围 areaList = get_data_from_csv() min_value = min(areaList) max_value = max(areaList) draw_hist(areaList,'Rollover-Histogram','Rollover Yield','Frequency',min_value, max_value,0.0,50) # 直方图...
[ 2, 21004, 25, 3384, 69, 12, 23, 201, 198, 201, 198, 6738, 299, 32152, 1330, 7177, 201, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 201, 198, 201, 198, 201, 198, 2, 10263, 237, 224, 46763, 108, 160, 122, 251, 16...
1.770492
183
import os import json from delira._version import get_versions as _get_versions # to register new possible backends, they have to be added to this list. # each backend should consist of a tuple of length 2 with the first entry # being the package import name and the second being the backend abbreviation. # E.g. Tensor...
[ 11748, 28686, 198, 11748, 33918, 198, 6738, 1619, 8704, 13557, 9641, 1330, 651, 62, 47178, 355, 4808, 1136, 62, 47178, 198, 198, 2, 284, 7881, 649, 1744, 736, 2412, 11, 484, 423, 284, 307, 2087, 284, 428, 1351, 13, 198, 2, 1123, 302...
2.339786
1,498
#!/usr/bin/env python import json import logging from elasticsearch.exceptions import NotFoundError from elasticsearch.helpers import scan from kafka import KafkaProducer from binoas.es import setup_elasticsearch from binoas.db import setup_db from binoas.models import User, UserQueries from binoas.mixins import Pr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 33918, 198, 11748, 18931, 198, 198, 6738, 27468, 12947, 13, 1069, 11755, 1330, 1892, 21077, 12331, 198, 6738, 27468, 12947, 13, 16794, 364, 1330, 9367, 198, 198, 6738, 479, 1...
3.453704
108
from __future__ import annotations from dataclasses import replace from functools import partial from typing import Any, Awaitable, Callable, Dict, List from ..common import ( ACTION, AND, ASYNC_VOID, DEFAULT, DEFAULT_KEYERROR, HANDLERS, IDENTITY_FACTORY, IS_CALLABLE, IS_DICT, ...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 4818, 330, 28958, 1330, 6330, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 19720, 1330, 4377, 11, 5851, 4548, 540, 11, 4889, 540, 11, 360, 713, 11, 7343, 198, 198, 6738, 11...
2.425641
390
import unittest from dart.client.python.dart_client import Dart from dart.engine.no_op.metadata import NoOpActionTypes from dart.model.action import ActionData, Action, ActionState from dart.model.datastore import Datastore, DatastoreData, DatastoreState """ -------------------------------- IMPORTANT NOTE -----------...
[ 11748, 555, 715, 395, 198, 198, 6738, 35970, 13, 16366, 13, 29412, 13, 67, 433, 62, 16366, 1330, 29032, 198, 6738, 35970, 13, 18392, 13, 3919, 62, 404, 13, 38993, 1330, 1400, 18257, 12502, 31431, 198, 6738, 35970, 13, 19849, 13, 2673,...
3.07362
326
from pytube import YouTube, Playlist import time # Play('https://www.youtube.com/playlist?list=PLCnqvb4OGG10qseF62egHuv5FNmhJxASQ').download()
[ 6738, 12972, 29302, 1330, 7444, 11, 3811, 4868, 201, 198, 11748, 640, 201, 198, 220, 220, 220, 220, 201, 198, 201, 198, 201, 198, 2, 3811, 10786, 5450, 1378, 2503, 13, 11604, 13, 785, 14, 1759, 4868, 30, 4868, 28, 47, 5639, 77, 44...
2.298507
67
expected_output = { "vlan_id":{ "122":{ "access_map_tag":"edu_VACL" } } }
[ 40319, 62, 22915, 796, 1391, 198, 220, 220, 220, 366, 85, 9620, 62, 312, 1298, 90, 198, 220, 220, 220, 220, 220, 220, 220, 366, 18376, 1298, 90, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 15526, 62, 8899, 6...
1.571429
70
# # Copyright (c) 2019 Red Hat, Inc. # # 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 ...
[ 2, 198, 2, 220, 15069, 357, 66, 8, 13130, 2297, 10983, 11, 3457, 13, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743, 407, 779, 428, 2393, 2845, 287...
1.860227
6,160
import logging import sys from injector import inject from ..config import temp_sensor_path
[ 11748, 18931, 198, 11748, 25064, 198, 6738, 8677, 273, 1330, 8677, 198, 198, 6738, 11485, 11250, 1330, 20218, 62, 82, 22854, 62, 6978, 628 ]
3.916667
24
from selenium import webdriver browser = webdriver.Chrome() browser.get("https://techstepacademy.com/training-ground") input1_css_locator = 'input[id="ipt1"]' button4_xpath_locator = '//button[@id="b4"]' #Assign elements input1_el = browser.find_element_by_css_selector(input1_css_locator) btn4_el = browser.find_elem...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 198, 40259, 796, 3992, 26230, 13, 1925, 5998, 3419, 198, 40259, 13, 1136, 7203, 5450, 1378, 13670, 9662, 330, 324, 3065, 13, 785, 14, 34409, 12, 2833, 4943, 198, 198, 15414, 16, 62, 2547...
2.635294
170
import unittest from os import path from puzzlesolver.imageprocess import chaincode from puzzlesolver.embedding import text_representation as text_embedding from puzzlesolver.utils import get_project_root from puzzlesolver.similarity import jaccard class TestFunctional(unittest.TestCase): '''Functional tests'...
[ 11748, 555, 715, 395, 198, 198, 6738, 28686, 1330, 3108, 198, 198, 6738, 24367, 14375, 13, 9060, 14681, 1330, 6333, 8189, 198, 6738, 24367, 14375, 13, 20521, 12083, 1330, 2420, 62, 15603, 341, 355, 2420, 62, 20521, 12083, 198, 6738, 243...
3.670455
88
from unittest import mock from cterasdk.object import Gateway from tests.ut import base
[ 6738, 555, 715, 395, 1330, 15290, 198, 198, 6738, 269, 353, 292, 34388, 13, 15252, 1330, 29916, 198, 6738, 5254, 13, 315, 1330, 2779, 628 ]
3.6
25
from .bot import NuggetBot #NuggetBot.listen(on_message)(test_print)
[ 6738, 764, 13645, 1330, 45777, 1136, 20630, 201, 198, 201, 198, 201, 198, 201, 198, 2, 45, 1018, 1136, 20630, 13, 4868, 268, 7, 261, 62, 20500, 5769, 9288, 62, 4798, 8 ]
2.34375
32
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
from ..Region.Region import Region class IMARegion: """A IMARegion is an object used to define material instance name volume fractions for the MaterialAssignment predefined field. Attributes ---------- region: Region A :py:class:`~abaqus.Region.Region.Region` object specifying the sub-re...
[ 6738, 11485, 47371, 13, 47371, 1330, 17718, 628, 198, 4871, 8959, 1503, 1533, 295, 25, 198, 220, 220, 220, 37227, 32, 8959, 1503, 1533, 295, 318, 281, 2134, 973, 284, 8160, 2587, 4554, 1438, 6115, 49876, 329, 262, 198, 220, 220, 220, ...
3.282776
389
import cfg import discord import utils import functions as func from commands.base import Cmd from time import time help_text = [ [ ("Usage:", "<PREFIX><COMMAND>"), ("Description:", "Make your voice channel private, preventing anyone from joining you directly.\n\n" "Creates a \"⇧ ...
[ 11748, 30218, 70, 198, 11748, 36446, 198, 11748, 3384, 4487, 198, 11748, 5499, 355, 25439, 198, 6738, 9729, 13, 8692, 1330, 327, 9132, 198, 6738, 640, 1330, 640, 198, 198, 16794, 62, 5239, 796, 685, 198, 220, 220, 220, 685, 198, 220, ...
2.666667
261
import torch import math import numpy as np import torchvision.transforms as transforms from pytracking import TensorDict import ltr.data.processing_utils as prutils class BaseProcessing: """ Base class for Processing. Processing class is used to process the data returned by a dataset, before passing it thr...
[ 11748, 28034, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 10178, 13, 7645, 23914, 355, 31408, 198, 6738, 12972, 36280, 1330, 309, 22854, 35, 713, 198, 11748, 300, 2213, 13, 7890, 13, 36948, 62, 26791, 355, ...
2.301711
17,646
#!/usr/bin/python3 -u from helper import * import sys import time parser=add_parser() if not parser.prepare and not parser.fork: print("No args given, use -h for help.") sys.exit(1) vmlist = vm_list() locallist = local_list() currenttime = time.time() vmprefix = random_str(5) if parser.prepare != None: ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 532, 84, 198, 198, 6738, 31904, 1330, 1635, 198, 11748, 25064, 198, 11748, 640, 628, 198, 48610, 28, 2860, 62, 48610, 3419, 198, 198, 361, 407, 30751, 13, 46012, 533, 290, 407, 30751, 13, 32...
1.990544
3,384
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.temp_page), url(r'temp_page$', views.temp_page), url(r'get_temp$', views.get_temp_req), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 3, 3256, 5009, 13, 29510, 62, 7700, 828, 198, 220, 220, 220, ...
2.289157
83
''' Interactive Converging-Diverging Nozzle Visualisation ---> Integrating with the Compressible Flow Rig! A pythonic refactoring of CDN.m (William Devenport, Virginia Tech) by Raihaan Usman =================================================================== Mechanical Engineering, Imperial College London ''' impo...
[ 198, 7061, 6, 198, 9492, 5275, 35602, 2667, 12, 35, 1428, 2667, 1400, 26413, 15612, 5612, 198, 438, 3784, 15995, 8821, 351, 262, 3082, 601, 856, 27782, 24666, 0, 198, 198, 32, 21015, 291, 1006, 529, 3255, 286, 6458, 45, 13, 76, 357,...
2.625968
1,679
# Copyright 2020 Thomas Rogers # SPDX-License-Identifier: Apache-2.0 import os.path try: import pkg_resources except ImportError:
[ 2, 15069, 12131, 5658, 15372, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 11748, 28686, 13, 6978, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 279, 10025, 62, 37540, 628, 198, 16341, 17267, ...
3
46
print('-=-' * 30) termo = int(input('Termo: ')) razao = int(input('Razao ')) c = 1 while c <= 10: print('{}'.format(termo), end=' -> ') termo += razao c += 1 print('Fim')
[ 4798, 10786, 12, 10779, 6, 1635, 1542, 8, 198, 4354, 78, 796, 493, 7, 15414, 10786, 15156, 5908, 25, 705, 4008, 198, 3247, 5488, 796, 493, 7, 15414, 10786, 49, 1031, 5488, 705, 4008, 198, 66, 796, 352, 198, 4514, 269, 19841, 838, ...
2.103448
87
#!/usr/bin/env python """ Python library for interfacing with the Zoho Docs API. """ from setuptools import setup setup( name='zohodocs', version='0.1.0', description=__doc__, author='Matt Robenolt', author_email='matt@ydekproductions.com', packages=[ 'zohodocs', ], package_dir=...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 37906, 5888, 329, 9556, 4092, 351, 262, 1168, 40950, 14432, 82, 7824, 13, 198, 37811, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438...
2.464052
306
# Generated by Django 2.2.6 on 2019-10-30 10:36 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 21, 319, 13130, 12, 940, 12, 1270, 838, 25, 2623, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
import pytest from yahooquery import Screener
[ 11748, 12972, 9288, 198, 198, 6738, 331, 12992, 22766, 1330, 1446, 260, 877, 628, 628 ]
3.333333
15
from airflow.hooks.postgres_hook import PostgresHook from airflow.models import BaseOperator from airflow.utils.decorators import apply_defaults
[ 6738, 45771, 13, 25480, 82, 13, 7353, 34239, 62, 25480, 1330, 2947, 34239, 39, 566, 198, 6738, 45771, 13, 27530, 1330, 7308, 18843, 1352, 198, 6738, 45771, 13, 26791, 13, 12501, 273, 2024, 1330, 4174, 62, 12286, 82, 628 ]
3.74359
39
# -*- coding: utf-8 -*- import time import datetime import web3 from web3 import Web3, HTTPProvider, IPCProvider import abisensores #base64.urlsafe_b64encode(os.urandom(32)) web3 = Web3(HTTPProvider(<IP:Port blockchain network>)) abi = abisensores.abi() ''' ''' scAddress = "0x1226600589283c8de1d684b09a0fb143bb...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 640, 198, 11748, 4818, 8079, 198, 11748, 3992, 18, 197, 197, 197, 197, 197, 197, 198, 6738, 3992, 18, 1330, 5313, 18, 11, 14626, 29495, 11, 314, 5662, 29495, 19...
2.522034
295
''' This is the starting script which taken input argument python initialize arg[1] arg[2], where arg[1] is the category name i.e. [amazon, youtube etc] and arg[2] [small, medium etc] is the vaiant name. ''' import sys,os,json,time import pandas as pd from py2neo import Graph, Node, Relationship, Database from py2neo....
[ 7061, 6, 198, 1212, 318, 262, 3599, 4226, 543, 2077, 5128, 4578, 21015, 41216, 1822, 58, 16, 60, 1822, 58, 17, 4357, 220, 198, 3003, 1822, 58, 16, 60, 318, 262, 6536, 1438, 1312, 13, 68, 13, 685, 33103, 11, 35116, 3503, 60, 290, ...
2.907162
1,131
""" SamFirm Bot initialization""" import json import logging import sys from os.path import dirname WORK_DIR = dirname(__file__) PARENT_DIR = '/'.join(dirname(__file__).split('/')[:-1]) # read bog config with open(f'{PARENT_DIR}/config.json', 'r') as f: CONFIG = json.load(f) API_KEY = CONFIG['api_key'] API_HASH =...
[ 37811, 3409, 37, 2533, 18579, 37588, 37811, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 25064, 198, 6738, 28686, 13, 6978, 1330, 26672, 3672, 198, 198, 33249, 62, 34720, 796, 26672, 3672, 7, 834, 7753, 834, 8, 198, 27082, 3525, 62...
2.420732
492
import pymongo import os, subprocess import sys import re class MongoClient(): ''' Connects to mongo database and executes scripts '''
[ 11748, 279, 4948, 25162, 198, 11748, 28686, 11, 850, 14681, 198, 11748, 25064, 198, 11748, 302, 628, 198, 4871, 42591, 11792, 33529, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 8113, 82, 284, 285, 25162, 6831, 290, 42985, 14750, ...
3.125
48
from direct.gui.DirectGui import * from panda3d.core import * from direct.directnotify import DirectNotifyGlobal from otp.otpbase import OTPGlobals from pirates.piratesgui import PiratesGuiGlobals from pirates.piratesbase import PiratesGlobals from pirates.piratesbase import PLocalizer from pirates.band import BandCons...
[ 6738, 1277, 13, 48317, 13, 13470, 8205, 72, 1330, 1635, 198, 6738, 279, 5282, 18, 67, 13, 7295, 1330, 1635, 198, 6738, 1277, 13, 12942, 1662, 1958, 1330, 4128, 3673, 1958, 22289, 198, 6738, 30972, 79, 13, 313, 79, 8692, 1330, 21676, ...
3.401709
117
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from abc import abst...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 1946, 41689, 1628, 20420, 357, 3826, 27342, 9865, 3843, 20673, 13, 9132, 737, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 3826, 38559, 24290, 737, 198, 198, 6738, 1...
3.652874
435
rraise Exception('e')
[ 81, 40225, 35528, 10786, 68, 11537 ]
3.5
6
from typing import List from logbunker.contexts.shared.domain.BaseObject import BaseObject from logbunker.contexts.shared.domain.DomainEvent import DomainEvent from logbunker.contexts.shared.domain.EventBus import EventBus from logbunker.contexts.shared.domain.EventSubscriber import EventSubscriber
[ 6738, 19720, 1330, 7343, 198, 198, 6738, 2604, 65, 21705, 13, 22866, 82, 13, 28710, 13, 27830, 13, 14881, 10267, 1330, 7308, 10267, 198, 6738, 2604, 65, 21705, 13, 22866, 82, 13, 28710, 13, 27830, 13, 43961, 9237, 1330, 20021, 9237, 1...
3.682927
82
# -*- coding: utf-8 -*- """ Created on Wed Jan 6 13:39:58 2021 @author: siboc """ import numpy as np import scipy import math import matplotlib.pyplot as plt from keras.models import Sequential from keras.layers import Dense from sklearn.metrics import r2_score import tensorflow as tf import keras...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 3300, 2365, 220, 718, 1511, 25, 2670, 25, 3365, 33448, 201, 198, 201, 198, 31, 9800, 25, 264, 571, 420, 201, 198, 37811, 201, 198, ...
2.465646
2,416
import unittest import googleapiclient if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 23645, 499, 291, 75, 1153, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.588235
34
from pymongo import MongoClient from config import MONGO_HOST, MONGO_PORT, MONGO_DB client = MongoClient() client = MongoClient(MONGO_HOST, MONGO_PORT, connect=False) db = client[MONGO_DB]
[ 6738, 279, 4948, 25162, 1330, 42591, 11792, 198, 6738, 4566, 1330, 25000, 11230, 62, 39, 10892, 11, 25000, 11230, 62, 15490, 11, 25000, 11230, 62, 11012, 198, 198, 16366, 796, 42591, 11792, 3419, 198, 16366, 796, 42591, 11792, 7, 27857, ...
2.814286
70
import pathlib from collections import OrderedDict from typing import List from openff.toolkit.typing.engines.smirnoff import ForceField from openff.toolkit.utils import unit_to_string from pkg_resources import resource_filename from simtk import openmm from simtk import unit as omm_unit from openff.system import uni...
[ 11748, 3108, 8019, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 1280, 487, 13, 25981, 15813, 13, 774, 13886, 13, 1516, 1127, 13, 5796, 343, 77, 2364, 1330, 5221, 15878, 198, 6738, 1280, 4...
2.763941
1,076