content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# Copyright (c) 2018, 2019, 2020 Nordic Semiconductor ASA # Copyright 2018, 2019 Foundries.io Ltd # # SPDX-License-Identifier: Apache-2.0 ''' Parser and abstract data types for west manifests. ''' import configparser import enum import errno import logging import os from pathlib import PurePosixPath, Path import re i...
[ 2, 15069, 357, 66, 8, 2864, 11, 13130, 11, 12131, 35834, 311, 5314, 40990, 49599, 198, 2, 15069, 2864, 11, 13130, 4062, 1678, 13, 952, 12052, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, ...
2.440328
17,948
import csv
[ 11748, 269, 21370, 628 ]
3
4
from cleo import Command import logging from dcmrtstruct2nii.facade.dcmrtstruct2nii import list_rt_structs class ListStructs(Command): """ List structures in RT Struct list {--r|rtstruct= : Path to DICOM RT Struct file} """
[ 6738, 1190, 78, 1330, 9455, 198, 11748, 18931, 198, 198, 6738, 288, 11215, 17034, 7249, 17, 77, 4178, 13, 38942, 671, 13, 67, 11215, 17034, 7249, 17, 77, 4178, 1330, 1351, 62, 17034, 62, 7249, 82, 628, 198, 4871, 7343, 44909, 82, 7,...
2.663158
95
# Generated by Django 3.0.7 on 2020-07-15 03:48 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 22, 319, 12131, 12, 2998, 12, 1314, 7643, 25, 2780, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
3.019231
52
# coding: utf-8 # # Evaluation of the new oversampler on the standard database foldings # # In this notebook we give an example evaluating a new oversampler on the standard 104 imbalanced datasets. The evaluation is highly similar to that illustrated in the notebook ```002_evaluation_multiple_datasets``` with the di...
[ 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 1303, 34959, 286, 262, 649, 10753, 321, 20053, 319, 262, 3210, 6831, 5591, 654, 198, 2, 220, 198, 2, 554, 428, 20922, 356, 1577, 281, 1672, 22232, 257, 649, 10753, 321, 20053, 319,...
2.609649
1,368
import numpy as np import tensorflow as tf from tensorflow import keras print(tf.__version__)
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 1330, 41927, 292, 198, 4798, 7, 27110, 13, 834, 9641, 834, 8, 198 ]
3.133333
30
# # Question: given a range a,b, find the total number of perfect square numbers in the given range. # import cmath def find_perfect_square_count(a, b, verbose=False): ''' The strategy here is not to iterate through the set of possible integer values and check for is_perfect_square() each time...
[ 2, 198, 2, 18233, 25, 1813, 257, 2837, 257, 11, 65, 11, 1064, 262, 2472, 1271, 286, 2818, 6616, 3146, 287, 262, 1813, 2837, 13, 198, 2, 198, 198, 11748, 269, 11018, 198, 198, 4299, 1064, 62, 25833, 62, 23415, 62, 9127, 7, 64, 11...
2.3722
1,518
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import unittest from beanmachine.ppl.experimental.mala import ( SingleSiteMetropolisAdapatedLangevinAlgorithm, ) from beanmachine.ppl.t...
[ 2, 15069, 357, 66, 8, 30277, 19193, 82, 11, 3457, 13, 290, 29116, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 428, 2723, 5509, 13, ...
3.427273
110
# Dashboard blueprint from flask.blueprints import Blueprint from config import api_version dash = Blueprint( "dashboard", __name__, url_prefix=f"/api/{api_version}/dashboard", template_folder="templates/dashboard", ) from . import views
[ 2, 16189, 3526, 30881, 198, 6738, 42903, 13, 17585, 17190, 1330, 39932, 198, 6738, 4566, 1330, 40391, 62, 9641, 198, 198, 42460, 796, 39932, 7, 198, 220, 220, 220, 366, 42460, 3526, 1600, 198, 220, 220, 220, 11593, 3672, 834, 11, 198,...
2.976744
86
from setuptools import _install_setup_requires, setup setup( name="twitoff_app", packages=['twitoff_app'], include_package_data=True, install_requires=[ 'flask', ], )
[ 6738, 900, 37623, 10141, 1330, 4808, 17350, 62, 40406, 62, 47911, 11, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 4246, 270, 2364, 62, 1324, 1600, 220, 198, 220, 220, 220, 10392, 28, 17816, 4246, 270, 2364, 62, 1324, 6...
2.241758
91
from subprocess import call import sys projects_file = sys.argv[1] svn_path = sys.argv[2] oldest_rev = sys.argv[3] with open(projects_file) as f: repo_paths = f.readlines() print [svn_path + line[:-1] for line in repo_paths] paths = [svn_path + line[:-1] for line in repo_paths] for path in paths: call(['svn'...
[ 6738, 850, 14681, 1330, 869, 198, 11748, 25064, 198, 198, 42068, 62, 7753, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 21370, 77, 62, 6978, 796, 25064, 13, 853, 85, 58, 17, 60, 220, 198, 727, 395, 62, 18218, 796, 25064, 13, 853, 8...
2.359756
164
# Generated by Django 3.1.5 on 2021-02-12 20:45 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 20, 319, 33448, 12, 2999, 12, 1065, 1160, 25, 2231, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# Generated by Django 2.2.6 on 2019-10-26 14:09 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 21, 319, 13130, 12, 940, 12, 2075, 1478, 25, 2931, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import asyncio import os import io import disnake import logging from disnake.ext import commands from disnake.ext.audiorec import NativeVoiceClient logging.basicConfig(level=logging.INFO) bot = commands.Bot(command_prefix=commands.when_mentioned_or("+"), description='Relatively simp...
[ 11748, 30351, 952, 201, 198, 11748, 28686, 201, 198, 11748, 33245, 201, 198, 201, 198, 11748, 595, 77, 539, 201, 198, 11748, 18931, 201, 198, 201, 198, 6738, 595, 77, 539, 13, 2302, 1330, 9729, 201, 198, 6738, 595, 77, 539, 13, 2302...
2.588957
163
#!/usr/bin/env python3 """ The following functions are a miscellaneous collection of utility functions that can be useful in making code shorter and easier to read. """ def shortened_hash(s, n): """ Return a shortened string with the first and last bits of a hash :param s: the full string to shorten :par...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 198, 464, 1708, 5499, 389, 257, 2984, 25673, 4947, 286, 10361, 5499, 198, 5562, 460, 307, 4465, 287, 1642, 2438, 12238, 290, 4577, 284, 1100, 13, 198, 37811, 628, 198, ...
2.287946
1,344
#!/usr/bin/python3 para_str = """ Python is a scripting language which was created by Guido van Rossum in 1991, \t which is used in various sectors such as \n Game Development, GIS Programming, Software Development, web development, Data Analytics and Machine learning, System Scripting etc. """ print (para_str)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 1845, 64, 62, 2536, 796, 37227, 11361, 318, 257, 36883, 3303, 543, 373, 2727, 416, 198, 8205, 17305, 5719, 9847, 388, 287, 10249, 11, 3467, 83, 543, 318, 973, 287, 2972, 16020, 884...
3.807229
83
# Copyright 2020 Atthaboon S. # # 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, 12131, 1629, 400, 397, 2049, 311, 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.784783
460
import os import sys try: from shutil import which except ImportError: from backports.shutil_which import which import _vmprof from vmprof import cli from vmprof.reader import (MARKER_NATIVE_SYMBOLS, FdWrapper, LogReaderState, LogReaderDumpNative) from vmprof.stats import Stats from vmprof.profiler i...
[ 11748, 28686, 198, 11748, 25064, 198, 28311, 25, 198, 220, 220, 220, 422, 4423, 346, 1330, 543, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 736, 3742, 13, 1477, 22602, 62, 4758, 1330, 543, 198, 198, 11748, 4808, 14761, 5577...
2.883721
1,032
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: lte/protos/ha_orc8r.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from go...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 300, 660, 14, 11235, 418, 14, 3099, 62, 24449, 23, 81, 13, 1676, 1462, ...
2.422393
3,376
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # 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 applicab...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 33160, 383, 3012, 4992, 46665, 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, ...
3.420502
478
from pkg.creator._creator import Creator from pkg.creator.app_plan._app_plan import FunctionPlanCreator from pkg.creator.az_resources._az_resources import AzureResourceCreator from pkg.creator.function_app._function_app import FunctionAppCreator from pkg.creator.local_function._local_function import LocalFunctionAppCre...
[ 6738, 279, 10025, 13, 45382, 13557, 45382, 1330, 21038, 198, 6738, 279, 10025, 13, 45382, 13, 1324, 62, 11578, 13557, 1324, 62, 11578, 1330, 15553, 20854, 16719, 273, 198, 6738, 279, 10025, 13, 45382, 13, 1031, 62, 37540, 13557, 1031, 6...
3.75625
160
"""Template tags to make e-mail styling less painful""" import cssutils from django import template from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.contrib.staticfiles import finders from django.utils.safestring import mark_safe register = template.Library() _styl...
[ 37811, 30800, 15940, 284, 787, 304, 12, 4529, 35517, 1342, 12132, 37811, 198, 11748, 269, 824, 26791, 198, 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755...
3.670103
97
# -*- coding: utf-8 -*- import os os.environ["MKL_NUM_THREADS"] = "1" os.environ["NUMEXPR_NUM_THREADS"] = "1" os.environ["OMP_NUM_THREADS"] = "1" from os import path, listdir import numpy as np np.random.seed(1) import random random.seed(1) import pandas as pd import timeit import cv2 from tqdm import tqdm import sy...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 418, 13, 268, 2268, 14692, 33907, 43, 62, 41359, 62, 4221, 15675, 50, 8973, 796, 366, 16, 1, 220, 198, 418, 13, 268, 2268, 14692, 41359, 6369, 4805,...
2.192681
2,678
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor import json import random import re from ..compat import ( compat_parse_qs, compat_str, ) from ..utils import ( js_to_json, strip_jsonp, urlencode_postdata, )
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 764, 11321, 1330, 14151, 11627, 40450, 198, 198, 11748, 33918, 198, 11748, 4738, 198, 11748, 302, 198, 198, 6738, 11485, ...
2.609524
105
import os import sublime from .. import settings
[ 11748, 28686, 198, 11748, 41674, 198, 198, 6738, 11485, 1330, 6460, 628, 628, 628, 628, 628 ]
3.6875
16
#!/usr/bin/env pytho ''' This script parses cisco.txt file and searches for 'crypto map CRYPTO' lines using CCP module. Then it displays childrens indented multiple times for each element of crypto_map variable (list). ''' import pprint from ciscoconfparse import CiscoConfParse fo = open('cisco.txt', 'r') # Openin...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 279, 5272, 78, 198, 7061, 6, 198, 1212, 4226, 13544, 274, 269, 4861, 13, 14116, 2393, 290, 15455, 329, 705, 29609, 78, 3975, 8740, 48232, 10468, 6, 3951, 1262, 37963, 8265, 13, 198, 6423, 340, 1...
3.320946
296
from pyesg.configuration import validation_configuration as valid_config from pyesg.validation.run import validate_simulations from pyesg.configuration.pyesg_configuration import * config = PyESGConfiguration() config.number_of_projection_steps = 30 config.number_of_batches = 1 config.number_of_simulations = 100000 co...
[ 6738, 279, 8505, 70, 13, 11250, 3924, 1330, 21201, 62, 11250, 3924, 355, 4938, 62, 11250, 198, 6738, 279, 8505, 70, 13, 12102, 341, 13, 5143, 1330, 26571, 62, 14323, 5768, 198, 6738, 279, 8505, 70, 13, 11250, 3924, 13, 79, 8505, 70,...
2.035491
2,564
from openrec.recommenders import BPR from openrec.modules.extractions import LatentFactor, MultiLayerFC import tensorflow as tf
[ 6738, 1280, 8344, 13, 47335, 7338, 1330, 347, 4805, 198, 6738, 1280, 8344, 13, 18170, 13, 2302, 37810, 1330, 5476, 298, 41384, 11, 15237, 49925, 4851, 198, 11748, 11192, 273, 11125, 355, 48700, 198 ]
3.764706
34
#!/usr/bin/env python import os import re import sys import glob import subprocess from ctypes import c_int from multiprocessing import Process, Lock, Value, BoundedSemaphore, cpu_count #--------------------------------------------------------------------- # Extract scenarios from the specified test #-------------...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 15095, 198, 11748, 850, 14681, 198, 6738, 269, 19199, 1330, 269, 62, 600, 198, 6738, 18540, 305, 919, 278, 1330, 10854,...
2.946067
890
import venv import sys import pathlib import platform from configparser import ConfigParser CONFIG_PATH: pathlib.Path = pathlib.Path(__file__).parent.parent.parent / "setup.cfg" PLATFORM = platform.system() def load_cfg() -> ConfigParser: """ loads library config file :return: loaded `ConfigParser` obje...
[ 11748, 8710, 85, 198, 11748, 25064, 198, 11748, 3108, 8019, 198, 11748, 3859, 198, 198, 6738, 4566, 48610, 1330, 17056, 46677, 198, 198, 10943, 16254, 62, 34219, 25, 3108, 8019, 13, 15235, 796, 3108, 8019, 13, 15235, 7, 834, 7753, 834, ...
2.610659
1,107
import os from io import StringIO from pathlib import Path from tests.common import HouseParameters, HouseStyle, RoofMaterial, test_data_dir from ext_argparse import process_arguments, save_defaults, dump, add_comments_from_help, process_settings_file
[ 11748, 28686, 198, 6738, 33245, 1330, 10903, 9399, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 5254, 13, 11321, 1330, 2097, 48944, 11, 2097, 21466, 11, 35271, 17518, 11, 1332, 62, 7890, 62, 15908, 198, 198, 6738, 1070, 62, 853, ...
3.611111
72
############################################################################# _LCG_X = None # # ############################################################################# _MIN_SP...
[ 29113, 29113, 7804, 4242, 2, 198, 62, 5639, 38, 62, 55, 796, 6045, 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, ...
2.608392
286
#!/usr/bin/env python #coding=utf8 ''' Created on 2016/9/19 @author: cloudy ''' from django.conf.urls import url from . import views urlpatterns = [ #绩效首页 url(r'^index/$',views.index,name='index'), #绩效趋势post 请求url url(r'^echart/$',views.echart,name='echart'), #绩效设置 url(r'^setting/$',views.set...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 66, 7656, 28, 40477, 23, 198, 7061, 6, 198, 41972, 319, 1584, 14, 24, 14, 1129, 198, 198, 31, 9800, 25, 40026, 198, 7061, 6, 198, 6738, 220, 42625, 14208, 13, 10414, 13, 6371, ...
1.733463
514
import sys import cv2 import numpy as np import traceback import darknet.python.darknet as dn from os.path import splitext, basename from glob import glob from darknet.python.darknet import detect from src.label import dknet_label_conversion from src.utils im...
[ 11748, 25064, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12854, 1891, 198, 198, 11748, 3223, 3262, 13, 29412, 13, 21953, 3262, 355, 288, 77, 198, 198, 6738, 28686, 13, 6978, 220, 220, 220, 220, 220, 220, ...
1.822069
1,450
from typing import List from pypadre.core.validation.validation import ValidateableFactory from pypadre.pod.app.base_app import BaseChildApp from pypadre.pod.repository.i_repository import ICodeRepository from pypadre.pod.service.code_service import CodeService
[ 6738, 19720, 1330, 7343, 198, 198, 6738, 279, 4464, 324, 260, 13, 7295, 13, 12102, 341, 13, 12102, 341, 1330, 3254, 20540, 540, 22810, 198, 6738, 279, 4464, 324, 260, 13, 33320, 13, 1324, 13, 8692, 62, 1324, 1330, 7308, 16424, 4677, ...
3.180723
83
import base64 from direct.directnotify.DirectNotifyGlobal import directNotify import json import time from Crypto.Cipher import AES UNKNOWN = 700 USER = 100 COMMUNITY_MANAGER = 200 MODERATOR = 300 ARTIST = 400 PROGRAMMER = 500 ADMINISTRATOR = 600 SYSTEM_ADMINISTRATOR = 700 rpcmethod = RPCMethod
[ 11748, 2779, 2414, 198, 6738, 1277, 13, 12942, 1662, 1958, 13, 13470, 3673, 1958, 22289, 1330, 1277, 3673, 1958, 198, 11748, 33918, 198, 11748, 640, 198, 198, 6738, 36579, 13, 34, 10803, 1330, 34329, 628, 198, 4944, 44706, 796, 13037, 1...
2.970588
102
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright CNRS 2012 # Roman Yurchak (LULI) # This software is governed by the CeCILL-B license under French law and # abiding by the rules of distribution of free software. import numpy as np from scipy.constants import N_A def ionmix_validity(rho, temp, Zbar, Abar): ""...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 31171, 6998, 2321, 198, 2, 7993, 575, 2575, 461, 357, 43, 6239, 40, 8, 198, 2, 770, 3788, 318, 21825, 416, 262, ...
2.495845
361
""" trial is a way of creating a project features: - copies the source of the file you're using to run it (to have a copy of the file) (WARNING: there can be a race condition if the file changes before the trial code is run - the earlier you import du, the less likely this is to occur, due to the cache_inspe...
[ 37811, 198, 45994, 318, 257, 835, 286, 4441, 257, 1628, 198, 198, 40890, 25, 198, 12, 9088, 262, 2723, 286, 262, 2393, 345, 821, 1262, 284, 1057, 340, 198, 220, 357, 1462, 423, 257, 4866, 286, 262, 2393, 8, 198, 220, 357, 31502, 2...
2.322706
4,893
import envexamples # modifies path from raytracing import * """ The Lagrange invariant is a constant defining the collection efficiency of an optical system. The Lagrange invariant is calculated using the principal and axial rays, whether the optical invariant is calculated with another combination of rays. This cod...
[ 11748, 551, 303, 87, 12629, 220, 1303, 953, 6945, 3108, 198, 6738, 26842, 2213, 4092, 1330, 1635, 198, 198, 37811, 198, 464, 21003, 9521, 25275, 415, 318, 257, 6937, 16215, 262, 4947, 9332, 286, 281, 18480, 1080, 13, 383, 21003, 9521, ...
3.448529
272
from .methods import Bisection, Newton, Secant from .function_examples import f_root if __name__ == '__main__': # change the method and function as desired v = Newton(**f_root).solve(**f_root) print(v)
[ 6738, 764, 24396, 82, 1330, 38045, 3213, 11, 17321, 11, 1882, 415, 198, 6738, 764, 8818, 62, 1069, 12629, 1330, 277, 62, 15763, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1303, 1487, 262, ...
2.828947
76
from .driver import DriverMixin as DriverMixin from .process import ProcessMixin as ProcessMixin from .call_api import CallApiMixin as CallApiMixin from .dependent import DependentMixin as DependentMixin
[ 6738, 764, 26230, 1330, 12434, 35608, 259, 355, 12434, 35608, 259, 198, 6738, 764, 14681, 1330, 10854, 35608, 259, 355, 10854, 35608, 259, 198, 6738, 764, 13345, 62, 15042, 1330, 4889, 32, 14415, 35608, 259, 355, 4889, 32, 14415, 35608, ...
3.642857
56
import mock import ddt import six from openstackinabox.tests.base import TestBase from openstackinabox.models.keystone import exceptions from openstackinabox.models.keystone.model import ( schema, KeystoneModel ) @ddt.ddt @ddt.ddt
[ 11748, 15290, 198, 198, 11748, 288, 28664, 198, 11748, 2237, 198, 198, 6738, 1280, 25558, 259, 397, 1140, 13, 41989, 13, 8692, 1330, 6208, 14881, 198, 198, 6738, 1280, 25558, 259, 397, 1140, 13, 27530, 13, 2539, 6440, 1330, 13269, 198, ...
2.827586
87
# -*- coding: utf-8 -*- # Scrapy settings for GubaCrawler project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://docs.scrapy.org/en/latest/topics/settings.html # https://docs.scrapy.org/en/latest...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 1446, 2416, 88, 6460, 329, 402, 22013, 34, 39464, 1628, 198, 2, 198, 2, 1114, 21654, 11, 428, 2393, 4909, 691, 6460, 3177, 1593, 393, 198, 2, 8811, 973, 13, ...
2.733071
1,270
# 기록장 (progress) import pickle from datetime import * import os.path # 작성함수 # 파일이 존재하는가? print("-- Progress --") clock = datetime.now() line = 0 file = "File/progress_{}.md".format(clock.day) # 파일명 초기화 texts = '' while True: line += 1 text = input("%d: "%line) if text == "q": # 저장 후 종료 Save(texts, f...
[ 2, 220, 166, 116, 108, 167, 94, 251, 168, 252, 98, 357, 33723, 8, 198, 11748, 2298, 293, 198, 6738, 4818, 8079, 1330, 1635, 198, 11748, 28686, 13, 6978, 198, 2, 23821, 252, 239, 168, 226, 109, 47991, 101, 168, 230, 246, 198, 2, ...
1.476048
668
from typing import List from project.medicine.medicine import Medicine from project.supply.supply import Supply from project.survivor import Survivor
[ 6738, 19720, 1330, 7343, 198, 198, 6738, 1628, 13, 1150, 291, 500, 13, 1150, 291, 500, 1330, 11558, 198, 6738, 1628, 13, 18608, 306, 13, 18608, 306, 1330, 22663, 198, 6738, 1628, 13, 48846, 452, 273, 1330, 23740, 628 ]
3.897436
39
if __name__ == '__main__': main()
[ 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419 ]
2.157895
19
'''Author: Brandon Trabucco, Copyright 2019 Helper functions to display and run a simple game''' from game_engine.colors import * from game_engine.drawable import Drawable from game_engine.entity import Entity from game_engine.interactables import * #################################### # lets make some game tiles t...
[ 7061, 6, 13838, 25, 14328, 833, 397, 18863, 78, 11, 15069, 13130, 198, 47429, 5499, 284, 3359, 290, 1057, 257, 2829, 983, 7061, 6, 628, 198, 6738, 983, 62, 18392, 13, 4033, 669, 1330, 1635, 198, 6738, 983, 62, 18392, 13, 19334, 540,...
3.796117
103
"""This module comprises PatchCore Sampling Methods for the embedding. - k Center Greedy Method Returns points that minimizes the maximum distance of any point to a center. . https://arxiv.org/abs/1708.00489 """ from typing import List, Optional import torch import torch.nn.functional as F from torch import ...
[ 37811, 1212, 8265, 28800, 17106, 14055, 3409, 11347, 25458, 329, 262, 11525, 12083, 13, 198, 198, 12, 479, 3337, 11955, 4716, 11789, 198, 220, 220, 220, 16409, 2173, 326, 10356, 4340, 262, 5415, 5253, 286, 597, 966, 284, 257, 3641, 13, ...
2.321614
1,735
# -*- coding: utf-8 -*- ## File = 'myTime.py" # # A python script to return the time and # date from the computer when called. # Written by Merrill Jenkins 2014Dec17 # Department of Physics # University of South Alabama # Mobile, AL 36688 # U...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2235, 9220, 796, 705, 1820, 7575, 13, 9078, 1, 198, 2, 198, 2, 220, 220, 220, 220, 220, 317, 21015, 4226, 284, 1441, 262, 640, 290, 220, 198, 2, 220, 220, 220, 220...
2.43379
1,752
#!/usr/bin/python import execnet, execnet.gateway, execnet.multi execnet.multi.Group.makeportgateway = makeportgateway execnet.makeportgateway = execnet.multi.default_group.makeportgateway # originally posted as http://code.activestate.com/recipes/577545-monkey-patch-execnet-with-more-ssh-settings-port-i/
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 2452, 3262, 11, 2452, 3262, 13, 10494, 1014, 11, 2452, 3262, 13, 41684, 198, 18558, 3262, 13, 41684, 13, 13247, 13, 15883, 634, 10494, 1014, 796, 787, 634, 10494, 1014, 198, 18558, 326...
2.990291
103
src_lang = ["ja_JP","ja"] import os from langs import langs, same cd=os.path.join(os.getcwd(),"language") #cd = "/home/maruo/ドキュメント/program/Marutools/language" import babel, googletrans, json, os, sys os.chdir(cd) if input(f'The lang file will be save at "{cd}". Is it OK? [y/n]')!="y": exit() translator=googletrans.Tr...
[ 10677, 62, 17204, 796, 14631, 6592, 62, 12889, 2430, 6592, 8973, 198, 11748, 28686, 198, 6738, 300, 27725, 1330, 300, 27725, 11, 976, 198, 10210, 28, 418, 13, 6978, 13, 22179, 7, 418, 13, 1136, 66, 16993, 3419, 553, 16129, 4943, 198, ...
2.303502
257
import numpy as np import pandas as pd import matplotlib.pyplot as plt import os from matplotlib.cbook import get_sample_data import matplotlib.patches as mpatches def add_legends_val_fuel(figure, save): ''' This function adds legends to the assembly model validation problem mesh. Parameters: -------...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 28686, 198, 6738, 2603, 29487, 8019, 13, 66, 2070, 1330, 651, 62, 39873, 62, 7890, 198, 117...
2.187169
1,699
# proxy module from __future__ import absolute_import from tvtk.indenter import *
[ 2, 15741, 8265, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 31557, 30488, 13, 521, 9255, 1330, 1635, 198 ]
3.727273
22
import combination_builder as Combine # 1. Set Values and Initialize a Combinations Object map_filepath = "Example_Files\\ExamplePlatemap.txt" concentration_file = "Example_Files\\Example_Final_Concs.csv" save_filepath = "Example_Files\\ExampleOutput3.csv" cmt_filepath = "Example_Files\\ExampleOutput4.cmt" backfill_...
[ 11748, 6087, 62, 38272, 355, 29176, 628, 198, 2, 352, 13, 5345, 27068, 290, 20768, 1096, 257, 14336, 7352, 9515, 198, 8899, 62, 7753, 6978, 796, 366, 16281, 62, 25876, 6852, 16281, 3646, 23900, 499, 13, 14116, 1, 198, 1102, 1087, 1358...
2.983275
1,136
from .feature import assert_feature_mapping, Feature __all__ = [ 'Backness', 'BacknessCategory', ] class Backness(Feature): """ https://en.wikipedia.org/wiki/International_Phonetic_Alphabet#Vowels """ FRONT = 'front' NEAR_FRONT = 'near-front' CENTRAL = 'central' NEAR_BACK = 'nea...
[ 6738, 764, 30053, 1330, 6818, 62, 30053, 62, 76, 5912, 11, 27018, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 7282, 1108, 3256, 198, 220, 220, 220, 705, 7282, 1108, 27313, 3256, 198, 60, 628, 198, 198, 4871, 5157, ...
2.486792
265
# coding: utf-8 import sys import os from datetime import datetime import time from mylibs import my_fileList from mylibs import my_csv if __name__ == "__main__": main()
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 640, 198, 6738, 616, 8019, 82, 1330, 616, 62, 7753, 8053, 198, 6738, 616, 8019, 82, 1330, 616, 62, 40664...
2.854839
62
from tdlogging.tdlogger import TDLogger from tdlogging.tdprinter import TDPrinter, BoxPrinter, OneLinerPrinter, CoolPrinter logger = TDLogger(alias="My Custom Logger", printer=CoolPrinter()).config()
[ 6738, 41560, 6404, 2667, 13, 8671, 6404, 1362, 1330, 13320, 11187, 1362, 198, 6738, 41560, 6404, 2667, 13, 8671, 1050, 3849, 1330, 309, 6322, 81, 3849, 11, 8315, 6836, 3849, 11, 1881, 43, 7274, 6836, 3849, 11, 15226, 6836, 3849, 198, ...
3.029851
67
""" subscribe.py Subscribe to TACC apis """ import getpass import requests from .exceptions import AgaveClientError from ..utils import handle_bad_response_status_code def clients_subscribe(username, client_...
[ 37811, 198, 220, 220, 220, 12383, 13, 9078, 198, 198, 27125, 284, 309, 26861, 2471, 271, 198, 37811, 198, 11748, 651, 6603, 198, 11748, 7007, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.26306
536
import argparse import os import tensorflow as tf import numpy as np from avatar.util.LoadRelgan import LoadRelgan from avatar.util.MHGAN import MHGAN from avatar.util.util import writeToFile, readTraces from conf.settings import DATA_PATH WORK_PATH = os.path.abspath(os.getcwd()) if __name__ == "__main__": np.ra...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 30919, 13, 22602, 13, 8912, 6892, 1030, 1330, 8778, 6892, 1030, 198, 6738, 30919, 13, 22602, 13, 36208, ...
2.166595
2,329
# bca4abm # See full license in LICENSE.txt. import logging import os import pandas as pd from activitysim.core import config from activitysim.core import inject from activitysim.core import tracing from activitysim.core import assign from bca4abm import bca4abm as bca from ...util.misc import add_result_columns, a...
[ 2, 275, 6888, 19, 397, 76, 198, 2, 4091, 1336, 5964, 287, 38559, 24290, 13, 14116, 13, 198, 198, 11748, 18931, 198, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 3842, 14323, 13, 7295, 1330, 4566, 198, 673...
2.192469
956
from .helper import helper
[ 6738, 764, 2978, 525, 1330, 31904, 198 ]
3.857143
7
import re import nltk import spacy import unicodedata import requests from spacy_syllables import SpacySyllables from bs4 import BeautifulSoup from nltk import TweetTokenizer from spacy.lang.es import Spanish from spacy.lang.en import English from nltk.util import ngrams if __name__ == '__main__': tp_es = TextPr...
[ 11748, 302, 198, 11748, 299, 2528, 74, 198, 11748, 599, 1590, 198, 11748, 28000, 9043, 1045, 198, 11748, 7007, 198, 6738, 599, 1590, 62, 1837, 297, 2977, 1330, 1338, 1590, 13940, 297, 2977, 198, 6738, 275, 82, 19, 1330, 23762, 50, 104...
2.523364
321
""" Revision ID: 0208_fix_unique_index Revises: 0207_set_callback_history_type Create Date: 2018-07-25 13:55:24.941794 """ from alembic import op revision = '84c3b6eb16b3' down_revision = '0207_set_callback_history_type'
[ 37811, 198, 198, 18009, 1166, 4522, 25, 657, 21315, 62, 13049, 62, 34642, 62, 9630, 198, 18009, 2696, 25, 657, 22745, 62, 2617, 62, 47423, 62, 23569, 62, 4906, 198, 16447, 7536, 25, 2864, 12, 2998, 12, 1495, 1511, 25, 2816, 25, 1731...
2.430108
93
while True: try: n = int(input()) except EOFError: break lim = int(n // 2) for i in range(1, n+1, 2): print(' ' * lim, end='') lim -= 1 print('*' * i) print((int(n // 2) * ' ') + '*') print((int(n // 2) - 1) * ' ' + '***') print()
[ 4514, 6407, 25, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 493, 7, 15414, 28955, 198, 220, 220, 220, 2845, 412, 19238, 12331, 25, 2270, 198, 220, 220, 220, 1761, 796, 493, 7, 77, 3373, 362, 8...
1.877419
155
import sys, os, time from selenium import webdriver from selenium.webdriver.chrome.options import * from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from selenium.webdriver.common.action_chains import ActionChains import time from pynput import keyboard as kb fro...
[ 201, 198, 11748, 25064, 11, 28686, 11, 640, 201, 198, 201, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 201, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 46659, 13, 25811, 1330, 1635, 201, 198, 6738, 384, 11925, 1505, 13, 123...
2.61753
251
from six import add_metaclass from abc import ABCMeta from abc import abstractmethod import numpy import math @add_metaclass(ABCMeta)
[ 6738, 2237, 1330, 751, 62, 4164, 330, 31172, 198, 6738, 450, 66, 1330, 9738, 48526, 198, 6738, 450, 66, 1330, 12531, 24396, 198, 198, 11748, 299, 32152, 198, 11748, 10688, 628, 198, 31, 2860, 62, 4164, 330, 31172, 7, 24694, 48526, 8, ...
3.186047
43
import re ABCD = 'abcd' copy_regex = r'cpy (\S+) (\S+)' inc_regex = r'inc ([abcd])' dec_regex = r'dec ([abcd])' jump_regex = r'jnz (\S+) (-?\d+)'
[ 11748, 302, 198, 198, 24694, 35, 796, 705, 397, 10210, 6, 198, 30073, 62, 260, 25636, 796, 374, 6, 66, 9078, 357, 59, 50, 28988, 357, 59, 50, 28988, 6, 198, 1939, 62, 260, 25636, 796, 374, 6, 1939, 29565, 397, 10210, 12962, 6, 1...
1.873418
79
from flask import ( render_template, jsonify, Blueprint, redirect, url_for, flash, request, session, send_file, send_from_directory, current_app as app, ) from flask_socketio import leave_room, join_room from flask_login import login_required, current_user, logout_user, login...
[ 6738, 42903, 1330, 357, 198, 220, 220, 220, 8543, 62, 28243, 11, 198, 220, 220, 220, 33918, 1958, 11, 198, 220, 220, 220, 39932, 11, 198, 220, 220, 220, 18941, 11, 198, 220, 220, 220, 19016, 62, 1640, 11, 198, 220, 220, 220, 7644,...
2.869565
368
# XXX: Don't put a newline here, or it will add an extra line with # isympy --help # | # v """Python shell for SymPy. This is just a normal Python shell (IPython shell if you have the IPython package installed), that executes the following commands for the user: >>> from __future__ import division >>> from ...
[ 2, 27713, 25, 2094, 470, 1234, 257, 649, 1370, 994, 11, 393, 340, 481, 751, 281, 3131, 1627, 351, 198, 2, 318, 88, 3149, 88, 1377, 16794, 198, 2, 220, 930, 198, 2, 220, 410, 198, 37811, 37906, 7582, 329, 15845, 20519, 13, 198, 1...
3.20806
1,985
"""The zulu library.""" __version__ = "2.0.0" from .api import create, now, parse, parse_delta, range, span_range from .delta import Delta, to_seconds from .parser import ISO8601, TIMESTAMP, ParseError from .timer import Timer from .zulu import Zulu
[ 37811, 464, 1976, 15712, 5888, 526, 15931, 198, 198, 834, 9641, 834, 796, 366, 17, 13, 15, 13, 15, 1, 198, 198, 6738, 764, 15042, 1330, 2251, 11, 783, 11, 21136, 11, 21136, 62, 67, 12514, 11, 2837, 11, 11506, 62, 9521, 198, 6738, ...
2.964706
85
import torch as tc from drl.agents.architectures.stateless.dueling import DuelingArchitecture from drl.utils.initializers import get_initializer
[ 11748, 28034, 355, 37096, 198, 198, 6738, 1553, 75, 13, 49638, 13, 998, 5712, 942, 13, 5219, 1203, 13, 646, 10809, 1330, 23958, 278, 19895, 5712, 495, 198, 6738, 1553, 75, 13, 26791, 13, 36733, 11341, 1330, 651, 62, 36733, 7509, 628 ]
3.5
42
from googleapiclient import discovery import json import os from dotenv import load_dotenv import time load_dotenv() # # # Testing connection # def implicit(): # from google.cloud import storage # # If you don't specify credentials when constructing the client, the # # client library will look for credent...
[ 6738, 23645, 499, 291, 75, 1153, 1330, 9412, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 11748, 640, 198, 2220, 62, 26518, 24330, 3419, 198, 198, 2, 1303, 1303, 23983, 4637, 198, 2, ...
3.064103
390
"""Base ABC Client.""" import abc import asyncio import base64 import json import logging import os import typing import urllib.parse import aiohttp.typedefs import yarl from genshin import constants, errors, types, utility from genshin.client import cache as client_cache from genshin.client import manager, routes fr...
[ 37811, 14881, 9738, 20985, 526, 15931, 198, 11748, 450, 66, 198, 11748, 30351, 952, 198, 11748, 2779, 2414, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 19720, 198, 11748, 2956, 297, 571, 13, 29572, 198, 198, 11748...
2.253656
5,744
from kotoba_player_py.exceptions import InputFormatError import pytest from kotoba_player_py import ( __version__, KotobaPlayer, InputFormatError ) from kotoba_player_py.api import ( mask_noun_word ) @pytest.fixture
[ 6738, 479, 313, 19981, 62, 7829, 62, 9078, 13, 1069, 11755, 1330, 23412, 26227, 12331, 198, 11748, 12972, 9288, 198, 198, 6738, 479, 313, 19981, 62, 7829, 62, 9078, 1330, 357, 198, 220, 220, 220, 11593, 9641, 834, 11, 21702, 19981, 14...
2.777778
81
#!/usr/bin/env python """ This example mirrors the 8-direction movement example here: https://github.com/Mekire/meks-pygame-samples/blob/master/eight_dir_move.py The difference is that this example uses delta time. Delta time is a method of assuring that updates are unaffected by changes in framerate. """ import os ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 1212, 1672, 22353, 262, 807, 12, 37295, 3356, 1672, 994, 25, 198, 5450, 1378, 12567, 13, 785, 14, 44, 988, 557, 14, 1326, 591, 12, 9078, 6057, 12, 82, 12629, 14, 2436, ...
2.2638
1,884
from box import Box from popper.translators.translator_task import TaskTranslator from .test_common import PopperTest
[ 6738, 3091, 1330, 8315, 198, 198, 6738, 745, 2848, 13, 7645, 75, 2024, 13, 7645, 41880, 62, 35943, 1330, 15941, 8291, 41880, 198, 6738, 764, 9288, 62, 11321, 1330, 7695, 2848, 14402, 628 ]
3.636364
33
print( if __name == "man: BANANA
[ 4798, 7, 198, 198, 361, 11593, 3672, 6624, 366, 805, 25, 198, 33, 1565, 31574, 198 ]
2.125
16
# -*- coding: utf-8 -*- """ Module projectparallelprogrammeren.montecarlo_v0 ================================================================= simulatie v0: alles in Python (op genereren van de getallen na) """ import math import numpy as np from statistics import stdev import projectparallelprogrammeren from proje...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 26796, 1628, 1845, 29363, 23065, 76, 14226, 13, 2144, 660, 7718, 5439, 62, 85, 15, 220, 198, 23926, 28, 198, 198, 14323, 377, 265, 494, 410, 15, 25, ...
2.511111
720
# coding=utf8 import unittest import string import random import shlex from qiniuManager.run import * if __name__ == '__main__': unittest.main(verbosity=2)
[ 2, 19617, 28, 40477, 23, 198, 11748, 555, 715, 395, 198, 11748, 4731, 198, 11748, 4738, 198, 11748, 427, 2588, 198, 198, 6738, 10662, 5362, 84, 13511, 13, 5143, 1330, 1635, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, ...
2.733333
60
# scanner init from .hashFile import ImageHash from .hashFile import phash from .hashFile import hashFile from .hashFile import getHashDict from .hashFile import getMd5Hash
[ 2, 27474, 2315, 198, 198, 6738, 764, 17831, 8979, 1330, 7412, 26257, 198, 6738, 764, 17831, 8979, 1330, 872, 1077, 198, 6738, 764, 17831, 8979, 1330, 12234, 8979, 198, 6738, 764, 17831, 8979, 1330, 651, 26257, 35, 713, 198, 6738, 764, ...
3.530612
49
""" 71 medium simplify path """ path1 = "/home/" path2 = "/../" path3 = "/home//foo/" path4 = "/a/./b/../../c/" path5 = "/../" path6 = "/..." path7 = "/a//b////c/d//././/.." sol = Solution() print(sol.simplifyPath(path7))
[ 37811, 198, 4869, 198, 24132, 198, 14323, 489, 1958, 3108, 198, 198, 37811, 628, 198, 198, 6978, 16, 796, 12813, 11195, 30487, 198, 6978, 17, 796, 12813, 492, 30487, 198, 6978, 18, 796, 12813, 11195, 1003, 21943, 30487, 198, 6978, 19, ...
2.223301
103
from test.integration.base import DBTIntegrationTest, use_profile
[ 6738, 1332, 13, 18908, 1358, 13, 8692, 1330, 360, 19313, 34500, 1358, 14402, 11, 779, 62, 13317, 628 ]
3.722222
18
"""Test Authentication and Authorization Service.""" import datetime import re from arrow import utcnow from flask import current_app import pytest # noqa: F401 from jadetree.domain.models import User from jadetree.exc import AuthError, DomainError, JwtPayloadError, NoResults from jadetree.mail import mail from jad...
[ 37811, 14402, 48191, 290, 35263, 4809, 526, 15931, 198, 198, 11748, 4818, 8079, 198, 11748, 302, 198, 198, 6738, 15452, 1330, 3384, 66, 2197, 198, 6738, 42903, 1330, 1459, 62, 1324, 198, 11748, 12972, 9288, 220, 1303, 645, 20402, 25, 37...
2.515284
9,847
# -*- coding: utf-8 -*- if __name__ == '__main__': main()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 220, 220, 220, 1388, 3419, 201, 198 ]
1.775
40
from django.contrib import admin from teams.models import Team admin.site.register(Team, TeamAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 3466, 13, 27530, 1330, 4816, 628, 198, 28482, 13, 15654, 13, 30238, 7, 15592, 11, 4816, 46787, 8, 198 ]
3.517241
29
import helpers.ipc as ipc import numpy as np from enum import Enum address = ('localhost', 6000) router = ipc.Router(address, authkey=b'test') @router.expose @router.expose @router.expose router.serve()
[ 11748, 49385, 13, 541, 66, 355, 20966, 66, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 33829, 1330, 2039, 388, 628, 198, 198, 21975, 796, 19203, 36750, 3256, 39064, 8, 198, 472, 353, 796, 20966, 66, 13, 49, 39605, 7, 21975, 11, 6...
2.609756
82
import random def get_min_max(ints): """ Return a tuple(min, max) out of list of unsorted integers. Args: ints(list): list of integers containing one or more integers """ if len(ints) == 0: return None, None min_v, max_v = ints[0], ints[0] for num in ints[1:]: # ...
[ 11748, 4738, 628, 198, 4299, 651, 62, 1084, 62, 9806, 7, 29503, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 8229, 257, 46545, 7, 1084, 11, 3509, 8, 503, 286, 1351, 286, 5576, 9741, 37014, 13, 628, 220, 220, 220, 943, 1454...
2.384731
668
#Codeing-Utf8
[ 2, 10669, 278, 12, 18274, 69, 23, 198 ]
1.75
8
from rest_framework import filters import django_filters from core.models import ApplicationVersion as ImageVersion from api.v2.views.base import AuthOptionalViewSet from api.v2.serializers.details import ImageVersionSerializer class ImageVersionViewSet(AuthOptionalViewSet): """ API endpoint that allows in...
[ 6738, 1334, 62, 30604, 1330, 16628, 198, 11748, 42625, 14208, 62, 10379, 1010, 198, 198, 6738, 4755, 13, 27530, 1330, 15678, 14815, 355, 7412, 14815, 198, 6738, 40391, 13, 85, 17, 13, 33571, 13, 8692, 1330, 26828, 30719, 7680, 7248, 198...
3.404762
210
import RPi.GPIO as GPIO class Keymap: """BCM keymap for joystick buttons""" UP = 6 DOWN = 19 LEFT = 5 RIGHT = 26 PRESS = 13
[ 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 628, 198, 4871, 7383, 8899, 25, 198, 220, 220, 220, 37227, 2749, 44, 1994, 8899, 329, 49485, 12163, 37811, 198, 220, 220, 220, 15958, 796, 718, 198, 220, 220, 220, 30320, 796, 678, 198, ...
2.359375
64
from django.http import JsonResponse from lms.models import User from rest_framework import status import jwt from app.settings import SECRET_KEY from datetime import datetime, timedelta import os import sys import json import re from django.core.exceptions import ValidationError from pprint import pprint from django.d...
[ 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 198, 6738, 300, 907, 13, 27530, 1330, 11787, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 11748, 474, 46569, 198, 6738, 598, 13, 33692, 1330, 10729, 26087, 62, 20373, 198, 6738, 4818...
3.620968
124
# Copyright (c) 2010 - 2020, Nordic Semiconductor ASA # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list o...
[ 2, 15069, 357, 66, 8, 3050, 532, 12131, 11, 35834, 311, 5314, 40990, 49599, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, ...
2.993412
759
from ms_deisotope._c.spectrum_graph import ( PathFinder, MassWrapper, PeakGroupNode, PeakNode, NodeBase, Path, SpectrumGraph) amino_acids = [ MassWrapper('G', 57.02146372057), MassWrapper('A', 71.03711378471), MassWrapper('S', 87.03202840427), MassWrapper('P', 97.05276384884...
[ 6738, 13845, 62, 2934, 271, 313, 3008, 13557, 66, 13, 4443, 6582, 62, 34960, 1330, 357, 198, 220, 220, 220, 10644, 37, 5540, 11, 198, 220, 220, 220, 5674, 36918, 2848, 11, 198, 220, 220, 220, 23974, 13247, 19667, 11, 198, 220, 220, ...
2.174641
418
# # $Id$ # # configuration file for benchmarking platform # # # Copyright (c) 2013, Novartis Institutes for BioMedical Research Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * R...
[ 2, 198, 2, 720, 7390, 3, 198, 2, 198, 2, 8398, 2393, 329, 18335, 278, 3859, 198, 2, 198, 2, 198, 2, 220, 15069, 357, 66, 8, 2211, 11, 5267, 433, 271, 33656, 329, 16024, 37158, 4992, 3457, 13, 198, 2, 220, 1439, 2489, 10395, 13...
2.254103
1,645
import cv2 camera = cv2.VideoCapture(0) camera.set(3, 1280) while True: ret, image = camera.read() cv2.imshow('Webcam', image) if cv2.waitKey(0) & 0xFF == ord('q'): break camera.release() cv2.destroyAllWindows()
[ 11748, 269, 85, 17, 198, 198, 25695, 796, 269, 85, 17, 13, 10798, 49630, 7, 15, 8, 198, 198, 25695, 13, 2617, 7, 18, 11, 37674, 8, 198, 198, 4514, 6407, 25, 198, 220, 220, 220, 1005, 11, 2939, 796, 4676, 13, 961, 3419, 628, 22...
2.203704
108
"""Calculate mean and std of data""" import math from typing import Dict import torch from tqdm import tqdm import ml.utils from ml.experiment import Experiment def calculate_stats(exp: Experiment) -> Dict[str, float]: """Calculate mean and std of data""" avg = ml.utils.RunningAverage() sq_avg = ml.ut...
[ 37811, 9771, 3129, 378, 1612, 290, 14367, 286, 1366, 37811, 198, 198, 11748, 10688, 198, 6738, 19720, 1330, 360, 713, 198, 198, 11748, 28034, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 11748, 25962, 13, 26791, 198, 6738,...
2.235294
408
import os import sys import re if __name__ == "__main__": data = None wdir = os.path.dirname(sys.argv[0]) with open(os.path.join(wdir, "input.txt")) as f: data = f.readlines() passports = 0 pp = {} for d in data: d = d.strip("\n") if not d: if validate(pp): ...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 302, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1366, 796, 6045, 198, 220, 220, 220, 266, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 17597,...
1.916667
300
import datetime from collections import OrderedDict from app import app, db from flask.ext.login import current_user from config import ALLOWED_EXTENSIONS from rauth import OAuth2Service import json import urllib2 from flask import request, redirect, url_for, render_template, g, jsonify, abort, flash from flask.ext.log...
[ 11748, 4818, 8079, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 598, 1330, 598, 11, 20613, 198, 6738, 42903, 13, 2302, 13, 38235, 1330, 1459, 62, 7220, 198, 6738, 4566, 1330, 11096, 3913, 1961, 62, 13918, 16938, 11053, 198, ...
3.702381
168
from .value import _Value, _ValueInstance, _raise_bad_value_error from .helper import Empty
[ 6738, 764, 8367, 1330, 4808, 11395, 11, 4808, 11395, 33384, 11, 4808, 40225, 62, 14774, 62, 8367, 62, 18224, 198, 6738, 764, 2978, 525, 1330, 33523, 628, 198 ]
3.357143
28
import csv import numpy as np if __name__ == '__main__': main() print("End")
[ 11748, 269, 21370, 198, 11748, 299, 32152, 355, 45941, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198, 220, 220, 220, 3601, 7203, 12915, 4943 ]
2.416667
36