content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
from Interpreter import Interpreter, InfiniteLoopException
if __name__ == '__main__':
with open("test2.txt") as file:
lines = file.read().splitlines()
part2(lines)
| [
6738,
4225,
3866,
353,
1330,
4225,
3866,
353,
11,
22380,
39516,
16922,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
351,
1280,
7203,
9288,
17,
13,
14116,
4943,
355,
2393,
25,
198,
220,
... | 2.661972 | 71 |
from os import path
from shutil import rmtree
from tempfile import mkdtemp
from unittest import TestCase, main as unittest_main
from trax import layers as tl
from trax.optimizers import adafactor
from ml_params_trax.example_model import get_model
from ml_params_trax.ml_params_impl import TraxTrainer
if __name__ ==... | [
6738,
28686,
1330,
3108,
198,
6738,
4423,
346,
1330,
374,
16762,
631,
198,
6738,
20218,
7753,
1330,
33480,
67,
29510,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
11,
1388,
355,
555,
715,
395,
62,
12417,
198,
198,
6738,
1291,
87,
1330... | 3.017094 | 117 |
import pytest
from uranium.packages.versions import Versions
from packaging.specifiers import SpecifierSet
@pytest.fixture
def test_versions_coerce_lowercase(versions):
"""
coerce package names to lowercase
"""
versions["SQLAlchemy"] = "==1.0.11"
assert versions["sqlalchemy"] == "==1.0.11"
def... | [
11748,
12972,
9288,
198,
6738,
22010,
13,
43789,
13,
47178,
1330,
18535,
507,
198,
6738,
16846,
13,
16684,
13350,
1330,
18291,
7483,
7248,
628,
198,
31,
9078,
9288,
13,
69,
9602,
628,
198,
4299,
1332,
62,
47178,
62,
1073,
263,
344,
62... | 2.664399 | 441 |
from typing import Optional
import numpy as np
from gbart.modified_bartpy.model import Model
from gbart.modified_bartpy.mutation import TreeMutation
from gbart.modified_bartpy.samplers.treemutation.proposer import TreeMutationProposer
from gbart.modified_bartpy.samplers.treemutation.likihoodratio import TreeMutationL... | [
6738,
19720,
1330,
32233,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
308,
16575,
13,
41771,
62,
16575,
9078,
13,
19849,
1330,
9104,
198,
6738,
308,
16575,
13,
41771,
62,
16575,
9078,
13,
76,
7094,
1330,
12200,
44,
7094,
... | 3.1 | 290 |
a1,b1,c1=input().split()
a2,b2,c2=input().split()
a1=int(a1)
a2=int(a2)
b1=int(b1)
b2=int(b2)
c1=int(c1)
c2=int(c2)
if a1==0 and a2==0:
a1==1
a2==1
if b1==0 and b2==0:
b1=1
b2=1
if a1==0 and b2==0:
a1=1
b2=1
if a2==0 and b1==0:
a2=1
b1=1
if c1==0 and c2==0:
c1=1
c2=1
if ((a1%a2==... | [
64,
16,
11,
65,
16,
11,
66,
16,
28,
15414,
22446,
35312,
3419,
198,
64,
17,
11,
65,
17,
11,
66,
17,
28,
15414,
22446,
35312,
3419,
198,
64,
16,
28,
600,
7,
64,
16,
8,
198,
64,
17,
28,
600,
7,
64,
17,
8,
198,
65,
16,
28,
... | 1.47032 | 438 |
#! /usr/env/python
"""Component that models 2D diffusion using an explicit finite-volume method.
Created July 2013 GT Last updated March 2016 DEJH with LL v1.0 component
style
"""
import numpy as np
from landlab import Component, FieldError, LinkStatus, NodeStatus, RasterModelGrid
_ALPHA = 0.15 # time-step stabil... | [
2,
0,
1220,
14629,
14,
24330,
14,
29412,
198,
37811,
21950,
326,
4981,
362,
35,
44258,
1262,
281,
7952,
27454,
12,
29048,
2446,
13,
198,
198,
41972,
2901,
2211,
7963,
4586,
6153,
2805,
1584,
5550,
41,
39,
351,
27140,
410,
16,
13,
15... | 2.036772 | 12,727 |
# -*- coding: utf-8 -*-
import logging
import os
try:
logging.getLogger('allowedsites').addHandler(logging.NullHandler())
except AttributeError: # < Python 2.7
pass
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
INSTALLED_APPS = (
'djan... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
18931,
198,
11748,
28686,
198,
198,
28311,
25,
198,
220,
220,
220,
18931,
13,
1136,
11187,
1362,
10786,
12154,
5379,
2737,
27691,
2860,
25060,
7,
6404,
2667,
13,
... | 2.063275 | 806 |
# This file is present to facilitate semantic releases.
__version__ = "0.2.0" | [
2,
770,
2393,
318,
1944,
284,
15570,
37865,
10050,
13,
198,
834,
9641,
834,
796,
366,
15,
13,
17,
13,
15,
1
] | 3.5 | 22 |
import jwt
from datetime import datetime
import uuid
import json
import os
API_ID = os.getenv('AWS_APIGW_ID', 'unknown')
AWS_REGION = os.getenv('AWS_REGION', 'us-east-1')
SECRET = 'cvb973246g(*&^89gbn(^&$%VC*67i876bnf9nm(*)&^%B*)(bfmj99087wq6onIOIKG(*765'
TTL = 60
now = get_utc_timestamp()
payload = {
'iss':... | [
11748,
474,
46569,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
334,
27112,
198,
11748,
33918,
198,
11748,
28686,
628,
198,
17614,
62,
2389,
796,
28686,
13,
1136,
24330,
10786,
12298,
50,
62,
2969,
3528,
54,
62,
2389,
3256,
705,... | 2.355 | 400 |
from chia.util.ints import uint32, uint64
# 1 Hydrangea coin = 1,000,000,000,000 = 1 trillion mojo.
_mojo_per_hydrangea = 1000000000000
_prefarm = 21000000
_blocks_per_year = 1681920 # 32 * 6 * 24 * 365
_block_reward = 125 # 125 Hydrangea are awarded per block
_farmer_fraction = (10 / _block_reward)
_pool_fraction = ... | [
6738,
442,
544,
13,
22602,
13,
29503,
1330,
20398,
2624,
11,
20398,
2414,
198,
198,
2,
352,
15084,
9521,
64,
10752,
796,
352,
11,
830,
11,
830,
11,
830,
11,
830,
796,
352,
12989,
6941,
7639,
13,
198,
62,
5908,
7639,
62,
525,
62,
... | 2.761905 | 945 |
# coding: utf-8
"""
Apteco API
An API to allow access to Apteco Marketing Suite resources # noqa: E501
The version of the OpenAPI document: v2
Contact: support@apteco.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import apteco_api... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
317,
457,
47704,
7824,
628,
220,
220,
220,
1052,
7824,
284,
1249,
1895,
284,
317,
457,
47704,
22137,
26264,
4133,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
... | 2.582119 | 1,029 |
import unittest
import pytest
import json
from peewee import SqliteDatabase
from genre_api.models.genre import Genre
from genre_api.models.singer import Singer
from genre_api.models.song import Song
from genre_api.models.playlist import Playlist
from genre_api.models.song_to_playlist import SongToPlaylist
MODELS = [Ge... | [
11748,
555,
715,
395,
198,
11748,
12972,
9288,
198,
11748,
33918,
198,
6738,
613,
413,
1453,
1330,
311,
13976,
578,
38105,
198,
6738,
12121,
62,
15042,
13,
27530,
13,
35850,
1330,
5215,
260,
198,
6738,
12121,
62,
15042,
13,
27530,
13,
... | 3.214286 | 126 |
from __future__ import print_function
import time
import random
start = time.time()
from collections import Counter, defaultdict
from biaffine import DeepBiaffineAttentionDecoder
import dynet as dy
import numpy as np
# format of files: each line is "word1/tag2 word2/tag2 ..."
train_file = "../data/parsing/graph/ptb... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
640,
198,
11748,
4738,
198,
198,
9688,
796,
640,
13,
2435,
3419,
198,
198,
6738,
17268,
1330,
15034,
11,
4277,
11600,
198,
6738,
275,
544,
487,
500,
1330,
10766,
33,
544,
487,... | 2.283126 | 883 |
import angr
from __init__ import Plugin
from binary_dependency_graph.utils import *
from binary_dependency_graph.bdp_enum import *
from taint_analysis.utils import *
import itertools
INDEXING_OPS = ('add', 'sub')
CMP_FUNCTIONS = ('strcmp', 'strncmp', 'memcmp')
LIB_KEYWORD = 'lib' | [
11748,
281,
2164,
198,
6738,
11593,
15003,
834,
1330,
42636,
198,
6738,
13934,
62,
45841,
1387,
62,
34960,
13,
26791,
1330,
1635,
198,
6738,
13934,
62,
45841,
1387,
62,
34960,
13,
17457,
79,
62,
44709,
1330,
1635,
198,
6738,
256,
2913,
... | 2.896907 | 97 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import cv2
from ImageLibrary import imutils
from PIL import Image
from future.utils import iterkeys, itervalues
try:
from SlotBot import errors
except ImportError:
pass #for stand-alone usage
import numpy as np
from robot... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
11748,
269,
85,
17,
198,
6738,
7412,
23377,
1330,
545,
26791,... | 3.071429 | 126 |
from kafka import KafkaConsumer, TopicPartition, conn
from json import loads
from sqlalchemy import create_engine
if __name__ == "__main__":
drop_tbl_transaction()
create_tbl_transaction()
c = XactionConsumer()
c.handleMessages()
| [
6738,
479,
1878,
4914,
1330,
46906,
49106,
11,
47373,
7841,
653,
11,
48260,
198,
6738,
33918,
1330,
15989,
198,
6738,
44161,
282,
26599,
1330,
2251,
62,
18392,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,... | 2.918605 | 86 |
from flask import Flask, render_template, jsonify
from flask_sqlalchemy import SQLAlchemy
from src.config import DevelopmentConfig
from flask_migrate import Migrate
import logging
from logging.handlers import RotatingFileHandler
import os
from dotenv import load_dotenv
basedir = os.path.abspath(os.path.dirname(__file... | [
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
11,
33918,
1958,
198,
6738,
42903,
62,
25410,
282,
26599,
1330,
16363,
2348,
26599,
198,
6738,
12351,
13,
11250,
1330,
7712,
16934,
198,
6738,
42903,
62,
76,
42175,
1330,
337,
42175,
198,
1... | 3.288136 | 118 |
import re
import os
import pysam
import shutil
import pandas
from .SplitRunner import SplitRunner
import cgatcore.pipeline as P
import cgatcore.experiment as E
import cgatcore.iotools as IOTools
class run_split_vcf_by_chromosome(SplitRunner):
"""split a VCF by chromosome using tabix.
The file is assumed to ... | [
11748,
302,
198,
11748,
28686,
198,
11748,
279,
893,
321,
198,
11748,
4423,
346,
198,
11748,
19798,
292,
198,
198,
6738,
764,
41205,
49493,
1330,
27758,
49493,
198,
11748,
269,
41268,
7295,
13,
79,
541,
4470,
355,
350,
198,
11748,
269,
... | 2.847682 | 151 |
import sys, urllib.request
try:
rfc_number = int(sys.argv[1])
except (IndexError, ValueError):
print('Must supply an RFC number as first argument')
sys.exit(2)
template = 'http://www.ietf.org/rfc/rfc{}.txt'
url = template.format(rfc_number)
rfc_raw = urllib.request.urlopen(url).read()
rfc = rfc_raw.decod... | [
11748,
25064,
11,
2956,
297,
571,
13,
25927,
198,
198,
28311,
25,
198,
220,
220,
220,
374,
16072,
62,
17618,
796,
220,
493,
7,
17597,
13,
853,
85,
58,
16,
12962,
198,
16341,
357,
15732,
12331,
11,
11052,
12331,
2599,
198,
220,
220,
... | 2.437956 | 137 |
import hlir
import expr
import utils
import numbering
import draw
MAX_ITERATIONS = 20
# collapse each interval into a single node
# based on "Interval Algorithm" from reverse compilation techniques
# check a condition: there must exist
# attempts to create a loop, though it may fail.
# an interval f... | [
11748,
289,
75,
343,
198,
11748,
44052,
198,
11748,
3384,
4487,
198,
11748,
47622,
198,
11748,
3197,
198,
198,
22921,
62,
2043,
1137,
18421,
796,
1160,
628,
197,
198,
197,
2,
9807,
1123,
16654,
656,
257,
2060,
10139,
628,
197,
197,
62... | 4.155814 | 430 |
from datetime import datetime
from typing import Union
import config
import models
# Старый вариант премиума где дата окончания находится в таблице пользователей - удалить
# Новый вариант где дата окончания находится в таблице user_tarif или chat_tarif
# По окончанию этой даты надо сменить тариф на базовый
| [
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
19720,
1330,
4479,
198,
198,
11748,
4566,
198,
11748,
4981,
628,
198,
2,
12466,
94,
20375,
16142,
21169,
45035,
140,
117,
12466,
110,
16142,
21169,
18849,
16142,
22177,
20375,
12466,
123,
211... | 1.257028 | 249 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-12-02 19:35
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,
18,
319,
1584,
12,
1065,
12,
2999,
678,
25,
2327,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
1... | 2.736842 | 57 |
import arrow
from test import get_user_session, cassette
| [
11748,
15452,
198,
198,
6738,
1332,
1330,
651,
62,
7220,
62,
29891,
11,
42812,
628,
628
] | 3.8125 | 16 |
# Есть список песен группы Depeche Mode со временем звучания с точностью до долей минут
# Точность указывается в функции round(a, b)
# где a, это число которое надо округлить, а b количество знаков после запятой
# более подробно про функцию round смотрите в документации https://docs.python.org/3/search.html?q=round
v... | [
198,
2,
12466,
243,
21727,
20375,
45367,
220,
21727,
140,
123,
18849,
21727,
25443,
118,
12466,
123,
16843,
21727,
16843,
22177,
12466,
111,
21169,
35072,
140,
123,
140,
123,
45035,
1024,
431,
2395,
10363,
220,
21727,
15166,
12466,
110,
2... | 1.359165 | 671 |
# Uri Online Judge 1079
N = int(input())
for i in range(0,N):
Numbers = input()
num1 = float(Numbers.split()[0])
num2 = float(Numbers.split()[1])
num3 = float(Numbers.split()[2])
print(((2*num1+3*num2+5*num3)/10).__round__(1)) | [
2,
46688,
7467,
8974,
838,
3720,
198,
198,
45,
796,
493,
7,
15414,
28955,
628,
198,
1640,
1312,
287,
2837,
7,
15,
11,
45,
2599,
198,
220,
220,
220,
27797,
796,
5128,
3419,
628,
220,
220,
220,
997,
16,
796,
12178,
7,
49601,
13,
3... | 2.261261 | 111 |
import struct
| [
11748,
2878,
201,
198,
201,
198,
197
] | 2.571429 | 7 |
#!/usr/local/bin/python
print 2**3
print pow(2,3)
print abs(-10)
print round(1.536,2)
print 1/2
print 1.0//2.0
print 0xAF
print 010
import cmath
print cmath.sqrt(-1)
import math
print math.floor(32.8)
| [
2,
48443,
14629,
14,
12001,
14,
8800,
14,
29412,
198,
4798,
362,
1174,
18,
198,
4798,
7182,
7,
17,
11,
18,
8,
198,
4798,
2352,
32590,
940,
8,
198,
4798,
2835,
7,
16,
13,
44468,
11,
17,
8,
198,
4798,
352,
14,
17,
198,
4798,
352... | 2.258427 | 89 |
# Copyright 2019 Xilinx Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | [
2,
15069,
13130,
1395,
346,
28413,
3457,
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,
198,
2... | 3.016484 | 910 |
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 6 20:04:16 2018
@author: xingrongtech
"""
from sympy import Symbol
from quantities.quantity import Quantity
from . import ACategory, BCategory, measure
from .ins import Ins
from ..amath import sqrt
from ..num import Num
from ..numitem import NumItem
from ..lsym import ... | [
171,
119,
123,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
30030,
3158,
220,
718,
1160,
25,
3023,
25,
1433,
2864,
198,
198,
31,
9800,
25,
2124,
278,
81,
506,
13670,
198,
37811,
198,
198,
... | 1.438818 | 13,803 |
# Author: Fabio Rodrigues Pereira
# E-mail: fabior@uio.no
# Author: Per Morten Halvorsen
# E-mail: pmhalvor@uio.no
# Author: Eivind Grønlie Guren
# E-mail: eivindgg@ifi.uio.no
try:
from exam.utils.preprocessing import OurDataset, pad_b
from exam.utils.models import Transformer, TransformerMTL
except:
fr... | [
2,
6434,
25,
14236,
952,
16114,
947,
17229,
8704,
198,
2,
412,
12,
4529,
25,
7843,
1504,
31,
84,
952,
13,
3919,
198,
198,
2,
6434,
25,
2448,
10788,
268,
11023,
85,
669,
268,
198,
2,
412,
12,
4529,
25,
9114,
14201,
20867,
31,
84,... | 2.137199 | 1,414 |
import sys
from greenery.lego import lego, parse
from greenery.fsm import FSM
regexes = list(sys.argv[1:])
if len(regexes) == 0:
from ast import literal_eval
while True:
reg = input("regex|")
if not reg:
break
if reg[0] in '\'"' or reg[:2] in ('r"',"r'"):
reg = ... | [
11748,
25064,
198,
6738,
10536,
24156,
13,
1455,
78,
1330,
1232,
78,
11,
21136,
198,
6738,
10536,
24156,
13,
69,
5796,
1330,
376,
12310,
198,
198,
260,
25636,
274,
796,
1351,
7,
17597,
13,
853,
85,
58,
16,
25,
12962,
198,
198,
361,
... | 2.237288 | 413 |
# model
model = dict(
type='TwoStageDetectorDA', # use adaptive model
# pretrained='open-mmlab://detectron2/resnet50_caffe', # only for backbone, overwritten by `load_from=...`
backbone=dict(type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, ... | [
2,
2746,
198,
19849,
796,
8633,
7,
198,
220,
220,
220,
2099,
11639,
7571,
29391,
11242,
9250,
5631,
3256,
220,
1303,
779,
29605,
2746,
198,
220,
220,
220,
1303,
2181,
13363,
11639,
9654,
12,
3020,
23912,
1378,
15255,
478,
1313,
17,
14... | 1.717172 | 4,851 |
import json
import os.path as osp
import numpy as np
from torch.utils.data import Dataset
| [
11748,
33918,
198,
11748,
28686,
13,
6978,
355,
267,
2777,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
16092,
292,
316,
628
] | 3.172414 | 29 |
from django.utils import timezone
from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import *
from inventory.devices.models import Ipad, Adapter, Headphones, Case
class DeviceForm(forms.Form):
'''Form for creating a new device.
'''
DEVICE_TYPES = (
... | [
6738,
42625,
14208,
13,
26791,
1330,
640,
11340,
198,
6738,
42625,
14208,
1330,
5107,
198,
6738,
42807,
62,
23914,
13,
2978,
525,
1330,
5178,
47429,
198,
6738,
42807,
62,
23914,
13,
39786,
1330,
1635,
198,
6738,
13184,
13,
42034,
13,
27... | 1.910806 | 1,166 |
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | [
2,
15069,
357,
66,
8,
13130,
11,
15127,
23929,
44680,
6234,
13,
1439,
2489,
10395,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
284... | 3.129794 | 339 |
# -*- coding: UTF-8 -*-
"""
Classes to manage the VolumeNumbers, PageNumbers, and PageRanges, as would be found in books and journals.
Contains classes:
VolumeNumber - Class to encapsulate journal and book volume numbers, as their own data type.
PageNumber - Class to encapsulate pagenumbers for journal and bo... | [
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
9487,
274,
284,
6687,
262,
14701,
49601,
11,
7873,
49601,
11,
290,
7873,
49,
6231,
11,
355,
561,
307,
1043,
287,
3835,
290,
22790,
13,
198,
198,
4264,
12... | 2.514783 | 12,514 |
from quicksort import quicksort
def test_quicksort():
"""Test quicksort algorithm with odd-numbered list."""
list = [13, 28, 5]
assert quicksort(list, 0, len(list) - 1) == [5, 13, 28]
def test_quicksort_even():
"""Test quicksort algorithm with even-numbered list."""
list = [13, 28, 5, 40]
as... | [
6738,
627,
3378,
419,
1330,
627,
3378,
419,
628,
198,
4299,
1332,
62,
421,
3378,
419,
33529,
198,
220,
220,
220,
37227,
14402,
627,
3378,
419,
11862,
351,
5629,
12,
35565,
1351,
526,
15931,
198,
220,
220,
220,
1351,
796,
685,
1485,
... | 2.483568 | 213 |
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.2.1, generator: {generator})
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------------------... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
16529,
35937,
198,
2,
6127,
7560,
416,
5413,
357,
49,
8,
11160,
19452,
6127,
35986,
357,
2306,
26522,
25,
513,
13,
17,
13,
16,
11,
17301,
25,
1391,
8612,
1352,
30072,
198,
2,
19179,
743,
2728,
... | 2.549713 | 2,092 |
# -*- coding: utf-8 -*-
import re
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
302,
628,
198
] | 1.947368 | 19 |
import numpy as np
# local modules
from ray import Ray
from raytrace import raytrace
import utils
RGB_CHANNELS = 3
MAX_COLOR = 255
| [
11748,
299,
32152,
355,
45941,
198,
2,
1957,
13103,
198,
6738,
26842,
1330,
7760,
198,
6738,
26842,
40546,
1330,
26842,
40546,
198,
11748,
3384,
4487,
628,
198,
36982,
62,
3398,
22846,
37142,
796,
513,
198,
22921,
62,
46786,
796,
14280,
... | 3.268293 | 41 |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
2,
15069,
2177,
383,
309,
22854,
37535,
46665,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
... | 3.234775 | 3,514 |
#!/usr/bin/env python3
import matplotlib.pyplot as plt
from typing import List, Tuple, Set
if __name__ == '__main__':
print(part_1())
print(part_2())
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
19720,
1330,
7343,
11,
309,
29291,
11,
5345,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
... | 2.515625 | 64 |
# $Filename$
# $Authors$
# Last Changed: $Date$ $Committer$ $Revision-Id$
#
# Copyright (c) 2003-2011, German Aerospace Center (DLR)
# All rights reserved.
#
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are
#met:
#
... | [
2,
720,
35063,
3,
220,
201,
198,
2,
720,
30515,
669,
3,
201,
198,
2,
4586,
32068,
25,
720,
10430,
3,
720,
6935,
1967,
3,
720,
18009,
1166,
12,
7390,
3,
201,
198,
2,
201,
198,
2,
15069,
357,
66,
8,
5816,
12,
9804,
11,
2679,
4... | 2.714527 | 2,368 |
from ds1054z import DS1054Z
scope = DS1054Z('USB0::6833::1230::DS1ZA182511136::0::INSTR')
print("Connected to: ", scope.idn) | [
6738,
288,
82,
940,
4051,
89,
1330,
17400,
940,
4051,
57,
198,
198,
29982,
796,
17400,
940,
4051,
57,
10786,
27155,
15,
3712,
3104,
2091,
3712,
1065,
1270,
3712,
5258,
16,
34892,
1507,
1495,
1157,
20809,
3712,
15,
3712,
1268,
18601,
1... | 2.272727 | 55 |
from math import tanh
from pysqlite2 import dbapi2 as sqlite
| [
6738,
10688,
1330,
25706,
71,
198,
6738,
279,
893,
13976,
578,
17,
1330,
20613,
15042,
17,
355,
44161,
578,
198
] | 3.05 | 20 |
import pioneer.common.constants as Constants
from pioneer.common.logging_manager import LoggingManager
from pioneer.das.api.sources.filesource import FileSource, try_all_patterns
from pioneer.das.api.loaders import pickle_loader
from ruamel.std import zipfile
import multiprocessing
import numpy as np
import pandas as... | [
11748,
29570,
13,
11321,
13,
9979,
1187,
355,
4757,
1187,
198,
6738,
29570,
13,
11321,
13,
6404,
2667,
62,
37153,
1330,
5972,
2667,
13511,
198,
6738,
29570,
13,
67,
292,
13,
15042,
13,
82,
2203,
13,
16624,
1668,
1330,
9220,
7416,
11,
... | 3.424658 | 146 |
import discord
from discord.ext import commands
from bot.lib.game import Game, Pieces
| [
11748,
36446,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
198,
6738,
10214,
13,
8019,
13,
6057,
1330,
3776,
11,
44676,
628
] | 4 | 22 |
# -*- coding: utf-8 -*-
"""Top-level package for PyGitDB."""
__author__ = """Jorge Arevalo"""
__email__ = 'jorge.arevalo@reclamador.es'
__version__ = '0.1.0'
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
9126,
12,
5715,
5301,
329,
9485,
38,
270,
11012,
526,
15931,
198,
198,
834,
9800,
834,
796,
37227,
41,
3643,
4231,
2100,
78,
37811,
198,
834,
12888,
834,
7... | 2.191781 | 73 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
c_src_files = [
"tracker/src/tracker.cc",
"tracker/src/tracker_helper.cc",
"tracker/src/math_... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
6738,
1233,
26791,
13,
7295,
1330,
9058,
198,
6738,
1233,
26791,
13,
2302,
3004,
133... | 2.692737 | 358 |
"""Library for synthesizing Entropic Reactive Control Improvisers for
stochastic games."""
# flake8: noqa
from improvisers.game_graph import *
from improvisers.implicit import *
from improvisers.explicit import *
from improvisers.tabular import *
from improvisers.policy import *
| [
37811,
23377,
329,
24983,
2890,
7232,
1773,
291,
797,
5275,
6779,
12205,
4703,
364,
329,
198,
301,
5374,
3477,
1830,
526,
15931,
198,
198,
2,
781,
539,
23,
25,
645,
20402,
198,
6738,
47833,
364,
13,
6057,
62,
34960,
1330,
1635,
198,
... | 3.649351 | 77 |
'''
Easy Control Beta
Speed Default 5
w
a s d
e : speed up 0.1
c : speed down 0.2
x : speed default 5
'''
import rospy
rospy.init_node('robot_easygo', anonymous=False)
import math
from geometry_msgs.msg import Twist
from sensor_msgs.msg import Imu
from std_msgs.msg import Float32
from tf.tran... | [
7061,
6,
201,
198,
28406,
6779,
17993,
201,
198,
22785,
15161,
642,
201,
198,
201,
198,
220,
220,
220,
266,
201,
198,
64,
220,
220,
264,
220,
220,
288,
201,
198,
201,
198,
68,
1058,
2866,
510,
657,
13,
16,
201,
198,
66,
1058,
28... | 2.541176 | 170 |
'''
Dr. Dragonbot by MadScotty
BEGIN LICENSE
By existing on the same mortal coil as the author of this software you hereby
allow the author, henceforth known as Dr. Awesomeweiner, to sleep on your couch,
watch your television, and use your microwave. By reading this license you agree
that Lord Satan isn't as bad a... | [
7061,
6,
198,
6187,
13,
2851,
13645,
416,
4627,
37559,
774,
198,
198,
33,
43312,
38559,
24290,
198,
198,
3886,
4683,
319,
262,
976,
22122,
25661,
355,
262,
1772,
286,
428,
3788,
345,
29376,
198,
12154,
262,
1772,
11,
12891,
25718,
190... | 3.665644 | 326 |
from collections import defaultdict
from datetime import datetime
from types import GeneratorType
from typing import (
AbstractSet,
Any,
Callable,
Dict,
List,
Mapping,
Tuple,
Union,
)
from uuid import UUID
from bson import ObjectId, DBRef
from pydantic import BaseModel
... | [
6738,
17268,
1330,
4277,
11600,
201,
198,
6738,
4818,
8079,
1330,
4818,
8079,
201,
198,
6738,
3858,
1330,
35986,
6030,
201,
198,
6738,
19720,
1330,
357,
201,
198,
220,
220,
220,
27741,
7248,
11,
201,
198,
220,
220,
220,
4377,
11,
201,... | 2.573171 | 164 |
# -*- coding: utf-8 -*-
from py_lets_be_quickly_rational import constants
if __name__ == "__main__":
try:
raise BelowIntrinsicException
except VolatilityValueException as e:
if not isinstance(e, BelowIntrinsicException):
raise Exception("Should be BelowIntrinsicException")
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
12972,
62,
5289,
62,
1350,
62,
24209,
306,
62,
20310,
1330,
38491,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
22... | 2.708333 | 192 |
print Solution().convertToTitle(701) | [
198,
4798,
28186,
22446,
1102,
1851,
2514,
19160,
7,
41583,
8
] | 3.363636 | 11 |
#!/usr/bin/env python3
"""jc - JSON CLI output utility
JC cli module
"""
import sys
import os
import shlex
import importlib
import textwrap
import signal
import json
import jc.utils
__version__ = info.version
parsers = [
'arp',
'blkid',
'crontab',
'crontab-u',
'csv',
'df',
'dig',
'du... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
48055,
532,
19449,
43749,
5072,
10361,
198,
34382,
537,
72,
8265,
198,
37811,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
427,
2588,
198,
11748,
1330,
8019,
198,
11748,
... | 2.042075 | 3,161 |
from pyauth.system import System
if __name__ == '__main__':
main()
| [
6738,
279,
3972,
1071,
13,
10057,
1330,
4482,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419,
198
] | 2.642857 | 28 |
#!/usr/bin/env python
######################################################
# Copyright (c) 2020 Maker Portal LLC
# Author: Joshua Hrisko
######################################################
#
# This code reads data from the MPU9250/MPU9265 board
# (MPU6050 - accel/gyro, AK8963 - mag) to verify its
# correct wiring ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
29113,
14468,
4242,
2235,
198,
2,
15069,
357,
66,
8,
12131,
21521,
25663,
11419,
198,
2,
6434,
25,
20700,
367,
19121,
78,
198,
29113,
14468,
4242,
2235,
198,
2,
198,
2,
770,
2438,
97... | 2.809069 | 419 |
import mock
from nose.tools import * # noqa
import pytest
import unittest
from tests.base import get_default_metaschema
from osf_tests.factories import ProjectFactory, DraftRegistrationFactory
from framework.auth import Auth
from addons.base.tests.models import (
OAuthAddonNodeSettingsTestSuiteMixin,
OAuthAd... | [
11748,
15290,
198,
6738,
9686,
13,
31391,
1330,
1635,
220,
1303,
645,
20402,
198,
11748,
12972,
9288,
198,
11748,
555,
715,
395,
198,
198,
6738,
5254,
13,
8692,
1330,
651,
62,
12286,
62,
4164,
292,
2395,
2611,
198,
6738,
267,
28202,
6... | 3.10582 | 189 |
from __future__ import annotations
from datetime import datetime
from typing import List, Optional, Type, TypeVar, Dict, Any
from uuid import UUID
import orjson
from pydantic import BaseModel
from vektonn.utils import camel_case_pydantic_alias_generator, orjson_dumps
TVektonnModel = TypeVar('TVektonnModel', bound='... | [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
19720,
1330,
7343,
11,
32233,
11,
5994,
11,
5994,
19852,
11,
360,
713,
11,
4377,
198,
6738,
334,
27112,
1330,
471,
27586,
198,
198,
11748,
... | 3.153153 | 111 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020 CESNET.
#
# CESNET OA Publication Repository is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
#
"""Publications API cli commands."""
import json
import os
import subprocess
import tempfile
i... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
357,
34,
8,
12131,
42700,
12884,
13,
198,
2,
198,
2,
42700,
12884,
440,
32,
45065,
1432,
13264,
318,
1479,
3788,
26,
345,
460,
17678,
4163,
340,
29... | 2.623273 | 1,882 |
"""Non-boto3 related utilities"""
| [
37811,
15419,
12,
65,
2069,
18,
3519,
20081,
37811,
198
] | 3.4 | 10 |
import argparse
import spacy
import re
import countryinfo
from concurrent.futures import ProcessPoolExecutor
nlp = spacy.load('en_core_web_sm')
QUOTE_RE = re.compile(r'".+?"')
OTHER_QUOTE_RE = re.compile(r"'.+?'")
demonym_map = {}
with open('demonyms.txt') as f:
for line in f:
country, d1, d2 = line.st... | [
11748,
1822,
29572,
198,
11748,
599,
1590,
198,
11748,
302,
198,
11748,
1499,
10951,
198,
6738,
24580,
13,
69,
315,
942,
1330,
10854,
27201,
23002,
38409,
198,
198,
21283,
79,
796,
599,
1590,
13,
2220,
10786,
268,
62,
7295,
62,
12384,
... | 2.11194 | 268 |
from flask import Flask, render_template, redirect, url_for, request, flash,json,jsonify
from flask_wtf import Form
from wtforms import StringField, BooleanField
from wtforms.validators import DataRequired
from wtforms import BooleanField, TextField, PasswordField, validators
from wtforms.validators import Requi... | [
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
11,
220,
18941,
11,
19016,
62,
1640,
11,
2581,
11,
7644,
11,
17752,
11,
17752,
1958,
201,
198,
6738,
42903,
62,
86,
27110,
1330,
5178,
201,
198,
6738,
266,
83,
23914,
1330,
10903,
15878,
... | 2.408046 | 522 |
import tempfile
TEMP_DIR = tempfile.TemporaryDirectory().name
INSTALLED_APPS = (
'model_field_meta',
'tests',
)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': TEMP_DIR,
}
}
SECRET_KEY = 'THIS IS A SECRET KEY'
| [
11748,
20218,
7753,
198,
198,
51,
39494,
62,
34720,
796,
20218,
7753,
13,
12966,
5551,
43055,
22446,
3672,
198,
198,
38604,
7036,
1961,
62,
2969,
3705,
796,
357,
198,
220,
220,
220,
705,
19849,
62,
3245,
62,
28961,
3256,
198,
220,
220... | 2.116279 | 129 |
n = int(input())
s = 2*n -1
s2 = 3
for i in range(n): # 공백 (i)
print(' '*i + '*'*s, end='')
s -= 2
print()
for i in range(n-2, -1, -1):
print(' '*i + '*'*s2, end='')
s2 += 2
print()
## 다른 풀이
n = int(input())
for i in range(n):
print(" " * i + "*" * ((n - i) * 2 - 1))
for i in range(n - 2, ... | [
77,
796,
493,
7,
15414,
28955,
198,
82,
796,
362,
9,
77,
532,
16,
198,
82,
17,
796,
513,
198,
1640,
1312,
287,
2837,
7,
77,
2599,
1303,
220,
166,
111,
113,
167,
108,
109,
357,
72,
8,
198,
220,
220,
220,
3601,
10786,
705,
9,
... | 1.718894 | 217 |
#!/usr/bin/env python
"""
Convert the output of Noise Cancelling Repeat Finder to a summary, a
tab-delimited table with one line of stats per alignment.
"""
from sys import argv,stdin,stdout,stderr,exit
from os import path as os_path
from ncrf_parse import alignments,parse_noise_rate
if __name__ == ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
3103,
1851,
262,
5072,
286,
30964,
43780,
2680,
30021,
42500,
284,
257,
10638,
11,
257,
198,
8658,
12,
12381,
320,
863,
3084,
351,
530,
1627,
286,
9756,
583,
19114,
13,
198... | 2.848739 | 119 |
import os
import glob
import matplotlib.pyplot as matplot
import japanize_matplotlib
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import A4, portrait
file_count = 0
total_count = 0
comment_count = 0
use_files = []
png_name = "circle.png"
pdf_name = "circle.pdf"
#下の階層用
for files in... | [
11748,
28686,
201,
198,
11748,
15095,
201,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
2603,
29487,
201,
198,
11748,
474,
2674,
1096,
62,
6759,
29487,
8019,
201,
198,
6738,
989,
23912,
13,
12315,
5235,
1330,
21978,
201,
198,
67... | 2.148992 | 1,141 |
# -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
49962,
284,
262,
24843,
10442,
5693,
357,
1921,
37,
8,
739,
530,
198,
2,
393,
517,
18920,
5964,
11704,
13,
220,
4091,
262,
28536,
2393,
198,
2,
9387,
351,... | 3.494118 | 340 |
# AP Ruymgaart
# Finite difference 2D wave equation
import copy, sys, numpy as np, matplotlib.pyplot as plt
from draw_boundaries import *
from tensorFiles import *
from pde_findiff_functions import *
fft2, fftshift, ifft2 = np.fft.fft2, np.fft.fftshift, np.fft.ifft2
if __name__ == '__main__':
IC, source, name = 'no... | [
2,
3486,
371,
4669,
76,
4908,
433,
198,
2,
4463,
578,
3580,
362,
35,
6769,
16022,
220,
198,
11748,
4866,
11,
25064,
11,
299,
32152,
355,
45941,
11,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
3197,
62,
7784,
3166,
... | 1.798817 | 2,873 |
# 10 Processing Images Multiprocessing
import time
import concurrent.futures
from PIL import Image, ImageFilter
img_names = [
'photo-1516117172878-fd2c41f4a759.jpg',
'photo-1532009324734-20a7a5813719.jpg',
'photo-1524429656589-6633a470097c.jpg',
'photo-1530224264768-7ff8c1789d79.jpg',
'photo-15641... | [
2,
838,
28403,
5382,
7854,
541,
305,
919,
278,
198,
198,
11748,
640,
198,
11748,
24580,
13,
69,
315,
942,
198,
6738,
350,
4146,
1330,
7412,
11,
7412,
22417,
198,
198,
9600,
62,
14933,
796,
685,
198,
220,
220,
220,
705,
23074,
12,
... | 2.113546 | 502 |
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | [
2,
28373,
2393,
329,
262,
45368,
28413,
10314,
27098,
13,
198,
2,
198,
2,
770,
2393,
691,
4909,
257,
6356,
286,
262,
749,
2219,
3689,
13,
1114,
257,
1336,
198,
2,
1351,
766,
262,
10314,
25,
198,
2,
3740,
1378,
2503,
13,
82,
746,
... | 2.890379 | 2,609 |
"""Simple code to tile images.
Licensed under the 3-clause BSD License:
Copyright (c) 2011-2014, Neeraj Kumar (neerajkumar.org)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of ... | [
37811,
26437,
2438,
284,
17763,
4263,
13,
198,
198,
26656,
15385,
739,
262,
513,
12,
565,
682,
347,
10305,
13789,
25,
198,
198,
15269,
357,
66,
8,
2813,
12,
4967,
11,
3169,
263,
1228,
26105,
357,
710,
263,
1228,
74,
44844,
13,
2398,... | 2.546482 | 1,592 |
# Generated by Django 3.0.7 on 2020-06-23 17:02
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
22,
319,
12131,
12,
3312,
12,
1954,
1596,
25,
2999,
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 |
import re
from cave import manipulate
| [
11748,
302,
198,
6738,
11527,
1330,
18510,
628
] | 4.875 | 8 |
import socket
import time
import struct
from control_algorithm.adaptive_tau import ControlAlgAdaptiveTauClient, ControlAlgAdaptiveTauServer
from data_reader.data_reader import get_data, get_data_train_samples
from models.get_model import get_model
from util.sampling import MinibatchSampling
from util.utils import send... | [
11748,
17802,
198,
11748,
640,
198,
11748,
2878,
198,
198,
6738,
1630,
62,
282,
42289,
13,
42552,
425,
62,
83,
559,
1330,
6779,
2348,
70,
48003,
425,
51,
559,
11792,
11,
6779,
2348,
70,
48003,
425,
51,
559,
10697,
198,
6738,
1366,
6... | 2.113463 | 4,063 |
import numpy as np
import cv2
import logging
import os
from os.path import exists
import imageio
import torch
import matplotlib.pyplot as plt
if __name__ == '__main__':
train_lst = 'data/VOCdevkit/VOC2012/ImageSets/Segmentation/train_cls.txt'
root_folder = 'data/VOCdevkit/VOC2012'
im_lst, label_lst... | [
11748,
299,
32152,
355,
45941,
198,
11748,
269,
85,
17,
198,
11748,
18931,
198,
11748,
28686,
220,
198,
6738,
28686,
13,
6978,
1330,
7160,
220,
198,
11748,
2939,
952,
198,
11748,
28034,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
35... | 1.939024 | 574 |
import sys
import math
from collections import defaultdict, deque
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
INF = float('inf')
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
N = ni()
ans = 0
for i in range(1, N + 1):
a = base_10_to_n(i, ... | [
11748,
25064,
198,
11748,
10688,
198,
6738,
17268,
1330,
4277,
11600,
11,
390,
4188,
198,
198,
17597,
13,
2617,
8344,
24197,
32374,
7,
940,
12429,
718,
8,
198,
19282,
259,
796,
25064,
13,
19282,
259,
198,
198,
1268,
37,
796,
12178,
10... | 2.364706 | 170 |
#!/usr/bin/env python
# coding=utf-8
'''
@描述:
@版本: V1_0
@作者: LiWanglin
@创建时间: Do not edit
@最后编辑人: LiWanglin
@最后编辑时间: Do not Edit
'''
from PyQt5.QtWidgets import QMainWindow, QMessageBox
from PyQt5.QtCore import QTimer, pyqtSlot, QEvent
from PyQt5.QtGui import QPixmap, QImage, QPainter
from PyQt5.QtChart import QCha... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
28,
40477,
12,
23,
198,
7061,
6,
198,
31,
162,
237,
237,
32573,
108,
25,
220,
198,
31,
48304,
17312,
105,
25,
569,
16,
62,
15,
198,
31,
43291,
38519,
25,
7455,
54,
648,... | 1.438283 | 3,192 |
#! /usr/env/python
"""
Python implementation of VoronoiDelaunayGrid, a class used to create and manage
unstructured, irregular grids for 2D numerical models.
Getting Information about a Grid
--------------------------------
The following attributes, properties, and methods provide data about the grid,
its geometry, an... | [
2,
0,
1220,
14629,
14,
24330,
14,
29412,
198,
37811,
198,
37906,
7822,
286,
44143,
261,
23013,
13856,
1942,
323,
41339,
11,
257,
1398,
973,
284,
2251,
290,
6687,
198,
403,
7249,
1522,
11,
21388,
50000,
329,
362,
35,
29052,
4981,
13,
... | 2.284326 | 23,568 |
#!/usr/bin/env python3
#
# Copyright 2019 Peifeng Yu <peifeng@umich.edu>
#
# This file is part of Salus
# (see https://github.com/SymbioticLab/Salus).
#
# 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 L... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
198,
2,
15069,
13130,
2631,
361,
1516,
10605,
1279,
431,
361,
1516,
31,
388,
488,
13,
15532,
29,
198,
2,
220,
198,
2,
770,
2393,
318,
636,
286,
4849,
385,
198,
2,
357,
382... | 2.665474 | 559 |
# _*_ coding:UTF-8 _*_
# b64 decode and encode
import base64
| [
2,
4808,
9,
62,
19617,
25,
48504,
12,
23,
4808,
9,
62,
198,
2,
275,
2414,
36899,
290,
37773,
198,
198,
11748,
2779,
2414,
628,
198
] | 2.461538 | 26 |
default_app_config = "govuk_template.apps.GovukTemplateConfig"
| [
12286,
62,
1324,
62,
11250,
796,
366,
9567,
2724,
62,
28243,
13,
18211,
13,
23774,
2724,
30800,
16934,
1,
198
] | 3.15 | 20 |
import os
import unittest
import shutil
import jingerly
| [
11748,
28686,
198,
11748,
555,
715,
395,
198,
11748,
4423,
346,
198,
198,
11748,
474,
3889,
306,
628
] | 3.222222 | 18 |
"""Python library for Simple Service Discovery Protocol (SSDP)."""
import ssdp.asyncio as asyncio
import ssdp.entity as entity
import ssdp.network as network
from ssdp.asyncio import *
from ssdp.entity import *
__all__ = entity.__all__ + asyncio.__all__
| [
37811,
37906,
5888,
329,
17427,
4809,
23455,
20497,
357,
5432,
6322,
21387,
15931,
198,
198,
11748,
264,
21282,
79,
13,
292,
13361,
952,
355,
30351,
952,
198,
11748,
264,
21282,
79,
13,
26858,
355,
9312,
198,
11748,
264,
21282,
79,
13,
... | 3.084337 | 83 |
"""
author: Dominik Stec,
index: s12623,
email: s12623@pja.edu.pl
source link:
https://www.codingame.com/ide/puzzle/defibrillators
"""
import sys
import math
# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.
lon = input()
lat = input()
... | [
37811,
201,
198,
9800,
25,
11817,
1134,
520,
721,
11,
201,
198,
9630,
25,
220,
264,
19420,
1954,
11,
201,
198,
12888,
25,
220,
264,
19420,
1954,
31,
79,
6592,
13,
15532,
13,
489,
201,
198,
201,
198,
10459,
2792,
25,
201,
198,
5450... | 2.080442 | 634 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'D:\pyqt_file\untitled_2.ui'
#
# Created: Sat Apr 15 09:51:16 2017
# by: PyQt5 UI code generator 5.4
#
# WARNING! All changes made in this file will be lost!
import sys
import serial
import threading
import binascii
from PyQt5 import Qt... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
5178,
7822,
7560,
422,
3555,
334,
72,
2393,
705,
35,
7479,
9078,
39568,
62,
7753,
59,
2797,
7803,
62,
17,
13,
9019,
6,
198,
2,
198,
2,
15622,
25,
7031,
275... | 2.549784 | 231 |
# -*- coding: utf-8 -*-
# Stdlib imports
import logging
import logging.config
import os
# Third-party imports
import yaml
LOG_CONF_FILENAME_DEFAULT = ""
LOG_CONF_FILENAME_ENV = os.environ.get(
"LAUNCHPAD_LOG", LOG_CONF_FILENAME_DEFAULT
)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
520,
67,
8019,
17944,
198,
11748,
18931,
198,
11748,
18931,
13,
11250,
198,
11748,
28686,
198,
198,
2,
10467,
12,
10608,
17944,
198,
11748,
331,
43695,
628,
198,... | 2.398058 | 103 |
import pytest
from ehub.users.models import User
from ehub.users.tests.factories import UserFactory
@pytest.fixture(autouse=True)
@pytest.fixture
| [
11748,
12972,
9288,
198,
198,
6738,
32622,
549,
13,
18417,
13,
27530,
1330,
11787,
198,
6738,
32622,
549,
13,
18417,
13,
41989,
13,
22584,
1749,
1330,
11787,
22810,
628,
198,
31,
9078,
9288,
13,
69,
9602,
7,
2306,
1076,
28,
17821,
8,
... | 2.960784 | 51 |
import pytest
import torch
from torch.utils.data import DataLoader
from lhotse.cut import CutSet
from lhotse.dataset.speech_recognition import K2SpeechRecognitionIterableDataset, concat_cuts
from lhotse.testing.dummies import DummyManifest, dummy_cut
@pytest.fixture
@pytest.fixture
@pytest.mark.parametrize('num_... | [
11748,
12972,
9288,
198,
11748,
28034,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
6060,
17401,
198,
198,
6738,
300,
8940,
325,
13,
8968,
1330,
9712,
7248,
198,
6738,
300,
8940,
325,
13,
19608,
292,
316,
13,
45862,
62,
26243,
653,
13... | 2.774648 | 142 |
"""
A setuptools based setup module.
"""
from setuptools import setup, find_packages
import daemon
setup(
name='daemon',
version=daemon.__version__,
description="Daemon class to transform any python script into a daemon",
long_description=open('README.md').read(),
license='MIT',
author='Sylvai... | [
37811,
198,
32,
900,
37623,
10141,
1912,
9058,
8265,
13,
198,
37811,
198,
198,
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
11748,
33386,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
6814,
7966,
3256,
198,
22... | 2.634271 | 391 |
# coding: utf-8
"""
Paasta API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
11243,
40197,
7824,
628,
220,
220,
220,
1400,
6764,
2810,
357,
27568,
416,
4946,
15042,
35986,
3740,
1378,
12567,
13,
785,
14,
9654,
499,
270,
10141,
14,
9654,
150... | 2.26987 | 2,227 |
"""
Purpose:
Simulate 2-bit Predictor and measure it's hit rate.
"""
from enum import Enum
from random import randint
from typing import List
if __name__ == "__main__":
predictor_with_branch_result = TwoBitPredictorByBranchResult()
predictor_with_prediction_result = TwoBitPredictorByPredictionResult()
b... | [
37811,
198,
30026,
3455,
25,
198,
8890,
5039,
362,
12,
2545,
49461,
273,
290,
3953,
340,
338,
2277,
2494,
13,
198,
37811,
198,
198,
6738,
33829,
1330,
2039,
388,
198,
6738,
4738,
1330,
43720,
600,
198,
6738,
19720,
1330,
7343,
628,
19... | 2.847095 | 327 |
import numpy as np
import tensorflow as tf
import sys
import time
import random
import os
sys.path.append("..")
from lm_model import lm_model
random.seed(time.time())
# Evaluation on development set
# Infer the sampling probability based on language model
# Create language model
# Pre-train the forward/backward... | [
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
4738,
198,
11748,
28686,
198,
198,
17597,
13,
6978,
13,
33295,
7203,
492,
4943,
198,
198,
6738,
300,
76,
62,
19849... | 3.688679 | 106 |
# coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from swagger_server.models.base_model_ import Model
from swagger_server import util
class SettleBill(Model):
"""NOTE: This class is auto generated by the swagger ... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
4818,
8079,
1330,
3128,
11,
4818,
8079,
220,
1303,
645,
20402,
25,
376,
21844,
198,
198,
6738,
19720,
1330,
7343,
11,
360,
713,
220... | 2.232323 | 990 |
# Register your models here.
from django.contrib import admin
from .models import Books
admin.site.register(Books) | [
198,
2,
17296,
534,
4981,
994,
13,
198,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
198,
6738,
764,
27530,
1330,
13661,
198,
28482,
13,
15654,
13,
30238,
7,
30650,
8
] | 3.545455 | 33 |
from .exceptions.exceptions import AuthFailed
from .services.user_service import UserService
from .services.target_service import (TargetService, TargetsTreeBuilder)
from .services.scanner_service import ScannerService
from .clients.hiabclient import HiabClient
assert AuthFailed
assert ScannerService
assert UserServi... | [
6738,
764,
1069,
11755,
13,
1069,
11755,
1330,
26828,
37,
6255,
198,
6738,
764,
30416,
13,
7220,
62,
15271,
1330,
11787,
16177,
198,
6738,
764,
30416,
13,
16793,
62,
15271,
1330,
357,
21745,
16177,
11,
31089,
1039,
27660,
32875,
8,
198,... | 3.989691 | 97 |
#!/usr/bin/env python3
'''
This service listens for new events submitted to Sealog and performs additional
actions depending on the recieved event.
This service listens for 'Off deck' and 'On deck' milestones and enables/
disables the ASNAP functionality and if a lowering is currently active it will
set the start/sto... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
7061,
6,
198,
1212,
2139,
35019,
329,
649,
2995,
8948,
284,
1001,
11794,
290,
17706,
3224,
220,
198,
4658,
6906,
319,
262,
664,
39591,
1785,
13,
198,
198,
1212,
2139,
35019,
329,
... | 2.722317 | 587 |
import copy
import json
import synapse.exc as s_exc
import synapse.lib.stormlib.stix as s_stix
import synapse.tests.utils as s_test
# flake8: noqa: E501
from pprint import pprint
| [
11748,
4866,
198,
11748,
33918,
198,
198,
11748,
6171,
7512,
13,
41194,
355,
264,
62,
41194,
198,
198,
11748,
6171,
7512,
13,
8019,
13,
12135,
8019,
13,
301,
844,
355,
264,
62,
301,
844,
198,
198,
11748,
6171,
7512,
13,
41989,
13,
2... | 2.705882 | 68 |
# flake8: noqa
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
| [
2,
781,
539,
23,
25,
645,
20402,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
4818,
8079,
198,
6738,
5366,
13,
9945,
1330,
20613,
198,
6738,
5366,
13,
85,
17,
1330,
10011,
2611,
44,
4254,
198,
6738,
... | 2.807692 | 52 |