content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from rest_framework import status from rest_framework.test import APITestCase from django.urls import reverse from ..models import User
[ 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 13, 9288, 1330, 3486, 2043, 395, 20448, 198, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 198, 6738, 11485, 27530, 1330, 11787, 628 ]
3.861111
36
import qgate from qgate.script import * # creating simulator instance sim = qgate.simulator.cpu() # creating quantum registers that represent qubits. qregs = new_qregs(3) qreg0, qreg1, qreg2 = qregs print('1 qubit') sim.run(H(qreg0)) qgate.dump(sim.qubits) print('2 qubits') sim.run(X(qreg1)) qgate.dump(sim.qubits) ...
[ 11748, 10662, 10494, 198, 6738, 10662, 10494, 13, 12048, 1330, 1635, 198, 198, 2, 4441, 35375, 4554, 198, 14323, 796, 10662, 10494, 13, 14323, 8927, 13, 36166, 3419, 198, 198, 2, 4441, 14821, 28441, 326, 2380, 627, 9895, 13, 198, 80, ...
2.241935
372
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under th...
[ 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, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2,...
3.470024
417
#Assignment 12 : Basic Data Analysis # Basic demonstration manipulating publicly available datasets # Simply run with your latitude and longitude to get the last day_count # days of weather at the trail_count nearest Mountian Bike trails to your location # within distance miles of your location import requests,time...
[ 2, 8021, 16747, 1105, 1058, 14392, 6060, 14691, 198, 198, 2, 14392, 13646, 29349, 7271, 1695, 40522, 198, 198, 2, 17973, 1057, 351, 534, 32477, 290, 890, 3984, 284, 651, 262, 938, 1110, 62, 9127, 220, 198, 2, 1528, 286, 6193, 379, 2...
2.462671
951
import json import struct import base64 import binascii import Crypto.Cipher.AES
[ 171, 119, 123, 11748, 33918, 201, 198, 11748, 2878, 201, 198, 11748, 2779, 2414, 201, 198, 11748, 9874, 292, 979, 72, 201, 198, 201, 198, 11748, 36579, 13, 34, 10803, 13, 32, 1546, 201, 198 ]
2.542857
35
#!/usr/bin/env python # -*- coding: utf-8 -*- from sys import argv import bottle from bottle import default_app, request, route, response, get from pymongo import MongoClient import json import api bottle.debug(True) @get('/') @get('/geek') @route @route('/login', method=["OPTIONS", "POST"]) @enable_cors @route...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 25064, 1330, 1822, 85, 198, 198, 11748, 9294, 198, 6738, 9294, 1330, 4277, 62, 1324, 11, 2581, 11, 6339, 11, 28...
2.580902
377
""" min oriented priority queue implemented with binary heap array based implementation """ from python_priority_queue import PriorityQueueBase if __name__ == "__main__": heapq = HeapPriorityQueue() heapq.add(3,4) heapq.add(8,21) heapq.add(2,3) heapq.add(4,5) print(heapq.min())
[ 37811, 949, 25921, 8475, 16834, 9177, 351, 13934, 24575, 7177, 1912, 7822, 37227, 198, 6738, 21015, 62, 49336, 62, 36560, 1330, 34416, 34991, 14881, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, ...
2.666667
114
# Copyright 2017 James McCauley # # 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 writi...
[ 2, 15069, 2177, 3700, 5108, 559, 1636, 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.878282
419
''' # Copyright © 2019 AlgoExpert, LLC. All rights reserved. # O(n) time | O(1) space def findThreeLargestNumbers(array): threeLargest = [None, None, None] for num in array: print(num) updateLargest(threeLargest, num) print(threeLargest) print("_______________") return threeLargest ...
[ 7061, 6, 1303, 15069, 10673, 13130, 978, 2188, 3109, 11766, 11, 11419, 13, 1439, 2489, 10395, 13, 198, 2, 440, 7, 77, 8, 640, 930, 440, 7, 16, 8, 2272, 198, 198, 4299, 1064, 12510, 43, 853, 395, 49601, 7, 18747, 2599, 198, 220, ...
2.286052
423
params={ 'enc_type': 'lstm', 'dec_type': 'lstm', 'nz': 32, 'ni': 512, 'enc_nh': 1024, 'dec_nh': 1024, 'dec_dropout_in': 0.5, 'dec_dropout_out': 0.5, 'batch_size': 32, 'epochs': 100, 'test_nepoch': 5, 'train_data': 'datasets/yelp_data/yelp.train.txt', 'val_data': 'dat...
[ 198, 37266, 34758, 198, 220, 220, 220, 705, 12685, 62, 4906, 10354, 705, 75, 301, 76, 3256, 198, 220, 220, 220, 705, 12501, 62, 4906, 10354, 705, 75, 301, 76, 3256, 198, 220, 220, 220, 705, 27305, 10354, 3933, 11, 198, 220, 220, 2...
1.794677
263
#!/usr/bin/env python3 # https://www.hackerrank.com/challenges/piling-up # #python import collections import io import sys import unittest if __name__ == '__main__': # pragma: no cover main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 3740, 1378, 2503, 13, 31153, 8056, 962, 13, 785, 14, 36747, 34120, 14, 79, 4386, 12, 929, 198, 2, 1303, 29412, 198, 198, 11748, 17268, 198, 11748, 33245, 198, 11748, 25064, 19...
2.743243
74
# -*- coding: utf-8 -*- # (c) Copyright 2020 Sensirion AG, Switzerland from __future__ import absolute_import, division, print_function from sensirion_i2c_sht.sht3x import Sht3xTemperature, Sht3xHumidity, \ Sht3xStatusRegister import pytest @pytest.mark.parametrize("value", [ dict({'ticks': 0, 'degrees_celsi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 357, 66, 8, 15069, 12131, 14173, 343, 295, 13077, 11, 14679, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 6738, 3054...
2.280436
2,111
#!/usr/bin/env python __author__ = 'meatz' import os import sys import gzip import json import hashlib import resource import datetime #from guppy import hpy from CacheBuckets import CacheBuckets from StorageSystem import StorageSystem START_TIME = 0 USER_ID = 1 HOST_ID = 2 PROCESS_ID =...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 834, 9800, 834, 796, 705, 1326, 27906, 6, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 308, 13344, 198, 11748, 33918, 198, 11748, 12234, 8019, 198, 11748, 8271, 198, 11748...
1.85786
598
""" cRIO server requests 'acquire_raw_data' """ import socket import scipy from scipy.fftpack import fft import math as m import numpy as np ##Fuction to calculate heading based on 3 hydrophone's data man = CRIOManager() man.callback()
[ 37811, 269, 7112, 46, 4382, 7007, 198, 220, 220, 220, 705, 330, 29782, 62, 1831, 62, 7890, 6, 198, 198, 37811, 198, 11748, 17802, 198, 11748, 629, 541, 88, 198, 6738, 629, 541, 88, 13, 487, 83, 8002, 1330, 277, 701, 198, 11748, 10...
2.905882
85
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Tests the iPOPO @Provides decorator. :author: Thomas Calmant """ # Tests from tests.interfaces import IEchoService from tests.ipopo import install_bundle, install_ipopo # Pelix from pelix.framework import FrameworkFactory, BundleContext # Standard library tr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 1377, 14041, 12, 27195, 7656, 25, 41002, 12, 23, 1377, 198, 37811, 198, 51, 3558, 262, 9736, 3185, 46, 2488, 15946, 1460, 11705, 1352, 13, 198, 198, 25, 9800, 25, 5658, 38280, 415...
2.289504
2,563
from django.contrib import admin from forms import ArticleForm from models import Article from models import Tag admin.site.register(Article, ArticleAdmin) admin.site.register(Tag)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 5107, 1330, 10172, 8479, 198, 6738, 4981, 1330, 10172, 198, 6738, 4981, 1330, 17467, 628, 198, 28482, 13, 15654, 13, 30238, 7, 14906, 11, 10172, 46787, 8, 198, 28482, 13, 15654,...
3.893617
47
#importing all the necessary libraries import matplotlib.pyplot as plt from sklearn import linear_model import pandas as pd import pylab as pl import numpy as np import tkinter as tk import time af = pd.read_csv('fish.csv') #taking the dataset print(af.head()) # # af = df[['Rank','Rating','Votes']] # # ...
[ 2, 11748, 278, 477, 262, 3306, 12782, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 6738, 1341, 35720, 1330, 14174, 62, 19849, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 279, 2645, 397, ...
2.287815
952
import unittest from surgery_of_1c_storage.__main__ import SurgeryOf1CStorage import tempfile import os import sys from contextlib import contextmanager from io import StringIO class TestSurgeryOf1CStorage(unittest.TestCase): """Тест проходятся только при наличии развернутых тестовых баз на Postgres и MS SQL ...
[ 11748, 555, 715, 395, 198, 6738, 8185, 62, 1659, 62, 16, 66, 62, 35350, 13, 834, 12417, 834, 1330, 39037, 5189, 16, 34, 31425, 198, 11748, 20218, 7753, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 4732, 8019, 1330, 4732, 37153, 19...
1.889734
263
lista = [['João', 18], ['Carla', 25], ['Maria', 30]] # PARA Estrutura 1. print(f'Lista completa: {lista}') print(f'Lista com estrutura: {lista[0]}') print(f'Lista com critérios: {lista[1][0]}')
[ 4868, 64, 796, 16410, 6, 9908, 28749, 3256, 1248, 4357, 37250, 9914, 5031, 3256, 1679, 4357, 37250, 46827, 3256, 1542, 11907, 198, 2, 350, 24401, 412, 2536, 315, 5330, 352, 13, 198, 4798, 7, 69, 6, 8053, 64, 1224, 8326, 25, 1391, 48...
2.193182
88
from django.contrib import admin from django.urls import path, re_path from django.conf.urls import include from HomeCloud import views import django.views.i18n urlpatterns = [ #DaSH path('',views.index,name="DaSH-Index"), path('i18n/', include('django.conf.urls.i18n')), path('cpuusage',views.getCPUpe...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 302, 62, 6978, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 198, 6738, 5995, 18839, 1330, 5009, 198, 11748, 42625, ...
2.524752
404
#!/usr/bin/env python from api.txtly.txtly_request import TxtlyRequest __author__ = "Likhit Jain and Yashita P Jain" __copyright__ = "Copyright 2019, Kaleyra" __license__ = "MIT" __version__ = "1.0" __email__ = "support@kaleyra.com" __status__ = "Production" # The user can delete the created txtly links. # If Txtly ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 40391, 13, 14116, 306, 13, 14116, 306, 62, 25927, 1330, 309, 742, 306, 18453, 198, 198, 834, 9800, 834, 796, 366, 43, 13848, 270, 449, 391, 290, 575, 1077, 5350, 350, 449,...
2.866667
225
# -*- coding: utf8 -*- import matplotlib.pyplot as plt if __name__ == '__main__': main()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 23, 532, 9, 12, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.232558
43
# Generated by Django 3.2 on 2021-11-16 15:45 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 319, 33448, 12, 1157, 12, 1433, 1315, 25, 2231, 201, 198, 201, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 201, 198, 201, 198 ]
2.657143
35
from tkinter import * import paho.mqtt.client as mqtt __author__ = 'Niels' root = Tk() app = App(root)
[ 6738, 256, 74, 3849, 1330, 1635, 198, 11748, 279, 17108, 13, 76, 80, 926, 13, 16366, 355, 285, 80, 926, 198, 198, 834, 9800, 834, 796, 705, 34153, 1424, 6, 628, 198, 15763, 796, 309, 74, 3419, 198, 198, 1324, 796, 2034, 7, 15763, ...
2.326087
46
# -*- coding: utf-8 -*- """ -------------------------------------- @File : proxy.py @Author : maixiaochai @Email : maixiaochai@outlook.com @CreatedOn : 2020/8/15 19:06 -------------------------------------- """ from re import compile import requests from .web_handler import WebHandler
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 3880, 23031, 198, 31, 8979, 220, 220, 220, 220, 220, 220, 1058, 15741, 13, 9078, 198, 31, 13838, 220, 220, 220, 220, 1058, 17266, 844, 544, 5374, 1872...
2.990196
102
""" 가로 길이가 2이고 세로의 길이가 1인 직사각형모양의 타일이 있습니다. 이 직사각형 타일을 이용하여 세로의 길이가 2이고 가로의 길이가 n인 바닥을 가득 채우려고 합니다. 타일을 채울 때는 다음과 같이 2가지 방법이 있습니다. 타일을 가로로 배치 하는 경우 타일을 세로로 배치 하는 경우 직사각형의 가로의 길이 n이 매개변수로 주어질 때, 이 직사각형을 채우는 방법의 수를 return 하는 solution 함수를 완성해주세요. 제한사항 가로의 길이 n은 60,000이하의 자연수 입니다. 경우의 수가 많아 질 수 있으므로, 경우의 수를 1,000,000,00...
[ 37811, 198, 166, 108, 222, 167, 94, 250, 220, 166, 116, 116, 35975, 112, 166, 108, 222, 362, 35975, 112, 166, 111, 254, 23821, 226, 116, 167, 94, 250, 35975, 246, 220, 166, 116, 116, 35975, 112, 166, 108, 222, 352, 35975, 116, 238...
0.563107
618
from logging import getLogger from kaggle_adcal_2021.utils.template import GokartTask logger = getLogger(__name__)
[ 6738, 18931, 1330, 651, 11187, 1362, 198, 198, 6738, 479, 9460, 293, 62, 324, 9948, 62, 1238, 2481, 13, 26791, 13, 28243, 1330, 402, 482, 433, 25714, 198, 198, 6404, 1362, 796, 651, 11187, 1362, 7, 834, 3672, 834, 8, 628 ]
2.878049
41
# Find the divisors! # Create a function named divisors/Divisors that takes an integer n > 1 and returns an array with all of the integer's # divisors(except for 1 and the number itself), from smallest to largest. If the number is prime return the string # '(integer) is prime' (null in C#) (use Either String a in Hask...
[ 2, 9938, 262, 2659, 271, 669, 0, 198, 198, 2, 13610, 257, 2163, 3706, 2659, 271, 669, 14, 24095, 271, 669, 326, 2753, 281, 18253, 299, 1875, 352, 290, 5860, 281, 7177, 351, 477, 286, 262, 18253, 338, 198, 2, 2659, 271, 669, 7, 1...
2.764151
212
# pylint: disable=wildcard-import """Statistical tests and diagnostics for ArviZ.""" from .density_utils import * from .diagnostics import * from .stats import * from .stats import _calculate_ics from .stats_refitting import * from .stats_utils import * __all__ = [ "apply_test_function", "bfmi", ...
[ 2, 279, 2645, 600, 25, 15560, 28, 21992, 9517, 12, 11748, 201, 198, 37811, 17126, 19929, 5254, 290, 6689, 34558, 329, 943, 8903, 57, 526, 15931, 201, 198, 6738, 764, 43337, 62, 26791, 1330, 1635, 201, 198, 6738, 764, 47356, 34558, 133...
2.024845
322
# (c) Crown copyright Met Office. All rights reserved. # For further details please refer to the file COPYRIGHT # which you should have received as part of this distribution """ Fortran language handling classes. """ import logging from fparser.common.readfortran import FortranFileReader # type: ignore from fparser.t...
[ 2, 357, 66, 8, 12223, 6634, 3395, 4452, 13, 1439, 2489, 10395, 13, 198, 2, 1114, 2252, 3307, 3387, 3522, 284, 262, 2393, 27975, 38162, 9947, 198, 2, 543, 345, 815, 423, 2722, 355, 636, 286, 428, 6082, 198, 37811, 198, 21926, 2596, ...
2.697644
764
# create an empty list coding_languages = [] coding_languages.append('Python') print(coding_languages) coding_languages.append('JavaScript') print(coding_languages)
[ 2, 2251, 281, 6565, 1351, 198, 66, 7656, 62, 75, 33213, 796, 17635, 198, 198, 66, 7656, 62, 75, 33213, 13, 33295, 10786, 37906, 11537, 198, 4798, 7, 66, 7656, 62, 75, 33213, 8, 198, 198, 66, 7656, 62, 75, 33213, 13, 33295, 10786, ...
2.929825
57
# package org.apache.helix.participant #from org.apache.helix.participant import * #from java.lang.management import ManagementFactory #from org.apache.log4j import Logger from org.apache.helix.ControllerChangeListener import ControllerChangeListener from org.apache.helix.HelixDataAccessor import HelixDataAccessor from...
[ 2, 5301, 8745, 13, 43073, 13, 2978, 844, 13, 48013, 415, 198, 2, 6738, 8745, 13, 43073, 13, 2978, 844, 13, 48013, 415, 1330, 1635, 198, 2, 6738, 20129, 13, 17204, 13, 27604, 1330, 8549, 22810, 198, 2, 6738, 8745, 13, 43073, 13, 64...
2.343514
2,783
import pytest import importlib module = importlib.import_module("12_subterranean_sustainability") parse = module.parse state_value = module.state_value @pytest.mark.parametrize( "number_of_generations, total_sum, output_state", [ (1, 91, "#...#....#.....#..#..#..#"), (2, 132, "##..##...##....#.....
[ 11748, 12972, 9288, 198, 11748, 1330, 8019, 198, 198, 21412, 796, 1330, 8019, 13, 11748, 62, 21412, 7203, 1065, 62, 7266, 353, 16474, 62, 82, 19542, 1799, 4943, 198, 29572, 796, 8265, 13, 29572, 198, 5219, 62, 8367, 796, 8265, 13, 521...
1.956268
686
import sys from os import environ, stat, chmod from os.path import dirname, realpath from os import remove from shutil import copyfile from pathlib import Path import subprocess def app_dir() -> str: """Get app dir.""" return environ.get('APP_DIR', dirname(realpath(__file__))) def windows(): """Prepare ...
[ 11748, 25064, 198, 6738, 28686, 1330, 551, 2268, 11, 1185, 11, 442, 4666, 198, 6738, 28686, 13, 6978, 1330, 26672, 3672, 11, 1103, 6978, 198, 6738, 28686, 1330, 4781, 198, 6738, 4423, 346, 1330, 4866, 7753, 198, 6738, 3108, 8019, 1330, ...
2.133531
1,011
from faker import Faker fake = Faker("ar_SA") print(fake.name()) print(fake.email()) print(fake.first_name()) print(fake.last_name()) print(fake.phone_number()) print(fake.address()) print(fake.text()) print(fake.name_male()) print(fake.name_female()) print(fake.job()) print(fake.word()) print(fake.w...
[ 6738, 277, 3110, 1330, 376, 3110, 201, 198, 201, 198, 30706, 796, 376, 3110, 7203, 283, 62, 4090, 4943, 201, 198, 201, 198, 4798, 7, 30706, 13, 3672, 28955, 201, 198, 4798, 7, 30706, 13, 12888, 28955, 201, 198, 4798, 7, 30706, 13, ...
2.521212
165
# pylint: disable=invalid-name,no-self-use import argparse import os from allennlp.common.testing import AllenNlpTestCase from allennlp.commands.fine_tune import FineTune, fine_tune_model_from_file_paths, fine_tune_model_from_args
[ 2, 279, 2645, 600, 25, 15560, 28, 259, 12102, 12, 3672, 11, 3919, 12, 944, 12, 1904, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 198, 6738, 477, 1697, 34431, 13, 11321, 13, 33407, 1330, 9659, 45, 34431, 14402, 20448, 198, 6738, ...
2.807229
83
import re import random import requests from bs4 import BeautifulSoup from datetime import datetime, timedelta if __name__ == "__main__": text=get_naver_news() print(text)
[ 11748, 302, 198, 11748, 4738, 198, 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 197, 52...
3.107143
56
import os import unittest from smart_getenv import getenv class GetenvTests(unittest.TestCase): """ Tests for getenv. """ test_var_name = '__ENV_UTILS_TEST_VAR' def delete_test_var(self): """ Delete test environment variable. """ if self.test_var_name in os.enviro...
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 6738, 4451, 62, 1136, 24330, 1330, 651, 24330, 628, 198, 4871, 3497, 24330, 51, 3558, 7, 403, 715, 395, 13, 14402, 20448, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 30307, 329, ...
2.227852
2,980
from django import forms from django.core.mail import send_mail from django.conf import settings
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 7295, 13, 4529, 1330, 3758, 62, 4529, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 628 ]
3.769231
26
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under th...
[ 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 257, 4866, 286, 262, 13789, 379, 198, 2,...
3.802632
152
import copy import numpy as np from flatland.envs.agent_utils import RailAgentStatus from collections import defaultdict from itertools import groupby
[ 11748, 4866, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 6228, 1044, 13, 268, 14259, 13, 25781, 62, 26791, 1330, 12950, 36772, 19580, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 340, 861, 10141, 1330, 1448, 1525, 198 ]
3.973684
38
# program version PROGRAM_VERSION = '1.0'
[ 2, 1430, 2196, 198, 4805, 7730, 24115, 62, 43717, 796, 705, 16, 13, 15, 6, 198 ]
2.625
16
from enum import Enum, unique from typing import Union from aquaui.utils import quotify, run_applescript from .types.buttons import Buttons from .types.result import Result @unique class Alert: """ Returns an object of type Result, which as a button_returned property. """ def with_buttons(self, but...
[ 6738, 33829, 1330, 2039, 388, 11, 3748, 198, 6738, 19720, 1330, 4479, 198, 6738, 14839, 559, 72, 13, 26791, 1330, 23611, 1958, 11, 1057, 62, 1324, 829, 6519, 198, 6738, 764, 19199, 13, 4360, 27288, 1330, 887, 27288, 198, 6738, 764, 19...
2.835526
304
from pynwb import NWBHDF5IO io = NWBHDF5IO(r'C:\Users\knasi\Consulting\NWB project\Ed\Jack\Jack.nwb', 'r') nwbfile = io.read() # Accessing raw data (if they are saved on the NWB file) print(nwbfile.acquisition) photonSeries = nwbfile.acquisition['TwoPhotonSeries'] # Accessing processed data print(nwbfile...
[ 6738, 279, 2047, 39346, 1330, 21966, 33, 39, 8068, 20, 9399, 201, 198, 201, 198, 952, 796, 21966, 33, 39, 8068, 20, 9399, 7, 81, 6, 34, 7479, 14490, 59, 15418, 17053, 59, 9444, 586, 278, 59, 27605, 33, 1628, 59, 7407, 59, 14295, ...
2.700375
267
# ============================================================================== # Copyright 2019 Intel Corporation # # 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.apa...
[ 2, 38093, 25609, 28, 198, 2, 220, 15069, 13130, 8180, 10501, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 3...
4.303419
234
import argparse import matplotlib.pyplot as plt from matplotlib.ticker import MaxNLocator import numpy import torch if __name__ == '__main__': main()
[ 11748, 1822, 29572, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 13, 83, 15799, 1330, 5436, 32572, 420, 1352, 198, 11748, 299, 32152, 198, 11748, 28034, 198, 198, 361, 11593, 3672, 834...
2.888889
54
from django.urls import path, include from . import api_views urlpatterns = [ path('', api_views.WeatherIndexView.as_view(), name='weather_index'), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 198, 6738, 764, 1330, 40391, 62, 33571, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 40391, 62, 33571, 13, 41865, 15732, 7680, 13, 292, 62, ...
2.980769
52
# -*- coding: utf-8 -*- from rest_framework.serializers import ModelSerializer, PrimaryKeyRelatedField from ..models import *
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 1334, 62, 30604, 13, 46911, 11341, 1330, 9104, 32634, 7509, 11, 21087, 9218, 9819, 15878, 198, 6738, 11485, 27530, 1330, 1635, 628, 628, 628, 628 ]
3.325
40
from tornado import web, escape from .cache import cache #: initialize options from .util import set_default_option __all__ = ["JulyHandler", "ApiHandler", "init_options", "run_server"] class JulyHandler(web.RequestHandler): """July Handler Subclass JulyHandler to make an app, it provides a way to organize...
[ 6738, 33718, 1330, 3992, 11, 6654, 198, 6738, 764, 23870, 1330, 12940, 198, 198, 2, 25, 41216, 3689, 198, 6738, 764, 22602, 1330, 900, 62, 12286, 62, 18076, 198, 198, 834, 439, 834, 796, 14631, 16157, 25060, 1600, 366, 32, 14415, 2506...
2.294372
924
#!/usr/bin/env python """ a simple script can run and test your html rendering classes. Uncomment the steps as you add to your rendering. """ from io import StringIO # importing the html_rendering code with a short name for easy typing. import html_render as hr # reloading in case you are running this in iPython #...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 64, 2829, 4226, 460, 1057, 290, 1332, 534, 27711, 14837, 6097, 13, 198, 198, 3118, 23893, 262, 4831, 355, 345, 751, 284, 534, 14837, 13, 198, 198, 37811, 198, 198, 6...
2.740642
1,870
# # Copyright (c) 2013-2018 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # # vim: tabstop=4 shiftwidth=4 softtabstop=4 import logging from django.core.urlresolvers import reverse # noqa from django.core.urlresolvers import reverse_lazy from django.utils.translation import ugettext_lazy as _ fro...
[ 2, 198, 2, 15069, 357, 66, 8, 2211, 12, 7908, 3086, 5866, 11998, 11, 3457, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 198, 198, 2, 43907, 25, 7400, 11338, 28, 19, 6482, 10394,...
3.255319
564
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2021 Kaede Hoshikawa # # 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 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 220, 220, 15069, 33448, 509, 8432, 68, 367, 3768, 40398, 198, 2, 198, 2, 220, 220, 49962, 739, 262, ...
3.192308
260
import yaml test_marks.unittest = ['.marks'] if __name__ == '__main__': import test_appliance test_appliance.run(globals())
[ 198, 11748, 331, 43695, 198, 198, 9288, 62, 14306, 13, 403, 715, 395, 796, 685, 4458, 14306, 20520, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1330, 1332, 62, 1324, 75, 3610, 198, 220, 22...
2.385965
57
from app.tempo.models.following import * from app.tempo.models.like import * from app.tempo.models.notification import * from app.tempo.models.post import * from app.tempo.models.session import * from app.tempo.models.song_post import * from app.tempo.models.song import * from app.tempo.models.spotify_cred import * fro...
[ 6738, 598, 13, 11498, 7501, 13, 27530, 13, 27780, 278, 1330, 1635, 198, 6738, 598, 13, 11498, 7501, 13, 27530, 13, 2339, 1330, 1635, 198, 6738, 598, 13, 11498, 7501, 13, 27530, 13, 1662, 2649, 1330, 1635, 198, 6738, 598, 13, 11498, ...
3.043103
116
import sys a = int(sys.argv[1]) b = 10 print("Result: ", a*b)
[ 11748, 25064, 198, 198, 64, 796, 493, 7, 17597, 13, 853, 85, 58, 16, 12962, 198, 65, 796, 838, 198, 198, 4798, 7203, 23004, 25, 33172, 257, 9, 65, 8, 628, 628 ]
2.09375
32
#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- from nose i...
[ 2, 10097, 45537, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321, 13, 198, 2, 10097, 35937, 198, 1...
2.53787
911
# coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.5 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # pyth...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 9973, 19182, 30617, 7824, 628, 220, 220, 220, 1400, 6764, 2810, 357, 27568, 416, 2451, 7928, 6127, 5235, 3740, 1378, 12567, 13, 785, 14, 2032, 7928, 12, 15042, 14,...
3.17037
135
# -*- coding: utf-8 -*- from __future__ import unicode_literals from collections import namedtuple import logging from django.core.exceptions import ObjectDoesNotExist from django.db import connection from django.http import Http404 from django_filters.rest_framework import DjangoFilterBackend from django.utils.transl...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 18931, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, ...
2.607616
1,812
# Owner(s): ["module: multiprocessing"] import os import random import signal import sys import time import unittest from torch.testing._internal.common_utils import (TestCase, run_tests, IS_WINDOWS, NO_MULTIPROCESSING_SPAWN) import torch.multiprocessing as mp @unittest.skipIf( NO_MULTIPROCESSING_SPAW...
[ 2, 23853, 7, 82, 2599, 14631, 21412, 25, 18540, 305, 919, 278, 8973, 198, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 6737, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 555, 715, 395, 198, 198, 6738, 28034, 13, 33407, 13557, 3...
2.740741
189
# encoding=utf-8 ## SOLVED 2015/01/12 ## 1097343 # The smallest number expressible as the sum of a prime square, prime cube, and # prime fourth power is 28. In fact, there are exactly four numbers below fifty # that can be expressed in such a way: # 28 = 22 + 23 + 24 # 33 = 32 + 23 + 24 # 49 = 52 + 23 + 24 # 47 = 22 ...
[ 2, 21004, 28, 40477, 12, 23, 198, 2235, 36817, 53, 1961, 1853, 14, 486, 14, 1065, 198, 2235, 838, 5607, 32118, 198, 198, 2, 383, 18197, 1271, 4911, 856, 355, 262, 2160, 286, 257, 6994, 6616, 11, 6994, 23441, 11, 290, 198, 2, 6994,...
3.316129
155
# -*- coding: utf-8 -*- #!/usr/bin/env python ##### # BSD 2-clause "Simplified" License # original repository https://github.com/hido/frequent-direction # rearranged to class by AtsushiHashimoto (based on the clone accessed on 26th Jun. 2017) ##### import numpy as np import numpy.linalg as ln import math import sys ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 4242, 2, 198, 2, 347, 10305, 362, 12, 565, 682, 366, 8890, 489, 1431, 1, 13789, 198, 2, 2656, 16099, 3740, 137...
2.737913
393
from math import ceil import performance import dislib as ds from dislib.recommendation import ALS if __name__ == '__main__': main()
[ 6738, 10688, 1330, 2906, 346, 198, 198, 11748, 2854, 198, 198, 11748, 595, 8019, 355, 288, 82, 198, 6738, 595, 8019, 13, 47335, 437, 341, 1330, 27249, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, ...
3.021277
47
from functools import reduce from operator import mul from typing import NamedTuple, Optional if __name__ == "__main__": file_input = load_input("input.txt") converted_file_input = hex_message_to_binary(file_input) input_instruction = parse_instruction_from_binary(converted_file_input) print(ad...
[ 6738, 1257, 310, 10141, 1330, 4646, 198, 6738, 10088, 1330, 35971, 198, 6738, 19720, 1330, 34441, 51, 29291, 11, 32233, 628, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 2393, 6...
3.044776
134
from tkinter import * from os import path from tkinter import filedialog from tkinter import Menu from tkinter import ttk from tkinter import scrolledtext from tkinter import messagebox import os from sintactico import ejecutar_analisis from reportes.RealizarReportes import RealizarReportes ##...
[ 6738, 256, 74, 3849, 1330, 1635, 198, 198, 6738, 28686, 1330, 3108, 198, 6738, 256, 74, 3849, 1330, 5717, 498, 519, 198, 198, 6738, 256, 74, 3849, 1330, 21860, 198, 6738, 256, 74, 3849, 1330, 256, 30488, 198, 6738, 256, 74, 3849, 13...
3.366667
270
from itertools import product import numpy as np import driving_gridworld.road as dg_road from driving_gridworld.obstacles import Bump from driving_gridworld.obstacles import Pedestrian from driving_gridworld.car import Car from driving_gridworld.actions import ACTIONS, RIGHT, LEFT, UP, DOWN, NO_OP import driving_gridw...
[ 6738, 340, 861, 10141, 1330, 1720, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 5059, 62, 25928, 6894, 13, 6344, 355, 288, 70, 62, 6344, 198, 6738, 5059, 62, 25928, 6894, 13, 672, 301, 9928, 1330, 347, 931, 198, 6738, 5059, 62, 2...
2.426101
636
import numpy as np # THIS IS ULTRA SPECIFIC TO THE PROBLEM, Dont dare to use it!!!! TRUE_B = 2.3101 # b=2.31 # a = 0.01584 # epsilon_t = a*(b+t)**(-0.55) # epsilon_t = np.max(min_epsilon,epsilon_t)
[ 11748, 299, 32152, 355, 45941, 628, 198, 2, 220, 220, 12680, 3180, 471, 27734, 3861, 28196, 30643, 5390, 3336, 220, 4810, 9864, 2538, 44, 11, 360, 756, 16498, 284, 779, 340, 13896, 198, 5446, 8924, 62, 33, 796, 362, 13, 3132, 486, 6...
1.784615
130
print sum4([1, 2]) print sum4([3, 4]) print sum4([4, 5, 6]) print sum4([4, 9, 4, 9, 4, 9]) print sum4([])
[ 198, 4798, 2160, 19, 26933, 16, 11, 362, 12962, 198, 4798, 2160, 19, 26933, 18, 11, 604, 12962, 198, 4798, 2160, 19, 26933, 19, 11, 642, 11, 718, 12962, 198, 4798, 2160, 19, 26933, 19, 11, 860, 11, 604, 11, 860, 11, 604, 11, 860...
2.038462
52
from enum import Enum
[ 6738, 33829, 1330, 2039, 388, 628 ]
3.833333
6
#!/usr/bin/python3 """ Path: project3/sysAdminTask.py Author: Ricardo Franzen - rfranzen@gmail.com Date: 2022-03-09 Description: Creates a file that contains: - current users logged in - hostname - date/time (HH:MM:SS DD/MM/YYYY) - number of processes running - top 10 process names/command, id and memory usage so...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 37811, 198, 15235, 25, 1628, 18, 14, 17597, 46787, 25714, 13, 9078, 198, 13838, 25, 38847, 12323, 4801, 532, 374, 69, 2596, 4801, 31, 14816, 13, 785, 198, 10430, 25, 33160, 12, 307...
3.239016
569
import requests,sys from config_helper import get_proxies
[ 11748, 7007, 11, 17597, 198, 6738, 4566, 62, 2978, 525, 1330, 651, 62, 1676, 87, 444, 198 ]
3.411765
17
import sys import unittest sys.path.insert(1, '../') from flint.tokenizer import Tokenizer if __name__ == '__main__': unittest.main()
[ 11748, 25064, 198, 11748, 555, 715, 395, 198, 198, 17597, 13, 6978, 13, 28463, 7, 16, 11, 705, 40720, 11537, 198, 6738, 781, 600, 13, 30001, 7509, 1330, 29130, 7509, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, ...
2.660377
53
''' cows and bulls Create a program that will play the “cows and bulls” game with the user. The game works like this: Randomly generate a 4-digit number. Ask the user to guess a 4-digit number. For every digit that the user guessed correctly...
[ 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 198, 198, 7061, 6, 198, 66, 1666, 29...
3.367647
204
from flask import Flask, render_template, Response from mask_detect_video_app import VideoCamera from flask import send_file app = Flask(__name__) @app.route('/') def index(): """Video streaming home page.""" return render_template('index.html') @app.route('/project') def project(): """ Project Page""" ...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 18261, 198, 6738, 9335, 62, 15255, 478, 62, 15588, 62, 1324, 1330, 7623, 35632, 198, 6738, 42903, 1330, 3758, 62, 7753, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 628, 198, 3...
2.551637
397
import argparse from typing import Dict from dataset import Dataset from model import Model from utils import setup_logger, get_logger if __name__ == '__main__': main()
[ 11748, 1822, 29572, 198, 6738, 19720, 1330, 360, 713, 198, 198, 6738, 27039, 1330, 16092, 292, 316, 198, 6738, 2746, 1330, 9104, 198, 6738, 3384, 4487, 1330, 9058, 62, 6404, 1362, 11, 651, 62, 6404, 1362, 628, 628, 198, 361, 11593, 36...
3.178571
56
import libs.requests as requests import libs.telebot as telebot import time import datetime import re TOKEN_TG = '' #TOKEN BOT TELEGRAM TOKEN_VK = '' #ACCESS KEY VK tg_channel = '@name' #chat in telegram vk_group = '' #example 'vkapi' (vk.com/vkapi) sticker_id = ['CAADAgADEgADuYK-DAwZdY5q1ZiJAg', 'CAADAgADEwADuYK-DC9...
[ 11748, 9195, 82, 13, 8897, 3558, 355, 7007, 198, 11748, 9195, 82, 13, 46813, 13645, 355, 5735, 13645, 198, 11748, 640, 198, 11748, 4818, 8079, 198, 11748, 302, 628, 198, 10468, 43959, 62, 35990, 796, 10148, 1303, 10468, 43959, 347, 2394...
2.248677
189
#Socket client for python import socket # socket library import sys # for exit handling import threading # for starting transport layer thread from client import TransportLayer import Queue main = ['-Main Menu-', '1. Login', '2. Make New User', '3. Hall of Fame', '4. Exit']; game = ['-Game Menu-', '1. Start New Game'...
[ 2, 39105, 5456, 329, 21015, 198, 198, 11748, 17802, 1303, 17802, 5888, 198, 11748, 25064, 1303, 329, 8420, 9041, 198, 11748, 4704, 278, 1303, 329, 3599, 4839, 7679, 4704, 198, 6738, 5456, 1330, 19940, 49925, 198, 11748, 4670, 518, 198, ...
2.98494
332
from collections import Counter
[ 6738, 17268, 1330, 15034, 198, 220, 220, 220, 220 ]
4
9
import os import json sharepath = os.path.dirname(__file__) default_config = { 'profile': 'profile.json', 'server': 'gunicorn', 'workers': 10, 'log': None, 'loglevel': 'info', 'accesslog': None, 'host': 'localhost', 'port': 8080, 'root': '', 'debug': False, 'colormaps': 'c...
[ 11748, 28686, 198, 11748, 33918, 628, 198, 20077, 6978, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 8, 198, 198, 12286, 62, 11250, 796, 1391, 198, 220, 220, 220, 705, 13317, 10354, 705, 13317, 13, 17752, 3256, 198, 220, ...
1.916067
417
ultimo=10 fila=list(range(1,ultimo+1))#Função Sequenciadora de 1 para ultimo +1 fila2=list(range(1,ultimo+1)) while True:# Sempre dará verdadeiro em loop e só sairá no break print(f"Existem{len(fila)} clientes na fila\n") print(f"Existem{len(fila2)} clientes na fila\n") print(f"Fila atual: {fila}\n") ...
[ 586, 25147, 28, 940, 201, 198, 69, 10102, 28, 4868, 7, 9521, 7, 16, 11, 586, 25147, 10, 16, 4008, 2, 24629, 16175, 28749, 24604, 268, 979, 324, 5799, 390, 352, 31215, 3789, 25147, 1343, 16, 201, 198, 69, 10102, 17, 28, 4868, 7, ...
1.762795
1,016
""" demo.py is an app demo use the library that validate transactions Created on : June 9, 2016 Author : Mohammad Alrefai """ import json import validate_transaction main()
[ 37811, 198, 9536, 78, 13, 9078, 198, 220, 220, 220, 318, 281, 598, 13605, 779, 262, 5888, 326, 26571, 8945, 198, 220, 220, 220, 220, 220, 220, 220, 15622, 319, 220, 1058, 220, 220, 2795, 860, 11, 1584, 198, 220, 220, 220, 220, 220...
2.666667
78
from .data_profile import Profiler, MyEncoder, Hyperparams __all__ = ['Profiler', 'Hyperparams'] from pkgutil import extend_path __path__ = extend_path(__path__, __name__) # type: ignore
[ 6738, 764, 7890, 62, 13317, 1330, 4415, 5329, 11, 2011, 27195, 12342, 11, 15079, 37266, 198, 198, 834, 439, 834, 796, 37250, 15404, 5329, 3256, 705, 38197, 37266, 20520, 198, 198, 6738, 279, 10025, 22602, 1330, 9117, 62, 6978, 198, 834,...
3.098361
61
# -*- coding: utf-8 -*- """ Config for API Access """ API_USER = "<your-username-here>" API_PASSWORD = "<your-password-here>" API_ADDRESS = "http://<your-address-here>:9981/" API_IS_SELFSIGNED = <True or False> # True for selfsigned SSL certificate
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 16934, 329, 7824, 8798, 198, 37811, 198, 198, 17614, 62, 29904, 796, 33490, 14108, 12, 29460, 12, 1456, 24618, 198, 17614, 62, 47924, 54, 12532, 796, 33...
2.670213
94
from typing import Tuple import numpy as np import torch import torch.utils.data as data from auxiliary.utils import hwc_chw, gamma_correct, brg_to_rgb from classes.data.DataAugmenter import DataAugmenter
[ 6738, 19720, 1330, 309, 29291, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 26791, 13, 7890, 355, 1366, 198, 198, 6738, 37419, 13, 26791, 1330, 289, 86, 66, 62, 354, 86, 11, 34236, 62, 30283, 11, ...
3.2
65
# Twitter API Keys consumer_key = "Enter your key" consumer_secret = "Enter your key" access_token = "Enter your key" access_token_secret = "Enter your key"
[ 2, 3009, 7824, 26363, 201, 198, 49827, 62, 2539, 796, 366, 17469, 534, 1994, 1, 201, 198, 49827, 62, 21078, 796, 366, 17469, 534, 1994, 1, 201, 198, 15526, 62, 30001, 796, 366, 17469, 534, 1994, 1, 201, 198, 15526, 62, 30001, 62, ...
3.115385
52
# This file is adapted from https://github.com/tensorflow/benchmarks # /blob/master/scripts/tf_cnn_benchmarks/allreduce.py # # Copyright 2017 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...
[ 2, 770, 2393, 318, 16573, 422, 3740, 1378, 12567, 13, 785, 14, 83, 22854, 11125, 14, 26968, 14306, 198, 2, 1220, 2436, 672, 14, 9866, 14, 46521, 14, 27110, 62, 66, 20471, 62, 26968, 14306, 14, 439, 445, 7234, 13, 9078, 198, 2, 198...
2.256599
9,926
_base_ = ['./default_runtime.py'] checkpoint_config = dict(interval=10) # yapf:disable log_config = dict( interval=10, hooks=[ dict(type='TextLoggerHook'), ]) work_dir = './work_dirs/'
[ 62, 8692, 62, 796, 685, 4458, 14, 12286, 62, 43282, 13, 9078, 20520, 198, 9122, 4122, 62, 11250, 796, 8633, 7, 3849, 2100, 28, 940, 8, 198, 2, 331, 499, 69, 25, 40223, 198, 6404, 62, 11250, 796, 8633, 7, 198, 220, 220, 220, 1665...
2.252747
91
# coding: utf-8 # # TV Script Generation # In this project, you'll generate your own [Simpsons](https://en.wikipedia.org/wiki/The_Simpsons) TV scripts using RNNs. You'll be using part of the [Simpsons dataset](https://www.kaggle.com/wcukierski/the-simpsons-by-the-data) of scripts from 27 seasons. The Neural Network...
[ 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 1303, 3195, 12327, 16588, 198, 2, 554, 428, 1628, 11, 345, 1183, 7716, 534, 898, 685, 8890, 31410, 16151, 5450, 1378, 268, 13, 31266, 13, 2398, 14, 15466, 14, 464, 62, 8890, 31410,...
2.781608
7,688
from caffe2.python import core from hypothesis import given import caffe2.python.hypothesis_test_util as hu import numpy as np
[ 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 6738, 21121, 17, 13, 29412, 1330, 4755, 201, 198, 6738, 14078, 1330, 1813, 201, 198, 11748, 21121, 17, 13, 29412, 13, 36362, 313, 8497, 62, 9288, 62, 22602, 355, 289, 84, 201, 198, ...
2.75
52
""" This file contains the grammar and code for parsing a SQL query string into a tree of operators defined in ops.py The key thing this DOES NOT do is convert the FROM clause into a tree of Join operators. This is performed in optimizer.py because we need additional logic to figure out whether or not tables have joi...
[ 37811, 198, 1212, 2393, 4909, 262, 23491, 290, 2438, 329, 32096, 257, 16363, 12405, 198, 8841, 656, 257, 5509, 286, 12879, 5447, 287, 39628, 13, 9078, 198, 198, 464, 1994, 1517, 428, 38359, 5626, 466, 318, 10385, 262, 16034, 13444, 198,...
2.174471
3,118
import os import unittest from ..ddup import dedup_lines_bloom
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 6738, 11485, 67, 646, 79, 1330, 4648, 929, 62, 6615, 62, 2436, 4207, 628 ]
2.909091
22
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2020 SkyWater PDK 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 12131, 5274, 19184, 14340, 42, 46665, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628,...
2.69022
1,769
from twisted.python import util util.moduleMovedForSplit('twisted.protocols.irc', 'twisted.words.protocols.irc', 'IRC protocol support', 'Words', 'http://twistedmatrix.com/trac/wiki/TwistedWords', globals())
[ 6738, 19074, 13, 29412, 1330, 7736, 198, 198, 22602, 13, 21412, 44, 2668, 1890, 41205, 10786, 4246, 6347, 13, 11235, 4668, 82, 13, 1980, 3256, 705, 4246, 6347, 13, 10879, 13, 11235, 4668, 82, 13, 1980, 3256, 198, 220, 220, 220, 220, ...
1.993007
143
# -*- coding: utf-8 -*- import os import json import tccli.options_define as OptionsDefine import tccli.format_output as FormatOutput from tccli.nice_command import NiceCommand import tccli.error_msg as ErrorMsg import tccli.help_template as HelpTemplate from tccli import __version__ from tccli.utils import Utils from ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 256, 535, 4528, 13, 25811, 62, 13086, 355, 18634, 7469, 500, 198, 11748, 256, 535, 4528, 13, 18982, 62, 22915, 355, 18980, 2...
2.954688
640
from selenium import webdriver from time import sleep import requests from aigpy import download if __name__ == '__main__': Main()
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 640, 1330, 3993, 198, 11748, 7007, 198, 6738, 257, 328, 9078, 1330, 4321, 628, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 877...
3.25
44
import os import sys import numpy as np import cv2 # Root directory of the project ROOT_DIR = os.path.abspath("../") # Import Mask RCNN sys.path.append(ROOT_DIR) # To find local version of the library from skimage.measure import find_contours class MaskRCNNTracker(): """Implements tracker based on segmentation...
[ 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 198, 2, 20410, 8619, 286, 262, 1628, 198, 13252, 2394, 62, 34720, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7203, 40720, 4943, 198...
2.493342
11,039
""" ``DataLoaderFactory`` can be used to create data loader objects from the ``data_loader`` module. The following code will create a data loader object for loading enhanced pbp from stats.nba.com. .. code-block:: python from pbpstats.data_loader.factory import DataLoaderFactory data_loader = DataLoaderFact...
[ 37811, 198, 15506, 6601, 17401, 22810, 15506, 460, 307, 973, 284, 2251, 1366, 40213, 5563, 422, 262, 7559, 7890, 62, 29356, 15506, 8265, 13, 198, 198, 464, 1708, 2438, 481, 2251, 257, 1366, 40213, 2134, 329, 11046, 13105, 279, 46583, 42...
2.364333
914
import copy import pickle from this import d from pathlib import Path import numpy as np from skimage import io from ...ops.roiaware_pool3d import roiaware_pool3d_utils from ...utils import box_utils, calibration_kitti, common_utils, object3d_kitti from ..dataset import DatasetTemplate import open3d import numpy as n...
[ 11748, 4866, 198, 11748, 2298, 293, 198, 6738, 428, 1330, 288, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 9060, 1330, 33245, 198, 198, 6738, 2644, 2840, 13, 305, 544, 1574, 62, 7742, 18, 6...
2.335714
420
from rest_framework.response import Response from rest_framework.views import APIView from rest_framework.permissions import IsAuthenticated from FoxhoundApp.TrafficApp.serializers import CategorySerializer from FoxhoundApp.TrafficApp.utils import HeatMapDataGetter
[ 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 30604, 13, 33571, 1330, 3486, 3824, 769, 198, 6738, 1334, 62, 30604, 13, 525, 8481, 1330, 1148, 47649, 3474, 198, 6738, 5426, 39047, 4677, 13, 15721, 2108, 4677, 13, ...
4.092308
65
from .java import Postagger from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution('stanford_postagger').version except DistributionNotFound: __version__ = 'Undefined' __all__ = ['__version__', 'Postagger']
[ 6738, 764, 12355, 1330, 2947, 7928, 198, 6738, 279, 10025, 62, 37540, 1330, 651, 62, 17080, 3890, 11, 27484, 3673, 21077, 198, 198, 28311, 25, 198, 220, 220, 220, 11593, 9641, 834, 796, 651, 62, 17080, 3890, 10786, 14192, 3841, 62, 73...
3.329114
79
from __future__ import annotations __all__ = ("HTTP",) import asyncio import json import aiohttp import logging from urllib.parse import quote as _quote from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence, Literal from .connection import Connection from .dataclasses import Embed, File from .model...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 834, 439, 834, 796, 5855, 40717, 1600, 8, 198, 198, 11748, 30351, 952, 198, 11748, 33918, 198, 11748, 257, 952, 4023, 198, 11748, 18931, 198, 198, 6738, 2956, 297, 571, 13, 29572, 1330, ...
3.303867
181