content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# -*- coding: utf-8 -*- """Tests for the key interactiveshell module. Authors ------- * Julian Taylor """ #----------------------------------------------------------------------------- # Copyright (C) 2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # th...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 51, 3558, 329, 262, 1994, 9427, 1083, 12758, 8265, 13, 198, 198, 30515, 669, 198, 26866, 198, 9, 18322, 8121, 198, 37811, 198, 2, 10097, 32501, 198, 2, 220, 150...
4.388013
317
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
[ 2, 15069, 13130, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 201, 198, 2, 201, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 201, 198, 2, 345, 743, 407, 779, 428, 2393, ...
2.182728
2,397
import sys sys.path.append("../pipeline") import mysql.connector import pickle import argparse import json import itertools from collections import defaultdict,Counter from collections.abc import Iterable import numpy as np import time import os from scipy import stats from sklearn.multiclass import OneVsRestClassifi...
[ 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7203, 40720, 79, 541, 4470, 4943, 198, 198, 11748, 48761, 13, 8443, 273, 198, 11748, 2298, 293, 198, 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 340, 861, 10141, 198, 6738, 17268, 13...
2.582307
1,786
import string import PIL.Image from .printable import Printable class _ImageHandler: """Convert PIL images to ZPL Based on Java example from: http://www.jcgonzalez.com/java-image-to-zpl-example """ @staticmethod @staticmethod @property @property
[ 11748, 4731, 198, 11748, 350, 4146, 13, 5159, 198, 198, 6738, 764, 4798, 540, 1330, 12578, 540, 628, 198, 4871, 4808, 5159, 25060, 25, 198, 220, 220, 220, 37227, 3103, 1851, 350, 4146, 4263, 284, 1168, 6489, 628, 220, 220, 220, 13403,...
2.759615
104
from .context import uspto import unittest class AdvancedTestSuite(unittest.TestCase): """Advanced test cases.""" print "here we go" if __name__ == '__main__': unittest.main()
[ 6738, 764, 22866, 1330, 514, 457, 78, 198, 198, 11748, 555, 715, 395, 198, 198, 4871, 13435, 14402, 5606, 578, 7, 403, 715, 395, 13, 14402, 20448, 2599, 198, 220, 220, 220, 37227, 28809, 1332, 2663, 526, 15931, 198, 220, 220, 220, 3...
2.690141
71
import discord from discord.ext import commands
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 628 ]
4.9
10
import logging from playhouse import migrate from alcazar_logging import BraceAdapter logger = BraceAdapter(logging.getLogger(__name__))
[ 11748, 18931, 198, 198, 6738, 711, 4803, 1330, 32492, 198, 198, 6738, 435, 66, 29413, 62, 6404, 2667, 1330, 1709, 558, 47307, 198, 198, 6404, 1362, 796, 1709, 558, 47307, 7, 6404, 2667, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 4008, ...
3.2
45
from uuid import UUID from aio_pika import Exchange from tentacruel import HeosClientProtocol HEOS_NS = UUID('003df636-ad90-11e9-aca1-9eb6d06a70c5') attributes = { "/player_volume_changed": { "device_id": "pid", "name": "heos.volume", "subattributes": ["level", "mute"] }, "/player_...
[ 6738, 334, 27112, 1330, 471, 27586, 198, 198, 6738, 257, 952, 62, 79, 9232, 1330, 12516, 198, 6738, 11105, 330, 622, 417, 1330, 679, 418, 11792, 19703, 4668, 198, 198, 13909, 2640, 62, 8035, 796, 471, 27586, 10786, 11245, 7568, 21, 26...
2.163551
214
import sys import cPickle as pickle from collections import OrderedDict argv = sys.argv[1:] if len(argv) < 1: print "usage: create_span_concept_dict.py <span_concept_dataset.p> <output_filename>" sys.exit() span_concept_dataset = pickle.load(open(argv[0], "rb")) output_filename = argv[1] output_file = open(output_f...
[ 11748, 25064, 198, 11748, 269, 31686, 293, 355, 2298, 293, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 853, 85, 796, 25064, 13, 853, 85, 58, 16, 47715, 198, 361, 18896, 7, 853, 85, 8, 1279, 352, 25, 198, 197, 4798, 366...
2.663136
472
# -*- coding: utf-8 -*- from queue import Queue import random import socket import threading import unittest from coapclient import HelperClient from coapforwardproxy import CoAPForwardProxy from coapserver import CoAPServer from coapthon import defines from coapthon.messages.option import Option from coapthon.messag...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 16834, 1330, 4670, 518, 198, 11748, 4738, 198, 11748, 17802, 198, 11748, 4704, 278, 198, 11748, 555, 715, 395, 198, 198, 6738, 763, 499, 16366, 1330, 5053, 52...
3.151163
172
from datetime import datetime import pandas as pd import websocket from tests import tests_path from crypto_data.shared.utils import exclude_values from crypto_data.binance.extract import get_candles, get_latest_candle_timestamp from crypto_data.binance.schema import ( OPEN_TIME, OPEN_PRICE, CLOSE_PRICE, ...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2639, 5459, 198, 198, 6738, 5254, 1330, 5254, 62, 6978, 198, 6738, 21473, 62, 7890, 13, 28710, 13, 26791, 1330, 19607, 62, 27160, 198, 6738, 21...
2.261905
294
import numpy as np from NiLBS.skinning.util import redistribute_weights
[ 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 11556, 43, 4462, 13, 20407, 768, 13, 22602, 1330, 17678, 4163, 62, 43775, 198 ]
3.217391
23
import cv2 import youtube_dl import numpy as np import os import time FLASH_MINIMUM = 3 tmp_dir = 'temp/' ex = {'format': 'worstvideo[vcodec^=avc1][fps=30]/worst[vcodec^=avc1][fps=30]/worstvideo[vcodec=vp9][fps=30]/worst[vcodec=vp9][fps=30]', 'outtmpl': 'temp/temp.%(ext)s', 'recode_video': 'webm'} ytdl = youtube_dl....
[ 11748, 269, 85, 17, 198, 11748, 35116, 62, 25404, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 640, 198, 198, 3697, 11211, 62, 23678, 3955, 5883, 796, 513, 198, 198, 22065, 62, 15908, 796, 705, 29510, 14, 6, 198,...
2.179487
312
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ 2, 15069, 1584, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
2.030542
7,596
from queue import Queue from queue import Empty from threading import Thread from pyopentsdb import errors from pyopentsdb.utils import request_post from pyopentsdb.conf import QueryPointer class IterableQueue(object): """ Transform standard python Queue instance to iterable one""" def __init__(self, source...
[ 6738, 16834, 1330, 4670, 518, 198, 6738, 16834, 1330, 33523, 198, 6738, 4704, 278, 1330, 14122, 198, 198, 6738, 12972, 404, 658, 9945, 1330, 8563, 198, 6738, 12972, 404, 658, 9945, 13, 26791, 1330, 2581, 62, 7353, 198, 6738, 12972, 404,...
2.509267
2,266
import numpy as np import torch import torch.nn.functional as F import sparseconvnet as scn import data_util UNK_THRESH = 2 #UNK_THRESH = 3 UNK_ID = -1 # note: weight_missing_geo must be > 1 # hierarchical loss
[ 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 11748, 29877, 42946, 3262, 355, 629, 77, 198, 198, 11748, 1366, 62, 22602, 198, 198, 4944, 42, 62, 4221, 19535, 39, 79...
2.611765
85
r"""Integrator functions used when no closed forms are available. Lead author: Nicolas Guigui. These are designed for first order ODE written of a variable x and a time variable t: .. math:: \frac{dx}{dt} = force(x, t) where :math: `x` is called the state variable. It may represent many variable...
[ 81, 37811, 34500, 12392, 5499, 973, 618, 645, 4838, 5107, 389, 1695, 13, 198, 198, 20451, 1772, 25, 29737, 1962, 328, 9019, 13, 198, 198, 4711, 389, 3562, 329, 717, 1502, 440, 7206, 3194, 286, 257, 7885, 2124, 290, 257, 640, 198, 45...
2.547081
2,347
""" This module schedules all the tasks according to config.rules. """ import click import logging import multiprocessing import schedule import time from scrapy.crawler import CrawlerRunner from scrapy.utils.project import get_project_settings from twisted.internet import reactor from haipproxy.client import SquidCl...
[ 37811, 198, 1212, 8265, 24025, 477, 262, 8861, 1864, 284, 4566, 13, 38785, 13, 198, 37811, 198, 11748, 3904, 198, 11748, 18931, 198, 11748, 18540, 305, 919, 278, 198, 11748, 7269, 198, 11748, 640, 198, 198, 6738, 15881, 88, 13, 66, 39...
2.734247
365
import os import subprocess as sp from .srbColour import Colour
[ 11748, 28686, 198, 11748, 850, 14681, 355, 599, 198, 198, 6738, 764, 82, 26145, 5216, 454, 1330, 38773, 628 ]
3.473684
19
#!/usr/bin/env python # coding: utf8 from __future__ import unicode_literals import random import operator from typing import Dict categories = {'FAULT': 0, 'INFO': 0, 'TOXIC': 0, 'REPAIR': 0}
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 4738, 198, 11748, 10088, 198, 6738, 19720, 1330, 360, 713, 198, 198, 66, ...
2.8
70
input_num = '22235253534090' reverse(input_num)
[ 198, 15414, 62, 22510, 796, 705, 1828, 22370, 1495, 2327, 23601, 3829, 6, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 198, 50188, 7, 15414, 62, 22510, 8, 628, 198 ]
1.90625
32
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ 2, 15069, 33448, 43208, 21852, 1766, 1539, 12052, 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...
1.813442
5,907
from array import array def _copytobuffer(x): """ return a copy of x as an object that supports the python Buffer API (python array if input is float, list or tuple, numpy array if input is a numpy array). returns copyofx, isfloat, islist, istuple (islist is True if input is a list, istuple is tr...
[ 6738, 7177, 1330, 7177, 628, 198, 198, 4299, 4808, 30073, 83, 672, 13712, 7, 87, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 257, 4866, 286, 2124, 355, 281, 2134, 326, 6971, 262, 21015, 47017, 198, 220, 220, 220, 7824...
2.011576
1,123
import importlib package = 'aao.spiders.bookmakers' SpiderBet365 = importlib.import_module( '.bet365', package).SpiderBet365 SpiderBwin = importlib.import_module( '.bwin', package).SpiderBwin Spider888sport = importlib.import_module( '.888sport', package).Spider888sport SpiderWilliamhill = importlib.impor...
[ 11748, 1330, 8019, 198, 198, 26495, 796, 705, 64, 5488, 13, 2777, 4157, 13, 2070, 6620, 6, 198, 198, 41294, 13056, 24760, 796, 1330, 8019, 13, 11748, 62, 21412, 7, 198, 220, 220, 220, 45302, 11181, 24760, 3256, 5301, 737, 41294, 13056...
2.824176
182
#!/usr/bin/env python3 from reporting.category import Category from statsSend.jenkins.jenkinsBuild import JenkinsBuild
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 6447, 13, 22872, 1330, 21743, 198, 6738, 9756, 25206, 13, 48796, 5331, 13, 48796, 5331, 15580, 1330, 21835, 15580 ]
3.83871
31
#! /usr/bin/env python3 # SPDX-FileCopyrightText: 2022 geisserml <geisserml@gmail.com> # SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause # Download the PDFium binaries and generate ctypes bindings import os import sys import shutil import tarfile import argparse import traceback from urllib import request from os...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 30628, 55, 12, 8979, 15269, 8206, 25, 33160, 4903, 747, 263, 4029, 1279, 469, 747, 263, 4029, 31, 14816, 13, 785, 29, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, ...
2.535587
562
from gin.i_o.from_smiles import to_mols import pandas as pd df = pd.read_csv('data/delaney-processed.csv') smiles_array = df[['smiles']].values.flatten() mols = to_mols(smiles_array) for mol in mols: print(mol)
[ 6738, 39733, 13, 72, 62, 78, 13, 6738, 62, 5796, 2915, 1330, 284, 62, 76, 10220, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 7568, 796, 279, 67, 13, 961, 62, 40664, 10786, 7890, 14, 12381, 22297, 12, 14681, 276, 13, 40664, 115...
2.333333
93
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2017-01-16 17:12 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 24, 13, 24, 319, 2177, 12, 486, 12, 1433, 1596, 25, 1065, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 19...
2.724638
69
PhoneDirectory = ['John:009878788677' , 'Jefrey:67654654645' , 'Maria:8787677766'] for entry in PhoneDirectory: if '7' in entry: print('yeah')
[ 6132, 43055, 796, 37250, 7554, 25, 405, 4089, 41019, 3459, 40179, 6, 837, 705, 41, 891, 4364, 25, 3134, 39111, 2996, 3510, 2231, 6, 837, 705, 46827, 25, 23, 3695, 32059, 3324, 2791, 20520, 628, 198, 1640, 5726, 287, 14484, 43055, 25, ...
2.378788
66
FILENAME = './puzzle15/data/input' small_cave = [] with open(FILENAME) as file: for line in file: small_cave.append([int(x) for x in list(line.strip())]) small_n = len(small_cave) large_n = small_n * 5 cave = [[ 0 for _ in range(large_n)] for _ in range(large_n)] for i in range(large_n): ...
[ 46700, 1677, 10067, 796, 705, 19571, 79, 9625, 1314, 14, 7890, 14, 15414, 6, 201, 198, 201, 198, 17470, 62, 66, 1015, 796, 17635, 201, 198, 4480, 1280, 7, 46700, 1677, 10067, 8, 355, 2393, 25, 201, 198, 220, 220, 220, 329, 1627, 2...
1.804214
1,139
#!/bin/python3 print("Hello, World!")
[ 2, 48443, 8800, 14, 29412, 18, 198, 198, 4798, 7203, 15496, 11, 2159, 2474, 8 ]
2.533333
15
#! /usr/bin/env python # -*- coding: UTF-8 -*- #------------------------------------------------------------------------------ # https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html #-------------------------------------------------------------------...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 2, 10097, 26171, 198, 2, 3740, 1378, 16244, 263, 13, 18040, 13, 785, 14, 32016, 14, 17474, 14, 22897, 341, 14, ...
2.616447
1,666
from __future__ import print_function import argparse from cProfile import label from dis import dis import os import random from socket import MSG_DONTROUTE from sklearn import cluster import torch import torch.nn.parallel import torch.optim as optim import torch.utils.data from pointnet.dataset import LidarDataset, B...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 1822, 29572, 198, 6738, 269, 37046, 1330, 6167, 198, 6738, 595, 1330, 595, 198, 11748, 28686, 198, 11748, 4738, 198, 6738, 17802, 1330, 49064, 62, 41173, 5446, 2606, 9328, 198, ...
1.881277
11,211
''' Given a collection of distinct integers, return all possible permutations. Example: Input: [1,2,3] Output: [ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1] ] '''
[ 7061, 6, 198, 15056, 257, 4947, 286, 7310, 37014, 11, 1441, 477, 1744, 9943, 32855, 13, 198, 198, 16281, 25, 198, 198, 20560, 25, 685, 16, 11, 17, 11, 18, 60, 198, 26410, 25, 198, 58, 198, 220, 685, 16, 11, 17, 11, 18, 4357, 1...
1.947917
96
import os import sys sys.path.append("..") import argparse from pathlib import Path # Import teaching utils import pandas as pd import numpy as np from utils.neuralnetwork import NeuralNetwork # Import sklearn metrics from sklearn import metrics from sklearn.datasets import fetch_openml from sklearn.model_selection i...
[ 11748, 28686, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7203, 492, 4943, 198, 11748, 1822, 29572, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 2, 17267, 7743, 3384, 4487, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299,...
3.230769
286
import re from oelint_adv.cls_item import Variable from oelint_adv.cls_rule import Rule
[ 11748, 302, 198, 198, 6738, 267, 417, 600, 62, 32225, 13, 565, 82, 62, 9186, 1330, 35748, 198, 6738, 267, 417, 600, 62, 32225, 13, 565, 82, 62, 25135, 1330, 14330, 628 ]
2.8125
32
from google.oauth2 import service_account from google.cloud import bigquery from datetime import datetime
[ 6738, 23645, 13, 12162, 1071, 17, 1330, 2139, 62, 23317, 201, 198, 6738, 23645, 13, 17721, 1330, 1263, 22766, 201, 198, 6738, 4818, 8079, 1330, 4818, 8079, 201 ]
3.857143
28
# # Copyright 2014+ Carnegie Mellon University # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ 2, 198, 2, 220, 15069, 1946, 10, 33976, 49808, 2059, 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, 11846, 351, 262,...
3.774869
191
"""yamlip - A yaml interpolation tool""" __version__ = '0.0.1' __author__ = 'Jan Murre <jan.murre@catalyz.nl>' __all__ = [] import functools from string import Template from attrdict import AttrDict import yaml import click @click.command() @click.argument("source_yaml_file") @click.option("-o", "--output")
[ 37811, 88, 321, 40712, 532, 317, 331, 43695, 39555, 341, 2891, 37811, 198, 198, 834, 9641, 834, 796, 705, 15, 13, 15, 13, 16, 6, 198, 834, 9800, 834, 796, 705, 12128, 5921, 260, 1279, 13881, 13, 28582, 260, 31, 9246, 3400, 89, 13,...
2.700855
117
import unittest from datastructure.links.PositionList import PositionList if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 4818, 459, 5620, 13, 28751, 13, 26545, 8053, 1330, 23158, 8053, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
3
42
# -*- encoding: utf-8 -*- # # Copyright © 2018 Julien Danjou <jd@mergify.io> # # 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, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 10673, 2864, 5979, 2013, 6035, 73, 280, 1279, 73, 67, 31, 647, 70, 1958, 13, 952, 29, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 3...
3.455446
202
from melodb.loggers import ILogger, ConsoleLogger, MongoLogger from typing import List
[ 198, 6738, 7758, 375, 65, 13, 6404, 5355, 1330, 314, 11187, 1362, 11, 24371, 11187, 1362, 11, 42591, 11187, 1362, 198, 6738, 19720, 1330, 7343, 628 ]
3.423077
26
import math import itertools import operator import numpy import pylab import scipy.fftpack import overlap def autocorrelation(signal): """ this matches Marsyas exactly. """ N = signal.shape[1] ffts = scipy.fftpack.fft(signal, 2*N, axis=1) / (2*N) ffts_abs = abs(ffts) ffts_abs_scaled = ffts_abs**...
[ 11748, 10688, 198, 11748, 340, 861, 10141, 198, 11748, 10088, 198, 198, 11748, 299, 32152, 198, 11748, 279, 2645, 397, 198, 11748, 629, 541, 88, 13, 487, 83, 8002, 198, 198, 11748, 21721, 198, 198, 4299, 1960, 420, 273, 49501, 7, 1268...
2.121849
238
import numpy as np from sklearn.decomposition import PCA from scipy.stats import zscore import time import csv import os import nibabel from sklearn.metrics.pairwise import euclidean_distances from scipy.ndimage.filters import gaussian_filter from utils.ridge_tools import cross_val_ridge, corr import time as tm import...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 12501, 296, 9150, 1330, 4217, 32, 198, 6738, 629, 541, 88, 13, 34242, 1330, 1976, 26675, 198, 11748, 640, 198, 11748, 269, 21370, 198, 11748, 28686, 198, 11748, 33272, 9608, 198...
3.378238
193
import pandas as pd import os import numpy as np import datetime import csv from Code.create_collector import vti_init from Code.preprocessing import vector_merge
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4818, 8079, 198, 11748, 269, 21370, 198, 6738, 6127, 13, 17953, 62, 33327, 273, 1330, 410, 20259, 62, 15003, 198, 6738, 6127, 13, 3866, ...
3.288462
52
import time from datetime import datetime as dt """ host files for windows windows c:\windows\system32\drivers\etc host files for linux & Mac /ect/hosts """ # list paths hosts_path_system = r"C:\Windows\System32\drivers\etc\hosts" host_dir = hosts_path_system #host_dir = "hosts" local redir = "127.0.0.1" # ...
[ 11748, 640, 198, 6738, 4818, 8079, 1330, 4818, 8079, 355, 288, 83, 220, 198, 37811, 198, 220, 220, 220, 2583, 3696, 329, 9168, 220, 9168, 269, 7479, 28457, 59, 10057, 2624, 59, 36702, 59, 14784, 198, 220, 220, 220, 2583, 3696, 329, ...
2.1
640
import importlib import pkgutil import aurora.drivers
[ 11748, 1330, 8019, 198, 11748, 279, 10025, 22602, 198, 198, 11748, 45714, 5799, 13, 36702, 628, 628, 628 ]
3.333333
18
from functools import partial from typing import Tuple import chika import homura import torch import torch.nn.functional as F from homura import lr_scheduler, reporters, trainers from homura.vision import DATASET_REGISTRY, MODEL_REGISTRY from sam import SAMSGD as _SAMSGD @chika.config @chika.config @chika.m...
[ 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 19720, 1330, 309, 29291, 198, 198, 11748, 442, 9232, 198, 11748, 3488, 5330, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 3488, 5330, 1330, 300, 81, 62,...
2.868613
137
import csv import io from flask import ( current_app, flash, redirect, render_template, request, Response, url_for, ) from flask_login import current_user from . import admin_bp from .forms import ( CancelCarpoolAdminForm, DeleteDestinationForm, DestinationForm, ProfilePurgeF...
[ 11748, 269, 21370, 198, 11748, 33245, 198, 6738, 42903, 1330, 357, 198, 220, 220, 220, 1459, 62, 1324, 11, 198, 220, 220, 220, 7644, 11, 198, 220, 220, 220, 18941, 11, 198, 220, 220, 220, 8543, 62, 28243, 11, 198, 220, 220, 220, 2...
2.527273
605
import sys import os import json import glob import pandas as pd import plotly import plotly.graph_objs as go if len(sys.argv) != 2: print("Usage: python tune_plot.py <result_dir>") print("Example: python tune_pot.py ~/ray_results/objective_mean_2021-04-08_00-07-44/") result_dir = sys.argv[1] tune_run = os.p...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 15095, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 7110, 306, 198, 11748, 7110, 306, 13, 34960, 62, 672, 8457, 355, 467, 198, 198, 361, 18896, 7, 17597, 13, 853, 85...
1.727273
2,266
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ------------------------------------------------- File Name:softmaxMnist Description : mnist data sets, softmax model pytorch 不需要进行 one-hot 编码, 使用类别即可 Email : autuanliu@163.com Date:18-1-16 """ import torch.nn as nn import torch.optim as optim from torch...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 47232, 12, 198, 220, 220, 9220, 6530, 171, 120, 248, 4215, 9806, 44, 77, 396, 198, 220, 220, 12489, 1058,...
2.261641
451
from sys import path; path += [".", ".."] # hacky... from utils import * if __name__ == "__main__": ciphertexts = map(dehex, load_data("4.txt").split("\n")) keyspace = list(range(0x100)) plaintexts = reduce(op.add, [ [xor(ct, [key]) for key in keyspace] for ct in ciphertexts ]) best_plaintext = min(plaint...
[ 6738, 25064, 1330, 3108, 26, 3108, 15853, 14631, 33283, 366, 492, 8973, 1303, 8156, 88, 986, 198, 6738, 3384, 4487, 1330, 1635, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 197, 66, 10803, 5239, 82, 796, 397...
2.620879
182
# Copyright 2020 EPAM Systems # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
[ 2, 220, 15069, 12131, 14724, 2390, 11998, 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, 11846, 351, 262, 13789, 13, ...
2.624357
583
# Generated by Django 3.0.7 on 2020-06-29 22:25 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 22, 319, 12131, 12, 3312, 12, 1959, 2534, 25, 1495, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import rospy from yaw_controller import YawController from lowpass import LowPassFilter from pid import PID GAS_DENSITY = 2.858 ONE_MPH = 0.44704
[ 11748, 686, 2777, 88, 198, 6738, 331, 707, 62, 36500, 1330, 575, 707, 22130, 198, 6738, 1877, 6603, 1330, 7754, 14478, 22417, 198, 6738, 46514, 1330, 37022, 628, 198, 38, 1921, 62, 35, 16938, 9050, 796, 362, 13, 23, 3365, 198, 11651, ...
2.867925
53
"""Unit tests for github4.api.""" import unittest.mock import github4 class TestAPI(unittest.TestCase): """All tests for the github4.api module.""" def test_enterprise_login(self): """Show that github4.enterprise_login returns GitHubEnterprise.""" args = ("login", "password", None, "https:/...
[ 37811, 26453, 5254, 329, 33084, 19, 13, 15042, 526, 15931, 198, 11748, 555, 715, 395, 13, 76, 735, 198, 198, 11748, 33084, 19, 628, 198, 4871, 6208, 17614, 7, 403, 715, 395, 13, 14402, 20448, 2599, 628, 220, 220, 220, 37227, 3237, 5...
2.41866
418
import json import pytest import responses from filepreviews import API_URL, FilePreviews, exceptions file_previews = FilePreviews(api_key="DUMMY_API_KEY", api_secret="DUMMY_SECRET_KEY") @responses.activate @responses.activate @responses.activate @responses.activate @responses.activate
[ 11748, 33918, 198, 198, 11748, 12972, 9288, 198, 11748, 9109, 198, 198, 6738, 2393, 3866, 33571, 1330, 7824, 62, 21886, 11, 9220, 6719, 33571, 11, 13269, 198, 198, 7753, 62, 3866, 33571, 796, 9220, 6719, 33571, 7, 15042, 62, 2539, 2625,...
3.061224
98
from ursina import * from ursina import curve from particles import ParticleSystem sign = lambda x: -1 if x < 0 else (1 if x > 0 else 0)
[ 6738, 220, 1834, 1437, 1330, 1635, 198, 6738, 220, 1834, 1437, 1330, 12133, 198, 6738, 13166, 1330, 2142, 1548, 11964, 198, 198, 12683, 796, 37456, 2124, 25, 532, 16, 611, 2124, 1279, 657, 2073, 357, 16, 611, 2124, 1875, 657, 2073, 65...
3.186047
43
import numpy as np DISTRIBUTION_SIZE = 10 NEGATIVE_THRESHOLD = -2.5
[ 11748, 299, 32152, 355, 45941, 198, 198, 26288, 5446, 9865, 35354, 62, 33489, 796, 838, 198, 45, 7156, 37045, 62, 4221, 19535, 39, 15173, 796, 532, 17, 13, 20, 198 ]
2.3
30
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from rlkit.torch.core import PyTorchModule from rlkit.torch.networks import Mlp, identity from rlkit.torch import pytorch_util as ptu from copy import deepcopy ...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 198, 6738, 374, 75, 15813, 13, 13165, 354, 13, 7295, 1330, 9485, 158...
2.153274
672
import argparse import sys import json if __name__ == "__main__": main()
[ 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 33918, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 220, 220, 1388, 3419, 198 ]
2.612903
31
from distutils.core import setup from Cython.Build import cythonize from distutils.extension import Extension import numpy as np sourcefiles = ['array_tools.pyx', '_sum.cpp'] extra_compile_args = [] libraries = [] ext = [Extension('*', sourcefiles, extra_compile_args=extra_compile_args, libr...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 6738, 327, 7535, 13, 15580, 1330, 3075, 400, 261, 1096, 198, 6738, 1233, 26791, 13, 2302, 3004, 1330, 27995, 198, 11748, 299, 32152, 355, 45941, 198, 198, 10459, 16624, 796, 37250, 18747, 62...
2.517442
172
import textwrap from typing import Iterator, Any from primehub import Helpful, cmd, Module from primehub.utils.display import display_tree_like_format
[ 11748, 2420, 37150, 198, 6738, 19720, 1330, 40806, 1352, 11, 4377, 198, 198, 6738, 6994, 40140, 1330, 21656, 11, 23991, 11, 19937, 198, 6738, 6994, 40140, 13, 26791, 13, 13812, 1330, 3359, 62, 21048, 62, 2339, 62, 18982, 628, 198 ]
3.85
40
from django.shortcuts import render from django.views.generic import TemplateView from django.http import HttpResponse, JsonResponse, HttpResponseForbidden, HttpResponseBadRequest import ccxt # Create your views here. exchangeIns = {}
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 37350, 7680, 198, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 449, 1559, 31077, 11, 367, 29281, 31077, 1890, 37978,...
3.621212
66
/usr/lib/python3.4/tokenize.py
[ 14, 14629, 14, 8019, 14, 29412, 18, 13, 19, 14, 30001, 1096, 13, 9078 ]
2.142857
14
#!/usr/bin/python # # Copyright 2018-2020 Polyaxon, 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 ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 15069, 2864, 12, 42334, 12280, 897, 261, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, ...
3.647826
230
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2017-2020 The Project X-Ray Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC """ IOB bits are more complicated tha...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 2177, 12, 42334, 220, 383, 4935, 1395, 12, 19591, 46665, 13, 198, 2, 198, 2, 57...
2.824719
445
import feedparser import urllib.parse from random import shuffle, seed UKR_NEWS = ["https://news.yandex.ua/index.rss", "http://www.ukr-portal.com/php/rss_1.xml", "http://news.finance.ua/ru/rss", "http://www.ua.rian.ru/export/rss2/index.xml", "http://feeds.feedburner.com/zaxid/rss_ua", "http://www.dt.ua/export.rss", "h...
[ 11748, 3745, 48610, 198, 11748, 2956, 297, 571, 13, 29572, 198, 6738, 4738, 1330, 36273, 11, 9403, 198, 198, 15039, 49, 62, 49597, 796, 14631, 5450, 1378, 10827, 13, 88, 392, 1069, 13, 6413, 14, 9630, 13, 42216, 1600, 366, 4023, 1378,...
2.121951
1,025
# -*- coding: utf-8 -*- """ Single Molecule Molecular Dynamics Code Created 2018 by David of Theoretically Speaking Please Modify! """ from __future__ import print_function import os import sys import numpy as np # Global variables for unit conversions hartree = 4.35974465e-18 # J, atomic unit of energy emass = 5....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 28008, 25726, 23172, 38275, 33806, 6127, 220, 198, 41972, 2864, 416, 3271, 286, 383, 9997, 1146, 21393, 198, 5492, 3401, 1958, 0, 198, 37811, 198, 6738, 11593,...
2.469327
5,037
if __name__ == '__main__': coins = [1, 2, 10] price = 28 print(minimal_number_of_coins(coins, price))
[ 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 10796, 796, 685, 16, 11, 362, 11, 838, 60, 198, 220, 220, 220, 2756, 796, 2579, 198, 220, 220, 220, 3601, 7, 1084, 4402, 62, 17618, 62, 1659, ...
2.25
52
from __clrclasses__.System.Security.Principal import GenericIdentity from __clrclasses__.System.Security.Principal import GenericPrincipal from __clrclasses__.System.Security.Principal import IdentityNotMappedException from __clrclasses__.System.Security.Principal import IdentityReference from __clrclasses__.System.Sec...
[ 6738, 11593, 565, 81, 37724, 834, 13, 11964, 13, 24074, 13, 42904, 8521, 1330, 42044, 7390, 26858, 198, 6738, 11593, 565, 81, 37724, 834, 13, 11964, 13, 24074, 13, 42904, 8521, 1330, 42044, 42904, 8521, 198, 6738, 11593, 565, 81, 37724,...
3.844311
334
import math import numpy as np from nltk.metrics.association import TOTAL from sklearn import metrics from matplotlib.mlab import entropy
[ 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 2528, 74, 13, 4164, 10466, 13, 562, 41003, 1330, 36247, 198, 6738, 1341, 35720, 1330, 20731, 198, 6738, 2603, 29487, 8019, 13, 4029, 397, 1330, 40709, 198, 220, 220, 220,...
2.333333
75
from django import forms from ..models import User from django.contrib.auth.forms import UserCreationForm
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 11485, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 11787, 12443, 341, 8479, 628 ]
3.821429
28
'''Bulbasaur, Ivysaur and Venusaur''' from __init__ import Pokemon Bulbasaur = Pokemon('generation_1/001.txt') print(Bulbasaur)
[ 7061, 6, 33481, 12093, 2899, 11, 16975, 893, 2899, 290, 21094, 2899, 7061, 6, 198, 6738, 11593, 15003, 834, 1330, 14878, 198, 198, 33481, 12093, 2899, 796, 14878, 10786, 20158, 62, 16, 14, 8298, 13, 14116, 11537, 198, 4798, 7, 33481, ...
2.866667
45
import django from django.conf import settings
[ 11748, 42625, 14208, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 628 ]
4
12
# # @lc app=leetcode id=207 lang=python3 # # [207] Course Schedule # # @lc code=start # @lc code=end
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 22745, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 22745, 60, 20537, 19281, 198, 2, 198, 198, 2, 2488, 44601, 2438, 28, 9688, 628, 198, 2, 2488, 44601, 2438, 28, 437, 198...
2.311111
45
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for nipyapi security module.""" from __future__ import absolute_import import pytest from tests import conftest import nipyapi # Tells pytest to skip this module of security testing is not enabled. pytestmark = pytest.mark.skipif(not conftest.test_security, reas...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 51, 3558, 329, 299, 541, 88, 15042, 2324, 8265, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, ...
2.815094
265
from django.conf.urls import include, url from django.contrib import admin from django.contrib.auth.forms import UserCreationForm from django.views.generic import CreateView from django.views.generic import RedirectView admin.autodiscover() from django.conf import settings from django.conf.urls.static import static ...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 11787, 12443, 341, 8479, 198, 6738, 42625,...
2.308511
1,316
import pytest import potemkin import boto3 from potemkin.configservice import evaluate_config_rule_and_wait_for_resource, config_rule_wait_for_resource, config_rule_wait_for_absent_resources, config_rule_wait_for_compliance_results @potemkin.CloudFormationStack('test/integration/test_templates/eip.yml', ...
[ 11748, 12972, 9288, 198, 11748, 1787, 368, 5116, 198, 11748, 275, 2069, 18, 198, 6738, 1787, 368, 5116, 13, 11250, 15271, 1330, 13446, 62, 11250, 62, 25135, 62, 392, 62, 17077, 62, 1640, 62, 31092, 11, 4566, 62, 25135, 62, 17077, 62, ...
2.40367
327
# -*- coding: utf-8 -*- # Copyright (c) 2020, Akram Mutaher and contributors # For license information, please see license.txt from __future__ import unicode_literals # import frappe from frappe.model.document import Document
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 12131, 11, 9084, 859, 13859, 64, 372, 290, 20420, 198, 2, 1114, 5964, 1321, 11, 3387, 766, 5964, 13, 14116, 198, 198, 6738, 11593, 37443, 834, ...
3.38806
67
''' Context Processors do some pretty great work, like default arguments supplied to templates when they're rendered. kind of like Macros in Flask, but even more powerful. ''' import string from django.utils.datastructures import MultiValueDictKeyError from .forms import SearchForm from .static_vars import COLORS, GR...
[ 7061, 6, 198, 21947, 10854, 669, 466, 617, 2495, 1049, 670, 11, 588, 4277, 7159, 14275, 198, 1462, 24019, 618, 484, 821, 15111, 13, 1611, 286, 588, 4100, 4951, 287, 46947, 11, 475, 772, 517, 198, 44548, 13, 198, 7061, 6, 198, 11748,...
2.948718
351
""" pushover simple api ~~~~~~~~~~~~~~~~~~~ """ __author__ = "toloy" from .pushover import Pushover, PushoverException
[ 37811, 201, 198, 220, 220, 220, 220, 4574, 2502, 2829, 40391, 201, 198, 220, 220, 220, 220, 220, 27156, 4907, 93, 201, 198, 37811, 201, 198, 201, 198, 834, 9800, 834, 796, 366, 83, 349, 726, 1, 201, 198, 201, 198, 6738, 764, 14689...
2.465517
58
# Code generated by `typeddictgen`. DO NOT EDIT. """V1beta1CertificateSigningRequestConditionDict generated type.""" import datetime from typing import TypedDict V1beta1CertificateSigningRequestConditionDict = TypedDict( "V1beta1CertificateSigningRequestConditionDict", { "lastUpdateTime": datetime.date...
[ 2, 6127, 7560, 416, 4600, 28004, 6048, 713, 5235, 44646, 8410, 5626, 48483, 13, 198, 37811, 53, 16, 31361, 16, 37608, 22460, 11712, 278, 18453, 48362, 35, 713, 7560, 2099, 526, 15931, 198, 11748, 4818, 8079, 198, 6738, 19720, 1330, 1713...
2.608696
161
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[ 2, 16529, 1783, 10541, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5964, 1321, 13, 198, 2, 16529, 1783, 10541, 198,...
4.75
148
import numpy as np import matplotlib.pyplot as plt from matplotlib import cm nx, ny = (1000,1000) x = np.linspace(-2,1,nx) y = np.linspace(-1.5,1.5,ny) X, Y = np.meshgrid(x,y) cgrid = X + 1j*Y # For some numbers c doing z^2 + c again and again from 0 will diverge, not for others, plot it to get the mandelbrot set Z...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 220, 198, 6738, 2603, 29487, 8019, 1330, 12067, 198, 198, 77, 87, 11, 299, 88, 796, 357, 12825, 11, 12825, 8, 198, 87, 796, 45941, 13, 2160...
2.098077
520
'''initialize''' from .moocdl import MOOCDL
[ 7061, 6, 36733, 1096, 7061, 6, 198, 6738, 764, 5908, 420, 25404, 1330, 13070, 4503, 19260 ]
2.6875
16
from chainerchem.links import embed_atom_id # NOQA from chainerchem.links import graph_linear # NOQA from chainerchem.links.embed_atom_id import EmbedAtomID # NOQA from chainerchem.links.graph_linear import GraphLinear # NOQA
[ 6738, 6333, 263, 15245, 13, 28751, 1330, 11525, 62, 37696, 62, 312, 220, 1303, 8005, 48, 32, 198, 6738, 6333, 263, 15245, 13, 28751, 1330, 4823, 62, 29127, 220, 1303, 8005, 48, 32, 198, 198, 6738, 6333, 263, 15245, 13, 28751, 13, 20...
2.924051
79
from celery import Task from kombu.serialization import ( dumps as kombu_dumps, loads as kombu_loads, ) from ichnaea.cache import redis_pipeline from ichnaea.db import db_worker_session
[ 6738, 18725, 1924, 1330, 15941, 198, 6738, 479, 2381, 84, 13, 46911, 1634, 1330, 357, 198, 220, 220, 220, 45514, 355, 479, 2381, 84, 62, 67, 8142, 11, 198, 220, 220, 220, 15989, 355, 479, 2381, 84, 62, 46030, 11, 198, 8, 198, 198,...
2.684932
73
from discord.ext import commands from discord.ext.commands import Context from diceBot import roller class Utilities(commands.Cog): """ General Utilities """ @commands.command() async def ping(self, ctx: Context): """ Status check """ import time start_time =...
[ 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 36446, 13, 2302, 13, 9503, 1746, 1330, 30532, 198, 6738, 17963, 20630, 1330, 24471, 198, 198, 4871, 41086, 7, 9503, 1746, 13, 34, 519, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, ...
2.284404
654
import feedparser import time class RSSReader: """Class built upon feedparser to get new items from an rss feed""" DATA_FILE = 'RSSData.txt' DATA_FILE = 'RSSData.txt'
[ 11748, 3745, 48610, 198, 11748, 640, 198, 198, 4871, 25012, 33634, 25, 198, 220, 220, 220, 37227, 9487, 3170, 2402, 3745, 48610, 284, 651, 649, 3709, 422, 281, 374, 824, 3745, 37811, 198, 220, 220, 220, 42865, 62, 25664, 796, 705, 49,...
2.859375
64
__author__ = 'Kalyan' # this is a sample module for the understanding_modules assignment.
[ 834, 9800, 834, 796, 705, 42, 3400, 272, 6, 628, 198, 2, 428, 318, 257, 6291, 8265, 329, 262, 4547, 62, 18170, 16237, 13, 198 ]
3.68
25
from blendvis.primitives.primitives import FontPrimitive, LinePrimitive, CubePrimitive, \ CameraPrimitive, SpherePrimitive, CurvePrimitive, GreasePencilPrimitive, Primitive
[ 6738, 13516, 4703, 13, 19795, 20288, 13, 19795, 20288, 1330, 24060, 23828, 1800, 11, 6910, 23828, 1800, 11, 23315, 23828, 1800, 11, 3467, 198, 220, 220, 220, 20432, 23828, 1800, 11, 31798, 23828, 1800, 11, 46300, 23828, 1800, 11, 11955, ...
3.666667
48
import json import requests import pandas as pd import websocket # Get Alpaca API Credential endpoint = "https://data.alpaca.markets/v2" headers = json.loads(open("key.txt", 'r').read()) def hist_data(symbols, start="2021-01-01", timeframe="1Hour", limit=50, end=""): """ returns historical b...
[ 11748, 33918, 201, 198, 11748, 7007, 201, 198, 11748, 19798, 292, 355, 279, 67, 220, 201, 198, 11748, 2639, 5459, 201, 198, 201, 198, 201, 198, 2, 3497, 978, 79, 22260, 7824, 327, 445, 1843, 201, 198, 437, 4122, 796, 366, 5450, 1378...
2.049555
1,796
import sys, os from dotenv import dotenv_values config = dotenv_values(".env") cur_dir = os.path.dirname(__file__) trex_path = f"{config['TREX_LOCATION']}/{config['TREX_VERSION']}" interactive = os.path.abspath(f"{trex_path}/automation/trex_control_plane/interactive") sys.path.insert(0, os.path.abspath(interactive)...
[ 11748, 25064, 11, 28686, 198, 6738, 16605, 24330, 1330, 16605, 24330, 62, 27160, 198, 198, 11250, 796, 16605, 24330, 62, 27160, 7, 1911, 24330, 4943, 198, 198, 22019, 62, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, ...
2.45679
243
#coding=utf-8 import sys import os from os.path import abspath, dirname sys.path.append(abspath(dirname(__file__))) import tkinter import tkinter.filedialog from tkinter import * import Fun ElementBGArray={} ElementBGArray_Resize={} ElementBGArray_IM={} from PyPDF2 import PdfFileReader, PdfFileWriter
[ 2, 66, 7656, 28, 40477, 12, 23, 198, 11748, 25064, 198, 11748, 28686, 198, 6738, 220, 220, 28686, 13, 6978, 1330, 2352, 6978, 11, 26672, 3672, 198, 17597, 13, 6978, 13, 33295, 7, 397, 2777, 776, 7, 15908, 3672, 7, 834, 7753, 834, ...
2.72807
114
from django.test import Client from django.test import RequestFactory, TestCase from django.contrib.auth import get_user_model from cart import views
[ 6738, 42625, 14208, 13, 9288, 1330, 20985, 198, 6738, 42625, 14208, 13, 9288, 1330, 19390, 22810, 11, 6208, 20448, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 6383, 1330, 5009, 198, 220,...
3.444444
45
import enum import typing as ta from omnibus import collections as col from omnibus import dataclasses as dc from .base import Expr from .base import Identifier from .base import Node from .base import QualifiedNameNode from .base import SetQuantifier from .base import SortItem
[ 11748, 33829, 198, 11748, 19720, 355, 20486, 198, 198, 6738, 22284, 26333, 1330, 17268, 355, 951, 198, 6738, 22284, 26333, 1330, 4818, 330, 28958, 355, 30736, 198, 198, 6738, 764, 8692, 1330, 1475, 1050, 198, 6738, 764, 8692, 1330, 11440,...
3.734177
79
# -*- coding: utf8 -*-
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 23, 532, 9, 12, 628, 628, 628, 628, 198 ]
1.823529
17
balance = 999999 annualInterestRate = 0.18 monthlyInterestRate = annualInterestRate/12.0 monthlyLower = balance/12 monthlyUpper = (balance * (1+monthlyInterestRate)**12)/12.0 while True: updatedBalance = balance for i in range(12): payment = (monthlyUpper + monthlyLower)/2.0 monthlyUnp...
[ 20427, 796, 36006, 17032, 198, 1236, 723, 19302, 32184, 796, 657, 13, 1507, 198, 198, 8424, 306, 19302, 32184, 796, 5079, 19302, 32184, 14, 1065, 13, 15, 198, 8424, 306, 31426, 796, 5236, 14, 1065, 198, 8424, 306, 52, 2848, 796, 357, ...
2.690083
242
# -*- coding: utf-8 -*- import time from pytest import mark @mark.parametrize('with_message', [True, False]) @mark.parametrize('hard_deployment', [True, False]) @mark.parametrize('final_release_state', [ 'DEPLOYED', 'FAILED', 'UNKNOWN', 'TEMP_DEPLOYMENT_FAILURE' ]) @mark.parametrize('maintenance', [True, False])...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 640, 198, 198, 6738, 12972, 9288, 1330, 1317, 628, 198, 31, 4102, 13, 17143, 316, 380, 2736, 10786, 4480, 62, 20500, 3256, 685, 17821, 11, 10352, 12962, 198, 31, ...
2.426901
171