content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from .HyperclassifierSearch import HyperclassifierSearch # module level doc-string __doc__ = """ HyperclassifierSearch allows to train multiple classifiers/pipelines in Python with GridSearchCV or RandomizedSearchCV. """
[ 6738, 764, 38197, 4871, 7483, 18243, 1330, 15079, 4871, 7483, 18243, 198, 198, 2, 8265, 1241, 2205, 12, 8841, 198, 834, 15390, 834, 796, 37227, 198, 38197, 4871, 7483, 18243, 3578, 284, 4512, 3294, 1398, 13350, 14, 79, 541, 20655, 287, ...
4.036364
55
from lxml import etree from dm_control.utils import xml_tools from stl import mesh import numpy as np from scipy.spatial.transform import Rotation as R from copy import deepcopy import os import sys import csv from tendon_routing import configs, reserve if __name__ == "__main__": main(*sys.argv[1:])
[ 6738, 300, 19875, 1330, 2123, 631, 198, 6738, 288, 76, 62, 13716, 13, 26791, 1330, 35555, 62, 31391, 198, 6738, 336, 75, 1330, 19609, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 2777, 34961, 13, 35636, 1330, 371, ...
3.04902
102
#!/usr/bin/python3 # -*- coding: UTF-8 -*- import re import sys, getopt import glob import os import json if __name__ == "__main__": main(sys.argv[1:])
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 11748, 302, 198, 11748, 25064, 11, 651, 8738, 198, 11748, 15095, 198, 11748, 28686, 198, 11748, 33918, 628, 628, 628, 62...
2.352113
71
# 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 under the Apache License, Version 2.0 # (the "License"); you may not use ...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 393, 517, 198, 2, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 9387, 351, 198, 2, 428, 670, 329, 3224, 1321, 5115, 6634, 9238, 13, 198, 2, 383, 7054, 37, ...
3.372493
349
""" Validator test cases 1) Valid schema and data 2) Valid schema, invalid string 3) Valid schema, invalid number 4) Invalid schema, no data """ import os import sys sys.path.insert(1, os.path.join(sys.path[0], '..')) import newidydd test_operator_validator_case_one() test_operator_validator_case_two() tes...
[ 37811, 198, 47139, 1352, 1332, 2663, 198, 198, 16, 8, 48951, 32815, 290, 1366, 198, 17, 8, 48951, 32815, 11, 12515, 4731, 198, 18, 8, 48951, 32815, 11, 12515, 1271, 198, 19, 8, 17665, 32815, 11, 645, 1366, 198, 37811, 198, 198, 1174...
2.931034
145
from conans import ConanFile, CMake, tools
[ 6738, 369, 504, 1330, 31634, 8979, 11, 327, 12050, 11, 4899, 198 ]
3.583333
12
# MIT License # (C) Copyright 2021 Hewlett Packard Enterprise Development LP. # # rbacAssignment : RBAC: Get, Add, Update, Delete assignments def get_rbac_assignments(self) -> dict: """Get all rbac assignments .. list-table:: :header-rows: 1 * - Swagger Section - Method -...
[ 2, 17168, 13789, 198, 2, 357, 34, 8, 15069, 33448, 30446, 15503, 6400, 446, 14973, 7712, 18470, 13, 198, 2, 198, 2, 374, 65, 330, 8021, 16747, 1058, 17986, 2246, 25, 3497, 11, 3060, 11, 10133, 11, 23520, 25815, 628, 198, 4299, 651, ...
2.399835
1,213
import contextlib import inspect import os @contextlib.contextmanager def switch_curdir(path): """Context manager to temproary switch current dir""" prev_path = os.path.abspath('.') try: try: os.chdir(path) except FileNotFoundError: pass yield finally:...
[ 11748, 4732, 8019, 198, 11748, 10104, 198, 11748, 28686, 628, 628, 198, 31, 22866, 8019, 13, 22866, 37153, 198, 4299, 5078, 62, 66, 2799, 343, 7, 6978, 2599, 198, 220, 220, 220, 37227, 21947, 4706, 284, 2169, 1676, 560, 5078, 1459, 26...
2.237179
156
#!/usr/bin/env python # encoding: utf-8 import subprocess word="Apotheek" stdout, stderr = subprocess.Popen( ['cowsay', word]).communicate() word="Is dat alles?" stdout, stderr = subprocess.Popen( ['cowsay', '-f', 'vader-koala', word]).communicate() word="Ja. Mevrouw, mag ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 11748, 850, 14681, 628, 198, 4775, 2625, 32, 13059, 258, 988, 1, 198, 19282, 448, 11, 336, 1082, 81, 796, 850, 14681, 13, 47, 9654, 7, 1...
2.122768
2,240
# Copyright 2019 Silverbackhq # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
[ 2, 15069, 13130, 7698, 1891, 71, 80, 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.785
200
n = int(input()) inp = [] inp.append(input()) inp.append(input()) if inp[0] < inp[1]: order = 0 else: order = 1 flag = 0 for i in range(n-2): j = input() if order == 0: if inp[i+1] > j: flag = 1 break else: if inp[i+1] < j: flag = 1 ...
[ 77, 796, 493, 7, 15414, 28955, 201, 198, 259, 79, 796, 17635, 201, 198, 259, 79, 13, 33295, 7, 15414, 28955, 201, 198, 259, 79, 13, 33295, 7, 15414, 28955, 201, 198, 361, 287, 79, 58, 15, 60, 1279, 287, 79, 58, 16, 5974, 1502, ...
1.736842
266
#!/usr/bin/env python # encoding: utf-8 """ @author: jension @license: Node Supply Chain Manager Corporation Limited. @contact: 1490290160@qq.com @software: garner @file: idaxRestClient.py @time: 2019/3/25 17:42 @desc: """ import requests import hashlib import hmac import idax.idaxConst as idaxConst """idax rest Requ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 37811, 198, 31, 9800, 25, 474, 3004, 198, 31, 43085, 25, 19081, 22663, 21853, 9142, 10501, 15302, 13, 198, 31, 32057, 25, 1478, 3829, 1959, 486, ...
2.913043
115
EXPECTED_BAKE_TIME = 40 PREPARATION_TIME = 2 def bake_time_remaining(elapsed_bake_time): """Calculate the bake time remaining. :param elapsed_bake_time: int baking time already elapsed. :return: int remaining bake time derived from 'EXPECTED_BAKE_TIME'. Function that takes the actual minutes the las...
[ 49864, 9782, 1961, 62, 4339, 7336, 62, 34694, 796, 2319, 198, 46437, 27082, 6234, 62, 34694, 796, 362, 628, 198, 4299, 28450, 62, 2435, 62, 2787, 1397, 7, 417, 28361, 62, 65, 539, 62, 2435, 2599, 198, 220, 220, 220, 37227, 9771, 312...
3.129252
441
import pandas as pd import cv2 import numpy as np import random import matplotlib.pyplot as plt # crop_scale(cv2.imread("/home/slickmind/lanefollowing/ros2_ws/src/lane_following/bumblebee/images/center-2021-05-05T19:45:42.285457.jpg"))
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 269, 85, 17, 220, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628, 628, 198, 198, 2, 13833, 62, 9888, 7, 33967, 17,...
2.469388
98
## Extract the Spectral Bandwidth from an audio file from librosa.feature import spectral_bandwidth from librosa.util import example_audio_file import numpy as np import librosa ## Extraction function ## If this file is run stand-alone, test the extraction against the example audio file if __name__ == "__main__": ...
[ 2235, 29677, 262, 13058, 1373, 10243, 10394, 422, 281, 6597, 2393, 198, 198, 6738, 9195, 4951, 64, 13, 30053, 1330, 37410, 62, 3903, 10394, 198, 6738, 9195, 4951, 64, 13, 22602, 1330, 1672, 62, 24051, 62, 7753, 198, 11748, 299, 32152, ...
3.292683
123
import asyncio from datetime import datetime, timedelta from unittest import mock import json import subprocess import botocore.exceptions import pytest from dateutil.tz import tzlocal from aiobotocore.session import AioSession from aiobotocore import credentials from tests.boto_tests.test_credentials import full_url...
[ 11748, 30351, 952, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 555, 715, 395, 1330, 15290, 198, 11748, 33918, 198, 11748, 850, 14681, 198, 198, 11748, 10214, 420, 382, 13, 1069, 11755, 198, 11748, 12972, 9288, ...
2.517745
479
from ..TemplateProcedure import TemplateProcedure class _Text(object): """ Basic image sequence functions. """ @staticmethod def upper(string): """ Return string coverted to upper case. """ return str(string).upper() @staticmethod def lower(string): ...
[ 6738, 11485, 30800, 2964, 771, 495, 1330, 37350, 2964, 771, 495, 198, 198, 4871, 4808, 8206, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 14392, 2939, 8379, 5499, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, ...
2.560811
444
from SDLInput import SDLInput import xml.etree.ElementTree as ElementTree
[ 6738, 45417, 20560, 1330, 45417, 20560, 198, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 11703, 27660, 628 ]
3.8
20
import random as random import numpy as np from dynamics import Simulator, Pursuer, Evader test_evader()
[ 11748, 4738, 355, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 17262, 1330, 13942, 11, 34089, 15573, 11, 4319, 5067, 198, 198, 9288, 62, 1990, 5067, 3419, 198 ]
3.655172
29
#!/usr/bin/env python3 import os import sys filename = sys.argv[1] os.system("javac " + filename) os.system("java " + os.path.splitext(filename)[0].title())
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 34345, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 418, 13, 10057, 7203, 73, 615, 330, 366, 1343, 29472, 8, 198, 418, 13, 10057, 7...
2.564516
62
# Copyright 1996-2019 Cyberbotics Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
[ 2, 15069, 8235, 12, 23344, 15101, 13645, 873, 12052, 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, ...
1.891689
2,659
#!/usr/bin/env python3 import pytest import time import re import py @pytest.fixture @pytest.mark.xfail def test_issue49(smk_runner, issue49): """https://github.com/Snakemake-Profiles/slurm/issues/49 Cancelling a slurm job leaves an incomplete file that causes Snakemake to incorrectly state that there i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 12972, 9288, 198, 11748, 640, 198, 11748, 302, 198, 11748, 12972, 198, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198, 31, 9078, 9288, 13, 4102, 13, 26152, 603, 198, 4299, 13...
2.555263
380
import os import traceback import discord import time import asyncio import sys # 自分のBotのアクセストークンに置き換えてください TOKEN = os.environ['DISCORD_BOT_TOKEN'] intents = discord.Intents.default() intents.members = True client = discord.Client(intents=intents) #ユーザがリアクションをつけた時、対応する役職を付与(生存、幽霊) @client.event # Botの起動とDiscordサーバ...
[ 11748, 28686, 198, 11748, 12854, 1891, 198, 11748, 36446, 198, 11748, 640, 198, 11748, 30351, 952, 198, 11748, 25064, 628, 198, 2, 5525, 229, 103, 26344, 228, 5641, 20630, 5641, 11839, 14099, 47271, 43302, 42869, 6527, 28618, 163, 121, 10...
1.758974
195
import os, sys import numpy as np import random import torch import torch.autograd as autograd import torch.optim as optim import torch.utils.data as data import torchvision.transforms as transforms import torchvision.datasets as datasets from torch.utils.data.sampler import SubsetRandomSampler #from torchsummary impor...
[ 11748, 28686, 11, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 11748, 28034, 198, 11748, 28034, 13, 2306, 519, 6335, 355, 1960, 519, 6335, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 28034, 13, 26791, 13, 7...
3.474419
215
# coding=utf-8 from os import path import unittest from pyprobe.sensors.appleraid.sensor_appleraid import AppleRaidSensor from utils import Platform __author__ = 'Dirk Dittert' FAKE_UTIL = path.join(path.dirname(__file__), 'diskutil.py')
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 28686, 1330, 3108, 198, 11748, 555, 715, 395, 198, 198, 6738, 12972, 1676, 1350, 13, 82, 641, 669, 13, 1324, 1754, 1698, 13, 82, 22854, 62, 1324, 1754, 1698, 1330, 4196, 49043, 47864, 198, 673...
2.75
88
import os from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QDockWidget, QLabel from PyQt5.uic import loadUi # print(os.path.dirname(__file__))
[ 11748, 28686, 198, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 33734, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 35, 735, 38300, 11, 1195, 33986, 198, 6738, 9485, 48, 83, 20, 13, 84, 291, 1330...
2.333333
66
# -*- coding: utf-8 -*- from distutils.core import setup setup( name='multiworker', version='0.1.2', description='Abstraction for a threading multiworker job processor.', author='David Rios', author_email='david.rios.gomes@gmail.com', py_modules=['multiworker'], )
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 41684, 28816, 3256, 198, 220, 220, 220, 2196, 11639, 15, 13, 16, 13, 17, ...
2.589286
112
# Sieve taken from Stack Overflow somewhere # Solves in about 20-30 seconds, so more than enough time for a worse sieve. def primes2(n): """ Input n>=6, Returns a list of primes, 2 <= p < n """ n, correction = n-n%6+6, 2-(n%6>1) sieve = [True] * (n/3) for i in xrange(1,int(n**0.5)/3+1): if sieve...
[ 2, 311, 12311, 2077, 422, 23881, 3827, 11125, 7382, 198, 2, 4294, 1158, 287, 546, 1160, 12, 1270, 4201, 11, 523, 517, 621, 1576, 640, 329, 257, 4785, 264, 12311, 13, 220, 198, 198, 4299, 778, 999, 17, 7, 77, 2599, 198, 220, 220, ...
1.774799
373
"""Feature storages for PyTorch tensors.""" import torch from .base import FeatureStorage, register_storage_wrapper @register_storage_wrapper(torch.Tensor) class TensorStorage(FeatureStorage): """Feature storages for slicing a PyTorch tensor."""
[ 37811, 38816, 336, 273, 1095, 329, 9485, 15884, 354, 11192, 669, 526, 15931, 198, 198, 11748, 28034, 198, 6738, 764, 8692, 1330, 27018, 31425, 11, 7881, 62, 35350, 62, 48553, 198, 198, 31, 30238, 62, 35350, 62, 48553, 7, 13165, 354, 1...
3.405405
74
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author : ZhaoYY #pylint: disable=invalid-name ''' problems about int. ''' class IntProblem: ''' int problems ''' def isPalindrome(self, x): """ :type x: int :rtype: bool """ if x > 0 and x % 10 == 0: ...
[ 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, 13838, 220, 1058, 29436, 26314, 198, 2, 79, 2645, 600, 25, 15560, 28, 259, 12102, 12, 3672, 198, 198, 7061, ...
1.646419
1,103
import unittest from dojo import Robot if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 466, 7639, 1330, 16071, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419 ]
2.71875
32
import httpx
[ 11748, 2638, 87, 628 ]
3.5
4
import asyncio import logging from pathlib import Path from typing import Optional from edgedb import AsyncIOConnection, async_connect from app import crud, schemas from app.config import settings logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) max_tries = 60 * 5 # 5 minutes wait_secon...
[ 11748, 30351, 952, 198, 11748, 18931, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 45871, 65, 1330, 1081, 13361, 9399, 32048, 11, 30351, 62, 8443, 198, 198, 6738, 598, 1330, 1067, 463, 11, 3897, 535...
3.113821
123
### This file can't be used on its own (see e.g. lissom_or_reference) ### NOTE: c++ lissom does not output unsituated weights, so a function ### in lissom_log_parser guesses how to unsituate the weights. If your ### weights contains rows or columns of zeros, this guessing will fail. from topo.tests.reference.lissom_l...
[ 21017, 770, 2393, 460, 470, 307, 973, 319, 663, 898, 357, 3826, 304, 13, 70, 13, 300, 747, 296, 62, 273, 62, 35790, 8, 198, 198, 21017, 24550, 25, 269, 4880, 300, 747, 296, 857, 407, 5072, 5576, 270, 6605, 19590, 11, 523, 257, 2...
2.246973
413
from .nicemessages import NiceMessages
[ 6738, 764, 6988, 368, 408, 1095, 1330, 18460, 36479, 1095, 198 ]
3.545455
11
# import scipy.io as sio # import torch # import numpy as np # data_path = './data/movie_ml_amazon_vali.mat' # mat_contents = sio.loadmat(data_path) # target_train_m = np.float32(mat_contents['movie_2_Xt'].toarray()) # source_train_m = np.float32(mat_contents['movie_1_Xt'].toarray()) # num_user_target, num_item_targ...
[ 2, 1330, 629, 541, 88, 13, 952, 355, 264, 952, 198, 2, 1330, 28034, 198, 2, 1330, 299, 32152, 355, 45941, 198, 198, 2, 1366, 62, 6978, 796, 705, 19571, 7890, 14, 41364, 62, 4029, 62, 33103, 62, 2100, 72, 13, 6759, 6, 198, 198, ...
2.413429
2,934
import pytest @pytest.fixture(scope="package")
[ 11748, 12972, 9288, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 29982, 2625, 26495, 4943, 198 ]
2.882353
17
from backtrader.comminfo import CommInfoBase
[ 6738, 736, 2213, 5067, 13, 785, 1084, 6513, 1330, 1520, 12360, 14881, 628 ]
3.538462
13
import typing import sys main()
[ 11748, 19720, 220, 198, 11748, 25064, 220, 628, 198, 198, 12417, 3419 ]
3
12
from so_pip.models.code_block_from_text import find_code_blocks
[ 6738, 523, 62, 79, 541, 13, 27530, 13, 8189, 62, 9967, 62, 6738, 62, 5239, 1330, 1064, 62, 8189, 62, 27372, 628, 628, 198 ]
2.833333
24
#!/usr/bin/env python # coding: utf-8 # In[1]: import gmplot import webbrowser import time from selenium import webdriver from gtts import gTTS from pygame import mixer # In[ ]: import socket import time import pickle import webbrowser import time from selenium import webdriver Violent_mappings=[] IP = "127.0...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 16, 5974, 628, 198, 11748, 308, 76, 29487, 220, 198, 11748, 3992, 40259, 198, 11748, 640, 198, 6738, 384, 11925, 1505, 1330, 3...
2.02139
748
from django.shortcuts import get_object_or_404 from rest_framework import generics from rest_framework import status from rest_framework.views import Response, APIView from common.views import AuditableDetailViewMixin from common.utilities import CustomRetrieveUpdateDestroyView from ..models import ( FacilitySer...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 198, 198, 6738, 1334, 62, 30604, 1330, 1152, 873, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 13, 33571, 1330, 18261, 11, 3486, 38...
3.319484
1,396
"""Base Verifier class.""" from abc import ABC class BaseVerifier(ABC): """Base class for verifier.""" def __repr__(self) -> str: """ Return a human readable representation of this class. Returns: A human readable string for this class """ return "<{}>"....
[ 37811, 14881, 4643, 7483, 1398, 526, 15931, 198, 198, 6738, 450, 66, 1330, 9738, 628, 198, 4871, 7308, 13414, 7483, 7, 24694, 2599, 198, 220, 220, 220, 37227, 14881, 1398, 329, 3326, 7483, 526, 15931, 628, 220, 220, 220, 825, 11593, 2...
2.496454
141
#!/usr/bin/env python3 # Copyright 2010 Joao Henriques <jotaf (no spam) at hotmail dot com>. # # This file is part of name-gen. # # name-gen is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either versi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 3050, 5302, 5488, 44485, 13281, 1279, 73, 313, 1878, 357, 3919, 18084, 8, 379, 3024, 4529, 16605, 401, 28401, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 1438, 12, ...
1.707374
248,180
import os import sys # add directory of this file to PATH, so that the package will be found sys.path.append(os.path.dirname(os.path.realpath(__file__))) __title__ = 'library_api_pgoapi' __commit__ = '06eaef1e0353d17f775f2d1765d6281a05be7654' __commit_tree__ = 'https://github.com/keyphact/pgoapi/tree/06eaef1e0353d1...
[ 198, 11748, 28686, 198, 11748, 25064, 198, 198, 2, 751, 8619, 286, 428, 2393, 284, 46490, 11, 523, 326, 262, 5301, 481, 307, 1043, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 697...
2.44086
186
""" Class FDR Description: The FDR process is: 1. Sort B* list by p-value 2. Add new property FDR where FDR = 0.1 * index of the ranked SNP / (count of SNPs in the file / 2) 3*. FDR can be changed... 0.1 above is FDR of 10 and 0.05 is FDR 5 Editing thoughts for later: this class contains only one method....
[ 37811, 198, 9487, 47700, 198, 198, 11828, 25, 220, 198, 464, 47700, 1429, 318, 25, 198, 220, 220, 220, 352, 13, 33947, 347, 9, 1351, 416, 279, 12, 8367, 198, 220, 220, 220, 362, 13, 3060, 649, 3119, 47700, 810, 47700, 796, 657, 13...
3.160221
181
from picamera import PiCamera from time import sleep import requests import os import cloudinary import cloudinary.uploader import cloudinary.api import uuid cloudinary.config( cloud_name = 'dd9pexjam', api_key = '918125125257855', api_secret = '76rlNYHk0okgqUp7yX7n_nbe950' ) camera = PiCamera() #camera....
[ 6738, 8301, 18144, 1330, 13993, 35632, 198, 6738, 640, 1330, 3993, 198, 11748, 7007, 198, 11748, 28686, 198, 11748, 6279, 3219, 198, 11748, 6279, 3219, 13, 25850, 263, 198, 11748, 6279, 3219, 13, 15042, 198, 11748, 334, 27112, 198, 198, ...
2.147959
588
# ------------------------------------------------------------------------------------- # AutoLoc: Weakly-supervised Temporal Action Localization in Untrimmed Videos. ECCV'18. # Authors: Zheng Shou, Hang Gao, Lei Zhang, Kazuyuki Miyazawa, Shih-Fu Chang. # ----------------------------------------------------------------...
[ 2, 16529, 19351, 12, 198, 2, 11160, 33711, 25, 28788, 306, 12, 16668, 16149, 5825, 35738, 7561, 10714, 1634, 287, 26970, 3036, 1150, 18637, 13, 412, 4093, 53, 6, 1507, 13, 198, 2, 46665, 25, 44583, 911, 280, 11, 24300, 402, 5488, 11...
2.382544
3,082
from main import app from main import get_current_user from fastapi.testclient import TestClient class AuthBypasser: """AuthBypasser Class for testing.""" def __init__(self): """Testing data to show is authenticated.""" self.user_id = "is authenticated" def auth_bypass(): """ Mock a...
[ 6738, 1388, 1330, 598, 198, 6738, 1388, 1330, 651, 62, 14421, 62, 7220, 198, 6738, 3049, 15042, 13, 9288, 16366, 1330, 6208, 11792, 628, 198, 4871, 26828, 3886, 6603, 263, 25, 198, 220, 220, 220, 37227, 30515, 3886, 6603, 263, 5016, 3...
2.98044
409
#!/usr/bin/env python """ For CILP analysis, there are three steps of trimming 1. trim 3' adapter 2. cut inline-barcode 3. collapse (optional, if randomer exists) There are 3 types of CLIP library structures: 1. NSR: a. trim 3' adapter b. cut 7-nt at both 5' and 3' ends c. collapse (optional) 2. eCLIP: (...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 1890, 327, 4146, 47, 3781, 11, 612, 389, 1115, 4831, 286, 15797, 2229, 198, 16, 13, 15797, 513, 6, 21302, 198, 17, 13, 2005, 26098, 12, 65, 5605, 1098, 198, 18, 13, 980...
1.826016
14,737
words = ['a', 'b', 'ba', 'bca', 'bcad'] print(longest_chain(words))
[ 628, 198, 10879, 796, 37250, 64, 3256, 705, 65, 3256, 705, 7012, 3256, 705, 65, 6888, 3256, 705, 15630, 324, 20520, 198, 4798, 7, 6511, 395, 62, 7983, 7, 10879, 4008, 220 ]
2.21875
32
# Copyright 2021 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from commonconf.exceptions import NotConfigured
[ 2, 15069, 33448, 33436, 12, 2043, 11, 2059, 286, 2669, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 6738, 2219, 10414, 13, 1069, 11755, 1330, 1892, 16934, 1522, 628, 198 ]
3.538462
39
#!/usr/bin/env python # _*_ coding: utf-8 _*_ # ================================ # ================================
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 4808, 9, 62, 19617, 25, 3384, 69, 12, 23, 4808, 9, 62, 201, 198, 201, 198, 2, 36658, 25609, 18604, 201, 198, 2, 36658, 25609, 18604, 201, 198 ]
3.128205
39
# Copyright (c) OpenMMLab. All rights reserved. from mmocr.models.builder import RECOGNIZERS from .encode_decode_recognizer import EncodeDecodeRecognizer @RECOGNIZERS.register_module() class SARNet(EncodeDecodeRecognizer): """Implementation of `SAR <https://arxiv.org/abs/1811.00751>`_"""
[ 2, 15069, 357, 66, 8, 4946, 44, 5805, 397, 13, 1439, 2489, 10395, 13, 198, 6738, 8085, 1696, 13, 27530, 13, 38272, 1330, 19644, 7730, 45, 14887, 4877, 198, 6738, 764, 268, 8189, 62, 12501, 1098, 62, 26243, 7509, 1330, 2039, 8189, 10...
2.809524
105
from django.contrib import admin from core.models import Sample admin.site.register(Sample)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 4755, 13, 27530, 1330, 27565, 198, 198, 28482, 13, 15654, 13, 30238, 7, 36674, 8, 198 ]
3.576923
26
description = 'PLCs analog inputs' group = 'optional' tango_base = 'tango://phys.j-nse.frm2:10000/j-nse/' devices = dict( coil_monitor = device('nicos.devices.tango.Sensor', description = 'Voltage from coil', tangodevice = tango_base + 'datalogger/plc_analog1', pollinterval = 10, ...
[ 11213, 796, 705, 47, 5639, 82, 15075, 17311, 6, 198, 198, 8094, 796, 705, 25968, 6, 198, 198, 83, 14208, 62, 8692, 796, 705, 83, 14208, 1378, 34411, 13, 73, 12, 77, 325, 13, 8310, 76, 17, 25, 49388, 14, 73, 12, 77, 325, 14, 6,...
2.054435
2,131
# https://leetcode.com/problems/invalid-transactions/ # Easy (22.83%) # Total Accepted: 2,216 # Total Submissions: 9,708 # beats 100.0% of python submissions
[ 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 259, 12102, 12, 7645, 4658, 14, 198, 2, 16789, 357, 1828, 13, 5999, 4407, 198, 2, 7472, 21699, 276, 25, 220, 220, 220, 362, 11, 20666, 198, 2, 7472, 3834, 8481, 25, 86...
2.793103
58
import sys import logging import optparse from os.path import basename from collections import OrderedDict #import Levenshtein import numpy import re logger = logging.getLogger(__name__) logging.basicConfig(format='%(asctime)s: %(levelname)s: %(message)s') wpunc = re.compile('([^\w\s{}]$|^["])') sattr = re.compile('^...
[ 11748, 25064, 198, 11748, 18931, 198, 11748, 2172, 29572, 198, 6738, 28686, 13, 6978, 1330, 1615, 12453, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 2, 11748, 1004, 574, 1477, 22006, 198, 11748, 299, 32152, 198, 11748, 302, 198, ...
2.470238
168
# -*- coding: utf-8 -*- import pycv2 face_patterns = pycv2.CascadeClassifier( 'C:/Users/Administrator/Downloads/opencv/build/etc/haarcascades/haarcascade_frontalface_default.xml') sample_image = pycv2.imread('C:/Users/Administrator/Desktop/123.jpg') faces = face_patterns.detectMultiScale(sample_image,scaleFactor...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 12972, 33967, 17, 198, 198, 2550, 62, 33279, 82, 796, 12972, 33967, 17, 13, 34, 28966, 9487, 7483, 7, 198, 220, 220, 220, 705, 34, 14079, 14490, 14, 41862, 1239...
2.460829
217
from flask import Flask from app import myapp app = Flask(__name__) app.register_blueprint(myapp) if __name__ == '__main__': app.run(debug=True)
[ 6738, 42903, 1330, 46947, 201, 198, 6738, 598, 1330, 616, 1324, 201, 198, 201, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 201, 198, 1324, 13, 30238, 62, 17585, 4798, 7, 1820, 1324, 8, 201, 198, 201, 198, 201, 198, 201, 198, 361,...
2.439394
66
""" drfobserver.decorators ~~~~~~~~~~~~~~~~~~~~~~ DRF object field decorators to support an extremely simplistic observer pattern. """ __all__ = ('observer',) def observer(*fields): """ Observer decorator The `observer` decorator takes `*args` which represent django field names that sh...
[ 37811, 198, 220, 220, 220, 1553, 69, 672, 15388, 13, 12501, 273, 2024, 198, 220, 220, 220, 220, 27156, 8728, 4907, 628, 220, 220, 220, 10560, 37, 2134, 2214, 11705, 2024, 284, 1104, 281, 4457, 35010, 198, 220, 220, 220, 22890, 3912, ...
3.059748
318
import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) # Input data files are available in the read-only "../input/" directory # For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory import os for di...
[ 11748, 299, 32152, 355, 45941, 1303, 14174, 37139, 201, 198, 11748, 19798, 292, 355, 279, 67, 1303, 1366, 7587, 11, 44189, 2393, 314, 14, 46, 357, 68, 13, 70, 13, 279, 67, 13, 961, 62, 40664, 8, 201, 198, 201, 198, 2, 23412, 1366,...
2.369393
1,137
# Creative Commons Legal Code # # CC0 1.0 Universal # # CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE # LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN # ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS # INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMON...
[ 2, 17404, 13815, 16027, 6127, 198, 2, 198, 2, 12624, 15, 352, 13, 15, 14499, 198, 2, 198, 2, 220, 220, 220, 220, 29244, 37045, 22240, 19213, 23929, 44680, 6234, 3180, 5626, 317, 38675, 23703, 44, 5357, 38359, 5626, 36592, 14114, 198, ...
3.585447
2,721
import re # 正则匹配不是以4和7结尾的手机号 tels = ["18389128994", "18937290278", "23929088973", "10039", "2910837", "19927948927", "2893u92b"] for tel in tels: ret = re.match("1\d{9}[0-3,5-6,8-9]", tel) if ret: print("GET success: ", ret.group()) else: print("%s is not!" % tel)
[ 11748, 302, 201, 198, 201, 198, 2, 10545, 255, 96, 26344, 247, 44293, 117, 165, 227, 235, 38834, 42468, 20015, 98, 19, 161, 240, 234, 22, 163, 119, 241, 22887, 122, 21410, 33699, 233, 17312, 118, 20998, 115, 201, 198, 83, 1424, 796,...
1.688889
180
#coding: utf-8 ####################################################### #Description: # This use julius dictation-kit-v4.4 dnn model data. # Please see LICENSE-Julius Dictation Kit.txt # #Date 2018-03-19 #By Shun ######################################################### import os import numpy as np fro...
[ 171, 119, 123, 2, 66, 7656, 25, 3384, 69, 12, 23, 201, 198, 201, 198, 29113, 14468, 4242, 21017, 201, 198, 2, 11828, 25, 201, 198, 2, 770, 779, 474, 377, 3754, 8633, 341, 12, 15813, 12, 85, 19, 13, 19, 288, 20471, 2746, 1366, ...
2.339782
827
import numpy as np from PIL import Image
[ 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 628, 628 ]
3.384615
13
import math from .anim import Anim, Manager
[ 11748, 10688, 198, 6738, 764, 11227, 1330, 11586, 11, 9142, 198 ]
4
11
import speech_recognition as sr from time import ctime import webbrowser import time import playsound import os import random from gtts import gTTS r=sr.Recognizer() r.energy_threshold = 4000 time.sleep(1) kundalini_speak('Lets go!') while 1: voice_data = record_audio() print(voice_data) respond(voice...
[ 11748, 4046, 62, 26243, 653, 355, 19677, 198, 6738, 640, 1330, 269, 2435, 198, 11748, 3992, 40259, 198, 11748, 640, 198, 11748, 5341, 633, 198, 11748, 28686, 198, 11748, 4738, 198, 6738, 308, 83, 912, 1330, 308, 51, 4694, 198, 198, 81...
2.739496
119
from socketIO_client_nexus import SocketIO # Clase usada para enviar y recibir informacion a traves de SocketIO, tanto para el servicio en paciente # como el uso para el servicio de doctor
[ 6738, 17802, 9399, 62, 16366, 62, 44520, 1330, 47068, 9399, 198, 198, 2, 1012, 589, 514, 4763, 31215, 551, 8903, 283, 331, 664, 571, 343, 4175, 49443, 257, 1291, 1158, 390, 47068, 9399, 11, 256, 14723, 31215, 1288, 37756, 952, 551, 23...
3.107692
65
import pyttsx3 import PyPDF2 book = open('b.pdf', 'rb') pdfReader = PyPDF2.PdfFileReader(book) pages = pdfReader.numPages print(pages) speaker = pyttsx3.init() page=pdfReader.getPage(11) txt = page.extractText() speaker.say(txt) speaker.runAndWait()
[ 11748, 12972, 83, 912, 87, 18, 198, 11748, 9485, 20456, 17, 198, 2070, 796, 1280, 10786, 65, 13, 12315, 3256, 705, 26145, 11537, 198, 12315, 33634, 796, 9485, 20456, 17, 13, 47, 7568, 8979, 33634, 7, 2070, 8, 198, 31126, 796, 37124, ...
2.5
100
#!/usr/bin/env python3 import time from typing import Dict import pandas as pd from src.web_bot import WebBot from config import show_file, subreddit class ShowManager(object): """Checks show lists for updates.""" def _add_show(self, show_info: Dict): """Adds a show to the current dataframe.""" ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 640, 198, 6738, 19720, 1330, 360, 713, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 12351, 13, 12384, 62, 13645, 1330, 5313, 20630, 198, 6738, 4566, 1330,...
2.071429
826
from selenium import webdriver import requests # Scenario level objects are popped off context when scenario exits
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 11748, 7007, 628, 198, 198, 2, 1446, 39055, 1241, 5563, 389, 22928, 572, 4732, 618, 8883, 30151, 628, 198 ]
4.444444
27
"""empty message Revision ID: e7c7c04b969c Revises: daf68fd7177e Create Date: 2018-07-03 20:23:06.108653 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'e7c7c04b969c' down_revision = 'daf68fd7177e' branch_labels = None depends_on = None
[ 37811, 28920, 3275, 198, 198, 18009, 1166, 4522, 25, 304, 22, 66, 22, 66, 3023, 65, 38819, 66, 198, 18009, 2696, 25, 288, 1878, 3104, 16344, 22, 22413, 68, 198, 16447, 7536, 25, 2864, 12, 2998, 12, 3070, 1160, 25, 1954, 25, 3312, ...
2.45082
122
import os import pytest from pyle38 import Tile38 from pyle38.client import Client from pyle38.errors import Tile38Error, Tile38IdNotFoundError, Tile38KeyNotFoundError @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio
[ 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 279, 2349, 2548, 1330, 47870, 2548, 198, 6738, 279, 2349, 2548, 13, 16366, 1330, 20985, 198, 6738, 279, 2349, 2548, 13, 48277, 1330, 47870, 2548, 12331, 11, 47870, 2548, 7390, ...
2.688679
106
import time import pytest from polog.handlers.telegram.sender import TelegramSender from polog import log, config import sys from my_config import MY_TOKEN, MY_CHAT lst = [] config.add_handlers(TelegramSender(MY_TOKEN, MY_CHAT))
[ 11748, 640, 198, 11748, 12972, 9288, 198, 6738, 755, 519, 13, 4993, 8116, 13, 660, 30536, 13, 82, 2194, 1330, 50203, 50, 2194, 198, 6738, 755, 519, 1330, 2604, 11, 4566, 198, 11748, 25064, 198, 6738, 616, 62, 11250, 1330, 17615, 62, ...
2.974359
78
#!/usr/bin/python # Copyright 2022 University of New South Wales, Ingham Institute # 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 ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 15069, 33160, 2059, 286, 968, 2520, 11769, 11, 554, 456, 321, 5136, 198, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, ...
2.195531
3,938
from __future__ import absolute_import, division, print_function, unicode_literals import copy import os.path from echomesh.base import EmptyProject from echomesh.base import MakeDirs from echomesh.base import Name _CREATE_MISSING_DIRECTORY_PROJECT = """ There doesn't seem to be an echomesh project in your director...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 4866, 198, 11748, 28686, 13, 6978, 198, 198, 6738, 304, 354, 2586, 71, 13, 8692, 1330, 33523, 16775, 198, ...
2.720238
336
from xclib.data import data_utils import xclib.evaluation.xc_metrics as xc_metrics import numpy as np dataset = 'eurlex' # Read file with features and labels features, labels, num_samples, num_features, num_labels = data_utils.read_data('data/' + dataset +'/' + 'train.txt') A, B = 0.55, 1.5 inv_propen = xc_metrics.co...
[ 6738, 2124, 565, 571, 13, 7890, 1330, 1366, 62, 26791, 198, 11748, 2124, 565, 571, 13, 18206, 2288, 13, 25306, 62, 4164, 10466, 355, 2124, 66, 62, 4164, 10466, 198, 11748, 299, 32152, 355, 45941, 198, 198, 19608, 292, 316, 796, 705, ...
2.457627
295
#!/usr/bin/python3 if __name__ == '__main__': print( 'URL : ' + Accounts.the_url) for a in Accounts.accounts: print(repr(a) + ' : ' + repr(Accounts.accounts[a]))
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3601, 7, 705, 21886, 1058, 705, 1343, 35584, 13, 1169, 62, 6371, 8, 198, 220, 220, 220, 329, 257, 28...
2.209877
81
from pylaser.raw import Point, Box, Polyline, Circle, Group, write from pylaser.derived import BoxEdge __doc__ = """ Positive x is right and positive y is up. """ __all__ = [ 'Point', 'Box', 'Polyline', 'Circle', 'Group', 'write', 'BoxEdge', ]
[ 198, 6738, 279, 2645, 6005, 13, 1831, 1330, 6252, 11, 8315, 11, 12280, 1370, 11, 16291, 11, 4912, 11, 3551, 198, 6738, 279, 2645, 6005, 13, 34631, 1330, 8315, 37021, 198, 198, 834, 15390, 834, 796, 37227, 198, 21604, 1800, 2124, 318, ...
2.451327
113
from datetime import datetime
[ 6738, 4818, 8079, 1330, 4818, 8079, 628, 628, 628 ]
3.888889
9
import pytest docker_compose_services = ['base', # 'builder', This is just a helper image, do we need to test it? 'deploy', 'jenkins', 'xtest'] pytest_plugins = [ "fixtures.container", "fixtures.expect...
[ 11748, 12972, 9288, 198, 198, 45986, 62, 785, 3455, 62, 30416, 796, 37250, 8692, 3256, 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, 220, 220, 1303, 70...
1.774194
186
''' 只出现一次的数字 II 给定一个非空整数数组,除了某个元素只出现一次以外,其余每个元素均出现了三次。找出那个只出现了一次的元素。 说明: 你的算法应该具有线性时间复杂度。 你可以不使用额外空间来实现吗? ''' from typing import List ''' 思路:快排算法里面的分区。 随机从nums中选取pivot,利用快速排序算法里面的分区函数,分成2个区,<pivot的 和 >=pivot的。如果其中一个分区大小不是3的整数倍, 说明目标元素出现在那个分区。需要继续对分区进行再分区。重复分区过程,直至有分区大小==1,则返回该分区的数。 时间复杂度:O(n),快排的时间复杂度为O(nlogn),这里...
[ 7061, 6, 198, 20998, 103, 49035, 118, 163, 236, 108, 31660, 162, 105, 94, 21410, 46763, 108, 27764, 245, 2873, 198, 163, 119, 247, 22522, 248, 31660, 10310, 103, 165, 251, 252, 163, 102, 118, 46763, 112, 46763, 108, 46763, 108, 163, ...
0.710059
845
# MenuTitle: Set Vertical Metrics # -*- coding: utf-8 -*- __doc__ = """ Sets the vertical metrics based on the yMax/yMin and typographic values. """ from collections import defaultdict Glyphs.clearLog() setVerticalMetrics()
[ 2, 21860, 19160, 25, 5345, 38937, 3395, 10466, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 834, 15390, 834, 796, 37227, 198, 50, 1039, 262, 11723, 20731, 1912, 319, 262, 331, 11518, 14, 88, 9452, 290, 2170, ...
3.067568
74
DATA_ROOTS = { 'cifar10': 'data/cifar10', 'meta_aircraft': 'data/aircraft/fgvc-aircraft-2013b', 'meta_cu_birds': 'data/cu_birds/CUB_200_2011', 'meta_dtd': 'data/dtd/dtd', 'meta_fashionmnist': 'data/fashionmnist', 'meta_fungi': 'data/fungi', 'meta_mnist': 'data/mnist', 'meta_mscoco': 'dat...
[ 26947, 62, 13252, 33472, 796, 1391, 198, 220, 220, 220, 705, 66, 361, 283, 940, 10354, 705, 7890, 14, 66, 361, 283, 940, 3256, 198, 220, 220, 220, 705, 28961, 62, 958, 3323, 10354, 705, 7890, 14, 958, 3323, 14, 40616, 28435, 12, 9...
2.087087
333
numero = int(input('Numero : ')) x=0 while x <= numero: print (x) x = x + 2
[ 22510, 3529, 796, 493, 7, 15414, 10786, 33111, 3529, 1058, 705, 4008, 201, 198, 87, 28, 15, 201, 198, 4514, 2124, 19841, 997, 3529, 25, 201, 198, 220, 220, 220, 3601, 357, 87, 8, 201, 198, 220, 220, 220, 2124, 796, 2124, 1343, 362...
1.977273
44
# Copyright (c) 2019, Palo Alto Networks # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS...
[ 2, 15069, 357, 66, 8, 13130, 11, 44878, 34317, 27862, 198, 2, 198, 2, 2448, 3411, 284, 779, 11, 4866, 11, 13096, 11, 290, 14, 273, 14983, 428, 3788, 329, 597, 198, 2, 4007, 351, 393, 1231, 6838, 318, 29376, 7520, 11, 2810, 326, ...
2.428955
2,977
from django.conf import settings
[ 6738, 42625, 14208, 13, 10414, 1330, 6460 ]
4.571429
7
from django.db import models class CoffeeMachines(models.Model): """Models class of the coffee machines""" COFFEE_MACHINE_SMALL = 'S' COFFEE_MACHINE_LARGE = 'L' ESPRESSO_MACHINE = 'E' BASE_CLASS = 'B' PREMIUM_CLASS = 'P' DELUXE_CLASS = 'D' TYPES_CHOICES = [ (COFFEE_MACHINE_SM...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 198, 4871, 19443, 49999, 1127, 7, 27530, 13, 17633, 2599, 198, 220, 220, 220, 37227, 5841, 1424, 1398, 286, 262, 6891, 8217, 37811, 198, 220, 220, 220, 7375, 5777, 6500, 62, 44, 16219, 88...
2.148148
459
#get stat result from pathlib import Path import numpy as np import os import pickle as pkl import sys import pandas as pd data_dir1=sys.argv[1] data_dir2=sys.argv[2] dict1=ann_stat(data_dir1) dict2=ann_stat(data_dir2) pd_null,pd_pts,pd_dict_agg=find_agg_data(dict1) gs_null,gs_pts,gs_dict_agg=find_agg_data(dict2) ...
[ 2, 1136, 1185, 1255, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 2298, 293, 355, 279, 41582, 198, 11748, 25064, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 7890, 62, 15908, ...
2.131387
548
import pytest import logging from pycodeanalyzer.core.logging.loggerfactory import LoggerFactory
[ 11748, 12972, 9288, 201, 198, 201, 198, 11748, 18931, 201, 198, 6738, 12972, 8189, 38200, 9107, 13, 7295, 13, 6404, 2667, 13, 6404, 1362, 69, 9548, 1330, 5972, 1362, 22810, 201, 198 ]
3.1875
32
import hashlib import os import shutil import sys import tempfile from pathlib import Path from types import TracebackType from typing import Callable, Tuple, Type from uuid import uuid4 import appdirs from loguru import logger if os.name == "nt": import win32api import win32con global FILE_ATTRIBUTE_HID...
[ 11748, 12234, 8019, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 25064, 198, 11748, 20218, 7753, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 3858, 1330, 34912, 1891, 6030, 198, 6738, 19720, 1330, 4889, 540, 11, 309, 29291, 11,...
2.272727
737
#### #### #### #### FILES #### #### #### #### #### #### OPENING FILES #### #### filename = "pi.txt" #### EXAMPLE 1 #### with open(filename) as Pi: pi_number = Pi.read() print pi_number.rstrip() #### EXAMPLE 2 #### with open(filename) as Pi: for line in Pi: print line.rstrip() ...
[ 4242, 1303, 21017, 1303, 21017, 1303, 21017, 34020, 1546, 1303, 21017, 1303, 21017, 1303, 21017, 1303, 21017, 201, 198, 201, 198, 4242, 1303, 21017, 38303, 2751, 34020, 1546, 1303, 21017, 1303, 21017, 201, 198, 201, 198, 34345, 796, 366, ...
2.332506
403
# For Michael, an example test run with Curl: # # curl -X POST http://localhost:64510 -d '{"method": "GET", "endpoint": "http://localhost:9980"}' # from datetime import datetime, timedelta import time import tornado.ioloop import tornado.web import asyncio from tornado.ioloop import IOLoop import tornado.escape impor...
[ 2, 1114, 3899, 11, 281, 1672, 1332, 1057, 351, 4424, 75, 25, 198, 2, 198, 2, 29249, 532, 55, 24582, 2638, 1378, 36750, 25, 49259, 940, 532, 67, 705, 4895, 24396, 1298, 366, 18851, 1600, 366, 437, 4122, 1298, 366, 4023, 1378, 36750, ...
2.91129
372
import os import connexion import uuid import asyncio import json import cv2 import requests import base64 from vl.models.api_response import ApiResponse # noqa: E501 from vl.models.error import Error # noqa: E501 from vl.models.user import User # noqa: E501 from vl.models.user_data_response import UserDataResponse...
[ 11748, 28686, 198, 11748, 369, 12413, 295, 198, 11748, 334, 27112, 198, 11748, 30351, 952, 198, 11748, 33918, 198, 11748, 269, 85, 17, 198, 11748, 7007, 198, 11748, 2779, 2414, 198, 198, 6738, 410, 75, 13, 27530, 13, 15042, 62, 26209, ...
2.411259
2,558
f = str(input('Digite uma frase: ')).strip().lower() print(f'Quantas vezes aparece a letra "a"? {f.count("a")}') #O método count() contará quantos 'a's tem na string print(f'Qual foi a 1° vez que apareceu? Na {f.find("a") + 1}° Posição') #O método find() indicará qual o index do 1° 'a' na string print(f'Qual foi a u...
[ 69, 796, 965, 7, 15414, 10786, 19511, 578, 334, 2611, 1216, 589, 25, 705, 29720, 36311, 22446, 21037, 3419, 198, 198, 4798, 7, 69, 6, 24915, 292, 1569, 12271, 2471, 533, 344, 257, 1309, 430, 366, 64, 13984, 1391, 69, 13, 9127, 7203,...
2.39267
191
# -*- coding: utf-8 -*- ''' Salt compatibility code ''' # pylint: disable=import-error,unused-import # Import python libs import sys import types # Import 3rd-party libs from salt.ext.six import binary_type, string_types, text_type from salt.ext.six.moves import cStringIO, StringIO try: import cPickle as pickle ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 43061, 17764, 2438, 198, 7061, 6, 198, 2, 279, 2645, 600, 25, 15560, 28, 11748, 12, 18224, 11, 403, 1484, 12, 11748, 198, 198, 2, 17267, 21015, 9195, 8...
2.405512
1,270
from config.configshandler import GlobalConfigs as cfg_hnd from app.applicationhandler import ApplicationHandler import logging import logging.config if __name__ == '__main__': logging.config.fileConfig('./log/logging.conf') logger = logging.getLogger(__name__) cfg_hnd.load() logger.debug(f'Loaded conf...
[ 6738, 4566, 13, 11250, 1477, 392, 1754, 1330, 8060, 16934, 82, 355, 30218, 70, 62, 71, 358, 198, 6738, 598, 13, 31438, 30281, 1330, 15678, 25060, 198, 11748, 18931, 198, 11748, 18931, 13, 11250, 198, 198, 361, 11593, 3672, 834, 6624, ...
2.923664
131
from django.http import JsonResponse from django.views import View # Create your views here. from apps.client.models import ClientTest class IndexView(View): """ 客户端上传客户端号和分数 """ class ChartsView(View): """ 客户端查询排行榜 """
[ 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 198, 6738, 42625, 14208, 13, 33571, 1330, 3582, 628, 198, 2, 13610, 534, 5009, 994, 13, 198, 6738, 6725, 13, 16366, 13, 27530, 1330, 20985, 14402, 628, 198, 4871, 12901, 7680, 7, 7...
1.984127
126
#!/usr/bin/python from __future__ import print_function import argparse import sys # open the MapFile class fix_mapfile: """A class to fix mapfiles while moving from 6.0 to 6.4. See UTILS-328 for full discussion, basically move validation patterns from METADATA to VALIDATION blocks. ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 1822, 29572, 198, 11748, 25064, 628, 198, 2, 1280, 262, 9347, 8979, 198, 4871, 4259, 62, 8899, 7753, 25, 198, 220, 220, 220, 37227, ...
1.616275
2,851