content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
#!/usr/bin/python3 import sys #import fileinput from operator import itemgetter myDictionary = {} myList=[] for line in sys.stdin: line = line.strip() line = line.split("\t") batsman, bowler, wickets = line[0], line[1], int(line[2]) if batsman not in myDictionary: myDictionary[batsman] = {} ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 25064, 198, 198, 2, 11748, 2393, 15414, 198, 6738, 10088, 1330, 2378, 1136, 353, 198, 198, 1820, 35, 14188, 796, 23884, 198, 1820, 8053, 28, 21737, 198, 198, 1640, 1627, 287, 25064...
2.45799
607
from abstractions.datastore import Datastore from unittest.mock import Mock from google.cloud.datastore.entity import Entity from unittest.mock import patch import pytest """ #test_valid_information::ut #test_with_invalid_information::ut """
[ 6738, 12531, 507, 13, 19608, 459, 382, 1330, 16092, 459, 382, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 198, 6738, 23645, 13, 17721, 13, 19608, 459, 382, 13, 26858, 1330, 20885, 198, 6738, 555, 715, 395, 13, 76, 735, 1330,...
3.217949
78
import logging import logging.config import os from importlib.metadata import version from typing import Any, Union from .trace import ( make_request_logging_trace_config, make_sentry_trace_config, make_zipkin_trace_config, new_sampled_trace, new_trace, new_trace_cm, notrace, setup_sent...
[ 11748, 18931, 198, 11748, 18931, 13, 11250, 198, 11748, 28686, 198, 6738, 1330, 8019, 13, 38993, 1330, 2196, 198, 6738, 19720, 1330, 4377, 11, 4479, 198, 198, 6738, 764, 40546, 1330, 357, 198, 220, 220, 220, 787, 62, 25927, 62, 6404, ...
2.149383
810
# Copyright 2017 QuantRocket - 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 law or ...
[ 2, 15069, 2177, 16972, 50218, 532, 1439, 6923, 33876, 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,...
3.427184
309
from random import shuffle from math import sqrt from enum import Enum from src.Sudoku.SudokuSolver import SudokuSolver from src.Sudoku.Sudoku import Sudoku """ **** SUDOKU GENERATOR **** Author: Andrea Pollastro Date: September 2018 """
[ 6738, 4738, 1330, 36273, 198, 6738, 10688, 1330, 19862, 17034, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 12351, 13, 50, 463, 11601, 13, 50, 463, 11601, 50, 14375, 1330, 14818, 11601, 50, 14375, 198, 6738, 12351, 13, 50, 463, 11601, ...
3
82
import argparse import random, os from os.path import join as j from collections import OrderedDict import conllu import torch import pathlib import tempfile import depedit import stanza.models.parser as parser from stanza.models.depparse.data import DataLoader from stanza.models.depparse.trainer import Trainer from s...
[ 11748, 1822, 29572, 198, 11748, 4738, 11, 28686, 198, 6738, 28686, 13, 6978, 1330, 4654, 355, 474, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 369, 297, 84, 198, 11748, 28034, 198, 11748, 3108, 8019, 198, 11748, 20218, 775...
2.592507
2,162
if __name__ == '__main__': ans = makeSentence(12, '', 22.4) print(ans)
[ 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 9093, 796, 787, 31837, 594, 7, 1065, 11, 705, 3256, 2534, 13, 19, 8, 198, 220, 220, 220, 3601, 7, 504, 8, 198 ]
2.105263
38
__version__ = '0.1.0' from .parser import parse
[ 834, 9641, 834, 796, 705, 15, 13, 16, 13, 15, 6, 198, 198, 6738, 764, 48610, 1330, 21136, 198 ]
2.578947
19
from os.path import expanduser import sys import json ''' The configuration file will be stored as a json file @example { window: { w_dimension: 800 h_dimension: 600 resizeable: False } } '''
[ 6738, 28686, 13, 6978, 1330, 4292, 7220, 198, 11748, 25064, 198, 11748, 33918, 220, 198, 198, 7061, 6, 198, 197, 464, 8398, 2393, 481, 307, 8574, 355, 257, 33918, 2393, 628, 197, 31, 20688, 198, 197, 90, 198, 197, 197, 17497, 25, 13...
2.471264
87
#!/bin/python3 import sys import os import getopt import csv import json import itertools import zipfile import tarfile import binwalk import collections from heapq import nsmallest from collections import defaultdict import tlsh import numpy as np import matplotlib.pyplot as plt from multiprocessing.dummy import Poo...
[ 2, 48443, 8800, 14, 29412, 18, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 651, 8738, 198, 11748, 269, 21370, 198, 11748, 33918, 198, 11748, 340, 861, 10141, 198, 11748, 19974, 7753, 198, 11748, 13422, 7753, 198, 11748, 9874, 11152,...
2.385496
1,834
from pyomo.environ import * import numpy as np cijr = [] fjr = [] with open("./Test_Instances/RAND2000_120-80.txt") as instanceFile: n = int(instanceFile.readline()) clientsFacilitiesSizeStr = instanceFile.readline().strip().split(" ") instanceFile.readline() for phase in range(2): for i in range(1, len(cl...
[ 6738, 12972, 17902, 13, 268, 2268, 1330, 1635, 198, 11748, 299, 32152, 355, 45941, 198, 198, 979, 73, 81, 796, 17635, 198, 69, 73, 81, 796, 17635, 198, 4480, 1280, 7, 1911, 14, 14402, 62, 6310, 1817, 14, 49, 6981, 11024, 62, 10232, ...
1.945342
1,610
# # exports a specific folder in the import directory to the google cloud # # Syntax: # python3 import.py <GS URI> # # Example: # python3 import.py gs://bini-products-bucket/training-sets-2/intrusion/poc1_v1.2.0/frames # # import os import sys # uri cloud_uri = sys.argv[1] os.system('mkdir -p import') os.system...
[ 2, 198, 2, 15319, 257, 2176, 9483, 287, 262, 1330, 8619, 284, 262, 23645, 6279, 198, 2, 198, 2, 26375, 897, 25, 198, 2, 21015, 18, 1330, 13, 9078, 1279, 14313, 43975, 29, 220, 198, 2, 220, 220, 198, 2, 17934, 25, 220, 198, 2, ...
2.446667
150
#!/usr/bin/env python import xml.etree.ElementTree as ET
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 628, 220, 220, 220, 220, 220, 220, 220, 220 ]
2.357143
28
import pytz from django.conf import settings
[ 11748, 12972, 22877, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 628 ]
3.833333
12
default_app_config = 'foundation.apps.FoundationConfig'
[ 12286, 62, 1324, 62, 11250, 796, 705, 42526, 13, 18211, 13, 21077, 341, 16934, 6, 198 ]
3.5
16
from flask import Flask from flask_migrate import Migrate from app.model import db from app.controller import api app = Flask(__name__) app.register_blueprint(api) app.config[ "SQLALCHEMY_DATABASE_URI" ] = "postgresql://newschatbotdevelopment:Wlk8skrHKvZEbM6Gw@database.internal.newschatbot.ceskodigital.net:5432/n...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 76, 42175, 1330, 337, 42175, 198, 198, 6738, 598, 13, 19849, 1330, 20613, 198, 6738, 598, 13, 36500, 1330, 40391, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 1324, 13, 30238, ...
2.625
184
from .test_vehicles_crud import * from .test_soat_vehicles import *
[ 6738, 764, 9288, 62, 33892, 2983, 62, 6098, 463, 1330, 1635, 198, 6738, 764, 9288, 62, 568, 265, 62, 33892, 2983, 1330, 1635 ]
2.913043
23
"""Example on how to read sleep data from SIHA """ import os from tasrif.data_readers.siha_dataset import SihaDataset from tasrif.processing_pipeline import SequenceOperator from tasrif.processing_pipeline.custom import JqOperator from tasrif.processing_pipeline.pandas import ( ConvertToDatetimeOperator, JsonN...
[ 37811, 16281, 319, 703, 284, 1100, 3993, 1366, 422, 25861, 7801, 198, 37811, 198, 11748, 28686, 198, 198, 6738, 256, 292, 81, 361, 13, 7890, 62, 961, 364, 13, 13396, 3099, 62, 19608, 292, 316, 1330, 15638, 3099, 27354, 292, 316, 198, ...
1.999307
1,444
import pytest from visionpy import Vision, Contract from visionpy import AsyncVision, AsyncContract from visionpy.keys import PrivateKey # vpioneer addr and key PRIVATE_KEY = PrivateKey(bytes.fromhex("a318cb4f1f3b87d604163e4a854312555d57158d78aef26797482d3038c4018b")) FROM_ADDR = 'VSfD1o6FPChqdqLgwJaztjckyyo2GSM1KP' ...
[ 11748, 12972, 9288, 198, 198, 6738, 5761, 9078, 1330, 19009, 11, 17453, 198, 6738, 5761, 9078, 1330, 1081, 13361, 44206, 11, 1081, 13361, 45845, 198, 6738, 5761, 9078, 13, 13083, 1330, 15348, 9218, 198, 198, 2, 410, 79, 7935, 263, 37817...
1.980916
262
from django.db.models import Avg from store.models import Book, UserBookRelation
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 33455, 198, 198, 6738, 3650, 13, 27530, 1330, 4897, 11, 11787, 10482, 6892, 341, 628 ]
3.608696
23
"""Default base class for PSP pages. This class is intended to be used in the future as the default base class for PSP pages in the event that some special processing is needed. Right now, no special processing is needed, so the default base class for PSP pages is the standard Webware Page. """ from Page import Page ...
[ 37811, 19463, 2779, 1398, 329, 48651, 5468, 13, 198, 198, 1212, 1398, 318, 5292, 284, 307, 973, 287, 262, 2003, 355, 262, 4277, 2779, 1398, 198, 1640, 48651, 5468, 287, 262, 1785, 326, 617, 2041, 7587, 318, 2622, 13, 198, 11028, 783, ...
4.337838
74
## # File: DictMethodEntityInstanceHelper.py # Author: J. Westbrook # Date: 16-Jul-2019 # Version: 0.001 Initial version # # # Updates: # 22-Nov-2021 dwp authSeqBeg and authSeqEnd are returned as integers but must be compared as strings in pAuthAsymD # ## """ This helper class implements methods supporting enti...
[ 2235, 198, 2, 9220, 25, 220, 220, 220, 360, 713, 17410, 32398, 33384, 47429, 13, 9078, 198, 2, 6434, 25, 220, 449, 13, 35345, 198, 2, 7536, 25, 220, 220, 220, 1467, 12, 16980, 12, 23344, 198, 2, 10628, 25, 657, 13, 8298, 20768, ...
3.082031
256
"""Long statement strings and other space consuming data definitions for testing are declared here. This is done to avoid clutter in main test files. """ from typing import Dict from typing import List from typing import Tuple import pytest from _pytest.fixtures import SubRequest from fi_parliament_tools.parsing.dat...
[ 37811, 14617, 2643, 13042, 290, 584, 2272, 18587, 1366, 17336, 329, 4856, 389, 6875, 994, 13, 198, 198, 1212, 318, 1760, 284, 3368, 45343, 287, 1388, 1332, 3696, 13, 198, 37811, 198, 6738, 19720, 1330, 360, 713, 198, 6738, 19720, 1330, ...
1.957179
5,488
import sys import math import itertools from collections import deque sys.setrecursionlimit(10000000) input=lambda : sys.stdin.readline().rstrip() a,b,x=map(int,input().split()) if (a**2*b)-x<=(a**2*b)/2: c=2*((a**2*b)-x)/(a**2) print(math.degrees(math.atan2(c,a))) else: c=2*x/b/a print(math.degrees(ma...
[ 11748, 25064, 198, 11748, 10688, 198, 11748, 340, 861, 10141, 198, 6738, 17268, 1330, 390, 4188, 198, 17597, 13, 2617, 8344, 24197, 32374, 7, 16, 24598, 8, 198, 15414, 28, 50033, 1058, 25064, 13, 19282, 259, 13, 961, 1370, 22446, 81, ...
2.126582
158
import struct import itertools import freetype ENDIAN = '<' # always little endian # If you make a modified version, please change the URL in the string to # let people know what generated the file! # example: Bakefont 3.0.2 (compatible; Acme Inc version 1.3) ENCODER = "Bakefont 3.0.2 (https://github.com/golightlyb/b...
[ 11748, 2878, 198, 11748, 340, 861, 10141, 198, 11748, 2030, 2963, 431, 198, 198, 10619, 16868, 796, 705, 27, 6, 1303, 1464, 1310, 886, 666, 198, 198, 2, 1002, 345, 787, 257, 9518, 2196, 11, 3387, 1487, 262, 10289, 287, 262, 4731, 28...
2.841379
435
"""Test health check"""
[ 37811, 14402, 1535, 2198, 37811, 628 ]
4.166667
6
""" This INTERNAL module is used to manage fbs's global state. Having it here, in one central place, allows fbs's test suite to manipulate the state to test various scenarios. """ from collections import OrderedDict SETTINGS = {} LOADED_PROFILES = [] COMMANDS = OrderedDict()
[ 37811, 198, 1212, 23255, 45, 1847, 8265, 318, 973, 284, 6687, 277, 1443, 338, 3298, 1181, 13, 11136, 340, 994, 11, 287, 198, 505, 4318, 1295, 11, 3578, 277, 1443, 338, 1332, 18389, 284, 18510, 262, 1181, 284, 1332, 198, 7785, 699, 1...
3.407407
81
# -*- coding: utf-8 -*- # # rtk.dao.RTKMatrix.py is part of The RTK Project # # All rights reserved. # Copyright 2007 - 2017 Andrew Rowland andrew.rowland <AT> reliaqual <DOT> com """ =============================================================================== The RTKMatrix Table ==============================...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 374, 30488, 13, 67, 5488, 13, 14181, 42, 46912, 13, 9078, 318, 636, 286, 383, 11923, 42, 4935, 198, 2, 198, 2, 1439, 2489,...
3.507772
193
import os import shutil pull_default() input('')
[ 11748, 28686, 198, 11748, 4423, 346, 198, 198, 31216, 62, 12286, 3419, 198, 15414, 7, 7061, 8, 198 ]
2.777778
18
from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^pyogp_webbot/', include('pyogp_webbot.foo.urls')), # Uncomment the admin/doc line below and add 'django.contrib...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12286, 82, 1330, 1635, 198, 198, 2, 791, 23893, 262, 1306, 734, 3951, 284, 7139, 262, 13169, 25, 198, 2, 422, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 2, 13169, 13, 2306, 375, ...
2.390029
341
''' code emitters ''' import out, enums as e
[ 7061, 6, 2438, 27588, 1010, 705, 7061, 198, 11748, 503, 11, 551, 5700, 355, 304, 628 ]
2.875
16
""" GravMag: Classic 3D Euler deconvolution of magnetic data using an expanding window """ from fatiando import logger, mesher, gridder, utils, gravmag from fatiando.vis import mpl, myv log = logger.get() log.info(logger.header()) # Make a model bounds = [-5000, 5000, -5000, 5000, 0, 5000] model = [ mesher.Prism(...
[ 37811, 198, 38, 4108, 13436, 25, 13449, 513, 35, 412, 18173, 37431, 85, 2122, 286, 14091, 1366, 1262, 281, 198, 11201, 27225, 4324, 198, 37811, 198, 6738, 3735, 72, 25440, 1330, 49706, 11, 18842, 372, 11, 10706, 1082, 11, 3384, 4487, ...
2.514819
911
# Generated by Django 2.1.5 on 2019-01-22 09:39 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 20, 319, 13130, 12, 486, 12, 1828, 7769, 25, 2670, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
# Copyright 2019 The AmpliGraph Authors. All Rights Reserved. # # This file is Licensed under the Apache License, Version 2.0. # A copy of the Licence is available in LICENCE, or at: # # http://www.apache.org/licenses/LICENSE-2.0 # from ampligraph.datasets import load_wn18, load_fb15k, load_fb15k_237, load_yago3_10...
[ 2, 15069, 13130, 383, 44074, 72, 37065, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 770, 2393, 318, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 13, 198, 2, 317, 4866, 286, 262, 10483, 594, 318, 1695, 287, 38559, 1...
2.812903
155
from io import StringIO from math import atan2, ceil from typing import Literal, Union, overload from common import PI, Real, TWOPI, deg, real, reduce_angle from functions import qbezeir_svg_given_middle from .circle import CircleBase, FixedCircle from .point import PointBase, Polar class FixedSector(SectorBase): ...
[ 6738, 33245, 1330, 10903, 9399, 198, 6738, 10688, 1330, 379, 272, 17, 11, 2906, 346, 198, 6738, 19720, 1330, 25659, 1691, 11, 4479, 11, 31754, 198, 198, 6738, 2219, 1330, 30434, 11, 6416, 11, 17306, 3185, 40, 11, 3396, 11, 1103, 11, ...
2.648579
387
import os COL_SEPARATOR = "\t" MULTI_SEPARATOR = "$" for neFile in os.listdir('data/'): neFile = 'data/' + neFile out_filename = neFile.replace('.tsv', "_mh.tsv") if os.path.isfile(out_filename) or '_mh' in neFile or os.path.isdir(neFile): continue out_f = open(out_filename, "w") with open(n...
[ 11748, 28686, 198, 25154, 62, 5188, 27082, 25633, 796, 37082, 83, 1, 198, 44, 16724, 40, 62, 5188, 27082, 25633, 796, 17971, 1, 198, 1640, 497, 8979, 287, 28686, 13, 4868, 15908, 10786, 7890, 14, 6, 2599, 198, 220, 220, 220, 497, 89...
1.755319
658
import os import sys from pprint import pprint import click from pykechain.utils import temp_chdir from kecpkg.commands.utils import CONTEXT_SETTINGS from kecpkg.gpg import get_gpg, list_keys, hash_of_file from kecpkg.settings import SETTINGS_FILENAME, GNUPG_KECPKG_HOME, load_settings, DEFAULT_SETTINGS, ARTIFACTS_FIL...
[ 11748, 28686, 198, 11748, 25064, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 11748, 3904, 198, 6738, 12972, 365, 7983, 13, 26791, 1330, 20218, 62, 354, 15908, 198, 198, 6738, 885, 13155, 10025, 13, 9503, 1746, 13, 26791, 1330, 2290...
2.514467
1,417
import argparse import random SIGNATURE = b'\xDE\xAD\xBE\xEF\xC0\xFF\xEE\xAA\xBB\xCC\xDD\xEE\xFF\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA' # Generate data in chunks of 1024 bytes. if __name__ == "__main__": main()
[ 11748, 1822, 29572, 198, 11748, 4738, 198, 198, 46224, 40086, 796, 275, 6, 59, 87, 7206, 59, 87, 2885, 59, 87, 12473, 59, 87, 25425, 59, 87, 34, 15, 59, 87, 5777, 59, 87, 6500, 59, 87, 3838, 59, 87, 15199, 59, 87, 4093, 59, 87...
1.908333
120
import datetime import io import os import re import subprocess import warnings from collections import namedtuple from decimal import Decimal from pathlib import Path import six from PyPDF2 import PdfFileMerger from reportlab.pdfgen import canvas def force_bytes(s, encoding="utf-8", strings_only=False, errors="str...
[ 11748, 4818, 8079, 198, 11748, 33245, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 850, 14681, 198, 11748, 14601, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 32465, 1330, 4280, 4402, 198, 6738, 3108, 8019, 1330, 10644, 198, 198...
2.369615
3,923
import gym import numpy as np import os import random import matplotlib.pyplot as plt from atariari.benchmark.wrapper import AtariARIWrapper # YarsRevenge # env_name = "DemonAttackDeterministic-v4" env = AtariARIWrapper(gym.make(env_name)) name = env.unwrapped.spec.id #ballgame = any(game in name for game in ["Po...
[ 11748, 11550, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 4738, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 6738, 379, 2743, 2743, 13, 26968, 4102, 13, 48553, 1330, 35884, 33604, 3...
2.473684
323
# encoding: utf-8 from datetime import datetime
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 6738, 4818, 8079, 1330, 4818, 8079, 628, 198, 220, 220, 220, 220, 220, 220, 220, 220 ]
2.416667
24
import json import requests from os import path
[ 11748, 33918, 198, 11748, 7007, 198, 6738, 28686, 1330, 3108, 628, 628, 198 ]
4
13
if __name__ == '__main__': ll = LinkedList() ll.append(data="Fedor") ll.append(data="Julia") ll.append(data="Bentsi") ll.print() print("Length of the Linked list is: ", ll.length()) idx = 1 print(ll.get(index=idx)) print(f"Data at index {idx} is {ll[idx]}") print("Deleted: ",...
[ 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 32660, 796, 7502, 276, 8053, 3419, 198, 220, 220, 220, 32660, 13, 33295, 7, 7890, 2625, 42268, 273, 4943, 198, 220, 220, 220, 32660, 13, 33...
2.161905
210
# -*- coding: utf-8 -*- ''' Copyright (c) 2016, Virginia Tech 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, this list of condi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 15269, 357, 66, 8, 1584, 11, 6025, 9634, 198, 3237, 2489, 10395, 13, 198, 198, 7738, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 12...
3.857831
830
from html.parser import HTMLParser
[ 6738, 27711, 13, 48610, 1330, 11532, 46677, 198 ]
4.375
8
import logging import os.path import bolt import bolt.about PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) _src_dir = os.path.join(PROJECT_ROOT, 'bolt') _test_dir = os.path.join(PROJECT_ROOT, 'test') _output_dir = os.path.join(PROJECT_ROOT, 'output') _coverage_dir = os.path.join(_output_dir, 'coverage') ...
[ 11748, 18931, 198, 11748, 28686, 13, 6978, 220, 198, 198, 11748, 18100, 198, 11748, 18100, 13, 10755, 198, 198, 31190, 23680, 62, 13252, 2394, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, ...
1.931794
953
from enum import Enum from pyxedit.xedit.attribute import XEditAttribute from pyxedit.xedit.generic import XEditGenericObject
[ 6738, 33829, 1330, 2039, 388, 198, 198, 6738, 12972, 87, 19312, 13, 87, 19312, 13, 42348, 1330, 1395, 18378, 33682, 198, 6738, 12972, 87, 19312, 13, 87, 19312, 13, 41357, 1330, 1395, 18378, 46189, 10267, 628, 198 ]
3.486486
37
#!/usr/bin/env python3 """ Author : Me <me@foo.com> Date : today Purpose: Rock the Casbah """ import argparse import io import os import sys # -------------------------------------------------- def get_args(): """Get command-line arguments""" parser = argparse.ArgumentParser( description='Rock the...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 13838, 1058, 2185, 1279, 1326, 31, 21943, 13, 785, 29, 198, 10430, 220, 220, 1058, 1909, 198, 30026, 3455, 25, 4631, 262, 11294, 47041, 198, 37811, 198, 198, 11748, 182...
2.178037
601
#!/usr/bin/env python import os import sys import unittest from collections import namedtuple sys.path = [ os.path.abspath(os.path.join(os.path.dirname(__file__), '../..')) ] + sys.path from pluckit import pluck if __name__ == '__main__': unittest.main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 555, 715, 395, 198, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 17597, 13, 6978, 796, 685, 28686, 13, 6978, 13, 397, 2777, 776,...
2.607843
102
from albumentations.core.transforms_interface import ImageOnlyTransform import albumentations.augmentations.functional as F import random
[ 6738, 435, 65, 1713, 602, 13, 7295, 13, 7645, 23914, 62, 39994, 1330, 7412, 10049, 41762, 198, 11748, 435, 65, 1713, 602, 13, 559, 5154, 602, 13, 45124, 355, 376, 198, 11748, 4738, 198 ]
4.058824
34
# -*- coding: utf-8 -*- from __future__ import unicode_literals import functools import six from django.utils.translation import ugettext_lazy as _ from django.template import TemplateDoesNotExist from django.template.loader import select_template from cms.plugin_base import CMSPluginBase, CMSPluginBaseMetaclass from ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 1257, 310, 10141, 198, 11748, 2237, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, ...
2.609081
903
import pytest from julia.core import JuliaOptions # fmt: off # fmt: off
[ 11748, 12972, 9288, 198, 198, 6738, 474, 43640, 13, 7295, 1330, 22300, 29046, 628, 198, 2, 46996, 25, 572, 628, 198, 198, 2, 46996, 25, 572, 198 ]
2.888889
27
import os import pathlib import typing import pytest from ext_argparse.parameter import Parameter from ext_argparse.param_enum import ParameterEnum from enum import Enum
[ 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 19720, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 1070, 62, 853, 29572, 13, 17143, 2357, 1330, 25139, 2357, 198, 6738, 1070, 62, 853, 29572, 13, 17143, 62, 44709, 1330, 25139, 2357, 4...
3.45098
51
#! /usr/local/bin/Python3.5 import urllib.request with open("images.csv", 'r') as csv: i = 0 for line in csv: line = line.split(',') if line[1] != '' and line[1] != "\n": urllib.request.urlretrieve(line[1].encode('utf-8'), ("img_" + str(i) + ".jpg").encode('utf-8')) pri...
[ 2, 0, 1220, 14629, 14, 12001, 14, 8800, 14, 37906, 18, 13, 20, 198, 198, 11748, 2956, 297, 571, 13, 25927, 198, 198, 4480, 1280, 7203, 17566, 13, 40664, 1600, 705, 81, 11537, 355, 269, 21370, 25, 198, 220, 220, 220, 1312, 796, 657...
2.026042
192
''' API-related functions in one spot for convenience Created by NGnius 2019-06-15 ''' from flask import jsonify, request from threading import Semaphore, RLock single_semaphores = dict() resource_lock = RLock()
[ 7061, 6, 198, 17614, 12, 5363, 5499, 287, 530, 4136, 329, 15607, 198, 198, 41972, 416, 39058, 77, 3754, 13130, 12, 3312, 12, 1314, 198, 7061, 6, 198, 198, 6738, 42903, 1330, 33918, 1958, 11, 2581, 198, 6738, 4704, 278, 1330, 12449, ...
3.257576
66
""" productporter ~~~~~~~~~~~~~~~~~~~~ helper for uwsgi :copyright: (c) 2014 by the ProductPorter Team. :license: BSD, see LICENSE for more details. """ from productporter.app import create_app from productporter.configs.production import ProductionConfig app = create_app(config=ProductionConfig(...
[ 37811, 198, 220, 220, 220, 1720, 26634, 198, 220, 220, 220, 220, 27156, 8728, 628, 220, 220, 220, 31904, 329, 334, 18504, 12397, 628, 220, 220, 220, 1058, 22163, 4766, 25, 357, 66, 8, 1946, 416, 262, 8721, 47, 4337, 4816, 13, 198, ...
3.329897
97
# BSD 3-Clause License # # Copyright (c) 2017 xxxx # All rights reserved. # Copyright 2021 Huawei Technologies Co., Ltd # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain th...
[ 2, 347, 10305, 513, 12, 2601, 682, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 2177, 2124, 31811, 198, 2, 1439, 2489, 10395, 13, 198, 2, 15069, 33448, 43208, 21852, 1766, 1539, 12052, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, ...
3.298984
689
from setuptools import setup, find_packages __version__ = '1.0.0' __author__ = 'Takumi Sueda' __author_email__ = 'puhitaku@gmail.com' __license__ = 'MIT License' __classifiers__ = ( 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Progra...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 834, 9641, 834, 796, 705, 16, 13, 15, 13, 15, 6, 198, 834, 9800, 834, 796, 705, 51, 461, 12994, 311, 1739, 64, 6, 198, 834, 9800, 62, 12888, 834, 796, 705, 79, ...
2.614987
387
# Como trabalhar com paths from os import path import time dadosArquivo()
[ 2, 955, 78, 491, 44349, 9869, 401, 13532, 198, 6738, 28686, 1330, 3108, 198, 11748, 640, 198, 198, 67, 22484, 3163, 421, 23593, 3419 ]
3.083333
24
#!/usr/bin/env python3 import os import colorsys import cv2 import numpy as np from scipy.stats import multivariate_normal from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import Axes3D
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 7577, 893, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 34242, 1330, 1963, 42524, 62, 11265, 198, ...
2.859155
71
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-05-25 15:41 from __future__ import unicode_literals import app.utils from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1485, 319, 2864, 12, 2713, 12, 1495, 1315, 25, 3901, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198,...
2.797297
74
""" module: basic_train.py - Model fitting methods docs : https://docs.fast.ai/train.html """ import pytest, fastai from fastai.vision import * from utils.fakes import * from utils.text import * from utils.mem import * from fastai.utils.mem import * from math import isclose torch_preload_mem() # this is not a fixtu...
[ 37811, 198, 21412, 25, 4096, 62, 27432, 13, 9078, 532, 9104, 15830, 5050, 198, 31628, 220, 1058, 3740, 1378, 31628, 13, 7217, 13, 1872, 14, 27432, 13, 6494, 198, 37811, 198, 198, 11748, 12972, 9288, 11, 3049, 1872, 198, 6738, 3049, 18...
3.148325
209
# return.none.py func() # the return of this call won't be collected. It's lost. a = func() # the return of this one instead is collected into `a` print(a) # prints: None
[ 2, 1441, 13, 23108, 13, 9078, 198, 198, 20786, 3419, 220, 1303, 262, 1441, 286, 428, 869, 1839, 470, 307, 7723, 13, 632, 338, 2626, 13, 198, 64, 796, 25439, 3419, 220, 1303, 262, 1441, 286, 428, 530, 2427, 318, 7723, 656, 4600, 64...
3.125
56
# -*- coding: utf-8 -*- __author__ = """Tom Smith""" __email__ = 'tom@takeontom.com' __version__ = '0.2.0' from pyperi.pyperi import Peri # noqa from pyperi.pyperi import PyPeriConnectionError # noqa
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 796, 37227, 13787, 4176, 37811, 198, 834, 12888, 834, 796, 705, 39532, 31, 20657, 756, 296, 13, 785, 6, 198, 834, 9641, 834, 796, 705, 15, 13, 1...
2.372093
86
import numpy as np import scipy.sparse as sparse from scipy.integrate import ode from scipy.interpolate import interp1d import time import control import control.matlab import numpy.random import pandas as pd from ltisim import LinearStateSpaceSystem from pendulum_model import * from pyMPC.mpc import MPCController # R...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 82, 29572, 355, 29877, 198, 6738, 629, 541, 88, 13, 18908, 4873, 1330, 267, 2934, 198, 6738, 629, 541, 88, 13, 3849, 16104, 378, 1330, 987, 79, 16, 67, 198, 11748, 640, ...
1.939982
2,216
from flask import Blueprint, current_app main = Blueprint('main', __name__)
[ 6738, 42903, 1330, 39932, 11, 1459, 62, 1324, 198, 198, 12417, 796, 39932, 10786, 12417, 3256, 11593, 3672, 834, 8, 628, 198 ]
3.590909
22
from enum import Enum from .dev import Dev
[ 6738, 33829, 1330, 2039, 388, 198, 6738, 764, 7959, 1330, 6245 ]
3.818182
11
import pandas as pd from matplotlib.colors import LinearSegmentedColormap # Dataset data = pd.read_csv("./hr.csv") entries = len(data) bins = 10 # Data analysis analysis = { "bins": 10, "balance_threshold": 0.1 } # Plot labels labels = ["satisfaction_level", "average_montly_hours", "last_...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 2603, 29487, 8019, 13, 4033, 669, 1330, 44800, 41030, 12061, 5216, 579, 499, 198, 198, 2, 16092, 292, 316, 198, 7890, 796, 279, 67, 13, 961, 62, 40664, 7, 1911, 14, 11840, 13, 40664, 4943,...
1.823333
2,700
# Author: Vishal Gaur # Created: 17-01-2021 20:31:34 # function to find GCD using Basic Euclidean Algorithm # Driver Code to test above function a = 14 b = 35 g = gcdEuclid(a, b) print("GCD of", a, "&", b, "is: ", g) a = 56 b = 125 g = gcdEuclid(a, b) print("GCD of", a, "&", b, "is: ", g)
[ 2, 6434, 25, 220, 220, 36900, 282, 402, 2899, 198, 2, 15622, 25, 220, 1596, 12, 486, 12, 1238, 2481, 220, 1160, 25, 3132, 25, 2682, 198, 198, 2, 2163, 284, 1064, 402, 8610, 1262, 14392, 48862, 485, 272, 978, 42289, 628, 198, 2, ...
2.214815
135
# modules/InterpolationLayer.py from torch.nn import Module from functions.MotionSymmetryLayer import MotionSymmetryLayer
[ 2, 13103, 14, 9492, 16104, 341, 49925, 13, 9078, 198, 6738, 28034, 13, 20471, 1330, 19937, 198, 6738, 5499, 13, 45740, 13940, 3020, 11973, 49925, 1330, 20843, 13940, 3020, 11973, 49925, 628 ]
3.84375
32
import numpy from steer2HarmMtx import steer2HarmMtx def steer(*args): ''' Steer BASIS to the specfied ANGLE. function res = steer(basis,angle,harmonics,steermtx) BASIS should be a matrix whose columns are vectorized rotated copies of a steerable function, or the responses of a set of s...
[ 11748, 299, 32152, 198, 6738, 27401, 17, 39, 1670, 44, 17602, 1330, 27401, 17, 39, 1670, 44, 17602, 198, 198, 4299, 27401, 46491, 22046, 2599, 198, 220, 220, 220, 705, 7061, 2441, 263, 29809, 1797, 284, 262, 1020, 69, 798, 33278, 2538...
2.334112
1,284
import aiohttp import asyncio import os import zipfile from pydest.api import API from pydest.manifest import Manifest
[ 11748, 257, 952, 4023, 198, 11748, 30351, 952, 198, 11748, 28686, 198, 11748, 19974, 7753, 198, 198, 6738, 279, 5173, 395, 13, 15042, 1330, 7824, 198, 6738, 279, 5173, 395, 13, 805, 8409, 1330, 36757, 628, 628 ]
3.324324
37
# Generated by Django 3.2.1 on 2021-05-06 22:30 import django.contrib.gis.db.models.fields from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 16, 319, 33448, 12, 2713, 12, 3312, 2534, 25, 1270, 198, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 70, 271, 13, 9945, 13, 27530, 13, 25747, 198, 6738, 42625, 14208, 13, 9945, 1330, 157...
2.73913
46
#!/usr/bin/python # -*- coding: utf8 -*- import os import re import textwrap import requests import unicodedata from datetime import datetime, timedelta from flask import Flask, g, request, render_template, abort, make_response from flask_babel import Babel, gettext from jinja2 import evalcontextfilter, Markup app = ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 23, 532, 9, 12, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 2420, 37150, 198, 11748, 7007, 198, 11748, 28000, 9043, 1045, 198, 6738, 4818, 8079, 1330...
2.337083
8,268
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 198, 6738, 42625, 14208, 13, 10414, 1330, ...
3.111111
45
#!/usr/bin/env python import argparse import fishact if __name__ == '__main__': parser = argparse.ArgumentParser( description='Validate data files.') parser.add_argument('activity_fname', metavar='activity_file', type=str, help='Name of activity file.') parser.add_argument...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 198, 198, 11748, 5916, 529, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 30751, 796, 1822, 29572, 13, 28100, 1713, 4...
2.974359
312
#!/usr/bin/env python3 from sys import stdout,stderr,exit from optparse import OptionParser from newick_parser import parse_tree_iterator, Branch from tree_span import calculateSpan from copy import deepcopy if __name__ == '__main__': usage = 'usage: %prog [options] <NEWICK FILE>' parser = OptionParser(usage...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 25064, 1330, 14367, 448, 11, 301, 1082, 81, 11, 37023, 198, 6738, 2172, 29572, 1330, 16018, 46677, 198, 6738, 649, 624, 62, 48610, 1330, 21136, 62, 21048, 62, 48727, 11,...
2.510978
501
from stable_baselines3 import PPO import os from setup_gym_env import SnakeEnv import time #models_dir = "./models/1644408901/" + "40000" #models_dir = "./models/1644462865/" + "120000" #models_dir = "./models/1644466638/" + "100000" models_dir = "./models/1644485414/" + "100000" env = SnakeEnv() env.reset() model ...
[ 6738, 8245, 62, 12093, 20655, 18, 1330, 350, 16402, 198, 11748, 28686, 198, 6738, 9058, 62, 1360, 76, 62, 24330, 1330, 16705, 4834, 85, 198, 11748, 640, 628, 198, 198, 2, 27530, 62, 15908, 796, 366, 19571, 27530, 14, 1433, 2598, 1821,...
2.38141
312
#!/usr/bin/env python3 import yoda, sys import h5py import numpy as np def createDatasets(f, binids, variations, depth=1, compression=4): """ Create data sets in the HDF5 file. """ nbins=len(binids) nvars=len(variations) # The fundamental moments/elements of yoda objecs floats = [ ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 628, 198, 11748, 331, 11329, 11, 25064, 198, 11748, 289, 20, 9078, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4299, 2251, 27354, 292, 1039, 7, 69, 11, 9874, 2340, 11, 13991, 11, 67...
2.142012
2,535
import zipfile import os import glob import sys # Actual directory that we could find somewhere # Reading the first arg written in the console (program name not included) fileTest = Folder(sys.argv[1])
[ 11748, 19974, 7753, 198, 11748, 28686, 198, 11748, 15095, 198, 11748, 25064, 198, 198, 2, 33520, 8619, 326, 356, 714, 1064, 7382, 198, 198, 2, 11725, 262, 717, 1822, 3194, 287, 262, 8624, 357, 23065, 1438, 407, 3017, 8, 198, 7753, 144...
3.903846
52
from functools import partial from airflow.operators.python_operator import ShortCircuitOperator
[ 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 6738, 45771, 13, 3575, 2024, 13, 29412, 62, 46616, 1330, 10073, 31560, 5013, 18843, 1352, 628, 198 ]
4
25
# Imports import pandas as pd import pickle from keras.models import load_model from preprocess import preprocess from preprocess import prep_text #Logging import logging logging.getLogger().setLevel(logging.INFO) logging.info('Loading comments to classify...') # Enter comment to be classified below comment_to_class...
[ 2, 1846, 3742, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2298, 293, 198, 6738, 41927, 292, 13, 27530, 1330, 3440, 62, 19849, 198, 6738, 662, 14681, 1330, 662, 14681, 198, 6738, 662, 14681, 1330, 3143, 62, 5239, 198, 198, 2, ...
2.678426
737
from .efficientdet import EfficientDet
[ 6738, 764, 16814, 15255, 1330, 412, 5632, 11242, 628 ]
4.444444
9
import json import logging import boto3 from box import Box from crhelper import CfnResource from schema import Optional import codesmith.common.naming as naming from codesmith.common.cfn import resource_properties from codesmith.common.schema import encoded_bool, non_empty_string, tolerant_schema from codesmith.comm...
[ 11748, 33918, 198, 11748, 18931, 198, 198, 11748, 275, 2069, 18, 198, 6738, 3091, 1330, 8315, 198, 6738, 1067, 2978, 525, 1330, 327, 22184, 26198, 198, 6738, 32815, 1330, 32233, 198, 198, 11748, 12416, 22947, 13, 11321, 13, 77, 3723, 35...
3.024561
285
n = int(input('Digite um nmero: ')) print('Seu nmero {}. O antecessor {} e seu sucessor {}'.format(n, n - 1, n + 1))
[ 77, 796, 493, 7, 15414, 10786, 19511, 578, 23781, 299, 647, 78, 25, 705, 4008, 198, 4798, 10786, 4653, 84, 299, 647, 78, 220, 23884, 13, 440, 29692, 919, 273, 220, 23884, 304, 384, 84, 424, 919, 273, 220, 23884, 4458, 18982, 7, 77...
2.222222
54
# Given two binary trees, check if the first tree is subtree of the second one. # A subtree of a tree T is a tree S consisting of a node in T and all of its descendants in T. # The subtree corresponding to the root node is the entire tree; the subtree corresponding to any other node is called a proper subtree. #...
[ 2, 11259, 734, 13934, 7150, 11, 2198, 611, 262, 717, 5509, 318, 13284, 631, 286, 262, 1218, 530, 13, 198, 198, 2, 317, 13284, 631, 286, 257, 5509, 309, 318, 257, 5509, 311, 17747, 286, 257, 10139, 287, 309, 290, 477, 286, 663, 253...
2.3
410
from typing import List, Optional from papi_sdk.models.search.base_affiliate_response import ( BaseAffiliateSearchData, BaseAffiliateSearchResponse, BaseHotel, BaseRate, ) from papi_sdk.models.search.base_request import BaseAffiliateRequest
[ 6738, 19720, 1330, 7343, 11, 32233, 198, 198, 6738, 279, 15042, 62, 21282, 74, 13, 27530, 13, 12947, 13, 8692, 62, 2001, 49826, 62, 26209, 1330, 357, 198, 220, 220, 220, 7308, 35191, 49826, 18243, 6601, 11, 198, 220, 220, 220, 7308, ...
3.022989
87
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019-01-02 16:44 # @Author : zhangzhen # @Site : # @File : torch_neural_networks.py # @Software: PyCharm import torch import torch.nn as nn import torch.nn.functional as F if __name__ == '__main__': net = Net() criterion = nn.MSELoss() pr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 13130, 12, 486, 12, 2999, 1467, 25, 2598, 198, 2, 2488, 13838, 220, 1058, 1976, ...
2.283105
438
from bottle import route, run, template gitdict = {'po2go':{'https://github.com/cadamswaite/po2go.git:master':'https://github.com/cadamswaite/po2go.git:gh-pages'}} # Handle http requests to the root address run(host='0.0.0.0', port=80)
[ 6738, 9294, 1330, 6339, 11, 1057, 11, 11055, 198, 198, 18300, 11600, 796, 1391, 6, 7501, 17, 2188, 10354, 90, 6, 5450, 1378, 12567, 13, 785, 14, 66, 324, 321, 2032, 64, 578, 14, 7501, 17, 2188, 13, 18300, 25, 9866, 10354, 6, 5450,...
2.474227
97
""" Leonard always DRIVES Sheldon (this module is the __main__ driver for Sheldon) """ import argparse import sys import os try: from cooper import Sheldon except: from .cooper import Sheldon # Extensions for python source files EXTENSIONS = [".py", ".mpy"] if __name__ == "__main__": main()
[ 37811, 198, 36185, 446, 1464, 10560, 42472, 34536, 357, 5661, 8265, 318, 262, 11593, 12417, 834, 4639, 329, 34536, 8, 198, 37811, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 28311, 25, 198, 220, 220, 220, 42...
3.164948
97
# -*- coding: utf-8 -*-
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 628, 628 ]
1.8125
16
"""Basic tests for the CherryPy core: request handling.""" from cherrypy.test import test test.prefer_parent_path() import cherrypy from cherrypy import _cptools, tools from cherrypy.lib import http, static import types import os localDir = os.path.dirname(__file__) log_file = os.path.join(localDir, "test.log") log_...
[ 37811, 26416, 5254, 329, 262, 23165, 20519, 4755, 25, 2581, 9041, 526, 15931, 198, 198, 6738, 23612, 9078, 13, 9288, 1330, 1332, 198, 9288, 13, 3866, 2232, 62, 8000, 62, 6978, 3419, 198, 198, 11748, 23612, 9078, 198, 6738, 23612, 9078, ...
2.237847
576
# Solution 1 input = readInputFile("input.txt").strip() print(input) lowest = input.split("-")[0] highest = input.split("-")[1] current = int(input.split("-")[0]) print(lowest) print(highest) resultArr = [] while current <= int(highest): if checkNeverDecreaseRule(current) and checkHasAdjacentSame(current): res...
[ 2, 28186, 352, 198, 198, 15414, 796, 1100, 20560, 8979, 7203, 15414, 13, 14116, 11074, 36311, 3419, 198, 198, 4798, 7, 15414, 8, 198, 198, 9319, 395, 796, 5128, 13, 35312, 7203, 12, 4943, 58, 15, 60, 198, 35323, 796, 5128, 13, 35312...
2.715976
169
#Transactions classes. from e2e.Classes.Transactions.Transaction import Transaction from e2e.Classes.Transactions.Transactions import Transactions #TestError Exception. from e2e.Tests.Errors import TestError #RPC class. from e2e.Meros.RPC import RPC #Sleep standard function. from time import sleep #Verify a Transac...
[ 2, 8291, 4658, 6097, 13, 198, 6738, 304, 17, 68, 13, 9487, 274, 13, 8291, 4658, 13, 48720, 1330, 45389, 198, 6738, 304, 17, 68, 13, 9487, 274, 13, 8291, 4658, 13, 8291, 4658, 1330, 46192, 198, 198, 2, 14402, 12331, 35528, 13, 198,...
3.330189
106
import pygame from graphics.component import Component
[ 11748, 12972, 6057, 198, 6738, 9382, 13, 42895, 1330, 35100, 628 ]
5.090909
11
import json import os.path import logging import csv from random import randint logger = logging.getLogger() logger.setLevel(logging.INFO)
[ 11748, 33918, 198, 11748, 28686, 13, 6978, 198, 11748, 18931, 198, 11748, 269, 21370, 198, 6738, 4738, 1330, 43720, 600, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 3419, 198, 6404, 1362, 13, 2617, 4971, 7, 6404, 2667, 13, ...
3.204545
44
from pathlib import Path import cv2 import json import math import numpy as np from argparse import ArgumentParser if __name__ == "__main__": parser = ArgumentParser() parser.add_argument('input_dir', type=str, help='Directory where the frame image and the json label be') parser...
[ 6738, 3108, 8019, 1330, 10644, 198, 11748, 269, 85, 17, 198, 11748, 33918, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1822, 29572, 1330, 45751, 46677, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 124...
2.140898
802
# ***** BEGIN GPL LICENSE BLOCK ***** # # # This program 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 version 2 # of the License, or (at your option) any later version. # # This program is distribute...
[ 2, 25998, 9, 347, 43312, 38644, 38559, 24290, 9878, 11290, 25998, 9, 198, 2, 198, 2, 198, 2, 770, 1430, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273, 198, 2, 13096, 340, 739, 262, 2846, 286, 262, 22961, 3611, 5094...
3.728111
217
#!/usr/bin/env python3 # # Proxy alerts generated by Prometheus Alertmanager turning them into # nagios passive alert information. # # Copyright 2019-2020, PostgreSQL Infrastructure Team # Author: Magnus Hagander # import argparse import http.server import json import time import sys missed_alerts = 0 if __name_...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 38027, 21675, 7560, 416, 42696, 23276, 37153, 6225, 606, 656, 198, 2, 299, 363, 4267, 14513, 7995, 1321, 13, 198, 2, 198, 2, 15069, 13130, 12, 42334, 11, 2947, 47701, ...
2.870879
364
#!/usr/bin/env python # -*- coding: utf-8 -*- # # __init__.py # @Author : wanhanwan (wanshuai_shufe@163.com) # @Date : 2019/11/25 1:20:12 from .filter import llt_filter
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 11593, 15003, 834, 13, 9078, 198, 2, 2488, 13838, 1058, 266, 272, 7637, 8149, 357, 86, 504, 13415, 1872, ...
2.125
80