content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# Find the largest and sqrt pair grid size # Number of cells in an outermost grid. # Distance to 'access port'. # Distance will always be the sum of the two sides. # i.e. From both sides print(dist(1)) print('') print(dist(12)) print('') print(dist(23)) print(dist(1024)) print('') print(dist(347991)) print('')
[ 2, 9938, 262, 4387, 290, 19862, 17034, 5166, 10706, 2546, 198, 198, 2, 7913, 286, 4778, 287, 281, 12076, 1712, 10706, 13, 198, 198, 2, 34600, 284, 705, 15526, 2493, 4458, 198, 2, 34600, 481, 1464, 307, 262, 2160, 286, 262, 734, 5389...
2.75
116
#!/usr/bin/env python """Utilities working with Flask UIs""" __author__ = 'Michael Meisinger, Stephen Henrie' import traceback import flask from flask import request, jsonify import sys import json import simplejson from pyon.public import BadRequest, OT, get_ion_ts_millis from pyon.util.containers import get_datet...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 18274, 2410, 1762, 351, 46947, 471, 3792, 37811, 198, 198, 834, 9800, 834, 796, 705, 13256, 2185, 1710, 263, 11, 7970, 6752, 5034, 6, 198, 198, 11748, 12854, 1891, 198, 117...
2.633508
1,719
import pandas as pd import os from sklearn.model_selection import train_test_split from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer from sklearn.preprocessing import OneHotEncoder,LabelEncoder from scipy import sparse import featureCombinator
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 2764, 38469, 7509, 11, 309, 69, 312,...
3.69863
73
hour = int(input('Hora de inicio:')) min = int(input('Minuto de inicio:')) dura = int(input('Duración del evento:')) hours = (hour + (min + dura) // 60) % 24 minutes = (min + dura) % 60 print(f'{hours}:{minutes}')
[ 9769, 796, 493, 7, 15414, 10786, 39, 5799, 390, 287, 46441, 32105, 4008, 220, 198, 1084, 796, 493, 7, 15414, 10786, 9452, 9390, 390, 287, 46441, 32105, 4008, 198, 67, 5330, 796, 493, 7, 15414, 10786, 36927, 32009, 18840, 1619, 1785, 7...
2.438202
89
# # voice-skill-sdk # # (C) 2021, Deutsche Telekom AG # # This file is distributed under the terms of the MIT license. # For details see the file LICENSE in the top directory. # import json import asyncio import pathlib import datetime from datetime import date from fastapi.testclient import TestClient from skill_sd...
[ 2, 198, 2, 3809, 12, 42401, 12, 21282, 74, 198, 2, 198, 2, 357, 34, 8, 33448, 11, 36763, 14318, 74, 296, 13077, 198, 2, 198, 2, 770, 2393, 318, 9387, 739, 262, 2846, 286, 262, 17168, 5964, 13, 198, 2, 1114, 3307, 766, 262, 239...
2.481113
503
from StringIO import StringIO import nose.tools as NT from wsgiref.simple_server import demo_app from paste.fixture import TestApp import firepython as FPY import firepython.utils as FU import firepython._const as FC import firepython.middleware as FM try: import gprof2dot except ImportError: gprof2dot = Non...
[ 6738, 10903, 9399, 1330, 10903, 9399, 198, 11748, 9686, 13, 31391, 355, 24563, 198, 198, 6738, 266, 45213, 557, 69, 13, 36439, 62, 15388, 1330, 13605, 62, 1324, 198, 6738, 17008, 13, 69, 9602, 1330, 6208, 4677, 198, 198, 11748, 2046, ...
3.196078
102
#file config file_fits_flux_column = "Flux column" file_fits_time_column = "Time column" file_fits_hdulist_column = "Data column for hdulist" file_ascii_skiprows = "Skipped rows in ascii file" file_ascii_use_cols = "Used columns in ascii file" #plot conf plot_show = "Show plots" plot_save = "Save plots" #general conf g...
[ 2, 7753, 4566, 198, 7753, 62, 21013, 62, 69, 22564, 62, 28665, 796, 366, 37, 22564, 5721, 1, 198, 7753, 62, 21013, 62, 2435, 62, 28665, 796, 366, 7575, 5721, 1, 198, 7753, 62, 21013, 62, 31298, 377, 396, 62, 28665, 796, 366, 6601,...
3.058085
637
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, str_or_none, url_or_none, )
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 302, 198, 198, 6738, 764, 11321, 1330, 14151, 11627, 40450, 198, 6738, 11485, 26791, 1330, 357, 198, 220, 220, 220, 493,...
2.542857
70
from dataclasses import dataclass from typing import TypeVar, Union @dataclass class Source: """ The base configuration of all value resolutions. Inherit from this class to describe source configuration for your own resolvers. """ AnySource = Union[str, Source] TSource = TypeVar("TSource", boun...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 5994, 19852, 11, 4479, 628, 198, 31, 19608, 330, 31172, 198, 4871, 8090, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 383, 2779, 8398, 286, 477, 1988, 21811...
3.363636
99
# ------------------------------------------------------------- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you unde...
[ 2, 20368, 1783, 32501, 198, 2, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, ...
4.103448
290
# creation of class employee new_employee1 = Employee("raj", "kumar", 5000) # the gives memory address location of employee1 print("The newly created employee :", new_employee1)
[ 2, 6282, 286, 1398, 6538, 628, 198, 3605, 62, 7033, 1453, 16, 796, 36824, 7203, 430, 73, 1600, 366, 74, 44844, 1600, 23336, 8, 198, 198, 2, 262, 3607, 4088, 2209, 4067, 286, 6538, 16, 198, 198, 4798, 7203, 464, 8308, 2727, 6538, 1...
3.5
52
import ray import glob import yaml import lmdb import numpy as np import torch from torch.utils.data import Dataset from common.augmenter import augment from utils import filter_sem # CHANNELS = [ # 4, # Pedestrians # 6, # Road lines # 7, # Road masks # 8, # Side walks # 10, # Vehicles # ...
[ 11748, 26842, 198, 11748, 15095, 198, 11748, 331, 43695, 198, 11748, 300, 9132, 65, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 6738, 2219, 13, 559, 5154, 263...
2.341297
293
directory = "c:\\files\\other_dir\\" file = open(directory, 'r') # r, w, a => modes file.readlines() # file.read()reads till UOF # file.write() should have w mode # shelve module stores values in binary file # shelve.open() retrieves a dictionary like shelf value
[ 198, 34945, 796, 366, 66, 25, 6852, 16624, 6852, 847, 62, 15908, 6852, 1, 198, 198, 7753, 796, 1280, 7, 34945, 11, 705, 81, 11537, 1303, 374, 11, 266, 11, 257, 5218, 12881, 198, 7753, 13, 961, 6615, 3419, 198, 2, 2393, 13, 961, ...
3.152941
85
cid = str(input('Em que ciidade você nasceu? ')).strip() print(cid[:5].capitalize() == 'Santo')
[ 66, 312, 796, 965, 7, 15414, 10786, 10161, 8358, 269, 72, 312, 671, 12776, 25792, 25221, 344, 84, 30, 705, 29720, 36311, 3419, 198, 4798, 7, 66, 312, 58, 25, 20, 4083, 27544, 1096, 3419, 6624, 705, 50, 14723, 11537, 198 ]
2.341463
41
from astropy.stats import LombScargle import numpy as np import matplotlib.pyplot as plt from astropy.table import Table import glob import pandas as pd import scipy.signal as sig import scipy.stats as stats from astropy.convolution import convolve, Box1DKernel, Gaussian1DKernel import time dir = '/Volumes/Zoe Bell Ba...
[ 6738, 6468, 28338, 13, 34242, 1330, 28503, 3351, 853, 293, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 6468, 28338, 13, 11487, 1330, 8655, 198, 11748, 15095, 198, 11748, 1...
2.323031
14,042
def first_bad_pair(sequence, k): """Return the first index of a pair of elements in sequence[] for indices k-1, k+1, k+2, k+3, ... where the earlier element is not less than the later element. If no such pair exists, return -1.""" if 0 < k < len(sequence) - 1: if sequence[k-1] >= sequence[k+1]: ...
[ 4299, 717, 62, 14774, 62, 24874, 7, 43167, 11, 479, 2599, 198, 220, 220, 220, 37227, 13615, 262, 717, 6376, 286, 257, 5166, 286, 4847, 287, 8379, 21737, 198, 220, 220, 220, 329, 36525, 479, 12, 16, 11, 479, 10, 16, 11, 479, 10, ...
2.491803
610
from typing import Dict style: Dict[str, str] = { 'reset': '\033[0;0;0m', 'red': '\033[1;31m', 'liteRed': '\033[1;91m', 'green': '\033[1;92m', 'liteGreen': '\033[1;92m', 'black': '\033[1;30m', 'yellow': '\033[1;33m', 'liteYellow': '\033[1;93m', 'blue': '\033[1;34m', 'liteBlue': ...
[ 6738, 19720, 1330, 360, 713, 198, 198, 7635, 25, 360, 713, 58, 2536, 11, 965, 60, 796, 1391, 198, 220, 220, 220, 705, 42503, 10354, 705, 59, 44427, 58, 15, 26, 15, 26, 15, 76, 3256, 198, 220, 220, 220, 705, 445, 10354, 705, 59, ...
1.741573
356
import logging; logger = logging.getLogger("minimalKB."+__name__); DEBUG_LEVEL=logging.DEBUG from minimalkb.exceptions import KbServerError def query(db, vars, patterns, models): """ 'vars' is the list of unbound variables that are expected to be returned. Each of them must start with a '?'. 'pattern...
[ 11748, 18931, 26, 49706, 796, 18931, 13, 1136, 11187, 1362, 7203, 1084, 4402, 22764, 526, 10, 834, 3672, 834, 1776, 198, 30531, 62, 2538, 18697, 28, 6404, 2667, 13, 30531, 198, 198, 6738, 10356, 971, 65, 13, 1069, 11755, 1330, 509, 65...
2.467021
2,259
import datetime def get_expire_time(minutes: int) -> datetime.datetime: """ get expire time after minutes from now args minutes: int return expire_time: datetime.datetime """ now = datetime.datetime.now() expire_time = now + datetime.timedelta(minutes=minutes) r...
[ 11748, 4818, 8079, 201, 198, 201, 198, 201, 198, 4299, 651, 62, 1069, 5111, 62, 2435, 7, 1084, 1769, 25, 493, 8, 4613, 4818, 8079, 13, 19608, 8079, 25, 201, 198, 220, 220, 220, 37227, 651, 24264, 640, 706, 2431, 422, 783, 201, 198...
2.431655
139
#!/usr/bin/env python3.7 # Mastering Object-Oriented Python 2e # # Code Examples for Mastering Object-Oriented Python 2nd Edition # # Chapter 20. Example 1. # """ Blackjack Cards and Decks ========================= This module contains a definition of :class:`Card`, :class:`Deck` and :class:`Shoe` suitable for Blackj...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 13, 22, 198, 2, 5599, 278, 9515, 12, 46, 380, 4714, 11361, 362, 68, 198, 2, 198, 2, 6127, 21066, 329, 5599, 278, 9515, 12, 46, 380, 4714, 11361, 362, 358, 5061, 198, 2, 198, 2, ...
2.80629
1,399
""" A utility file for testing helpers """ import numpy as np import pandas as pd def df_compare(left, right, columns=None, atol=1.e-8, rtol=1.e-5, equal_nan=True): """ Compares two dataframe in an approximate manner. Checks: ...
[ 37811, 198, 32, 10361, 2393, 329, 4856, 49385, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 4299, 47764, 62, 5589, 533, 7, 9464, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220...
2.232685
3,494
#!/usr/bin/env python # import os.path import setuptools setuptools.setup( name='rmq-definitions', version='1.0.1', description=('Deterministicly sorting and formatting of RabbitMQ ' 'definition backups'), author='Gavin M. Roy', author_email='gavinmroy@gmail.com', url='https...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 198, 11748, 28686, 13, 6978, 198, 11748, 900, 37623, 10141, 628, 198, 198, 2617, 37623, 10141, 13, 40406, 7, 198, 220, 220, 220, 1438, 11639, 26224, 80, 12, 4299, 50101, 3256, ...
2.641115
574
#!/usr/bin/python3 # My first program on Python! print ("Hello World!") for cntr in range(0,11): print (cntr)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 2011, 717, 1430, 319, 11361, 0, 198, 4798, 5855, 15496, 2159, 2474, 8, 198, 220, 220, 220, 329, 269, 429, 81, 287, 2837, 7, 15, 11, 1157, 2599, 198, 220, 220, 220, 3601, 357, 66,...
2.408163
49
from logbook import FileHandler from alephnull.finance.blotter import ORDER_STATUS
[ 6738, 2604, 2070, 1330, 9220, 25060, 198, 6738, 31341, 746, 8423, 13, 69, 14149, 13, 2436, 313, 353, 1330, 38678, 62, 35744, 2937, 628, 628, 628, 198 ]
3.296296
27
import ast import re from astnode import * p_elif = re.compile(r'^elif\s?') p_else = re.compile(r'^else\s?') p_try = re.compile(r'^try\s?') p_except = re.compile(r'^except\s?') p_finally = re.compile(r'^finally\s?') p_decorator = re.compile(r'^@.*') if __name__ == '__main__': # node = ast.parse(''' # # fo...
[ 11748, 6468, 198, 11748, 302, 198, 198, 6738, 6468, 17440, 1330, 1635, 198, 198, 79, 62, 417, 361, 796, 302, 13, 5589, 576, 7, 81, 6, 61, 417, 361, 59, 82, 8348, 8, 198, 79, 62, 17772, 796, 302, 13, 5589, 576, 7, 81, 6, 61, ...
2.366492
382
"""Contains toplevel, abstract objects mirroring the Sina schema.""" from __future__ import print_function import logging import collections import numbers import copy import six import sina.sjson as json logging.basicConfig() LOGGER = logging.getLogger(__name__) RESERVED_TYPES = ["run"] # Types reserved by Record'...
[ 37811, 4264, 1299, 284, 1154, 626, 11, 12531, 5563, 10162, 278, 262, 28743, 32815, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 18931, 198, 11748, 17268, 198, 11748, 3146, 198, 11748, 4866, 198, 198, 11748, ...
2.382883
16,253
import os os.environ["PMD_CMD"] = "/opt/pmd-bin/bin/run.sh pmd" os.environ["APP_SRC_DIR"] = "/usr/local/src"
[ 11748, 28686, 198, 198, 418, 13, 268, 2268, 14692, 5868, 35, 62, 34, 12740, 8973, 796, 12813, 8738, 14, 4426, 67, 12, 8800, 14, 8800, 14, 5143, 13, 1477, 9114, 67, 1, 198, 418, 13, 268, 2268, 14692, 24805, 62, 50, 7397, 62, 34720,...
2.037037
54
#!/usr/bin/env python # -*- coding: utf-8 -*- from compiler.phases.code_generator import code_generator from compiler.phases.tokenizer import tokenizer from compiler.phases.transformer import transformer, visitor from compiler.phases.parser import parser
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 17050, 13, 746, 1386, 13, 8189, 62, 8612, 1352, 1330, 2438, 62, 8612, 1352, 198, 6738, 17050, 13, 746, 138...
3.394737
76
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os from spack import * class Scale(MakefilePackage): """SCALE (Scalable Computing for Advanced Library and E...
[ 2, 15069, 2211, 12, 1238, 2481, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, ...
2.535642
491
from sqlalchemy import Column, Integer, DateTime from datetime import datetime from av_dashboard.our_base import Base
[ 6738, 44161, 282, 26599, 1330, 29201, 11, 34142, 11, 7536, 7575, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 1196, 62, 42460, 3526, 13, 454, 62, 8692, 1330, 7308, 198 ]
3.806452
31
#from loganalysis.lte.ltelog import LteLog #from loganalysis.mesh.meshlog import MeshLog #__all__ = ['lte']
[ 2, 6738, 2604, 20930, 13, 75, 660, 13, 2528, 417, 519, 1330, 406, 660, 11187, 198, 2, 6738, 2604, 20930, 13, 76, 5069, 13, 76, 5069, 6404, 1330, 47529, 11187, 198, 2, 834, 439, 834, 796, 37250, 75, 660, 20520 ]
2.675
40
# Задача 6, Вариант 2 # Создайте игру, в которой компьютер загадывает название одного из двенадцати созвездий, входящих в зодиакальный круг, а игрок должен его угадать. # Андреев Ф.И. # 24.05.2016 import random sozvezdies = random.randrange(12) sozvezdie = ("Овен","Телец","Близнецы","Рак","Лев","Дева","Весы"...
[ 2, 12466, 245, 16142, 43666, 16142, 141, 229, 16142, 718, 11, 12466, 240, 16142, 21169, 18849, 16142, 22177, 20375, 362, 220, 201, 198, 2, 12466, 94, 25443, 115, 43666, 16142, 140, 117, 20375, 16843, 12466, 116, 140, 111, 21169, 35072, ...
1.170854
597
from Model.NQModel import NQModel from Model.LossFn import LossFn import torch import time import sklearn import datetime import Model.datasetutils as datasetutils import Model.tensorboardutils as boardutils import torch.utils.tensorboard as tensorboard import torch.distributed as dist from torch.nn.parallel import Dis...
[ 6738, 9104, 13, 45, 48, 17633, 1330, 399, 48, 17633, 198, 6738, 9104, 13, 43, 793, 37, 77, 1330, 22014, 37, 77, 198, 11748, 28034, 198, 11748, 640, 198, 11748, 1341, 35720, 198, 11748, 4818, 8079, 198, 11748, 9104, 13, 19608, 292, 3...
3.158088
544
#!/usr/bin/env python # Copyright 2021 NXP # All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause import runcore import rundef __all__ = ["runcore", "rundef"]
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 33448, 399, 27481, 198, 2, 1439, 2489, 10395, 13, 198, 2, 220, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, 18, 12, 2601, 682, 198, 198, 11748,...
2.597015
67
from aio_forms.fields.string_field import StringField
[ 6738, 257, 952, 62, 23914, 13, 25747, 13, 8841, 62, 3245, 1330, 10903, 15878, 628 ]
3.666667
15
from .log import get_logger, disable from .profilling import timeit, memit, available_memory __all__ = ['timeit', 'memit', 'available_memory', 'get_logger', 'disable']
[ 6738, 764, 6404, 1330, 651, 62, 6404, 1362, 11, 15560, 198, 6738, 764, 5577, 4509, 1330, 640, 270, 11, 1066, 270, 11, 1695, 62, 31673, 628, 198, 834, 439, 834, 796, 37250, 2435, 270, 3256, 705, 11883, 270, 3256, 705, 15182, 62, 3167...
3.148148
54
import matplotlib.pyplot as plt from random import * import helper # Configuration iterations = 40 # Population population_size = 10 # Function function_min = -100 function_max = 100 # Genetic variables mutation_rate = 0.1 elite_size = 2 best_distances = [] points = random_population() fig, axs = plt.sub...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 4738, 1330, 1635, 198, 11748, 31904, 198, 198, 2, 28373, 198, 2676, 602, 796, 2319, 198, 198, 2, 20133, 198, 39748, 62, 7857, 796, 838, 198, 198, 2, 15553, 198, 881...
2.676724
232
# Copyright ©2020-2021 The American University in Cairo and the Cloud V Project. # # This file is part of the DFFRAM Memory Compiler. # See https://github.com/Cloud-V/DFFRAM for further info. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Li...
[ 2, 15069, 10673, 42334, 12, 1238, 2481, 383, 1605, 2059, 287, 23732, 290, 262, 10130, 569, 4935, 13, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 262, 360, 5777, 24115, 14059, 3082, 5329, 13, 198, 2, 4091, 3740, 1378, 12567, 13, 785, ...
3.146375
731
from ghost_jukebox import app import os import random import re import requests import string from werkzeug.utils import secure_filename # get filename from content-disposition header # This will download the image into the static folder
[ 6738, 10905, 62, 73, 4649, 3524, 1330, 598, 198, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 302, 198, 11748, 7007, 198, 11748, 4731, 198, 198, 6738, 266, 9587, 2736, 1018, 13, 26791, 1330, 5713, 62, 34345, 628, 198, 2, 651, 2947...
3.983607
61
import math import time import os import time import subprocess from datetime import datetime from pythonosc import dispatcher from pythonosc import osc_server from pythonosc import osc_message_builder from pythonosc import udp_client import os import sys import glob import serial import time os.environ['TF_CPP_MIN_L...
[ 11748, 10688, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 850, 14681, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 21015, 17500, 1330, 49952, 198, 6738, 21015, 17500, 1330, 267, 1416, 62, 15388, 198, 6738, 2101...
2.756757
629
#!/usr/bin/env python3 # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 33160, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2...
2.578257
1,067
# encoding: utf-8 """ tokeniser.py Created by Thomas Mangin on 2015-06-05. Copyright (c) 2009-2017 Exa Networks. All rights reserved. License: 3-clause BSD. (See the COPYRIGHT file) """ from exabgp.configuration.core.format import tokens from exabgp.protocol.family import AFI from collections import deque from exabgp...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 37811, 198, 30001, 5847, 13, 9078, 198, 198, 41972, 416, 5658, 27609, 259, 319, 1853, 12, 3312, 12, 2713, 13, 198, 15269, 357, 66, 8, 3717, 12, 5539, 1475, 64, 27862, 13, 1439, 2489, 10395, 13,...
3.118182
110
"""MediaPlayer platform for Music Assistant integration.""" import logging from typing import Optional from homeassistant.components.media_player import MediaPlayerEntity from homeassistant.components.media_player.const import ( ATTR_MEDIA_ENQUEUE, MEDIA_TYPE_PLAYLIST, SUPPORT_BROWSE_MEDIA, SUPPORT_CLE...
[ 37811, 13152, 14140, 3859, 329, 7849, 15286, 11812, 526, 15931, 198, 11748, 18931, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 1363, 562, 10167, 13, 5589, 3906, 13, 11431, 62, 7829, 1330, 6343, 14140, 32398, 198, 6738, 1363, 562, 10167...
2.319738
7,012
# (C) Copyright 2017 Inova Development Inc. # 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 appl...
[ 2, 357, 34, 8, 15069, 2177, 554, 10071, 7712, 3457, 13, 198, 2, 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, ...
2.418017
1,543
#!/usr/bin/env python import os, sys if len(sys.argv) > 1: os.environ['DBS_STRATEGY'] = sys.argv[1] import DQMOffline.EGamma.electronDataDiscovery as dbs os.environ['TEST_HARVESTED_FILE'] = 'rfio:/castor/cern.ch/cms'+dbs.search()[0] os.system('root -b -l -q electronWget.C')
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 11, 25064, 198, 361, 18896, 7, 17597, 13, 853, 85, 8, 1875, 352, 25, 198, 220, 28686, 13, 268, 2268, 17816, 35, 4462, 62, 18601, 6158, 31212, 20520, 796, 25064, 13...
2.186047
129
__all__ = [ "sqliter", ]
[ 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 25410, 2676, 1600, 198, 60, 198 ]
1.8125
16
import pandas as pd array = [1,2,4,5,6,7,8,9,12,14,15,18,19,25,29,35,38,40,45,48,49,50] array_ds = pd.Series(array) print("Série original") print(array_ds) media_ds = array_ds.mean() print("Valor médio da série") print(media_ds) std_ds = array_ds.std() print("Desvio padrão da série") print(std_ds)
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 18747, 796, 685, 16, 11, 17, 11, 19, 11, 20, 11, 21, 11, 22, 11, 23, 11, 24, 11, 1065, 11, 1415, 11, 1314, 11, 1507, 11, 1129, 11, 1495, 11, 1959, 11, 2327, 11, 2548, 11, 1821, 11, ...
2.013245
151
""" Copyright 2017-2018 Fizyr (https://fizyr.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 to in w...
[ 37811, 198, 15269, 2177, 12, 7908, 376, 528, 2417, 357, 5450, 1378, 69, 528, 2417, 13, 785, 8, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393...
2.585257
3,595
w_widht = 500 w_height = 500 colors = { 'grid': (255,255,255), 'background': (0,0,0), 'x': (255,0,0), 'o': (0,255,0), 'cross': (0,0,255)}
[ 86, 62, 28029, 4352, 796, 5323, 201, 198, 86, 62, 17015, 796, 5323, 201, 198, 4033, 669, 796, 1391, 220, 705, 25928, 10354, 357, 13381, 11, 13381, 11, 13381, 828, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 70...
1.57377
122
#! /usr/bin/env python # -*- coding: utf-8 -*- """Test for input data (Librispeech corpus).""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import unittest sys.path.append('../../') from librispeech.path import Path from librispeech.input_da...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 14402, 329, 5128, 1366, 357, 25835, 2442, 431, 3055, 35789, 21387, 15931, 198, 198, 6738, 11593, 37443, 8...
2.38
550
import os import sys import yaml import json import signal import argparse from shutil import which from .identify import ( is_json, opposing_file_extension_for, detect_indentation, has_trailing_whitespace, ) from .hash import md5_hash_for default_editors = [ 'nano', 'pico', 'xo', 'e...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 331, 43695, 220, 198, 11748, 33918, 198, 11748, 6737, 198, 11748, 1822, 29572, 198, 198, 6738, 4423, 346, 1330, 543, 198, 198, 6738, 764, 738, 1958, 1330, 357, 198, 220, 220, 220, 318, 62, ...
2.22339
761
""" Project Euler Problem 64: https://projecteuler.net/problem=64 All square roots are periodic when written as continued fractions. For example, let us consider sqrt(23). It can be seen that the sequence is repeating. For conciseness, we use the notation sqrt(23)=[4;(1,3,1,8)], to indicate that the block (1,3,1,8) re...
[ 37811, 198, 16775, 412, 18173, 20647, 5598, 25, 3740, 1378, 16302, 68, 18173, 13, 3262, 14, 45573, 28, 2414, 198, 198, 3237, 6616, 11135, 389, 27458, 618, 3194, 355, 3767, 49876, 13, 198, 1890, 1672, 11, 1309, 514, 2074, 19862, 17034, ...
2.629583
791
import hashlib import base64 from datetime import datetime
[ 11748, 12234, 8019, 198, 11748, 2779, 2414, 198, 6738, 4818, 8079, 1330, 4818, 8079 ]
4.142857
14
# -*- coding: utf-8 -*- import re import email from email.header import decode_header from email.utils import parsedate_tz, mktime_tz import imaplib import datetime from logger import logging
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 302, 198, 11748, 3053, 198, 6738, 3053, 13, 25677, 1330, 36899, 62, 25677, 198, 6738, 3053, 13, 26791, 1330, 44267, 378, 62, 22877, 11, 33480, 2435, 62, 2287...
3.233333
60
import csv import datetime import json import os import re import shlex import subprocess import sys from collections import OrderedDict from pathlib import Path from typing import List from typing import Optional from typing import Tuple import pytest from prettytable import PrettyTable from yattag import Doc from n...
[ 11748, 269, 21370, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 427, 2588, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 3108, 8019, 1330,...
2.62069
435
from .hvs_protocol_translator import HvsProtocolTranslator
[ 6738, 764, 71, 14259, 62, 11235, 4668, 62, 7645, 41880, 1330, 367, 14259, 19703, 4668, 8291, 41880, 198 ]
3.277778
18
# populateMaintFee() # by Allan Niemerg # Populates a Mysql database with patent maintenance fee data from files found on # http://www.google.com/googlebooks/uspto.html import MySQLdb as mdb
[ 2, 48040, 44, 2913, 37, 1453, 3419, 198, 2, 416, 31908, 11556, 368, 6422, 198, 2, 8099, 15968, 257, 337, 893, 13976, 6831, 351, 12701, 9262, 6838, 1366, 422, 3696, 1043, 319, 220, 198, 2, 2638, 1378, 2503, 13, 13297, 13, 785, 14, ...
3.216667
60
#!/usr/bin/python import glob import yaml import os from os import path import sys if __name__ == "__main__": main(sys.argv[1:])
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 15095, 198, 11748, 331, 43695, 198, 11748, 28686, 198, 6738, 28686, 1330, 3108, 198, 11748, 25064, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, ...
2.555556
54
VERSION = '0.17.3'
[ 43717, 796, 705, 15, 13, 1558, 13, 18, 6, 198 ]
1.9
10
if __name__ == '__main__': main()
[ 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.1
20
# -*- coding: utf-8 -*- u""" Make canvasNode into static one. Read input/output port into static attributes. """ import sys import textwrap import maya.api.OpenMaya as api import maya.OpenMaya as oldapi import maya.cmds as cmds import FabricEngine.Core import kraken.plugins.maya_plugin.conversion as conv # ==========...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 84, 37811, 198, 12050, 21978, 19667, 656, 9037, 530, 13, 198, 5569, 5128, 14, 22915, 2493, 656, 9037, 12608, 13, 198, 37811, 198, 11748, 25064, 198, 11748, 2420, 37150, ...
3.25
404
import numpy as np from time import time def random_range_integers(low: int, high: int, size: int, seed=0, unique=True) -> list: """ :param low: :param high: :param size: :param seed: :param unique: :return: specified sized list range with unique values, can be have bot...
[ 11748, 299, 32152, 355, 45941, 201, 198, 6738, 640, 1330, 640, 201, 198, 201, 198, 201, 198, 201, 198, 4299, 4738, 62, 9521, 62, 18908, 364, 7, 9319, 25, 493, 11, 1029, 25, 493, 11, 2546, 25, 493, 11, 9403, 28, 15, 11, 3748, 28,...
2.420601
233
#!/usr/bin/env python # -*- coding: utf-8 -*- import time, wiringpi # 定数 SPK_PIN = 5 # 圧電スピーカーのGPIO番号 if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 640, 11, 29477, 14415, 198, 198, 2, 10263, 106, 248, 46763, 108, 198, 4303, 42, 62, 44032, 796, 642, 220, 1303...
1.746988
83
import sublime, sublime_plugin, os, re, sys, tempfile import threading, subprocess, http.server, socketserver directory = os.path.dirname(os.path.realpath(__file__)) libs_path = os.path.join(directory, "itdchelper") sublime_text_file = os.path.dirname(sublime.__file__) + r'\sublime_text.exe' if libs_path not in sys....
[ 11748, 41674, 11, 41674, 62, 33803, 11, 28686, 11, 302, 11, 25064, 11, 20218, 7753, 198, 11748, 4704, 278, 11, 850, 14681, 11, 2638, 13, 15388, 11, 37037, 18497, 198, 198, 34945, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 69...
2.728477
151
from django.conf.urls import url from tsuru_autoscale.datasource import views urlpatterns = [ url(r'^$', views.list, name='datasource-list'), url(r'^new/$', views.new, name='datasource-new'), url(r'^(?P<name>[\w\s-]+)/remove/$', views.remove, name='datasource-remove'), url(r'^(?P<name>[\w\s-]+)/$', vi...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 198, 6738, 256, 11793, 84, 62, 2306, 17500, 1000, 13, 19608, 292, 1668, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 3, 32...
2.275641
156
#!/usr/bin/env python import cv2 import datetime import json import os import pandas as pd import pims import random import sys import time import termite as trmt if __name__ == '__main__': tracker = GeneralTracker('settings/tracking.json') tracker.track()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 269, 85, 17, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 279, 12078, 198, 11748, 4738, 198, 11748, 25064, ...
3.033708
89
from OLD.storage_module.server_data import DiskServerData, FAQPhraseData from OLD.faq_module.provide_faq import migrate_to_class import OLD.universal_module.utils import OLD.universal_module.text from discord.ext import commands from OLD.faq_module import text import logging import typing import sys logger = logging....
[ 6738, 440, 11163, 13, 35350, 62, 21412, 13, 15388, 62, 7890, 1330, 31664, 10697, 6601, 11, 18749, 2725, 22789, 6601, 198, 6738, 440, 11163, 13, 13331, 80, 62, 21412, 13, 15234, 485, 62, 13331, 80, 1330, 32492, 62, 1462, 62, 4871, 198,...
3.176923
130
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc import job_api_pb2 as job__api__pb2 class JobServiceStub(object): """Missing associated documentation comment in .proto file.""" def __init__(self, ch...
[ 2, 2980, 515, 416, 262, 308, 49, 5662, 11361, 8435, 17050, 13877, 13, 8410, 5626, 48483, 0, 198, 37811, 11792, 290, 4382, 6097, 11188, 284, 1237, 672, 3046, 12, 23211, 2594, 526, 15931, 198, 11748, 1036, 14751, 198, 198, 11748, 1693, ...
2.494287
1,663
""" Source: https://stackoverflow.com/questions/17275334/what-is-a-correct-way-to-filter-different-loggers-using-python-logging """ import logging LOG_LEVEL_MAP = { "info": logging.INFO, "debug": logging.DEBUG, "error": logging.ERROR, "warning": logging.WARNING, "critical": logging.CRITICAL, ...
[ 37811, 198, 7416, 25, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 1558, 23195, 31380, 14, 10919, 12, 271, 12, 64, 12, 30283, 12, 1014, 12, 1462, 12, 24455, 12, 39799, 12, 6404, 5355, 12, 3500, 12, 29412, 12, 6404, ...
2.307971
276
from typing import List, Tuple, Union, Dict, Any, Optional import pathlib import logging import pandas as pd from wandb_utils.misc import all_data_df, write_df import wandb logger = logging.getLogger(__name__)
[ 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 4479, 11, 360, 713, 11, 4377, 11, 32233, 198, 11748, 3108, 8019, 198, 11748, 18931, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 11569, 65, 62, 26791, 13, 44374, 1330, 477, 62, 7890, ...
3.117647
68
#!/usr/bin/python import math def outlierCleaner(predictions, ages, net_worths): """ Clean away the 10% of points that have the largest residual errors (difference between the prediction and the actual net worth). Return a list of tuples named cleaned_data where each tup...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 10688, 628, 198, 4299, 503, 2505, 32657, 263, 7, 28764, 9278, 11, 9337, 11, 2010, 62, 9268, 82, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 5985, ...
2.621951
328
# Copyright 2014 NEC Corporation. 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 ...
[ 2, 15069, 1946, 41804, 10501, 13, 220, 1439, 2489, 10395, 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, 198, 2, 220, 220, 220, 407, 779, 428, 2393...
2.32992
879
"""Test-discovery helper. Modifies sys.path according to the OS of the environment in which the tests are being run.""" import os, sys if os.name == "nt": # If windows use backslash for subdirectory in os.scandir(): sys.path.append(os.path.abspath(subdirectory.name + "\\")) else: # in TravisCI default env...
[ 37811, 14402, 12, 67, 40821, 31904, 13, 3401, 6945, 25064, 13, 6978, 1864, 284, 262, 7294, 286, 262, 198, 38986, 287, 543, 262, 5254, 389, 852, 1057, 526, 15931, 198, 198, 11748, 28686, 11, 25064, 198, 198, 361, 28686, 13, 3672, 6624,...
2.91954
174
from enum import Enum
[ 6738, 33829, 1330, 2039, 388, 220, 198 ]
3.285714
7
import networkx #import pymysql import instagram_scrape
[ 11748, 3127, 87, 198, 2, 11748, 279, 4948, 893, 13976, 198, 198, 11748, 916, 6713, 62, 1416, 13484, 198 ]
3
19
# Open3D: www.open3d.org # The MIT License (MIT) # See license file or visit www.open3d.org for details import copy import numpy as np import open3d as o3d if __name__ == "__main__": print("Testing vector in open3d ...") print("") print("Testing o3d.utility.IntVector ...") vi = o3d.utility.IntVector...
[ 2, 4946, 18, 35, 25, 7324, 13, 9654, 18, 67, 13, 2398, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 4091, 5964, 2393, 393, 3187, 7324, 13, 9654, 18, 67, 13, 2398, 329, 3307, 198, 198, 11748, 4866, 198, 11748, 299, 32152, 35...
1.948624
1,090
from http import HTTPStatus from starlette.requests import Request from starlette.responses import JSONResponse from src.apps.kms.backend.controllers.KmsController import KmsController from src.contexts.kms.cryptokeys.application.rotate_one.RotateCryptoKeyCommand import RotateCryptoKeyCommand from src.contexts.kms.cr...
[ 6738, 2638, 1330, 14626, 19580, 198, 198, 6738, 3491, 21348, 13, 8897, 3558, 1330, 19390, 198, 6738, 3491, 21348, 13, 16733, 274, 1330, 19449, 31077, 198, 198, 6738, 12351, 13, 18211, 13, 74, 907, 13, 1891, 437, 13, 3642, 36667, 13, 4...
3.611842
152
import os, sys sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from treeds import * if __name__ == "__main__": test_tree_plot()
[ 11748, 28686, 11, 25064, 198, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 705, 492, 6, 4008, 198, 6738, 2054, 5379, 1330, 1635, 198, 198, 361, 11593, 367...
2.42623
61
from flask import Flask from flask_dropzone import Dropzone from flask_uploads import UploadSet, configure_uploads, IMAGES, patch_request_class import os app = Flask(__name__) dropzone = Dropzone(app) app.config['SECRET_KEY'] = 'supersecretkeygoeshere' # Dropzone settings app.config['DROPZONE_UPLOAD_MULTIPLE'] = ...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 14781, 11340, 1330, 14258, 11340, 198, 6738, 42903, 62, 39920, 1330, 36803, 7248, 11, 17425, 62, 39920, 11, 45325, 11, 8529, 62, 25927, 62, 4871, 198, 198, 11748, 28686, 198, 198, 1324, 79...
2.831978
369
from player_chair import *
[ 6738, 2137, 62, 16337, 1330, 1635, 198 ]
3.857143
7
import Nodes.Statements.Iterative.DoWhile def p_do_while_01(p): "iterative_statement : DO compound_statement WHILE LEFT_PAREN expression RIGHT_PAREN" p[0] = Nodes.Statements.Iterative.DoWhile.Node(p[5], p[2]) def p_do_while_02(p): "iterative_statement : DO compound_statement WHILE LEFT_PAREN expression ...
[ 11748, 399, 4147, 13, 17126, 3196, 13, 29993, 876, 13, 5211, 3633, 628, 198, 4299, 279, 62, 4598, 62, 4514, 62, 486, 7, 79, 2599, 198, 220, 220, 220, 366, 2676, 876, 62, 26090, 1058, 8410, 13061, 62, 26090, 7655, 41119, 12509, 9792,...
2.522648
287
import sys import pandas as pd import xlrd from mem_leak_detection import Precog sys.path.append('../') from datetime import timedelta
[ 11748, 25064, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2124, 75, 4372, 198, 6738, 1066, 62, 293, 461, 62, 15255, 3213, 1330, 28737, 519, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 11537, 198, 6738, 4818, 8079, 1330, 28805, ...
3.162791
43
# GENERATED BY KOMAND SDK - DO NOT EDIT from .add_user_to_group.action import AddUserToGroup from .add_user_to_groups_by_id.action import AddUserToGroupsById from .create_user.action import CreateUser from .disable_user_account.action import DisableUserAccount from .enable_user_account.action import EnableUserAccount f...
[ 2, 24700, 1137, 11617, 11050, 509, 2662, 6981, 26144, 532, 8410, 5626, 48483, 198, 6738, 764, 2860, 62, 7220, 62, 1462, 62, 8094, 13, 2673, 1330, 3060, 12982, 2514, 13247, 198, 6738, 764, 2860, 62, 7220, 62, 1462, 62, 24432, 62, 1525,...
3.438776
196
from rest_framework import serializers from allies.models import Ally
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 7681, 13, 27530, 1330, 43039, 628, 198 ]
4.294118
17
# Copyright (c) 2013 Bull. # # 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, sof...
[ 2, 15069, 357, 66, 8, 2211, 8266, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921...
3.679825
228
textures = itk.coocurrence_texture_features_image_filter(image, mask_image=mask, number_of_bins_per_axis=10, histogram_minimum=0, ...
[ 5239, 942, 796, 340, 74, 13, 1073, 420, 33928, 62, 41293, 62, 40890, 62, 9060, 62, 24455, 7, 9060, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.515
400
# Source : https://leetcode.com/problems/lru-cache/ # Author : zheyuuu # Date : 2020-07-19 ##################################################################################################### # # Design and implement a data structure for Least Recently Used (LRU) cache. It should support the # following operation...
[ 2, 8090, 1058, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 75, 622, 12, 23870, 14, 198, 2, 6434, 1058, 1976, 20342, 12303, 84, 198, 2, 7536, 220, 220, 1058, 12131, 12, 2998, 12, 1129, 198, 198, 29113, 29113, 29113, 4...
3.240506
395
from enum import IntEnum, unique @unique
[ 6738, 33829, 1330, 2558, 4834, 388, 11, 3748, 628, 198, 31, 34642, 198 ]
3.307692
13
import pytest from evalml.automl import AutoMLSearch from evalml.pipelines.components.transformers import ReplaceNullableTypes from evalml.problem_types import ProblemTypes, is_time_series @pytest.mark.parametrize("input_type", ["pd", "ww"]) @pytest.mark.parametrize("automl_algorithm", ["iterative", "default"]) @pyt...
[ 11748, 12972, 9288, 198, 198, 6738, 5418, 4029, 13, 2306, 296, 75, 1330, 11160, 5805, 18243, 198, 6738, 5418, 4029, 13, 79, 541, 20655, 13, 5589, 3906, 13, 35636, 364, 1330, 40177, 35067, 540, 31431, 198, 6738, 5418, 4029, 13, 45573, ...
2.50289
346
#!/usr/bin/env python3 import sys import os.path target_disk_image, bootloader = sys.argv[1:] ext = os.path.splitext(target_disk_image)[-1].lower() assert(ext in (".dsk", ".do", ".po", ".2mg")) if ext == ".2mg": offset = 64 else: offset = 0 with open(bootloader, 'rb') as f: boot = f.read() assert(len(boot...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 11748, 28686, 13, 6978, 198, 198, 16793, 62, 39531, 62, 9060, 11, 6297, 29356, 796, 25064, 13, 853, 85, 58, 16, 47715, 198, 2302, 796, 28686, 13, 6978, 13...
2.405797
207
import numpy as np import pandas as pd from scipy import stats from statsmodels.tsa.api import VAR from .util import context from forecaster import retriever, timeseries df = retriever.get_data('bitcoin') start_date = pd.to_datetime('2013-12-01') end_date = pd.to_datetime('2016-02-01') mask = (df.index.values > st...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 629, 541, 88, 1330, 9756, 198, 6738, 9756, 27530, 13, 912, 64, 13, 15042, 1330, 569, 1503, 198, 198, 6738, 764, 22602, 1330, 4732, 198, 198, 6738, 1674, ...
3.051898
1,291
import socket import subprocess import sys from datetime import datetime subprocess.call('clear', shell=True) remoteServer = input("enter remote host to start scan: ") remoteServerIp = socket.gethostbyname(remoteServer) print("-" * 60) print("please wait, scanning remote host", remoteServerIp) print("-" * 60) t1 = ...
[ 11748, 17802, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 6738, 4818, 8079, 1330, 4818, 8079, 628, 198, 7266, 14681, 13, 13345, 10786, 20063, 3256, 7582, 28, 17821, 8, 198, 198, 47960, 10697, 796, 5128, 7203, 9255, 6569, 2583, 284, ...
2.737805
328
# 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 may ...
[ 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, 5964, 1321, 13, 19...
2.645208
6,897
from ..service import Service from ..exception import AppwriteException
[ 6738, 11485, 15271, 1330, 4809, 198, 6738, 11485, 1069, 4516, 1330, 2034, 13564, 16922, 198 ]
4.8
15
# -*- coding: utf-8 -*- """Main module.""" import suitable def apply(api: suitable.api.Api, config: dict, quiet: bool = False) -> dict: """ installs dnsmasq """ results = dict() results['pacman'] = api.pacman(name='dnsmasq', state='present') if 'dnsmasq_conf' in config.keys(): results['dns...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 13383, 8265, 526, 15931, 198, 198, 11748, 11080, 628, 198, 4299, 4174, 7, 15042, 25, 11080, 13, 15042, 13, 32, 14415, 11, 4566, 25, 8633, 11, 5897, 25, 205...
2.185714
350
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest from . import hello if '__main__' == __name__: unittest.main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 555, 715, 395, 198, 198, 6738, 764, 1330, 23748, 628, 198, 198, 361, 705, 834, 12417, 834, 6, 6624, ...
2.293103
58
import struct from spherov2.listeners.async_ import CollisionDetected from spherov2.listeners.core import PowerStates
[ 11748, 2878, 198, 198, 6738, 599, 11718, 85, 17, 13, 4868, 36014, 13, 292, 13361, 62, 1330, 7778, 1166, 11242, 11197, 198, 6738, 599, 11718, 85, 17, 13, 4868, 36014, 13, 7295, 1330, 4333, 42237, 628 ]
3.333333
36
from amadeus import Client, ResponseError amadeus = Client() try: ''' What's the airline name for the IATA code BA? ''' response = amadeus.reference_data.airlines.get(airlineCodes='BA') # print(response.data) except ResponseError as error: raise error
[ 6738, 716, 671, 385, 1330, 20985, 11, 18261, 12331, 198, 198, 321, 671, 385, 796, 20985, 3419, 198, 198, 28311, 25, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 1867, 338, 262, 18091, 1438, 329, 262, 314, 13563, 2438, 23715, 3...
2.78
100
from itertools import islice from django.core import mail from django.contrib.auth import get_user_model from django.contrib.gis.geos import Polygon, Point from djmoney.money import Money from rest_framework.test import APITestCase from api.models import Contact, Pricing, Product, PricingGeometry, Order, OrderItem, Ord...
[ 6738, 340, 861, 10141, 1330, 318, 75, 501, 198, 6738, 42625, 14208, 13, 7295, 1330, 6920, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 70, 271, 13, 46...
3.203008
133
import argparse import numpy as np import os import random from lm_eval import tasks from lm_eval.utils import join_iters EXAMPLE_DIVIDER = "!!@@##@@!! -- Example {i}\n" if __name__ == "__main__": main()
[ 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 4738, 198, 6738, 300, 76, 62, 18206, 1330, 8861, 198, 6738, 300, 76, 62, 18206, 13, 26791, 1330, 4654, 62, 270, 364, 198, 198, 6369, 2390, 16437, 6...
2.730769
78