content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
''' urlcanon/rules.py - url matching rules Copyright (C) 2017 Internet Archive 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 ap...
[ 7061, 6, 198, 6371, 49883, 14, 38785, 13, 9078, 532, 19016, 12336, 3173, 198, 198, 15269, 357, 34, 8, 2177, 4455, 20816, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, ...
2.372378
3,099
import pandas as pd x=pd.read_pickle("c:/temp/ffMonthly.pkl") print(x.head()) print(x.tail())
[ 11748, 19798, 292, 355, 279, 67, 198, 87, 28, 30094, 13, 961, 62, 27729, 293, 7203, 66, 14079, 29510, 14, 487, 31948, 306, 13, 79, 41582, 4943, 198, 4798, 7, 87, 13, 2256, 28955, 198, 4798, 7, 87, 13, 13199, 28955 ]
2.268293
41
import json import unittest from unittest.mock import patch from api.app import app from api.models import Planet, db
[ 11748, 33918, 198, 11748, 555, 715, 395, 198, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 6738, 40391, 13, 1324, 1330, 598, 198, 6738, 40391, 13, 27530, 1330, 11397, 11, 20613, 628 ]
3.361111
36
import numpy as np import math from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score from sklearn.metrics import precision_score from sklearn.metrics import f1_score from sklearn import preprocessing from sklearn.decomposition import PCA from sklearn.model_selection import cros...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 9922, 62, 26675, 198, 6738, 1341, 35720, 13, 4164, 10466, 13...
2.795455
748
obj1 = Car("Suzuki", "Grey", "2015", 4) obj1.printCarDetails()
[ 628, 198, 26801, 16, 796, 1879, 7203, 5606, 89, 11308, 1600, 366, 49141, 1600, 366, 4626, 1600, 604, 8, 198, 26801, 16, 13, 4798, 9914, 24259, 3419, 198 ]
2.357143
28
import sys, os import math import collections import re import multiprocessing import time import contextlib import json import tqdm import nltk import numpy as np import tensorflow as tf import pandas as pd import sentencepiece as spm GLOVE_PATH = "../input/embeddings/glove.840B.300d/glove.840B.300d.txt" PARAGRAM_PA...
[ 11748, 25064, 11, 28686, 198, 11748, 10688, 198, 11748, 17268, 198, 11748, 302, 198, 11748, 18540, 305, 919, 278, 198, 11748, 640, 198, 11748, 4732, 8019, 198, 11748, 33918, 198, 11748, 256, 80, 36020, 198, 198, 11748, 299, 2528, 74, 19...
2.27005
3,429
# -*- coding: utf-8 -*- ''' Neste problema foi usada uma lógica simples em que cada palavra do texto é colocado em uma lista. Depois disso é executado o loop que itera por estas palavras. Se a palavra é igual a palavra procurada então a posição é adicionada em uma lista. A posição é calculada somando o comprimento de ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 7061, 6, 198, 45, 29872, 1917, 64, 11511, 72, 514, 4763, 334, 2611, 300, 10205, 70, 3970, 985, 2374, 795, 8358, 269, 4763, 6340, 615, 430, 466, 2420, 78, 38251, ...
2.32563
476
#! python3 import re from os import path from io import open from setuptools import setup, find_packages here = path.abspath(path.dirname(__file__)) setup( name = "safeprint", version = find_version("safeprint/__init__.py"), description = 'A printer suppressing UnicodeEncodeError', long_description = read("REA...
[ 2, 0, 21015, 18, 198, 198, 11748, 302, 198, 6738, 28686, 1330, 3108, 198, 6738, 33245, 1330, 1280, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 1456, 796, 3108, 13, 397, 2777, 776, 7, 6978, 13, 15908...
2.921241
419
# part 1 prog = [int(s) for s in open('input.txt', 'r').readline().split(',')] print(prog) prog[1] = 12 prog[2] = 2 p = 0 while True: op = prog[p] if op == 99: break val1, val2, wPos = prog[p+1], prog[p+2], prog[p+3] if op == 1: # add prog[wPos] = prog[val1] + prog[val2] elif op ...
[ 2, 636, 352, 198, 198, 1676, 70, 796, 685, 600, 7, 82, 8, 329, 264, 287, 220, 1280, 10786, 15414, 13, 14116, 3256, 705, 81, 27691, 961, 1370, 22446, 35312, 7, 3256, 11537, 60, 198, 4798, 7, 1676, 70, 8, 198, 198, 1676, 70, 58, ...
1.987342
237
""" Read, write and manipulate VESTA save files """ import re import shutil from typing import Tuple, List, Dict, Union from collections import OrderedDict from pathlib import Path from collections import Counter from yaml import safe_load class DotVesta: """ Representation of a VESTA save file """ d...
[ 37811, 198, 5569, 11, 3551, 290, 18510, 569, 1546, 5603, 3613, 3696, 198, 37811, 198, 11748, 302, 198, 11748, 4423, 346, 198, 6738, 19720, 1330, 309, 29291, 11, 7343, 11, 360, 713, 11, 4479, 198, 6738, 17268, 1330, 14230, 1068, 35, 71...
2.011357
3,610
import os from glob import glob from setuptools import setup from setuptools.config import read_configuration config = read_configuration('setup.cfg') config_dict = {} for section in config: for k in config[section]: config_dict[k] = config[section][k] if os.path.exists('scripts'): confi...
[ 11748, 28686, 201, 198, 6738, 15095, 1330, 15095, 201, 198, 6738, 900, 37623, 10141, 1330, 9058, 201, 198, 6738, 900, 37623, 10141, 13, 11250, 1330, 1100, 62, 11250, 3924, 201, 198, 201, 198, 11250, 796, 1100, 62, 11250, 3924, 10786, 40...
2.702703
148
import os, pprint, platform; comp = platform.system() user = "ghost" print comp try: cmd = os.popen("whoami") try: user = cmd.readlines() user = user[0].strip("\n") if 'Windows' == comp: user = user.split("\\")[1] finally: cmd.close() except IOError: print ...
[ 11748, 28686, 11, 279, 4798, 11, 3859, 26, 198, 198, 5589, 796, 3859, 13, 10057, 3419, 198, 7220, 796, 366, 38933, 1, 198, 198, 4798, 552, 198, 198, 28311, 25, 198, 220, 220, 220, 23991, 796, 28686, 13, 79, 9654, 7203, 8727, 6277, ...
2.179941
339
#!/usr/bin/env python3 try: import sys from os import system, popen except: raise sys.exit(1) class ProgressBar(object): """print a progress bar with: 1. processes count given 2. do a loop in processes count and call "mark_as_done" method """ def mark_as_done(self): """m...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 25064, 198, 220, 220, 220, 422, 28686, 1330, 1080, 11, 1461, 268, 198, 16341, 25, 198, 220, 220, 220, 5298, 198, 220, 220, 220, 25064, ...
2.360902
266
from __future__ import absolute_import import struct import io import zlx.int import zlx.record import zlx.io SEEK_SET = 0 SEEK_CUR = 1 SEEK_END = 2 PACK_FMT_DICT = { 'u8': 'B', 'i8': 'b', 'u16le': '<H', 'u16be': '>H', 'i16le': '<h', 'i16be': '>h', 'u32le': '<I', 'u32be': '>I', 'i...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 11748, 2878, 198, 11748, 33245, 198, 198, 11748, 1976, 75, 87, 13, 600, 198, 11748, 1976, 75, 87, 13, 22105, 198, 11748, 1976, 75, 87, 13, 952, 198, 198, 36078, 42, 62, 28480, 796...
2.267918
586
#!/usr/bin/env python3 """ Extract content of different types of tag from an html or xml file matching regular expressions and save the output to a file. There are other methods but this can be used to use more powerful regex. """ import re source_file = 'source.html' destination_file = 'output.html' f = open(source_f...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 11627, 974, 2695, 286, 1180, 3858, 286, 7621, 422, 281, 27711, 393, 35555, 2393, 12336, 198, 16338, 14700, 290, 3613, 262, 5072, 284, 257, 2393, 13, 198, 1858, 389, 584...
2.193317
419
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 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, 198, 2, 5964, 1321...
3.607201
611
#!/usr/bin/env python # -*- coding:utf-8 -*- # @File : spider_test_selenium.py # @Time : 2018/8/2 23:03 # @Author : dong ''' 测试火狐浏览器驱动geckodriver selenium切换和定位iframe 模拟登陆QQ空间 ''' from selenium import webdriver from bs4 import BeautifulSoup import time driver = webdriver.Firefox() # 登录QQ空间 if __name__ == '...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 2, 2488, 8979, 220, 220, 220, 1058, 19230, 62, 9288, 62, 741, 47477, 13, 9078, 198, 2, 2488, 7575, 220, 220, 220, ...
1.757576
198
## # AmberLeafBox # Soup - 2014 ## import gtk import webkit from time import time from gobject import timeout_add_seconds, timeout_add import pickle
[ 2235, 198, 2, 21896, 3123, 1878, 14253, 198, 2, 34011, 532, 1946, 198, 2235, 198, 198, 11748, 308, 30488, 198, 11748, 3992, 15813, 198, 6738, 640, 1330, 640, 198, 6738, 48484, 752, 1330, 26827, 62, 2860, 62, 43012, 11, 26827, 62, 2860...
3.1875
48
from . import csv_loader from . import xlsx_loader from . import yaml_loader data_plugins = { "csv": csv_loader.load, "xlsx": xlsx_loader.load, "yaml": yaml_loader.load, "yml": yaml_loader.load }
[ 6738, 764, 1330, 269, 21370, 62, 29356, 198, 6738, 764, 1330, 2124, 7278, 87, 62, 29356, 198, 6738, 764, 1330, 331, 43695, 62, 29356, 198, 198, 7890, 62, 37390, 796, 1391, 198, 220, 220, 220, 366, 40664, 1298, 269, 21370, 62, 29356, ...
2.27957
93
# ============================================================================ # FILE: sorter/sublime.py # AUTHOR: Tomoki Ohno <wh11e7rue@icloud.com> # DESCRIPTION: Base code is from # https://github.com/forrestthewoods/lib_fts/blob/master/code/fts_fuzzy_match.js # See explanation in # http://...
[ 2, 38093, 2559, 18604, 198, 2, 45811, 25, 264, 4337, 14, 7266, 27299, 13, 9078, 198, 2, 44746, 25, 4186, 18228, 3966, 3919, 1279, 1929, 1157, 68, 22, 24508, 31, 291, 75, 2778, 13, 785, 29, 198, 2, 22196, 40165, 25, 7308, 2438, 318...
3.203647
329
# # This is the Robotics Language compiler # # parsing.py: Implements Error Handling functions # # Created on: September 26, 2018 # Author: Gabriel A. D. Lopes # Licence: Apache 2.0 # Copyright: 2014-2017 Robot Care Systems BV, The Hague, The Netherlands. All rights reserved. # # Licensed under th...
[ 2, 198, 2, 220, 220, 770, 318, 262, 47061, 15417, 17050, 198, 2, 198, 2, 220, 220, 32096, 13, 9078, 25, 1846, 1154, 902, 13047, 49500, 5499, 198, 2, 198, 2, 220, 220, 15622, 319, 25, 2693, 2608, 11, 2864, 198, 2, 220, 220, 220, ...
3.394161
274
import matplotlib.pyplot as plt def plot_surf_stat_map(coords, faces, stat_map=None, elev=0, azim=0, cmap='jet', threshold=None, bg_map=None, mask=None, bg_on_stat=False, alpha='auto', vmax=None, symmetric_cbar="auto", returnAx=False, figsize=(14,11), lab...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 4299, 7110, 62, 11793, 69, 62, 14269, 62, 8899, 7, 1073, 3669, 11, 6698, 11, 1185, 62, 8899, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 7662, 28, 15, ...
1.911866
2,326
# unit tests for consistent model outputs import os import platform import shutil from pathlib import Path import numpy as np import pytest from netCDF4 import Dataset import unittest.mock as mock from pyDeltaRCM import DeltaModel from pyDeltaRCM import preprocessor from .. import utilities @mock.patch( 'pyD...
[ 2, 4326, 5254, 329, 6414, 2746, 23862, 198, 198, 11748, 28686, 198, 11748, 3859, 198, 11748, 4423, 346, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 6738, 2010, 34, 8068, 19,...
2.326932
8,176
# (C) Copyright 2015 Hewlett Packard Enterprise Development LP # 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/LICEN...
[ 2, 357, 34, 8, 15069, 1853, 30446, 15503, 6400, 446, 14973, 7712, 18470, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, ...
2.279362
2,946
import sublime, sublime_plugin import string # In Sublime Text 3 things are loaded async, using plugin_loaded() callback before try accessing. pleasurazy = PleasurazyAPICompletionsPackage() if int(sublime.version()) < 3000: pleasurazy.init() else:
[ 11748, 41674, 11, 41674, 62, 33803, 198, 11748, 4731, 628, 628, 198, 2, 554, 3834, 27299, 8255, 513, 1243, 389, 9639, 30351, 11, 1262, 13877, 62, 14578, 3419, 23838, 878, 1949, 22534, 13, 198, 1154, 292, 333, 12582, 796, 18063, 292, 3...
3.381579
76
#-------------------------------------------------- # Blender Python API Script # Converts and .obj file to a .stl file in Blender # Usage: blender -b -P blenderObjToStl.py -- [inputfile] #-------------------------------------------------- import bpy import sys import time argv = sys.argv argv = argv[argv.index("--")...
[ 2, 47232, 438, 198, 2, 1086, 2194, 11361, 7824, 12327, 198, 2, 1482, 24040, 290, 764, 26801, 2393, 284, 257, 764, 301, 75, 2393, 287, 1086, 2194, 198, 2, 29566, 25, 40047, 532, 65, 532, 47, 40047, 49201, 2514, 1273, 75, 13, 9078, ...
2.949416
257
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-22 23:21 from __future__ import unicode_literals import datetime from django.db import migrations, models import django_markdown.models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 18, 319, 1584, 12, 1065, 12, 1828, 2242, 25, 2481, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.885714
70
"""Generic support for serial connections.""" from typing import Optional import attr from serial.tools import list_ports # type: ignore def find_port(device_filter: str) -> str: """Find a port based on the given filter.""" for port in list_ports.comports(): if device_filter in port.description: ...
[ 37811, 46189, 1104, 329, 11389, 8787, 526, 15931, 198, 198, 6738, 19720, 1330, 32233, 198, 198, 11748, 708, 81, 198, 198, 6738, 11389, 13, 31391, 1330, 1351, 62, 3742, 220, 1303, 2099, 25, 8856, 628, 198, 4299, 1064, 62, 634, 7, 25202...
2.661808
343
# -*- coding: utf-8 -*- from django import forms from django.utils.translation import ugettext_lazy as _ from .models import MindMap, MindMapComponent
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 6738, 764, 27530, 1330, 10175, 13912, ...
3.122449
49
from unittest import mock from py42.exceptions import Py42NotFoundError from pytest import fixture from tests.conftest import ( assert_success, create_fake_connector, create_mock_response, assert_successful_single_data, assert_successful_message, assert_successful_summary, assert_fail_mess...
[ 6738, 555, 715, 395, 1330, 15290, 198, 198, 6738, 12972, 3682, 13, 1069, 11755, 1330, 9485, 3682, 3673, 21077, 12331, 198, 6738, 12972, 9288, 1330, 29220, 198, 198, 6738, 5254, 13, 1102, 701, 395, 1330, 357, 198, 220, 220, 220, 6818, ...
1.904695
2,130
"""empty message Revision ID: 12c0f685cde Revises: 5a44cbcf5e2 Create Date: 2015-10-05 14:42:20.631202 """ # revision identifiers, used by Alembic. revision = '12c0f685cde' down_revision = '5a44cbcf5e2' from alembic import op import sqlalchemy as sa
[ 37811, 28920, 3275, 198, 198, 18009, 1166, 4522, 25, 1105, 66, 15, 69, 35978, 66, 2934, 198, 18009, 2696, 25, 642, 64, 2598, 21101, 12993, 20, 68, 17, 198, 16447, 7536, 25, 1853, 12, 940, 12, 2713, 1478, 25, 3682, 25, 1238, 13, 50...
2.392523
107
import os import json import statistics from urllib.parse import urljoin import encode_utils as eu from encode_utils.connection import Connection sample_data_file, = snakemake.output dcc_mode = snakemake.config["dcc_mode"] experiment = snakemake.params["experiment"] replicate_num = snakemake.params["replicate"] modali...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 7869, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 22179, 198, 11748, 37773, 62, 26791, 355, 304, 84, 198, 6738, 37773, 62, 26791, 13, 38659, 1330, 26923, 198, 198, 39873, 62, 7890, 62,...
2.058855
1,886
# -*- coding: utf-8 -*- # pylint: disable=no-name-in-module """ Main module """ import sys from fbs_runtime.application_context.PyQt5 import ApplicationContext, cached_property class WatchdogAppContext(ApplicationContext): """ FBS Watchdog App Context """ @cached_property # pylint: disable=miss...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 279, 2645, 600, 25, 15560, 28, 3919, 12, 3672, 12, 259, 12, 21412, 198, 198, 37811, 8774, 8265, 37227, 198, 198, 11748, 25064, 198, 6738, 277, 1443, 62, 43282,...
2.616915
201
# Lucio 2020 # Feather M4 + Propmaker + amps + lots of neopixels import board import busio from digitalio import DigitalInOut, Direction, Pull import audioio import audiomixer import audiomp3 import adafruit_lis3dh import neopixel from adafruit_led_animation.animation.solid import Solid from adafruit_led_animation.anim...
[ 2, 7598, 952, 12131, 198, 2, 34501, 337, 19, 1343, 1041, 4426, 3110, 1343, 45796, 1343, 6041, 286, 497, 404, 14810, 198, 11748, 3096, 198, 11748, 1323, 952, 198, 6738, 4875, 952, 1330, 10231, 818, 7975, 11, 41837, 11, 21429, 198, 1174...
2.258435
2,786
import numpy as np import os from time import sleep from sense_hat import SenseHat ### Set up config variables ## User adjustable # Random Seed try : SEED = int(os.getenv('SEED')) except (TypeError, ValueError) as e: SEED = None ## Preset # Field size SIZE = (8, 8) # The Size of the SenseHAT LED matrix PIXEL...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 6738, 640, 1330, 3993, 198, 198, 6738, 2565, 62, 5183, 1330, 24956, 40483, 198, 198, 21017, 5345, 510, 4566, 9633, 198, 2235, 11787, 28138, 198, 2, 14534, 23262, 198, 28311, 1058, 1...
2.220698
802
import os import requests
[ 11748, 28686, 198, 11748, 7007, 198 ]
4.333333
6
#! /usr/bin/env python __author__ = 'zieghailo' from time import sleep import plotter from sphereofinfluence import distance if __name__ == "__main__": input_graph()
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 834, 9800, 834, 796, 705, 49746, 456, 603, 78, 6, 198, 198, 6738, 640, 1330, 3993, 198, 11748, 7110, 353, 198, 198, 6738, 16558, 1659, 10745, 23079, 1330, 5253, 628, 198, 198,...
2.868852
61
"""Convenience interface for using CodePy with Boost.Python.""" from __future__ import absolute_import
[ 37811, 3103, 574, 1240, 7071, 329, 1262, 6127, 20519, 351, 19835, 13, 37906, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 628 ]
4.038462
26
import time import random import numpy as np from collections import deque import tensorflow.compat.v1 as tf tf.disable_v2_behavior() tf.compat.v1.disable_eager_execution() from matplotlib import pyplot as plt class DQNAgent: """ DQN agent """ def build_model(self): """ Model builder function """ ...
[ 11748, 640, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 390, 4188, 198, 11748, 11192, 273, 11125, 13, 5589, 265, 13, 85, 16, 355, 48700, 198, 27110, 13, 40223, 62, 85, 17, 62, 46571, 3419, 198, 27110,...
2.14395
2,744
import subsystems import oi import wpilib from wpilib.command import Command from wpilib.drive.differentialdrive import DifferentialDrive from wpilib.sendablechooser import SendableChooser from wpilib.smartdashboard import SmartDashboard from commands.drive.measure import Measure # Dashboard control to select drive ...
[ 11748, 39335, 82, 198, 11748, 267, 72, 198, 198, 11748, 266, 79, 22282, 198, 6738, 266, 79, 22282, 13, 21812, 1330, 9455, 198, 6738, 266, 79, 22282, 13, 19472, 13, 39799, 498, 19472, 1330, 20615, 498, 24825, 198, 6738, 266, 79, 22282,...
3.02518
278
#!/usr/bin/env python3 from utils import ensure from result import Ok, Err, Result import urllib import httplib2 from normalise_uri import normalise_uri
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 3384, 4487, 220, 220, 220, 1330, 4155, 198, 6738, 1255, 220, 220, 1330, 6762, 11, 41512, 11, 25414, 198, 11748, 2956, 297, 571, 198, 11748, 1841, 489, 571, 17, 198, 19...
2.693333
75
from output.models.nist_data.list_pkg.nmtoken.schema_instance.nistschema_sv_iv_list_nmtoken_pattern_2_xsd.nistschema_sv_iv_list_nmtoken_pattern_2 import NistschemaSvIvListNmtokenPattern2 __all__ = [ "NistschemaSvIvListNmtokenPattern2", ]
[ 6738, 5072, 13, 27530, 13, 77, 396, 62, 7890, 13, 4868, 62, 35339, 13, 77, 16762, 4233, 13, 15952, 2611, 62, 39098, 13, 77, 1023, 2395, 2611, 62, 21370, 62, 452, 62, 4868, 62, 77, 16762, 4233, 62, 33279, 62, 17, 62, 87, 21282, 1...
2.292453
106
# Copyright 2009-2017 Ram Rachum. # This program is distributed under the MIT license. import pickle import itertools import math from combi._python_toolbox.third_party import functools from combi._python_toolbox import cute_testing from combi._python_toolbox import math_tools from combi._python_toolbox import cute_...
[ 2, 15069, 3717, 12, 5539, 7431, 371, 620, 388, 13, 198, 2, 770, 1430, 318, 9387, 739, 262, 17168, 5964, 13, 198, 198, 11748, 2298, 293, 198, 11748, 340, 861, 10141, 198, 11748, 10688, 198, 198, 6738, 1974, 72, 13557, 29412, 62, 2598...
2.752174
230
# -*- coding: utf-8 -*- import json import yaml import os import threading import pytest from mock import patch, sentinel, Mock from freezegun import freeze_time from botocore.exceptions import ClientError from sceptre.template import Template from sceptre.connection_manager import ConnectionManager from sceptre.ex...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 33918, 198, 11748, 331, 43695, 198, 11748, 28686, 198, 11748, 4704, 278, 198, 198, 11748, 12972, 9288, 198, 6738, 15290, 1330, 8529, 11, 1908, 20538, 11, 44123...
3.763158
114
import pytest import requests_mock from openff.bespokefit.cli.executor.list import list_cli from openff.bespokefit.executor.services import settings from openff.bespokefit.executor.services.coordinator.models import ( CoordinatorGETPageResponse, ) from openff.bespokefit.executor.services.models import Link @pyte...
[ 11748, 12972, 9288, 198, 11748, 7007, 62, 76, 735, 198, 198, 6738, 1280, 487, 13, 65, 9774, 2088, 11147, 13, 44506, 13, 18558, 38409, 13, 4868, 1330, 1351, 62, 44506, 198, 6738, 1280, 487, 13, 65, 9774, 2088, 11147, 13, 18558, 38409, ...
3.134228
149
class Solution: ''' 给定一个包括 n 个整数的数组 nums 和 一个目标值 target。 找出 nums 中的三个整数,使得它们的和与 target 最接近。返回这三个数的和。假定每组输入只存在唯一答案。 例如,给定数组 nums = [-1,2,1,-4], 和 target = 1. 与 target 最接近的三个数的和为 2. (-1 + 2 + 1 = 2) ''' def threeSumClosest(self, nums, target: int) -> int: ''' 先排序以便应用双指针 ...
[ 4871, 28186, 25, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 13328, 119, 247, 22522, 248, 31660, 10310, 103, 44293, 227, 162, 233, 105, 299, 220, 10310, 103, 46763, 112, 46763, 108, 21410, 46763, 108, 163, 119, 226, 997, 82, ...
1.256701
970
import pdb import pytest from pdbr._pdbr import rich_pdb_klass @pytest.fixture
[ 11748, 279, 9945, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 279, 67, 1671, 13557, 30094, 1671, 1330, 5527, 62, 79, 9945, 62, 74, 31172, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 628, 628 ]
2.444444
36
from django.core.checks import Tags, Warning, register # pylint: disable=redefined-builtin from axes.conf import settings @register(Tags.security, Tags.caches, Tags.compatibility) @register(Tags.security, Tags.compatibility) @register(Tags.security, Tags.compatibility) @register(Tags.compatibility)
[ 6738, 42625, 14208, 13, 7295, 13, 42116, 1330, 44789, 11, 15932, 11, 7881, 220, 1303, 279, 2645, 600, 25, 15560, 28, 445, 18156, 12, 18780, 259, 198, 198, 6738, 34197, 13, 10414, 1330, 6460, 628, 628, 198, 198, 31, 30238, 7, 36142, ...
3.329787
94
""" Run spike sorting on concatenated recordings ============================================ In several experiments, several recordings are performed in sequence, for example a baseline/intervention. In these cases, since the underlying spiking activity can be assumed to be the same (or at least very similar), the re...
[ 37811, 198, 10987, 20240, 29407, 319, 1673, 36686, 515, 18813, 198, 10052, 25609, 198, 198, 818, 1811, 10256, 11, 1811, 18813, 389, 6157, 287, 8379, 11, 329, 1672, 257, 14805, 14, 3849, 4018, 13, 198, 818, 777, 2663, 11, 1201, 262, 10...
4.024204
785
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: test_platform/result_flow/ctp.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf impor...
[ 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 1332, 62, 24254, 14, 20274, 62, 11125, 14, 310, 79, 13, 1676, 1462, 198, 198, 11748, 25064, 198, 62, 65, 28, 17597, 13, 9641, 62, 10951, ...
2.532181
2,082
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 4818, 8079, 198, 6738, 5366, 13, 9945, 1330, 20613, 198, 6738, 5366, 13, 85, 17, 1330, 10011, 2611, 44, 4254, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198 ]
2.954545
44
# ****************************************************************************** # Name: Calculate Vij matrices and Adinkra Gadget values # Author: Vadim Korotkikh # Email: va.korotki@gmail.com # Date: November 2016 # Version: 1.3 # # Description: Scripts for calculating Vij matrices for each one of 36864 # un...
[ 2, 41906, 17174, 46068, 1174, 198, 2, 6530, 25, 220, 220, 220, 27131, 378, 49219, 2603, 45977, 290, 1215, 676, 430, 39266, 3815, 198, 2, 6434, 25, 220, 569, 324, 320, 14769, 313, 74, 13848, 198, 2, 9570, 25, 220, 220, 46935, 13, 7...
2.059308
4,131
# -*- coding: utf-8 -*- """ 257. Binary Tree Paths Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. """ # Definition for a binary tree node.
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 28676, 13, 45755, 12200, 10644, 82, 198, 198, 15056, 257, 13934, 5509, 11, 1441, 477, 6808, 12, 1462, 12, 33201, 13532, 13, 198, 198, 6425, 25, 317, 12835, ...
2.96875
64
from flask import Blueprint passportBlp = Blueprint("passportBlp", __name__, url_prefix="/passport") from .views import *
[ 6738, 42903, 1330, 39932, 198, 198, 6603, 634, 3629, 79, 796, 39932, 7203, 6603, 634, 3629, 79, 1600, 11593, 3672, 834, 11, 19016, 62, 40290, 35922, 6603, 634, 4943, 198, 198, 6738, 764, 33571, 1330, 1635, 198 ]
3.351351
37
# Generated by Django 3.2.9 on 2022-01-22 20:18 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 24, 319, 33160, 12, 486, 12, 1828, 1160, 25, 1507, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
""" 文件名: conf/__init__.py 配置文件 """ from .conf import conf_args from .font.noto import noto_font, noto_bold_font, noto_medium_font, noto_thin_font, noto_black_font, noto_regular_font from .picture import head_pic, rank_bg_pic, logo_pic, logo_ico from .args import p_args from .equipment import ConfigCapture from .sql im...
[ 37811, 198, 23877, 229, 20015, 114, 28938, 235, 25, 1013, 14, 834, 15003, 834, 13, 9078, 198, 165, 227, 235, 163, 121, 106, 23877, 229, 20015, 114, 198, 37811, 198, 198, 6738, 764, 10414, 1330, 1013, 62, 22046, 198, 6738, 764, 10331, ...
2.84
175
# Generated from PromQLLexer.g4 by ANTLR 4.9.3 from antlr4 import * from io import StringIO import sys if sys.version_info[1] > 5: from typing import TextIO else: from typing.io import TextIO
[ 2, 2980, 515, 422, 10335, 48, 3069, 1069, 263, 13, 70, 19, 416, 3537, 14990, 49, 604, 13, 24, 13, 18, 198, 6738, 1885, 14050, 19, 1330, 1635, 198, 6738, 33245, 1330, 10903, 9399, 198, 11748, 25064, 198, 361, 25064, 13, 9641, 62, 1...
2.697368
76
import unittest import numpy as np from numpy.testing import assert_allclose import copy import sys sys.path.append('..') from angler import Simulation, Optimization from angler.structures import three_port import autograd.numpy as npa if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 439, 19836, 198, 11748, 4866, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 492, 11537, 198, 6738, 3550, 1754, 1330...
3.142857
91
# Copyright © 2021 Province of British Columbia # # 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 agr...
[ 2, 15069, 10673, 33448, 22783, 286, 3517, 9309, 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, ...
3.364269
431
import asyncio import json import logging import random from copy import copy from dataclasses import Field from aiogram import Bot, Dispatcher from aiogram.types import ParseMode from aiothornode.types import ThorPool from localization import BaseLocalization from services.jobs.fetch.net_stats import NetworkStatisti...
[ 11748, 30351, 952, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 4738, 198, 6738, 4866, 1330, 4866, 198, 6738, 4818, 330, 28958, 1330, 7663, 198, 198, 6738, 257, 72, 21857, 1330, 18579, 11, 3167, 8071, 2044, 198, 6738, 257, 72, 2185...
3.15674
319
#!/usr/bin/env python3 from caproto import ChannelType from caproto.server import PVGroup, get_pv_pair_wrapper, ioc_arg_parser, run # Create _two_ PVs with a single pvproperty_with_rbv: pvproperty_with_rbv = get_pv_pair_wrapper(setpoint_suffix='', readback_suffix='_RBV') # NOT...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 1451, 305, 1462, 1330, 11102, 6030, 198, 6738, 1451, 305, 1462, 13, 15388, 1330, 31392, 13247, 11, 651, 62, 79, 85, 62, 24874, 62, 48553, 11, 1312, 420, 62, 853, 62, 48610,...
2.288321
274
# Copyright (c) 2019 Microsoft Corporation # Distributed under the MIT software license # Cross-platform build script for JS bundles required by Python layer. import subprocess import os import sys from shutil import copyfile if __name__ == '__main__': in_devops = False if len(sys.argv) == 2 and sys.argv[1] ...
[ 2, 15069, 357, 66, 8, 13130, 5413, 10501, 198, 2, 4307, 6169, 739, 262, 17168, 3788, 5964, 198, 2, 6372, 12, 24254, 1382, 4226, 329, 26755, 36344, 2672, 416, 11361, 7679, 13, 198, 198, 11748, 850, 14681, 198, 11748, 28686, 198, 11748,...
2.505859
512
# Generated by Django 2.1.4 on 2019-01-25 07:17 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 19, 319, 13130, 12, 486, 12, 1495, 8753, 25, 1558, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
import numpy as np import random import os import json import PIL.Image as Image import time import copy import sys if __name__ == '__main__': all_size = ["13x16", "26x32", "52x64", "104x128", "208x256"] for size in all_size: x = time.time() loaded_training_labels = np.load("../DatasetBinarySto...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 350, 4146, 13, 5159, 355, 7412, 198, 11748, 640, 198, 11748, 4866, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12...
2.524876
402
from numpy import nan from pandas import DataFrame, Timestamp from pandas.testing import assert_frame_equal from pymove import MoveDataFrame, stay_point_detection from pymove.utils.constants import DATETIME, LATITUDE, LONGITUDE, TRAJ_ID list_data = [ [39.984094, 116.319236, '2008-10-23 05:53:05', 1], [39.9841...
[ 6738, 299, 32152, 1330, 15709, 198, 6738, 19798, 292, 1330, 6060, 19778, 11, 5045, 27823, 198, 6738, 19798, 292, 13, 33407, 1330, 6818, 62, 14535, 62, 40496, 198, 198, 6738, 279, 4948, 659, 1330, 10028, 6601, 19778, 11, 2652, 62, 4122, ...
2.097297
370
import logging import math import sys import time from collections import namedtuple from io import BytesIO from flask import Blueprint, Flask, current_app, make_response, render_template, request, abort from flask_caching import Cache from flask_cors import CORS from zaloa import ( generate_coordinates_512, ge...
[ 11748, 18931, 198, 11748, 10688, 198, 11748, 25064, 198, 11748, 640, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 6738, 42903, 1330, 39932, 11, 46947, 11, 1459, 62, 1324, 11, 787, 62, 26209, 11...
2.547855
303
import re import pathlib import unittest from net_parser.config import BaseConfigParser, ConfigDiff, IosConfigDiff, IosConfigParser from tests import RESOURCES_DIR VERBOSITY = 4 if __name__ == '__main__': unittest.main()
[ 11748, 302, 198, 11748, 3108, 8019, 198, 11748, 555, 715, 395, 198, 198, 6738, 2010, 62, 48610, 13, 11250, 1330, 7308, 16934, 46677, 11, 17056, 28813, 11, 314, 418, 16934, 28813, 11, 314, 418, 16934, 46677, 198, 198, 6738, 5254, 1330, ...
2.974026
77
import glob import pandas as pd import argparse from gensim.models import Word2Vec import gensim.downloader as api from scipy.stats import pearsonr parser = argparse.ArgumentParser() parser.add_argument( '-w', '--w2v', action='store', default=None, dest='model_path', help='File with the word2...
[ 11748, 15095, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 1822, 29572, 198, 198, 6738, 308, 641, 320, 13, 27530, 1330, 9678, 17, 53, 721, 198, 11748, 308, 641, 320, 13, 15002, 263, 355, 40391, 198, 6738, 629, 541, 88, 13, 3424...
2.540094
848
#!/usr/bin/env python # -*- coding: utf-8 -*- # pylint: disable=wrong-import-position, redefined-outer-name """ Convolve a TDI table that tabulates "regular" photons with a Cherenkov cone to arrive at a Cherenkov TDI table. """ from __future__ import absolute_import, division, print_function __all__ = [ 'generat...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 279, 2645, 600, 25, 15560, 28, 36460, 12, 11748, 12, 9150, 11, 2266, 18156, 12, 39605, 12, 3672, 198, 198, 37811, ...
2.362545
3,081
#!/usr/bin/env python """Functions for server logging.""" import logging from logging import handlers import os import socket import time from grr import config from grr.lib import flags try: # pylint: disable=g-import-not-at-top from grr.server.grr_response_server.local import log as local_log # pylint: enabl...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 24629, 2733, 329, 4382, 18931, 526, 15931, 198, 198, 11748, 18931, 198, 6738, 18931, 1330, 32847, 198, 11748, 28686, 198, 11748, 17802, 198, 11748, 640, 198, 198, 6738, 1036, 81, ...
2.787863
1,862
# coding: utf-8 # In[54]: # In[56]: from __future__ import print_function import mxnet as mx from mxnet import nd, gluon, autograd from mxnet.gluon import nn # In[57]: import sys from zipfile import ZipFile import numpy as np from matplotlib import pyplot as plt '''load your data here''' from sklearn.model_sele...
[ 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 4051, 5974, 198, 2, 554, 58, 3980, 5974, 628, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 220, 220, 198, 11748, 285, 87, 3262, 355, 285, 87, 198, 6738, 285, 87, ...
2.193201
1,765
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
[ 2, 19617, 28, 40477, 23, 198, 198, 2, 15069, 2864, 28591, 5097, 2606, 35, 13, 9858, 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, ...
3.611684
291
# 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, software # d...
[ 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 220, 220, ...
3.247525
202
import torch import pydiffvg
[ 11748, 28034, 198, 11748, 279, 5173, 733, 45119, 198 ]
3.222222
9
import json import os from typing import Optional, Tuple from pych_client.constants import ( BASE_URL_ENV, CREDENTIALS_FILE, DATABASE_ENV, DEFAULT_BASE_URL, DEFAULT_DATABASE, DEFAULT_PASSWORD, DEFAULT_USERNAME, PASSWORD_ENV, USERNAME_ENV, ) from pych_client.logger import logger from...
[ 11748, 33918, 198, 11748, 28686, 198, 6738, 19720, 1330, 32233, 11, 309, 29291, 198, 198, 6738, 12972, 354, 62, 16366, 13, 9979, 1187, 1330, 357, 198, 220, 220, 220, 49688, 62, 21886, 62, 1677, 53, 11, 198, 220, 220, 220, 8740, 1961, ...
2.439759
166
"""Telesat constellation""" from . import satellite as stk_sat from . import graphics def addConstellation(sc): """Add Telesat constellation to the scenario.""" Re = 6371 # earth radius in km alt_pol = 1000 sma_pol = alt_pol + Re inc_pol = 99.5 numPlanes_pol = 3 numSatsPerPlane_pol = 12 ...
[ 37811, 33317, 274, 265, 38712, 37811, 198, 198, 6738, 764, 1330, 11210, 355, 336, 74, 62, 49720, 198, 6738, 764, 1330, 9382, 198, 198, 4299, 751, 34184, 28828, 7, 1416, 2599, 198, 220, 220, 220, 37227, 4550, 12088, 274, 265, 38712, 28...
2.033634
1,219
from flask import Flask from flask_mail import Mail, Message app =Flask(__name__) app.config['MAIL_SERVER']='smtp.gmail.com' app.config['MAIL_PORT'] = 587 app.config['MAIL_USERNAME'] = 'python2flask@gmail.com' app.config['MAIL_PASSWORD'] = 'flask2python' app.config['MAIL_USE_TLS'] = True app.config['MAIL_USE_SSL'] = ...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 4529, 1330, 11099, 11, 16000, 198, 198, 1324, 796, 7414, 2093, 7, 834, 3672, 834, 8, 198, 198, 1324, 13, 11250, 17816, 5673, 4146, 62, 35009, 5959, 20520, 11639, 5796, 34788, 13, 14816, ...
2.45679
162
import os ROOT = 0 DIR = 1 FILE = 2
[ 11748, 28686, 198, 198, 13252, 2394, 796, 657, 198, 34720, 796, 352, 198, 25664, 796, 362, 628, 198 ]
2.166667
18
# -*- coding: utf-8 -*- import unittest import datetime from pyboleto.bank.caixa import BoletoCaixa from .testutils import BoletoTestCase suite = unittest.TestLoader().loadTestsFromTestCase(TestBancoCaixa) if __name__ == '__main__': unittest.main()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 11748, 555, 715, 395, 201, 198, 11748, 4818, 8079, 201, 198, 201, 198, 6738, 12972, 45693, 1462, 13, 17796, 13, 6888, 844, 64, 1330, 347, 2305, 1462, 24334, 844, ...
2.313559
118
import random import re from . import word_utl # получить случайное предложение из массива схем # получить массив схем из предложения
[ 11748, 4738, 201, 198, 11748, 302, 201, 198, 201, 198, 6738, 764, 1330, 1573, 62, 315, 75, 201, 198, 201, 198, 201, 198, 2, 12466, 123, 25443, 119, 35072, 141, 229, 18849, 20375, 45367, 220, 21727, 30143, 35072, 141, 229, 16142, 140, ...
1.201613
124
# SPDX-License-Identifier: BSD-3-Clause # # Copyright (c) 2021 Vít Labuda. All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the # following conditions are met: # 1. Redistributions of source code must retain the above copyright notice...
[ 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, 18, 12, 2601, 682, 198, 2, 198, 2, 15069, 357, 66, 8, 33448, 569, 8836, 83, 3498, 15339, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, ...
3.674952
523
import numpy as np import pytest from analysis_lib.dlc_results_adapter import DlcResults, get_labels from analysis_lib.behaviour.analyze_behaviour import get_region_stats, basic_behavioural_assay_algorithm from analysis_lib.behaviour.arena_setup_adapter import ArenaSetup, Point, RectangleGeometry, Region
[ 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 198, 6738, 3781, 62, 8019, 13, 25404, 66, 62, 43420, 62, 324, 3429, 1330, 360, 44601, 25468, 11, 651, 62, 23912, 1424, 198, 6738, 3781, 62, 8019, 13, 20709, 37716, 13, 38200...
3.244898
98
# -*- coding: utf-8 -*- # from enum import IntEnum from typing import T class Singleton: """ 使用单例模式 """ @staticmethod @staticmethod @staticmethod class Recursion: """ 递归 """ @staticmethod def find_key_for_dict(obj_data: dict, target: str): """ 在字典里重复递...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 1303, 198, 6738, 33829, 1330, 2558, 4834, 388, 198, 6738, 19720, 1330, 309, 628, 198, 198, 4871, 5573, 10565, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 45635, ...
1.630146
1,579
from django.contrib import admin from .models import AddTask admin.site.register(AddTask)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 3060, 25714, 628, 198, 28482, 13, 15654, 13, 30238, 7, 4550, 25714, 8, 198 ]
3.407407
27
import torch import torch.nn as nn from torch.autograd import Variable # CNN Model (2 conv layer)
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 628, 198, 2, 8100, 9104, 357, 17, 3063, 7679, 8, 198 ]
3.333333
30
from __future__ import unicode_literals import os import re from django.utils import six from django.utils.six.moves import range from reviewboard.diffviewer.processors import (filter_interdiff_opcodes, post_process_filtered_equals) class MoveRange(object): """Sto...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 28686, 198, 11748, 302, 198, 198, 6738, 42625, 14208, 13, 26791, 1330, 2237, 198, 6738, 42625, 14208, 13, 26791, 13, 19412, 13, 76, 5241, 1330, 2837, 198, 198,...
2.848571
350
from loguru import logger from flexget import plugin from flexget.config_schema import one_or_more from flexget.entry import Entry from flexget.event import event from flexget.utils.cached_input import cached from flexget.utils.requests import RequestException logger = logger.bind(name='my_anime_list') STATUS = {'wa...
[ 6738, 2604, 14717, 1330, 49706, 198, 198, 6738, 7059, 1136, 1330, 13877, 198, 6738, 7059, 1136, 13, 11250, 62, 15952, 2611, 1330, 530, 62, 273, 62, 3549, 198, 6738, 7059, 1136, 13, 13000, 1330, 21617, 198, 6738, 7059, 1136, 13, 15596, ...
2.189889
811
import abc import enum import logging import time from pynput.mouse import Controller, Button logger = logging.getLogger(__name__) @enum.unique
[ 11748, 450, 66, 198, 11748, 33829, 198, 11748, 18931, 198, 11748, 640, 198, 198, 6738, 279, 2047, 1996, 13, 35888, 1330, 22741, 11, 20969, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 31, ...
3.166667
48
from sklearn.preprocessing import LabelEncoder from sklearn.preprocessing import OneHotEncoder import numpy as np from numpy import argmax import logging import os import pickle import copy from dsrt.config.defaults import DataConfig
[ 6738, 1341, 35720, 13, 3866, 36948, 1330, 36052, 27195, 12342, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 1881, 21352, 27195, 12342, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 1330, 1822, 9806, 198, 198, 11748, 18...
3.646154
65
import json import re import sys import textwrap from collections import defaultdict, OrderedDict from six.moves.collections_abc import Iterable from copy import deepcopy from itertools import product ################ # Constants. ################ PATTERNS = dict( simple = dict( long_opt = r'--(\w[\w\-]...
[ 11748, 33918, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 2420, 37150, 198, 6738, 17268, 1330, 4277, 11600, 11, 14230, 1068, 35, 713, 198, 6738, 2237, 13, 76, 5241, 13, 4033, 26448, 62, 39305, 1330, 40806, 540, 198, 6738, 4866, 1330...
2.336921
2,137
import pymongo
[ 11748, 279, 4948, 25162, 628, 628, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220 ]
1.6
20
import os import time from datetime import datetime import pandas as pd import numpy as np # Monte Carlo Trial Random Seeds random_states = list(range(1, 2019, 20)) # 10 seeds num_estimators_range = [15, 20, 25, 30, 35, 45, 50] #num_estimators_range = [50, 100, 500, 1000] # Discrete Wavelet Transform Types Disc...
[ 198, 198, 11748, 28686, 198, 11748, 640, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 628, 628, 198, 2, 22489, 40089, 21960, 14534, 41833, 198, 25120, 62, 27219, 796,...
2.15994
1,338
import os import sys from six import StringIO from dagster.utils.indenting_printer import IndentingPrinter class IndentingBufferPrinter(IndentingPrinter): '''Subclass of IndentingPrinter wrapping a StringIO.''' def read(self): '''Get the value of the backing StringIO.''' return self.buffer....
[ 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 2237, 1330, 10903, 9399, 198, 198, 6738, 48924, 1706, 13, 26791, 13, 521, 36589, 62, 1050, 3849, 1330, 1423, 36589, 6836, 3849, 628, 198, 4871, 1423, 36589, 28632, 6836, 3849, 7, 5497, 36...
3.036697
109
from pycorda import Node from datetime import datetime import matplotlib from matplotlib import pyplot import pandas as pd import chart_studio, chart_studio.plotly as py, plotly.graph_objs as go from sklearn import linear_model as lm # Format for timestamp string is YYYY-MM-DD HH:MM:SS.FFF def plot_time_series(timest...
[ 6738, 12972, 66, 585, 64, 1330, 19081, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 2603, 29487, 8019, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 8262, 62, 19149, 952, 11,...
2.528346
1,270
import os import argparse from omegaconf import OmegaConf from argparse import ArgumentParser CONFIG_PATH = 'train/configs/gpt_config.yaml' if __name__ == "__main__": __arg_parser = configure_arg_parser() __args = __arg_parser.parse_args() config = OmegaConf.load(__args.config) pr...
[ 11748, 28686, 201, 198, 11748, 1822, 29572, 201, 198, 6738, 267, 28917, 7807, 69, 1330, 19839, 18546, 201, 198, 6738, 1822, 29572, 1330, 45751, 46677, 201, 198, 201, 198, 10943, 16254, 62, 34219, 796, 705, 27432, 14, 11250, 82, 14, 70, ...
2.60119
168
import contextlib import os from typing import ContextManager, Optional, Sequence import stable_baselines3.common.logger as sb_logger from imitation.data import types def _build_output_formats( folder: types.AnyPath, format_strs: Sequence[str] = None, ) -> Sequence[sb_logger.KVWriter]: """Build output f...
[ 11748, 4732, 8019, 198, 11748, 28686, 198, 6738, 19720, 1330, 30532, 13511, 11, 32233, 11, 45835, 198, 198, 11748, 8245, 62, 12093, 20655, 18, 13, 11321, 13, 6404, 1362, 355, 264, 65, 62, 6404, 1362, 198, 198, 6738, 40260, 13, 7890, 1...
2.848485
1,221
import numpy as np
[ 11748, 299, 32152, 355, 45941, 198 ]
3.166667
6
#socket server import socket import datetime import os import sys mi_socket = socket.socket() mi_socket.bind( ('localhost', 8000) ) mi_socket.listen(5) mi_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) server_connect()
[ 2, 44971, 4382, 220, 198, 198, 11748, 17802, 198, 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 11632, 62, 44971, 796, 17802, 13, 44971, 3419, 198, 11632, 62, 44971, 13, 21653, 7, 19203, 36750, 3256, 38055, 8, 1267,...
2.50495
101
#-*- coding: UTF-8 -*- """ http://www.apple.com/DTDs/PropertyList-1.0.dtd plistObject : (array | data | date | dict | real | integer | string | true | false ) Collections: array: dict: key plistObject Primitive types string data: Base-64 encoded date: ISO 8601, YYYY '-' MM '-' DD 'T' HH ':' MM ':' SS 'Z' Numeri...
[ 2, 12, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 37811, 198, 4023, 1378, 2503, 13, 18040, 13, 785, 14, 35, 21016, 82, 14, 21746, 8053, 12, 16, 13, 15, 13, 67, 8671, 198, 489, 396, 10267, 1058, 198, 7, 18747, 930, 1366,...
2.714976
207
import os import pytest from ..tools import process EXAMPLES_DIR = "./examples" @pytest.mark.parametrize( "directory, command", [ ("grouped_pmdarima", ["python", "grouped_pmdarima_arima_example.py"]), ("grouped_pmdarima", ["python", "grouped_pmdarima_autoarima_example.py"]), ("grouped...
[ 11748, 28686, 198, 11748, 12972, 9288, 198, 6738, 11485, 31391, 1330, 1429, 198, 198, 6369, 2390, 6489, 1546, 62, 34720, 796, 366, 19571, 1069, 12629, 1, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7, 198, 220, 220,...
2.165865
416