content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from itests.utils import get_sleep_time from blacksheep.client.pool import ClientConnectionPools import os import pathlib import asyncio from multiprocessing import Process from time import sleep import pytest from blacksheep.client import ClientSession from .flask_app import app @pytest.fixture(scope="session") ...
[ 6738, 340, 3558, 13, 26791, 1330, 651, 62, 42832, 62, 2435, 198, 6738, 2042, 7091, 538, 13, 16366, 13, 7742, 1330, 20985, 32048, 47, 10141, 198, 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 30351, 952, 198, 6738, 18540, 305, 919, ...
3.09417
223
print("part1:", iterate(80)) print("part2:", iterate(256))
[ 198, 4798, 7203, 3911, 16, 25, 1600, 11629, 378, 7, 1795, 4008, 198, 4798, 7203, 3911, 17, 25, 1600, 11629, 378, 7, 11645, 4008, 198 ]
2.4
25
""" ============================================== Repository of Updaters, Dividers, and Derivers ============================================== You should interpret words and phrases that appear fully capitalized in this document as described in :rfc:`2119`. Here is a brief summary of the RFC: * "MUST" indicates abs...
[ 37811, 198, 10052, 25609, 855, 198, 6207, 13264, 286, 3205, 67, 8605, 11, 360, 1699, 364, 11, 290, 9626, 1191, 198, 10052, 25609, 855, 198, 198, 1639, 815, 6179, 2456, 290, 20144, 326, 1656, 3938, 3139, 1143, 287, 198, 5661, 3188, 355...
2.935973
2,374
import torch from torch import Tensor def compute_accuracy(pred: Tensor, gt: Tensor, ignore: int = 0): """ pred (torch.Tensor): predicted words shape of [L, N] gt (torch.Tensor): GT words shape of [L, N] ignore (int): ignored label """ mask = gt != ignore tp = torch.logical_and(pred == gt,...
[ 11748, 28034, 198, 6738, 28034, 1330, 309, 22854, 628, 198, 4299, 24061, 62, 4134, 23843, 7, 28764, 25, 309, 22854, 11, 308, 83, 25, 309, 22854, 11, 8856, 25, 493, 796, 657, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2747,...
2.531469
143
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
# this is a make/python hybrid file # Normal make files are a make/sh hybrid. # This makefile uses python instead of sh (or bash) test_cxx_sources ?= checkcxxsources $(cxxsources):$(out_init) $(origin) if (this == "checkcxxsources") and (not os.path.exists(env.cxxsources)): leave() caption() if (this ==...
[ 2, 428, 318, 257, 787, 14, 29412, 14554, 2393, 198, 198, 2, 14435, 787, 3696, 389, 257, 787, 14, 1477, 14554, 13, 198, 2, 770, 787, 7753, 3544, 21015, 2427, 286, 427, 357, 273, 27334, 8, 198, 198, 9288, 62, 66, 5324, 62, 82, 220...
2.09716
2,676
from binance.lib.utils import ( check_required_parameter, ) from binance.lib.utils import check_required_parameters def ping(self): """ | | **Test Connectivity** | *Test connectivity to the Rest API.* :API endpoint: ``GET /dapi/v1/ping`` :API doc: https://binance-docs.github.io/apidocs/de...
[ 6738, 9874, 590, 13, 8019, 13, 26791, 1330, 357, 198, 220, 220, 220, 2198, 62, 35827, 62, 17143, 2357, 11, 198, 8, 198, 6738, 9874, 590, 13, 8019, 13, 26791, 1330, 2198, 62, 35827, 62, 17143, 7307, 628, 198, 4299, 29400, 7, 944, 2...
2.74541
7,298
import click from gitkit.util.shell import get_output @click.command() def what(): """ What _is_ the current revision anyway? """ description = get_output("git describe") revision = get_output("git rev-parse HEAD") print(f"{description} ({revision})")
[ 11748, 3904, 198, 198, 6738, 17606, 15813, 13, 22602, 13, 29149, 1330, 651, 62, 22915, 628, 198, 31, 12976, 13, 21812, 3419, 198, 4299, 644, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1867, 4808, 271, 62, 262, 1459, 18440, ...
2.936842
95
# -------------- # Importing header files import numpy as np import warnings warnings.filterwarnings('ignore') #New record new_record=[[50, 9, 4, 1, 0, 0, 40, 0]] #Reading file # data = np.genfromtxt(path, delimiter=",", skip_header=1) #Code starts here data = np.genfromtxt(path, delimiter = ",",...
[ 2, 220, 26171, 198, 2, 17267, 278, 13639, 3696, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 14601, 201, 198, 201, 198, 40539, 654, 13, 24455, 40539, 654, 10786, 46430, 11537, 201, 198, 201, 198, 2, 3791, 1700, 201, 198, ...
2.138564
599
from stack_class import * def reverse_file(path): """Overwrite given file using its context line-by-line reversed""" s=ArrayStack() with open(path,"r") as original: for line in original: s.push(line.rstrip("\n")) # removing newline characters # overwrite the contents in LIFO order ...
[ 6738, 8931, 62, 4871, 1330, 1635, 198, 4299, 9575, 62, 7753, 7, 6978, 2599, 198, 220, 220, 220, 37227, 5886, 13564, 1813, 2393, 1262, 663, 4732, 1627, 12, 1525, 12, 1370, 17687, 37811, 198, 220, 220, 220, 264, 28, 19182, 25896, 3419, ...
2.583756
197
import sys import os from simulaqron.toolbox import get_simulaqron_path # Get path to SimulaQron folder simulaqron_path = get_simulaqron_path.main() tot_nr = int(sys.argv[1]) # configure run files for nodes with open("run.sh", "w") as f: f.write("#!/bin/sh\n\n") for i in range(tot_nr - 1): f.write(...
[ 11748, 25064, 198, 11748, 28686, 198, 198, 6738, 985, 4712, 80, 1313, 13, 25981, 3524, 1330, 651, 62, 14323, 4712, 80, 1313, 62, 6978, 198, 198, 2, 3497, 3108, 284, 3184, 4712, 48, 1313, 9483, 198, 14323, 4712, 80, 1313, 62, 6978, 7...
2.193548
372
from .selection import Selection from .logging import logger from .dir import config_dir, cache_dir __all__ = [ 'Selection', 'logger', 'config_dir', 'cache_dir', ]
[ 6738, 764, 49283, 1330, 29538, 198, 6738, 764, 6404, 2667, 1330, 49706, 198, 6738, 764, 15908, 1330, 4566, 62, 15908, 11, 12940, 62, 15908, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 4653, 1564, 3256, 198, 220, 220, ...
2.661765
68
from __future__ import division,print_function #matplotlib inline #load_ext autoreload #autoreload 2 import sys from tqdm import tqdm_notebook as tqdm import random import matplotlib.pyplot as plt import math import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim a...
[ 6738, 11593, 37443, 834, 1330, 7297, 11, 4798, 62, 8818, 198, 198, 2, 6759, 29487, 8019, 26098, 198, 2, 2220, 62, 2302, 1960, 382, 2220, 198, 2, 2306, 382, 2220, 362, 198, 198, 11748, 25064, 198, 6738, 256, 80, 36020, 1330, 256, 80,...
2.419497
1,590
import logging import math from misaka import Markdown, HtmlRenderer from lxml.html import fromstring # https://stackoverflow.com/a/3155023 millnames = ['',' thousand',' million',' billion',' trillion']
[ 11748, 18931, 198, 11748, 10688, 198, 198, 6738, 2984, 8130, 1330, 2940, 2902, 11, 367, 20369, 49, 437, 11882, 198, 6738, 300, 19875, 13, 6494, 1330, 422, 8841, 198, 198, 2, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 64, 14, 27936, ...
3.517241
58
from flask import Flask from elasticsearch import Elasticsearch from contact import Contact class Handler(object): """ Handles operations on elasticsearch. """ def list_contacts(self, arguments): """ Returns a list of contacts or False. """ try: self.es.in...
[ 6738, 42903, 1330, 46947, 198, 6738, 27468, 12947, 1330, 48567, 12947, 198, 6738, 2800, 1330, 14039, 628, 198, 4871, 32412, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 7157, 829, 4560, 319, 27468, 12947, 13, 198, 220,...
2.058052
1,068
from django.db import models from django.contrib.auth.models import User # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 198, 2, 13610, 534, 4981, 994, 13, 628, 628, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 628 ]
2.829268
41
import arcpy source = "C:\\TxDOT\\Shapefiles\\District_Offices.shp" outputcopy = "T:\\DATAMGT\\MAPPING\\Personal Folders\\Adam\\District_Offices.shp" copyPhone()
[ 11748, 10389, 9078, 198, 10459, 796, 366, 34, 25, 6852, 46047, 35, 2394, 6852, 33383, 16624, 6852, 44857, 62, 9362, 1063, 13, 1477, 79, 1, 198, 22915, 30073, 796, 366, 51, 25, 6852, 35, 1404, 2390, 19555, 6852, 44, 24805, 2751, 6852, ...
2.655738
61
from novmpy.bridge import * from capstone import * from capstone.x86 import * from novmpy.x86_deobf import * from novmpy.match_helper import *
[ 6738, 645, 85, 3149, 88, 13, 9458, 1330, 1635, 198, 6738, 1451, 6440, 1330, 1635, 198, 6738, 1451, 6440, 13, 87, 4521, 1330, 1635, 198, 6738, 645, 85, 3149, 88, 13, 87, 4521, 62, 2934, 672, 69, 1330, 1635, 198, 6738, 645, 85, 3149...
2.685185
54
#!/usr/bin/env python import rospy import smach_ros from smach_tutorial.BasicStateMachine import BasicStateMachine_0,\ BasicStateMachine_1,\ BasicStateMachine_2 ##-----------------------------------------------------------------...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 686, 2777, 88, 198, 11748, 895, 620, 62, 4951, 198, 198, 6738, 895, 620, 62, 83, 44917, 13, 26416, 9012, 37573, 1330, 14392, 9012, 37573, 62, 15, 11, 59, 198, 220, 220, ...
2.741294
201
#!/usr/bin/env python from translate.convert import xliff2po from translate.misc import wStringIO from translate.storage.test_base import headerless_len, first_translatable class TestBasicXLIFF2PO(TestXLIFF2PO): """This tests a basic XLIFF file without xmlns attribute""" xliffskeleton = '''<?xml version="1....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 15772, 13, 1102, 1851, 1330, 2124, 75, 733, 17, 7501, 198, 6738, 15772, 13, 44374, 1330, 266, 10100, 9399, 198, 6738, 15772, 13, 35350, 13, 9288, 62, 8692, 1330, 13639, 1203...
2.693182
176
""" Your colleagues have been looking over you shoulder. When you should have been doing your boring real job, you've been using the work computers to smash in endless hours of codewars. In a team meeting, a terrible, awful person declares to the group that you aren't working. You're in trouble. You quickly have to ga...
[ 37811, 3406, 7810, 423, 587, 2045, 625, 345, 8163, 13, 1649, 345, 815, 423, 587, 1804, 534, 14262, 1103, 1693, 11, 345, 1053, 587, 1262, 262, 670, 9061, 284, 24273, 287, 13079, 2250, 286, 14873, 413, 945, 13, 198, 198, 818, 257, 107...
3.040179
448
from app_couriers.serializers import CourierSerializer from .models import Orders
[ 6738, 598, 62, 66, 280, 8910, 13, 46911, 11341, 1330, 34268, 32634, 7509, 198, 6738, 764, 27530, 1330, 30689, 628 ]
4.15
20
''' Implementation of Rapid Automatic Keyword Extraction (RAKE) algorithm for Chinese Original algorithm described in: Rose, S., Engel, D., Cramer, N., & Cowley, W. (2010). Automatic Keyword Extraction from Individual Documents. In M. W. Berry & J. Kogan (Eds.), Text Mining: Theory and Applications: John Wiley & Sons. ...
[ 7061, 6, 198, 3546, 32851, 286, 26430, 30199, 7383, 4775, 5683, 7861, 357, 3861, 7336, 8, 11862, 329, 3999, 198, 20556, 11862, 3417, 287, 25, 8049, 11, 311, 1539, 46073, 11, 360, 1539, 327, 29172, 11, 399, 1539, 1222, 10417, 1636, 11,...
2.965812
234
from pwn import * # type: ignore context.binary = "./SaveTheWorld" p = process() p.sendline(b"A" * 72 + b"Jotaro!!" + b"Star Platinum!!!" + b"HORA" + b"9999") p.recvuntil(b"Congratulation, you won!!!") os.system("grep .*{.*}.* victory_recap.txt")
[ 6738, 279, 675, 1330, 1635, 220, 1303, 2099, 25, 8856, 198, 198, 22866, 13, 39491, 796, 366, 19571, 16928, 464, 10603, 1, 198, 79, 796, 1429, 3419, 198, 79, 13, 21280, 1370, 7, 65, 1, 32, 1, 1635, 7724, 1343, 275, 1, 41, 313, 12...
2.394231
104
Desc = cellDescClass("CMPR32X1") Desc.properties["cell_leakage_power"] = "3632.359140" Desc.properties["cell_footprint"] = "add32" Desc.properties["area"] = "69.854400" Desc.pinOrder = ['A', 'B', 'C', 'CO', 'S'] Desc.add_arc("A","S","combi") Desc.add_arc("B","S","combi") Desc.add_arc("C","S","combi") Desc.add_arc("A","...
[ 24564, 796, 2685, 24564, 9487, 7203, 24187, 4805, 2624, 55, 16, 4943, 198, 24564, 13, 48310, 14692, 3846, 62, 293, 461, 496, 62, 6477, 8973, 796, 366, 2623, 2624, 13, 30743, 15187, 1, 198, 24564, 13, 48310, 14692, 3846, 62, 5898, 4798...
2.361011
277
""" ---> Univalued Binary Tree ---> Easy """ from tree_func import * in_array = [1, 1, 1, 1, 1, None, 1] in_root = to_binary_tree(in_array) pretty_print(in_root) a = Solution() print("Answer -", a.isUnivalTree(in_root)) # print("Answer -", a.isUnivalTree(in_root)) """ Check if node is none or node.value should...
[ 37811, 198, 198, 438, 3784, 791, 2473, 1739, 45755, 12200, 198, 438, 3784, 16789, 198, 198, 37811, 628, 198, 6738, 5509, 62, 20786, 1330, 1635, 628, 198, 198, 259, 62, 18747, 796, 685, 16, 11, 352, 11, 352, 11, 352, 11, 352, 11, 6...
2.721649
194
import os import struct import numpy as np def load_mnist(path, kind='train'): """Load MNIST data from `path`""" labels_path = os.path.join(path, '%s-labels.idx1-ubyte' % kind) images_path = os.path.join(path, '%s-...
[ 11748, 28686, 198, 11748, 2878, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4299, 3440, 62, 10295, 396, 7, 6978, 11, 1611, 11639, 27432, 6, 2599, 198, 220, 220, 220, 37227, 8912, 29060, 8808, 1366, 422, 4600, 6978, 63, 37811, 198, 2...
1.688057
561
arr = [1, 2, 3, 4, 4, 4, 5, 6, 6, 7, 8, 9] arr.sort() my_dict = {i:arr.count(i) for i in arr} # sorting the dictionary based on value my_dict = {k: v for k, v in sorted(my_dict.items(), key=lambda item: item[1])} print(len(my_dict)) print(my_dict) list = list(my_dict.keys()) print(list[-1])
[ 3258, 796, 685, 16, 11, 362, 11, 513, 11, 604, 11, 604, 11, 604, 11, 642, 11, 718, 11, 718, 11, 767, 11, 807, 11, 860, 60, 198, 3258, 13, 30619, 3419, 198, 1820, 62, 11600, 796, 1391, 72, 25, 3258, 13, 9127, 7, 72, 8, 329, ...
2.286822
129
#coding=utf-8 ''' Created on 2016-1-18 @author: Devuser ''' from django import template from doraemon.auth_extend.user.templatetags.auth_required_node import LogoutRequiredNode,LoginRequiredNode,UserRequiredNode,ManagerRequiredNode,AdminRequiredNode register = template.Library() @register.tag() @register.tag() ...
[ 2, 66, 7656, 28, 40477, 12, 23, 198, 7061, 6, 198, 41972, 319, 1584, 12, 16, 12, 1507, 198, 198, 31, 9800, 25, 6245, 7220, 198, 7061, 6, 198, 198, 6738, 42625, 14208, 1330, 11055, 198, 6738, 288, 5799, 7966, 13, 18439, 62, 2302, ...
2.975806
124
import yaml import schoolopy import sys def err(msg): """ Prints out error message and exits with error. """ print(f"Error: {msg}") exit(1) def main(limit): """ Likes all the posts & comments in your most recent feed (20 posts). Args: limit: How many posts to like. ...
[ 11748, 331, 43695, 198, 11748, 1524, 11081, 198, 11748, 25064, 628, 198, 4299, 11454, 7, 19662, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 12578, 82, 503, 4049, 3275, 290, 30151, 351, 4049, 13, 198, 220, 220, 220, 37227, 198...
2.171802
1,071
# Loopit eli silmukat ##### INFO ##### # # Joskus monimutkaisen kuvion piirtäminen vaatii samojen # komentojen toistamista moneen kertaan. Loopilla eli silmukalla # voit toistaa koodipalikoita eli pätkiä koodia import turtle t = turtle.Turtle() # Seuraava on esimerkki silmukasta. # # "for" kertoo tietokoneelle että ...
[ 2, 26304, 270, 1288, 72, 3313, 76, 2724, 265, 198, 198, 4242, 2, 24890, 46424, 198, 2, 198, 2, 22568, 45614, 937, 320, 315, 4914, 13254, 479, 14795, 295, 31028, 2265, 11033, 1084, 268, 46935, 265, 4178, 6072, 13210, 268, 198, 2, 479...
2.14986
714
from queue import Queue, Empty from time import sleep from threading import Timer if __name__ == '__main__': main()
[ 6738, 16834, 1330, 4670, 518, 11, 33523, 201, 198, 6738, 640, 1330, 3993, 201, 198, 6738, 4704, 278, 1330, 5045, 263, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 1...
2.66
50
# -*- coding: utf-8 -*- import hashlib import subprocess import sys import os G_ZIP_SPLIT_LINE = 500 G_ZIP_SPLIT_UNIT = 100
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 12234, 8019, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 38, 62, 57, 4061, 62, 4303, 43, 2043, 62, 24027, 796, 5323, 198, 38, 62, 57...
2.216667
60
# Copyright 2019 The Sonnet 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 l...
[ 2, 15069, 13130, 383, 6295, 3262, 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, 351, ...
2.871146
1,265
import responses from urllib.parse import urlencode from tests.util import random_str from tests.util import mock_http_response from binance.spot import Spot as Client from binance.error import ParameterRequiredError, ClientError mock_item = {"key_1": "value_1", "key_2": "value_2"} mock_exception = {"code": -1105, "m...
[ 11748, 9109, 198, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 2956, 11925, 8189, 198, 6738, 5254, 13, 22602, 1330, 4738, 62, 2536, 198, 6738, 5254, 13, 22602, 1330, 15290, 62, 4023, 62, 26209, 198, 6738, 9874, 590, 13, 20485, 1330, 15...
2.762548
518
# # Copyright (c) SAS Institute 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 to in w...
[ 2, 198, 2, 15069, 357, 66, 8, 35516, 5136, 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, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
3.677686
242
''' #Students Name's: Ciaran Carroll # Student Id Number's: 13113259 # # Project 1: # Implement image reconstruction from parallel-projection sinograms using Python. # # CAT Scanners (or CT scan) - Computer Axial Tomography # CT scan: is a special X-ray tests that produce cross-sectional images of the body using X-ra...
[ 7061, 6, 198, 2, 28239, 6530, 338, 25, 220, 220, 197, 34, 12571, 272, 21298, 198, 2, 13613, 5121, 7913, 338, 25, 197, 1485, 16616, 25191, 198, 2, 198, 2, 4935, 352, 25, 198, 2, 48282, 2939, 25056, 422, 10730, 12, 16302, 295, 7813,...
2.775365
2,395
import argparse import collections import datetime import json import random import re import esprima import requests ## Get the email and password parser = argparse.ArgumentParser("messyger") parser.add_argument("-u", "--email", required=True) parser.add_argument("-p", "--password", required=True) parser.add_argume...
[ 11748, 1822, 29572, 198, 11748, 17268, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 11748, 4738, 198, 11748, 302, 198, 198, 11748, 1658, 1050, 8083, 198, 11748, 7007, 198, 198, 2235, 3497, 262, 3053, 290, 9206, 198, 198, 48610, 796, ...
1.758159
3,585
import os import re with open('PKGBUILD') as fp: for line in fp.readlines(): line = line.strip() current_build_number = re.search(r"^_pkgbuildnumber=(.+)$", line) if current_build_number is None: continue current_build_number = current_build_number.group(1) brea...
[ 11748, 28686, 198, 11748, 302, 628, 198, 4480, 1280, 10786, 40492, 4579, 52, 26761, 11537, 355, 277, 79, 25, 198, 220, 220, 220, 329, 1627, 287, 277, 79, 13, 961, 6615, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 1627, 796, 1627,...
2.429022
634
import pytest import numpy as np from functools import reduce from hottbox.core.structures import Tensor,TensorCPD, TensorTKD, TensorTT from hottbox.utils.validation.checks import is_super_symmetric from ..basic import dense_tensor, sparse_tensor, super_diagonal_tensor, \ super_diag_tensor, super_symmetric_tensor, ...
[ 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1257, 310, 10141, 1330, 4646, 198, 6738, 289, 1252, 3524, 13, 7295, 13, 7249, 942, 1330, 309, 22854, 11, 51, 22854, 34, 5760, 11, 309, 22854, 51, 42, 35, 11, 309, 22...
1.911174
4,582
"""Base classes for my data model.""" import decimal from google.appengine.ext import ndb from google.appengine.ext.ndb import polymodel from appengine import history, rest, user # From http://stackoverflow.com/questions/10035133/ndb-decimal-property class DecimalProperty(ndb.IntegerProperty): """Decimal property...
[ 37811, 14881, 6097, 329, 616, 1366, 2746, 526, 15931, 198, 11748, 32465, 198, 198, 6738, 23645, 13, 1324, 18392, 13, 2302, 1330, 299, 9945, 198, 6738, 23645, 13, 1324, 18392, 13, 2302, 13, 358, 65, 1330, 7514, 19849, 198, 198, 6738, 5...
2.782101
514
# # Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors # # This file is part of Power Sequencer. # # Power Sequencer is free software: you can redistribute it and/or modify it under the terms of the # GNU General Public License as published by the Free Software Foundation, either...
[ 2, 198, 2, 15069, 357, 34, 8, 1584, 12, 42334, 416, 18106, 39911, 5549, 11, 7806, 440, 539, 88, 11, 38058, 10438, 5325, 377, 3798, 84, 11, 290, 20420, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 4333, 24604, 12137, 13, 198, 2, 198...
2.94824
483
from sys import path as sys_path from os import path as os_path from subprocess import Popen, PIPE import time import logging import warnings import numpy as np sys_path.append(os_path.abspath('../src')) from config import RUNTIME_CONFIG from config import john_nick_names, hc_nick_names from common import PasswordPol...
[ 6738, 25064, 1330, 3108, 355, 25064, 62, 6978, 198, 6738, 28686, 1330, 3108, 355, 28686, 62, 6978, 198, 6738, 850, 14681, 1330, 8099, 268, 11, 350, 4061, 36, 198, 11748, 640, 198, 11748, 18931, 198, 11748, 14601, 198, 11748, 299, 32152,...
2.181439
3,599
''' This file is for retrieving system environment variables and helper variables directly derived from them. In decreasing order of precedence, environment variables can be set by: 1. adding them to .env file at root of this project 2. exporting and then running bumblebee in then same terminal. E.g. export BUMBLEB...
[ 7061, 6, 198, 1212, 2393, 318, 329, 50122, 1080, 2858, 9633, 290, 31904, 198, 25641, 2977, 3264, 10944, 422, 606, 13, 198, 198, 818, 24030, 1502, 286, 38177, 11, 2858, 9633, 460, 307, 900, 416, 25, 198, 16, 13, 4375, 606, 284, 764, ...
3.361257
191
"""Pagination sample for Microsoft Graph.""" # Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. # See LICENSE in the project root for license information. import os import bottle import graphrest import config MSGRAPH = graphrest.GraphSession(client_id=config.CLIENT_ID, ...
[ 37811, 47, 363, 1883, 6291, 329, 5413, 29681, 526, 15931, 198, 2, 15069, 357, 66, 8, 5413, 13, 1439, 2489, 10395, 13, 49962, 739, 262, 17168, 5964, 13, 198, 2, 4091, 38559, 24290, 287, 262, 1628, 6808, 329, 5964, 1321, 13, 198, 1174...
2.629057
647
from django.conf import settings from django.db import models from django.dispatch import receiver from django.contrib.auth.models import User import requests from django.utils.text import slugify from django.utils.translation import ugettext_lazy as _, ugettext from django.core import validators from channels import G...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 6381, 17147, 1330, 9733, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 11748, 7007, ...
2.868644
944
import json import re import argparse import sys if __name__ == '__main__': main()
[ 11748, 33918, 198, 11748, 302, 198, 11748, 1822, 29572, 198, 11748, 25064, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.84375
32
import json from src.mappers.heartbeatMapper import Heartbeat
[ 11748, 33918, 198, 198, 6738, 12351, 13, 76, 46629, 13, 11499, 12945, 44, 11463, 1330, 8894, 12945, 628 ]
3.555556
18
# Generated automatically using the command : # c++2py h5py_io.hpp --members_read_only -N h5 -a _h5py -m _h5py -o _h5py --moduledoc="A lightweight hdf5 python interface" --cxxflags="-std=c++20" --includes=./../../c++ --only="object file group h5_read_bare h5_write_bare" from cpp2py.wrap_generator import * # The module...
[ 2, 2980, 515, 6338, 1262, 262, 3141, 1058, 198, 2, 269, 4880, 17, 9078, 289, 20, 9078, 62, 952, 13, 71, 381, 1377, 30814, 62, 961, 62, 8807, 532, 45, 289, 20, 532, 64, 4808, 71, 20, 9078, 532, 76, 4808, 71, 20, 9078, 532, 78, ...
2.636364
1,518
# Copyright 2021 Google 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 to in writing, s...
[ 2, 15069, 33448, 3012, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 4943, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, ...
3.747706
218
"""Citizens model.""" # Django from django.db import models from django.contrib.auth.models import AbstractUser from django.core.validators import RegexValidator # models from paranuara.companies.models import Company # PostgreSQL fields from django.contrib.postgres.fields import JSONField # Utilities from paranuar...
[ 37811, 34, 34100, 2746, 526, 15931, 198, 198, 2, 37770, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 27741, 12982, 198, 6738, 42625, 14208, 13, 7295, 13, 12102, 2024,...
2.325424
1,180
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.urls import path from .views import login_register, task_manage, analysis_page urlpatterns = [ path('login/', login_register.Login.as_view()), path('register/', login_register.SignIn.as_view()), path('register/check_username', login_register.SignIn.a...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 33571, 1330, 17594, 62, 30238, 11, 4876, 62, 805, 496, ...
2.683646
373
from django.conf import settings from django.conf.urls import url, include from django.contrib.staticfiles.urls import staticfiles_urlpatterns from main import views from django.contrib.auth import views as auth_views from django.views.static import serve # Uncomment the next two lines to enable the admin: from django...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 11, 2291, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 12708, 16624, 13, 6371, 82, 1330, 9037, 16624, 62, 6371, 33279, 82, 198, 6...
2.585714
350
from mathbox.statistics.estimator import mean, std # Generalized ESD Test for Outliers # https://www.itl.nist.gov/div898/handbook/eda/section3/eda35h3.htm
[ 6738, 10688, 3524, 13, 14269, 3969, 13, 395, 320, 1352, 1330, 1612, 11, 14367, 198, 198, 2, 3611, 1143, 412, 10305, 6208, 329, 3806, 75, 3183, 198, 2, 3740, 1378, 2503, 13, 270, 75, 13, 77, 396, 13, 9567, 14, 7146, 23, 4089, 14, ...
2.672414
58
#!/usr/bin/python from requirement import * from producer import producer from scheduler import fcfs from teller import teller txt = open('result/processes','w') txt.write('Processes\n\n') #Thread(target = producer).start() producer() for process in processes: txt.write(str(process)+'\n') for i in range(teller_c...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 6738, 9079, 1330, 1635, 198, 6738, 9920, 1330, 9920, 198, 6738, 6038, 18173, 1330, 277, 66, 9501, 198, 6738, 1560, 263, 1330, 1560, 263, 628, 198, 14116, 796, 1280, 10786, 20274, 14, 146...
2.876812
138
from floem import * n_cores = 2 Enq, Deq, Release = queue.queue_custom('queue', Tuple, 4, n_cores, Tuple.task, enq_output=True) RxWrite('mysend') RxPrint('process') c = Compiler() c.testing = r''' Tuple tuples[5]; for(int i=0; i<5;i++) { tuples[i].task = 10; tuples[i].val = i; } for(int i=0; i<5;i++) { ...
[ 6738, 5530, 368, 1330, 1635, 198, 198, 77, 62, 66, 2850, 796, 362, 628, 198, 4834, 80, 11, 1024, 80, 11, 13868, 796, 16834, 13, 36560, 62, 23144, 10786, 36560, 3256, 309, 29291, 11, 604, 11, 299, 62, 66, 2850, 11, 309, 29291, 13, ...
1.93949
314
# -*- coding: utf-8 -*- # # Electrum-NMC - lightweight Namecoin client # Copyright (C) 2018 The Namecoin developers # # License for all components not part of Electrum-DOGE: # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Sof...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 5903, 6582, 12, 45, 9655, 532, 18700, 6530, 3630, 5456, 198, 2, 15069, 357, 34, 8, 2864, 383, 6530, 3630, 6505, 198, 2, 198, 2, 13789, 329, 477, 6805, 4...
3.208209
1,681
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys def extract(file=None, path=None): """ Extract all of the YouTube links within a Headset user-made list. :param file: headset json export file path :param path: json path to extract, you can use [JSON Columns](http://json-columns.com) to get it :re...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 25064, 628, 198, 4299, 7925, 7, 7753, 28, 14202, 11, 3108, 28, 14202, 2599, 198, 220, 37227, 198, 220...
3.044693
179
from django.shortcuts import render from django.http import HttpResponse from django.contrib.auth.forms import UserCreationForm from django.contrib.auth import login, authenticate from django.contrib.auth.models import User from django.http import JsonResponse #################### # IMPORT OTHER LIBS ################...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 11787, 12443, 341, 8479, 198, 6738, 42625, 14208, 13, 3642, ...
2.31539
2,638
import re from importlib import import_module import inspect import sublime_plugin import sublime SCOPE_RE = re.compile(r'\bsource\.python\b') LIB_MODULE_RE = re.compile(r'\bsupport\.module\.python\b') def grab_module(view, cursor): ''' Grabs the entire module path under the cursor ''' word_sel = view.wor...
[ 11748, 302, 198, 6738, 1330, 8019, 1330, 1330, 62, 21412, 198, 11748, 10104, 198, 198, 11748, 41674, 62, 33803, 198, 11748, 41674, 628, 198, 6173, 32135, 62, 2200, 796, 302, 13, 5589, 576, 7, 81, 6, 59, 1443, 1668, 17405, 29412, 59, ...
2.382872
397
""" Calculates port ranks and distributes ports. The rank of a port is a floating point number that represents its position inside the containing layer. This depends on the node order of that layer and on the port constraints of the nodes. Port ranks are used by {@link ICrossingMinimizationHeuristics for calculating b...
[ 198, 37811, 198, 9771, 3129, 689, 2493, 9803, 290, 1233, 7657, 14090, 13, 198, 464, 4279, 286, 257, 2493, 318, 257, 12462, 966, 1271, 326, 6870, 663, 2292, 198, 48787, 262, 7268, 7679, 13, 770, 8338, 319, 262, 10139, 1502, 286, 326, ...
2.94127
1,260
from setuptools import setup, find_packages PACKAGENAME = "deltasigma" VERSION = "0.0.dev" setup( name=PACKAGENAME, version=VERSION, author="Antonio Villarreal", author_email="avillarreal@anl.gov", description="Source code for chopper / halotools implementation to calculate delta sigma.", lo...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 47, 8120, 4760, 1677, 10067, 796, 366, 67, 2120, 292, 13495, 1, 198, 43717, 796, 366, 15, 13, 15, 13, 7959, 1, 628, 198, 40406, 7, 198, 220, 220, 220, 1438, 28, ...
2.859903
207
import itertools import os import csv from loguru import logger from datetime import * class SensorPersistence(Persistence): """ Writes sensor data to a buffer and periodically flushes to file system. """
[ 11748, 340, 861, 10141, 201, 198, 11748, 28686, 201, 198, 11748, 269, 21370, 201, 198, 6738, 2604, 14717, 1330, 49706, 201, 198, 201, 198, 6738, 4818, 8079, 1330, 1635, 201, 198, 201, 198, 201, 198, 201, 198, 4871, 35367, 30946, 13274, ...
2.86747
83
from picamera import PiCamera from time import sleep from gpiozero import Button import keyboard button = keyboard.is_pressed('h') camera = PiCamera() while True: camera.start_preview() button.wait_for_press() print("Button has been pressed!") sleep(3) camera.capture('animateImage.jpg') camera.stop_preview()
[ 6738, 8301, 18144, 1330, 13993, 35632, 198, 6738, 640, 1330, 3993, 198, 6738, 27809, 952, 22570, 1330, 20969, 198, 11748, 10586, 198, 198, 16539, 796, 10586, 13, 271, 62, 45477, 10786, 71, 11537, 198, 25695, 796, 13993, 35632, 3419, 198, ...
3.148515
101
#!/usr/bin/env python import os, sys, pickle import keras.backend as K import tensorflow as tf import numpy as np from argparse import ArgumentParser sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from datasets import mnist from models import (train, accuracy, save_to_file, fc_100_...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 11, 25064, 11, 2298, 293, 198, 11748, 41927, 292, 13, 1891, 437, 355, 509, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 6738, ...
2.054323
2,209
#!/usr/bin/env python ''' VIMTern.py dispatch work to your intern via Slack from the command line. ''' from random import randint from sys import exit, argv import argparse import json import yaml # To load the intrn file VERBOSE = False try: import requests except ImportError: print "Unable to import reques...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 7061, 6, 198, 53, 3955, 51, 1142, 13, 9078, 27965, 670, 284, 534, 1788, 2884, 36256, 422, 262, 3141, 1627, 13, 198, 7061, 6, 198, 6738, 4738, 1330, 43720, 600, 198, 6738, 25064, 1330...
2.134454
1,428
from numpy import array
[ 6738, 299, 32152, 1330, 7177 ]
4.6
5
import stripe from stripe.test.helper import StripeResourceTest
[ 11748, 39858, 198, 6738, 39858, 13, 9288, 13, 2978, 525, 1330, 26137, 431, 26198, 14402, 628 ]
4.0625
16
""" Created on 10 Nov 2018 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) a dummy LED state, to maintain compatibility with the DFE Eng package """ from collections import OrderedDict from scs_core.data.json import JSONable # ----------------------------------------------------------------------------...
[ 37811, 198, 41972, 319, 838, 5267, 2864, 198, 198, 31, 9800, 25, 31045, 3944, 2364, 357, 1671, 36909, 13, 6667, 2364, 31, 35782, 1073, 5773, 4234, 13, 785, 8, 198, 198, 64, 31548, 12365, 1181, 11, 284, 5529, 17764, 351, 262, 360, 15...
5.549587
242
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Les boucles et les instruction de contrôle Quelques exemples de manipulations des boucles et des instructions """ # la suite de fibonnaci a, b = 0, 1 while a < 20: print(a, end=",") # on idente de 4 espace l'instruction suivante a, b = b, a+b print() i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 35882, 35833, 5427, 2123, 10287, 12064, 390, 3445, 27083, 293, 198, 198, 48, 2731, 13281, 409, 368, 237...
1.794793
1,306
import time
[ 11748, 640, 628 ]
4.333333
3
"""Setup.""" from setuptools import setup, find_packages inst_reqs = [ "mercantile == 1.1.5", "requests", "geojson", "pillow", "gdal == 2.4.2", "shapely == 1.6.4", "affine == 2.3.0", "numpy == 1.19.0", "rasterio == 1.1.5" ] extra_reqs = {"test": ["pytest", "pytest-cov"]} setup( ...
[ 37811, 40786, 526, 15931, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 8625, 62, 42180, 82, 796, 685, 198, 220, 220, 220, 366, 647, 66, 415, 576, 6624, 352, 13, 16, 13, 20, 1600, 198, 220, 220, 220...
2.15894
302
# Copyright 2022 Yan Yan # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, soft...
[ 2, 15069, 33160, 10642, 10642, 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, 73...
2.380952
399
#!/bin/python3 # author: Jan Hybs from loguru import logger from flask_restful import Resource from cihpc.common.utils import strings from cihpc.common.utils import datautils as du
[ 2, 48443, 8800, 14, 29412, 18, 198, 2, 1772, 25, 2365, 6707, 1443, 198, 198, 6738, 2604, 14717, 1330, 49706, 628, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 198, 6738, 269, 4449, 14751, 13, 11321, 13, 26791, 1330, 13042, 198, 6738,...
3.363636
55
from spinn_machine.utilities.progress_bar import ProgressBar from spinn_front_end_common.abstract_models.\ abstract_data_specable_vertex import AbstractDataSpecableVertex from spinn_front_end_common.utilities.utility_objs.executable_targets import \ ExecutableTargets from spinn_front_end_common.utilities impor...
[ 6738, 599, 3732, 62, 30243, 13, 315, 2410, 13, 33723, 62, 5657, 1330, 18387, 10374, 198, 198, 6738, 599, 3732, 62, 8534, 62, 437, 62, 11321, 13, 397, 8709, 62, 27530, 13, 59, 198, 220, 220, 220, 12531, 62, 7890, 62, 16684, 540, 62...
2.395965
793
# -*- coding: utf-8 -*- import io, json from pathlib import Path class ColorRegistry: """ Open, read and store color names maps Default shipped color registry is used on loading if no specific path is given to ``load`` method. """ def load(self, path=None): """ Load registry...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33245, 11, 33918, 198, 198, 6738, 3108, 8019, 1330, 10644, 628, 198, 4871, 5315, 8081, 4592, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4946, 11, 1100, ...
2.305847
667
#-*-coding:utf-8-*- from futuquant import * import pandas if __name__ == '__main__': GetMulHtryKl().test1()
[ 2, 12, 9, 12, 66, 7656, 25, 40477, 12, 23, 12, 9, 12, 198, 198, 6738, 13294, 84, 40972, 1330, 1635, 198, 11748, 19798, 292, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3497, 44, 3...
2.169811
53
#!/usr/bin/env python3 # Copyright (c) 2021 oatsu """ 連続音歌詞を空白で区切って単独音にするUTAUプラグイン """ import utaupy def ren2tan(plugin): """ 歌詞を空白で区切って、空白より後ろ側だけ残す。 """ for note in plugin.notes: note.lyric = note.lyric.split()[-1] if __name__ == '__main__': utaupy.utauplugin.run(ren2tan)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 33448, 267, 19231, 198, 37811, 198, 34460, 96, 163, 114, 21253, 253, 111, 29826, 234, 164, 102, 252, 31758, 163, 102, 118, 163, 50159, 30640, 44293, 118, 26...
1.517241
203
import cupy def empty(shape, dtype=float): """Returns an array without initializing the elements. This function currently does not support ``order`` option. Args: shape (tuple of ints): Dimensionalities of the array. dtype: Data type specifier. Returns: cupy.ndarray: A new a...
[ 11748, 6508, 88, 628, 198, 4299, 6565, 7, 43358, 11, 288, 4906, 28, 22468, 2599, 198, 220, 220, 220, 37227, 35561, 281, 7177, 1231, 4238, 2890, 262, 4847, 13, 628, 220, 220, 220, 770, 2163, 3058, 857, 407, 1104, 7559, 2875, 15506, 3...
2.563593
2,115
from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging import argparse import json from functools import reduce import tensorflow as tf from tensorflow.python.lib.io.file_io import FileIO # pylint: disable=E0611 from sciencebeam_gym.trainer.data...
[ 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, 18931, 198, 11748, 1822, 29572, 198, 11748, 33918, 198, 6738, 1257, 310, 10141,...
2.757315
581
import aiohttp.web from functools import wraps import logging from typing import Callable import json import dataclasses import ray import ray.dashboard.utils as dashboard_utils from ray._private.job_manager import JobManager from ray._private.runtime_env.packaging import (package_exists, ...
[ 11748, 257, 952, 4023, 13, 12384, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 11748, 18931, 198, 6738, 19720, 1330, 4889, 540, 198, 11748, 33918, 198, 11748, 4818, 330, 28958, 198, 198, 11748, 26842, 198, 11748, 26842, 13, 42460, 3526,...
2.532394
355
#!/usr/bin/env python import argparse from .sql import MiniSpiderSQL from .scheduler import MiniSpider from .extractor import Extractor from .downloader import MiniSpiderDownloader __version__ = '0.0.3' if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 1822, 29572, 198, 198, 6738, 764, 25410, 1330, 12558, 41294, 17861, 198, 6738, 764, 1416, 704, 18173, 1330, 12558, 41294, 198, 6738, 764, 2302, 40450, 1330, 29677, 273, 198, 6738, ...
3.037037
81
# -*- coding: utf-8 -*- # # Copyright (C) 2020 CERN. # # invenio-app-ils is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """ILL mail tasks.""" from invenio_app_ils.ill.errors import ILLError from invenio_app_ils.ill.mail.factory impor...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 12131, 327, 28778, 13, 198, 2, 198, 2, 287, 574, 952, 12, 1324, 12, 4487, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, ...
2.571702
523
from abc import abstractmethod from csp.observer import Observer class Propagator(Observer): """Abstract class for a constraint propagator.""" @abstractmethod def on_domain_change(self, var): """Called when a variable domain has changed. :param var: The var...
[ 6738, 450, 66, 1330, 12531, 24396, 201, 198, 201, 198, 6738, 269, 2777, 13, 672, 15388, 1330, 27058, 201, 198, 201, 198, 201, 198, 4871, 8772, 363, 1352, 7, 31310, 18497, 2599, 201, 198, 220, 220, 220, 37227, 23839, 1398, 329, 257, ...
2.119681
376
# Generated by Django 2.0 on 2019-04-02 09:57 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 319, 13130, 12, 3023, 12, 2999, 7769, 25, 3553, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.966667
30
# coding:utf8 import re options = { 'root_url': 'http://www.juooo.com', 'max_count': 1000, 'urlReg': { 'urlRegType': 1, 'urlFull': '', 'urlStr': 'http://(\w+).juooo.com/\w+' }, 'urlData': [] }
[ 2, 19617, 25, 40477, 23, 198, 11748, 302, 198, 198, 25811, 796, 1391, 198, 220, 220, 220, 705, 15763, 62, 6371, 10354, 705, 4023, 1378, 2503, 13, 14396, 34160, 13, 785, 3256, 198, 220, 220, 220, 705, 9806, 62, 9127, 10354, 8576, 11,...
1.875
128
import pandas as pd import numpy as np import os, sys, gc, random import datetime import dateutil.relativedelta # Machine learning from sklearn.preprocessing import LabelEncoder from sklearn.impute import SimpleImputer from sklearn.model_selection import StratifiedKFold from sklearn.metrics import roc_auc_score # Cus...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 11, 25064, 11, 308, 66, 11, 4738, 198, 11748, 4818, 8079, 198, 11748, 3128, 22602, 13, 2411, 265, 1572, 12514, 198, 198, 2, 10850, 4673, 198, 6738...
1.867665
801
from __future__ import unicode_literals from __future__ import print_function import unicodedata import unittest """ Very simple assorted helpers for natural language processing that I've used a few times. """ _CHAR_TRANSLATIONS = { # chars to remove "\u00ae": None, "\u2122": None, # chars to normal...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28000, 9043, 1045, 198, 11748, 555, 715, 395, 198, 198, 37811, 198, 16371, 2829, 46603, 49385, 329, 3288, 3...
2.630499
341
from manim_imports_ext import *
[ 6738, 582, 320, 62, 320, 3742, 62, 2302, 1330, 1635, 198 ]
2.909091
11
#!/usr/bin/env python """ genome_download: downloading genomes Usage: genome_download [options] <accession_table> genome_download -h | --help genome_download --version Options: <accessin_table> Taxon-accession table (see Description). Use '-' if from STDIN. -d=<d> Output dir...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 5235, 462, 62, 15002, 25, 22023, 42136, 198, 198, 28350, 25, 198, 220, 19270, 62, 15002, 685, 25811, 60, 1279, 15526, 295, 62, 11487, 29, 198, 220, 19270, 62, 15002, ...
2.615126
595
import logging import multiprocessing from typing import MutableMapping from PyQt6.QtCore import * from PyQt6.QtWidgets import * from Core.messages import Courier, Message from .widgets import * import os, sys
[ 11748, 18931, 198, 11748, 18540, 305, 919, 278, 198, 6738, 19720, 1330, 13859, 540, 44, 5912, 198, 6738, 9485, 48, 83, 21, 13, 48, 83, 14055, 1330, 1635, 198, 6738, 9485, 48, 83, 21, 13, 48, 83, 54, 312, 11407, 1330, 1635, 198, 67...
3.246154
65
# SPDX-License-Identifier: MIT # Greetings to: # - https://www.theiphonewiki.com/wiki/IMG4_File_Format # - https://github.com/tihmstar/img4tool/ # - https://lapo.it/asn1js/ # - hexdump tool of choice import functools from asn1crypto.core import ( Enumerated, Choice, Sequence, SequenceOf, SetOf, Integer, IA5Str...
[ 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 2, 402, 46648, 284, 25, 198, 2, 532, 3740, 1378, 2503, 13, 1169, 13323, 44181, 5580, 13, 785, 14, 15466, 14, 3955, 38, 19, 62, 8979, 62, 26227, 198, 2, 532, 3740, 1378, 1...
1.981278
1,816
import unittest from programy.storage.stores.nosql.mongo.dao.rdf import RDF
[ 11748, 555, 715, 395, 198, 198, 6738, 1430, 88, 13, 35350, 13, 43409, 13, 39369, 13976, 13, 76, 25162, 13, 67, 5488, 13, 4372, 69, 1330, 371, 8068, 628 ]
2.689655
29
# (c) 2017 Gregor Mitscha-Baude from matplotlib import pyplot as plt import numpy as np import dolfin from nanopores.tools import fields fields.set_dir_dropbox() from nanopores.models.nanopore import Setup from nanopores.geometries.alphahempoly import poly from nanopores.geometries.alphahem import default from nanopore...
[ 2, 357, 66, 8, 2177, 8547, 273, 22424, 11693, 12, 34458, 2507, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 288, 4024, 259, 198, 6738, 46661, 2850, 13, 31391, 1330, 70...
2.334078
895
"""This module solves kata https://www.codewars.com/kata/multiples-and-digit-sums/train/python.""" def procedure(i): """Return an integer derived by first finding all multiples of i up to 100, then summing all up digit sums of all multiples.""" return sum(int(d) for i in range(n, 101, n) for d in str(i))
[ 37811, 1212, 8265, 39107, 479, 1045, 3740, 1378, 2503, 13, 19815, 413, 945, 13, 785, 14, 74, 1045, 14, 41684, 2374, 12, 392, 12, 27003, 12, 82, 5700, 14, 27432, 14, 29412, 526, 15931, 628, 198, 4299, 8771, 7, 72, 2599, 198, 220, 2...
2.93578
109
import json import folium import folium.plugins import tempfile import os import re import argparse if __name__ == "__main__": cwd = os.getcwd() args = get_args() plot_privpurge( os.path.join(cwd, args.zonefile), os.path.join(cwd, args.directory), filename=args.output, )
[ 11748, 33918, 198, 11748, 5955, 1505, 198, 11748, 5955, 1505, 13, 37390, 198, 11748, 20218, 7753, 198, 11748, 28686, 198, 11748, 302, 628, 198, 198, 11748, 1822, 29572, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1...
2.335766
137
# pylint: skip-file """ Unit test for data utils functions. """ import numpy as np import pandas as pd import pytest import tensorflow as tf from tensorflow import test from .data_utils import quantiles_handler, example_handler, fill_none from ..data import random_ts from ..dataset import WindowGenerator @pytest...
[ 2, 279, 2645, 600, 25, 14267, 12, 7753, 198, 198, 37811, 198, 26453, 1332, 329, 1366, 3384, 4487, 5499, 13, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 12972, 9288, 198, 198, ...
3.028169
142
# Copyright (C) Mesosphere, Inc. See LICENSE file for details. """ Shared code for DC/OS endpoints mocks used by AR instances, both EE and Open. """ import abc import http.server import logging import os import socket import socketserver import ssl import threading # pylint: disable=C0103 log = logging.getLogger(__n...
[ 2, 15069, 357, 34, 8, 14937, 22829, 11, 3457, 13, 4091, 38559, 24290, 2393, 329, 3307, 13, 198, 198, 37811, 198, 2484, 1144, 2438, 329, 6257, 14, 2640, 886, 13033, 285, 3320, 973, 416, 5923, 10245, 11, 1111, 27254, 290, 4946, 13, 19...
2.498764
4,856
import os import argparse from datetime import datetime import time import torch import torch.nn.functional as F import torch.multiprocessing as mp import numpy as np import pandas as pd from tqdm import tqdm import matplotlib import matplotlib.pyplot as plt from tensorboardX import SummaryWriter import data import...
[ 11748, 28686, 198, 11748, 1822, 29572, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 640, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 13, 16680, 541, 305, 919, 278, 355, 29034, 19...
2.916667
192
import math #def find_par(self): if __name__ == "__main__": main()
[ 11748, 10688, 198, 197, 197, 198, 197, 2, 4299, 1064, 62, 1845, 7, 944, 2599, 198, 197, 197, 198, 197, 197, 198, 197, 197, 198, 197, 198, 197, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 197, 12417, 3419, 19...
1.875
48