content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import argparse import math import os import pickle import random import sys import numpy as np import torch import torch.backends.cudnn as cudnn from torch import nn from torch.optim import lr_scheduler from torch.utils import data import torchvision.transforms as transforms import transforms as extended_transforms ...
[ 11748, 1822, 29572, 198, 11748, 10688, 198, 11748, 28686, 198, 11748, 2298, 293, 198, 11748, 4738, 198, 11748, 25064, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 1891, 2412, 13, 66, 463, 20471, 355, ...
2.309708
1,679
# Apresentao print('Programa para somar 8 valores utilizando vetores/listas') print() # Declarao do vetor valores = [0, 0, 0, 0, 0, 0, 0, 0] # Solicita os valores for i in range(len(valores)): valores[i] = int(input('Informe o valor: ')) # Clculo da soma soma = 0 for i in range(len(valores)): soma += valores...
[ 2, 5949, 2028, 5488, 198, 4798, 10786, 15167, 64, 31215, 3870, 283, 807, 1188, 2850, 7736, 528, 25440, 20202, 2850, 14, 4868, 292, 11537, 198, 4798, 3419, 198, 198, 2, 16691, 3301, 78, 466, 1569, 13165, 198, 2100, 2850, 796, 685, 15, ...
2.325301
166
from collections import defaultdict f = open("input.txt") d = f.read() houses = defaultdict(int,{(0,0):1}) cur = [0,0] for c in d: if c == "<": cur[0] -= 1 if c == ">": cur[0] += 1 if c == "v": cur[1] += 1 if c == "^": cur[1] -= 1 houses[tuple(cur)]+=1 print(len(hou...
[ 6738, 17268, 1330, 4277, 11600, 198, 69, 796, 1280, 7203, 15414, 13, 14116, 4943, 198, 67, 796, 277, 13, 961, 3419, 198, 20089, 796, 4277, 11600, 7, 600, 11, 90, 7, 15, 11, 15, 2599, 16, 30072, 198, 22019, 796, 220, 685, 15, 11, ...
1.936047
172
# Blender-specific Configuration Settings from math import pi render = { "render_engine": "CYCLES", "render": {"cycles_device": "GPU"}, "dimensions": {"resolution": [1280, 1024], "percentage": 100.0}, "sampling": {"cycles_samples": 256, "cycles_preview_samples": 16}, "light_paths": { "tran...
[ 2, 1086, 2194, 12, 11423, 28373, 16163, 198, 198, 6738, 10688, 1330, 31028, 198, 198, 13287, 796, 1391, 198, 220, 220, 220, 366, 13287, 62, 18392, 1298, 366, 34, 56, 5097, 1546, 1600, 198, 220, 220, 220, 366, 13287, 1298, 19779, 32503...
1.93029
1,205
from .base import Controller from .base import Action import numpy as np import pandas as pd import logging from collections import namedtuple from tqdm import tqdm logger = logging.getLogger(__name__) CONTROL_QUEST = 'simglucose/params/Quest.csv' PATIENT_PARA_FILE = 'simglucose/params/vpatient_params.csv' ParamTup = ...
[ 6738, 764, 8692, 1330, 22741, 198, 6738, 764, 8692, 1330, 7561, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 18931, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 256, 80, 36020, 1330, 256, ...
2.335628
581
# # Copyright 2013 Rackspace Hosting. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
[ 2, 198, 2, 15069, 2211, 37927, 13200, 14504, 278, 13, 198, 2, 198, 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, 1...
3.731707
164
from flask import Flask, redirect, url_for, jsonify, request app = Flask(__name__) users = [] ''' Json api formJson Json 1. 2.open api 3. RESTful api Dr. Fielding url /GET /players /GET /player/id id /PUT /players /PATCH /players /DELETE /player/id /GET /player/id/level ''' ...
[ 6738, 42903, 1330, 46947, 11, 18941, 11, 19016, 62, 1640, 11, 33918, 1958, 11, 2581, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 18417, 796, 17635, 198, 7061, 6, 198, 41, 1559, 40391, 198, 220, 220, 220, 1296, 41, 1559, ...
2.134615
156
# -*- coding: utf-8 -*- # Generated by Django 1.11.10 on 2018-03-31 13:48 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 940, 319, 2864, 12, 3070, 12, 3132, 1511, 25, 2780, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.754386
57
import logging from typing import Match, Any, Dict import aiohttp from discord import Message from MoMMI import comm_event, command, MChannel, always_command logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 6738, 19720, 1330, 13225, 11, 4377, 11, 360, 713, 198, 11748, 257, 952, 4023, 198, 6738, 36446, 1330, 16000, 198, 6738, 4270, 44, 8895, 1330, 725, 62, 15596, 11, 3141, 11, 337, 29239, 11, 1464, 62, 21812, 198, 198, ...
3.5
56
from test.BaseCase import BaseCase
[ 6738, 1332, 13, 14881, 20448, 1330, 7308, 20448, 628 ]
4
9
import sqlalchemy as sa from ..core import db
[ 11748, 44161, 282, 26599, 355, 473, 198, 198, 6738, 11485, 7295, 1330, 20613, 628, 198 ]
3.266667
15
# -*- coding: utf-8 -*- """ Created on Fri Aug 25 13:08:16 2020 @author: haolinl """ import copy import os import time import numpy as np import random import scipy.io # For extracting data from .mat file def saveLog(file_name_list, elapsed_time_list, write_status, data_file_name, s...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 19480, 2447, 1679, 1511, 25, 2919, 25, 1433, 12131, 201, 198, 201, 198, 31, 9800, 25, 387, 24910, 75, 201, 198, 37811, 201, 198, 201,...
2.233452
2,810
import pytest from mock import patch from data.cache import InMemoryDataModelCache, NoopDataModelCache, MemcachedModelCache from data.cache.cache_key import CacheKey def test_memcache(): key = CacheKey("foo", "60m") with patch("data.cache.impl.Client", MockClient): cache = MemcachedModelCache(("12...
[ 11748, 12972, 9288, 198, 198, 6738, 15290, 1330, 8529, 198, 198, 6738, 1366, 13, 23870, 1330, 554, 30871, 6601, 17633, 30562, 11, 1400, 404, 6601, 17633, 30562, 11, 4942, 66, 2317, 17633, 30562, 198, 6738, 1366, 13, 23870, 13, 23870, 62...
2.545662
438
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 ctx = demisto.context() dataFromCtx = ctx.get("widgets") if not dataFromCtx: incident = demisto.incidents()[0] accountName = incident.get('account') accountName = f"acc_{accountName}" if accountName != "" else "" ...
[ 11748, 1357, 396, 296, 735, 355, 1357, 396, 78, 220, 1303, 645, 20402, 25, 376, 21844, 198, 6738, 8070, 10697, 37906, 1330, 1635, 220, 1303, 645, 20402, 25, 376, 21844, 198, 198, 49464, 796, 1357, 396, 78, 13, 22866, 3419, 198, 7890, ...
1.745647
1,321
from torch.utils.data import DataLoader from dataset.wiki_dataset import BERTDataset from models.bert_model import * from tqdm import tqdm import numpy as np import pandas as pd import os config = {} config['train_corpus_path'] = './corpus/train_wiki.txt' config['test_corpus_path'] = './corpus/test_wiki.txt' config[...
[ 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 6738, 27039, 13, 15466, 62, 19608, 292, 316, 1330, 347, 17395, 27354, 292, 316, 198, 6738, 4981, 13, 4835, 62, 19849, 1330, 1635, 198, 198, 6738, 256, 80, 36020, 1330, 256, 80,...
2.388889
486
import triton import triton.language as tl # Notes # 1. triton doesn't support uint32, so we use int32 instead and benefit from the fact that two's complement operations are equivalent to uint operations. # 2. multiply_low_high is currently inefficient. # 3. Even though technically philox sampling outputs int, in man...
[ 11748, 491, 37752, 198, 11748, 491, 37752, 13, 16129, 355, 256, 75, 628, 198, 2, 11822, 198, 2, 352, 13, 491, 37752, 1595, 470, 1104, 20398, 2624, 11, 523, 356, 779, 493, 2624, 2427, 290, 4414, 422, 262, 1109, 326, 734, 338, 16829, ...
3.727273
110
# Copyright 2021-present Kensho Technologies, LLC. from .alphabet import Alphabet # noqa from .decoder import BeamSearchDecoderCTC, build_ctcdecoder # noqa from .language_model import LanguageModel # noqa __package_name__ = "pyctcdecode" __version__ = "0.3.0"
[ 2, 15069, 33448, 12, 25579, 29018, 8873, 21852, 11, 11419, 13, 198, 6738, 764, 17307, 8380, 1330, 45695, 220, 1303, 645, 20402, 198, 6738, 764, 12501, 12342, 1330, 25855, 18243, 10707, 12342, 4177, 34, 11, 1382, 62, 310, 10210, 721, 123...
3.081395
86
from wumpus.server import Server from circuits import Debugger s = Server("0.0.0.0", 50551) + Debugger() s.run() import sys sys.exit(1)
[ 6738, 266, 931, 385, 13, 15388, 1330, 9652, 198, 6738, 24907, 1330, 31687, 1362, 198, 198, 82, 796, 9652, 7203, 15, 13, 15, 13, 15, 13, 15, 1600, 2026, 43697, 8, 1343, 31687, 1362, 3419, 198, 82, 13, 5143, 3419, 198, 11748, 25064, ...
2.686275
51
import array import struct import time from fcntl import ioctl from typing import IO from platypush.backend import Backend from platypush.message.event.joystick import JoystickConnectedEvent, JoystickDisconnectedEvent, \ JoystickButtonPressedEvent, JoystickButtonReleasedEvent, JoystickAxisEvent
[ 11748, 7177, 198, 11748, 2878, 198, 11748, 640, 198, 6738, 277, 66, 429, 75, 1330, 33245, 34168, 198, 6738, 19720, 1330, 24418, 198, 198, 6738, 40315, 4464, 1530, 13, 1891, 437, 1330, 5157, 437, 198, 6738, 40315, 4464, 1530, 13, 20500, ...
3.638554
83
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ File: mag_compensation.py Author: Tanja Baumann Email: tanja@auterion.com Github: https://github.com/baumanta Description: Computes linear coefficients for mag compensation from thrust and current Usage: python mag_compensation.py /path/to/log/logfile.ulg curr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 8979, 25, 2153, 62, 5589, 25742, 13, 9078, 198, 13838, 25, 11818, 6592, 8999, 40062, 198, 15333, ...
2.274831
4,279
from flask import Flask app = Flask(_name_)
[ 6738, 42903, 1330, 46947, 198, 1324, 796, 46947, 28264, 3672, 62, 8 ]
3.583333
12
import os path1 = "outputs" path2 = "outputs/_imgs" path3 = "outputs/max_sharpe_weights" path4 = "outputs/opt_portfolio_trades" try: os.mkdir(path1) except OSError: print (" %s " % path1) else: print (" %s " % path1) try: os.makedirs(path2) os.makedirs(path3) os.makedirs(path4) except OSEr...
[ 11748, 28686, 628, 198, 6978, 16, 796, 366, 22915, 82, 1, 198, 6978, 17, 796, 366, 22915, 82, 47835, 9600, 82, 1, 198, 6978, 18, 796, 366, 22915, 82, 14, 9806, 62, 1477, 283, 431, 62, 43775, 1, 198, 6978, 19, 796, 366, 22915, 82...
2.097561
205
"""Transform classes for runtime type checking.""" from typing import Undefined, List, Set, Any, cast, Tuple, Dict from mypy.nodes import ( TypeDef, Node, FuncDef, VarDef, Block, Var, ExpressionStmt, TypeInfo, SuperExpr, NameExpr, CallExpr, MDEF, MemberExpr, ReturnStmt, AssignmentStmt, TypeExpr, PassStmt,...
[ 37811, 41762, 6097, 329, 19124, 2099, 10627, 526, 15931, 198, 198, 6738, 19720, 1330, 13794, 18156, 11, 7343, 11, 5345, 11, 4377, 11, 3350, 11, 309, 29291, 11, 360, 713, 198, 198, 6738, 616, 9078, 13, 77, 4147, 1330, 357, 198, 220, ...
2.896458
367
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from django_tablib.admin import TablibAdmin from jazzpos.models import Customer, Patient, Store, CustomerType, StoreSettings from jazzpos.models import UserProfile UserAdmin.inlines = [UserPro...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 28482, 1330, 11787, 46787, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 198, 6738, 42625, 14208, 6...
3.489011
182
# Basic training configuration file from torch.optim import RMSprop from torch.optim.lr_scheduler import MultiStepLR from torchvision.transforms import RandomHorizontalFlip, Compose from torchvision.transforms import RandomResizedCrop, RandomAffine, RandomApply from torchvision.transforms import ColorJitter, ToTensor, ...
[ 2, 14392, 3047, 8398, 2393, 198, 6738, 28034, 13, 40085, 1330, 371, 5653, 22930, 198, 6738, 28034, 13, 40085, 13, 14050, 62, 1416, 704, 18173, 1330, 15237, 8600, 35972, 198, 6738, 28034, 10178, 13, 7645, 23914, 1330, 14534, 27991, 38342, ...
2.159624
1,278
#!/usr/bin/env python # # Author: Qiming Sun <osirpt.sun@gmail.com> # ''' A simple example to run MCSCF with background charges. ''' import numpy from pyscf import gto, scf, mcscf, qmmm mol = gto.M(atom=''' C 1.1879 -0.3829 0.0000 C 0.0000 0.5526 0.0000 O -1.1867 -0.2472 0.0000 H -1.9237 0...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 6434, 25, 1195, 320, 278, 3825, 1279, 418, 343, 457, 13, 19155, 31, 14816, 13, 785, 29, 198, 2, 198, 198, 7061, 6, 198, 32, 2829, 1672, 284, 1057, 13122, 6173, 37, 351...
2.023952
668
import datetime from decimal import Decimal, ROUND_DOWN, ROUND_UP import logging import re from django.conf import settings from django.core.exceptions import ValidationError from django.core.validators import RegexValidator from django.utils import formats from django.utils.cache import patch_cache_control from djang...
[ 11748, 4818, 8079, 198, 6738, 32465, 1330, 4280, 4402, 11, 371, 15919, 62, 41925, 11, 371, 15919, 62, 8577, 198, 11748, 18931, 198, 11748, 302, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, ...
2.878752
833
# -*- coding: UTF-8 -*- import os this_file_path = os.path.dirname(os.path.realpath(__file__)) MODELS_DIR = os.path.join(this_file_path, "models/")
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 198, 5661, 62, 7753, 62, 6978, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 4008, 198, 198, 33365, ...
2.287879
66
import array as arr a = arr.array('i', [ 1,2,3,4,5,6]) print(a) # Accessing elements print(a[2]) print(a[-2]) # BASIC ARRAY OPERATIONS # Find length of array print() print('Length of array') print(len(a)) # Adding elments to an array # append() to add a single element at the end of an array # extend() to add more th...
[ 11748, 7177, 355, 5240, 198, 64, 796, 5240, 13, 18747, 10786, 72, 3256, 685, 352, 11, 17, 11, 18, 11, 19, 11, 20, 11, 21, 12962, 198, 4798, 7, 64, 8, 198, 198, 2, 8798, 278, 4847, 198, 4798, 7, 64, 58, 17, 12962, 198, 4798, ...
2.672603
730
""" Module containing low score classifier for MPG Ranch NFC detectors. An instance of the `Classifier` class of this module assigns the `LowScore` classification to a clip if the clip has no `Classification` annotation and has a `DetectorScore` annotation whose value is less than a threshold. This classifier is inte...
[ 37811, 198, 26796, 7268, 1877, 4776, 1398, 7483, 329, 48652, 24576, 24004, 40471, 13, 198, 198, 2025, 4554, 286, 262, 4600, 9487, 7483, 63, 1398, 286, 428, 8265, 46974, 262, 4600, 20535, 26595, 63, 198, 4871, 2649, 284, 257, 10651, 611,...
3.109272
302
from setuptools import setup, find_packages setup( name='athena2pd', packages=['athena2pd'], version=find_version('athena2pd/__init__.py'), description='Help\'s simplify the access of databases stored in Amazon Athena by using SQL and pandas DataFrames.', long_description=get_long_desc('README.md')...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 265, 831, 64, 17, 30094, 3256, 198, 220, 220, 220, 10392, 28, 17816, 265, 831, 64, 17, 30094, 6, 4357, 198, 220, 220, 2...
2.659631
379
from .spp import * from .unified_foreground_packing import * __all__ = [ 'phsppog', 'UnifiedForegroundPacking' ]
[ 6738, 764, 82, 381, 1330, 1635, 198, 6738, 764, 403, 1431, 62, 754, 2833, 62, 41291, 1330, 1635, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 705, 746, 82, 381, 519, 3256, 705, 3118, 1431, 16351, 2833, 47, 5430, 6, 198, 60, ...
2.6
45
budget = float(input()) nights = int(input()) price_night = float(input()) percent_extra = int(input()) if nights > 7: price_night = price_night - (price_night * 0.05) sum = nights * price_night total_sum = sum + (budget * percent_extra / 100) if total_sum <= budget: print(f"Ivanovi will be left ...
[ 37315, 796, 12178, 7, 15414, 28955, 201, 198, 77, 2337, 796, 493, 7, 15414, 28955, 201, 198, 20888, 62, 3847, 796, 12178, 7, 15414, 28955, 201, 198, 25067, 62, 26086, 796, 493, 7, 15414, 28955, 201, 198, 201, 198, 361, 12513, 1875, ...
2.610778
167
import sublime, sublime_plugin import threading def ProgressFunction(function, messages, callback): t = ThreadThread(function) t.start() Progress(t, messages[0], messages[1], callback)
[ 11748, 41674, 11, 41674, 62, 33803, 198, 198, 11748, 4704, 278, 628, 198, 198, 4299, 18387, 22203, 7, 8818, 11, 6218, 11, 23838, 2599, 198, 197, 83, 796, 14122, 16818, 7, 8818, 8, 198, 197, 83, 13, 9688, 3419, 198, 197, 32577, 7, ...
3.472727
55
import html import json import logging import re from abc import abstractmethod from datetime import datetime, time from typing import Optional import requests from moscow_routes_parser.model import Route, Timetable, Equipment, Timetable_builder from moscow_routes_parser.model_impl import Timetable_builder_t_mos_ru ...
[ 11748, 27711, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 302, 198, 6738, 450, 66, 1330, 12531, 24396, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 640, 198, 6738, 19720, 1330, 32233, 198, 198, 11748, 7007, 198, 198, 6738, 10867, ...
1.879941
2,707
from web.api import BaseAPI from utils import mongo import json
[ 6738, 3992, 13, 15042, 1330, 7308, 17614, 198, 6738, 3384, 4487, 1330, 285, 25162, 198, 11748, 33918, 628 ]
3.611111
18
# 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 # d...
[ 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 220, 220, ...
2.494755
4,004
import idna
[ 11748, 4686, 2616, 628, 628, 628, 628, 628 ]
2.625
8
import mido from socketer import MASM inPort = None doReadInput = False
[ 11748, 3095, 78, 198, 6738, 32263, 2357, 1330, 32337, 44, 198, 198, 259, 13924, 796, 6045, 198, 4598, 5569, 20560, 796, 10352 ]
3.272727
22
# AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args
[ 2, 47044, 46, 24700, 1137, 11617, 45811, 532, 8410, 5626, 48483, 198, 198, 6738, 14470, 13, 31267, 13, 8692, 62, 42895, 1330, 35100, 11, 4808, 20676, 3628, 1096, 62, 22046, 628 ]
3.580645
31
from typing import List from typing import Optional from typing import Union from models.vps import VpsStatus from schemas.base import APIModel from schemas.base import BasePagination from schemas.base import BaseSchema from schemas.base import BaseSuccessfulResponseModel
[ 6738, 19720, 1330, 7343, 198, 6738, 19720, 1330, 32233, 198, 6738, 19720, 1330, 4479, 198, 198, 6738, 4981, 13, 85, 862, 1330, 569, 862, 19580, 198, 6738, 3897, 5356, 13, 8692, 1330, 3486, 3955, 375, 417, 198, 6738, 3897, 5356, 13, 86...
3.763158
76
import sigplot as sp import matplotlib import matplotlib.pyplot as plt import numpy as np matplotlib.rcParams['toolbar'] = 'None' plt.style.use('dark_background') fig = plt.figure() # seed = np.linspace(3, 7, 1000) # a = (np.sin(2 * np.pi * seed)) # b = (np.cos(2 * np.pi * seed)) # sp.correlate(fig, b...
[ 11748, 43237, 29487, 355, 599, 201, 198, 11748, 2603, 29487, 8019, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 201, 198, 6759, 29487, 8019, 13, 6015, ...
2.119874
317
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5964, 1321, 13, 19...
3.668639
338
import logging import re from pathlib import Path from typing import Match logger = logging.getLogger(__name__) IMAGE_RE = re.compile( r"/baseplate-py:(?P<version>[0-9.]+(\.[0-9]+)?)-py(?P<python>[23]\.[0-9]+)-(?P<distro>(bionic|buster))(?P<repo>-artifactory)?(?P<dev>-dev)?" )
[ 11748, 18931, 198, 11748, 302, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 13225, 628, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 3955, 11879, 62, 2200, 796, 302, 13, 5589,...
2.24031
129
from sqlalchemy import Column, ForeignKey, Integer, String, Text from model.base import Base
[ 6738, 44161, 282, 26599, 1330, 29201, 11, 8708, 9218, 11, 34142, 11, 10903, 11, 8255, 198, 198, 6738, 2746, 13, 8692, 1330, 7308, 628, 198 ]
3.84
25
from django.urls import reverse from consents.models import Consent, Term from workshops.models import KnowledgeDomain, Person, Qualification from workshops.tests.base import TestBase
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 198, 6738, 762, 658, 13, 27530, 1330, 46869, 11, 35118, 198, 6738, 25982, 13, 27530, 1330, 20414, 43961, 11, 7755, 11, 9537, 2649, 198, 6738, 25982, 13, 41989, 13, 8692, 1330, 6208, 1...
4.325581
43
import numpy as np import time import cv2 import colorsys import tensorflow as tf from tensorflow.keras import backend as K from tensorflow.keras.layers import Activation, ReLU, Multiply # Custom objects from backbones package https://github.com/david8862/keras-YOLOv3-model-set/tree/master/common/backbones def sw...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 11748, 269, 85, 17, 198, 11748, 7577, 893, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 1330, 30203, 355, 509, 198, 6738, 11192, 273, 11125,...
2.498756
804
from styx_msgs.msg import TrafficLight import tensorflow as tf import numpy as np import datetime
[ 6738, 8944, 87, 62, 907, 14542, 13, 19662, 1330, 23624, 15047, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4818, 8079, 198 ]
3.37931
29
#Based off of http://wiki.wxpython.org/GLCanvas #Lots of help from http://wiki.wxpython.org/Getting%20Started from OpenGL.GL import * import wx from wx import glcanvas from Primitives3D import * from PolyMesh import * from LaplacianMesh import * from Geodesics import * from PointCloud import * from Cameras3D import * ...
[ 2, 15001, 572, 286, 2638, 1378, 15466, 13, 49345, 29412, 13, 2398, 14, 38, 5639, 272, 11017, 198, 2, 43643, 286, 1037, 422, 2638, 1378, 15466, 13, 49345, 29412, 13, 2398, 14, 20570, 4, 1238, 10434, 276, 198, 6738, 30672, 13, 8763, 1...
2.66782
289
import matplotlib.pyplot as plt import numpy as np import pickle # import csv # from collections import namedtuple # from mpl_toolkits.mplot3d import Axes3D # import matplotlib.animation as animation # import matplotlib.colors as mc # # class ParametricDB: # def __init__(self, dimensions, responses): # se...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 2, 1330, 269, 21370, 198, 2, 422, 17268, 1330, 3706, 83, 29291, 198, 2, 422, 285, 489, 62, 25981, 74, 896, 13, ...
1.912649
8,483
#!/usr/bin/env python import json import sys from gigamonkeys.spreadsheets import spreadsheets spreadsheet_id = sys.argv[1] ranges = sys.argv[2:] data = spreadsheets().get(spreadsheet_id, include_grid_data=bool(ranges), ranges=ranges) json.dump(data, sys.stdout, indent=2)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 33918, 198, 11748, 25064, 198, 198, 6738, 12526, 16487, 13083, 13, 43639, 42011, 1330, 4104, 42011, 198, 198, 43639, 21760, 62, 312, 796, 25064, 13, 853, 85, 58, 16, 60, 19...
2.78
100
root_URL = "https://tr.wiktionary.org/wiki/Vikis%C3%B6zl%C3%BCk:S%C3%B6zc%C3%BCk_listesi_" filepath = "words.csv" #letters=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O", # "P","R","S","T","U","V","Y","Z"] ##,,,, harfleri not work correctly letters=["C"]
[ 198, 15763, 62, 21886, 796, 366, 5450, 1378, 2213, 13, 20763, 5378, 560, 13, 2398, 14, 15466, 14, 53, 1134, 271, 4, 34, 18, 4, 33, 21, 48274, 4, 34, 18, 4, 2749, 74, 25, 50, 4, 34, 18, 4, 33, 21, 89, 66, 4, 34, 18, 4, 27...
1.964539
141
from github3 import login from github3.models import GitHubError from celery import task from celery.decorators import periodic_task from celery.task.schedules import crontab from sow_generator.models import Repository, AuthToken
[ 6738, 33084, 18, 1330, 17594, 198, 6738, 33084, 18, 13, 27530, 1330, 21722, 12331, 198, 198, 6738, 18725, 1924, 1330, 4876, 198, 6738, 18725, 1924, 13, 12501, 273, 2024, 1330, 27458, 62, 35943, 198, 6738, 18725, 1924, 13, 35943, 13, 141...
3.65625
64
import numpy as np from sources import BaseSource from sources.base import BaseSourceWrapper from sources.preloaded import PreLoadedSource import json def preprocess(self, X): res = [] for x in X: x_norm = (x - self._mu) / self._sd # we do not want to normalize END-OF-S...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 4237, 1330, 7308, 7416, 198, 6738, 4237, 13, 8692, 1330, 7308, 7416, 36918, 2848, 198, 6738, 4237, 13, 3866, 14578, 1330, 3771, 8912, 276, 7416, 198, 11748, 33918, 628, 628, 628, 220, 220, 220, ...
2.676157
281
import random import cv2 import numpy as np import warnings from PIL import Image from gym.spaces import Box, Dict from multiworld.core.multitask_env import MultitaskEnv from multiworld.core.wrapper_env import ProxyEnv from multiworld.envs.env_util import concatenate_box_spaces from multiworld.envs.env_util import ge...
[ 11748, 4738, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 14601, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 11550, 13, 2777, 2114, 1330, 8315, 11, 360, 713, 198, 198, 6738, 5021, 6894, 13, 7295, 13, ...
3.137931
116
#!/usr/bin/env python import sys import json import logging from math import exp import requests as rq import re ### For NLP post-processing header={"Content-Type": "application/json"} message='{"sample":"Hello bigdata"}' api_url="http://192.168.1.197:11992/norm" ### if __name__ == "__main__": logging.basic...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 18931, 198, 6738, 10688, 1330, 1033, 198, 11748, 7007, 355, 374, 80, 198, 11748, 302, 198, 198, 21017, 1114, 399, 19930, 1281, 12, 36948...
2.125
424
from langdetect import detect gb = GB() gb.foreach(detect_language) gb.run('title:*')
[ 6738, 42392, 15255, 478, 1330, 4886, 220, 220, 220, 198, 198, 22296, 796, 13124, 3419, 198, 22296, 13, 754, 620, 7, 15255, 478, 62, 16129, 8, 198, 22296, 13, 5143, 10786, 7839, 25, 9, 11537 ]
2.542857
35
""" Defines the basic objects for CORE emulation: the PyCoreObj base class, along with PyCoreNode, PyCoreNet, and PyCoreNetIf. """ import os import shutil import socket import threading from socket import AF_INET from socket import AF_INET6 from core.data import NodeData, LinkData from core.enumerations import LinkTy...
[ 37811, 198, 7469, 1127, 262, 4096, 5563, 329, 327, 6965, 47065, 25, 262, 9485, 14055, 49201, 2779, 1398, 11, 1863, 351, 9485, 14055, 19667, 11, 198, 20519, 14055, 7934, 11, 290, 9485, 14055, 7934, 1532, 13, 198, 37811, 198, 198, 11748, ...
3.504854
103
# N = int(input()) S, P = ( zip(*( (s, int(p)) for s, p in (input().split() for _ in range(N)) )) if N else ((), ()) ) ans = '\n'.join( str(i) for _, _, i in sorted( zip( S, P, range(1, N + 1) ), key=lambda t: (t[0], -t[1]...
[ 2, 220, 198, 45, 796, 493, 7, 15414, 28955, 198, 50, 11, 350, 796, 357, 198, 220, 220, 220, 19974, 46491, 7, 198, 220, 220, 220, 220, 220, 220, 220, 357, 82, 11, 493, 7, 79, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 329, ...
1.589862
217
# External cracking script, part of https://github.com/mmmds/WirelessDiscoverCrackScan import datetime import subprocess import os ### CONFIGURATION HASHCAT_DIR = "C:\\hashcat-5.1.0" HASHCAT_EXE = "hashcat64.exe" LOG_FILE = "crack_log.txt" DICT_DIR = "./dicts" files = read_files() logs = par...
[ 2, 34579, 25407, 4226, 11, 636, 286, 3740, 1378, 12567, 13, 785, 14, 3020, 9132, 82, 14, 29451, 1203, 44596, 13916, 441, 33351, 198, 11748, 4818, 8079, 198, 11748, 850, 14681, 198, 11748, 28686, 198, 198, 21017, 25626, 4261, 6234, 198, ...
2.279817
218
"""Copyright (c) 2010-2012 David Rio Vierra Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WA...
[ 37811, 15269, 357, 66, 8, 3050, 12, 6999, 3271, 15338, 569, 16367, 198, 198, 5990, 3411, 284, 779, 11, 4866, 11, 13096, 11, 290, 14, 273, 14983, 428, 3788, 329, 597, 198, 29983, 351, 393, 1231, 6838, 318, 29376, 7520, 11, 2810, 326,...
3.134443
781
# The MIT License (MIT) # # Copyright (c) 2016, Imperial College, London # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in the # Software without restriction, including without limitation the rights t...
[ 2, 383, 17168, 13789, 357, 36393, 8, 197, 198, 2, 197, 198, 2, 15069, 357, 66, 8, 1584, 11, 11773, 5535, 11, 3576, 197, 198, 2, 197, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866...
3.306422
545
""" Keep track of which LBRY Files are downloading and store their LBRY File specific metadata """ import logging import os from twisted.enterprise import adbapi from twisted.internet import defer, task, reactor from twisted.python.failure import Failure from lbrynet.reflector.reupload import reflect_stream from lbr...
[ 37811, 198, 15597, 2610, 286, 543, 406, 11473, 56, 13283, 389, 22023, 290, 3650, 511, 406, 11473, 56, 9220, 2176, 20150, 198, 37811, 198, 198, 11748, 18931, 198, 11748, 28686, 198, 198, 6738, 19074, 13, 9255, 7919, 1330, 512, 65, 15042,...
3.054767
493
import os import sys import re import logging p4_logger = logging.getLogger("Perforce") # Import app specific utilities, maya opens scenes differently than nuke etc # Are we in maya or nuke? if re.match( "maya", os.path.basename( sys.executable ), re.I ): p4_logger.info("Configuring for Maya") from MayaU...
[ 11748, 28686, 201, 198, 11748, 25064, 201, 198, 11748, 302, 201, 198, 11748, 18931, 201, 198, 201, 198, 79, 19, 62, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7203, 5990, 3174, 4943, 201, 198, 201, 198, 2, 17267, 598, 2176, 20081,...
2.924883
213
#!/usr/bin/python3 # # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 198, 2, 15069, 2864, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, ...
3.115358
1,439
import json import re from django.conf import settings import requests from webui.exceptions import BadRequestException, UnauthorizedException, ServerErrorException, RedirectException, \ UnexpectedException, LocationHeaderNotFoundException, NotFoundException
[ 11748, 33918, 198, 11748, 302, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 11748, 7007, 198, 6738, 3992, 9019, 13, 1069, 11755, 1330, 7772, 18453, 16922, 11, 791, 19721, 16922, 11, 9652, 12331, 16922, 11, 2297, 1060, 16922, 11, ...
4.265625
64
# Copyright 2021, Yahoo # Licensed under the terms of the Apache 2.0 license. See the LICENSE file in the project root for terms import time from typing import Dict, List, Optional, Type from pydantic import validate_arguments from ...app_logger import AppLogger from ...testplan import SystemState from ...testplan....
[ 2, 220, 15069, 33448, 11, 16551, 198, 2, 220, 49962, 739, 262, 2846, 286, 262, 24843, 362, 13, 15, 5964, 13, 4091, 262, 38559, 24290, 2393, 287, 262, 1628, 6808, 329, 2846, 198, 11748, 640, 198, 6738, 19720, 1330, 360, 713, 11, 7343...
3.671053
304
#!/usr/bin/env python # -*- coding: utf-8 -*- from vimeodl import __version__ from vimeodl.vimeo import VimeoLinkExtractor, VimeoDownloader
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 410, 524, 375, 75, 1330, 11593, 9641, 834, 198, 6738, 410, 524, 375, 75, 13, 85, 47776, 1330, 569, 47776, ...
2.611111
54
#!/usr/bin/env python3 # Copyright 2004-present Facebook. All Rights Reserved. import asyncio import functools import inspect from contextlib import contextmanager from typing import ( Any, AsyncIterable, Awaitable, Callable, Generic, Iterator, List, Mapping, Optional, Sequence,...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 5472, 12, 25579, 3203, 13, 1439, 6923, 33876, 13, 198, 198, 11748, 30351, 952, 198, 11748, 1257, 310, 10141, 198, 11748, 10104, 198, 6738, 4732, 8019, 1330, 4732, 37153, ...
2.58597
1,454
import pygame import sys pygame.init() clock = pygame.time.Clock() screen = pygame.display.set_mode([500, 500]) gameOn = True x1 = 0 y1 = 100 x2 = 100 y2 = 0 while gameOn == True: screen.fill([255,255,255]) for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() ...
[ 11748, 12972, 6057, 198, 11748, 25064, 198, 198, 9078, 6057, 13, 15003, 3419, 198, 15750, 796, 12972, 6057, 13, 2435, 13, 44758, 3419, 198, 198, 9612, 796, 12972, 6057, 13, 13812, 13, 2617, 62, 14171, 26933, 4059, 11, 5323, 12962, 198, ...
1.85177
452
import numpy as np import torch import matplotlib.pyplot as plt from torch import optim, nn from pytorch.xor.multilayer_perceptron import MultilayerPerceptron from pytorch.xor.utils import LABELS, get_toy_data, visualize_results, plot_intermediate_representations input_size = 2 output_size = len(set(LABELS)) num_hidd...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 28034, 1330, 6436, 11, 299, 77, 198, 198, 6738, 12972, 13165, 354, 13, 87, 273, 13, 16680, 346, 2794, 62, 525, ...
2.213855
1,328
import json import mock from django.core.urlresolvers import reverse from pymongo.errors import ServerSelectionTimeoutError from analytics.models import CourseReport from core.common.mongo import c_onboarding_status, _conn from core.common import onboarding from ct.models import UnitLesson, StudentError from ctms.t...
[ 11748, 33918, 198, 11748, 15290, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 198, 198, 6738, 279, 4948, 25162, 13, 48277, 1330, 9652, 4653, 1564, 48031, 12331, 628, 198, 6738, 23696, 13, 27530, 1330, 205...
2.95122
328
# Django settings for signbank project. import os from signbank.settings.server_specific import * from datetime import datetime DEBUG = True PROJECT_DIR = os.path.dirname(BASE_DIR) MANAGERS = ADMINS TIME_ZONE = 'Europe/Amsterdam' LOCALE_PATHS = [BASE_DIR+'conf/locale'] # in the database, SITE_ID 1 is example.com ...
[ 2, 37770, 6460, 329, 1051, 17796, 1628, 13, 198, 11748, 28686, 198, 6738, 1051, 17796, 13, 33692, 13, 15388, 62, 11423, 1330, 1635, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 30531, 796, 6407, 198, 198, 31190, 23680, 62, 34720, ...
2.417208
3,696
""" A module for all rook functionalities and abstractions. This module has rook related classes, support for functionalities to work with rook cluster. This works with assumptions that an OCP cluster is already functional and proper configurations are made for interaction. """ import base64 import logging import ran...
[ 37811, 198, 32, 8265, 329, 477, 10929, 10345, 871, 290, 12531, 507, 13, 198, 198, 1212, 8265, 468, 10929, 3519, 6097, 11, 1104, 329, 10345, 871, 284, 670, 351, 198, 305, 482, 13946, 13, 770, 2499, 351, 14895, 326, 281, 440, 8697, 13...
2.21578
18,593
# pylint: disable=line-too-long r"""Default configs for COCO detection using DETR. """ # pylint: enable=line-too-long import copy import ml_collections _COCO_TRAIN_SIZE = 118287 NUM_EPOCHS = 300 def get_config(): """Returns the configuration for COCO detection using DETR.""" config = ml_collections.ConfigDict()...
[ 2, 279, 2645, 600, 25, 15560, 28, 1370, 12, 18820, 12, 6511, 198, 81, 37811, 19463, 4566, 82, 329, 327, 4503, 46, 13326, 1262, 38267, 49, 13, 198, 198, 37811, 198, 2, 279, 2645, 600, 25, 7139, 28, 1370, 12, 18820, 12, 6511, 198, ...
2.745262
1,319
import pytest from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager
[ 11748, 12972, 9288, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 3992, 26230, 62, 37153, 13, 46659, 1330, 13282, 32103, 13511, 628 ]
4.291667
24
from scale.dataset import read_mtx from argparse import ArgumentParser import pandas as pd import numpy as np import os if __name__ == '__main__': main()
[ 6738, 5046, 13, 19608, 292, 316, 1330, 1100, 62, 16762, 87, 198, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 28686, 628, 198, 198, 361, 11593, ...
2.928571
56
from neo4jclient.AbsClient import AbstractClient
[ 6738, 19102, 19, 73, 16366, 13, 24849, 11792, 1330, 27741, 11792, 628 ]
4.166667
12
import time from datetime import date,datetime from astral import LocationInfo from astral.sun import sun
[ 11748, 640, 198, 6738, 4818, 8079, 1330, 3128, 11, 19608, 8079, 198, 6738, 6468, 1373, 1330, 13397, 12360, 198, 6738, 6468, 1373, 13, 19155, 1330, 4252, 198 ]
3.925926
27
sk = Skidoo()
[ 8135, 796, 3661, 312, 2238, 3419, 198 ]
2
7
import importlib __all__ = ['mount_gdrive'] def mount_gdrive() -> str: """Mount Google Drive storage of the current Google account and return the root path. Functionality only available in Google Colab Enviroment; otherwise, it raises a RuntimeError. """ if (importlib.util.find_spec("google.colab")...
[ 11748, 1330, 8019, 628, 198, 834, 439, 834, 796, 37250, 14948, 62, 70, 19472, 20520, 628, 198, 4299, 3817, 62, 70, 19472, 3419, 4613, 965, 25, 198, 220, 220, 220, 37227, 35452, 3012, 9974, 6143, 286, 262, 1459, 3012, 1848, 290, 1441, ...
3.086486
185
import datetime from django.utils import timezone from django.test import TestCase from django.contrib.auth.models import ( User, ) from wasch.models import ( Appointment, WashUser, WashParameters, # not models: AppointmentError, StatusRights, ) from wasch import tvkutils, payment
[ 11748, 4818, 8079, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 357, 198, 220, 220, 220, 11787, 11, 198, ...
2.862385
109
from typing import List from collections import Counter # class Solution: # def isMajorityElement(self, nums: List[int], target: int) -> bool: # d = Counter(nums) # return d[target] > len(nums)//2 # class Solution: # def isMajorityElement(self, nums: List[int], target: int) -> bool: # ...
[ 6738, 19720, 1330, 7343, 198, 6738, 17268, 1330, 15034, 198, 198, 2, 1398, 28186, 25, 198, 2, 220, 220, 220, 220, 825, 318, 24206, 414, 20180, 7, 944, 11, 997, 82, 25, 7343, 58, 600, 4357, 2496, 25, 493, 8, 4613, 20512, 25, 198, ...
2.191388
209
""" Advent of Code 2021 - Day 17 https://adventofcode.com/2021/day/17 """ import re from math import ceil, sqrt from typing import List, Tuple DAY = 17 FULL_INPUT_FILE = f'../inputs/day{DAY:02d}/input.full.txt' TEST_INPUT_FILE = f'../inputs/day{DAY:02d}/input.test.txt' if __name__ == '__main__': part1_an...
[ 37811, 198, 2782, 1151, 286, 6127, 33448, 532, 3596, 1596, 198, 5450, 1378, 324, 1151, 1659, 8189, 13, 785, 14, 1238, 2481, 14, 820, 14, 1558, 198, 37811, 198, 11748, 302, 198, 198, 6738, 10688, 1330, 2906, 346, 11, 19862, 17034, 198,...
2.2657
207
from typing import List from typing import Optional from typing import Tuple from typing import Union Payload = Tuple[List['Literal'], 'Substitutions'] def fire_rules(program: 'Program') -> List['Rule']: if program.is_ground(): return program rules = [] table = {} root = Root() for r...
[ 6738, 19720, 1330, 7343, 198, 6738, 19720, 1330, 32233, 198, 6738, 19720, 1330, 309, 29291, 198, 6738, 19720, 1330, 4479, 198, 198, 19197, 2220, 796, 309, 29291, 58, 8053, 17816, 43, 270, 1691, 6, 4357, 705, 7004, 301, 270, 3508, 20520,...
2.051685
445
import HandRankings as Hand from deuces.deuces import Card, Evaluator
[ 11748, 7157, 27520, 654, 355, 7157, 198, 6738, 390, 26873, 13, 2934, 26873, 1330, 5172, 11, 26439, 84, 1352, 628 ]
3.55
20
from django.db import models from django.contrib.auth.models import User from django.utils import timezone
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 628 ]
3.6
30
import os from trame import change, update_state from trame.layouts import SinglePageWithDrawer from trame.html import vtk, vuetify, widgets from vtkmodules.vtkCommonDataModel import vtkDataObject from vtkmodules.vtkFiltersCore import vtkContourFilter from vtkmodules.vtkIOXML import vtkXMLUnstructuredGridReader from ...
[ 11748, 28686, 198, 198, 6738, 491, 480, 1330, 1487, 11, 4296, 62, 5219, 198, 6738, 491, 480, 13, 10724, 5269, 1330, 14206, 9876, 3152, 25302, 263, 198, 6738, 491, 480, 13, 6494, 1330, 410, 30488, 11, 410, 84, 316, 1958, 11, 40803, 1...
3.19833
3,353
# Copyright 1996-2021 Soft_illusion. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
[ 2, 15069, 8235, 12, 1238, 2481, 8297, 62, 35760, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13...
3.538462
208
import mysql.connector from mysql.connector import errorcode config = { 'user': 'user', 'password': 'password', 'host': 'mysql_container', 'database': 'sample_db', 'port': '3306', } if __name__ == "__main__": try: conn = mysql.connector.connect(**config) cursor = conn.cursor() ...
[ 11748, 48761, 13, 8443, 273, 198, 6738, 48761, 13, 8443, 273, 1330, 4049, 8189, 198, 198, 11250, 796, 1391, 198, 220, 220, 220, 705, 7220, 10354, 705, 7220, 3256, 198, 220, 220, 220, 705, 28712, 10354, 705, 28712, 3256, 198, 220, 220,...
2.24933
373
# criar um programa que pergunte as dimenses de uma parede, calcule sua rea e informe quantos litros de tinta # seriam necessrios para a pintura, aps perguntar o rendimento da tinta informado na lata print('=' * 40) print('{:^40}'.format('Assistente de pintura')) print('=' * 40) altura = float(input('Informe a altura...
[ 2, 269, 380, 283, 23781, 1430, 64, 8358, 583, 70, 6311, 355, 5391, 4541, 390, 334, 2611, 279, 1144, 68, 11, 2386, 23172, 424, 64, 302, 64, 304, 4175, 68, 5554, 418, 6578, 4951, 390, 34791, 64, 198, 2, 1055, 1789, 2418, 380, 418, ...
2.610951
347
from random import sample from time import sleep jogos = list() print('-' * 20) print(f'{"MEGA SENA":^20}') print('-' * 20) while True: n = int(input("\nQuatos jogos voc quer que eu sorteie? ")) if (n > 0): break print('\n[ERRO] Valor fora do intervalo') print() print('-=' * 3, en...
[ 6738, 4738, 1330, 6291, 198, 6738, 640, 1330, 3993, 198, 198, 73, 519, 418, 796, 1351, 3419, 198, 198, 4798, 10786, 19355, 1635, 1160, 8, 198, 4798, 7, 69, 6, 4895, 44, 33146, 44738, 32, 1298, 61, 1238, 92, 11537, 198, 4798, 10786, ...
2.020548
292
from importlib import import_module from unittest import TestCase as UnitTestCase from django.contrib.auth.models import Group from django.core.management import BaseCommand from django.conf import settings from django.test import TestCase from django.views.generic import TemplateView try: from unittest.mock impor...
[ 6738, 1330, 8019, 1330, 1330, 62, 21412, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 355, 11801, 14402, 20448, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 4912, 198, 6738, 42625, 14208, 13, 7295, 13, 27604,...
2.066427
557
''' Favorite Files Licensed under MIT Copyright (c) 2012 Isaac Muse <isaacmuse@gmail.com> ''' import sublime import sublime_plugin from os.path import join, exists, normpath from favorites import Favorites Favs = Favorites(join(sublime.packages_path(), 'User', 'favorite_files_list.json'))
[ 7061, 6, 198, 49434, 13283, 198, 26656, 15385, 739, 17168, 198, 15269, 357, 66, 8, 2321, 19068, 32887, 1279, 9160, 330, 76, 1904, 31, 14816, 13, 785, 29, 198, 7061, 6, 198, 198, 11748, 41674, 198, 11748, 41674, 62, 33803, 198, 6738, ...
3.215054
93
from polyphony import testbench test()
[ 6738, 7514, 23021, 1330, 1332, 26968, 198, 9288, 3419, 198 ]
3.9
10
#!/bin/env python3 from collections import Counter from django.conf import settings from django.contrib.auth.decorators import login_required, permission_required from django.db import models as dm from django.shortcuts import get_object_or_404, render from django.views.generic.list import BaseListView from django.vie...
[ 2, 48443, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 17268, 1330, 15034, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 11, 7170, 62, 3...
3.496124
129
from manimlib.constants import * from manimlib.mobject.types.vectorized_mobject import VMobject from manimlib.utils.config_ops import digest_config from manimlib.utils.space_ops import get_norm
[ 6738, 582, 320, 8019, 13, 9979, 1187, 1330, 1635, 198, 6738, 582, 320, 8019, 13, 76, 15252, 13, 19199, 13, 31364, 1143, 62, 76, 15252, 1330, 16990, 15252, 198, 6738, 582, 320, 8019, 13, 26791, 13, 11250, 62, 2840, 1330, 16274, 62, 1...
3.266667
60
#-*- coding: utf-8 -*- # # Copyright (c) 2012, ECSMate development team # All rights reserved. # # ECSMate is distributed under the terms of the (new) BSD License. # The full license can be found in 'LICENSE.txt'. """ECS SDK """ import time import hmac import base64 import hashlib import urllib import...
[ 2, 12, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 201, 198, 2, 15069, 357, 66, 8, 2321, 11, 412, 7902, 44, 378, 2478, 1074, 201, 198, 2, 1439, 2489, 10395, 13, 201, 198, 2, 201, 198, 2, 412, 7902, 44, 378...
2.033299
961
# Copyright 2012 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
[ 2, 15069, 2321, 4946, 25896, 5693, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, ...
3.225873
487
""" MIT License Copyright (c) 2019 NinjaSnail1080 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish...
[ 37811, 198, 36393, 13789, 198, 198, 15269, 357, 66, 8, 13130, 14152, 16501, 603, 24045, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 1659, 428, 3788, 290, 3917, 10314, 3696, 3...
2.650196
2,044