content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import re # Value selectors; aliases, tags, etc. def tag(*tags): """Select a (list of) tag(s).""" vtag = [t for t in tags] return {"tag": vtag} def tag_and(*tag_ands): """Select a (list of) tag_and(s).""" vtag_and = [t for t in tag_ands] return {"tag_and": vtag_and} def tag_not(*tag_nots): ...
[ 11748, 302, 198, 198, 2, 11052, 2922, 669, 26, 47217, 11, 15940, 11, 3503, 13, 198, 198, 4299, 7621, 46491, 31499, 2599, 198, 220, 220, 220, 37227, 17563, 257, 357, 4868, 286, 8, 7621, 7, 82, 21387, 15931, 198, 220, 220, 220, 410, ...
2.414634
410
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2018-07-30 14:11 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, 940, 13, 20, 319, 2864, 12, 2998, 12, 1270, 1478, 25, 1157, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.736842
57
num_vezes = 0 soma_total = 0 maior_numero = None menor_numero = None while True: num = input("Digite um número ou \"sair\" para encerrar o programa: ") if num == "sair": break try: numero = int(num) num_vezes += 1 soma_total += numero if maior_numero is None or numero...
[ 22510, 62, 303, 12271, 796, 657, 198, 82, 6086, 62, 23350, 796, 657, 198, 2611, 1504, 62, 22510, 3529, 796, 6045, 198, 3653, 273, 62, 22510, 3529, 796, 6045, 198, 4514, 6407, 25, 198, 220, 220, 220, 997, 796, 5128, 7203, 19511, 578,...
2.219417
515
from selenium import webdriver import time
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 11748, 640, 628 ]
4
11
""" Filter classes """ from . import etree from .base import CPIXComparableBase def encode_bool(value): """Encode booleans to produce valid XML""" if value: return "true" return "false" class KeyPeriodFilter(CPIXComparableBase): """ KeyPeriodFilter element Has single required attribu...
[ 37811, 198, 22417, 6097, 198, 37811, 198, 6738, 764, 1330, 2123, 631, 198, 6738, 764, 8692, 1330, 16932, 10426, 5377, 37064, 14881, 628, 198, 4299, 37773, 62, 30388, 7, 8367, 2599, 198, 220, 220, 220, 37227, 4834, 8189, 1489, 2305, 504,...
2.079683
2,146
import base64 import httplib2 from email.mime.text import MIMEText from apiclient.discovery import build from oauth2client.client import flow_from_clientsecrets from oauth2client.file import Storage from oauth2client.tools import run_flow from google_auth_oauthlib.flow import InstalledAppFlow permiso = ['https://www....
[ 11748, 2779, 2414, 198, 11748, 1841, 489, 571, 17, 198, 198, 6738, 3053, 13, 76, 524, 13, 5239, 1330, 337, 3955, 2767, 2302, 198, 198, 6738, 2471, 291, 75, 1153, 13, 67, 40821, 1330, 1382, 198, 6738, 267, 18439, 17, 16366, 13, 16366...
2.970326
337
import os import shutil import traceback HOME_DIR = os.path.abspath(os.path.expanduser("~")) PATH_DEFAULT_OBS = os.path.join(HOME_DIR, "videos", "obs") DRY_RUN = False def _is_video_file(file_path: str) -> bool: """Returns True if the given file is a video file.""" _, ext = os.path.splitext(file_path.lower()...
[ 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 12854, 1891, 198, 198, 39069, 62, 34720, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 11201, 392, 7220, 7203, 93, 48774, 198, 34219, 62, 7206, 38865, 62, 46, 4462, ...
2.164822
813
import math x = float(input('Digite um ângulo: ')) tangente = math.tan(math.radians(x)) cos = math.acos(math.radians(x)) seno = math.asin(math.radians(x)) print(f'O cosseno de {x} é {cos:.2f}') print(f'O seno de {x} é {seno:.2f}') print(f'A tangente de {x} é {tangente:.2f}')
[ 11748, 10688, 198, 87, 796, 12178, 7, 15414, 10786, 19511, 578, 23781, 6184, 95, 782, 43348, 25, 705, 4008, 198, 83, 648, 21872, 796, 10688, 13, 38006, 7, 11018, 13, 6335, 1547, 7, 87, 4008, 198, 6966, 796, 10688, 13, 330, 418, 7, ...
2.075188
133
#!/usr/local/bin/python """This demonstrates a minimal http upload cgi. This allows a user to upload up to three files at once. It is trivial to change the number of files uploaded. This script has security risks. A user could attempt to fill a disk partition with endless uploads. If you have a system open to the pub...
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 198, 37811, 1212, 15687, 257, 10926, 2638, 9516, 269, 12397, 13, 198, 1212, 3578, 257, 2836, 284, 9516, 510, 284, 1115, 3696, 379, 1752, 13, 198, 1026, 318, 20861, 284, 1487, 262, 1271,...
2.730473
909
import argparse import datetime import os import re import sys import unicodedata import libs.header import libs.unicode import libs.utf8 if __name__ == '__main__': parser = argparse.ArgumentParser(description='Parse Unicode codepoint database and write integration tests.') parser.add_argument( '-v', ...
[ 11748, 1822, 29572, 201, 198, 11748, 4818, 8079, 201, 198, 11748, 28686, 201, 198, 11748, 302, 201, 198, 11748, 25064, 201, 198, 11748, 28000, 9043, 1045, 201, 198, 11748, 9195, 82, 13, 25677, 201, 198, 11748, 9195, 82, 13, 46903, 1098,...
2.567434
608
try: from PyQt4.QtCore import QSettings except ImportError: from PyQt5.QtCore import QSettings
[ 28311, 25, 198, 220, 220, 220, 422, 9485, 48, 83, 19, 13, 48, 83, 14055, 1330, 1195, 26232, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 1195, 26232, 628, 220, 220, 220, 220 ]
2.454545
44
from re import search from typing import List, Optional, Pattern
[ 6738, 302, 1330, 2989, 198, 6738, 19720, 1330, 7343, 11, 32233, 11, 23939, 628 ]
4.714286
14
""" __________________________________________________________________________________________________ :project: SiLA2_python :details: Response data type in a SiLA Command, Property, Intermediate, ... :file: data_type_response.py :authors: Timm Severin :date: (creation) 20190820 :date: (last modificati...
[ 37811, 198, 27193, 10221, 834, 198, 198, 25, 16302, 25, 15638, 13534, 17, 62, 29412, 198, 198, 25, 36604, 25, 18261, 1366, 2099, 287, 257, 15638, 13534, 9455, 11, 14161, 11, 42540, 11, 2644, 198, 198, 25, 7753, 25, 220, 220, 220, 13...
3.801546
388
# =============================================================== # Author: Rodolfo Ferro # Email: ferro@cimat.mx # Twitter: @FerroRodolfo # # ABOUT COPYING OR USING PARTIAL INFORMATION: # This script was originally created by Rodolfo Ferro, for # his workshop in PythonDay Mexico 2018 at CUCEA in Gdl, Mx. # Any explici...
[ 2, 46111, 4770, 25609, 855, 198, 2, 6434, 25, 6882, 4024, 78, 12880, 305, 198, 2, 9570, 25, 11354, 305, 31, 66, 320, 265, 13, 36802, 198, 2, 3009, 25, 2488, 43362, 305, 27917, 4024, 78, 198, 2, 198, 2, 33478, 27975, 45761, 6375, ...
2.719495
713
import pybullet_envs from stable_baselines3 import SAC_LABER model = SAC_LABER('MlpPolicy', 'HalfCheetahBulletEnv-v0', verbose=1, tensorboard_log="results/long_SAC_LABER_HalfCheetahBullet/") model.learn(total_timesteps=3000000)
[ 11748, 12972, 15065, 1616, 62, 268, 14259, 198, 6738, 8245, 62, 12093, 20655, 18, 1330, 311, 2246, 62, 48780, 1137, 198, 198, 19849, 796, 311, 2246, 62, 48780, 1137, 10786, 44, 34431, 36727, 3256, 705, 31305, 7376, 316, 993, 33481, 1616...
2.516484
91
# -*- coding: utf-8 -*- """ testapplehealthdata.py: tests for the applehealthdata.py Copyright (c) 2016 Nicholas J. Radcliffe Licence: MIT """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import re import...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 9288, 18040, 13948, 7890, 13, 9078, 25, 5254, 329, 262, 17180, 13948, 7890, 13, 9078, 198, 198, 15269, 357, 66, 8, 1584, 20320, 449, 13, 5325, 33783, 198, ...
2.610372
752
import unittest from datetime import date from controller.books import Book, BookRead if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 4818, 8079, 1330, 3128, 198, 198, 6738, 10444, 13, 12106, 1330, 4897, 11, 4897, 5569, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 555, 715, 395, 13, 12...
3.066667
45
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files
[ 6738, 220, 844, 27349, 62, 2118, 9078, 13, 8692, 1330, 7308, 198, 6738, 220, 844, 27349, 62, 2118, 9078, 13, 16624, 1330, 13283, 628 ]
3.375
24
import pytest @pytest.yield_fixture(scope="module") @pytest.yield_fixture(scope="module") @pytest.yield_fixture(scope="module")
[ 11748, 12972, 9288, 628, 198, 31, 9078, 9288, 13, 88, 1164, 62, 69, 9602, 7, 29982, 2625, 21412, 4943, 628, 198, 31, 9078, 9288, 13, 88, 1164, 62, 69, 9602, 7, 29982, 2625, 21412, 4943, 628, 198, 31, 9078, 9288, 13, 88, 1164, 62, ...
2.576923
52
import threading import os.path import time from blueThread import MainBlue # class myThread (threading.Thread): # def __init__(self, threadID, name, counter): # threading.Thread.__init__(self) # self.threadID = threadID # self.name = name # self.counter = counter # def run(self): #...
[ 11748, 4704, 278, 201, 198, 11748, 28686, 13, 6978, 201, 198, 11748, 640, 201, 198, 6738, 4171, 16818, 1330, 8774, 14573, 201, 198, 201, 198, 220, 220, 201, 198, 2, 1398, 616, 16818, 357, 16663, 278, 13, 16818, 2599, 201, 198, 2, 22...
2.299534
858
import time from datetime import datetime from datetime import timedelta from uuid import uuid4 as uuid from activitystreams import parse from dino import environ from dino.auth.redis import AuthRedis from dino.cache.redis import CacheRedis from dino.config import ApiActions, RedisKeys from dino.config import ConfigK...
[ 11748, 640, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 334, 27112, 1330, 334, 27112, 19, 355, 334, 27112, 198, 198, 6738, 3842, 5532, 82, 1330, 21136, 198, 198, 6738, 288, 2879, 1330, ...
3.674365
433
"""migrate workbench state enum Revision ID: cfd1c43b5d33 Revises: c8a7073deebb Create Date: 2020-11-17 16:42:32.511722+00:00 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'cfd1c43b5d33' down_revision = 'c8a7073deebb' branch_labels = None depends_on = None
[ 37811, 76, 42175, 670, 26968, 1181, 33829, 198, 198, 18009, 1166, 4522, 25, 269, 16344, 16, 66, 3559, 65, 20, 67, 2091, 198, 18009, 2696, 25, 269, 23, 64, 2154, 4790, 67, 1453, 11848, 198, 16447, 7536, 25, 12131, 12, 1157, 12, 1558,...
2.406015
133
import json fn = open('../static/alderman.js', 'w') #add alderman boundaries variable json_file = open('../maps/alderman.geojson') geo_json = json.load(json_file) fn.write('var alderman_boundaries = ') fn.write(json.dumps(geo_json)) fn.write(';\n\n') json_file.close()
[ 11748, 33918, 198, 198, 22184, 796, 1280, 10786, 40720, 12708, 14, 282, 1082, 805, 13, 8457, 3256, 705, 86, 11537, 198, 198, 2, 2860, 257, 335, 2224, 13215, 7885, 198, 17752, 62, 7753, 796, 1280, 10786, 40720, 31803, 14, 282, 1082, 80...
2.477064
109
# tables.py class MortalityTable: """mortalitytable is a matrix, by age and duration.""" class MortalityImprovementTable: """MortalityImprovementTable is a matrix, by age and year.""" class RangeTable: """range table"""
[ 2, 8893, 13, 9078, 201, 198, 201, 198, 201, 198, 201, 198, 4871, 10788, 1483, 10962, 25, 201, 198, 220, 220, 220, 37227, 76, 28337, 11487, 318, 257, 17593, 11, 416, 2479, 290, 9478, 526, 15931, 201, 198, 220, 220, 220, 220, 201, 1...
2.670103
97
"""Mathematical helper functions.""" def normalize(array): """Normalize the array. Set all the values betwwen 0 and 1. 0 corresponds to the min value and 1 the max. If the normalization cannot occur, will return the array. """ min_ = min(array) max_ = max(array) return ( (arra...
[ 37811, 19044, 10024, 605, 31904, 5499, 526, 15931, 628, 198, 4299, 3487, 1096, 7, 18747, 2599, 198, 220, 220, 220, 37227, 26447, 1096, 262, 7177, 13, 628, 220, 220, 220, 5345, 477, 262, 3815, 731, 1383, 268, 657, 290, 352, 13, 198, ...
2.553073
179
nome = input('Insira nome completo: ').strip() print('Possui "Silva"?', 'silva' in nome.lower()) input()
[ 77, 462, 796, 5128, 10786, 20376, 8704, 299, 462, 1224, 1462, 25, 705, 737, 36311, 3419, 198, 4798, 10786, 47, 793, 9019, 366, 15086, 6862, 13984, 3256, 705, 18217, 6862, 6, 287, 299, 462, 13, 21037, 28955, 198, 15414, 3419, 198 ]
2.560976
41
import torch import torch.nn as nn __all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101', 'resnet152'] def conv3x3(in_planes, out_planes, **kwargs): """3x3 convolution with padding""" kwargs['kernel_size'] = 3 kwargs['padding'] = 1 kwargs['bias'] = False return nn.Conv2d(in_planes, ...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 834, 439, 834, 796, 37250, 4965, 7934, 3256, 705, 411, 3262, 1507, 3256, 705, 411, 3262, 2682, 3256, 705, 411, 3262, 1120, 3256, 705, 411, 3262, 8784, 3256, 705, 411,...
2.398182
550
from modelon.impact.client import ( SimpleFMUExperimentDefinition, SimpleModelicaExperimentDefinition, Range, Choices, SimpleExperimentExtension, ) import pytest from modelon.impact.client import exceptions from tests.impact.client.fixtures import *
[ 6738, 2746, 261, 13, 48240, 13, 16366, 1330, 357, 198, 220, 220, 220, 17427, 23264, 52, 20468, 3681, 36621, 11, 198, 220, 220, 220, 17427, 17633, 3970, 20468, 3681, 36621, 11, 198, 220, 220, 220, 13667, 11, 198, 220, 220, 220, 10031, ...
3.223529
85
#coding:utf-8 import pymongo import records
[ 2, 66, 7656, 25, 40477, 12, 23, 198, 11748, 279, 4948, 25162, 198, 11748, 4406, 628 ]
2.8125
16
# ou-tm351 - `nb_pub_utils` #GOTCHA - Python on Mac logging in to Github: https://stackoverflow.com/a/42098127/454773 import click import os import shutil import zipfile import humanize import datetime import github from tabulate import tabulate from shlex import quote import subprocess def listify(item): '''...
[ 2, 267, 84, 12, 17209, 35273, 532, 4600, 46803, 62, 12984, 62, 26791, 63, 198, 198, 2, 38, 2394, 49285, 532, 11361, 319, 4100, 18931, 287, 284, 38994, 25, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 64, 14, 27211, 4089, 16799, 14, ...
2.404883
11,018
#!/usr/bin/env """ class definitions for standard 1 variable plots class definitions for standard 2 variable plots class definitions for standard 3 variable plots History: -------- 2019-05-21: error in calculation used corrected udata to correct vdata """ # System Stack import datetime # science stack import n...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 198, 198, 37811, 198, 4871, 17336, 329, 3210, 352, 7885, 21528, 198, 4871, 17336, 329, 3210, 362, 7885, 21528, 198, 4871, 17336, 329, 3210, 513, 7885, 21528, 628, 7443, 25, 198, 24200, 198, 13130, ...
2.362253
1,314
""" The tests for omit interaction feature """ import os import sys from collections import namedtuple from pyplif_hippos import ParseConfig, hippos, similarity def test_configuration_single_omit_interaction(tmpdir): """Test configuration for omitting specific interaction""" # Arrange config_file = t...
[ 37811, 198, 464, 5254, 329, 42848, 10375, 3895, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 6738, 12972, 489, 361, 62, 71, 3974, 418, 1330, 2547, 325, 16934, 11, 18568, ...
2.755917
5,408
#!/usr/bin/python3 import sys from lib.demucs import demucs from lib.demucs.demucs import model from lib.demucs.demucs.audio import AudioFile from lib.demucs.demucs.utils import apply_model, load_model from pathlib import Path from scipy.io import wavfile # within the demucs directory sys.modules['demucs.model'] = ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 25064, 198, 198, 6738, 9195, 13, 9536, 1229, 82, 1330, 1357, 1229, 82, 198, 6738, 9195, 13, 9536, 1229, 82, 13, 9536, 1229, 82, 1330, 2746, 198, 6738, 9195, 13, 9536, 1229, ...
2.162587
572
import pymysql conn = pymysql.Connection( host = '192.168.160.33', port = 3306, user = 'develop', password='xs_dev', database='test', charset='utf8' ) cursor = conn.cursor() sql = """ select * from user1 """ try: cursor.execute(sql) res = cursor.fetchall() for row in res: ...
[ 11748, 279, 4948, 893, 13976, 198, 198, 37043, 796, 279, 4948, 893, 13976, 13, 32048, 7, 198, 220, 220, 220, 2583, 796, 705, 17477, 13, 14656, 13, 14198, 13, 2091, 3256, 198, 220, 220, 220, 2493, 796, 513, 20548, 11, 198, 220, 220, ...
1.904153
313
from nfmanagementapi.models import ServiceObject from nfmanagementapi.schemata import ServiceObjectSchema from marshmallow.exceptions import ValidationError from .BaseResource import BaseResource from flask import request from app import db from uuid import uuid4 path = 'service_objects' endpoint = 'service_objects'
[ 6738, 299, 69, 27604, 15042, 13, 27530, 1330, 4809, 10267, 198, 6738, 299, 69, 27604, 15042, 13, 1416, 4411, 1045, 1330, 4809, 10267, 27054, 2611, 198, 6738, 22397, 42725, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 6738, 764, 14881, ...
3.938272
81
# Generated by Django 3.1.6 on 2021-02-12 00:15 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 21, 319, 33448, 12, 2999, 12, 1065, 3571, 25, 1314, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
config = { "frequency": 440.0, "duration": 20.0, "sampling_rate": 44100, "filename": "test_v1.wav", "overtones": [ [ 440.0, 1.0 ], [ 12447.350408741928, 0.1098108639573242 ], [ 12465.35...
[ 11250, 796, 1391, 201, 198, 220, 220, 220, 366, 35324, 1298, 33879, 13, 15, 11, 201, 198, 220, 220, 220, 366, 32257, 1298, 1160, 13, 15, 11, 201, 198, 220, 220, 220, 366, 37687, 11347, 62, 4873, 1298, 5846, 3064, 11, 201, 198, 220...
1.307617
1,024
import datetime import re import os import struct from dataclasses import dataclass, field from itertools import combinations, product from typing import List, Dict import pandas as pd import numpy as np import peakutils from matplotlib import pyplot as plt from scipy import signal as spsig import plotly.graph_objs as...
[ 11748, 4818, 8079, 198, 11748, 302, 198, 11748, 28686, 198, 11748, 2878, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 340, 861, 10141, 1330, 17790, 11, 1720, 198, 6738, 19720, 1330, 7343, 11, 360, 713, 198, ...
2.307527
12,555
import json from dataclasses import dataclass import omitempty from dnsimple.struct import Struct class DomainRenewRequest(dict): """DomainRenewRequest represents the attributes you can pass to a renew API request.""" @dataclass class DomainRenewal(Struct): """Represents the result of a domain renewal ca...
[ 11748, 33918, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 11748, 42848, 28920, 198, 198, 6738, 288, 5907, 320, 1154, 13, 7249, 1330, 32112, 628, 198, 4871, 20021, 26764, 413, 18453, 7, 11600, 2599, 198, 220, 220, 220,...
3.337838
222
class RequestAdapter(object): """ RequestAdapters bridge transmute's representation of a request, with the framework's implementation. implement the unimplemented methods. """ @property def body(self): """ return the request body. """ raise NotImplementedError() de...
[ 4871, 19390, 47307, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 19390, 2782, 12126, 7696, 21595, 1133, 338, 198, 220, 220, 220, 10552, 286, 257, 2581, 11, 351, 262, 9355, 338, 198, 220, 220, 220, 7822, 13, 628, 22...
2.938596
228
# python3 """ Task: Count the number of inversions of a given sequence """ tot_count = 0 n = int ( input () ) seq = [ int ( i ) for i in input ().split () ] mergesort ( seq ) print ( tot_count )
[ 2, 21015, 18, 198, 198, 37811, 15941, 25, 2764, 262, 1271, 286, 287, 47178, 286, 257, 1813, 8379, 37227, 628, 628, 198, 83, 313, 62, 9127, 796, 657, 198, 77, 796, 493, 357, 5128, 7499, 1267, 198, 41068, 796, 685, 493, 357, 1312, 1...
2.985075
67
import numpy as np import scipy.misc import os import time # from PIL import Image DATA_DIR = '/home/ubuntu/lsun/bedrooms/' NEW_DATA_DIR = '/home/ubuntu/lsun/bedrooms_128/' # with open(DATA_DIR+'files.txt', 'r') as f: # files = [l[:-1] for l in f] # # images = np.zeros((batch_size, 3, 256, 256), dtype='int32') # ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 44374, 198, 11748, 28686, 198, 11748, 640, 198, 2, 422, 350, 4146, 1330, 7412, 198, 198, 26947, 62, 34720, 796, 31051, 11195, 14, 32230, 14, 7278, 403, 14, 3077, 9649, 14, ...
1.919326
1,128
from django.db.utils import IntegrityError from django.db.models import Q from rest_framework import serializers from core.models import FavoriteThing from core.models import Category from .helper import reorder_rankings, reorder_rankings_subtract
[ 6738, 42625, 14208, 13, 9945, 13, 26791, 1330, 39348, 12331, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 4755, 13, 27530, 1330, 33992, 51, 722, 198, 6738, 4755, 13...
3.772727
66
# Tests for the Genomics Data Quality Pipeline import mock, datetime, pytz from rdr_service import clock from rdr_service.api_util import open_cloud_file from rdr_service.genomic_enums import GenomicJob, GenomicSubProcessStatus, GenomicSubProcessResult, \ GenomicManifestTypes, GenomicIncidentCode from tests.helper...
[ 2, 30307, 329, 262, 5215, 31994, 6060, 14156, 37709, 198, 11748, 15290, 11, 4818, 8079, 11, 12972, 22877, 198, 198, 6738, 374, 7109, 62, 15271, 1330, 8801, 198, 6738, 374, 7109, 62, 15271, 13, 15042, 62, 22602, 1330, 1280, 62, 17721, ...
3.503356
149
# Time limit exceeded while True: try: A = input() B = input() lA = len(A) lB = len(B) biggest = "" shortest = "" lshortest = 0 if max(lA, lB) == lA: biggest, shortest = A, B lbiggest = lA lshortest = lB else: biggest, shortest = B, A lbiggest = lB lshortest = lA bSub = 0 c...
[ 2, 3862, 4179, 20672, 198, 198, 4514, 6407, 25, 198, 197, 28311, 25, 198, 197, 197, 32, 796, 5128, 3419, 198, 197, 197, 33, 796, 5128, 3419, 628, 197, 197, 75, 32, 796, 18896, 7, 32, 8, 198, 197, 197, 75, 33, 796, 18896, 7, 33...
1.929919
371
import os, urllib, requests, json priority = 1
[ 11748, 28686, 11, 2956, 297, 571, 11, 7007, 11, 33918, 198, 49336, 796, 352, 198 ]
3.133333
15
list1 = [1, 4, 8, 2, 9] print len(list1) print max(list1), min(list1) print list1[-2] print list1[-5:3] print list1[-3:]
[ 198, 4868, 16, 796, 685, 16, 11, 604, 11, 807, 11, 362, 11, 860, 60, 198, 198, 4798, 18896, 7, 4868, 16, 8, 198, 4798, 3509, 7, 4868, 16, 828, 949, 7, 4868, 16, 8, 198, 4798, 1351, 16, 58, 12, 17, 60, 198, 4798, 1351, 16, ...
2
62
from matplotlib import pyplot as plt from script import sales_times1 from script import sales_times2 # normed=True This command divides the height of each column by # a constant such that the total shaded area of the histogram sums # to 1 plt.hist(sales_times1, bins=20, alpha=0.4, normed=True) plt.hist(sales_times2, b...
[ 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 6738, 4226, 1330, 4200, 62, 22355, 16, 198, 6738, 4226, 1330, 4200, 62, 22355, 17, 198, 2, 2593, 276, 28, 17821, 770, 3141, 36319, 262, 6001, 286, 1123, 5721, 416, 198, ...
2.376
875
# print(123456) # print('Kaic', 'Pierre', 'Outra Coisa') # print('Kaic', 'Pierre', sep='-', end='') # print('Testando', 'Outras', 'Coisas', sep='-', end='') print('428', '330', '048', sep='.', end='-') print('93')
[ 2, 3601, 7, 10163, 29228, 8, 198, 2, 3601, 10786, 42, 18452, 3256, 705, 36910, 3256, 705, 7975, 430, 1766, 9160, 11537, 198, 2, 3601, 10786, 42, 18452, 3256, 705, 36910, 3256, 41767, 11639, 12, 3256, 886, 28, 7061, 8, 198, 2, 3601, ...
2.404494
89
import sys sys.path.append("../") # KoBERT 모델 import config import pandas as pd import numpy as np from sklearn.preprocessing import OneHotEncoder import torch from torch import nn import torch.nn.functional as F import torch.optim as optim from torch.utils.data import Dataset, DataLoader import gluonnlp as nlp fro...
[ 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7203, 40720, 4943, 198, 198, 2, 17634, 13246, 51, 31619, 103, 101, 167, 235, 116, 198, 198, 11748, 4566, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198...
2.075623
1,243
import urllib.parse from .saucenao import get_saucenao_detail, SauceNAOError
[ 11748, 2956, 297, 571, 13, 29572, 198, 198, 6738, 764, 82, 14272, 268, 5488, 1330, 651, 62, 82, 14272, 268, 5488, 62, 49170, 11, 37618, 4535, 46, 12331, 628 ]
2.724138
29
A = True B = False print(A and B) print(A or B)
[ 32, 796, 6407, 198, 33, 796, 10352, 198, 4798, 7, 32, 290, 347, 8, 198, 4798, 7, 32, 393, 347, 8, 198 ]
2.181818
22
#!/usr/bin/env python # Author : Pierre Schnizer """ Collection of Callbacks systems for pygsl. They follow the GSL definitions as close as possible. Instead os a struct python classes are used. All solvers accept a C void pointer, which is passed to the callback. In Pygsl this is an abitrary python object. See the...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 6434, 1058, 21204, 45606, 7509, 220, 198, 37811, 198, 36307, 286, 4889, 10146, 3341, 329, 220, 12972, 70, 6649, 13, 1119, 1061, 262, 46326, 17336, 355, 198, 19836, 355, 1744, 13, 54...
2.066425
3,312
import argparse if __name__ == "__main__": main()
[ 11748, 1822, 29572, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419 ]
2.545455
22
from collections import Counter def partial_digest(distances): '''Returns a set whose positive pairwise differences generate 'distances'.''' # Initialize variables. X = {0} width = max(distances) # Create lambda functions for multiset operations. new_dist = lambda y, S: Counter(abs(y-s) for s...
[ 6738, 17268, 1330, 15034, 628, 198, 4299, 13027, 62, 12894, 395, 7, 17080, 1817, 2599, 198, 220, 220, 220, 705, 7061, 35561, 257, 900, 3025, 3967, 5166, 3083, 5400, 7716, 705, 17080, 1817, 6, 2637, 7061, 198, 220, 220, 220, 1303, 2076...
2.501109
451
if __name__ == '__main__': text = input("Give words: ") print(pig_latin(text))
[ 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 2420, 796, 5128, 7203, 23318, 2456, 25, 366, 8, 198, 220, 220, 220, 3601, 7, 79, 328, 62, 75, 10680, 7, 5239, 4008, 198 ]
2.225
40
# -*- coding: utf-8 -*- """ Created on Wed Aug 15 13:35:23 2018 @author: Victor Onink Here we create a figure that has the 24h, and the 3h flow field densities for the North Pacific """ import numpy as np from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt from scipy import io import pandas as pd...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 2447, 1315, 1511, 25, 2327, 25, 1954, 2864, 198, 198, 31, 9800, 25, 12622, 1550, 676, 198, 4342, 356, 2251, 257, 3785, 326, 468, 262, 198...
2.212005
783
from settings import * BASE_URL = os.getenv('OPENDUTY_BASE_URL', "http://localhost") XMPP_SETTINGS = { 'user': os.getenv('OPENDUTY_XMPP_USER'), 'password': os.getenv('OPENDUTY_XMPP_PASS'), 'server': os.getenv('OPENDUTY_XMPP_SERVER', 'xmpp'), 'port': os.getenv('OPENDUTY_XMPP_PORT', 5222), } EMAIL_SET...
[ 6738, 6460, 1330, 1635, 628, 198, 33, 11159, 62, 21886, 796, 28686, 13, 1136, 24330, 10786, 3185, 10619, 3843, 56, 62, 33, 11159, 62, 21886, 3256, 366, 4023, 1378, 36750, 4943, 198, 198, 55, 7378, 47, 62, 28480, 51, 20754, 796, 1391, ...
2.086782
749
# Conventional Machine Learning Algorithms # Test Script for Class of "NaiveBayes". # Author: Qixun Qu # Create on: 2018/04/24 # Modify on: 2018/04/25 # ,,, ,,, # ;" '; ;' ", # ; @.ss$$$$$$s.@ ; # `s$$$$$$$$$$$$$$$' # $$$$$$$$$$$$$$$$$$ # $$$$P""Y$$$Y""W$$$$$ # $$$$ p"$$$"q $$$$$ # $...
[ 2, 1482, 20405, 10850, 18252, 978, 7727, 907, 198, 2, 6208, 12327, 329, 5016, 286, 366, 26705, 425, 15262, 274, 1911, 198, 2, 6434, 25, 1195, 844, 403, 2264, 198, 2, 13610, 319, 25, 2864, 14, 3023, 14, 1731, 198, 2, 3401, 1958, 31...
2.20302
596
from Bridge import Proxy2Server import os from DataTypes import Packet, A_Packet_Class from DataTypes import VarInt, Output_Streamer, Bytes_Streamer, Socket_Streamer import time output = Output_Streamer() input = Bytes_Streamer() login_packets = A_Packet_Class() SOCK = Socket_Streamer('connect.2b2t.org', 25565, lo...
[ 6738, 10290, 1330, 38027, 17, 10697, 198, 11748, 28686, 198, 6738, 6060, 31431, 1330, 6400, 316, 11, 317, 62, 47, 8317, 62, 9487, 198, 6738, 6060, 31431, 1330, 12372, 5317, 11, 25235, 62, 28696, 11, 2750, 4879, 62, 28696, 11, 47068, 6...
2.585149
1,010
# -*- coding: utf-8 -*- """ Created on Wed Mar 17 13:35:39 2021 @author: ejgen ------ What is this file? ------ This script targets the files goodreads_reviews_cleaned.csv and review_sentences_analyzed.csv, calculating summary statistics such as review length and sentiment score. This script targets the following f...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 1526, 1596, 1511, 25, 2327, 25, 2670, 33448, 198, 198, 31, 9800, 25, 304, 73, 5235, 198, 198, 23031, 1867, 318, 428, 2393, 30, 40103, 198...
1.998347
2,420
import cv2, json, sys, datetime import tensorflow as tf import numpy as np from face_filter import c_face_filter from mtcnn_detect import c_MTCNNDetect from face_attr import c_face_attr_reader standard_face_size = 160 # 160(weight) * 160(height) detect_resolution = 80 # 80(weight) * 80(height) the_face_attrs_reader ...
[ 11748, 269, 85, 17, 11, 33918, 11, 25064, 11, 4818, 8079, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1986, 62, 24455, 1330, 269, 62, 2550, 62, 24455, 198, 6738, 285, 23047, 20471, 62...
2.814634
205
from pandac import PandaModules as PM from direct.directnotify import DirectNotifyGlobal from direct.showbase.PythonUtil import list2dict, uniqueElements import string import LevelConstants import types if __dev__: import os
[ 6738, 19798, 330, 1330, 41112, 5841, 5028, 355, 3122, 198, 6738, 1277, 13, 12942, 1662, 1958, 1330, 4128, 3673, 1958, 22289, 198, 6738, 1277, 13, 12860, 8692, 13, 37906, 18274, 346, 1330, 1351, 17, 11600, 11, 3748, 36, 3639, 198, 11748,...
3.634921
63
#!/usr/bin/env python # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Copyright (c) 2017 Jamf. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303...
2.492737
2,547
import hashlib message = input() print(hashlib.sha256(message.encode()).hexdigest())
[ 11748, 12234, 8019, 198, 198, 20500, 796, 5128, 3419, 198, 198, 4798, 7, 17831, 8019, 13, 26270, 11645, 7, 20500, 13, 268, 8189, 3419, 737, 33095, 12894, 395, 28955 ]
2.965517
29
# Generated by Django 3.1.6 on 2021-04-17 11:19 import django.contrib.postgres.fields from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 21, 319, 33448, 12, 3023, 12, 1558, 1367, 25, 1129, 198, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 7353, 34239, 13, 25747, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, ...
2.931818
44
# ------------------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # -------------------------------------------------------------------...
[ 2, 220, 16529, 22369, 438, 198, 2, 220, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 220, 49962, 739, 262, 17168, 13789, 357, 36393, 737, 4091, 38559, 24290, 287, 262, 29924, 6808, 329, 5964, 1321, 13, 198, 2, ...
2.676509
1,524
# 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 ...
[ 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, 198, 2, 5964, 1321...
3.099617
522
import django.shortcuts def main(request): """ request handler for '/'. """ return django.shortcuts.render(request, 'app_website/index.html', {}) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # global error handlers for app_website # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
[ 11748, 42625, 14208, 13, 19509, 23779, 628, 198, 4299, 1388, 7, 25927, 2599, 198, 220, 37227, 198, 220, 2581, 21360, 329, 31051, 4458, 198, 220, 37227, 198, 220, 1441, 42625, 14208, 13, 19509, 23779, 13, 13287, 7, 25927, 11, 705, 1324, ...
3.2225
400
from .SculptASequenceView import SculptASequenceView
[ 6738, 764, 50, 3129, 457, 1921, 4853, 594, 7680, 1330, 1446, 13327, 1921, 4853, 594, 7680, 198 ]
3.117647
17
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
[ 2, 770, 2438, 318, 636, 286, 28038, 856, 11, 475, 318, 281, 4795, 7515, 13, 198, 2, 770, 1948, 2393, 39442, 11, 290, 428, 2393, 39442, 691, 11, 318, 347, 10305, 11971, 13, 198, 2, 3401, 5028, 345, 3551, 1262, 428, 39442, 11, 543, ...
3.416819
547
import os import pytest from dvc.ignore import DvcIgnore from dvc.main import main @pytest.mark.parametrize( "file,ret,output", [("ignored", 0, True), ("not_ignored", 1, False)] ) @pytest.mark.parametrize( "file,ret,output", [ ("file", 0, "{}:1:f*\tfile\n".format(DvcIgnore.DVCIGNORE_FILE)), ...
[ 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 288, 28435, 13, 46430, 1330, 360, 28435, 32916, 382, 198, 6738, 288, 28435, 13, 12417, 1330, 1388, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7, 198, 220,...
1.910394
558
import os import threading import time from networktables import NetworkTables from PIL import Image from PIL.ImageColor import getcolor, getrgb from PIL.ImageOps import grayscale from StreamDeck.DeviceManager import DeviceManager from StreamDeck.ImageHelpers import PILHelper ASSETS_PATH = os.path.join(os.path.dirna...
[ 11748, 28686, 198, 11748, 4704, 278, 198, 11748, 640, 198, 198, 6738, 3127, 83, 2977, 1330, 7311, 51, 2977, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 350, 4146, 13, 5159, 10258, 1330, 651, 8043, 11, 651, 81, 22296, 198, 6738, 350, ...
2.577031
714
from dragonfly import (Grammar, CompoundRule, Text, MappingRule, Dictation, Function, Choice) from macro_utilities import (replace_in_text, comment_choice, execute_with_dictation) from vim.rules.letter import (camel_case, proper) comparison_choice_map = { "equal": "==", "not equal": "/=", "less or e...
[ 6738, 10441, 12254, 1330, 357, 38, 859, 3876, 11, 3082, 633, 31929, 11, 8255, 11, 337, 5912, 31929, 11, 360, 713, 341, 11, 15553, 11, 18502, 8, 198, 6738, 15021, 62, 315, 2410, 1330, 357, 33491, 62, 259, 62, 5239, 11, 2912, 62, 25...
2.578249
377
from deluge.plugins.init import PluginInitBase VERSION = (0, 1, 8)
[ 6738, 1619, 2217, 13, 37390, 13, 15003, 1330, 42636, 31768, 14881, 628, 198, 43717, 796, 357, 15, 11, 352, 11, 807, 8, 628, 628 ]
3
24
from django.shortcuts import reverse from django.views.generic import UpdateView from applications.users.forms.profile import ProfileForm from applications.users.layouts.profile import ProfileLayout from applications.users.mixins.authenticated import AuthenticatedMixin from applications.common.mixins.add_message impor...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 9575, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 10133, 7680, 198, 198, 6738, 5479, 13, 18417, 13, 23914, 13, 13317, 1330, 13118, 8479, 198, 6738, 5479, 13, 18417, 13, 10724, 5269, 1...
3.93913
115
# -*- coding: utf-8 -*- import csv import os import cv2 import numpy as np from flask import render_template, request, redirect, url_for from flask import jsonify from app.main import main from app.utils.frame.frame import base64_to_png from app.utils.frame.site import Site from app.utils.frame.sub import PictureSub ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 269, 21370, 198, 11748, 28686, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 42903, 1330, 8543, 62, 28243, 11, 2581, 11, 18941...
2.119617
418
# django imports from django.forms import ModelForm # lfs imports from lfs.discounts.models import Discount class DiscountForm(ModelForm): """ Form to manage discount data. """
[ 2, 42625, 14208, 17944, 198, 6738, 42625, 14208, 13, 23914, 1330, 9104, 8479, 198, 198, 2, 300, 9501, 17944, 198, 6738, 300, 9501, 13, 15410, 608, 82, 13, 27530, 1330, 43474, 628, 198, 4871, 43474, 8479, 7, 17633, 8479, 2599, 198, 220...
3.147541
61
# MIT License # # Copyright (c) 2020 SCL team at Red Hat # # 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,...
[ 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 12131, 311, 5097, 1074, 379, 2297, 10983, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, ...
2.603809
2,153
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ 2, 15069, 357, 66, 8, 33448, 350, 37382, 47, 37382, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845...
3.6
230
# -*-python-*- # # Copyright (C) 1999-2018 The ViewCVS Group. All Rights Reserved. # # By using this file, you agree to the terms and conditions set forth in # the LICENSE.html file which can be found at the top level of the ViewVC # distribution or at http://viewvc.org/license-1.html. # # For more information, visit h...
[ 2, 532, 9, 12, 29412, 12, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 7358, 12, 7908, 383, 3582, 34, 20304, 4912, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 2750, 1262, 428, 2393, 11, 345, 4236, 284, 262, 2846, 290, 3403, 900, ...
2.631415
643
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import io import pathlib import sys import tempfile from multiprocessing import Pool, cpu_count import PyPDF2 as PyPDF2 import click import pdfminer.pdftypes as pdftypes import pdfminer.settings from fpdf import FPDF from pdfminer.converter import TextConverter from pdf...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 11748, 33245, 198, 11748, 3108, 8019, 198, 11748, 25064, 198, 11748, 20218, 7753, 198, 6738, 18540, 305, 919, ...
2.671569
408
import torch def heatmap_focal_loss(preds, gt_heatmap, alpha, gamma, eps=1e-3): """ Params: preds: Tensor[num_classes, height, width] gt_heatmap: Tensor[num_classes, height, width] alpha: gamma: how much you want to reduce penalty around the ground truth locations eps: a...
[ 11748, 28034, 198, 198, 4299, 4894, 8899, 62, 69, 4374, 62, 22462, 7, 28764, 82, 11, 308, 83, 62, 25080, 8899, 11, 17130, 11, 34236, 11, 304, 862, 28, 16, 68, 12, 18, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2547, 41...
2.406439
497
import pygments.lexers.hdl as lexers from multiprocessing import Process import helpers.common as common tokenizer = lexers.VerilogLexer()
[ 11748, 12972, 11726, 13, 2588, 364, 13, 71, 25404, 355, 31191, 364, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 198, 11748, 49385, 13, 11321, 355, 2219, 198, 30001, 7509, 796, 31191, 364, 13, 13414, 346, 519, 45117, 263, 3419, 628 ]
3.414634
41
""" .. module:: dj-stripe.tests.test_event_handlers :synopsis: dj-stripe Event Handler Tests. .. moduleauthor:: Alex Kavanaugh (@kavdev) .. moduleauthor:: Lee Skillen (@lskillen) """ from copy import deepcopy import decimal from django.contrib.auth import get_user_model from django.test import TestCase from mock...
[ 37811, 198, 492, 8265, 3712, 42625, 12, 33565, 431, 13, 41989, 13, 9288, 62, 15596, 62, 4993, 8116, 198, 220, 220, 1058, 28869, 24608, 25, 42625, 12, 33565, 431, 8558, 32412, 30307, 13, 198, 198, 492, 8265, 9800, 3712, 4422, 21195, 42...
2.114105
631
import common import json import logging import os import subprocess import time from dateutil import parser head_vault_hosts = 'OLD_IFS=${IFS};IFS=\',\' read -r -a VAULT_HOSTS <<< \"$STRING_VAULT_HOST\";IFS=${OLD_IFS};' source_kms_utils = '. /usr/sbin/kms_utils.sh;' global vault_token global vault_accessor global M...
[ 11748, 2219, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 640, 198, 198, 6738, 3128, 22602, 1330, 30751, 198, 198, 2256, 62, 85, 1721, 62, 4774, 82, 796, 705, 15173, 62, 5064, 50, 28, 38...
2.5
194
"Introducing the sys Module" import sys print(sys.platform) print(sys.maxsize) print(sys.version) if sys.platform[:3] == 'win': print('hello windows')
[ 1, 15005, 2259, 262, 25064, 19937, 1, 198, 11748, 25064, 220, 198, 4798, 7, 17597, 13, 24254, 8, 198, 4798, 7, 17597, 13, 9806, 7857, 8, 198, 4798, 7, 17597, 13, 9641, 8, 628, 198, 361, 25064, 13, 24254, 58, 25, 18, 60, 6624, 70...
2.90566
53
from .orion import parse_orion
[ 6738, 764, 273, 295, 1330, 21136, 62, 273, 295, 198 ]
3.1
10
with open("./day09.input") as file: data = [int(line.strip()) for line in file.readlines()] p1 = get_first_not_matching(25) print(p1) p2 = get_contiguous_ns_that_add_to(p1) print(p2)
[ 4480, 1280, 7, 1911, 14, 820, 2931, 13, 15414, 4943, 355, 2393, 25, 198, 197, 7890, 796, 685, 600, 7, 1370, 13, 36311, 28955, 329, 1627, 287, 2393, 13, 961, 6615, 3419, 60, 628, 198, 198, 79, 16, 796, 651, 62, 11085, 62, 1662, 6...
2.253012
83
import json import os import nibabel as nib import numpy as np import pandas as pd ROOT = "./" DATA = os.path.join(ROOT, "data/")
[ 11748, 33918, 198, 11748, 28686, 198, 198, 11748, 33272, 9608, 355, 33272, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 13252, 2394, 796, 366, 19571, 1, 198, 26947, 796, 28686, 13, 6978, 13, 22179,...
2.64
50
import matplotlib import random import operator import csv import drunkframework import matplotlib.animation import matplotlib.pyplot """WARNING!!!!!""" """This code was tested using Spyder 5.0.4, should any problems be encountered using older models please try """ #creates a new empty list for wha...
[ 11748, 2603, 29487, 8019, 201, 198, 11748, 4738, 201, 198, 11748, 10088, 201, 198, 11748, 269, 21370, 201, 198, 11748, 10785, 30604, 201, 198, 11748, 2603, 29487, 8019, 13, 11227, 341, 220, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, ...
2.713701
1,467
"""Loading a .caffemodel and figure out the encoding. Author: Yuhuang Hu Email : duguyue100@gmail.com """ from __future__ import absolute_import from __future__ import print_function import os # from keras.utils.visualize_util import plot from keras.datasets import mnist as dataset from keras.utils import np_utils ...
[ 37811, 19031, 257, 764, 66, 2001, 368, 375, 417, 290, 3785, 503, 262, 21004, 13, 198, 198, 13838, 25, 575, 7456, 84, 648, 11256, 198, 15333, 1058, 18735, 4669, 518, 3064, 31, 14816, 13, 785, 198, 37811, 198, 198, 6738, 11593, 37443, ...
2.582048
713
from typing import Dict, List, Optional from kubernetes import client from tlaunch.lp_k8s.resource import Resource from tlaunch.lp_k8s.util import map_opt DEFAULT_PORT = 8001 DEFAULT_NAME = 'launchpad' REVERB_IMAGE = 'reg.real-ai.cn/launchpad/reverb' DEFAULT_COMMAND = ['python3', '-u', '-mlaunchpad_kubernetes.proces...
[ 6738, 19720, 1330, 360, 713, 11, 7343, 11, 32233, 198, 198, 6738, 479, 18478, 3262, 274, 1330, 5456, 198, 198, 6738, 256, 35681, 13, 34431, 62, 74, 23, 82, 13, 31092, 1330, 20857, 198, 6738, 256, 35681, 13, 34431, 62, 74, 23, 82, ...
2.685484
124
"""Retry downloading files that caused errors in http_downloader. We can find files to try downloading again by parsing the err.txt file for error messages. Error log lines we are interested in look like: 09-04-2017 12:45:17..Error_http_downloader 'exports/CalStateTEACH Term 1/grios/Schedule/Mentor Info.docx', 'https:...
[ 37811, 9781, 563, 22023, 3696, 326, 4073, 8563, 287, 2638, 62, 15002, 263, 13, 198, 1135, 460, 1064, 3696, 284, 1949, 22023, 757, 416, 32096, 262, 11454, 13, 14116, 2393, 329, 4049, 6218, 13, 198, 12331, 2604, 3951, 356, 389, 4609, 28...
2.370313
640
from nltk import RegexpTokenizer # Common stopwords in french and english # Clean text or sentence, removing stopwords # return list
[ 6738, 299, 2528, 74, 1330, 797, 25636, 79, 30642, 7509, 198, 198, 2, 8070, 2245, 10879, 287, 48718, 290, 46932, 198, 198, 2, 5985, 2420, 393, 6827, 11, 10829, 2245, 10879, 198, 2, 1441, 1351, 198 ]
3.75
36
import random from enum import Enum import numpy as np from custom_decorators import profile from shapes import Box from shared_constants import BBREG_MULTIPLIERS, DEFAULT_ANCHORS from util import calc_iou, cross_ious, get_reg_params, get_bbox_coords POS_OVERLAP = 0.7 NEG_OVERLAP = 0.3 SAMPLE_SIZE = 256 MAX_POS_SAM...
[ 11748, 4738, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 2183, 62, 12501, 273, 2024, 1330, 7034, 198, 6738, 15268, 1330, 8315, 198, 6738, 4888, 62, 9979, 1187, 1330, 12597, 31553, 62, 44, ...
2.777241
2,900
# coding: utf-8 """ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 4946, 17614, 4767, 8095, 628, 220, 220, 220, 770, 1020, 318, 8384, 329, 4856, 4767, 8095, 4382, 290, 4909, 8390, 886, 13033, 11, 4981, 13, 4222, 466, 407, 779, 4...
2.241857
10,684
""" Die Modelle für Projektweite Daten: Nutzer/Profile """ from django.db import models from django.contrib.auth.models import AbstractUser from django.conf import settings from django.utils.translation import ugettext as _ from userena.models import UserenaBaseProfile from django.core.validators import RegexValidato...
[ 37811, 198, 32423, 9104, 293, 277, 25151, 1041, 73, 988, 83, 732, 578, 16092, 268, 25, 11959, 9107, 14, 37046, 198, 198, 37811, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13,...
2.281982
1,110
import numpy as np import cv2 import sys import torch sys.path.append('..') from torch.utils import data from torch.utils.data import DataLoader if __name__ == '__main__': file_list = './data/test_data/list.txt' wlfwdataset = WLFWDatasets(file_list) dataloader = DataLoader(wlfwdataset, batch...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 25064, 198, 11748, 28034, 198, 198, 17597, 13, 6978, 13, 33295, 10786, 492, 11537, 198, 198, 6738, 28034, 13, 26791, 1330, 1366, 198, 6738, 28034, 13, 26791, 13, 7890, ...
2.541322
242
import os import numpy as np import pytest from nexusformat.nexus.tree import NXfield, NXgroup, NXroot, nxload @pytest.mark.parametrize("save", ["False", "True"])
[ 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 6738, 45770, 18982, 13, 44520, 13, 21048, 1330, 42482, 3245, 11, 42482, 8094, 11, 42482, 15763, 11, 299, 87, 2220, 628, 198, 198, 31, 9078, 9288, 13, ...
2.87931
58