content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
from datetime import datetime import pytz from scrapy import signals RUNNING = "running" FAILING = "failing" STATUS_COLOR_MAP = {RUNNING: "#44cc11", FAILING: "#cb2431"} STATUS_ICON = """ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="144" height="20"> <linearGradient id=...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 12972, 22877, 198, 6738, 15881, 88, 1330, 10425, 198, 198, 49, 4944, 15871, 796, 366, 20270, 1, 198, 7708, 4146, 2751, 796, 366, 69, 11608, 1, 198, 35744, 2937, 62, 46786, 62, 33767...
2.119171
579
import networkx as nx import pygrank as pg import pytest from .test_core import supported_backends
[ 11748, 3127, 87, 355, 299, 87, 198, 11748, 12972, 2164, 962, 355, 23241, 198, 11748, 12972, 9288, 198, 6738, 764, 9288, 62, 7295, 1330, 4855, 62, 1891, 2412, 628, 628, 628, 628, 628, 628, 628, 198, 220, 220, 220, 220 ]
2.925
40
import os import PIL from PIL import Image from PIL import Image, ImageStat PIL.Image.MAX_IMAGE_PIXELS = 10000000000 import numpy as np import cv2 import openslide import time PATCH_SIZE = 224 STRIDE = 224 DOWN_SIZE = 508 if __name__ == "__main__": import argparse parser = argparse.ArgumentParser(descriptio...
[ 11748, 28686, 198, 11748, 350, 4146, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 17126, 198, 47, 4146, 13, 5159, 13, 22921, 62, 3955, 11879, 62, 47, 10426, 37142, 796, 1802, 8269, 198, 198, 11748, 299...
2.762238
429
# Copyright (c) 2021 Trevor Redfern # # This software is released under the MIT License. # https://opensource.org/licenses/MIT from __future__ import annotations from typing import Tuple, Iterator, List, TYPE_CHECKING import random import tcod from game_map import GameMap import tile_types if TYPE_CHECKI...
[ 2, 15069, 357, 66, 8, 33448, 25389, 2297, 69, 1142, 201, 198, 2, 220, 201, 198, 2, 770, 3788, 318, 2716, 739, 262, 17168, 13789, 13, 201, 198, 2, 3740, 1378, 44813, 1668, 13, 2398, 14, 677, 4541, 14, 36393, 201, 198, 201, 198, 6...
3.067797
118
# -*- coding: utf-8 -*- """ ============================= Simulating a brain object ============================= In this example, we demonstrate the simulate_bo function. First, we'll load in some example locations. Then we'll simulate 1 brain object specifying a noise parameter and the correlational structure of the...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 4770, 25609, 28, 198, 8890, 8306, 257, 3632, 2134, 198, 4770, 25609, 28, 198, 198, 818, 428, 1672, 11, 356, 10176, 262, 29308, 62, 2127, 2163, 13, 198, 596...
3.147679
474
from poc.classes.AuxSTBlockWithSignature import AuxSTBlockWithSignature from poc.classes.AuxSymbolTable import AuxSymbolTable
[ 6738, 279, 420, 13, 37724, 13, 32, 2821, 2257, 12235, 3152, 11712, 1300, 1330, 47105, 2257, 12235, 3152, 11712, 1300, 198, 6738, 279, 420, 13, 37724, 13, 32, 2821, 13940, 23650, 10962, 1330, 47105, 13940, 23650, 10962, 628 ]
3.342105
38
from io import TextIOWrapper from typing import IO, Text from cli_args_system import Args from cli_args_system import Args, FlagsContent from sys import exit HELP = """this is a basic file manipulator to demonstrate args_system usage with file flags -------------------flags---------------------------- -join: join th...
[ 6738, 33245, 1330, 8255, 40, 3913, 430, 2848, 198, 6738, 19720, 1330, 24418, 11, 8255, 198, 6738, 537, 72, 62, 22046, 62, 10057, 1330, 943, 14542, 198, 198, 6738, 537, 72, 62, 22046, 62, 10057, 1330, 943, 14542, 11, 34771, 19746, 198,...
2.538345
1,982
import unittest from src.main import substract, add
[ 11748, 555, 715, 395, 198, 6738, 12351, 13, 12417, 1330, 3293, 974, 11, 751, 198 ]
3.466667
15
import cfile as C hello = C.cfile('hello.c') hello.code.append(C.sysinclude('stdio.h')) hello.code.append(C.blank()) hello.code.append(C.function('main', 'int',).add_param(C.variable('argc', 'int')).add_param(C.variable('argv', 'char', pointer=2))) body = C.block(innerIndent=3) body.append(C.statement(C.fcall('pr...
[ 11748, 269, 7753, 355, 327, 201, 198, 31373, 796, 327, 13, 66, 7753, 10786, 31373, 13, 66, 11537, 201, 198, 31373, 13, 8189, 13, 33295, 7, 34, 13, 17597, 17256, 10786, 19282, 952, 13, 71, 6, 4008, 201, 198, 31373, 13, 8189, 13, 33...
2.477528
178
# Exerccio 5.2 - Modifique o programa para exibir os nmeros de 50 a 100. i = 50 print('\n') while i <= 100: print('%d' % i) i += 1 print('\n')
[ 2, 1475, 263, 535, 952, 642, 13, 17, 532, 3401, 361, 2350, 267, 1430, 64, 31215, 409, 571, 343, 28686, 299, 647, 418, 390, 2026, 257, 1802, 13, 198, 198, 72, 796, 2026, 198, 198, 4798, 10786, 59, 77, 11537, 198, 198, 4514, 1312, ...
2.109589
73
#!/usr/bin/env python # -*- coding: utf-8 -*- """ CREDIT: Main layout of this file was done by Lucija Kopic (graduation thesis) at Faculty of Electrical Engineering and Computing, University of Zagreb. """ import math from threading import Thread import actionlib import tf from tf.transformations import ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 9419, 24706, 25, 201, 198, 13383, 12461, 286, 428, 2393, 373, 1760, 416, 6026, 979, 6592, ...
2.843658
339
import math n=int(input('Nhap mot so:')) output=math.factorial(n) print('Giai thua cua ',n,' la: ',output)
[ 11748, 10688, 198, 198, 77, 28, 600, 7, 15414, 10786, 45, 45897, 2369, 523, 32105, 4008, 198, 22915, 28, 11018, 13, 22584, 5132, 7, 77, 8, 198, 4798, 10786, 38, 544, 72, 294, 6413, 269, 6413, 46083, 77, 4032, 8591, 25, 46083, 22915,...
2.431818
44
from __future__ import absolute_import import flytekit.plugins __version__ = '0.3.1'
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 11748, 6129, 660, 15813, 13, 37390, 198, 198, 834, 9641, 834, 796, 705, 15, 13, 18, 13, 16, 6, 198 ]
2.965517
29
""" @Author: Qu Xiangjun @Time: 2021.01.26 @Describe: """ import socket import time from threading import Thread import threading import numpy as np # python3.8.0 64python 3232DLL from ctypes import * from Navigation_help import * from Can_frame_help import * VCI_USBCAN2 = 4 # USBCAN-2AUSBCAN-2CCANalyst-II STATUS_O...
[ 37811, 198, 31, 13838, 25, 2264, 45641, 29741, 198, 31, 7575, 25, 33448, 13, 486, 13, 2075, 198, 31, 24564, 4892, 25, 220, 198, 37811, 198, 11748, 17802, 198, 11748, 640, 198, 6738, 4704, 278, 1330, 14122, 198, 11748, 4704, 278, 198, ...
2.562814
199
#Faa um Programa que pea um valor e mostre na tela se o valor positivo ou negativo. valor = int(input("Dgite um nmero:")) if valor < 0: print("O nmero",valor," negativo!") else: print("O nmero",valor," positivo!")
[ 2, 37, 7252, 23781, 6118, 64, 8358, 613, 64, 23781, 1188, 273, 304, 749, 260, 12385, 256, 10304, 384, 267, 1188, 273, 220, 46436, 23593, 267, 84, 2469, 265, 23593, 13, 220, 198, 2100, 273, 796, 493, 7, 15414, 7203, 35, 70, 578, 23...
2.309278
97
f'{1:.5d} {2:3.5d} {3:3d} {"spam":>20} {4:<#d}'
[ 69, 6, 90, 16, 25, 13, 20, 67, 92, 1391, 17, 25, 18, 13, 20, 67, 92, 1391, 18, 25, 18, 67, 92, 19779, 2777, 321, 1298, 29, 1238, 92, 1391, 19, 25, 27, 2, 67, 92, 6, 198 ]
1.230769
39
""" make_one_on_comp =============== Autogenerated DPF operator classes. """ from warnings import warn from ansys.dpf.core.dpf_operator import Operator from ansys.dpf.core.inputs import Input, _Inputs from ansys.dpf.core.outputs import Output, _Outputs from ansys.dpf.core.operators.specification import PinSpecification...
[ 37811, 198, 15883, 62, 505, 62, 261, 62, 5589, 198, 25609, 18604, 198, 16541, 519, 877, 515, 27704, 37, 10088, 6097, 13, 198, 37811, 198, 6738, 14601, 1330, 9828, 198, 6738, 9093, 893, 13, 26059, 69, 13, 7295, 13, 26059, 69, 62, 466...
3.228571
105
# # Program: www_utils.py # Version: 0.10 # Description: # Generic search functions for Cheshire 3 # # Language: Python # Author: John Harrison <john.harrison@liv.ac.uk> # Date: 19 December 2007 # # Copyright: &copy; University of Liverpool 2005-2007 # # Version History: # 0.01 - 13/04/2005 - JH...
[ 2, 198, 2, 6118, 25, 220, 220, 7324, 62, 26791, 13, 9078, 198, 2, 10628, 25, 220, 220, 657, 13, 940, 198, 2, 12489, 25, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42044, 2989, 5499, 329, 28250, 10695, 513, ...
2.154426
1,593
# coding: utf-8 import numpy as np from supervisely_lib.geometry.constants import DATA, ORIGIN from supervisely_lib.geometry.geometry import Geometry from supervisely_lib.geometry.point_location import PointLocation from supervisely_lib.geometry.rectangle import Rectangle from supervisely_lib.imaging.image import res...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 29745, 786, 306, 62, 8019, 13, 469, 15748, 13, 9979, 1187, 1330, 42865, 11, 43901, 1268, 198, 6738, 29745, 786, 306, 62, 8019, 13, 469, 15748, 13, ...
2.572451
559
""" .. module:: CClassifierGradientSGDMixin :synopsis: Mixin for SGD classifier gradients. .. moduleauthor:: Ambra Demontis <ambra.demontis@unica.it> .. moduleauthor:: Marco Melis <marco.melis@unica.it> """ from secml.array import CArray from secml.ml.classifiers.gradients import CClassifierGradientLinearMixin
[ 37811, 198, 492, 8265, 3712, 327, 9487, 7483, 42731, 1153, 38475, 23127, 844, 259, 198, 220, 220, 1058, 28869, 24608, 25, 15561, 259, 329, 26147, 35, 1398, 7483, 3915, 2334, 13, 198, 198, 492, 8265, 9800, 3712, 12457, 430, 1897, 756, ...
2.890909
110
# -*- coding: utf-8 -*- """ | **@created on:** 9/4/20, | **@author:** prathyushsp, | **@version:** v0.0.1 | | **Description:** | | | **Sphinx Documentation Status:** """ from abc import ABCMeta, abstractmethod import json
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 91, 12429, 31, 25598, 319, 25, 1174, 860, 14, 19, 14, 1238, 11, 198, 91, 12429, 31, 9800, 25, 1174, 778, 10036, 1530, 2777, 11, 198, 91, 12429, 31, 9641,...
2.393617
94
adjective = input("Enter an adjective: ") adjective = input("Enter another adjective: ") noun = input("Enter a noun: ") noun = input("Enter another noun: ") plural_noun = input("Enter a plural noun: ") game = input("Enter a game: ") plural_noun = input("Enter another plural noun: ") verb = input("Enter a verb ending in...
[ 324, 752, 425, 796, 5128, 7203, 17469, 281, 43441, 25, 366, 8, 198, 324, 752, 425, 796, 5128, 7203, 17469, 1194, 43441, 25, 366, 8, 198, 77, 977, 796, 5128, 7203, 17469, 257, 23227, 25, 366, 8, 198, 77, 977, 796, 5128, 7203, 17469...
3.382826
559
import argparse import os import logging import sys from types import SimpleNamespace from .util.print_tree import print_tree def is_connect_script_file(filename): return os.path.basename(filename) == "CONNECT" def is_card_file(filename): return filename.endswith('.yaml') or filename == "CONNECT" def is_conn...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 25064, 198, 6738, 3858, 1330, 17427, 36690, 10223, 198, 6738, 764, 22602, 13, 4798, 62, 21048, 1330, 3601, 62, 21048, 198, 198, 4299, 318, 62, 8443, 62, 12048, 62, 77...
2.363556
1,136
# -*- coding: utf-8 -*- #!/usr/bin/env python2 import fileinput import json import random import socket import thread # import urllib2 # import collections import time import traceback import re from decimal import Decimal as D from datetime import datetime import MySQLdb # import math username = 'Arcadia2' oper_key ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 11748, 2393, 15414, 198, 11748, 33918, 198, 11748, 4738, 198, 11748, 17802, 198, 11748, 4704, 1303, 198, 11748, 2956,...
1.778649
6,501
"""Test suite for Average Genome Size tasks.""" from app.display_modules.ags.ags_tasks import boxplot, ags_distributions from app.samples.sample_models import Sample from app.tool_results.microbe_census.tests.factory import create_microbe_census from tests.base import BaseTestCase
[ 37811, 14402, 18389, 329, 13475, 5215, 462, 12849, 8861, 526, 15931, 198, 198, 6738, 598, 13, 13812, 62, 18170, 13, 3775, 13, 3775, 62, 83, 6791, 1330, 3091, 29487, 11, 556, 82, 62, 17080, 2455, 507, 198, 6738, 598, 13, 82, 12629, 1...
3.352941
85
"""Global serialization configuration.""" from importlib import import_module import os def configure_serialization(): """Configure serialization for all classes in folder.""" for name in filter( lambda s: not s.startswith('_') and s.endswith('.py'), os.listdir(os.path.dirname(os.path...
[ 37811, 22289, 11389, 1634, 8398, 526, 15931, 198, 198, 6738, 1330, 8019, 1330, 1330, 62, 21412, 198, 11748, 28686, 628, 198, 4299, 17425, 62, 46911, 1634, 33529, 198, 220, 220, 220, 37227, 16934, 495, 11389, 1634, 329, 477, 6097, 287, 9...
2.584211
190
import os import ctypes import windows from windows import winproxy from windows.generated_def import windef from windows.generated_def.winstructs import * # Remove this ? current_process_pid = os.getpid() def enumerate_handles(): size_needed = ULONG() size = 0x1000 buffer = ctypes.c_buffer(size) ...
[ 11748, 28686, 198, 11748, 269, 19199, 198, 198, 11748, 9168, 198, 6738, 9168, 1330, 1592, 36436, 198, 6738, 9168, 13, 27568, 62, 4299, 1330, 2344, 891, 198, 6738, 9168, 13, 27568, 62, 4299, 13, 5404, 7249, 82, 1330, 1635, 198, 198, 2,...
2.797203
286
import traceback import numpy as np from matplotlib import pyplot, pyplot as plt from sklearn.metrics import ( mean_squared_error, median_absolute_error, roc_curve, auc, f1_score, precision_recall_curve, r2_score, ) from sklearn.metrics import confusion_matrix import column_labeler as clabel...
[ 11748, 12854, 1891, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 11, 12972, 29487, 355, 458, 83, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 357, 198, 220, 220, 220, 1612, 62, 16485, 1144, 62,...
2.614815
135
import pytest from pyutil import pull
[ 11748, 12972, 9288, 198, 6738, 12972, 22602, 1330, 2834, 628, 628, 628, 628, 628 ]
3.357143
14
''' --------------------------------------------IMPORTING NECESSARY LIBRARIES------------------------------------------- ''' import numpy as np import pandas as pd from math import radians, cos, sin, asin, sqrt from sklearn.preprocessing import MinMaxScaler from sklearn.preprocessing import LabelEncoder, OneHotEnc...
[ 7061, 6, 20368, 10541, 3955, 15490, 2751, 41804, 7597, 13153, 45651, 49, 1503, 11015, 3880, 32284, 705, 7061, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 6738, 10688, 1330, 2511, 1547, 1...
2.622552
10,979
import random import time n = eval(input("Enter the number of elements to sort: ")) lst = list(range(n)) random.shuffle(lst) startTime = time.time() lst.sort() print("Sort time in Python is", int(time.time() - startTime), "seconds")
[ 11748, 4738, 198, 11748, 640, 198, 198, 77, 796, 5418, 7, 15414, 7203, 17469, 262, 1271, 286, 4847, 284, 3297, 25, 366, 4008, 198, 75, 301, 796, 1351, 7, 9521, 7, 77, 4008, 198, 25120, 13, 1477, 18137, 7, 75, 301, 8, 198, 198, 9...
2.962025
79
# -*- coding: utf-8 -*- __author__ = 'Daryl Yu' __email__ = 'dyu@fastmail.com' __version__ = '0.0.2'
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 796, 705, 35, 36822, 10605, 6, 198, 834, 12888, 834, 796, 705, 9892, 84, 31, 7217, 4529, 13, 785, 6, 198, 834, 9641, 834, 796, 705, 15, 13, 15...
2
51
"""Define common test configuraiton.""" import pytest from pysmartapp.dispatch import Dispatcher from pysmartapp.smartapp import SmartApp, SmartAppManager
[ 37811, 7469, 500, 2219, 1332, 4566, 333, 4548, 261, 526, 15931, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 279, 893, 13822, 1324, 13, 6381, 17147, 1330, 3167, 8071, 2044, 198, 6738, 279, 893, 13822, 1324, 13, 27004, 1324, 1330, 10880...
3.285714
49
todo_list = ["" for i in range(11)] command = input() while command != 'End': task = command.split('-') importance = int(task[0]) thing_to_do = task[1] todo_list[importance] = thing_to_do command = input() final_list = [x for x in todo_list if x != ""] print(final_list)
[ 83, 24313, 62, 4868, 796, 14631, 1, 329, 1312, 287, 2837, 7, 1157, 15437, 198, 198, 21812, 796, 5128, 3419, 198, 198, 4514, 3141, 14512, 705, 12915, 10354, 198, 220, 220, 220, 4876, 796, 3141, 13, 35312, 10786, 12, 11537, 198, 220, ...
2.470588
119
#!/usr/bin/env python3.8 from socket import create_server from users import Users from credentials import Credentials if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 13, 23, 198, 6738, 17802, 1330, 2251, 62, 15388, 198, 6738, 2985, 1330, 18987, 198, 6738, 18031, 1330, 327, 445, 14817, 628, 628, 628, 628, 628, 628, 628, 198, 198, 361, 11593, 3672, ...
3.090909
55
from game_states import GameStates from action_consumer.available_actions_enum import Action
[ 6738, 983, 62, 27219, 1330, 3776, 42237, 198, 6738, 2223, 62, 49827, 13, 15182, 62, 4658, 62, 44709, 1330, 7561, 628, 628, 628, 198 ]
4.125
24
''' Version and license information. ''' __all__ = ['__version__', '__versiondate__', '__license__'] __version__ = '1.3.3' __versiondate__ = '2022-01-16' __license__ = f'Sciris {__version__} ({__versiondate__}) 2014-2022 by the Sciris Development Team'
[ 7061, 6, 198, 14815, 290, 5964, 1321, 13, 198, 7061, 6, 198, 198, 834, 439, 834, 796, 37250, 834, 9641, 834, 3256, 705, 834, 9641, 4475, 834, 3256, 705, 834, 43085, 834, 20520, 198, 198, 834, 9641, 834, 220, 220, 220, 220, 220, 79...
2.552381
105
# -*- coding: utf-8 -*- # Import Python libs from __future__ import absolute_import, print_function, unicode_literals # Import Salt Testing libs from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase from tests.support.mock import patch # Import Salt libs import salt.fileserve...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 17267, 11361, 9195, 82, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 198, 2, 17267, 13754, 23...
3.2
105
INTERVALS = [ "1h", ]
[ 41358, 53, 23333, 796, 685, 198, 220, 220, 220, 366, 16, 71, 1600, 198, 60, 198 ]
1.625
16
import torch.nn as nn from networks.resnet import resnet18 from networks.shufflenet import shufflenet_v2_x1_0 from networks.cifar_net import Net from networks.mlp import MLP
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 6738, 7686, 13, 411, 3262, 1330, 581, 3262, 1507, 198, 6738, 7686, 13, 1477, 1648, 11925, 316, 1330, 32299, 11925, 316, 62, 85, 17, 62, 87, 16, 62, 15, 198, 6738, 7686, 13, 66, 361,...
2.95
60
from manim import * from TTS.TTS import get_mp3_file from utils import cut, get_duration, deal_text import time
[ 6738, 582, 320, 1330, 1635, 198, 6738, 309, 4694, 13, 51, 4694, 1330, 651, 62, 3149, 18, 62, 7753, 198, 6738, 3384, 4487, 1330, 2005, 11, 651, 62, 32257, 11, 1730, 62, 5239, 198, 11748, 640, 198 ]
3.027027
37
from unittest import TestCase
[ 6738, 555, 715, 395, 1330, 6208, 20448, 201, 198, 201, 198 ]
3
11
from sevenbridges.meta.resource import Resource # noinspection PyUnresolvedReferences,PyProtectedMember
[ 6738, 3598, 10236, 3212, 13, 28961, 13, 31092, 1330, 20857, 628, 198, 2, 645, 1040, 14978, 9485, 3118, 411, 5634, 19927, 11, 20519, 19703, 11197, 27608, 198 ]
3.925926
27
from unittest.mock import patch from django.test import TestCase from django.contrib.auth import get_user_model from core import models def sample_user(email='test@email.com', password='testpass'): """Create a sample user""" return get_user_model().objects.create_user(email, password)
[ 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 198, 6738, 4755, 1330, 4981, 628, 198, ...
3.215054
93
"""coBib's database tests."""
[ 37811, 1073, 33, 571, 338, 6831, 5254, 526, 15931, 198 ]
3
10
# program to display first n lines in a text file n = int(input("Enter number of lines: ")) with open("note.txt") as file: while n > 0: print( file.readline(), end="" ) n -= 1
[ 2, 1430, 284, 3359, 717, 299, 3951, 287, 257, 2420, 2393, 198, 198, 77, 796, 493, 7, 15414, 7203, 17469, 1271, 286, 3951, 25, 366, 4008, 198, 198, 4480, 1280, 7203, 11295, 13, 14116, 4943, 355, 2393, 25, 198, 220, 220, 220, 981, 2...
2.110092
109
import os import sys import ctypes import webbrowser from .lineEdit import LineEdit from .dialogWithCheckBox import DialogWithCheckBox from eplusplus.controller import ActorUser from eplusplus.exception import ColumnException, NoIdfException, InstallException, NoCsvException from PyQt5.QtCore import QSize, Qt, QRect fr...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 269, 19199, 198, 11748, 3992, 40259, 198, 6738, 764, 1370, 18378, 1330, 6910, 18378, 198, 6738, 764, 38969, 519, 3152, 9787, 14253, 1330, 21269, 519, 3152, 9787, 14253, 198, 6738, 304, 9541, 95...
2.96
375
from tree_map_class import *
[ 6738, 5509, 62, 8899, 62, 4871, 1330, 1635, 198 ]
3.222222
9
from functools import wraps import datetime from flask import jsonify, Flask, request, session from my_class import ExternalFunctions app = Flask(__name__) app.config["SECRET_KEY"] = 'kkkoech' user_details = dict() diary_entries = dict() def on_session(t): return decorator if __name__ == '__main__': app....
[ 6738, 1257, 310, 10141, 1330, 27521, 198, 198, 11748, 4818, 8079, 198, 198, 6738, 42903, 1330, 33918, 1958, 11, 46947, 11, 2581, 11, 6246, 198, 6738, 616, 62, 4871, 1330, 34579, 24629, 2733, 198, 198, 1324, 796, 46947, 7, 834, 3672, 8...
2.821138
123
const1 = "a" const2 = "b"
[ 9979, 16, 796, 366, 64, 1, 198, 9979, 17, 796, 366, 65, 1, 198 ]
1.857143
14
"""intake plugin for SDMX data sources""" import intake from intake.catalog import Catalog from intake.catalog.utils import reload_on_change from intake.catalog.local import LocalCatalogEntry, UserParameter import pandasdmx as sdmx from collections.abc import MutableMapping from datetime import date from itertools im...
[ 37811, 600, 539, 13877, 329, 9834, 43243, 1366, 4237, 37811, 628, 198, 11748, 10337, 198, 6738, 10337, 13, 9246, 11794, 1330, 44515, 198, 6738, 10337, 13, 9246, 11794, 13, 26791, 1330, 18126, 62, 261, 62, 3803, 198, 6738, 10337, 13, 924...
3.419643
112
# #import scipy #from scipy import io as sio import scipy.io.wavfile from ext.spafe.utils import vis from ext.spafe.features.bfcc import bfcc
[ 2, 198, 2, 11748, 629, 541, 88, 198, 2, 6738, 629, 541, 88, 1330, 33245, 355, 264, 952, 198, 11748, 629, 541, 88, 13, 952, 13, 45137, 7753, 198, 6738, 1070, 13, 2777, 8635, 13, 26791, 1330, 1490, 198, 6738, 1070, 13, 2777, 8635, ...
2.660377
53
import logging from datetime import date from telegram import Update from telegram.ext import ApplicationBuilder, CommandHandler from config.notif_config import NotifConfig from src.emojis import Emojis from src.team_fixtures_manager import TeamFixturesManager from src.telegram_bot.bot_commands_handler import NextAnd...
[ 11748, 18931, 198, 6738, 4818, 8079, 1330, 3128, 198, 198, 6738, 573, 30536, 1330, 10133, 198, 6738, 573, 30536, 13, 2302, 1330, 15678, 32875, 11, 9455, 25060, 198, 198, 6738, 4566, 13, 1662, 361, 62, 11250, 1330, 1892, 361, 16934, 198,...
3.184282
369
"""Edit plugin for Home Assistant CLI (hass-cli).""" import json as json_ import logging import click import homeassistant_cli.autocompletion as autocompletion from homeassistant_cli.cli import pass_context from homeassistant_cli.config import Configuration from homeassistant_cli.helper import raw_format_output, req_r...
[ 37811, 18378, 13877, 329, 5995, 15286, 43749, 357, 71, 562, 12, 44506, 21387, 15931, 198, 11748, 33918, 355, 33918, 62, 198, 11748, 18931, 198, 198, 11748, 3904, 198, 11748, 1363, 562, 10167, 62, 44506, 13, 2306, 42829, 24547, 355, 1960, ...
3.458716
109
"""Collection of model.""" from typing import Any from django.conf import settings from django.db import models from django.db.models.signals import pre_save from django.dispatch import receiver from django.utils.translation import gettext_lazy as _ from djgeojson.fields import PointField from .utils import get_read_...
[ 37811, 36307, 286, 2746, 526, 15931, 198, 6738, 19720, 1330, 4377, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 6...
3.088785
214
# coding = utf-8 import copy import json import logging import math import os import shutil import tarfile import tempfile import sys from io import open import torch from torch import nn from torch.nn import CrossEntropyLoss from activation_function import gelu, swish, ACT2FN import logging logger = logging.getLogge...
[ 2, 19617, 796, 3384, 69, 12, 23, 198, 198, 11748, 4866, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 10688, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 13422, 7753, 198, 11748, 20218, 7753, 198, 11748, 25064, 198, 6738, 3...
3.444444
108
import numpy as np from osgeo import gdal from .median_absolute_deviation import MedianAbsoluteDeviation from .raster_file import RasterFile
[ 11748, 299, 32152, 355, 45941, 198, 6738, 28686, 469, 78, 1330, 308, 31748, 198, 198, 6738, 764, 1150, 666, 62, 48546, 62, 7959, 3920, 1330, 26178, 24849, 3552, 13603, 3920, 198, 6738, 764, 81, 1603, 62, 7753, 1330, 371, 1603, 8979, 6...
3.404762
42
import time import hmac import base64 import datetime import schedule import psycopg2 from time import mktime from hashlib import sha1 from pprint import pprint from requests import request from datetime import datetime from wsgiref.handlers import format_date_time from psycopg2.extensions import ISOLATION_LEVEL_AUTOCO...
[ 11748, 640, 198, 11748, 289, 20285, 198, 11748, 2779, 2414, 198, 11748, 4818, 8079, 198, 11748, 7269, 198, 11748, 17331, 22163, 70, 17, 198, 6738, 640, 1330, 33480, 2435, 198, 6738, 12234, 8019, 1330, 427, 64, 16, 198, 6738, 279, 4798, ...
2.613793
145
# -*- coding: utf8 -*- # Light.. # QQ1311817771 import AndroidQQ,threading,time from AndroidQQ import Android if __name__ == "__main__": qq = Main() qq.login("634545399","")
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 23, 532, 9, 12, 201, 198, 2, 4401, 492, 201, 198, 2, 1195, 48, 1485, 16817, 1558, 46761, 201, 198, 11748, 5565, 48, 48, 11, 16663, 278, 11, 2435, 201, 198, 6738, 5565, 48, 48, 1330, 5565, 20...
2.206897
87
from util.env import log_dir import logging
[ 6738, 7736, 13, 24330, 1330, 2604, 62, 15908, 198, 11748, 18931, 628 ]
3.75
12
# Generated by Django 2.2.2 on 2019-10-23 14:41 from django.db import migrations, models import tinymce.models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 17, 319, 13130, 12, 940, 12, 1954, 1478, 25, 3901, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 7009, 76, 344, 13, 27530, 628 ]
2.897436
39
#!/usr/bin/python import colorsys from azure.servicebus import ServiceBusService from azure.servicebus import Message from blinkt import set_pixel, set_brightness, show, clear import time import json def snake( r, g, b ): "This creates a snake effect on the blinkt using the specified colour" clear() for co...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 7577, 893, 198, 6738, 35560, 495, 13, 15271, 10885, 1330, 4809, 16286, 16177, 198, 6738, 35560, 495, 13, 15271, 10885, 1330, 16000, 198, 6738, 21019, 83, 1330, 900, 62, 32515, 11, ...
2.169719
819
print('Quanto dinheiro voce tem na carteiro') print('-'*20) re = float(input('R$ ')) dol = re * 0.1874 print('-'*20) print('US$ {:.2f}'.format(dol))
[ 4798, 10786, 4507, 14723, 16278, 258, 7058, 7608, 344, 2169, 12385, 6383, 68, 7058, 11537, 198, 4798, 10786, 19355, 9, 1238, 8, 198, 260, 796, 12178, 7, 15414, 10786, 49, 3, 705, 4008, 198, 67, 349, 796, 302, 1635, 657, 13, 1507, 45...
2.223881
67
# generated from genmsg/cmake/pkg-genmsg.context.in messages_str = "/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/AnalogIOState.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/AnalogIOStates.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/AnalogOutputCommand...
[ 2, 7560, 422, 2429, 19662, 14, 11215, 539, 14, 35339, 12, 5235, 19662, 13, 22866, 13, 259, 198, 198, 37348, 1095, 62, 2536, 796, 12813, 11195, 14, 37083, 7278, 14, 9246, 5116, 62, 18504, 14, 10677, 14, 65, 40864, 62, 11321, 14, 65, ...
2.429339
1,302
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Nov 12 17:45:51 2018 @author: zhao """ import argparse import torch import torch.nn.parallel from torch.autograd import Variable import torch.optim as optim import torch.nn.functional as F import sys import os import numpy as np BASE_DIR = os.path.dir...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 2892, 5267, 1105, 1596, 25, 2231, 25, 4349, 2864, 198, 198, 31, 9800, 25, 1976, 23778, 19...
2.726804
776
import simpy import itertools import numpy as np from RideSimulator.Driver import Driver from RideSimulator.HexGrid import HexGrid def get_spot_locations(width: int, height: int, interval: int) -> np.ndarray: """ :param width: width of the grid :param height: height of the grid :param interval: distan...
[ 11748, 985, 9078, 198, 11748, 340, 861, 10141, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 21640, 8890, 8927, 13, 32103, 1330, 12434, 198, 6738, 21640, 8890, 8927, 13, 39, 1069, 41339, 1330, 22212, 41339, 628, 198, 4299, 651, 62, 204...
2.804408
363
""" Day $: https://adventofcode.com/2021/day/$ """ Data = list if __name__ == "__main__": main()
[ 37811, 198, 12393, 720, 25, 198, 198, 5450, 1378, 324, 1151, 1659, 8189, 13, 785, 14, 1238, 2481, 14, 820, 32624, 198, 37811, 198, 198, 6601, 796, 1351, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 19...
2.22449
49
import numpy as np def Reichardt8(video, dirs=[0,1,2,3,4,5,6,7]): ''' Returns a tuple of Reichardt-Hassenstein correlators in 8 directions args: video: Shape ~ [TimeSteps, H, W, 1] ''' vp1, vm1 = Reichardt_vertical_2channels_Vectorized(video) #Directions 1, -1 vp3, vm3 = Reich...
[ 11748, 299, 32152, 355, 45941, 198, 198, 4299, 24560, 446, 83, 23, 7, 15588, 11, 288, 17062, 41888, 15, 11, 16, 11, 17, 11, 18, 11, 19, 11, 20, 11, 21, 11, 22, 60, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, ...
2.123077
1,495
from turtle import * coeficient = 0.5 speed(5) base() roof() window() door() move() tree()
[ 6738, 28699, 1330, 1635, 201, 198, 201, 198, 201, 198, 1073, 891, 11373, 796, 657, 13, 20, 201, 198, 201, 198, 12287, 7, 20, 8, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 201, 198, 201, 198, 201, 198, 8692, 3419...
1.72973
74
REDSTONE = 55 REPEATER = 93 TORCH = 75 AIR = 0 GLASS = 20 SLAB = 44 DOUBLE_SLAB = 43 WOOL = 35 DIR_WEST_POS_Z = 0 DIR_NORTH_NEG_X = 1 DIR_EAST_NEG_Z = 2 DIR_SOUTH_POS_X = 3 TORCH_ON_GROUND = 5 TORCH_POINTING_POS_X = 1 TORCH_POINTING_NEG_X = 2 TORCH_POINTING_POS_Z = 3 TORCH_POINTING_NEG_Z = 4 STONE_SLAB_TOP = 8 DO...
[ 22083, 2257, 11651, 796, 5996, 198, 2200, 11401, 23261, 796, 10261, 198, 32961, 3398, 796, 5441, 198, 42149, 796, 657, 198, 8763, 10705, 796, 1160, 198, 198, 8634, 6242, 796, 5846, 198, 35, 2606, 19146, 62, 8634, 6242, 796, 5946, 198, ...
1.628466
541
import os import subprocess import sys def run_command(string): ''' fork a process to execute the command string given as argument, returning the string written to STDOUT ''' DEVNULL = open(os.devnull, 'wb') out = subprocess.check_output(string, stderr=DEVNULL, shell=True) if sys.version_info >= (3, 0...
[ 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 25064, 628, 198, 4299, 1057, 62, 21812, 7, 8841, 2599, 198, 220, 220, 220, 705, 7061, 15563, 257, 1429, 284, 12260, 262, 3141, 4731, 1813, 355, 4578, 11, 8024, 262, 4731, 3194, 284, 48...
2.961538
312
import json filename = "data.json" mydata = { "title":"", "lesson":{ "python":"", 'vue':"", "golang":"" }, "games":{ "GAT":"" }, } # with open(filename,'w',encoding="utf-8") as data: # ,,json json.dump(mydata,data,indent=4) # with open(filename,'r',encodi...
[ 11748, 33918, 198, 198, 34345, 796, 366, 7890, 13, 17752, 1, 198, 1820, 7890, 796, 1391, 198, 220, 220, 220, 366, 7839, 2404, 1600, 198, 220, 220, 220, 366, 1203, 261, 1298, 90, 198, 220, 220, 220, 220, 220, 220, 220, 366, 29412, ...
1.917073
205
import progressbar, time from .colors import * # progress bar
[ 11748, 4371, 5657, 11, 640, 198, 6738, 764, 4033, 669, 1330, 1635, 198, 198, 2, 4371, 2318 ]
3.647059
17
# from nipype import config # config.enable_debug_mode() # Importing necessary packages import os import os.path as op import glob import json import nipype from nipype import config, logging import matplotlib.pyplot as plt import nipype.interfaces.fsl as fsl import nipype.pipeline.engine as pe import nipype.interfaces...
[ 2, 422, 299, 541, 2981, 1330, 4566, 198, 2, 4566, 13, 21633, 62, 24442, 62, 14171, 3419, 198, 2, 17267, 278, 3306, 10392, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 1034, 198, 11748, 15095, 198, 11748, 33918, 198, 11748, 299...
2.315292
1,903
import sys N = -1 G = None H = None vis = None vis_aux = None valence = None flows = {} answer = [] allowed_flows = { 3 : [-1, 1], 4 : [-1, 1, 2], 5 : [-1, 1, 2, -2] }
[ 11748, 25064, 198, 198, 45, 796, 532, 16, 198, 198, 38, 796, 6045, 198, 39, 796, 6045, 198, 4703, 796, 6045, 198, 4703, 62, 14644, 796, 6045, 198, 2100, 594, 796, 6045, 198, 198, 44041, 796, 23884, 198, 198, 41484, 796, 17635, 198, ...
2.05814
86
#!/usr/bin/pyhon """ Copyright 2014 The Trustees of Princeton University 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, 48443, 14629, 14, 8800, 14, 9078, 24130, 198, 198, 37811, 198, 220, 220, 15069, 1946, 383, 9870, 2841, 286, 23173, 2059, 628, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 220, ...
3.408602
279
from microplates.utils import *
[ 6738, 4580, 17041, 13, 26791, 1330, 1635, 198 ]
4
8
import numpy as np import random from audio import read_mfcc from batcher import sample_from_mfcc from constants import SAMPLE_RATE, NUM_FRAMES from conv_models import DeepSpeakerModel from test import batch_cosine_similarity np.random.seed(123) random.seed(123) model = DeepSpeakerModel() model.m.load_weights('/Users...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 6738, 6597, 1330, 1100, 62, 76, 69, 535, 198, 6738, 7365, 2044, 1330, 6291, 62, 6738, 62, 76, 69, 535, 198, 6738, 38491, 1330, 28844, 16437, 62, 49, 6158, 11, 36871, 62, 10913, 2...
2.467593
432
import sys import os import subprocess import pytest import numpy as np from functools import partial import collections from grpc._channel import _Rendezvous from google.cloud import bigtable from google.auth import credentials from math import inf from datetime import datetime, timedelta from time import sleep from s...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 11748, 17268, 198, 6738, 1036, 14751, 13557, 17620, 1330, 4808, 49, 41913, ...
2.025142
2,108
import graphene_django_optimizer as gql_optimizer from ...delivery import models
[ 11748, 42463, 62, 28241, 14208, 62, 40085, 7509, 355, 308, 13976, 62, 40085, 7509, 198, 198, 6738, 2644, 12381, 6315, 1330, 4981, 628 ]
3.608696
23
import os import json import uuid import shlex import weechat import requests from ciscosparkapi import CiscoSparkAPI from ws4py.client.threadedclient import WebSocketClient SCRIPT_NAME = "spark" FULL_NAME = "plugins.var.python.{}".format(SCRIPT_NAME) SPARK_SOCKET_URL = 'https://wdm-a.wbx2.com/wdm/api/v1/devices' ...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 334, 27112, 198, 11748, 427, 2588, 198, 198, 11748, 356, 3055, 265, 198, 11748, 7007, 198, 6738, 269, 2304, 2117, 668, 15042, 1330, 28289, 4561, 668, 17614, 198, 6738, 266, 82, 19, 9078, 13, ...
2.436306
942
import os import sys import subprocess import requests import ssl import random import string import json from flask import jsonify from flask import Flask from flask import request from flask import send_file import traceback from uuid import uuid4 from notebook_utils.synthesize import * try: # Python 3.5+ f...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 850, 14681, 198, 11748, 7007, 198, 11748, 264, 6649, 198, 11748, 4738, 198, 11748, 4731, 198, 11748, 33918, 198, 198, 6738, 42903, 1330, 33918, 1958, 198, 6738, 42903, 1330, 46947, 198, 6738, 4...
2.857971
345
import RPi.GPIO as GPIO import time import pygame from pygame import locals import pygame.display GPIO.setmode(GPIO.BOARD) GPIO.setwarnings(False) speedA = 0.000 speedB = 0.000 x = 512.00 y = 512.00 # frequency=100Hz t_on = 0.00 t_off = 0.00 ledpin1 =35 # left_fwd ledpin2 =36 # right_fwd l...
[ 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 201, 198, 11748, 640, 201, 198, 11748, 12972, 6057, 201, 198, 6738, 12972, 6057, 1330, 17205, 201, 198, 11748, 12972, 6057, 13, 13812, 201, 198, 201, 198, 16960, 9399, 13, 2617, 14171, 7, ...
1.673527
1,409
""" This module contains functions that are geared toward serializing objects, in particular JSON API objects. """ import decimal from collections import Iterable from rest_helpers.jsonapi_objects import Resource, Response, Link, JsonApiObject, Relationship def to_jsonable(obj, no_empty_field=False, is_private=None):...
[ 37811, 198, 1212, 8265, 4909, 5499, 326, 389, 31394, 3812, 11389, 2890, 5563, 11, 198, 259, 1948, 19449, 7824, 5563, 13, 198, 37811, 198, 198, 11748, 32465, 198, 6738, 17268, 1330, 40806, 540, 198, 6738, 1334, 62, 16794, 364, 13, 17752,...
2.801529
3,008
""" # Sample code to perform I/O: name = input() # Reading input from STDIN print('Hi, %s.' % name) # Writing output to STDOUT # Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail """ # Write your code here t = int(input()) for _ in range(t): n =...
[ 37811, 198, 2, 27565, 2438, 284, 1620, 314, 14, 46, 25, 198, 198, 3672, 796, 5128, 3419, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 11725, 5128, 422, 48571, 1268, 198, 4798, 10786, 1...
2.48913
184
import random import time from characters import Wizard, Creature if __name__ == '__main__': main()
[ 11748, 4738, 198, 11748, 640, 198, 198, 6738, 3435, 1330, 16884, 11, 33248, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
3.235294
34
import threading from time import sleep import RPi.GPIO as GPIO illumination_time_default = 0.001 #test if __name__ == "__main__": L0 = 1 L1 = 2 L2 = 4 L3 = 8 L4 = 16 L5 = 32 L6 = 64 ALL = 1+2+4+8+16+32+64 GPIO.setmode(GPIO.BCM) try: tree = XmasTree() ...
[ 198, 11748, 4704, 278, 198, 6738, 640, 1330, 3993, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, 198, 359, 388, 1883, 62, 2435, 62, 12286, 796, 657, 13, 8298, 628, 198, 2, 9288, 198, 361, 11593, 3672, 834, 6624, 366, 834,...
1.748175
274
jogo = [[], [], []], [[], [], []], [[], [], []] cont = 0 contx = conto = contxc = contoc = 0 while True: l = int(input('Informe a linha: ')) c = int(input('Informe a coluna: ')) if l < 4 and c < 4: if cont % 2 == 0: jogo[l-1][c-1] = 'X' else: jogo[l-1][c-1] = 'O' ...
[ 73, 24076, 796, 16410, 4357, 685, 4357, 17635, 4357, 16410, 4357, 685, 4357, 17635, 4357, 16410, 4357, 685, 4357, 685, 11907, 198, 3642, 796, 657, 198, 3642, 87, 796, 542, 78, 796, 542, 25306, 796, 542, 420, 220, 796, 657, 198, 4514, ...
1.529366
1,277
# Copyright 2018 PayTrace, Inc. # # 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 wri...
[ 2, 15069, 2864, 7119, 2898, 558, 11, 3457, 13, 198, 2, 220, 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,...
2.636246
1,545
#!/usr/bin/env python3 # Day 3, with some speed optimizations # Not really necessary for day 3, but probably later import sys import typing import array if len(sys.argv) != 2: print('Usage:', sys.argv[0], '<input.txt>') sys.exit(1) width = 0 heigth = 0 # Use 1-d array of bytes to keep pixels a = read_inpu...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 3596, 513, 11, 351, 617, 2866, 41446, 198, 2, 1892, 1107, 3306, 329, 1110, 513, 11, 475, 2192, 1568, 198, 198, 11748, 25064, 198, 11748, 19720, 198, 11748, 7177, 198, 198...
2.092105
304
x = 23 epsilon = 0.001 guess = x/2 tries = 0 while abs(guess**2- x) >= epsilon: if guess**2 > x: guess /=2 else: guess *=1.5 tries +=1 print(f'Number of tries: {tries}') print(f'Guess = {guess}')
[ 87, 796, 2242, 198, 538, 18217, 261, 796, 657, 13, 8298, 198, 5162, 408, 796, 2124, 14, 17, 198, 83, 1678, 796, 657, 198, 198, 4514, 2352, 7, 5162, 408, 1174, 17, 12, 2124, 8, 18189, 304, 862, 33576, 25, 198, 220, 220, 220, 611,...
1.89916
119
import dash_core_components as dcc import dash_html_components as html from .layouts.info_card import render as info_card from .layouts.graph_wrapper import render as graph_wrapper from .layouts.project_bar import render as project_bar from .layouts.color_card import render as color_card from ..data_retrievers.dummy ...
[ 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 198, 11748, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, 198, 198, 6738, 764, 10724, 5269, 13, 10951, 62, 9517, 1330, 8543, 355, 7508, 62, 9517, 198, 6738, 764, 10724, 5269, 13, ...
3.325203
123
"""" Copyright 2021 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dis...
[ 15931, 15931, 198, 15269, 33448, 3012, 11419, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 1639, ...
3.729358
218
from office365.runtime.client_value import ClientValue
[ 6738, 2607, 24760, 13, 43282, 13, 16366, 62, 8367, 1330, 20985, 11395, 628 ]
4.307692
13
"""blog URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based...
[ 37811, 14036, 10289, 28373, 198, 198, 464, 4600, 6371, 33279, 82, 63, 1351, 11926, 32336, 284, 5009, 13, 1114, 517, 1321, 3387, 766, 25, 198, 220, 220, 220, 3740, 1378, 31628, 13, 28241, 648, 404, 305, 752, 13, 785, 14, 268, 14, 16,...
2.832618
466
# -*- coding: utf-8 -*- """ @title: try_init_models.py @author: Tuan Le @email: tuanle@hotmail.de """ from dcgan import DCGAN from vae import VAE if __name__ == "__main__": print("Init DCGAN_1 model...") dcgan_1 = DCGAN(name='DCGAN_1') print("Init DCGAN_2 model...") dcgan_2 = DCGAN(name='DCGAN_2...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 7839, 25, 1949, 62, 15003, 62, 27530, 13, 9078, 198, 31, 9800, 25, 309, 7258, 1004, 198, 31, 12888, 25, 256, 7258, 293, 31, 8940, 4529, 13, 2934, 198...
2.009009
333
# bloque principal persona1=Persona('juan',22) persona2=Persona('ana',20) if persona1==persona2: print("Las dos personas tienen la misma edad.") else: print("No tienen la misma edad.")
[ 201, 198, 2, 24924, 4188, 10033, 201, 198, 201, 198, 6259, 64, 16, 28, 15439, 64, 10786, 73, 7258, 3256, 1828, 8, 201, 198, 6259, 64, 17, 28, 15439, 64, 10786, 2271, 3256, 1238, 8, 201, 198, 361, 27822, 16, 855, 6259, 64, 17, 25...
2.348837
86
# Definition for singly-linked list. def merge_sort_list(head): if not head or not head.next: return head slow = fast = head while fast.next and fast.next.next: fast = fast.next.next slow = slow.next # Split into two lists. # Why head2 starts from the next node of mid(slo...
[ 2, 30396, 329, 1702, 306, 12, 25614, 1351, 13, 628, 198, 4299, 20121, 62, 30619, 62, 4868, 7, 2256, 2599, 198, 220, 220, 220, 611, 407, 1182, 393, 407, 1182, 13, 19545, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1182, 628, ...
2.244141
512
# place super_test.py code here # place keyword_test.py code here
[ 198, 2, 1295, 2208, 62, 9288, 13, 9078, 2438, 994, 628, 198, 2, 1295, 21179, 62, 9288, 13, 9078, 2438, 994, 628, 198 ]
3.086957
23
from PyQt4.QtCore import * from PyQt4.QtGui import * import sys,os,time from scipy.stats import gamma, norm, beta import matplotlib.pyplot as plt from datetime import date, timedelta import numpy as np import tkinter from os import listdir from os.path import isfile, join app = QApplication(sys...
[ 6738, 9485, 48, 83, 19, 13, 48, 83, 14055, 1330, 1635, 201, 198, 6738, 9485, 48, 83, 19, 13, 48, 83, 8205, 72, 1330, 1635, 201, 198, 11748, 25064, 11, 418, 11, 2435, 201, 198, 6738, 629, 541, 88, 13, 34242, 1330, 34236, 11, 2593...
2.526761
355