content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import pygame_sdl2 pygame_sdl2.import_as_pygame() import pygame import os import random import math from Ball import Ball def save_state(balls): """ Saves the game state. """ stateString = "" with open("state.txt", "w") as f: for ball in balls: stateString += "{} {} {} {} {}".f...
[ 11748, 12972, 6057, 62, 21282, 75, 17, 198, 9078, 6057, 62, 21282, 75, 17, 13, 11748, 62, 292, 62, 9078, 6057, 3419, 198, 198, 11748, 12972, 6057, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 10688, 198, 6738, 6932, 1330, 6932, 19...
1.701422
422
from __future__ import division import math, copy import argparse from brownian import Brownian import scipy import LLRcalc if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument( "--alpha", help="probability of a false positve", type=float, default=0.05 ) parser.ad...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 10688, 11, 4866, 198, 11748, 1822, 29572, 198, 6738, 7586, 666, 1330, 4373, 666, 198, 11748, 629, 541, 88, 198, 11748, 27140, 49, 9948, 66, 628, 198, 198, 361, 11593, 3672, 834, 6624, 3...
2.075536
1,165
# # 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...
[ 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, 5115, 6634, 9238, 13, 220, ...
2.311589
1,303
"""Simple Hail query example.""" import click import hail as hl from bokeh.io.export import get_screenshot_as_png from analysis_runner import output_path GNOMAD_HGDP_1KG_MT = ( 'gs://gcp-public-data--gnomad/release/3.1/mt/genomes/' 'gnomad.genomes.v3.1.hgdp_1kg_subset_dense.mt' ) if __name__ == '__main__'...
[ 37811, 26437, 42913, 12405, 1672, 526, 15931, 198, 198, 11748, 3904, 198, 11748, 32405, 355, 289, 75, 198, 6738, 1489, 365, 71, 13, 952, 13, 39344, 1330, 651, 62, 1416, 26892, 62, 292, 62, 11134, 198, 6738, 3781, 62, 16737, 1330, 5072...
2.335404
161
import uuid import time import socket import struct
[ 11748, 334, 27112, 198, 11748, 640, 198, 11748, 17802, 198, 11748, 2878, 628, 628, 628, 628, 628, 628, 628, 628, 628 ]
3.285714
21
""" How to load morphologies of certain cells from the database. """ #this is an expected failure right now, as morphology is not implemented from __future__ import absolute_import from __future__ import print_function import PyOpenWorm as P from PyOpenWorm.context import Context from PyOpenWorm.worm import Worm from ...
[ 37811, 198, 2437, 284, 3440, 17488, 5823, 286, 1728, 4778, 422, 262, 6831, 13, 198, 37811, 198, 2, 5661, 318, 281, 2938, 5287, 826, 783, 11, 355, 46320, 318, 407, 9177, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, ...
3.329502
261
from __future__ import absolute_import from __future__ import unicode_literals from django.test import SimpleTestCase from corehq.apps.app_manager.const import ( AUTO_SELECT_RAW, AUTO_SELECT_CASE, WORKFLOW_FORM, WORKFLOW_MODULE, WORKFLOW_PREVIOUS, WORKFLOW_ROOT, WORKFLOW_PARENT_MODULE, ) fr...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 42625, 14208, 13, 9288, 1330, 17427, 14402, 20448, 198, 198, 6738, 4755, 71, 80, 13, 18211, 13, 1324, 62, 37153,...
2.742647
272
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 12131, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846,...
2.901046
2,678
eval(input("Enter a expression "))
[ 18206, 7, 15414, 7203, 17469, 257, 5408, 366, 4008 ]
3.777778
9
import numpy as np import matplotlib.pyplot as plt import pandas as pd # load dataset into Pandas DataFrame df = pd.read_csv("D:\Python_programs\ML\Iris Data\KPCA\iris.csv") #df.to_csv('iris.csv') from sklearn.preprocessing import StandardScaler features = ['sepal length', 'sepal width', 'petal length', 'petal width...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 2, 3440, 27039, 656, 16492, 292, 6060, 19778, 198, 7568, 796, 279, 67, 13, 961, 62, 40664, ...
3.057851
242
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from typing import List, Pattern from recognizers_text.utilities import RegExpUtility from recognizers_number.number import BaseNumberParser from recognizers_number.number.italian.extractors import ItalianIntegerExtractor,...
[ 2, 220, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 220, 49962, 739, 262, 17168, 13789, 13, 198, 198, 6738, 19720, 1330, 7343, 11, 23939, 198, 198, 6738, 3018, 11341, 62, 5239, 13, 315, 2410, 1330, 3310, 16870...
4.236948
249
"""SQLite Driver implementation.""" # pylint: disable=R0201 import os import sqlite3 from typing import Any, AnyStr, List, NoReturn, Optional, Tuple from pydbrepo.drivers.driver import Driver
[ 37811, 17861, 578, 12434, 7822, 526, 15931, 198, 198, 2, 279, 2645, 600, 25, 15560, 28, 49, 15, 1264, 198, 198, 11748, 28686, 198, 11748, 44161, 578, 18, 198, 6738, 19720, 1330, 4377, 11, 4377, 13290, 11, 7343, 11, 1400, 13615, 11, ...
3.266667
60
import numpy as np from PuzzleLib import Config from PuzzleLib.Backend import gpuarray, Blas from PuzzleLib.Backend.Dnn import batchNormNd, batchNormNdBackward from PuzzleLib.Variable import Variable from PuzzleLib.Modules.Module import ModuleError, Module
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 23966, 25835, 1330, 17056, 198, 198, 6738, 23966, 25835, 13, 7282, 437, 1330, 308, 19944, 18747, 11, 1086, 292, 198, 6738, 23966, 25835, 13, 7282, 437, 13, 35, 20471, 1330, 15458, 35393, 45...
3.575342
73
xs = ('foo', 'bar', 'baz'<caret>
[ 34223, 796, 19203, 21943, 3256, 705, 5657, 3256, 198, 220, 220, 220, 220, 220, 705, 65, 1031, 6, 27, 6651, 83, 29 ]
1.727273
22
from concurrent import futures from forecaster.prophet import Forecaster as ProphetForecaster from multiprocessing import Event, Process, cpu_count from pythonjsonlogger import jsonlogger import contextlib import grpc import logging import model.api.forecast_pb2_grpc as grpc_lib import os import signal import socket im...
[ 6738, 24580, 1330, 25650, 198, 6738, 1674, 17970, 13, 22930, 3202, 1330, 4558, 17970, 355, 13583, 16351, 17970, 198, 6738, 18540, 305, 919, 278, 1330, 8558, 11, 10854, 11, 42804, 62, 9127, 198, 6738, 21015, 17752, 6404, 1362, 1330, 33918,...
3.042918
233
def test_setupcall(): """ Test the call of the setup function """ import jupyter_libertem_proxy as jx print("\nRunning test_setupcall...") print(jx.setup_libertem())
[ 4299, 1332, 62, 40406, 13345, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 6208, 262, 869, 286, 262, 9058, 2163, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1330, 474, 929, 88, 353, 62, 33203, 11498, 62, 36436, 355, 474,...
2.581081
74
# Copyright 2020 DeepMind Technologies Limited. 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 ...
[ 2, 15069, 12131, 10766, 28478, 21852, 15302, 13, 1439, 2489, 10395, 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, 35...
3.477223
461
# Copyright (c) OpenMMLab. All rights reserved. import ctypes import glob import logging import os def get_ops_path() -> str: """Get path of the TensorRT plugin library. Returns: str: A path of the TensorRT plugin library. """ wildcard = os.path.abspath( os.path.join( os.p...
[ 2, 15069, 357, 66, 8, 4946, 44, 5805, 397, 13, 1439, 2489, 10395, 13, 198, 11748, 269, 19199, 198, 11748, 15095, 198, 11748, 18931, 198, 11748, 28686, 628, 198, 4299, 651, 62, 2840, 62, 6978, 3419, 4613, 965, 25, 198, 220, 220, 220,...
2.445476
431
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. import logging import os import random import unittest from typing import Optional import numpy as np import pytorch_lightning as pl import torch import torch.nn as nn from parameterized import parameterized from reagent.co...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 1439, 2489, 10395, 13, 198, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 555, 715, 395, 198,...
2.200462
4,325
# MINLP written by GAMS Convert at 01/15/21 11:37:33 # # Equation counts # Total E G L N X C B # 1486 571 111 804 0 0 0 0 # # Variable counts # x b i s1s s2s sc ...
[ 2, 220, 20625, 19930, 3194, 416, 402, 40834, 38240, 379, 5534, 14, 1314, 14, 2481, 1367, 25, 2718, 25, 2091, 198, 2, 220, 220, 198, 2, 220, 7889, 341, 9853, 198, 2, 220, 220, 220, 220, 220, 7472, 220, 220, 220, 220, 220, 220, 22...
1.921497
73,984
import unittest from flask import json from tests.base_test import BaseTest from app import db, elastic_index from app.model.resource import Resource from app.model.resource_category import ResourceCategory from app.model.resource_change_log import ResourceChangeLog from app.model.user import Role
[ 11748, 555, 715, 395, 198, 198, 6738, 42903, 1330, 33918, 198, 198, 6738, 5254, 13, 8692, 62, 9288, 1330, 7308, 14402, 198, 6738, 598, 1330, 20613, 11, 27468, 62, 9630, 198, 6738, 598, 13, 19849, 13, 31092, 1330, 20857, 198, 6738, 598...
3.973684
76
import json import logging import math import re from contextlib import contextmanager from django.core.management import call_command from django.core.management.base import CommandError from morango.models import Filter from morango.models import InstanceIDModel from morango.models import ScopeDefinition from morang...
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 10688, 198, 11748, 302, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 1330, 869, 62, 21812, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 86...
3.201299
462
import math import imageio import cv2 as cv import numpy as np import transformer D1 = 105 D2 = 175 D3 = 275 if __name__ == "__main__": cap = cv.VideoCapture('samples/delta.mp4') if not cap.isOpened(): raise IOError("Video was not opened!") mse = 0 count = 0 reader = imageio.get_reader(...
[ 11748, 10688, 198, 11748, 2939, 952, 198, 11748, 269, 85, 17, 355, 269, 85, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 47385, 198, 198, 35, 16, 796, 13343, 198, 35, 17, 796, 19038, 198, 35, 18, 796, 25829, 198, 198, 361, 11593,...
1.882283
2,523
#!/usr/bin/env python3 """ A tool to grab a single BOSS image and pull a few items from its header. It is used in bin/sloan_log.py, but it could be used directly as well. """ import argparse from pathlib import Path from astropy.time import Time import fitsio if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 32, 2891, 284, 5552, 257, 2060, 347, 18420, 2939, 290, 2834, 257, 1178, 3709, 422, 663, 13639, 13, 632, 318, 198, 973, 287, 9874, 14, 82, 5439, 272, 62, 6404, 13, 9...
3.091837
98
# Altere o Programa 8.20 de forma que o usurio tenha trs chances de acertar o nmero # O programa termina se o usurio acertar ou errar trs vezes # Programa 8.20 do livro, pgina 184 # Programa 8.20 - Adivinhando o nmero # # import random # # n = random.randint(1, 10) # x = int(input('Escolha um nmero entre 1 e 10: ')) #...
[ 2, 12344, 567, 267, 6118, 64, 807, 13, 1238, 390, 1296, 64, 8358, 267, 39954, 952, 3478, 3099, 491, 82, 8395, 390, 936, 861, 283, 267, 299, 647, 78, 198, 2, 440, 1430, 64, 5651, 64, 384, 267, 39954, 952, 936, 861, 283, 267, 84, ...
2.254808
416
# -*- coding: utf-8 -*- """This sub module provides a global variable to check for checking if the non-interactive argument was set Exported variable: interactive -- False, if the main the non-interactive argument was set, True, if it was not set """ global interactive interactive = True;
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 1212, 850, 8265, 3769, 257, 3298, 7885, 284, 2198, 329, 10627, 611, 262, 1729, 12, 3849, 5275, 4578, 373, 900, 198, 198, 3109, 9213, 7885, 25, 198, 3849, 5...
3.6625
80
import setuptools # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setuptools.setup( name="atm76", version="0.1.0", author="Steven H. Berg...
[ 11748, 900, 37623, 10141, 198, 198, 2, 1675, 779, 257, 6414, 21004, 198, 6738, 40481, 82, 1330, 1280, 198, 6738, 28686, 1330, 3108, 198, 198, 1456, 796, 3108, 13, 397, 2777, 776, 7, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 19...
2.629412
340
import logging import asyncio from agent.check_plugins import AbstractCheckPlugin # Do khong biet dung thu vien asyncio ntn ca nen em dung thu vien request # python import requests import sys import time from datetime import datetime logger = logging.getLogger(__name__) def mean_deviation(self, array_speed, dow...
[ 11748, 18931, 198, 11748, 30351, 952, 198, 6738, 5797, 13, 9122, 62, 37390, 1330, 27741, 9787, 37233, 198, 198, 2, 2141, 44081, 506, 275, 1155, 288, 2150, 294, 84, 410, 2013, 30351, 952, 299, 34106, 1275, 299, 268, 795, 288, 2150, 294...
2.061745
745
from django.urls import path from . import views app_name = "main" urlpatterns = [ path("",views.homepage,name="homepage") ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 198, 198, 1324, 62, 3672, 796, 366, 12417, 1, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 7203, 1600, 33571, 13, 11195, 7700, 11, 3672, 262...
2.708333
48
""" Utility used by the Network class to actually train. Based on: https://github.com/fchollet/keras/blob/master/examples/mnist_mlp.py """ from keras.datasets import mnist, cifar10 from keras.models import Sequential from keras.layers import Dense, Dropout from keras.utils.np_utils import to_categorical from kera...
[ 37811, 198, 18274, 879, 973, 416, 262, 7311, 1398, 284, 1682, 4512, 13, 198, 198, 15001, 319, 25, 198, 220, 220, 220, 3740, 1378, 12567, 13, 785, 14, 69, 354, 349, 1616, 14, 6122, 292, 14, 2436, 672, 14, 9866, 14, 1069, 12629, 14,...
2.316244
1,970
from openslides.agenda.models import Item from openslides.core.models import CustomSlide from openslides.utils.test import TestCase
[ 6738, 9808, 75, 1460, 13, 363, 7438, 13, 27530, 1330, 9097, 198, 6738, 9808, 75, 1460, 13, 7295, 13, 27530, 1330, 8562, 11122, 485, 198, 6738, 9808, 75, 1460, 13, 26791, 13, 9288, 1330, 6208, 20448, 628 ]
3.594595
37
import weakref import os import requests import ssl from ssl import SSLContext import logging from ssl_context_builder.builder.builder import SslContextBuilder from ssl_context_builder.http_impl.requests_wrapper.ssl_adapter import SslAdapter
[ 11748, 4939, 5420, 198, 11748, 28686, 198, 11748, 7007, 198, 11748, 264, 6649, 198, 6738, 264, 6649, 1330, 25952, 21947, 198, 11748, 18931, 198, 198, 6738, 264, 6649, 62, 22866, 62, 38272, 13, 38272, 13, 38272, 1330, 311, 6649, 21947, 3...
3.588235
68
''' Selected cifar-10. The .csv file format: class_index,data_index 3,0 8,1 8,2 ... ''' import pickle import pandas as pd file = 'E:\pycharm\LEARN\data\cifar-10\cifar-10-batches-py\\test_batch' with open(file, 'rb') as f: dict = pickle.load(f, encoding='bytes') dict.keys() batch_label = dict[b'batch_label'] ...
[ 7061, 6, 198, 4653, 12609, 269, 361, 283, 12, 940, 13, 383, 764, 40664, 2393, 5794, 25, 198, 198, 4871, 62, 9630, 11, 7890, 62, 9630, 198, 18, 11, 15, 198, 23, 11, 16, 198, 23, 11, 17, 198, 986, 198, 198, 7061, 6, 198, 198, ...
2.352273
264
# Ghetto Fixtures from codebox import app from codebox.apps.auth.models import User from codebox.apps.snippets.models import Snippet from codebox.apps.organizations.models import Organization, OrganizationMember from flask import g client = app.test_client() _ctx = app.test_request_context() _ctx.push() app.preproces...
[ 2, 402, 35619, 376, 25506, 198, 198, 6738, 2438, 3524, 1330, 598, 198, 6738, 2438, 3524, 13, 18211, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 2438, 3524, 13, 18211, 13, 16184, 3974, 1039, 13, 27530, 1330, 5489, 3974, 316, 198, 673...
2.9375
320
from unittest.mock import Mock, patch from django.test import SimpleTestCase from corehq.apps.domain.exceptions import DomainDoesNotExist from corehq.apps.linked_domain.exceptions import ( DomainLinkAlreadyExists, DomainLinkError, DomainLinkNotAllowed, ) from corehq.apps.linked_domain.views import link_do...
[ 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 11, 8529, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 17427, 14402, 20448, 198, 198, 6738, 4755, 71, 80, 13, 18211, 13, 27830, 13, 1069, 11755, 1330, 20021, 13921, 3673, 3109, 396, 198,...
3.084906
106
import function_exercise_01 as st st.sandwich_toppings('meatballs', 'salad')
[ 11748, 2163, 62, 1069, 23697, 62, 486, 355, 336, 198, 198, 301, 13, 38142, 11451, 62, 1462, 37840, 10786, 41495, 21591, 3256, 705, 21680, 324, 11537, 628 ]
2.925926
27
#!/usr/bin/python # # from __future__ import absolute_import import json import re import logging from .datacite import DataCiteParser # # if __name__ == "__main__": # # # allows program to print utf-8 encoded output sensibly # import codecs # sys.stdout = codecs.getwriter('utf-8')(sys.stdout) # sys.std...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 11748, 33918, 198, 11748, 302, 198, 11748, 18931, 198, 6738, 764, 19608, 330, 578, 1330, 6060, 34, 578, 46677, 628, ...
2.25
248
import json import time from functools import lru_cache from multiprocessing import Pool, Process from threading import Thread, Timer from typing import Any, Dict, List from datetime import datetime import hashlib import inspect import requests import waitress from bottle import BaseTemplate, Bottle, request, response,...
[ 11748, 33918, 198, 11748, 640, 198, 6738, 1257, 310, 10141, 1330, 300, 622, 62, 23870, 198, 6738, 18540, 305, 919, 278, 1330, 19850, 11, 10854, 198, 6738, 4704, 278, 1330, 14122, 11, 5045, 263, 198, 6738, 19720, 1330, 4377, 11, 360, 7...
2.287451
2,550
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from tensorflow.python.framework import ops from collections import OrderedDict import warnings, logging from deepexplain.tf.v1_x import constants from deepexplain.tf.v1_x.baseClasses i...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 3...
2.737569
362
""" Get the memory usage of a Keras model. From https://stackoverflow.com/a/46216013. """ def get_model_memory_usage(batch_size, model): """ Get the memory usage of a Keras model in GB. From https://stackoverflow.com/a/46216013. """ import numpy as np try: from keras import backend a...
[ 37811, 198, 3855, 262, 4088, 8748, 286, 257, 17337, 292, 2746, 13, 198, 198, 4863, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 64, 14, 3510, 20666, 30273, 13, 198, 37811, 198, 198, 4299, 651, 62, 19849, 62, 31673, 62, 26060, 7, 435...
2.316375
629
import abc
[ 11748, 450, 66, 628 ]
3
4
import io import os from setuptools import setup def read(file_name): """Read a text file and return the content as a string.""" with io.open(os.path.join(os.path.dirname(__file__), file_name), encoding='utf-8') as f: return f.read() setup( name='recmetrics', url='https://gi...
[ 11748, 33245, 198, 11748, 28686, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 628, 198, 4299, 1100, 7, 7753, 62, 3672, 2599, 198, 220, 220, 220, 37227, 5569, 257, 2420, 2393, 290, 1441, 262, 2695, 355, 257, 4731, 526, 15931, 198, 22...
2.37092
337
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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 ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 2864, 383, 3012, 9552, 15417, 4816, 46665, 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,...
2.758678
1,210
import sqlite3 import os import psycopg2 from dotenv import load_dotenv load_dotenv() DB_NAME2 = os.getenv("DB_NAME3") DB_USER2 = os.getenv("DB_USER3") DB_PASS2 = os.getenv("DB_PASS3") DB_HOST2 = os.getenv("DB_HOST3") conn = psycopg2.connect(dbname=DB_NAME2, user=DB_USER2, ...
[ 11748, 44161, 578, 18, 198, 11748, 28686, 198, 11748, 17331, 22163, 70, 17, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 198, 2220, 62, 26518, 24330, 3419, 198, 198, 11012, 62, 20608, 17, 796, 28686, 13, 1136, 24330, 7203...
2.320158
506
import battlefy_data import battlefy_wiki_linkings from datetime import datetime from operator import itemgetter from pathlib import Path import calcup_roster_tracking if __name__ == '__main__': main()
[ 11748, 3344, 24928, 62, 7890, 198, 11748, 3344, 24928, 62, 15466, 62, 8726, 654, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 10088, 1330, 2378, 1136, 353, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 2386, 25244, 62, 305...
3.188406
69
import pygame ##################### EJEMPLO DE USO ############################## # texto1 = Texto(screen, 'Hola', 10, 10) ##################### EJEMPLO DE USO ############################## # textarea1 = Textarea(screen, 'Hola mundo que tal estas hoy')
[ 11748, 12972, 6057, 198, 220, 220, 220, 220, 198, 198, 14468, 4242, 2, 412, 41, 3620, 6489, 46, 5550, 1294, 46, 1303, 14468, 7804, 4242, 2, 198, 2, 2420, 78, 16, 796, 8255, 78, 7, 9612, 11, 705, 39, 5708, 3256, 838, 11, 838, 8, ...
3.023256
86
# This is the code to train the xgboost model with cross-validation for each unique room in the dataset. # Models are dumped into ./models and results are dumped into two csv files in the current work directory. import argparse import json import math import os import pickle import warnings from typing import Tuple i...
[ 2, 770, 318, 262, 2438, 284, 4512, 262, 2124, 70, 39521, 2746, 351, 3272, 12, 12102, 341, 329, 1123, 3748, 2119, 287, 262, 27039, 13, 198, 2, 32329, 389, 24105, 656, 24457, 27530, 290, 2482, 389, 24105, 656, 734, 269, 21370, 3696, 2...
2.416745
4,264
import os from setuptools import setup # Read the version g = {} with open(os.path.join("editorconfig", "version.py"), "rt") as fp: exec(fp.read(), g) v = g['VERSION'] version = ".".join(str(x) for x in v[:3]) if v[3] != "final": version += "-" + v[3] setup( name='EditorConfig', versio...
[ 11748, 28686, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 2, 4149, 262, 2196, 198, 70, 796, 23884, 198, 4480, 1280, 7, 418, 13, 6978, 13, 22179, 7203, 35352, 11250, 1600, 366, 9641, 13, 9078, 12340, 366, 17034, 4943, 355, 277,...
2.591182
499
import numpy as np import matplotlib.pyplot as plt t = np.arange(0,375,6.5) # MEM_1 = [0.031, 0.034, 0.034, 0.034, 0.031, 0.034, 0.034, 0.034, 0.031, 0.033, 0.035, 0.034, 0.031, 0.033, 0.034, 0.034, 0.031, 0.033, 0.034, 0.034, 0.031, 0.033, 0.034, 0.034, 0.031, 0.033, 0.034, 0.034, 0.031, 0.031, 0.031, 0.031, 0.031, 0...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 83, 796, 45941, 13, 283, 858, 7, 15, 11, 22318, 11, 21, 13, 20, 8, 198, 2, 35153, 62, 16, 796, 685, 15, 13, 43637, 11, 657, ...
1.748768
3,451
import re import munge def parse_interval(val): """ converts a string to float of seconds .5 = 500ms 90 = 1m30s **Arguments** - val (`str`) """ re_intv = re.compile(r"([\d\.]+)([a-zA-Z]+)") val = val.strip() total = 0.0 for match in re_intv.findall(val): ...
[ 11748, 302, 198, 198, 11748, 29856, 469, 628, 198, 4299, 21136, 62, 3849, 2100, 7, 2100, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 26161, 257, 4731, 284, 12178, 286, 4201, 198, 220, 220, 220, 220, 220, 220, 220, 764, 20, ...
1.981959
388
# -*- coding: utf-8 -*- """Tests for sktime annotators.""" import pandas as pd import pytest from sktime.registry import all_estimators from sktime.utils._testing.estimator_checks import _make_args ALL_ANNOTATORS = all_estimators(estimator_types="series-annotator", return_names=False)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 51, 3558, 329, 1341, 2435, 24708, 2024, 526, 15931, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 12972, 9288, 198, 198, 6738, 1341, 2435, 13, 2301, 4592...
2.843137
102
picamera import PiCamera from time import sleep import boto3 import os.path import subprocess s3 = boto3.client('s3') bucket = 'cambucket21' camera = PiCamera() #camera.resolution(1920,1080) x = 0 camerafile = x while True: if (x == 6): x = 1 else: x = x + 1 camera.start_preview() camera.start_recording('/home/pi/' ...
[ 16564, 18144, 1330, 13993, 35632, 198, 6738, 640, 1330, 3993, 198, 11748, 275, 2069, 18, 198, 11748, 28686, 13, 6978, 198, 11748, 850, 14681, 198, 82, 18, 796, 275, 2069, 18, 13, 16366, 10786, 82, 18, 11537, 198, 27041, 316, 796, 705,...
2.370833
240
from datetime import datetime if __name__ == "__main__": run_example()
[ 6738, 4818, 8079, 1330, 4818, 8079, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1057, 62, 20688, 3419, 198 ]
2.785714
28
#!/usr/bin/env python from __future__ import print_function from kaldi.segmentation import NnetSAD, SegmentationProcessor from kaldi.nnet3 import NnetSimpleComputationOptions from kaldi.util.table import SequentialMatrixReader # Construct SAD model = NnetSAD.read_model("final.raw") post = NnetSAD.read_average_poster...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 6738, 479, 37566, 13, 325, 5154, 341, 1330, 399, 3262, 50, 2885, 11, 1001, 5154, 341, 18709, 273, 198, 6738, 479, 37566, ...
2.598441
513
from cProfile import label from matplotlib.pyplot import text import pandas as pd import numpy as np from tokenizers import Tokenizer import torch from torch.utils.data import Dataset, DataLoader from typing import Dict, Any, Tuple from datasets import load_dataset
[ 6738, 269, 37046, 1330, 6167, 198, 6738, 2603, 29487, 8019, 13, 9078, 29487, 1330, 2420, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 11241, 11341, 1330, 29130, 7509, 198, 11748, 28034, 198, 6738, ...
3.613333
75
#!/usr/bin/python # mp4museum.org by julius schmiedel 2019 import os import sys import glob from subprocess import Popen, PIPE import RPi.GPIO as GPIO FNULL = open(os.devnull, "w") # setup GPIO pin GPIO.setmode(GPIO.BOARD) GPIO.setup(11, GPIO.IN, pull_up_down = GPIO.PUD_DOWN) GPIO.setup(13, GPIO.IN, pull_up_down = ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 29034, 19, 76, 6744, 13, 2398, 416, 474, 377, 3754, 5513, 76, 798, 417, 13130, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 15095, 198, 6738, 850, 14681, 1330, 8099, 268, ...
2.507082
353
""" Comparison between the efficiency of the Boyer-Moore algorithm and the naive substring search algorithm. The runtimes for both algorithms are plotted on the same axes. """ import matplotlib.pyplot as plt import numpy as np import string import time import random from bm_alg import boyer_moore_match, naive_match #...
[ 37811, 198, 50249, 1653, 1022, 262, 9332, 286, 262, 6387, 263, 12, 40049, 11862, 290, 262, 24354, 3293, 1806, 2989, 11862, 13, 198, 464, 1057, 22355, 329, 1111, 16113, 389, 37515, 319, 262, 976, 34197, 13, 198, 37811, 198, 198, 11748, ...
2.62782
532
ans = dict() pairs = dict() n = int(input()) for i in range(0, n-1): child, parent = input().split() if parent in pairs: pairs[parent].append(child) else: pairs[parent] = [child] if n > 0: for k in pairs: create_tree(k) for key in sorted(ans.keys()): print(key, ans[ke...
[ 504, 796, 8633, 3419, 198, 79, 3468, 796, 8633, 3419, 198, 77, 796, 493, 7, 15414, 28955, 198, 1640, 1312, 287, 2837, 7, 15, 11, 299, 12, 16, 2599, 198, 220, 220, 220, 1200, 11, 2560, 796, 5128, 22446, 35312, 3419, 198, 220, 220, ...
2.197279
147
if __name__ == "__main__": main()
[ 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.157895
19
import json from typing import Type, TYPE_CHECKING from django.core.exceptions import ObjectDoesNotExist from django.utils.decorators import method_decorator from django.views.decorators.cache import cache_page from rest_framework import viewsets, filters from rest_framework.exceptions import NotFound from rest_framew...
[ 11748, 33918, 198, 6738, 19720, 1330, 5994, 11, 41876, 62, 50084, 2751, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 9515, 13921, 3673, 3109, 396, 198, 6738, 42625, 14208, 13, 26791, 13, 12501, 273, 2024, 1330, 2446, 6...
3.884
250
from magma import _BitType, BitType, BitsType, UIntType, SIntType def raise_mantle_import_error_unary(self): raise MantleImportError( "Operators are not defined until mantle has been imported") def raise_mantle_import_error_binary(self, other): raise MantleImportError( "Operators are not d...
[ 6738, 2153, 2611, 1330, 4808, 13128, 6030, 11, 4722, 6030, 11, 44733, 6030, 11, 471, 5317, 6030, 11, 311, 5317, 6030, 628, 628, 198, 4299, 5298, 62, 76, 16941, 62, 11748, 62, 18224, 62, 403, 560, 7, 944, 2599, 198, 220, 220, 220, ...
1.929429
1,332
import subprocess import sys import time import traceback from queue import Queue from sultan.core import Base from sultan.echo import Echo from threading import Thread def print_stdout(self, always_print=False): """ Prints the stdout to console - if there is any stdout, otherwise does nothing. ...
[ 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 12854, 1891, 198, 198, 6738, 16834, 1330, 4670, 518, 198, 6738, 264, 30454, 13, 7295, 1330, 7308, 198, 6738, 264, 30454, 13, 30328, 1330, 21455, 198, 6738, 4704, 278, 13...
2.534056
646
import os import click from .util import cli_message from great_expectations.render import DefaultJinjaPageView from great_expectations.version import __version__ as __version__ msg_prompt_choose_data_source = """ Configure a datasource: 1. Pandas DataFrame 2. Relational database (SQL) 3. Spark DataFram...
[ 11748, 28686, 198, 11748, 3904, 198, 198, 6738, 764, 22602, 1330, 537, 72, 62, 20500, 198, 6738, 1049, 62, 1069, 806, 602, 13, 13287, 1330, 15161, 41, 259, 6592, 9876, 7680, 198, 6738, 1049, 62, 1069, 806, 602, 13, 9641, 1330, 11593, ...
3.210638
940
# -*- coding: utf-8 -*- """ Provide download function by request """ from datetime import datetime import logging import time import urllib.parse import requests from bs4 import BeautifulSoup
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 37811, 201, 198, 15946, 485, 4321, 2163, 416, 2581, 201, 198, 37811, 201, 198, 201, 198, 6738, 4818, 8079, 1330, 4818, 8079, 201, 198, 11748, 18931, 201, ...
2.753247
77
#!/usr/bin/python s = Solution() print s.reverseWords('a x')
[ 2, 48443, 14629, 14, 8800, 14, 29412, 628, 198, 198, 82, 796, 28186, 3419, 198, 4798, 264, 13, 50188, 37117, 10786, 64, 2124, 11537, 628 ]
2.6
25
# -*- coding: utf-8 -*- # # The MIT License (MIT) # # Copyright (C) 2017 Marcos Pereira <marcospereira.mpj@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, in...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 357, 34, 8, 2177, 37033, 17229, 8704, 1279, 3876, 6966, 431, 260, 8704, 13, 3149, 73, 31, 14816, ...
2.382704
2,012
#!venv/bin/python3 cs = [int(c) for c in open("inputs/23.in", "r").readline().strip()] print("Part 1:", f(cs.copy(), 100)[0]) print("Part 2:", f(cs.copy() + [i for i in range(10, 1000001)], 10000000)[1])
[ 2, 0, 574, 85, 14, 8800, 14, 29412, 18, 198, 6359, 796, 685, 600, 7, 66, 8, 329, 269, 287, 1280, 7203, 15414, 82, 14, 1954, 13, 259, 1600, 366, 81, 11074, 961, 1370, 22446, 36311, 3419, 60, 198, 198, 4798, 7203, 7841, 352, 25, ...
2.318182
88
# Import the application from device_registry import app # Run the application in debug mode app.run(host='0.0.0.0', port=int(app.config['PORT']), debug=True)
[ 2, 17267, 262, 3586, 198, 6738, 3335, 62, 2301, 4592, 1330, 598, 198, 198, 2, 5660, 262, 3586, 287, 14257, 4235, 198, 1324, 13, 5143, 7, 4774, 11639, 15, 13, 15, 13, 15, 13, 15, 3256, 2493, 28, 600, 7, 1324, 13, 11250, 17816, 15...
3.076923
52
import yaml from ruamel.yaml import YAML from ruamel.yaml.error import YAMLError try: from yaml import CSafeLoader as SafeLoader except ImportError: from yaml import SafeLoader from dvc.exceptions import StageFileCorruptedError from dvc.utils.compat import open def parse_stage_for_update(text, path): ...
[ 11748, 331, 43695, 198, 6738, 7422, 17983, 13, 88, 43695, 1330, 575, 2390, 43, 198, 6738, 7422, 17983, 13, 88, 43695, 13, 18224, 1330, 575, 2390, 2538, 81, 1472, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 331, 43695, 1330, 9429, ...
2.954373
263
entrada = input("palabra") listaDeLetras = [] for i in entrada: listaDeLetras.append(i)
[ 298, 81, 4763, 796, 5128, 7203, 18596, 397, 430, 4943, 198, 4868, 64, 5005, 5756, 8847, 796, 17635, 198, 1640, 1312, 287, 24481, 4763, 25, 198, 220, 220, 220, 1351, 64, 5005, 5756, 8847, 13, 33295, 7, 72, 8, 628 ]
2.325
40
import numpy as np from pyad.nn import NeuralNet from sklearn.datasets import load_breast_cancer from sklearn.model_selection import train_test_split np.random.seed(0) data = load_breast_cancer() X_train, X_test, y_train, y_test = train_test_split( data.data, data.target, train_size=0.8, random_state=0 ) nn = Ne...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 12972, 324, 13, 20471, 1330, 47986, 7934, 198, 6738, 1341, 35720, 13, 19608, 292, 1039, 1330, 3440, 62, 4679, 459, 62, 48870, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, ...
2.534615
260
from microbit import * I2CADR = 0x0E DIE_TEMP = 0x0F while True: i2c.write(I2CADR, bytearray([DIE_TEMP])) d = i2c.read(I2CADR, 1) x = d[0] if x >=128: x -= 256 x += 10 print(x) sleep(500)
[ 6738, 4580, 2545, 1330, 1635, 198, 198, 40, 17, 34, 2885, 49, 796, 657, 87, 15, 36, 198, 35, 10008, 62, 51, 39494, 220, 796, 657, 87, 15, 37, 198, 198, 4514, 6407, 25, 198, 220, 220, 220, 1312, 17, 66, 13, 13564, 7, 40, 17, ...
1.674074
135
import ssl import nltk from textblob import TextBlob from nltk.corpus import stopwords # set SSL try: _create_unverified_https_context = ssl._create_unverified_context except AttributeError: pass else: ssl._create_default_https_context = _create_unverified_https_context # download noun data (if required...
[ 11748, 264, 6649, 198, 198, 11748, 299, 2528, 74, 198, 6738, 2420, 2436, 672, 1330, 8255, 3629, 672, 198, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 2245, 10879, 628, 198, 2, 900, 25952, 198, 28311, 25, 198, 220, 220, 220, 4808,...
2.883636
275
from django_celery_beat.models import PeriodicTask, IntervalSchedule from django.core.management.base import BaseCommand from django.db import IntegrityError
[ 198, 6738, 42625, 14208, 62, 7015, 88, 62, 12945, 13, 27530, 1330, 18581, 291, 25714, 11, 4225, 2100, 27054, 5950, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13, 9945, 1330, 39348...
3.681818
44
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ 2, 15069, 357, 66, 8, 33448, 350, 37382, 47, 37382, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845...
3.222417
571
# required modules import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from matplotlib import cm from matplotlib.colors import Normalize from mpl_toolkits.mplot3d import Axes3D from matplotlib.animation import FuncAnimation # two-dimesional version # three-dimensional version ...
[ 2, 2672, 13103, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 2164, 2340, 43106, 355, 50000, 43106, 198, 6738, 2603, 29487, 8019, 1330, 12067, 198, 6...
3.211538
104
# Copyright 2019 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 or agreed to in writing,...
[ 2, 15069, 13130, 3012, 11419, 198, 2, 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.480469
512
from typing import Optional, List, TypeVar, Generic, Callable import discord.ui from .item import Item from .select_option import SelectOption from .custom import CustomSelect C = TypeVar("C", bound=discord.ui.Select)
[ 6738, 19720, 1330, 32233, 11, 7343, 11, 5994, 19852, 11, 42044, 11, 4889, 540, 198, 198, 11748, 36446, 13, 9019, 198, 198, 6738, 764, 9186, 1330, 9097, 198, 6738, 764, 19738, 62, 18076, 1330, 9683, 19722, 198, 6738, 764, 23144, 1330, ...
3.555556
63
"""This module contains the general information for StorageScsiLunRef ManagedObject.""" from ...ucscmo import ManagedObject from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta from ...ucscmeta import VersionMeta
[ 37811, 1212, 8265, 4909, 262, 2276, 1321, 329, 20514, 3351, 13396, 43, 403, 8134, 1869, 1886, 10267, 526, 15931, 198, 198, 6738, 2644, 1229, 1416, 5908, 1330, 1869, 1886, 10267, 198, 6738, 2644, 1229, 82, 535, 382, 28961, 1330, 471, 66,...
3.737705
61
from __future__ import print_function, absolute_import, division from sys import stdout as _stdout from time import time as _time import numpy as np try: import pyfftw pyfftw.interfaces.cache.enable() pyfftw.interfaces.cache.set_keepalive_time(10) rfftn = pyfftw.interfaces.numpy_fft.rfftn irfftn =...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 4112, 62, 11748, 11, 7297, 198, 6738, 25064, 1330, 14367, 448, 355, 4808, 19282, 448, 198, 6738, 640, 1330, 640, 355, 4808, 2435, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 28...
2.575145
1,038
#!/usr/bin/env python3 import os import sys import time sys.path.append(os.getcwd()+'/lib') import random from dataclasses import dataclass, field from ObsInfo import ObsInfo def generate_random_obs(num_obs: int, size_list: list, config_data): """ config_file_name = "config.json" json_file = open(config_f...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 1136, 66, 16993, 3419, 10, 26488, 8019, 11537, 198, 11748, 4738, 198, 6738, 4818, 330...
2.179204
452
# TG-UserBot - A modular Telegram UserBot script for Python. # Copyright (C) 2019 Kandarp <https://github.com/kandnub> # # TG-UserBot is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of t...
[ 2, 44121, 12, 12982, 20630, 532, 317, 26507, 50203, 11787, 20630, 4226, 329, 11361, 13, 201, 198, 2, 15069, 357, 34, 8, 13130, 220, 50224, 5117, 1279, 5450, 1378, 12567, 13, 785, 14, 74, 392, 77, 549, 29, 201, 198, 2, 201, 198, 2,...
2.758514
646
import numpy as np
[ 11748, 299, 32152, 355, 45941, 198 ]
3.166667
6
__package_name__ = "pyrocco" __version__ = "0.1.0" __author__ = "Joo Palmeiro" __author_email__ = "jm.palmeiro@campus.fct.unl.pt" __description__ = "A Python CLI to add the Party Parrot to a custom background image." __url__ = "https://github.com/joaopalmeiro/pyrocco"
[ 834, 26495, 62, 3672, 834, 796, 366, 9078, 305, 535, 78, 1, 198, 834, 9641, 834, 796, 366, 15, 13, 16, 13, 15, 1, 198, 834, 9800, 834, 796, 366, 41, 2238, 3175, 1326, 7058, 1, 198, 834, 9800, 62, 12888, 834, 796, 366, 73, 76, ...
2.537736
106
# coding: utf-8 # 2019/8/23 @ tongshiwei
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 13130, 14, 23, 14, 1954, 2488, 10479, 44019, 42990, 198 ]
2.157895
19
""" Round a number -------------- Input (float) A floating point number (int) Number of decimals Default value is: 0 Output (float) Rounded number (int) Whether using the default decimals value, the return number will be the nearest ...
[ 37811, 201, 198, 22685, 257, 1271, 201, 198, 26171, 201, 198, 20560, 220, 220, 357, 22468, 8, 220, 220, 220, 220, 317, 12462, 966, 1271, 201, 198, 220, 220, 220, 220, 220, 220, 220, 357, 600, 8, 220, 220, 220, 220, 220, 220, 7913,...
2.696017
477
#!/usr/bin/env python3 import RPi.GPIO as GPIO from mfrc522 import SimpleMFRC522 import play import time if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, 6738, 285, 69, 6015, 49542, 1330, 17427, 49800, 7397, 49542, 198, 198, 11748, 711, 198, 11748, 640, 628, 198, 361, 11593, 3...
2.625
56
import os MYPY = False if MYPY: from typing_extensions import Final PYTHON2_VERSION = (2, 7) # type: Final PYTHON3_VERSION = (3, 6) # type: Final PYTHON3_VERSION_MIN = (3, 4) # type: Final CACHE_DIR = '.mypy_cache' # type: Final CONFIG_FILE = 'mypy.ini' # type: Final SHARED_CONFIG_FILES = ['setup.cfg', ] # ...
[ 11748, 28686, 198, 198, 26708, 47, 56, 796, 10352, 198, 361, 17615, 47, 56, 25, 198, 220, 220, 220, 422, 19720, 62, 2302, 5736, 1330, 8125, 198, 198, 47, 56, 4221, 1340, 17, 62, 43717, 796, 357, 17, 11, 767, 8, 220, 1303, 2099, ...
2.062731
542
#!/usr/bin/env python # -*- coding: utf-8 -*- # License: BSD-3 (https://tldrlegal.com/license/bsd-3-clause-license-(revised)) # Copyright (c) 2016-2021, Cabral, Juan; Luczywo, Nadia # All rights reserved. # ============================================================================= # DOCS # =========================...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 13789, 25, 347, 10305, 12, 18, 357, 5450, 1378, 83, 335, 81, 18011, 13, 785, 14, 43085, 14, 1443, 67, 12, 18, ...
2.785714
980
# -*- coding: utf-8 -*- # # This class was auto-generated from the API references found at # https://support.direct.ingenico.com/documentation/api/reference/ # from ingenico.direct.sdk.data_object import DataObject from ingenico.direct.sdk.domain.address import Address from ingenico.direct.sdk.domain.company_informatio...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 770, 1398, 373, 8295, 12, 27568, 422, 262, 7824, 10288, 1043, 379, 198, 2, 3740, 1378, 11284, 13, 12942, 13, 36795, 3713, 13, 785, 14, 22897, 341, 14, 150...
3.606557
122
import time import pykeyboard # TODO: Replace following two lines with the code that activate the application. print('Activate the application 3 seconds.') time.sleep(3) k = pykeyboard.PyKeyboard() k.press_key(k.left_key) time.sleep(1) # Hold down left key for 1 second. k.release_key(k.left_key)
[ 11748, 640, 198, 198, 11748, 12972, 2539, 3526, 628, 198, 2, 16926, 46, 25, 40177, 1708, 734, 3951, 351, 262, 2438, 326, 15155, 262, 3586, 13, 198, 4798, 10786, 25526, 378, 262, 3586, 513, 4201, 2637, 8, 198, 2435, 13, 42832, 7, 18,...
3.040404
99
import os import tarfile from abc import ABC, abstractmethod from glob import glob import shutil import random import zstandard """ This registry is for automatically downloading and extracting datasets. To register a class you need to inherit the DataDownloader class, provide name, filetype and url attributes, and (...
[ 11748, 28686, 198, 11748, 13422, 7753, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 15095, 1330, 15095, 198, 11748, 4423, 346, 198, 11748, 4738, 198, 11748, 1976, 20307, 198, 198, 37811, 198, 1212, 20478, 318, 329, 6338, ...
2.488
750
from logging import getLogger logger = getLogger(__name__)
[ 6738, 18931, 1330, 651, 11187, 1362, 198, 198, 6404, 1362, 796, 651, 11187, 1362, 7, 834, 3672, 834, 8, 198 ]
3
20
#!/usr/bin/env python import os import json import sys import unittest import urllib2 from flexmock import flexmock sys.path.append(os.path.join(os.path.dirname(__file__), "../../")) import solr_interface import search_exceptions
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 25064, 198, 11748, 555, 715, 395, 198, 11748, 2956, 297, 571, 17, 198, 198, 6738, 7059, 76, 735, 1330, 7059, 76, 735, 198, 198, 17597,...
2.841463
82
# coding=utf-8 # Copyright (c) 2019, NVIDIA 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 re...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 357, 66, 8, 13130, 11, 15127, 23929, 44680, 6234, 13, 220, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198...
3.561111
540
# -*- coding: utf-8 -*- import os from django.db import models from django.db.models.signals import post_delete from django.dispatch import receiver from .base import Pessoa from djangosige.apps.login.models import Usuario from djangosige.configs.settings import MEDIA_ROOT # Deletar logo quando empr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 11748, 28686, 201, 198, 201, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 201, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281,...
2.651163
129
import os from nltk.translate.bleu_score import corpus_bleu from nltk.translate.bleu_score import SmoothingFunction import json from tqdm import tqdm, trange from random import sample import numpy as np import pickle import argparse import bert_eval_acc import svm_eval_acc smooth = SmoothingFunction() def eval_bleu...
[ 11748, 28686, 198, 6738, 299, 2528, 74, 13, 7645, 17660, 13, 903, 84, 62, 26675, 1330, 35789, 62, 903, 84, 198, 6738, 299, 2528, 74, 13, 7645, 17660, 13, 903, 84, 62, 26675, 1330, 2439, 1025, 722, 22203, 198, 11748, 33918, 198, 6738...
2.301099
1,820
"""Constants for the UniFi component.""" import logging LOGGER = logging.getLogger(__package__) DOMAIN = "unifi" CONTROLLER_ID = "{host}-{site}" CONF_CONTROLLER = "controller" CONF_SITE_ID = "site" UNIFI_WIRELESS_CLIENTS = "unifi_wireless_clients" CONF_ALLOW_BANDWIDTH_SENSORS = "allow_bandwidth_sensors" CONF_BLOCK...
[ 37811, 34184, 1187, 329, 262, 43376, 10547, 7515, 526, 15931, 198, 11748, 18931, 198, 198, 25294, 30373, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 26495, 834, 8, 198, 39170, 29833, 796, 366, 403, 22238, 1, 198, 198, 10943, 5446, 46, ...
2.310345
348
# Your OrderedStream object will be instantiated and called as such: # obj = OrderedStream(n) # param_1 = obj.insert(id,value)
[ 198, 198, 2, 3406, 14230, 1068, 12124, 2134, 481, 307, 9113, 12931, 290, 1444, 355, 884, 25, 198, 2, 26181, 796, 14230, 1068, 12124, 7, 77, 8, 198, 2, 5772, 62, 16, 796, 26181, 13, 28463, 7, 312, 11, 8367, 8, 198 ]
3.071429
42
import numpy as np from treelas import post_order, TreeInstance
[ 11748, 299, 32152, 355, 45941, 198, 6738, 2054, 417, 292, 1330, 1281, 62, 2875, 11, 12200, 33384, 628, 198 ]
3.473684
19