content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
"""The auth service module configures the flask app for the OpenBMS auth service. The auth service provides an API for managing and authenticating user accounts. Users may authenticate through a number of supported identity provides using SAML or through a native OpenBMS account using an email address and password. Th...
[ 37811, 464, 6284, 2139, 8265, 4566, 942, 262, 42903, 598, 329, 262, 4946, 33, 5653, 6284, 2139, 13, 198, 198, 464, 6284, 2139, 3769, 281, 7824, 329, 11149, 290, 8323, 12364, 2836, 5504, 13, 18987, 198, 11261, 8323, 5344, 832, 257, 127...
3.041748
1,030
"""============================================================================= Download experimental directory. =============================================================================""" import argparse import os # ------------------------------------------------------------------------------ def mkdir(direc...
[ 37811, 23926, 25609, 28, 198, 10002, 11992, 8619, 13, 198, 23926, 25609, 2625, 15931, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 198, 2, 16529, 26171, 198, 198, 4299, 33480, 15908, 7, 34945, 2599, 198, 220, 220, 220, 37227, 1...
3.633117
308
################################################################################ # User Libs import test_utils import test.unittest as unittest import tablature as tab # Std Libs import os ################################################################################ ################################...
[ 29113, 29113, 14468, 201, 198, 201, 198, 2, 11787, 7980, 82, 201, 198, 11748, 1332, 62, 26791, 201, 198, 11748, 1332, 13, 403, 715, 395, 355, 555, 715, 395, 201, 198, 201, 198, 11748, 36148, 1300, 355, 7400, 201, 198, 201, 198, 2, ...
4.655556
90
import test_yaml import test_new test_yaml.run_tests() test_new.run_tests()
[ 11748, 1332, 62, 88, 43695, 198, 11748, 1332, 62, 3605, 198, 198, 9288, 62, 88, 43695, 13, 5143, 62, 41989, 3419, 198, 9288, 62, 3605, 13, 5143, 62, 41989, 3419, 198 ]
2.483871
31
# Copyright The IETF Trust 2015-2020, All Rights Reserved import itertools from django.db import models class ForeignKey(models.ForeignKey): "A local ForeignKey proxy which provides the on_delete value required under Django 2.0." class OneToOneField(models.OneToOneField): "A local OneToOneField prox...
[ 2, 15069, 383, 314, 22274, 9870, 1853, 12, 42334, 11, 1439, 6923, 33876, 198, 198, 11748, 340, 861, 10141, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 4871, 8708, 9218, 7, 27530, 13, 33616, 9218, 2599, 198, 220, 220,...
2.713864
339
"""Test config utils.""" # pylint: disable=too-many-public-methods,protected-access import os import tempfile import unittest import unittest.mock as mock import pytest from voluptuous import MultipleInvalid from homeassistant.core import DOMAIN, HomeAssistantError, Config import homeassistant.config as config_util f...
[ 37811, 14402, 4566, 3384, 4487, 526, 15931, 198, 2, 279, 2645, 600, 25, 15560, 28, 18820, 12, 21834, 12, 11377, 12, 24396, 82, 11, 24326, 12, 15526, 198, 11748, 28686, 198, 11748, 20218, 7753, 198, 11748, 555, 715, 395, 198, 11748, 55...
2.165768
4,820
############################################################################### # Copyright 2011-2014 The University of Texas at Austin # # # # Licensed under the Apache License, Version 2.0 (the "License"); #...
[ 198, 29113, 29113, 7804, 4242, 21017, 198, 2, 220, 220, 15069, 2813, 12, 4967, 383, 2059, 286, 3936, 379, 9533, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 220,...
3.588291
1,059
from .filter import FilterWidget from .flash import FlashWidget, ShowFlashNotification from .header import HeaderWidget from .help import HelpWidget from .secret_properties import SecretPropertiesWidget from .secret_versions import SecretVersionsWidget from .secrets import SecretsWidget __all__ = ( "SecretsWidget"...
[ 6738, 764, 24455, 1330, 25853, 38300, 198, 6738, 764, 34167, 1330, 9973, 38300, 11, 5438, 30670, 3673, 2649, 198, 6738, 764, 25677, 1330, 48900, 38300, 198, 6738, 764, 16794, 1330, 10478, 38300, 198, 6738, 764, 21078, 62, 48310, 1330, 394...
3.460993
141
main()
[ 201, 198, 201, 198, 201, 198, 12417, 3419, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198 ]
1.125
32
import numpy as np from sklearn.base import clone from sklearn.ensemble import RandomForestRegressor from sklearn.utils.validation import check_is_fitted, check_X_y from pycausal_explorer.base import BaseCausalModel from ..reweight import PropensityScore class XLearner(BaseCausalModel): """ Implementation ...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1341, 35720, 13, 8692, 1330, 17271, 198, 6738, 1341, 35720, 13, 1072, 11306, 1330, 14534, 34605, 8081, 44292, 198, 6738, 1341, 35720, 13, 26791, 13, 12102, 341, 1330, 2198, 62, 271, 62, 386...
3.329966
297
# coding=utf-8 from collections import OrderedDict expected = [ OrderedDict( [ ("id", u"par-1"), ( "source", OrderedDict( [ ("funderId", u"10.13039/100006978"), ( ...
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 40319, 796, 685, 198, 220, 220, 220, 14230, 1068, 35, 713, 7, 198, 220, 220, 220, 220, 220, 220, 220, 685, 198, 220, 220, 220, 220, 220, 220, 2...
1.323837
4,107
from django.contrib import admin from apps.web.models import CodeAnnotation admin.site.register(CodeAnnotation)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 6725, 13, 12384, 13, 27530, 1330, 6127, 2025, 38983, 198, 198, 28482, 13, 15654, 13, 30238, 7, 10669, 2025, 38983, 8, 198 ]
3.454545
33
from PuppeteerLibrary.ikeywords.imockresponse_async import iMockResponseAsync from PuppeteerLibrary.base.robotlibcore import keyword from PuppeteerLibrary.base.librarycomponent import LibraryComponent
[ 6738, 20926, 14471, 263, 23377, 13, 522, 88, 10879, 13, 320, 735, 26209, 62, 292, 13361, 1330, 1312, 44, 735, 31077, 42367, 198, 6738, 20926, 14471, 263, 23377, 13, 8692, 13, 305, 13645, 8019, 7295, 1330, 21179, 198, 6738, 20926, 14471,...
3.884615
52
__all__ = ['DataParallel', 'ModelParallel', 'benchmarks', 'dataparallel', 'modelparallel'] from .DataParallel import DataParallel from .ModelParallel import ModelParallel import splintr.benchmarks import splintr.dataparallel import splintr.modelparallel
[ 834, 439, 834, 796, 37250, 6601, 10044, 29363, 3256, 705, 17633, 10044, 29363, 3256, 705, 26968, 14306, 3256, 705, 19608, 499, 283, 29363, 3256, 705, 19849, 1845, 29363, 20520, 198, 6738, 764, 6601, 10044, 29363, 1330, 6060, 10044, 29363, ...
3.298701
77
#!/usr/bin/env/python3 # -*- coding:utf-8 -*- """ @project: apiAutoTest @author: cjw @file: __init__.py.py @ide: PyCharm @time: 2020/7/31 """
[ 2, 48443, 14629, 14, 8800, 14, 24330, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 16302, 25, 40391, 27722, 14402, 198, 31, 9800, 25, 269, 73, 86, 198, 31, 7753, 25, 11593, 15003,...
2.073529
68
#!/usr/bin/env python # coding: utf-8 import logging import argparse import pydash from lib.common import USER_EMAIL from lib.common import API_KEY from lib.common import API_SECRET from lib.common import USER_API from lib.common import TEAM_API from lib.common import ROLE_API from lib.common import POLICY_API from ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 18931, 198, 11748, 1822, 29572, 198, 198, 11748, 279, 5173, 1077, 198, 198, 6738, 9195, 13, 11321, 1330, 1294, 1137, 62, 27630, 4146, ...
3.091445
339
from typing import TypeVar, Generic, List T = TypeVar('T') if __name__ == '__main__': discs: int = 5 tower_a: Stack[int] = Stack() tower_b: Stack[int] = Stack() tower_c: Stack[int] = Stack() for i in range(discs, 0, -1): tower_a.push(i) print(tower_a, tower_b, tower_c) hanoi(to...
[ 6738, 19720, 1330, 5994, 19852, 11, 42044, 11, 7343, 198, 198, 51, 796, 5994, 19852, 10786, 51, 11537, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 31014, 25, 493, 796, 642, 198, 220, ...
2.213836
159
import os.path from unittest import TestCase from code.cli import PARAMS_DIR, TESTS_DIR from code.prepare.base import load_data from code.prepare.params import load_params from code.prepare.utils import * FIXTURE_DATASET = os.path.join(TESTS_DIR, 'fixtures/GER.tsv') FIXTURE_DATASET_ASJP = os.path.join(TESTS_DIR, ...
[ 11748, 28686, 13, 6978, 198, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 2438, 13, 44506, 1330, 29463, 40834, 62, 34720, 11, 309, 1546, 4694, 62, 34720, 198, 198, 6738, 2438, 13, 46012, 533, 13, 8692, 1330, 3440, 62, ...
2.532847
137
""" Process time data set see create_timed_data to generate files with times for all Extract a single data set around a cone with TimedData """ import os, glob, pickle import healpy import numpy as np import pandas as pd import matplotlib.pyplot as plt from astropy.time import Time, TimeDelta from . import binned_dat...
[ 37811, 198, 18709, 640, 1366, 900, 198, 3826, 2251, 62, 16514, 276, 62, 7890, 284, 7716, 3696, 351, 1661, 329, 477, 220, 198, 11627, 974, 257, 2060, 1366, 900, 1088, 257, 27763, 351, 5045, 276, 6601, 198, 37811, 198, 198, 11748, 28686...
2.158686
2,527
from discord.ext import commands import os from decouple import config bot = commands.Bot("!") load_cogs(bot) TOKEN = config("TOKEN") bot.run(TOKEN)
[ 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 28686, 198, 6738, 875, 43846, 1330, 4566, 198, 198, 13645, 796, 9729, 13, 20630, 7203, 2474, 8, 628, 198, 198, 2220, 62, 66, 18463, 7, 13645, 8, 198, 198, 10468, 43959, 796, 4566, 7203, ...
2.851852
54
from .grid import Grid from .random import Random from .quasirandom import QuasiRandom
[ 6738, 764, 25928, 1330, 24846, 198, 6738, 764, 25120, 1330, 14534, 198, 6738, 764, 421, 292, 343, 3749, 1330, 2264, 17053, 29531, 198 ]
3.782609
23
from enum import Enum from .core.vector2 import Vector2 screen_size = width, height = 1040, 480 map_size = Vector2(x=10000, y=1000) gravity = 1.5
[ 6738, 33829, 1330, 2039, 388, 198, 6738, 764, 7295, 13, 31364, 17, 1330, 20650, 17, 198, 198, 9612, 62, 7857, 796, 9647, 11, 6001, 796, 838, 1821, 11, 23487, 198, 8899, 62, 7857, 796, 20650, 17, 7, 87, 28, 49388, 11, 331, 28, 1282...
2.846154
52
# -*- coding: utf-8 -*- # Search API docs: https://developers.google.com/youtube/v3/docs/search/list # Search API Python docs: https://developers.google.com/resources/api-libraries/documentation/youtube/v3/python/latest/youtube_v3.search.html # Examples: https://github.com/youtube/api-samples/tree/master/python impor...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 11140, 7824, 34165, 25, 3740, 1378, 16244, 364, 13, 13297, 13, 785, 14, 11604, 14, 85, 18, 14, 31628, 14, 12947, 14, 4868, 198, 2, 11140, 7824, 11361, 34165, ...
2.350861
2,149
import logging from time import time from typing import Tuple, Optional from bubuku.broker import BrokerManager from bubuku.communicate import sleep_and_operate from bubuku.env_provider import EnvProvider from bubuku.zookeeper import BukuExhibitor _LOG = logging.getLogger('bubuku.controller') # # Returns a ...
[ 11748, 18931, 198, 6738, 640, 1330, 640, 198, 6738, 19720, 1330, 309, 29291, 11, 32233, 198, 198, 6738, 10015, 33263, 13, 7957, 6122, 1330, 2806, 6122, 13511, 198, 6738, 10015, 33263, 13, 10709, 5344, 1330, 3993, 62, 392, 62, 3575, 378,...
3.391608
143
def integer(roman): """ Function to convert a roman numeral to integer. :type roman: str :rtype: int """ # Initialize a dictionary of symbol and values symbol_value = { 'M': 1000, 'D': 500, 'C': 100, 'L': 50, 'X': 10, 'V': 5, 'I': 1 ...
[ 4299, 18253, 7, 47119, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 15553, 284, 10385, 257, 374, 5185, 997, 1691, 284, 18253, 13, 628, 220, 220, 220, 1058, 4906, 374, 5185, 25, 965, 198, 220, 220, 220, 1058, 81, 4906, 25, ...
2.33452
562
from fishbase import logger class PluginsManagerStatic(object): """ 1. 现阶段插件是用来进行请求或者响应参数的处理 2. 暂时规定插件必须实现 run 方法 3. 使用实例: pm = PluginsManager() pm.run_plugin('demo.demo_md5', {'sign_type':'md5','data_sign_params':'param1, param2'}, {'param1':'1','param2':'2','param3':'3'}) ...
[ 6738, 5916, 8692, 1330, 49706, 628, 198, 4871, 22689, 1040, 13511, 45442, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 352, 13, 13328, 236, 108, 165, 246, 35050, 106, 113, 162, 237, 240, 20015, 114, 42468, 18796, 101...
1.484018
219
import unittest if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.392857
28
import sklearn.utils.sparsefuncs as sf from . import q, ut, pd, sp, np, warnings, sc from .utils import to_vo, to_vn, substr, df_to_dict, sparse_knn, prepend_var_prefix from samalg import SAM from scipy.stats import rankdata def GOEA(target_genes,GENE_SETS,df_key='GO',goterms=None,fdr_thresh=0.25,p_thresh=1e-3): ...
[ 11748, 1341, 35720, 13, 26791, 13, 82, 29572, 12543, 6359, 355, 264, 69, 198, 6738, 764, 1330, 10662, 11, 3384, 11, 279, 67, 11, 599, 11, 45941, 11, 14601, 11, 629, 198, 6738, 764, 26791, 1330, 284, 62, 13038, 11, 284, 62, 85, 77,...
1.950161
21,148
# -*- coding:UTF-8 -*- import sys reqMax = [] reqMin = [] cont = 0 #print(limpar()) p = 0 while p != 4: print('~'*30) print('Para Inserir dados do jogo aperte [1]: ') print('Para consultar dados dos jogos aperte [2]: ') print('para limpar a tabela de jogos aperte [3]') print('...
[ 2, 532, 9, 12, 19617, 25, 48504, 12, 23, 532, 9, 12, 220, 198, 11748, 25064, 198, 42180, 11518, 796, 17635, 198, 42180, 9452, 796, 17635, 198, 3642, 796, 657, 220, 628, 220, 220, 220, 220, 198, 2, 4798, 7, 2475, 1845, 28955, 220, ...
1.911429
350
from django import template from account.models import UserMessage from account.models import Conversation register = template.Library() @register.assignment_tag @register.assignment_tag @register.assignment_tag
[ 6738, 42625, 14208, 1330, 11055, 198, 198, 6738, 1848, 13, 27530, 1330, 11787, 12837, 198, 6738, 1848, 13, 27530, 1330, 42427, 198, 198, 30238, 796, 11055, 13, 23377, 3419, 628, 198, 31, 30238, 13, 562, 16747, 62, 12985, 628, 198, 31, ...
3.859649
57
import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import os.path as osp import joblib MAIN_PATH = '/scratch/gobi2/kamyar/oorl_rlkit/output' WHAT_TO_PLOT = 'faster_all_eval_stats.pkl' # WHAT_TO_PLOT = 'faster_all_eval_stats.pkl' # WHAT_TO_PLOT = 'faster_all_eval_stats.pkl' dat...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 198, 11...
1.928981
1,746
from django.shortcuts import render, get_object_or_404, redirect from .models import RepPost from .forms import RepForm from django.utils import timezone from django.contrib.auth.decorators import login_required @login_required
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 651, 62, 15252, 62, 273, 62, 26429, 11, 18941, 198, 6738, 764, 27530, 1330, 1432, 6307, 198, 6738, 764, 23914, 1330, 1432, 8479, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340,...
3.5625
64
#int_to_line.py #This script takes intersection and road segment and determine the direction of the road segment in contrast to the intersection. import arcpy from arcpy import env from arcpy.sa import * arcpy.CheckOutExtension("Spatial") arcpy.env.overwriteOutput = True #input configuration env.workspace = "C:/Users...
[ 2, 600, 62, 1462, 62, 1370, 13, 9078, 198, 2, 1212, 4226, 2753, 16246, 290, 2975, 10618, 290, 5004, 262, 4571, 286, 262, 2975, 10618, 287, 6273, 284, 262, 16246, 13, 198, 198, 11748, 10389, 9078, 198, 6738, 10389, 9078, 1330, 17365, ...
3.286624
157
import os from celery import Celery os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cactusco.settings') app = Celery('cactusco') app.config_from_object('django.conf:settings', namespace='CELERY') app.autodiscover_tasks() @app.task(bind=True)
[ 11748, 28686, 201, 198, 6738, 18725, 1924, 1330, 15248, 1924, 201, 198, 201, 198, 418, 13, 268, 2268, 13, 2617, 12286, 10786, 35028, 1565, 11230, 62, 28480, 51, 20754, 62, 33365, 24212, 3256, 705, 66, 34144, 1073, 13, 33692, 11537, 201,...
2.524752
101
from dtpattern import alignment from dtpattern.alignment import needle, finalize, gap_penalty, match_award, mismatch_penalty, water from dtpattern.utils import translate from dtpattern.alignment import alignment as al def align(s1,s2): """ input is a list of characters or character set symbols for each s1 a...
[ 6738, 288, 83, 33279, 1330, 19114, 198, 6738, 288, 83, 33279, 13, 282, 16747, 1330, 17598, 11, 2457, 1096, 11, 7625, 62, 3617, 6017, 11, 2872, 62, 707, 446, 11, 46318, 62, 3617, 6017, 11, 1660, 198, 6738, 288, 83, 33279, 13, 26791, ...
2.363441
930
import logging logger = logging.getLogger(__name__) handler = logging.StreamHandler() formatter = logging.Formatter( '%(asctime)s %(levelname)s %(message)s', "%Y-%m-%d %H:%M:%S" ) handler.setFormatter(formatter) logger.addHandler(handler) logger.setLevel(logging.INFO) import mimetypes
[ 11748, 18931, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 30281, 796, 18931, 13, 12124, 25060, 3419, 198, 687, 1436, 796, 18931, 13, 8479, 1436, 7, 198, 220, 220, 220, 705, 4, 7, 292, 310, 5...
2.487395
119
import logging import numpy as np import scipy.stats as stats from .eigd import eigenDecompose
[ 11748, 18931, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 34242, 355, 9756, 198, 198, 6738, 764, 68, 328, 67, 1330, 304, 9324, 10707, 3361, 577, 628, 628, 628 ]
3
34
import numpy as np import cv2 input = cv2.imread('input/strawberry.jpg') height, width = input_image.shape[:2] x_gauss = cv2.getGaussianKernel(width,250) y_gauss = cv2.getGaussianKernel(height,200) kernel = x_gauss * y_gauss.T mask = kernel * 255 / np.linalg.norm(kernel) ou...
[ 11748, 299, 32152, 355, 45941, 220, 201, 198, 11748, 269, 85, 17, 201, 198, 201, 198, 201, 198, 15414, 796, 269, 85, 17, 13, 320, 961, 10786, 15414, 14, 301, 1831, 8396, 13, 9479, 11537, 220, 201, 198, 220, 220, 220, 220, 201, 198...
2.019763
253
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Mar 5 11:40:58 2021 @author: Christopher Corbell Things we can use here: - construct Digraph from underlying Graph (default direction for edges) - DigraphFactory to construct some interesting digraphs """ from graphoire.graph import Graph cl...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 1526, 220, 642, 1367, 25, 1821, 25, 3365, 33448, 198, 198, 31, 9800, 25, 12803, 27...
2.446137
919
from collections import OrderedDict import numpy as np from gym.envs.mujoco import mujoco_env from gym.spaces import Box from bgp.rlkit.core import logger as default_logger from bgp.rlkit.core.eval_util import create_stats_ordered_dict from bgp.rlkit.core.serializable import Serializable from bgp.rlkit.envs.mujoco_en...
[ 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 11550, 13, 268, 14259, 13, 76, 23577, 25634, 1330, 285, 23577, 25634, 62, 24330, 198, 6738, 11550, 13, 2777, 2114, 1330, 8315, 198, 198, 6738, ...
2.789157
166
import sublime import sublime_plugin class SurroundCommand(sublime_plugin.TextCommand): """ Base class to surround the selection with text. """ surround = ''
[ 11748, 41674, 198, 11748, 41674, 62, 33803, 628, 198, 4871, 4198, 744, 21575, 7, 7266, 27299, 62, 33803, 13, 8206, 21575, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 7308, 1398, 284, 4573, 262, 6356, 351, 2420, 13, 198, 220, ...
3.272727
55
import requests from faker import Faker from faker.providers import date_time import json fake = Faker() fake.add_provider(date_time) for i in range(40000000): user = { 'name': fake.name(), 'email': fake.email(), 'birthdate': fake.date() } response = requests.post('http://localhos...
[ 11748, 7007, 198, 6738, 277, 3110, 1330, 376, 3110, 198, 6738, 277, 3110, 13, 15234, 4157, 1330, 3128, 62, 2435, 198, 11748, 33918, 198, 198, 30706, 796, 376, 3110, 3419, 198, 30706, 13, 2860, 62, 15234, 1304, 7, 4475, 62, 2435, 8, ...
2.336245
229
import sys from hangul_utils import * # for word segmentation and pos tagging of Korean text # Note: You need to install "hangul-utils" in advanced # Ref link: https://github.com/kaniblu/hangul-utils # written by Ye Kyaw Thu, Visiting Professor, LST, NECTEC, Thailand # # How to run: python ./korean-breaks.py <input-fi...
[ 11748, 25064, 198, 6738, 8181, 377, 62, 26791, 1330, 1635, 198, 198, 2, 329, 1573, 10618, 341, 290, 1426, 49620, 286, 6983, 2420, 198, 2, 5740, 25, 921, 761, 284, 2721, 366, 33255, 377, 12, 26791, 1, 287, 6190, 198, 2, 6524, 2792, ...
2.433735
498
# Uses python3 if __name__ == "__main__": print(edit_distance(input(), input()))
[ 2, 36965, 21015, 18, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3601, 7, 19312, 62, 30246, 7, 15414, 22784, 5128, 3419, 4008, 198 ]
2.6875
32
#!/usr/bin/env python # encoding: utf-8 import rospy import tf from std_msgs.msg import Float64, Int32, Int8 from nav_msgs.msg import Odometry from geometry_msgs.msg import Twist, Vector3 from PID import PID from math import sin, cos, pi, atan2, sqrt autoMove = AUTO_MOVE() """LinearPub = rospy.Publisher("/command/l...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 11748, 686, 2777, 88, 198, 11748, 48700, 198, 6738, 14367, 62, 907, 14542, 13, 19662, 1330, 48436, 2414, 11, 2558, 2624, 11, 2558, 23, 198, 6738,...
2.603659
328
from django.conf import settings from django.contrib.auth import get_user_model from rest_framework.response import Response from rest_framework.views import APIView User = get_user_model() class RetrieveCurrentUserView(APIView): """Возвращает информацию о текущем пользователе"""
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 30604, 13, 33571, 1330, 3486, 3824, ...
2.341463
123
#!/usr/bin/env python from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt # Create a Miller project map = Basemap(projection='hammer', lon_0=20, resolution='l') # Plot coastlines map.drawcoastlines(linewidth=0.) map.fillcontinents(alpha=0.85) # Parse telescopes.txt and plot the points on the m...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 285, 489, 62, 25981, 74, 896, 13, 12093, 368, 499, 1330, 6455, 368, 499, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 220, 198, 198, 2, 13610, 257, 7920, 1628,...
2.496
250
from .KeyCodes import * from .MouseButtonCodes import *
[ 6738, 764, 9218, 34, 4147, 1330, 1635, 198, 6738, 764, 39643, 21864, 34, 4147, 1330, 1635, 198 ]
3.294118
17
"""Evaluation This script consists of evaluation functions needed """ import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation import datetime import tensorflow as tf from tensorflow.python.tools import inspect_checkpoint as chkp import load_data from geometry_parameters import TE...
[ 37811, 36, 2100, 2288, 198, 198, 1212, 4226, 10874, 286, 12660, 5499, 2622, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 11227, 341...
2.280542
5,607
from user import User brianna = User(1, 'Brianna') mary = User(2, 'Mary') keyboard = brianna.sell_product('Keyboard', 'A nice mechanical keyboard', 100) print(keyboard.availability) # => True mary.buy_product(keyboard) print(keyboard.availability) # => False review = mary.write_review('This is the best keyboard ev...
[ 6738, 2836, 1330, 11787, 628, 198, 65, 380, 7697, 796, 11787, 7, 16, 11, 705, 33, 380, 7697, 11537, 198, 6874, 796, 11787, 7, 17, 11, 705, 24119, 11537, 198, 198, 2539, 3526, 796, 31013, 7697, 13, 7255, 62, 11167, 10786, 9218, 3526,...
3.155039
129
import datetime import factory from factory.fuzzy import FuzzyChoice from wins.models import ( Advisor, Breakdown, CustomerResponse, HVC, Notification, Win, ) from wins.constants import BUSINESS_POTENTIAL, SECTORS, WIN_TYPES from users.factories import UserFactory WIN_TYPES_DICT = {y: x for...
[ 11748, 4818, 8079, 198, 198, 11748, 8860, 198, 6738, 8860, 13, 69, 4715, 88, 1330, 376, 4715, 88, 46770, 198, 198, 6738, 7864, 13, 27530, 1330, 357, 198, 220, 220, 220, 35399, 11, 198, 220, 220, 220, 12243, 2902, 11, 198, 220, 220, ...
2.633588
131
from . import BinarySearchTree from . import BinaryTree from . import Tree
[ 6738, 764, 1330, 45755, 18243, 27660, 198, 6738, 764, 1330, 45755, 27660, 198, 6738, 764, 1330, 12200, 198 ]
4.166667
18
import pytest from .common import TESTDATA from flyingpigeon.utils import local_path from cdo import Cdo cdo = Cdo()
[ 11748, 12972, 9288, 198, 198, 6738, 764, 11321, 1330, 43001, 26947, 198, 6738, 7348, 79, 10045, 261, 13, 26791, 1330, 1957, 62, 6978, 198, 198, 6738, 269, 4598, 1330, 327, 4598, 198, 66, 4598, 796, 327, 4598, 3419, 628 ]
3.076923
39
from datetime import datetime import os import nose import nose.tools from TransactionBook.model.TransactionBook import * def save_load(tb): """ Helper function wich does save and load the data. :param tb: Transaction Book :return tb2: Transaction Book after save load operation """ filename ...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 28686, 198, 11748, 9686, 198, 11748, 9686, 13, 31391, 198, 6738, 45389, 10482, 13, 19849, 13, 48720, 10482, 1330, 1635, 628, 628, 198, 4299, 3613, 62, 2220, 7, 83, 65, 2599, 198, 220, 22...
2.624113
282
from nip import nip, dumps @nip @nip("myfunc") @nip
[ 6738, 299, 541, 1330, 299, 541, 11, 45514, 628, 198, 31, 77, 541, 628, 198, 31, 77, 541, 7203, 1820, 20786, 4943, 628, 198, 31, 77, 541, 628, 628 ]
2.103448
29
""" Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? """ __author__ = 'Danyang' # Definition for singly-linked list.
[ 37811, 198, 15056, 257, 6692, 1351, 11, 5004, 611, 340, 468, 257, 6772, 287, 340, 13, 198, 198, 7155, 510, 25, 198, 6090, 345, 8494, 340, 1231, 1262, 3131, 2272, 30, 198, 37811, 198, 834, 9800, 834, 796, 705, 35, 1092, 648, 6, 198...
3.333333
54
# coding: utf-8 import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class RecordRuleReq: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is a...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 302, 198, 11748, 2237, 628, 198, 198, 6738, 289, 84, 707, 68, 291, 75, 2778, 21282, 74, 7295, 13, 26791, 13, 4023, 62, 26791, 1330, 5336, 270, 1096, 62, 1640, 62, 46911, 1634, 628, ...
1.96688
2,657
import argparse import markdown _EXTENSIONS = ( 'markdown.extensions.fenced_code', 'markdown.extensions.tables', ) if __name__ == '__main__': main()
[ 11748, 1822, 29572, 198, 198, 11748, 1317, 2902, 198, 198, 62, 13918, 16938, 11053, 796, 357, 198, 220, 220, 220, 705, 4102, 2902, 13, 2302, 5736, 13, 69, 5864, 62, 8189, 3256, 198, 220, 220, 220, 705, 4102, 2902, 13, 2302, 5736, 13...
2.441176
68
from bs4 import BeautifulSoup import re import urllib.parse import requests if __name__ == '__main__': info = u"""<div id="info" class="">\ <span>\ <span class="pl"> 作者</span>\ <a class="" href="/search/%E5%8D%A1%E5%8B%92%E5%BE%B7%C2%B7%E8%83%A1%E8%B5%9B%E5%B0%BC">[美] 卡勒德·胡赛尼</a>\ </span><br...
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 302, 198, 11748, 2956, 297, 571, 13, 29572, 198, 11748, 7007, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 7508, 796, 334, 37811, 27, ...
1.754181
598
""" AUTHTAB.DIR file parser. """ from pybycus.file import File class AuthTab(File): """ The Author List (with the filename AUTHTAB.DIR) contains descriptive information for each text file on the disc. The purpose of the Author Table is to allow the user to ask for the author Plato, for example, withou...
[ 37811, 37195, 5603, 33, 13, 34720, 2393, 30751, 13, 37227, 198, 198, 6738, 12972, 1525, 9042, 13, 7753, 1330, 9220, 198, 198, 4871, 26828, 33349, 7, 8979, 2599, 198, 220, 220, 220, 37227, 383, 6434, 7343, 357, 4480, 262, 29472, 37195, ...
3.241228
228
from .param_value import ParamValue
[ 6738, 764, 17143, 62, 8367, 1330, 25139, 11395, 628 ]
4.111111
9
import unittest import os import pandas as pd from causal_testing.data_collection.data_collector import ObservationalDataCollector from causal_testing.specification.causal_specification import Scenario from causal_testing.specification.variable import Input, Output, Meta from scipy.stats import uniform, rv_discrete fro...
[ 11748, 555, 715, 395, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 26558, 62, 33407, 13, 7890, 62, 43681, 13, 7890, 62, 33327, 273, 1330, 19243, 864, 6601, 31337, 273, 198, 6738, 26558, 62, 33407, 13, 16684, 264...
3.375
136
import copy # @property # def F(self): # attr = "F" # if attr in self.__dict__: # return self.__dict__[attr] # else: # return None # Gets called when the item is not found via __getattribute__ # def __getattr__(self, item): # return super(Indiv...
[ 11748, 4866, 628, 628, 220, 220, 220, 1303, 2488, 26745, 198, 220, 220, 220, 1303, 825, 376, 7, 944, 2599, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 708, 81, 796, 366, 37, 1, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 611...
1.961905
420
import unittest from bgmi.lib.constants import BANGUMI_UPDATE_TIME from bgmi.lib.controllers import ( add, cal, delete, mark, recreate_source_relatively_table, search, ) from bgmi.main import setup
[ 11748, 555, 715, 395, 198, 198, 6738, 275, 70, 11632, 13, 8019, 13, 9979, 1187, 1330, 347, 15567, 5883, 40, 62, 16977, 62, 34694, 198, 6738, 275, 70, 11632, 13, 8019, 13, 3642, 36667, 1330, 357, 198, 220, 220, 220, 751, 11, 198, 2...
2.461538
91
from PIL import Image, ImageFilter import random # This library only words with the assumption that the dataset has been formatted as 0.jpg, 1.jpg ... or 0.png, 1.png ... accordingly
[ 6738, 350, 4146, 1330, 7412, 11, 7412, 22417, 198, 11748, 4738, 198, 198, 2, 770, 5888, 691, 2456, 351, 262, 13196, 326, 262, 27039, 468, 587, 39559, 355, 657, 13, 9479, 11, 352, 13, 9479, 2644, 393, 657, 13, 11134, 11, 352, 13, 1...
3.914894
47
import os import time import pandas as pd FETCH_URL = "https://poloniex.com/public?command=returnChartData&currencyPair=%s&start=%d&end=%d&period=300" #PAIR_LIST = ["BTC_ETH"] DATA_DIR = "data" COLUMNS = ["date","high","low","open","close","volume","quoteVolume","weightedAverage"] if __name__ == '__main__': main...
[ 11748, 28686, 198, 11748, 640, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 37, 2767, 3398, 62, 21886, 796, 366, 5450, 1378, 16104, 261, 494, 87, 13, 785, 14, 11377, 30, 21812, 28, 7783, 45488, 6601, 5, 34415, 47, 958, 28, 4, 8...
2.626016
123
from hearthbreaker.constants import CHARACTER_CLASS, CARD_RARITY from hearthbreaker.game_objects import WeaponCard, Weapon
[ 6738, 3285, 400, 25766, 13, 9979, 1187, 1330, 28521, 2246, 5781, 62, 31631, 11, 48731, 62, 49, 1503, 9050, 198, 6738, 3285, 400, 25766, 13, 6057, 62, 48205, 1330, 13072, 16962, 11, 13072, 628, 198 ]
3.571429
35
# Copyright 2022 Touca, Inc. Subject to Apache-2.0 License. from sys import stderr, stdout from pathlib import Path from argparse import ArgumentParser from loguru import logger from touca.cli._common import Operation
[ 2, 15069, 33160, 23359, 6888, 11, 3457, 13, 15540, 284, 24843, 12, 17, 13, 15, 13789, 13, 198, 198, 6738, 25064, 1330, 336, 1082, 81, 11, 14367, 448, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198,...
3.745763
59
import pygame import moves from typing import List from pieces.king import King import copy SIZE = (1000, 800) SQUARE_WIDTH = int(0.8 * SIZE[0] // 8) SQUARE_HEIGHT = SIZE[1] // 8 IMAGES = {} pygame.init() screen = pygame.display.set_mode(SIZE) move_feed = [] running = True board_array = [ ['Br', 'Bn', 'Bb', 'Bq'...
[ 11748, 12972, 6057, 198, 11748, 6100, 198, 6738, 19720, 1330, 7343, 198, 6738, 5207, 13, 3364, 1330, 2677, 198, 11748, 4866, 198, 198, 33489, 796, 357, 12825, 11, 10460, 8, 198, 50, 10917, 12203, 62, 54, 2389, 4221, 796, 493, 7, 15, ...
1.907104
915
# ПРИМЕР ПОЛУЧЕНИЯ И УКАЗАНИЯ ТИПА ЛИНИИ ТРАССЫ: # Тип линии, равно как и калибровочные значения, # хранятся в энергонезависимой памяти модуля. from time import sleep # Подключаем библиотеку для работы с бампером I2C-flash. from pyiArduinoI2Cbumper import * # Объявляем объект bum для работы с функциями и метода...
[ 2, 12466, 253, 140, 254, 140, 246, 140, 250, 140, 243, 140, 254, 12466, 253, 140, 252, 140, 249, 140, 96, 140, 100, 140, 243, 140, 251, 140, 246, 140, 107, 12466, 246, 12466, 96, 140, 248, 140, 238, 140, 245, 140, 238, 140, 251,...
1.144153
992
# Generated by Django 2.2.6 on 2019-11-12 17:18 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 21, 319, 13130, 12, 1157, 12, 1065, 1596, 25, 1507, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
# -*- coding:utf-8 -*- """ This script is used to build a qa data for usage. Typically, each enty contains three elements: a question, an answer, a url """ import sys import re import os import jieba import gensim try: import cPickle as pickle except: import pickle reload(sys) sys.setdefaultencoding('utf-8'...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 1212, 4226, 318, 973, 284, 1382, 257, 10662, 64, 1366, 329, 8748, 13, 198, 49321, 11, 1123, 920, 88, 4909, 1115, 4847, 25, 257, 1808, 11, 281, 3280, 11, ...
2.103486
4,561
# -*- coding: utf-8 -*- from south.db import db from south.v2 import SchemaMigration
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 6738, 5366, 13, 9945, 1330, 20613, 201, 198, 6738, 5366, 13, 85, 17, 1330, 10011, 2611, 44, 4254, 201, 198, 201, 198 ]
2.432432
37
from .bilibili.biliAudio import * from .bilibili.biliVideo import * from .bilibili.biliLive import * from .wenku8.Wenku8TXT import * from .video.imomoe import * from .video.kakadm import * from .audio.netease import *
[ 6738, 764, 65, 22282, 2403, 13, 65, 2403, 21206, 1330, 1635, 198, 6738, 764, 65, 22282, 2403, 13, 65, 2403, 10798, 1330, 1635, 198, 6738, 764, 65, 22282, 2403, 13, 65, 2403, 18947, 1330, 1635, 198, 6738, 764, 21006, 23063, 23, 13, 5...
2.679012
81
import ast import csv import json from absl import flags import numpy as np import pandas as pd FLAGS = flags.FLAGS def get_timestamps_with_obstacles(filename, obstacle_distance_threshold=10): """Finds timestamps when we detected obstacles.""" print(filename) df = pd.read_csv( filename, ...
[ 11748, 6468, 198, 11748, 269, 21370, 198, 11748, 33918, 198, 198, 6738, 2352, 75, 1330, 9701, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 38948, 50, 796, 9701, 13, 38948, 50, 628, 628, 628,...
2.306715
551
# encoding: UTF-8 from leetcode import * from typing import Generator, Tuple @Problem(3, 'Longest Substring Without Repeating Characters', Difficulty.Medium, Tags.HashTable, Tags.String, Tags.TwoPointers) @Solution.test.lengthOfLongestSubstring @Solution.test.lengthOfLongestSubstring @Solution.test.lengthOfLon...
[ 2, 21004, 25, 41002, 12, 23, 198, 198, 6738, 443, 316, 8189, 1330, 1635, 198, 6738, 19720, 1330, 35986, 11, 309, 29291, 628, 198, 31, 40781, 7, 18, 11, 705, 14617, 395, 3834, 8841, 9170, 30558, 803, 26813, 3256, 27419, 13, 31205, 11...
3.408163
98
#!/usr/bin/env python3
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 628 ]
2.4
10
EMOJI_LIST = [ ':1st_place_medal:', ':2nd_place_medal:', ':3rd_place_medal:', ':AB_button_(blood_type):', ':ATM_sign:', ':A_button_(blood_type):', ':Afghanistan:', ':Albania:', ':Algeria:', ':American_Samoa:', ':Andorra:', ':Angola:', ':Anguilla:', ':Antarctica:', ...
[ 3620, 46, 41, 40, 62, 45849, 796, 685, 198, 197, 10354, 16, 301, 62, 5372, 62, 1150, 282, 25, 3256, 198, 220, 220, 220, 705, 25, 17, 358, 62, 5372, 62, 1150, 282, 25, 3256, 198, 220, 220, 220, 705, 25, 18, 4372, 62, 5372, 62, ...
1.95234
51,930
from flask import Flask,render_template,request import requests app = Flask(__name__) API_KEY = 'RQM7GIDWT0ZU2WLU' @app.route('/',methods=['GET','POST']) if __name__ == "__main__": app.run(debug= False)
[ 6738, 42903, 1330, 46947, 11, 13287, 62, 28243, 11, 25927, 201, 198, 11748, 7007, 201, 198, 201, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 201, 198, 17614, 62, 20373, 796, 705, 49, 48, 44, 22, 38, 2389, 39386, 15, 57, 52, 17, ...
2.265306
98
import base64 import os import random from io import BytesIO import matplotlib.font_manager as fm from PIL import Image, ImageDraw, ImageFont
[ 11748, 2779, 2414, 198, 11748, 28686, 198, 11748, 4738, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 198, 11748, 2603, 29487, 8019, 13, 10331, 62, 37153, 355, 277, 76, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 25302, 11, 7412, 23252...
3.428571
42
from json import dumps from pathlib import Path from sqlite3 import connect from pycargr.model import Car DB_PATH = Path.home().joinpath('pycargr.db') SEARCH_BASE_URL = 'https://www.car.gr/classifieds/cars/'
[ 6738, 33918, 1330, 45514, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 44161, 578, 18, 1330, 2018, 198, 198, 6738, 12972, 66, 853, 81, 13, 19849, 1330, 1879, 198, 198, 11012, 62, 34219, 796, 10644, 13, 11195, 22446, 22179, 6978, 10786...
2.864865
74
from pathlib import Path import ast import pytest import astor import warnings import os from json_codegen import load_schema from json_codegen.generators.python3_marshmallow import Python3MarshmallowGenerator SCHEMAS_DIR = Path(__file__).parent / "fixtures" / "schemas" FIXTURES_DIR = Path(__file__).parent / "fixtu...
[ 6738, 3108, 8019, 1330, 10644, 198, 11748, 6468, 198, 198, 11748, 12972, 9288, 198, 11748, 6468, 273, 198, 11748, 14601, 198, 11748, 28686, 198, 198, 6738, 33918, 62, 8189, 5235, 1330, 3440, 62, 15952, 2611, 198, 6738, 33918, 62, 8189, ...
2.805
200
# -*- 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
# robofab manual # Glyphmath howto # Fun examples #FLM: Fun with GlyphMath # this example is meant to run with the RoboFab Demo Font # as the Current Font. So, if you're doing this in FontLab # import the Demo Font UFO first. from robofab.world import CurrentFont from random import random f = CurrentFont() conde...
[ 2, 3857, 1659, 397, 10107, 198, 2, 27949, 746, 11018, 703, 1462, 198, 2, 11138, 6096, 198, 198, 2, 3697, 44, 25, 11138, 351, 27949, 746, 37372, 198, 220, 198, 2, 428, 1672, 318, 4001, 284, 1057, 351, 262, 39702, 43957, 34588, 24060,...
2.967442
215
""" Simple module for loading documentation of various pypy-cs from doc directory """ import py
[ 198, 37811, 17427, 8265, 329, 11046, 10314, 286, 2972, 198, 79, 4464, 88, 12, 6359, 422, 2205, 8619, 198, 37811, 198, 198, 11748, 12972, 628 ]
3.96
25
#!/usr/bin/env python ''' SST scheduler simulation input file generator Input parameters are given below Setting a parameter to "default" or "" will select the default option ''' import os # Input workload trace path: traceName = 'jobtrace_files/bisection_N1.sim' # Output file name: outFile = 'simple_libtopomap_bisec...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 7061, 6, 198, 50, 2257, 6038, 18173, 18640, 5128, 2393, 17301, 198, 20560, 10007, 389, 1813, 2174, 198, 34149, 257, 11507, 284, 366, 12286, 1, 393, 13538, 481, 2922, 262, 4277, 3038, 1...
2.41812
2,351
from jax import lax from jax.experimental import host_callback from tqdm.auto import tqdm def progress_bar_scan(num_samples, message=None): """ Progress bar for a JAX scan. """ if message is None: message = f"Running for {num_samples:,} iterations" tqdm_bars = {} if num_samples > 20: ...
[ 6738, 474, 897, 1330, 36919, 198, 6738, 474, 897, 13, 23100, 9134, 1330, 2583, 62, 47423, 198, 6738, 256, 80, 36020, 13, 23736, 1330, 256, 80, 36020, 628, 198, 4299, 4371, 62, 5657, 62, 35836, 7, 22510, 62, 82, 12629, 11, 3275, 28, ...
2.166867
833
import logging from pathlib import Path
[ 11748, 18931, 198, 6738, 3108, 8019, 1330, 10644 ]
4.875
8
import numpy as np from skimage.future import graph from skimage._shared.version_requirements import is_installed from skimage import segmentation import pytest @pytest.mark.skipif(not is_installed('networkx'), reason="networkx not installed") @pytest.mark.skipif(not is_installed('networkx'), ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 9060, 13, 37443, 1330, 4823, 198, 6738, 1341, 9060, 13557, 28710, 13, 9641, 62, 8897, 18883, 1330, 318, 62, 37050, 198, 6738, 1341, 9060, 1330, 10618, 341, 198, 11748, 12972, 9288, 628, 19...
2.509728
514
from django.shortcuts import redirect, render, reverse from django.urls import reverse_lazy from django.contrib import messages from django.db.models import Case, CharField, Value, When from django.views.generic.base import TemplateView from django.views.generic import ListView from django.views.generic.edit import Cr...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941, 11, 8543, 11, 9575, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 62, 75, 12582, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, ...
3.014467
553
# ***************************************************************************** # * Copyright 2019 Amazon.com, Inc. and its affiliates. All Rights Reserved. * # * # Licensed under the Amazon Software License (the "License"). * ...
[ 2, 41906, 17174, 4557, 35625, 198, 2, 1635, 15069, 13130, 6186, 13, 785, 11, 3457, 13, 290, 663, 29116, 13, 1439, 6923, 33876, 13, 220, 1635, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.199005
603
import string from random import * characters = string.ascii_letters + string.punctuation + string.digits pswd = "".join(choice(characters) for x in range(randint(6, 14))) print pswd
[ 11748, 4731, 198, 6738, 4738, 1330, 1635, 198, 10641, 19858, 796, 4731, 13, 292, 979, 72, 62, 15653, 1343, 4731, 13, 79, 16260, 2288, 220, 1343, 4731, 13, 12894, 896, 198, 862, 16993, 796, 220, 366, 1911, 22179, 7, 25541, 7, 10641, ...
2.983871
62
from typing import Any, Dict, Set from django.apps import AppConfig def required_users(element: Dict[str, Any]) -> Set[int]: """ Returns all user ids that are displayed as speaker in the given element. """ return set(speaker["user_id"] for speaker in element["speakers"])
[ 6738, 19720, 1330, 4377, 11, 360, 713, 11, 5345, 198, 198, 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628, 198, 198, 4299, 2672, 62, 18417, 7, 30854, 25, 360, 713, 58, 2536, 11, 4377, 12962, 4613, 5345, 58, 600, 5974, 198, 22...
3.106383
94
""" In this step the destination address is no longer node 2 -- we draw a random destination, and we'll add the destination address to the message. The best way is to subclass cMessage and add destination as a data member. To make the model execute longer, after a message arrives to its destination the destination no...
[ 37811, 198, 818, 428, 2239, 262, 10965, 2209, 318, 645, 2392, 10139, 362, 1377, 356, 3197, 257, 198, 25120, 10965, 11, 290, 356, 1183, 751, 262, 10965, 2209, 284, 262, 3275, 13, 198, 198, 464, 1266, 835, 318, 284, 47611, 269, 12837, ...
4.375
104
#!/usr/bin/env python3 """Set/get/remove client/port metadata.""" from pprint import pprint import jack client = jack.Client('Metadata-Client') port = client.inports.register('input') client.set_property(client, jack.METADATA_PRETTY_NAME, 'Best Client Ever') print('Client "pretty" name:', jack.get_property(cli...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 7248, 14, 1136, 14, 28956, 5456, 14, 634, 20150, 526, 15931, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 11748, 14509, 198, 198, 16366, 796, 14509, 13, 11792, 10786, 91...
2.841751
297
import csv from argparse import ArgumentParser, ArgumentTypeError from os import path from string import Template from subprocess import Popen from tempfile import NamedTemporaryFile import numpy as np import util # This import only works if the directory where "generate_trench.so" is located is present in # the PYT...
[ 11748, 269, 21370, 198, 6738, 1822, 29572, 1330, 45751, 46677, 11, 45751, 6030, 12331, 198, 6738, 28686, 1330, 3108, 198, 6738, 4731, 1330, 37350, 198, 6738, 850, 14681, 1330, 8099, 268, 198, 6738, 20218, 7753, 1330, 34441, 12966, 5551, 8...
2.866564
652
# File: N (Python 2.4) import random import types import string from direct.fsm import StateData from direct.fsm import ClassicFSM from direct.fsm import State from direct.gui import DirectGuiGlobals from direct.gui.DirectGui import * from direct.task import Task from pandac.PandaModules import * from pandac.PandaModu...
[ 2, 9220, 25, 399, 357, 37906, 362, 13, 19, 8, 198, 198, 11748, 4738, 198, 11748, 3858, 198, 11748, 4731, 198, 6738, 1277, 13, 69, 5796, 1330, 1812, 6601, 198, 6738, 1277, 13, 69, 5796, 1330, 13449, 10652, 44, 198, 6738, 1277, 13, ...
3.46371
248
import argparse import config import utils from chat import ChatSession from utils import Color if __name__ == '__main__': main()
[ 11748, 1822, 29572, 198, 198, 11748, 4566, 198, 11748, 3384, 4487, 198, 6738, 8537, 1330, 24101, 36044, 198, 6738, 3384, 4487, 1330, 5315, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388...
3.232558
43
from checkio.home.most_wanted_letter import checkio
[ 6738, 2198, 952, 13, 11195, 13, 1712, 62, 86, 4126, 62, 9291, 1330, 2198, 952, 628 ]
3.3125
16
import copy from Reversi import Reversi from dqn_agent import DQNAgent if __name__ == "__main__": # parameters #n_epochs = 1000 n_epochs = 5 # environment, agent env = Reversi() # playerID playerID = [env.Black, env.White, env.Black] # player agent players = [] # player[0]=...
[ 11748, 4866, 198, 198, 6738, 797, 690, 72, 1330, 797, 690, 72, 198, 6738, 288, 80, 77, 62, 25781, 1330, 360, 48, 4535, 6783, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 628, 220, 220, 220, 1303, 10007, 198, ...
1.554111
2,153