content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import torch import torch.optim as optim from torch.optim.lr_scheduler import LambdaLR from allenact.algorithms.onpolicy_sync.losses import PPO from allenact.algorithms.onpolicy_sync.losses.imitation import Imitation from allenact.algorithms.onpolicy_sync.losses.ppo import PPOConfig from allenact.utils.experiment_util...
[ 11748, 28034, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 6738, 28034, 13, 40085, 13, 14050, 62, 1416, 704, 18173, 1330, 21114, 6814, 35972, 198, 198, 6738, 477, 268, 529, 13, 282, 7727, 907, 13, 261, 30586, 62, 27261, 13, 22462, 27...
2.914286
175
from numpy import array from pickle import load from pandas import read_csv import os from BioCAT.src.Combinatorics import multi_thread_shuffling, multi_thread_calculating_scores, make_combine, get_score, get_max_aminochain, skipper # Importing random forest model modelpath = os.path.dirname(os.path.abspath(__file__)...
[ 6738, 299, 32152, 1330, 7177, 198, 6738, 2298, 293, 1330, 3440, 198, 6738, 19798, 292, 1330, 1100, 62, 40664, 198, 11748, 28686, 198, 6738, 16024, 34, 1404, 13, 10677, 13, 20575, 20900, 873, 1330, 5021, 62, 16663, 62, 1477, 1648, 1359, ...
2.253336
5,471
# built-in from typing import Optional # app from .common import TOKENS, Extractor, Token, traverse from .value import UNKNOWN, get_value get_returns = Extractor() inner_extractor = Extractor()
[ 2, 3170, 12, 259, 198, 6738, 19720, 1330, 32233, 198, 198, 2, 598, 198, 6738, 764, 11321, 1330, 5390, 42, 16938, 11, 29677, 273, 11, 29130, 11, 38138, 198, 6738, 764, 8367, 1330, 4725, 44706, 11, 651, 62, 8367, 628, 198, 1136, 62, ...
3.333333
60
# retired ibmqx2_c_to_tars =\ { 0: [1, 2], 1: [2], 2: [], 3: [2, 4], 4: [2] } # 6 edges # retired ibmqx4_c_to_tars =\ { 0: [], 1: [0], 2: [0, 1, 4], 3: [2, 4], 4: [] } # 6 edges # retired ibmq16Rus_c_to_tars = \ { 0: [], 1: [0, 2], 2: [3], 3: [4, 14], 4: ...
[ 198, 2, 9880, 198, 571, 76, 80, 87, 17, 62, 66, 62, 1462, 62, 83, 945, 796, 59, 198, 90, 198, 220, 220, 220, 657, 25, 685, 16, 11, 362, 4357, 198, 220, 220, 220, 352, 25, 685, 17, 4357, 198, 220, 220, 220, 362, 25, 685, 43...
1.533473
956
import signal import requests import time from math import floor shutdown = False MAIN_TAKER = 0.0065 MAIN_MAKER = 0.002 ALT_TAKER = 0.005 ALT_MAKER = 0.0035 TAKER = (MAIN_TAKER + ALT_TAKER)*2 MAKER = MAIN_MAKER + ALT_MAKER TAKEMAIN = MAIN_TAKER - ALT_MAKER TAKEALT = ALT_TAKER - MAIN_MAKER BUFFER = 0.0...
[ 11748, 6737, 201, 198, 11748, 7007, 201, 198, 11748, 640, 201, 198, 6738, 10688, 1330, 4314, 201, 198, 201, 198, 49625, 2902, 796, 10352, 201, 198, 201, 198, 5673, 1268, 62, 5603, 42839, 796, 657, 13, 405, 2996, 201, 198, 5673, 1268, ...
2.065007
723
""" ========================================== Genrating feedthrough from single instance ========================================== This example demostrates how to generate a feedthrough wire connection for a given scalar or vector wires. **Initial Design** .. hdl-diagram:: ../../../examples/basic/_initial_design.v...
[ 37811, 198, 10052, 2559, 855, 198, 13746, 8821, 3745, 9579, 422, 2060, 4554, 198, 10052, 2559, 855, 198, 198, 1212, 1672, 1357, 455, 9700, 703, 284, 7716, 257, 3745, 9579, 6503, 4637, 329, 198, 64, 1813, 16578, 283, 393, 15879, 19474, ...
2.749071
538
from __future__ import annotations from typing import Optional, Union from tools import tools from exceptions import workflow_exceptions
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 6738, 19720, 1330, 32233, 11, 4479, 198, 198, 6738, 4899, 1330, 4899, 198, 6738, 13269, 1330, 30798, 62, 1069, 11755, 628 ]
4.964286
28
from django.apps import apps from django.test import override_settings from wagtail_live.signals import live_page_update
[ 6738, 42625, 14208, 13, 18211, 1330, 6725, 198, 6738, 42625, 14208, 13, 9288, 1330, 20957, 62, 33692, 198, 198, 6738, 266, 363, 13199, 62, 12583, 13, 12683, 874, 1330, 2107, 62, 7700, 62, 19119, 628, 198 ]
3.444444
36
# -*- coding: utf-8 -*- """ Script Name: Author: Do Trinh/Jimmy - 3D artist. Description: """ # ------------------------------------------------------------------------------------------------------------- """ Import """ import os from PySide2.QtWidgets import (QFrame, QStyle, QAbstractItemView, QSizePolicy...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 198, 7391, 6530, 25, 220, 198, 13838, 25, 2141, 33822, 71, 14, 40335, 532, 513, 35, 6802, 13, 198, 198, 11828, 25, 628, 198, 37811, 198, 2, 16529, 3880, ...
1.801993
8,227
from selenium import webdriver from selenium.webdriver.chrome.options import Options import sys import time import urllib.request import os sys.stdin = open('idpwd.txt') site = input() id = input() pwd = input() # selenium chromedriver = 'C:\Webdriver\chromedriver.exe' # selenum webdriver chromedirver . driver...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 46659, 13, 25811, 1330, 18634, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 2956, 297, 571, 13, 25927, 198, 11748, 28686, 198, 17597, 13, 1...
2.5
968
from io import StringIO # StringIO f = StringIO() f.write('Python-100') str = f.getvalue() # print(':%s' %str) f.write('\n') # f.write('100') f.close() # f1 = StringIO('Python-100' + '\n' + '100') # print(f1.read()) f1.close() # outputData() # dataStr dataStr = outputData() # 1. outputData() dat...
[ 198, 6738, 33245, 1330, 10903, 9399, 198, 198, 2, 220, 10903, 9399, 220, 198, 69, 796, 10903, 9399, 3419, 198, 198, 69, 13, 13564, 10786, 37906, 12, 3064, 11537, 198, 2536, 796, 277, 13, 1136, 8367, 3419, 1303, 220, 198, 4798, 7, 10...
2.134409
372
import biothings.hub.dataload.uploader as uploader
[ 11748, 3182, 849, 654, 13, 40140, 13, 67, 10254, 1170, 13, 25850, 263, 355, 9516, 263, 198 ]
3
17
"""Contains tests for finpack/core/cli.py """ __copyright__ = "Copyright (C) 2021 Matt Ferreira" import os import unittest from importlib import metadata from docopt import docopt from finpack.core import cli
[ 37811, 4264, 1299, 5254, 329, 957, 8002, 14, 7295, 14, 44506, 13, 9078, 198, 37811, 198, 834, 22163, 4766, 834, 796, 366, 15269, 357, 34, 8, 33448, 4705, 12880, 260, 8704, 1, 198, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 6...
3.227273
66
enemy = Yaratik() enemy.move_left() # ejderha also includes all functions from parent class (yaratik) ejderha = Ejderha() ejderha.move_left() ejderha.Ates_puskurtme() # Zombie is called the (child class), inherits from Yaratik (parent class) zombie = Zombie() zombie.move_right() zombie.Isirmak()
[ 628, 198, 198, 46970, 796, 575, 34174, 1134, 3419, 198, 46970, 13, 21084, 62, 9464, 3419, 198, 198, 2, 304, 73, 1082, 3099, 635, 3407, 477, 5499, 422, 2560, 1398, 357, 88, 34174, 1134, 8, 198, 68, 73, 1082, 3099, 796, 412, 73, 108...
2.657895
114
""" Author: Peratham Wiriyathammabhum """ import numpy as np import pandas as pd from sklearn.neighbors import NearestNeighbors def affinity_graph(X): ''' This function returns a numpy array. ''' ni, nd = X.shape A = np.zeros((ni, ni)) for i in range(ni): for j in range(i+1, ni): dist = ((X[i] - X[j])**...
[ 37811, 198, 13838, 25, 2448, 37520, 370, 343, 7745, 776, 6475, 397, 17047, 628, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 220, 198, 11748, 19798, 292, 355, 279, 67, 220, 198, 6738, 1341, 35720, 13, 710, 394, 32289, 1330, 3169, 1...
2.131285
716
# Copyright 2019 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """This package houses all subcommands for the recipe engine. See implementation_details.md for the expectations of the modules in this directory...
[ 2, 15069, 13130, 383, 406, 9598, 40, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 198, 2, 326, 460, 307, 1043, 287, 262, 38559, 24290, 2393, 13, ...
2.739414
1,842
# Copyright (C) 2020-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 """STCPipelinemodule.""" import numpy as np import gzip as gz from .pipeline import TransformationPipeline, Transformer
[ 2, 15069, 357, 34, 8, 12131, 12, 1238, 2481, 8180, 10501, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 37811, 2257, 8697, 40634, 7749, 375, 2261, 526, 15931, 198, 198, 11748, 299, 32152, 355, ...
3.028986
69
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # ------------------------------------------------------------ # File: __init__.py.py # Created Date: 2020/6/24 # Created Time: 0:12 # Author: Hypdncy # Author Mail: hypdncy@outlook.com # Copyright (c) 2020 Hypdncy # ---------------------------------------------------------...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 20368, 1783, 10541, 198, 2, 9220, 25, 11593, 15003, 834, 13, 9078, 13, 9078, 198, 2, 15622, 7536, 25, 12131, 14, ...
1.851852
621
import numpy as np import pytest from pytest import approx from pymt.component.grid import GridMixIn
[ 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 6738, 12972, 9288, 1330, 5561, 198, 198, 6738, 279, 4948, 83, 13, 42895, 13, 25928, 1330, 24846, 35608, 818, 628, 628, 628, 628, 628, 628, 198 ]
3.166667
36
import sys if __name__ == "__main__": mylog = sys.argv[1] correctlog = sys.argv[2] mylog_sp = load_log_sp(mylog) correctlog_sp = load_log_sp(correctlog) for (i, ((nb1, sp1), (nb2, sp2))) in enumerate(zip(mylog_sp, correctlog_sp)): print('{} {} - {} vs {}'.format( nb1, nb2, sp1, ...
[ 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 616, 6404, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 220, 220, 220, 3376, 6404, 796, 25064, 13, 853, 85, 58, 17, 60, 198, 220, ...
1.981567
217
"""Exercise 1 Usage: $ CUDA_VISIBLE_DEVICES=2 python practico_1_train_petfinder.py --dataset_dir ../ --epochs 30 --dropout 0.1 0.1 --hidden_layer_sizes 200 100 To know which GPU to use, you can check it with the command $ nvidia-smi """ import argparse import os import mlflow import pickle import numpy as np impo...
[ 37811, 3109, 23697, 352, 198, 198, 28350, 25, 198, 198, 3, 29369, 5631, 62, 29817, 34563, 62, 39345, 34444, 28, 17, 21015, 1970, 3713, 62, 16, 62, 27432, 62, 6449, 22805, 13, 9078, 1377, 19608, 292, 316, 62, 15908, 11485, 14, 1377, ...
3.32377
244
# -*- coding: utf-8 -*- from __future__ import absolute_import from pkg_resources import parse_version from warnings import warn from copy import deepcopy import networkx as nx from networkx.readwrite import json_graph from catpy.applications.base import CatmaidClientApplication NX_VERSION_INFO = parse_version(nx....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 279, 10025, 62, 37540, 1330, 21136, 62, 9641, 198, 6738, 14601, 1330, 9828, 198, 6738, 4866, 1330, 2769, ...
2.456667
600
from typing import Optional from watchmen_auth import PrincipalService from watchmen_data_kernel.cache import CacheService from watchmen_data_kernel.common import DataKernelException from watchmen_data_kernel.external_writer import find_external_writer_create, register_external_writer_creator from watchmen_meta.common...
[ 6738, 19720, 1330, 32233, 198, 198, 6738, 2342, 3653, 62, 18439, 1330, 32641, 16177, 198, 6738, 2342, 3653, 62, 7890, 62, 33885, 13, 23870, 1330, 34088, 16177, 198, 6738, 2342, 3653, 62, 7890, 62, 33885, 13, 11321, 1330, 6060, 42, 7948,...
4.140741
135
nota1 = float(input('Digite a nota da primeira nota ')) peso1 = float(input('Digite o peso da primeira nota ')) nota2 = float(input('Digite a nota da seugundo nota ')) peso2 = float(input('Digite o peso da segundo nota ')) media = (nota1/peso1+nota2/peso2)/2 print('A mdia das duas notas :', media)
[ 1662, 64, 16, 796, 12178, 7, 15414, 10786, 19511, 578, 257, 407, 64, 12379, 6994, 8704, 407, 64, 705, 4008, 198, 12272, 78, 16, 796, 12178, 7, 15414, 10786, 19511, 578, 267, 32317, 78, 12379, 6994, 8704, 407, 64, 705, 4008, 198, 166...
2.416
125
from importlib import import_module from typing import Any def import_string(path: str) -> Any: """Imports a dotted path name and returns the class/attribute. Parameters ---------- path: str Dotted module path to retrieve. Returns ------- Class/attribute at the given import path....
[ 6738, 1330, 8019, 1330, 1330, 62, 21412, 198, 6738, 19720, 1330, 4377, 628, 198, 4299, 1330, 62, 8841, 7, 6978, 25, 965, 8, 4613, 4377, 25, 198, 220, 220, 220, 37227, 3546, 3742, 257, 38745, 3108, 1438, 290, 5860, 262, 1398, 14, 423...
2.512821
351
#!/usr/bin/env python import json import os import re from enum import Enum from os.path import join from le_utils.constants import content_kinds from le_utils.constants import exercises from le_utils.constants import file_formats from le_utils.constants import licenses from ricecooker.chefs import SushiChef from ric...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 302, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 198, 6738, 443, 62, 26791, 13, 9979, 1187, 1330, 2695, ...
1.808682
11,541
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
[ 2, 46424, 347, 43312, 38644, 38559, 24290, 9878, 11290, 46424, 198, 2, 198, 2, 220, 770, 1430, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273, 198, 2, 220, 13096, 340, 739, 262, 2846, 286, 262, 22961, 3611, 5094, 1378...
3.680851
235
import numpy as np import os import json import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.utils.data import DataLoader, TensorDataset from naslib.utils.utils import AverageMeterGroup from naslib.predictors.utils.encodings import encode from naslib.predictors imp...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 6738, 2...
3.393443
122
from pythonforandroid.toolchain import Recipe, shprint, current_directory, ArchARM from os.path import exists, join, realpath from os import uname import glob import sh recipe = LibX264Recipe()
[ 6738, 21015, 1640, 19411, 13, 25981, 7983, 1330, 26694, 11, 427, 4798, 11, 1459, 62, 34945, 11, 5579, 33456, 198, 6738, 28686, 13, 6978, 1330, 7160, 11, 4654, 11, 1103, 6978, 198, 6738, 28686, 1330, 555, 480, 198, 11748, 15095, 198, 1...
3.62963
54
#coding=utf-8 try: if __name__.startswith('qgb.Win'): from .. import py else: import py except Exception as ei: raise ei raise EnvironmentError(__name__) if py.is2(): import _winreg as winreg from _winreg import * else: import winreg from winreg import * def get(skey,name,root=HKEY_CURRENT_USER,returnTyp...
[ 2, 66, 7656, 28, 40477, 12, 23, 198, 28311, 25, 198, 197, 361, 11593, 3672, 834, 13, 9688, 2032, 342, 10786, 80, 22296, 13, 16643, 6, 2599, 198, 197, 197, 6738, 11485, 1330, 12972, 198, 197, 17772, 25, 198, 197, 197, 11748, 12972, ...
2.265896
519
import unittest import paramiko from tornado.httputil import HTTPServerRequest from tests.utils import read_file, make_tests_data_path from webssh.handler import MixinHandler, IndexHandler, InvalidValueError
[ 11748, 555, 715, 395, 198, 11748, 5772, 12125, 198, 198, 6738, 33718, 13, 2804, 1996, 346, 1330, 38288, 18497, 18453, 198, 6738, 5254, 13, 26791, 1330, 1100, 62, 7753, 11, 787, 62, 41989, 62, 7890, 62, 6978, 198, 6738, 3992, 45824, 13...
3.767857
56
import logging from unittest import mock from unittest.mock import call from django.conf import settings from django.contrib.auth import get_user_model from django.core.signing import Signer from django.urls import reverse from django.http import Http404 from django.test import RequestFactory from braces.views import...
[ 11748, 18931, 198, 6738, 555, 715, 395, 1330, 15290, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 869, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, ...
3.072165
388
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import sys import os sys.path.insert(0, os.path.abspath('..')) from clint import resources resources.init('kennethreitz', 'clint') lorem = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 17597, 13, 697...
2.874652
359
from django.conf.urls import url from django.conf import settings from django.conf.urls.static import static from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^image/$', views.add_image, name='upload_image'), url(r'^profile/$', views.profile_info, name='profile'), url(r'...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 220, 9037, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, ...
2.564669
317
import random import math from fractions import Fraction from datetime import datetime from jinja2 import Template # empty class for passing to template engine # returns flour percent using flour type def get_special_flour_percent(flourType: str, breadFlourPercent:int) -> int: if flourType == 'Hard Red Whole Wheat'...
[ 11748, 4738, 198, 11748, 10688, 198, 6738, 49876, 1330, 376, 7861, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 474, 259, 6592, 17, 1330, 37350, 198, 198, 2, 6565, 1398, 329, 6427, 284, 11055, 3113, 220, 198, 198, 2, 5860, 1060...
3.521445
443
import datetime from unittest.mock import patch import dns.resolver import dns.rrset import pytest import pytz from django.utils import timezone from freezegun import freeze_time from rest_framework import status from posthog.models import Organization, OrganizationDomain, OrganizationMembership, Team from posthog.te...
[ 11748, 4818, 8079, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 11748, 288, 5907, 13, 411, 14375, 198, 11748, 288, 5907, 13, 21062, 2617, 198, 11748, 12972, 9288, 198, 11748, 12972, 22877, 198, 6738, 42625, 14208, 13, ...
2.542525
1,117
import numpy as np import tensorflow as tf from tensorflow import keras import matplotlib.pyplot as plt from os import listdir from tensorflow.keras.callbacks import ModelCheckpoint dataDir = "./data/trainSmallFA/" files = listdir(dataDir) files.sort() totalLength = len(files) inputs = np.empty((len(files), 3, 64, 64)...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 1330, 41927, 292, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 28686, 1330, 1351, 15908, 198, 6738, 11192,...
2.189474
570
from pepper.framework import * from pepper import logger from pepper.language import Utterance from pepper.language.generation.thoughts_phrasing import phrase_thoughts from pepper.language.generation.reply import reply_to_question from .responder import Responder, ResponderType from pepper.language import UtteranceTy...
[ 6738, 13385, 13, 30604, 1330, 1635, 198, 6738, 13385, 1330, 49706, 198, 198, 6738, 13385, 13, 16129, 1330, 7273, 353, 590, 198, 6738, 13385, 13, 16129, 13, 20158, 13, 2016, 912, 62, 746, 81, 2313, 1330, 9546, 62, 2016, 912, 198, 6738,...
4.160714
112
# -*- coding: utf-8 -*- import re from unicodedata import normalize from flask import Blueprint, render_template, current_app from flask import redirect, url_for, g, abort from sqlalchemy import desc from fedora_college.core.database import db from fedora_college.modules.content.forms import * # noqa from fedora_colle...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 302, 198, 6738, 28000, 9043, 1045, 1330, 3487, 1096, 198, 6738, 42903, 1330, 39932, 11, 8543, 62, 28243, 11, 1459, 62, 1324, 198, 6738, 42903, 1330, 18941, 11, 19...
2.838462
390
"""Test the Airthings config flow.""" from unittest.mock import patch import airthings from homeassistant import config_entries from homeassistant.components.airthings.const import CONF_ID, CONF_SECRET, DOMAIN from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import RESULT_TYPE_CREATE_EN...
[ 37811, 14402, 262, 317, 3333, 654, 4566, 5202, 526, 15931, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 11748, 1633, 27971, 198, 198, 6738, 1363, 562, 10167, 1330, 4566, 62, 298, 1678, 198, 6738, 1363, 562, 10167, 13, ...
3.019737
152
# ------------------------------------------------------------------------------ # Copyright (c) NKU # Licensed under the MIT License. # Written by Xuanyi Li (xuanyili.edu@gmail.com) # ------------------------------------------------------------------------------ import os import torch import torch.nn.functional as F #...
[ 2, 16529, 26171, 198, 2, 15069, 357, 66, 8, 46465, 52, 198, 2, 49962, 739, 262, 17168, 13789, 13, 198, 2, 22503, 416, 33591, 1092, 72, 7455, 357, 87, 84, 1092, 2403, 13, 15532, 31, 14816, 13, 785, 8, 198, 2, 16529, 26171, 198, 1...
2.54386
456
from aiohttp import web import base64 import io import face_recognition main()
[ 6738, 257, 952, 4023, 1330, 3992, 198, 11748, 2779, 2414, 198, 11748, 33245, 198, 11748, 1986, 62, 26243, 653, 198, 198, 12417, 3419, 198 ]
3.333333
24
# ~~~ # This file is part of the paper: # # " An Online Efficient Two-Scale Reduced Basis Approach # for the Localized Orthogonal Decomposition " # # https://github.com/TiKeil/Two-scale-RBLOD.git # # Copyright 2019-2021 all developers. All rights reserved. # License: Licensed as BSD 2-Clause ...
[ 2, 220, 4907, 93, 198, 2, 770, 2393, 318, 636, 286, 262, 3348, 25, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 1052, 7467, 412, 5632, 4930, 12, 29990, 39963, 6455, 271, 38066, 198, 2, 220, 220, 220, ...
2.406593
273
import os import shutil import numpy as np import pandas as pd ...
[ 11748, 28686, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
1.25741
6,410
import os if __name__ == "__main__": dims = ["32", "64", "128", "256", "512", "1024", "2048"] for dim in dims: os.system( f"perf stat -e r11 -x, -r 10 ../matmul.out ../data/mat-A-{dim}.txt ../data/mat-B-{dim}.txt ./out/out-{dim}.txt 2>>res_arm.csv" ) print(f"Finished {dim}...
[ 11748, 28686, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 5391, 82, 796, 14631, 2624, 1600, 366, 2414, 1600, 366, 12762, 1600, 366, 11645, 1600, 366, 25836, 1600, 366, 35500, 1600, 366, 1238, ...
1.965909
176
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 15069, 357, 66, 8, 1584, 11, 33448, 11, 18650, 290, 14, 273, 663, 29116, 13, 220, 1439, 2489, 10395, 13, 198, 2, 770, 3788, 318, 10668, 12, 36612, 284, 345, 739, 262, 14499, 2448, 33532, 1...
3.097561
164
# Copyright (c) 2022, salesforce.com, inc. # All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause import os import re import time import random import argparse import torch from transformers import ...
[ 2, 15069, 357, 66, 8, 33160, 11, 4200, 3174, 13, 785, 11, 753, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, 18, 12, 2601, 682, 198, 2, 1114, 1336, 5964, 2420, 11, 766, 2...
4.024155
207
import unittest from services import RoverRunnerService from tests.test_environment.marses import small_mars_with_one_rover_empty_commands from tests.test_environment import mocks as m from data_objects import Rover
[ 11748, 555, 715, 395, 198, 6738, 2594, 1330, 36718, 49493, 16177, 198, 6738, 5254, 13, 9288, 62, 38986, 13, 76, 945, 274, 1330, 1402, 62, 76, 945, 62, 4480, 62, 505, 62, 305, 332, 62, 28920, 62, 9503, 1746, 198, 6738, 5254, 13, 92...
3.677966
59
import argparse import warnings warnings.simplefilter("ignore", UserWarning) import files from tensorboardX import SummaryWriter import os import numpy as np import time import torch import torch.optim import torch.nn as nn import torch.utils.data import torchvision import torchvision.transforms as tfs from data impo...
[ 11748, 1822, 29572, 198, 11748, 14601, 198, 40539, 654, 13, 36439, 24455, 7203, 46430, 1600, 11787, 20361, 8, 198, 11748, 3696, 198, 6738, 11192, 273, 3526, 55, 1330, 21293, 34379, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 19...
2.311573
1,011
# -*- coding: utf-8 -*- from tests import HangulizeTestCase from hangulize.langs.vie import Vietnamese
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 5254, 1330, 24300, 377, 1096, 14402, 20448, 198, 6738, 8181, 377, 1096, 13, 17204, 82, 13, 85, 494, 1330, 23618, 198 ]
2.861111
36
from mathlibpy.functions import * import unittest if __name__ == "__main__": unittest.main()
[ 6738, 10688, 8019, 9078, 13, 12543, 2733, 1330, 1635, 198, 11748, 555, 715, 395, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.615385
39
if __name__ == '__main__': letters = ["c", "f", "j"] target = "a" print(f"Input: letters = {letters}, target = {target}") print(f"Output: {Solution().nextGreatestLetter(letters, target)}")
[ 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 7475, 796, 14631, 66, 1600, 366, 69, 1600, 366, 73, 8973, 198, 220, 220, 220, 2496, 796, 366, 64, 1, 198, 220, 220, 220, 3601, 7, 69, 1, 205...
2.555556
81
import nonebot from nonebot import on_command from nonebot.rule import to_me from nonebot.typing import T_State from nonebot.adapters import Bot, Event from nonebot.log import logger from .config import global_config from .schedule import anti_cpdaily_check_routine cpdaily = on_command('cpdaily') scheduler = nonebot...
[ 11748, 4844, 13645, 198, 6738, 4844, 13645, 1330, 319, 62, 21812, 198, 6738, 4844, 13645, 13, 25135, 1330, 284, 62, 1326, 198, 6738, 4844, 13645, 13, 774, 13886, 1330, 309, 62, 9012, 198, 6738, 4844, 13645, 13, 324, 12126, 1330, 18579, ...
3.3125
112
""" ============ Dollar Ticks ============ Use a `~.ticker.FormatStrFormatter` to prepend dollar signs on y axis labels. """ import numpy as np import matplotlib.pyplot as plt import matplotlib.ticker as ticker # Fixing random state for reproducibility np.random.seed(19680801) fig, ax = plt.subplots() ax.plot(100*np...
[ 37811, 198, 25609, 198, 35, 13228, 309, 3378, 198, 25609, 198, 198, 11041, 257, 4600, 93, 13, 83, 15799, 13, 26227, 13290, 8479, 1436, 63, 284, 3143, 437, 8872, 5895, 319, 331, 16488, 14722, 13, 198, 37811, 198, 11748, 299, 32152, 355...
2.910714
336
import json import re from flask import request, abort, jsonify from Chibrary import config from Chibrary.config import logger from Chibrary.exceptions import * from functools import wraps from urllib import parse from Chibrary.server import db """ { code: ..., message: ..., data: ..., } """ # ...
[ 11748, 33918, 198, 11748, 302, 198, 6738, 42903, 1330, 2581, 11, 15614, 11, 33918, 1958, 198, 6738, 609, 4115, 1330, 4566, 198, 6738, 609, 4115, 13, 11250, 1330, 49706, 198, 6738, 609, 4115, 13, 1069, 11755, 1330, 1635, 198, 6738, 1257,...
1.697931
725
import numpy as np from something import Top i = 0 while i < 10: a = np.ndarray((10,4)) b = np.ones((10, Top)) i += 1 del Top # show_store()
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1223, 1330, 5849, 198, 198, 72, 796, 657, 198, 4514, 1312, 1279, 838, 25, 198, 220, 220, 220, 257, 796, 45941, 13, 358, 18747, 19510, 940, 11, 19, 4008, 198, 220, 220, 220, 275, 796, 45941, ...
2.279412
68
from aiohttp_admin2.mappers import Mapper from aiohttp_admin2.mappers import fields def test_correct_float_type(): """ In this test we check success convert to float type. """ mapper = FloatMapper({"field": 1}) mapper.is_valid() assert mapper.data["field"] == 1.0 mapper = FloatMapper({"...
[ 6738, 257, 952, 4023, 62, 28482, 17, 13, 76, 46629, 1330, 337, 11463, 198, 6738, 257, 952, 4023, 62, 28482, 17, 13, 76, 46629, 1330, 7032, 628, 198, 198, 4299, 1332, 62, 30283, 62, 22468, 62, 4906, 33529, 198, 220, 220, 220, 37227, ...
2.623824
319
""" Try to load all of the MODFLOW-USG examples in ../examples/data/mfusg_test. These are the examples that are distributed with MODFLOW-USG. """ import os import flopy # make the working directory tpth = os.path.join("temp", "t038") if not os.path.isdir(tpth): os.makedirs(tpth) # build list of name files to try...
[ 37811, 198, 23433, 284, 3440, 477, 286, 262, 19164, 3697, 3913, 12, 2937, 38, 6096, 287, 11485, 14, 1069, 12629, 14, 7890, 14, 76, 69, 385, 70, 62, 9288, 13, 198, 4711, 389, 262, 6096, 326, 389, 9387, 351, 19164, 3697, 3913, 12, 2...
2.352018
446
#!/usr/bin/env python3 import os from argparse import ArgumentParser, ArgumentTypeError, FileType, Namespace from typing import Any
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 28686, 198, 6738, 1822, 29572, 1330, 45751, 46677, 11, 45751, 6030, 12331, 11, 9220, 6030, 11, 28531, 10223, 198, 6738, 19720, 1330, 4377, 628, 198 ]
3.722222
36
from typing import Optional from asn1crypto import core, x509, cms __all__ = [ 'Target', 'TargetCert', 'Targets', 'SequenceOfTargets', 'AttrSpec', 'AAControls' ] # Blame X.509... def _make_tag_explicit(field_decl): tag_dict = field_decl[2] if 'explicit' in tag_dict: return tag_dic...
[ 6738, 19720, 1330, 32233, 198, 198, 6738, 355, 77, 16, 29609, 78, 1330, 4755, 11, 2124, 29022, 11, 269, 907, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 21745, 3256, 705, 21745, 37608, 3256, 705, 51, 853, 1039, 3256,...
2.408935
582
from model.group import Group import random
[ 6738, 2746, 13, 8094, 1330, 4912, 198, 11748, 4738, 198 ]
4.4
10
''' Autor: Gurkirt Singh Start data: 15th May 2016 purpose: of this file is read frame level predictions and process them to produce a label per video ''' from sklearn.svm import LinearSVC from sklearn.ensemble import RandomForestClassifier import numpy as np import pickle import os import time,json import pylab as pl...
[ 7061, 6, 198, 16541, 273, 25, 24797, 74, 2265, 14403, 198, 10434, 1366, 25, 1315, 400, 1737, 1584, 198, 29983, 25, 286, 428, 2393, 318, 1100, 5739, 1241, 16277, 290, 1429, 606, 284, 4439, 257, 6167, 583, 2008, 198, 198, 7061, 6, 198...
2.640523
306
import csv if __name__ == '__main__': data = '''book_title,author,publisher,pub_date,isbn Python 101,Mike Driscoll, Mike Driscoll,2020,123456789 wxPython Recipes,Mike Driscoll,Apress,2018,978-1-4842-3237-8 Python Interviews,Mike Driscoll,Packt Publishing,2018,9781788399081''' records = [] for...
[ 11748, 269, 21370, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1366, 796, 705, 7061, 2070, 62, 7839, 11, 9800, 11, 12984, 8191, 11, 12984, 62, 4475, 11, 271, 9374, 198, 220, 220, 220,...
2.382239
259
# SPDX-FileCopyrightText: 2017 Fermi Research Alliance, LLC # SPDX-License-Identifier: Apache-2.0 import pytest from decisionengine.framework.modules import Publisher, Source from decisionengine.framework.modules.Module import verify_products from decisionengine.framework.modules.Source import Parameter
[ 2, 30628, 55, 12, 8979, 15269, 8206, 25, 2177, 376, 7780, 72, 4992, 10302, 11, 11419, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 2551, 18392, 13, 30604, ...
3.949367
79
import torch import torch.nn as nn from torch.nn.functional import max_pool1d from utility.model_parameter import Configuration, ModelParameter
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 20471, 13, 45124, 1330, 3509, 62, 7742, 16, 67, 198, 198, 6738, 10361, 13, 19849, 62, 17143, 2357, 1330, 28373, 11, 9104, 36301, 628 ]
3.842105
38
''' <xs:complexType name="backup"> <xs:annotation> <xs:documentation></xs:documentation> </xs:annotation> <xs:sequence> <xs:group ref="duration"/> <xs:group ref="editorial"/> </xs:sequence> </xs:complexType> ''' from musicscore.dtd.dtd import Sequence, GroupReference, Element from musicscore.musicxml...
[ 7061, 6, 198, 197, 27, 34223, 25, 41887, 6030, 1438, 2625, 1891, 929, 5320, 198, 197, 197, 27, 34223, 25, 1236, 14221, 29, 198, 197, 197, 197, 27, 34223, 25, 22897, 341, 12240, 34223, 25, 22897, 341, 29, 198, 197, 197, 3556, 34223, ...
2.841176
170
import nltk import re import csv import string import collections import numpy as np from nltk.corpus import wordnet from nltk.corpus import stopwords from nltk.stem import WordNetLemmatizer from nltk.tokenize import WordPunctTokenizer from sklearn.metrics import classification_report from sklearn.metric...
[ 11748, 299, 2528, 74, 201, 198, 11748, 302, 201, 198, 11748, 269, 21370, 201, 198, 11748, 4731, 201, 198, 11748, 17268, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 1573, ...
2.538124
1,141
import torch import numpy as np import hashlib from torch.autograd import Variable import os
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12234, 8019, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 11748, 28686, 628, 628, 628, 628, 198, 220, 220, 220, 220, 220, 220, 220, 220, 628, 628, 628, 628, 628...
2.813953
43
from ibm_watson import TextToSpeechV1, SpeechToTextV1, DetailedResponse from os import system from json import loads if __name__ == '__main__': main()
[ 6738, 24283, 76, 62, 86, 13506, 1330, 8255, 2514, 5248, 3055, 53, 16, 11, 24709, 2514, 8206, 53, 16, 11, 4614, 6255, 31077, 198, 198, 6738, 28686, 1330, 1080, 198, 6738, 33918, 1330, 15989, 628, 628, 198, 361, 11593, 3672, 834, 6624, ...
2.962963
54
from subprocess import run
[ 6738, 850, 14681, 1330, 1057, 628 ]
4.666667
6
# Generated by Django 2.1.7 on 2019-02-23 23:45 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 22, 319, 13130, 12, 2999, 12, 1954, 2242, 25, 2231, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
from . import (emoji as emj, keyboards as kb, telegram as tg, phrases as phr, finance as fin, utils, glossary, bots, gcp, sed, db)
[ 6738, 764, 1330, 357, 368, 31370, 355, 795, 73, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 34512, 355, 47823, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 573...
1.448454
194
#!/usr/bin/env python # -*- coding: utf-8 """ :mod:`question.serializers` -- serializers """ from rest_framework import serializers from .models import Question, PossibleAnswer from category.models import Category
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 25, 4666, 25, 63, 25652, 13, 46911, 11341, 63, 1377, 11389, 11341, 198, 37811, 198, 198, 6738, 1334, 62, 30604, 13...
3.421875
64
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'src/ui_ShowResultDialog.ui' # # Created: Sat May 16 17:05:43 2015 # by: PyQt5 UI code generator 5.4 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets from widgets.ImageLabel import Ima...
[ 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, 10677, 14, 9019, 62, 15307, 23004, 44204, 13, 9019, 6, 198, 2, 198, 2, 15622, 25, 7031, 1737, 1467, 1596, 25...
2.852174
115
""" mixcoatl.admin.api_key ---------------------- Implements access to the DCM ApiKey API """ from mixcoatl.resource import Resource from mixcoatl.decorators.lazy import lazy_property from mixcoatl.decorators.validations import required_attrs from mixcoatl.utils import uncamel, camelize, camel_keys, uncamel_keys impor...
[ 37811, 198, 19816, 1073, 25864, 13, 28482, 13, 15042, 62, 2539, 198, 19351, 438, 198, 198, 3546, 1154, 902, 1895, 284, 262, 6257, 44, 5949, 72, 9218, 7824, 198, 37811, 198, 6738, 5022, 1073, 25864, 13, 31092, 1330, 20857, 198, 6738, 5...
3.31
100
my_set = {1, 3, 5} my_dict = {'name': 'Jose', 'age': 90} another_dict = {1: 15, 2: 75, 3: 150} lottery_players = [ { 'name': 'Rolf', 'numbers': (13, 45, 66, 23, 22) }, { 'name': 'John', 'numbers': (14, 56, 80, 23, 22) } ] universities = [ { 'name': 'Oxford',...
[ 1820, 62, 2617, 796, 1391, 16, 11, 513, 11, 642, 92, 198, 1820, 62, 11600, 796, 1391, 6, 3672, 10354, 705, 23409, 3256, 705, 496, 10354, 4101, 92, 198, 29214, 62, 11600, 796, 1391, 16, 25, 1315, 11, 362, 25, 5441, 11, 513, 25, 6...
1.746835
237
"""Class :py:class:`QWTable` is a QTableView->QWidget for tree model ====================================================================== Usage :: # Run test: python lcls2/psdaq/psdaq/control_gui/QWTable.py from psdaq.control_gui.QWTable import QWTable w = QWTable() Created on 2019-03-28 by Mikhail D...
[ 198, 37811, 9487, 1058, 9078, 25, 4871, 25, 63, 48, 54, 10962, 63, 318, 257, 1195, 10962, 7680, 3784, 48, 38300, 329, 5509, 2746, 198, 23926, 50155, 198, 198, 28350, 7904, 628, 220, 220, 220, 1303, 5660, 1332, 25, 21015, 300, 565, 8...
2.569087
427
"""Extension loader for filetype handlers. The extension objects provided by MIMEExtensionLoader objects have four attributes: parse, embed, add_options, and update_options. The first two are used as handlers for supporting the MIME type as primary and embeded resources. The last two are (currently) only used for pr...
[ 37811, 11627, 3004, 40213, 329, 2393, 4906, 32847, 13, 198, 198, 464, 7552, 5563, 2810, 416, 337, 3955, 6500, 742, 3004, 17401, 5563, 423, 1440, 198, 1078, 7657, 25, 21136, 11, 11525, 11, 751, 62, 25811, 11, 290, 4296, 62, 25811, 13, ...
3.803738
107
# coding: utf-8 # (C) Copyright IBM Corp. 2021. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 357, 34, 8, 15069, 19764, 11421, 13, 33448, 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, ...
2.512379
7,149
import functions from pytest import approx from bcca.test import should_print def test_min_insurance(): assert functions.min_insurance(100000) == approx(80000.0) assert functions.min_insurance(123456789) == approx(98765431.2) assert functions.min_insurance(0) == approx(0.0) assert functions.mi...
[ 11748, 5499, 198, 6738, 12972, 9288, 1330, 5561, 198, 6738, 275, 13227, 13, 9288, 1330, 815, 62, 4798, 628, 628, 628, 628, 628, 198, 4299, 1332, 62, 1084, 62, 1040, 3874, 33529, 198, 220, 220, 220, 6818, 5499, 13, 1084, 62, 1040, 38...
2.686709
316
from django.contrib import admin from .models import Product admin.site.register(Product)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 27530, 1330, 8721, 198, 28482, 13, 15654, 13, 30238, 7, 15667, 8 ]
3.75
24
# coding=utf-8 from __future__ import unicode_literals from .base import BasePlugin
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 764, 8692, 1330, 7308, 37233, 628 ]
3.307692
26
#!/usr/bin/env python3 # Project: VUT FIT SUI Project - Dice Wars # Authors: # - Josef Kol <xkolar71@stud.fit.vutbr.cz> # - Dominik Harmim <xharmi00@stud.fit.vutbr.cz> # - Petr Kapoun <xkapou04@stud.fit.vutbr.cz> # - Jindich estk <xsesta05@stud.fit.vutbr.cz> # Year: 2020 # Description: Generates g...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 4935, 25, 569, 3843, 376, 2043, 311, 10080, 4935, 532, 34381, 6176, 198, 2, 46665, 25, 198, 2, 220, 220, 532, 5264, 69, 25910, 220, 220, 220, 220, 220, 1279, 87, 74, ...
2.402715
442
import functools import sys from contextlib import contextmanager import pytest _orig_trace = None # if _orig_trace and not hasattr(sys, "pypy_version_info"): # Fails with PyPy2 (https://travis-ci.org/antocuni/pdb/jobs/509624590)?!
[ 11748, 1257, 310, 10141, 198, 11748, 25064, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 198, 11748, 12972, 9288, 198, 198, 62, 11612, 62, 40546, 796, 6045, 628, 628, 198, 2, 611, 4808, 11612, 62, 40546, 290, 407, 468, 35226, 7, 175...
2.711111
90
""" Various generic env utilties. """ def center_crop_img(img, crop_zoom): """ crop_zoom is amount to "zoom" into the image. E.g. 2.0 would cut out half of the width, half of the height, and only give the center. """ raw_height, raw_width = img.shape[:2] center = raw_height // 2, raw_width // 2 cro...
[ 37811, 26386, 14276, 17365, 3384, 2326, 444, 13, 37227, 198, 198, 4299, 3641, 62, 31476, 62, 9600, 7, 9600, 11, 13833, 62, 89, 4207, 2599, 198, 220, 220, 220, 37227, 13833, 62, 89, 4207, 318, 2033, 284, 366, 89, 4207, 1, 656, 262, ...
2.377323
538
# -*- coding: utf-8 -*- from __future__ import absolute_import import mock from exam import fixture from sentry import options from sentry.models import Project from sentry.testutils import TestCase from sentry.utils.http import ( is_same_domain, is_valid_origin, get_origins, absolute_uri, is_valid_ip, )
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 15290, 198, 198, 6738, 2814, 1330, 29220, 198, 198, 6738, 1908, 563, 1330, 3689, 198, 6738, 1908, 5...
3.067308
104
# -*- coding: utf-8 -*- """WebHelpers used in project.""" #from webhelpers import date, feedgenerator, html, number, misc, text from markupsafe import Markup
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 13908, 12621, 19276, 973, 287, 1628, 526, 15931, 198, 198, 2, 6738, 3992, 16794, 364, 1330, 3128, 11, 3745, 8612, 1352, 11, 27711, 11, 1271, 11, 12747, 11, ...
3
53
import sys; from Thesis.load.loadBenchmark import runLoadBenchmarkAsBatch; from Thesis.cluster.RiakCluster import RiakCluster; NORMAL_BINDING = 'riak'; CONSISTENCY_BINDING = 'riak_consistency'; IPS_IN_CLUSTER = ['172.16.33.14', '172.16.33.15', '172.16.33.16', '172.16.33.17', '172.16.33.18']; cluster = RiakCluster(NO...
[ 11748, 25064, 26, 198, 198, 6738, 383, 13429, 13, 2220, 13, 2220, 44199, 4102, 1330, 1057, 8912, 44199, 4102, 1722, 33, 963, 26, 198, 6738, 383, 13429, 13, 565, 5819, 13, 49, 32994, 2601, 5819, 1330, 30385, 461, 2601, 5819, 26, 198, ...
2.071429
280
# coding: utf-8 # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. import unittest from mock import patch from auto_nag.people import People from auto_nag.round_robin im...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 770, 8090, 6127, 5178, 318, 2426, 284, 262, 2846, 286, 262, 29258, 5094, 198, 2, 13789, 11, 410, 13, 362, 13, 15, 13, 1002, 257, 4866, 286, 262, 4904, 43, 373, 407, 9387, 351, 428, ...
3.211009
109
# should re-write compiled functions to take a local and global dict # as input. from __future__ import absolute_import, print_function import sys import os from . import ext_tools from . import catalog from . import common_info from numpy.core.multiarray import _get_ndarray_c_version ndarray_api_version = '/* NDARRA...
[ 2, 815, 302, 12, 13564, 14102, 5499, 284, 1011, 257, 1957, 290, 3298, 8633, 198, 2, 355, 5128, 13, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 3601, 62, 8818, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 6738, 764, 1...
2.577616
4,387
# Copyright 2015 Tesora Inc. # 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 a...
[ 2, 15069, 1853, 10696, 5799, 3457, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, ...
3.436735
245
import pathlib import yaml documentations = {"Our Platform": "QuantConnect-Platform-2.0.0.yaml", "Alpha Streams": "QuantConnect-Alpha-0.8.yaml"} for section, source in documentations.items(): yaml_file = open(source) doc = yaml.load(yaml_file, Loader=yaml.Loader) paths = doc["paths"] ...
[ 11748, 3108, 8019, 198, 11748, 331, 43695, 198, 198, 22897, 602, 796, 19779, 5122, 19193, 1298, 366, 24915, 13313, 12, 37148, 12, 17, 13, 15, 13, 15, 13, 88, 43695, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.896811
2,258
from .utils import get_request, authorized
[ 6738, 764, 26791, 1330, 651, 62, 25927, 11, 10435, 198 ]
4.3
10
from django.conf.urls import url # from .views import BaseIndexView urlpatterns = [ # url(r'^$', BaseIndexView.as_view(), name="index"), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 2, 422, 764, 33571, 1330, 7308, 15732, 7680, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 1303, 19016, 7, 81, 6, 61, 3, 3256, 7308, 15732, 7680, 13, 292, 6...
2.769231
52
# Copyright (c) 2018, Palo Alto Networks # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS...
[ 2, 15069, 357, 66, 8, 2864, 11, 44878, 34317, 27862, 198, 2, 198, 2, 2448, 3411, 284, 779, 11, 4866, 11, 13096, 11, 290, 14, 273, 14983, 428, 3788, 329, 597, 198, 2, 4007, 351, 393, 1231, 6838, 318, 29376, 7520, 11, 2810, 326, 2...
3.003967
3,277
import glob import logging import os import warnings import pytest from _pytest.outcomes import Failed from _pytest.reports import TestReport from .broker_pact import BrokerPact, BrokerPacts, PactBrokerConfig from .result import PytestResult, log # Future options to be implemented. Listing them here so naming cons...
[ 11748, 15095, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 14601, 198, 198, 11748, 12972, 9288, 198, 6738, 4808, 9078, 9288, 13, 448, 8988, 1330, 22738, 198, 6738, 4808, 9078, 9288, 13, 48922, 1330, 6208, 19100, 198, 198, 6738, 764, ...
2.245513
1,393
# -*- coding: utf-8 -*- def docstring_property(class_doc): """Property attribute for docstrings. Took from: https://gist.github.com/bfroehle/4041015 >>> class A(object): ... '''Main docstring''' ... def __init__(self, x): ... self.x = x ... @docstring_property(__doc__)...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 4299, 2205, 8841, 62, 26745, 7, 4871, 62, 15390, 2599, 198, 220, 220, 220, 37227, 21746, 11688, 329, 2205, 37336, 13, 198, 220, 220, 220, 309, 566, 422, 25, 3740,...
2.164659
249
import warnings try: import cudasift as cs except: cs = None import numpy as np import pandas as pd def match(edge, aidx=None, bidx=None, **kwargs): """ Apply a composite CUDA matcher and ratio check. If this method is used, no additional ratio check is necessary and no symmetry check is requir...
[ 11748, 14601, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 269, 463, 292, 2135, 355, 50115, 198, 16341, 25, 198, 220, 220, 220, 50115, 796, 6045, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, ...
2.5722
741
from flask_restx import Api from app.apis.hello import api as hello api = Api( title='api', version='1.0', description='', prefix='/api', doc='/api' ) api.add_namespace(hello)
[ 6738, 42903, 62, 2118, 87, 1330, 5949, 72, 198, 198, 6738, 598, 13, 499, 271, 13, 31373, 1330, 40391, 355, 23748, 198, 198, 15042, 796, 5949, 72, 7, 198, 220, 220, 220, 3670, 11639, 15042, 3256, 198, 220, 220, 220, 2196, 11639, 16, ...
2.341176
85
# coding: utf-8 import unittest from test.support import captured_stdout from brainfuck import BrainFuck if __name__ == "__main__": unittest.main()
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 555, 715, 395, 198, 6738, 1332, 13, 11284, 1330, 7907, 62, 19282, 448, 198, 198, 6738, 3632, 31699, 1330, 14842, 34094, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 83...
2.854545
55