content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# Baker, Aiden # 2/10/2021 # DoNow1.2 print("Sensei, I am ready for the next stage in my training!")
[ 2, 14372, 11, 317, 14029, 198, 2, 362, 14, 940, 14, 1238, 2481, 198, 2, 2141, 3844, 16, 13, 17, 198, 198, 4798, 7203, 41166, 72, 11, 314, 716, 3492, 329, 262, 1306, 3800, 287, 616, 3047, 2474, 8 ]
2.589744
39
"""Importing routines for tif data.""" # Copyright 2019 CSIRO (Data61) # # 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 b...
[ 37811, 20939, 278, 31878, 329, 256, 361, 1366, 526, 15931, 198, 198, 2, 15069, 13130, 9429, 43708, 357, 6601, 5333, 8, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345,...
3.283619
409
''' https://community.topcoder.com/stat?c=problem_statement&pm=13458 '''
[ 7061, 6, 198, 5450, 1378, 28158, 13, 4852, 66, 12342, 13, 785, 14, 14269, 30, 66, 28, 45573, 62, 26090, 5, 4426, 28, 1485, 29334, 198, 7061, 6, 198 ]
2.517241
29
T = int(input()) lst = [] while T>0: l = [0,0] a,b = input().split() Pc, Pr = int(a), int(b) Pcs = str(Pc) Prs = str(Pr) if len(Pcs)==1: cdigit = 1 else: if Pc%9==0: cdigit = Pc//9 else: cdigit = Pc//9 +1 if len(Prs) == 1: rdigit = ...
[ 51, 796, 493, 7, 15414, 28955, 198, 75, 301, 796, 17635, 198, 4514, 309, 29, 15, 25, 198, 220, 220, 220, 300, 796, 685, 15, 11, 15, 60, 198, 220, 220, 220, 257, 11, 65, 796, 5128, 22446, 35312, 3419, 198, 220, 220, 220, 350, 6...
1.580321
498
# Copyright 2017 The TensorFlow Lattice 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 applicable law or a...
[ 2, 15069, 2177, 383, 309, 22854, 37535, 406, 1078, 501, 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, 11846, 351, ...
3.602339
342
import sys if __name__ == "__main__": sol()
[ 11748, 25064, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1540, 3419, 198 ]
2.318182
22
#!/usr/bin/python3 """ Post processes the line and toggle coverage reports from verilator into something which is easier to read and review. """ import os import re import sys import yaml import argparse import jinja2 class AnnotatedFile(object): """ Describes a single annotated file. """ def __in...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 37811, 198, 6307, 7767, 262, 1627, 290, 19846, 5197, 3136, 422, 3326, 346, 1352, 656, 198, 18927, 543, 318, 4577, 284, 1100, 290, 2423, 13, 198, 37811, 198, 198, 11748, 28686, 198, ...
2.178344
1,727
import torch import warnings from typing import Callable # Typing hints: a Point is a tensor with some shape, and a scalar is, well, a single-element tensor Point = torch.Tensor Scalar = torch.Tensor class Manifold(object): """Base class for Manifolds with an associated length(). In other words, a Length Space ...
[ 11748, 28034, 198, 11748, 14601, 198, 6738, 19720, 1330, 4889, 540, 628, 198, 2, 17134, 278, 20269, 25, 257, 6252, 318, 257, 11192, 273, 351, 617, 5485, 11, 290, 257, 16578, 283, 318, 11, 880, 11, 257, 2060, 12, 30854, 11192, 273, 1...
2.942308
728
#!/usr/bin/env python from os.path import join import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import netCDF4 as nc4 from e3sm_case_output import day_str REF_CASE_NAME = "timestep_ctrl" TEST_CASE_NAME = "timestep_all_10s" OUTPUT_DIR = "/p/lustre2/santos36/timestep_precip/"...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 198, 11748, 2603, 2...
2.100275
2,912
# coding=utf-8 from django.db import models from django.utils.translation import ugettext_lazy as _ from positions.fields import PositionField from .utils import slugify STATUS = ( (0, _(u'Active')), (1, _(u'Editing')), (127, _(u'Deleted')), )
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 198, 6738, 6116, 13, 25747, 1330, 23158, 15878,...
2.538462
104
# Copyright 2020 - 2021 MONAI Consortium # 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 wri...
[ 2, 15069, 12131, 532, 33448, 25000, 20185, 42727, 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, 921...
2.659042
4,197
TRAINING_DATA_FILE = "gold_entities.jsonl" KB_FILE = "kb" KB_MODEL_DIR = "nlp_kb" OUTPUT_MODEL_DIR = "nlp" PRIOR_PROB_PATH = "prior_prob.csv" ENTITY_DEFS_PATH = "entity_defs.csv" ENTITY_FREQ_PATH = "entity_freq.csv" ENTITY_DESCR_PATH = "entity_descriptions.csv" LOG_FORMAT = '%(asctime)s - %(levelname)s - %(name)s - %...
[ 51, 3861, 1268, 2751, 62, 26947, 62, 25664, 796, 366, 24267, 62, 298, 871, 13, 17752, 75, 1, 198, 22764, 62, 25664, 796, 366, 32812, 1, 198, 22764, 62, 33365, 3698, 62, 34720, 796, 366, 21283, 79, 62, 32812, 1, 198, 2606, 7250, 38...
2.049383
162
#Guru #takes fasta alignments, a distance metric and builds neighbor joining trees import os, sys from galaxy import eggs from galaxy.tools.util import hyphy_util #Retrieve hyphy path, this will need to be the same across the cluster tool_data = sys.argv.pop() HYPHY_PATH = os.path.join( tool_data, "HYPHY" ) H...
[ 2, 38, 14717, 201, 198, 2, 83, 1124, 3049, 64, 10548, 902, 11, 257, 5253, 18663, 290, 12188, 4780, 9679, 7150, 201, 198, 11748, 28686, 11, 25064, 201, 198, 6738, 16161, 1330, 9653, 201, 198, 6738, 16161, 13, 31391, 13, 22602, 1330, ...
2.547464
769
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 393, 517, 198, 2, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 9387, 351, 198, 2, 428, 670, 329, 3224, 1321, 5115, 6634, 9238, 13, 198, 2, 383, 7054, 37, ...
3.757511
466
#!/usr/bin/env python3 ''' Copyright 2018, VDMS Licensed under the terms of the BSD 2-clause license. See LICENSE file for terms. /collated endpoints. Designed to return info about audit by audit, pop & srvtype. Accepts a regex filter for the main name ```swagger-yaml /collated/{collatedType}/ : get: descripti...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 7061, 6, 198, 15269, 2864, 11, 569, 35, 5653, 198, 26656, 15385, 739, 262, 2846, 286, 262, 347, 10305, 362, 12, 565, 682, 5964, 13, 4091, 38559, 24290, 2393, 329, 2846, 13, ...
2.650519
867
# add.py # The CIL add instruction # Copyright 2010 Marty Dill - see LICENSE for details from Instruction import Instruction import unittest from Stack import StackStateException from Instructions.Instruction import register from Variable import Variable register('add', add)
[ 2, 751, 13, 9078, 198, 2, 383, 327, 4146, 751, 12064, 198, 2, 15069, 3050, 29876, 44322, 532, 766, 38559, 24290, 329, 3307, 198, 198, 6738, 46486, 1330, 46486, 198, 11748, 555, 715, 395, 198, 6738, 23881, 1330, 23881, 9012, 16922, 198...
4.444444
63
#!/Users/denisroldan/Projects/talentum-2015-examples/python/demo-django/env/bin/python from django.core import management if __name__ == "__main__": management.execute_from_command_line()
[ 2, 48443, 14490, 14, 6559, 271, 305, 335, 272, 14, 16775, 82, 14, 39240, 298, 388, 12, 4626, 12, 1069, 12629, 14, 29412, 14, 9536, 78, 12, 28241, 14208, 14, 24330, 14, 8800, 14, 29412, 198, 6738, 42625, 14208, 13, 7295, 1330, 4542, ...
2.757143
70
# this file contains only those settings which are used in developing phase # and extends base.py settings, which has all the default settings from django_reusable.settings.base import * from django_reusable.settings.third_party import * # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ...
[ 2, 428, 2393, 4909, 691, 883, 6460, 543, 389, 973, 287, 5922, 7108, 198, 2, 290, 14582, 2779, 13, 9078, 6460, 11, 543, 468, 477, 262, 4277, 6460, 198, 198, 6738, 42625, 14208, 62, 260, 31979, 13, 33692, 13, 8692, 1330, 1635, 198, ...
2.809045
199
# Lint as: python2, python3 # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
[ 2, 406, 600, 355, 25, 21015, 17, 11, 21015, 18, 198, 2, 15069, 13130, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 1...
2.716828
1,236
"""Manager Messages.""" from enum import Enum from pathlib import Path from typing import Dict, Optional from pydantic import BaseModel from astoria import __version__ from astoria.common.code_status import CodeStatus from astoria.common.disks import DiskInfo, DiskTypeCalculator, DiskUUID from astoria.common.metadata...
[ 37811, 13511, 43534, 526, 15931, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 360, 713, 11, 32233, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 198, 198, 6738, 6468, 7661, 1330, 1...
2.673854
742
size = int(input()) matrix = [] for _ in range(size): matrix.append([int(x) for x in input().split()]) primary_diagonal_sum = 0 secondary_diagonal_sum = 0 for i in range(len(matrix)): primary_diagonal_sum += matrix[i][i] secondary_diagonal_sum += matrix[i][size - i - 1] total = abs(primary_diagonal_sum...
[ 7857, 796, 493, 7, 15414, 28955, 198, 198, 6759, 8609, 796, 17635, 198, 198, 1640, 4808, 287, 2837, 7, 7857, 2599, 198, 220, 220, 220, 17593, 13, 33295, 26933, 600, 7, 87, 8, 329, 2124, 287, 5128, 22446, 35312, 3419, 12962, 198, 198...
2.615942
138
# -*- coding: utf-8 -*- from zvt.recorders.eastmoney.trading.holder_trading_recorder import * from zvt.recorders.eastmoney.trading.manager_trading_recorder import *
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 1976, 36540, 13, 8344, 6361, 13, 23316, 26316, 13, 2213, 4980, 13, 13829, 62, 2213, 4980, 62, 8344, 2875, 1330, 1635, 198, 6738, 1976, 36540, 13, 8344, 6361, 13, ...
2.75
60
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import sys import tensorflow as tf from dataset import load_data from vae import VAE from conv_vae import ConvVAE IMAGE_SIZE = 28 IMAGE_PIXELS = IMAGE_SIZE * IMAGE_SIZE # Define the VAE netw...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 198, 11748, 11192, 273, 11125, 355, 48700,...
3.072347
622
"""public facing api.""" from typing import Dict, Tuple import os import json import base64 from . import version as app_version from cogeo_mosaic.utils import get_hash, _aws_put_data from lambda_proxy.proxy import API app = API(name="cogeo-watchbot-api", debug=True) @app.route("/upload", methods=["POST"], cors=...
[ 37811, 11377, 6476, 40391, 526, 15931, 198, 198, 6738, 19720, 1330, 360, 713, 11, 309, 29291, 198, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 2779, 2414, 198, 198, 6738, 764, 1330, 2196, 355, 598, 62, 9641, 198, 6738, 763, 469, ...
2.571031
359
import os from .base import * # DEBUG # ------------------------------------------------------------------------------ DEBUG = True # SECRET CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#secret-key # Note: This key only used for development and testing. # -----------------------------------...
[ 11748, 28686, 198, 6738, 764, 8692, 1330, 1635, 198, 198, 2, 16959, 198, 2, 16529, 26171, 198, 30531, 796, 6407, 198, 198, 2, 10729, 26087, 25626, 4261, 6234, 198, 2, 4091, 25, 3740, 1378, 31628, 13, 28241, 648, 404, 305, 752, 13, 7...
3.247024
336
""" All of pandas' ExtensionArrays. See :ref:`extending.extension-types` for more. """ from pandas.core.arrays import ( Categorical, DatetimeArray, IntegerArray, IntervalArray, PandasArray, PeriodArray, SparseArray, TimedeltaArray) __all__ = [ 'Categorical', 'DatetimeArray', 'IntegerArray', 'I...
[ 37811, 198, 3237, 286, 19798, 292, 6, 27995, 3163, 20477, 13, 198, 198, 6214, 1058, 5420, 25, 63, 2302, 1571, 13, 2302, 3004, 12, 19199, 63, 329, 517, 13, 198, 37811, 198, 6738, 19798, 292, 13, 7295, 13, 3258, 592, 1330, 357, 198, ...
2.552147
163
import mmcv import numpy as np from mmdet3d.core.points import BasePoints, get_points_type from mmdet.datasets.builder import PIPELINES from mmdet.datasets.pipelines import LoadAnnotations @PIPELINES.register_module() class MyResize(object): """Resize images & bbox & mask. This transform resizes the input i...
[ 11748, 8085, 33967, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 8085, 15255, 18, 67, 13, 7295, 13, 13033, 1330, 7308, 40710, 11, 651, 62, 13033, 62, 4906, 198, 6738, 8085, 15255, 13, 19608, 292, 1039, 13, 38272, 1330, 350, 406...
2.200555
15,143
import os from multiprocessing.dummy import Pool as ThreadPool import requests import xlsxwriter from pyslurpers import JsonSlurper from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry if __name__ == "__main__": total_seconds = 0 config = JsonSlurper.create( file_n...
[ 11748, 28686, 198, 6738, 18540, 305, 919, 278, 13, 67, 13513, 1330, 19850, 355, 14122, 27201, 198, 198, 11748, 7007, 198, 11748, 2124, 7278, 87, 16002, 198, 6738, 279, 893, 75, 333, 19276, 1330, 449, 1559, 11122, 333, 525, 198, 6738, ...
2.537594
1,330
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 393, 517, 198, 2, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 9387, 351, 198, 2, 428, 670, 329, 3224, 1321, 5115, 6634, 9238, 13, 198, 2, 383, 7054, 37, ...
2.423253
1,531
import json import os import time import unittest from contextlib import closing import requests from arch.api.utils import file_utils from fate_flow.settings import HTTP_PORT, API_VERSION if __name__ == '__main__': unittest.main()
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 555, 715, 395, 198, 6738, 4732, 8019, 1330, 9605, 198, 198, 11748, 7007, 198, 6738, 3934, 13, 15042, 13, 26791, 1330, 2393, 62, 26791, 198, 198, 6738, 10030, 62, 11125, 13, ...
3.24
75
from django.conf.urls import patterns, url from projects.views import ProjectsView urlpatterns = patterns('', url(r'^$', ProjectsView.as_view(), name='list'), )
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 19016, 198, 6738, 4493, 13, 33571, 1330, 29898, 7680, 198, 198, 6371, 33279, 82, 796, 7572, 10786, 3256, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 3, 3256, 29898, 7680, 13,...
3.074074
54
# dataframe: a data-frame implementation using method piping # # Copyright (C) 2016 Simon Dirmeier # # This file is part of dataframe. # # dataframe is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either versi...
[ 2, 1366, 14535, 25, 257, 1366, 12, 14535, 7822, 1262, 2446, 48426, 198, 2, 198, 2, 15069, 357, 34, 8, 1584, 11288, 36202, 49468, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 1366, 14535, 13, 198, 2, 198, 2, 1366, 14535, 318, 1479, ...
2.933063
493
my_list = ['Monty', 'Python'] delimiter = ' ' output = delimiter.join(my_list) print(output)
[ 1820, 62, 4868, 796, 37250, 26031, 88, 3256, 705, 37906, 20520, 198, 12381, 320, 2676, 796, 705, 705, 198, 22915, 796, 46728, 2676, 13, 22179, 7, 1820, 62, 4868, 8, 198, 4798, 7, 22915, 8 ]
2.628571
35
# TODO(colin): fix these lint errors (http://pep8.readthedocs.io/en/release-1.7.x/intro.html#error-codes) # pep8-disable:E128 """Tests for compile_topic_icons.py""" from __future__ import absolute_import import cStringIO import json import os import shutil import PIL.Image from shared.testutil import testsize from ...
[ 2, 16926, 46, 7, 4033, 259, 2599, 4259, 777, 300, 600, 8563, 357, 4023, 1378, 431, 79, 23, 13, 961, 83, 704, 420, 82, 13, 952, 14, 268, 14, 20979, 12, 16, 13, 22, 13, 87, 14, 600, 305, 13, 6494, 2, 18224, 12, 40148, 8, 198, ...
2.160215
930
#!/usr/bin/env python3 import sys from common import eprint from pathlib import Path import argparse import pathlib if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 25064, 198, 6738, 2219, 1330, 304, 4798, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 1822, 29572, 198, 11748, 3108, 8019, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, ...
3.018868
53
# coding=utf-8 from test_base import BaseTestCase if __name__ == '__main__': TestCase.main()
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 6738, 1332, 62, 8692, 1330, 7308, 14402, 20448, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 6208, 20448, 13, 12417, 3419, 198 ]
2.589744
39
import cv2 import numpy as np import matplotlib.pyplot as plt def preprocess(image, erodeK, blurK, blurSigma, lowT, upT): """ Preprocess an image by eroding (opt.), blurring (opt.), and then applying Canny edge detector. Args - image: numpy nd-array of dim (m, n, c) - erodeK: size ...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628, 198, 4299, 662, 14681, 7, 9060, 11, 1931, 1098, 42, 11, 23671, 42, 11, 23671, 50, 13495, 11, 1877, 51, 11, ...
2.1804
1,602
#========================================================================= # __init__ #========================================================================= from ValRdyBundle import InValRdyBundle, OutValRdyBundle from ParentChildBundle import ParentReqRespBundle, ChildReqRespBundle from NetMsg ...
[ 2, 23926, 2559, 28, 198, 2, 11593, 15003, 834, 198, 2, 23926, 2559, 28, 198, 198, 6738, 3254, 49, 9892, 33, 31249, 220, 220, 220, 220, 220, 220, 220, 1330, 554, 7762, 49, 9892, 33, 31249, 11, 3806, 7762, 49, 9892, 33, 31249, 198, ...
2.540441
272
guest=['Alberto','Miguel','Jose','Luis'] print('Hola '+guest[0]+', te gustaría cenar esta noche?') print('Hola '+guest[1]+', te gustaría cenar esta noche?') print('Hola '+guest[2]+', te gustaría cenar esta noche?') print('Hola '+guest[3]+', te gustaría cenar esta noche?') print() print(guest[1]) guest[1] = 'Eduardo' p...
[ 5162, 395, 28, 17816, 2348, 32371, 41707, 44, 328, 2731, 41707, 23409, 41707, 25596, 271, 20520, 198, 4798, 10786, 39, 5708, 705, 10, 5162, 395, 58, 15, 48688, 3256, 573, 35253, 283, 29690, 269, 268, 283, 1556, 64, 299, 30848, 8348, 8...
2.27673
795
""" This file defines utilities used to enforce user roles. """ from flask import current_user from functools import wraps from enum import Enum
[ 37811, 770, 2393, 15738, 20081, 973, 284, 4605, 2836, 9176, 13, 37227, 198, 6738, 42903, 1330, 1459, 62, 7220, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 33829, 1330, 2039, 388, 198 ]
4.393939
33
# -*- coding: utf-8 -*- # Copyright (c) 2018 MIT Probabilistic Computing Project. # Released under Apache 2.0; refer to LICENSE.txt. from collections import Counter import numpy as np from cgpm.utils.general import get_prng from cgpm2.crp import CRP from cgpm2.normal import Normal from cgpm2.flexible_rowmix impor...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 357, 66, 8, 2864, 17168, 30873, 14991, 2569, 38589, 4935, 13, 198, 2, 28728, 739, 24843, 362, 13, 15, 26, 3522, 284, 38559, 24290, 13, 14116, 13, 198, ...
2.941799
189
import logging import time from sys import stderr, stdout, exit from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser, Namespace from signal import SIGINT, SIGTERM, Signals, sigwait from typing import Any, Dict, Optional from daemon.daemon import DaemonContext # type: ignore[reportMissingTypeStubs] from ...
[ 11748, 18931, 198, 11748, 640, 198, 6738, 25064, 1330, 336, 1082, 81, 11, 14367, 448, 11, 8420, 198, 6738, 1822, 29572, 1330, 45751, 7469, 13185, 22087, 8479, 1436, 11, 45751, 46677, 11, 28531, 10223, 198, 6738, 6737, 1330, 33993, 12394, ...
3.360902
133
# -*- coding: utf-8 -*- """ Utility/common code of library. """ __author__ = 'Grzegorz Latuszek, Marcin Usielski, Michal Ernst, Tomasz Krol' __copyright__ = 'Copyright (C) 2018-2021, Nokia' __email__ = 'grzegorz.latuszek@nokia.com, marcin.usielski@nokia.com, michal.ernst@nokia.com, tomasz.krol@nokia.com' import loggi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 18274, 879, 14, 11321, 2438, 286, 5888, 13, 198, 37811, 198, 198, 834, 9800, 834, 796, 705, 8642, 89, 1533, 273, 89, 5476, 385, 43130, 11, 13067, 259, 4021...
2.990826
218
import time import socket import re import select import errno import os import sys import platform import subprocess as ssubprocess import sshuttle.helpers as helpers from sshuttle.helpers import log, debug1, debug2, debug3 POLL_TIME = 60 * 15 NETSTAT_POLL_TIME = 30 CACHEFILE = os.path.expanduser('~/.sshuttle.hosts'...
[ 11748, 640, 198, 11748, 17802, 198, 11748, 302, 198, 11748, 2922, 198, 11748, 11454, 3919, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 3859, 198, 198, 11748, 850, 14681, 355, 264, 7266, 14681, 198, 11748, 26678, 315, 7100, 13, 16794...
2.546256
227
# Library imports import sys import numpy as np # User defined library imports from file_read import read_shp, get_values from grid import create_grid from a_star import search from prompt_read import read_search_prompt, read_grid_prompt # Locate file pats path = "shape/crime_dt" # Get data's into data frame df, bbo...
[ 2, 10074, 17944, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 11787, 5447, 5888, 17944, 198, 6738, 2393, 62, 961, 1330, 1100, 62, 1477, 79, 11, 651, 62, 27160, 198, 6738, 10706, 1330, 2251, 62, 25928, 198, 6738,...
3.165385
260
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628 ]
3.333333
6
import torch import torch.optim as optim import torch.nn as nn import numpy as np import pickle device = "cuda" if torch.cuda.is_available() else "cpu" # returns two zero tensors for the initial state of the lstm
[ 11748, 28034, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 198, 25202, 796, 366, 66, 15339, 1, 611, 28034, 13, 66, 15339, 13, 271,...
3.140845
71
import discord from discord.ext import commands
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198 ]
4.8
10
import os import logging
[ 11748, 28686, 198, 11748, 18931, 628 ]
4.333333
6
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628 ]
3.75
8
import skopt import os import numpy as np import shutil import sys os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' from framework import lib from framework import model_neural_trad from framework import evaluation from framework import data from framework import config #######################################################...
[ 11748, 1341, 8738, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4423, 346, 198, 11748, 25064, 198, 418, 13, 268, 2268, 17816, 10234, 62, 8697, 47, 62, 23678, 62, 25294, 62, 2538, 18697, 20520, 796, 705, 17, 6, 19...
1.882542
14,320
from __future__ import print_function # # I should write a decent test of the python binding... # import sys, os, DLFCN sys.setdlopenflags(DLFCN.RTLD_GLOBAL+DLFCN.RTLD_LAZY) from pluginCondDBPyInterface import * a = FWIncantation() os.putenv("CORAL_AUTH_PATH","/afs/cern.ch/cms/DB/conddb") rdbms = RDBMS() dbName = ...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 2, 198, 2, 314, 815, 3551, 257, 7709, 1332, 286, 262, 21015, 12765, 986, 198, 2, 628, 198, 198, 11748, 25064, 11, 28686, 11, 23641, 4851, 45, 198, 17597, 13, 2617, 25404, 9654, 331...
2.385542
249
from emannotationschemas.models import make_dataset_models, InvalidSchemaField from emannotationschemas.models import make_annotation_model_from_schema from emannotationschemas.models import Base import pytest import marshmallow as mm
[ 6738, 795, 34574, 602, 2395, 5356, 13, 27530, 1330, 787, 62, 19608, 292, 316, 62, 27530, 11, 17665, 27054, 2611, 15878, 198, 6738, 795, 34574, 602, 2395, 5356, 13, 27530, 1330, 787, 62, 1236, 14221, 62, 19849, 62, 6738, 62, 15952, 261...
3.646154
65
""" The canonical example of a function that can't be learned with a simple linear model is XOR """ import numpy as np from joelnet.train import train from joelnet.nn import NeuralNet from joelnet.layers import Linear, Tanh inputs = np.array([ [0, 0], [1, 0], [0, 1], [1, 1] ]) targets = np.array([ ...
[ 37811, 198, 464, 40091, 1672, 286, 257, 2163, 326, 460, 470, 307, 198, 35720, 276, 351, 257, 2829, 14174, 2746, 318, 1395, 1581, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 2525, 417, 3262, 13, 27432, 1330, 4512, 1...
2.326923
260
import sys, uuid from collections import namedtuple import seqtools.structure.transcript from seqtools.range import GenomicRange Bed12Options = namedtuple('Bed12Options', ['sequence', 'ref', 'gene_name', 'payload']) Bed12Fields = namedtuple('Bed12Fields', [ 'chrom', 'chromStart', 'chromE...
[ 11748, 25064, 11, 334, 27112, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 33756, 31391, 13, 301, 5620, 13, 7645, 6519, 198, 6738, 33756, 31391, 13, 9521, 1330, 5215, 10179, 17257, 198, 198, 45896, 1065, 29046, 796, 3706, 83, 29...
2.235802
810
#! /usr/bin/python import sys, struct import xml.dom.minidom from lmcp import LMCPObject ## =============================================================================== ## Authors: AFRL/RQQA ## Organization: Air Force Research Laboratory, Aerospace Systems Directorate, Power and Control Division ## ## Copyright (...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 25064, 11, 2878, 198, 11748, 35555, 13, 3438, 13, 1084, 312, 296, 198, 6738, 300, 76, 13155, 1330, 37125, 8697, 10267, 198, 198, 2235, 38093, 25609, 855, 198, 2235, 46665, 25, ...
4.25731
171
import machine import ubinascii # These defaults are overwritten with the contents of /config.json by # load_config() CONFIG = { "broker": "192.168.1.19", "sensor_pin": 0, "led_pin": 2, "client_id": b"esp8266_" + ubinascii.hexlify(machine.unique_id()), "topic": b"home", "sleep_seconds": 60, ...
[ 11748, 4572, 198, 11748, 334, 8800, 292, 979, 72, 198, 198, 2, 2312, 26235, 389, 6993, 9108, 351, 262, 10154, 286, 1220, 11250, 13, 17752, 416, 198, 2, 3440, 62, 11250, 3419, 198, 10943, 16254, 796, 1391, 198, 220, 220, 220, 366, 79...
2.185185
189
import time import redis import csv import sys import os conn = redis.Redis() filename = sys.argv[1] lines = [] read = csv.reader(open(filename)) lines = [l for l in read] nice = os.path.splitext(os.path.basename(filename))[0] # We are doing True so that we'll have a continual flow of data from # our sample data. ...
[ 11748, 640, 198, 11748, 2266, 271, 198, 11748, 269, 21370, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 37043, 796, 2266, 271, 13, 7738, 271, 3419, 198, 198, 34345, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 6615, 796, 17635, 198, ...
2.316614
319
from gcsa.gadget import Gadget from .base_serializer import BaseSerializer
[ 6738, 308, 6359, 64, 13, 70, 324, 1136, 1330, 39266, 198, 6738, 764, 8692, 62, 46911, 7509, 1330, 7308, 32634, 7509, 628 ]
3.454545
22
from django import forms
[ 6738, 42625, 14208, 1330, 5107 ]
4.8
5
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 357, 66, 8, 1946, 30446, 15503, 12, 11869, 446, 7712, 5834, 11, 406, 13, 47, 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, 239...
3.726829
205
import magma as m from riscv_mini.cache import make_CacheIO from riscv_mini.data_path import Datapath, make_HostIO from riscv_mini.control import Control
[ 11748, 2153, 2611, 355, 285, 198, 198, 6738, 374, 2304, 85, 62, 45313, 13, 23870, 1330, 787, 62, 30562, 9399, 198, 6738, 374, 2304, 85, 62, 45313, 13, 7890, 62, 6978, 1330, 16092, 499, 776, 11, 787, 62, 17932, 9399, 198, 6738, 374, ...
3
52
# main script # read in list of gendered words from genderwords # switch them through an intermediary step import csv import re with open ('./data/genderwords.csv') as words: reader = csv.reader(words) mydict = {row[0]: row[1] for row in reader} with open('./data/Harry.txt', 'r') as f1: with open...
[ 2, 1388, 4226, 198, 2, 1100, 287, 1351, 286, 308, 30398, 2456, 422, 5279, 10879, 198, 2, 5078, 606, 832, 281, 45193, 2239, 198, 198, 11748, 269, 21370, 198, 11748, 302, 198, 198, 4480, 1280, 357, 4458, 14, 7890, 14, 8388, 10879, 13,...
2.111111
1,080
import os, sys PROJECT_DIR = '/www/slicknot' activate_this = os.path.join(PROJECT_DIR, 'bin', 'activate_this.py') execfile(activate_this, dict(__file__=activate_this)) sys.path.append(PROJECT_DIR) from slicknot import app as application
[ 11748, 28686, 11, 25064, 198, 198, 31190, 23680, 62, 34720, 796, 31051, 2503, 14, 6649, 624, 1662, 6, 198, 198, 39022, 62, 5661, 796, 28686, 13, 6978, 13, 22179, 7, 31190, 23680, 62, 34720, 11, 705, 8800, 3256, 705, 39022, 62, 5661, ...
2.781609
87
#%% import pandas as pd import matplotlib.pyplot as plt import numpy as np df = pd.read_csv("data_eda.csv") # choose the relevant columns #%% df.columns #%% df_model = df[[ "avg_salary", "Rating", "Size", "Type of ownership", "Industry", "Sector", "Revenue", "num_comp", "hourly", ...
[ 2, 16626, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 198, 7568, 796, 279, 67, 13, 961, 62, 40664, 7203, 7890, 62, 18082, 13, 40664, 49...
1.86258
2,496
from moonfire_tokenomics.data_types import Allocation, AllocationRecord, Blockchain, Category, CommonType, Sector, Token bond = Token( name="BOND", project="Barnbridge", sector=Sector.DEFI, blockchain=[Blockchain.ETH], category=[Category.GOV], capped=True, allocations=[ Allocation( ...
[ 6738, 8824, 6495, 62, 30001, 31994, 13, 7890, 62, 19199, 1330, 1439, 5040, 11, 1439, 5040, 23739, 11, 29724, 11, 21743, 11, 8070, 6030, 11, 25892, 11, 29130, 198, 198, 65, 623, 796, 29130, 7, 198, 220, 220, 220, 1438, 2625, 33, 1867...
2.293924
609
from bisect import insort from bsddb3 import db from builtins import object from builtins import range from collections import Counter from collections import MutableMapping from collections import defaultdict from copy import copy from copy import deepcopy from distutils.spawn import find_executable from functools imp...
[ 6738, 47457, 478, 1330, 1035, 419, 198, 6738, 275, 82, 1860, 65, 18, 1330, 20613, 198, 6738, 3170, 1040, 1330, 2134, 198, 6738, 3170, 1040, 1330, 2837, 198, 6738, 17268, 1330, 15034, 198, 6738, 17268, 1330, 13859, 540, 44, 5912, 198, ...
3.712206
893
class Base(object): """ A class which ensures all subclasses have a basic override of the to string method, and a toLily method """ def toLily(self): ''' Method which in any sub classes produces a string, which is a line of lilypond scripting representing the class and its var...
[ 198, 4871, 7308, 7, 15252, 2599, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 317, 1398, 543, 19047, 477, 850, 37724, 423, 257, 4096, 20957, 286, 262, 284, 4731, 2446, 11, 290, 257, 284, 43, 813, 2446, 198, 220, 220, 220, 37227, ...
2.810458
153
import warnings from abc import ABC from typing import List from requests import Response from pybokio._routers.account_routers import AccountIsAuthenticatedRouter, AccountLoginRouter, AccountLogoutRouter from pybokio.client._base_client import BaseClient from pybokio.exceptions import AuthenticationError from pyboki...
[ 11748, 14601, 198, 6738, 450, 66, 1330, 9738, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 7007, 1330, 18261, 198, 198, 6738, 12972, 65, 482, 952, 13557, 472, 1010, 13, 23317, 62, 472, 1010, 1330, 10781, 3792, 47649, 3474, 49, 39605, ...
3.901099
91
""" Unit and regression test for the molssi_2019 package. """ # Import package, test suite, and other packages as needed import molssi_2019 import pytest import sys def test_molssi_2019_imported(): """Sample test, will always pass so long as import statement worked""" assert "molssi_2019" in sys.modules
[ 37811, 198, 26453, 290, 20683, 1332, 329, 262, 18605, 824, 72, 62, 23344, 5301, 13, 198, 37811, 198, 198, 2, 17267, 5301, 11, 1332, 18389, 11, 290, 584, 10392, 355, 2622, 198, 11748, 18605, 824, 72, 62, 23344, 198, 11748, 12972, 9288,...
3.351064
94
from django.conf import settings from rest_framework.routers import DefaultRouter, SimpleRouter from bmh_lims.users.api.views import UserViewSet from bmh_lims.database.api.views import SampleViewSet, WorkflowBatchViewSet, LabViewSet, ProjectViewSet, \ WorkflowSampleViewSet, WorkflowDefinitionViewSet, WorkflowSampl...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 1334, 62, 30604, 13, 472, 1010, 1330, 15161, 49, 39605, 11, 17427, 49, 39605, 198, 198, 6738, 275, 76, 71, 62, 2475, 82, 13, 18417, 13, 15042, 13, 33571, 1330, 11787, 7680, 7248, ...
3.239521
334
# Classes are templates, objects are instances of that class. # I'll use coins as examples of classes and objects : coin1 = Penny() # Instantiating the coin class to this coin1 object. print(type()) # Should print <class'__main__Penny'> coin1.value # Should print out 1.0
[ 2, 38884, 389, 24019, 11, 5563, 389, 10245, 286, 326, 1398, 13, 198, 198, 2, 314, 1183, 779, 10796, 355, 6096, 286, 6097, 290, 5563, 1058, 198, 198, 3630, 16, 796, 25965, 3419, 1303, 2262, 17096, 803, 262, 10752, 1398, 284, 428, 107...
3.571429
77
import cv2 import numpy as np import matplotlib import matplotlib.pyplot as plt import numpy import math img = cv2.imread('thinning.png',0) nodes = [] nodeMap = np.empty([512, 512], dtype=int) edgesOfNodes = [] edges = [] #I need list of all edges with duplicates #[start id] [end id] #each edge can have connectio...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 198, 11748, 10688, 198, 198, 9600, 796, 269, 85, 17, 13, 320,...
2.111194
4,011
from lecturelists import * import requests import re import schedule import time with open('token.txt', 'r') as f: bot_token = f.read().replace('\n','') with open('secret.txt', 'r') as f: err_bot_token, admin_no = f.read().replace('\n','').split(',') handler() schedule.every(1).minutes.do(handler) while True: s...
[ 6738, 19143, 20713, 1330, 1635, 198, 11748, 7007, 198, 11748, 302, 198, 11748, 7269, 198, 11748, 640, 198, 198, 4480, 1280, 10786, 30001, 13, 14116, 3256, 705, 81, 11537, 355, 277, 25, 198, 197, 13645, 62, 30001, 796, 277, 13, 961, 22...
2.671642
134
#! /usr/bin/python3 # A Motor class used for abstraction purposes
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 18, 198, 198, 2, 317, 12533, 1398, 973, 329, 34651, 4959, 198 ]
3.35
20
from sklearn.model_selection import StratifiedShuffleSplit from sklearn.datasets import make_classification from .scorer import Scorer def test_classification(models, one_hot=False): ''' ''' for name, model in models.items(): X, y = make_classification( n_samples=10000, n_...
[ 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 29186, 1431, 2484, 18137, 41205, 198, 6738, 1341, 35720, 13, 19608, 292, 1039, 1330, 787, 62, 4871, 2649, 198, 6738, 764, 1416, 11934, 1330, 1446, 11934, 628, 198, 4299, 1332, 62, 4871, 264...
2.051111
450
#!/usr/bin/env python # tests.memtest # Short script to exercise the corpus reader memory usage. # # Author: Benjamin Bengfort <bbengfort@districtdatalabs.com> # Created: Tue Apr 19 16:38:28 2016 -0400 # # Copyright (C) 2016 District Data Labs # For license information, see LICENSE.txt # # ID: memtest.py [0753dd0] b...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 5254, 13, 11883, 9288, 198, 2, 10073, 4226, 284, 5517, 262, 35789, 9173, 4088, 8748, 13, 198, 2, 198, 2, 6434, 25, 220, 220, 14533, 14964, 3319, 1279, 11848, 1516, 3319, 31, 17080...
2.339391
2,036
import pytest from lxml.etree import XPathEvalError from pat import pat def test_valid_xpath(html_blob): """Ensures a valid XPath produces results """ # extract only the first table xpath = '/descendant::table[1]' results = pat(html_blob, xpath_query=xpath) assert len(results) == 1 def t...
[ 11748, 12972, 9288, 198, 198, 6738, 300, 19875, 13, 316, 631, 1330, 11961, 776, 36, 2100, 12331, 198, 198, 6738, 1458, 1330, 1458, 628, 198, 4299, 1332, 62, 12102, 62, 87, 6978, 7, 6494, 62, 2436, 672, 2599, 198, 220, 220, 220, 3722...
2.561644
219
# Generated by Django 2.2.6 on 2019-10-14 02:47 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 21, 319, 13130, 12, 940, 12, 1415, 7816, 25, 2857, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 142...
3.019231
52
#Programs that calculate the averages of numbers. #call the program from main. #The first program is for a set amount of three numbers. #The second program is more flexible for a user defined amount of numbers. main()
[ 2, 15167, 82, 326, 15284, 262, 25694, 286, 3146, 13, 201, 198, 201, 198, 201, 198, 2, 13345, 262, 1430, 422, 1388, 13, 201, 198, 201, 198, 2, 464, 717, 1430, 318, 329, 257, 900, 2033, 286, 1115, 3146, 13, 201, 198, 201, 198, 2, ...
3.338028
71
import datetime import platform import dico import dico_command import psutil from dico.utils import rgb from . import __version__ from .utils import parse_bytesize, parse_second try: from dico_interaction import __version__ as __inter_version__ except ImportError: __inter_version__ = None privileged = ["GU...
[ 11748, 4818, 8079, 198, 11748, 3859, 198, 198, 11748, 288, 3713, 198, 11748, 288, 3713, 62, 21812, 198, 11748, 26692, 22602, 198, 6738, 288, 3713, 13, 26791, 1330, 46140, 198, 198, 6738, 764, 1330, 11593, 9641, 834, 198, 6738, 764, 2679...
3.094828
116
from sys import stdout import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy.signal import savgol_filter from sklearn.cross_decomposition import PLSRegression from sklearn.model_selection import cross_val_predict from sklearn.metrics import mean_squared_error, r2_score # dataset data = pd...
[ 6738, 25064, 1330, 14367, 448, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 6738, 629, 541, 88, 13, 12683, 282, 1330, 6799, 70, 349, ...
2.170047
641
# -*- coding: utf-8 -*- # @Time : 2019/5/11 15:12 # @Author : LegenDong # @User : legendong # @File : __init__.py.py # @Software: PyCharm from .channel_attention_layer import * from .nan_attention_layer import *
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 13130, 14, 20, 14, 1157, 1315, 25, 1065, 198, 2, 2488, 13838, 220, 1058, 3564, 268, 35, 506, 198, 2, 2488, 12982, 220, 220, 220, ...
2.322917
96
import os from distutils.util import strtobool DEBUG = strtobool(os.environ.get('DEBUG', 'yes')) SECRET_KEY = os.environ.get('SECRET', 'defaultsecret') APPLICATION_ROOT = '/api/assistant' API_URL = 'http://localhost/api/accounts'
[ 11748, 28686, 198, 6738, 1233, 26791, 13, 22602, 1330, 965, 83, 672, 970, 198, 198, 30531, 796, 965, 83, 672, 970, 7, 418, 13, 268, 2268, 13, 1136, 10786, 30531, 3256, 705, 8505, 6, 4008, 198, 23683, 26087, 62, 20373, 796, 28686, 13...
2.697674
86
import math from metrics.Metric import Metric class TPRNormDiff(Metric): """ This metric calculates the normalized TPR difference. Multiple protected classes are treated as one large group, so that this compares the privileged class to all non-privileged classes as a group. """ class TNRNormDi...
[ 11748, 10688, 198, 198, 6738, 20731, 13, 9171, 1173, 1330, 3395, 1173, 628, 198, 4871, 309, 4805, 35393, 28813, 7, 9171, 1173, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 770, 18663, 43707, 262, 39279, 309, 4805, 3580, 13, 62...
2.682058
758
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
2.329943
3,146
import sys import os from BWSTableEditors import * # returns value and modify_mode if __name__ == '__main__': main()
[ 11748, 25064, 198, 11748, 28686, 198, 6738, 37869, 2257, 540, 18378, 669, 1330, 1635, 628, 198, 2, 5860, 1988, 290, 13096, 62, 14171, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 13...
2.931818
44
from django.conf import settings from django.conf.urls import patterns, url from mapentity.registry import MapEntityOptions from geotrek.altimetry.views import (ElevationProfile, ElevationChart, ElevationArea, serve_elevation_chart) urlpatterns = patterns( '', url(r'^%s/p...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 19016, 198, 6738, 3975, 26858, 13, 2301, 4592, 1330, 9347, 32398, 29046, 198, 198, 6738, 4903, 313, 37818, 13, 2501, 320, 11973...
2.38764
178
import datetime import exceptions import string from dateutil import parser SCHEDULE_FIELDS = {'A': ['back_reference_sched_name', 'back_reference_tran_id_number', 'conduit_city', 'conduit_name', 'conduit_state', 'conduit_street1', 'conduit_street2', 'conduit_zip', 'contribution_aggregate', 'contribution_amount', 'con...
[ 11748, 4818, 8079, 198, 11748, 13269, 198, 11748, 4731, 198, 198, 6738, 3128, 22602, 1330, 30751, 198, 198, 50, 3398, 1961, 24212, 62, 11674, 3698, 5258, 796, 1391, 6, 32, 10354, 37250, 1891, 62, 35790, 62, 1416, 704, 62, 3672, 3256, ...
2.617647
5,236
# Equation (c) Baltasar 2019 MIT License <baltasarq@gmail.com> from equations.Equation import Equation from equations.Component import create from solver.solve import solve from parser import parser if __name__ == "__main__": eqs = parser("x = 5 + 3\n2 = y + 3\nz = x + y") print("\n".join([str(eq) for eq in e...
[ 2, 7889, 341, 357, 66, 8, 9035, 42391, 13130, 17168, 13789, 1279, 65, 2501, 42391, 80, 31, 14816, 13, 785, 29, 198, 198, 6738, 27490, 13, 23588, 341, 1330, 7889, 341, 198, 6738, 27490, 13, 21950, 1330, 2251, 198, 6738, 1540, 332, 13...
2.740157
127
from aiortc_media_proxy.server import init init()
[ 6738, 257, 72, 419, 66, 62, 11431, 62, 36436, 13, 15388, 1330, 2315, 198, 198, 15003, 3419, 198 ]
2.833333
18
import json import logging import os import sys from argparse import ArgumentParser import re import numpy as np import pandas as pd import torch from transformers import GPT2Tokenizer from src.data.cleaning import mask_not_na, inds_unique, mask_long_enough from src.data.nli import TransformersSeqPairDataset from src...
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 11748, 302, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28034, 198, 673...
2.410448
3,216
import os import platform import shutil import subprocess lib_filename = 'libterraform.dll' if platform.system() == 'Windows' else 'libterraform.so' header_filename = 'libterraform.h' tf_filename = 'libterraform.go' root = os.path.dirname(os.path.abspath(__file__)) terraform_dirname = os.path.join(root, 'terraform') t...
[ 11748, 28686, 198, 11748, 3859, 198, 11748, 4423, 346, 198, 11748, 850, 14681, 198, 198, 8019, 62, 34345, 796, 705, 8019, 353, 430, 687, 13, 12736, 6, 611, 3859, 13, 10057, 3419, 6624, 705, 11209, 6, 2073, 705, 8019, 353, 430, 687, ...
2.352089
1,173
import torch from torch.utils.data import DataLoader from baseline_module.baseline_model_builder import BaselineModelBuilder from config import BaselineConfig from data import AGNEWS_Dataset from tools import logging if __name__ == "__main__": baseline_model_builder = BaselineModelBuilder('AGNEWS', ...
[ 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 6738, 14805, 62, 21412, 13, 12093, 4470, 62, 19849, 62, 38272, 1330, 6455, 4470, 17633, 32875, 198, 6738, 4566, 1330, 6455, 4470, 16934, 198, 6738, 1366, 1330, ...
1.879541
523
from __future__ import absolute_import, division, print_function from gltbx.images import img_data inspector_img = img_data(width=32, height=32, mask=-1, encoded_data = """\ ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\ fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 6738, 1278, 83, 65, 87, 13, 17566, 1330, 33705, 62, 7890, 198, 198, 1040, 806, 273, 62, 9600, 796, 33705, 62, 7890, 7, 10394, 28, 2624, 11, 6001, 2...
1.837823
3,527
from solution import valid from solution import valid2 with open('input.txt', 'r') as f: passphrases = [p.split() for p in f] assert valid(['aa bb cc dd ee'.split()]) == 1 assert valid(['aa bb cc dd aa'.split()]) == 0 assert valid(['aa bb cc dd aaa'.split()]) == 1 print(valid(passphrases)) assert valid2(['abcde...
[ 6738, 4610, 1330, 4938, 198, 6738, 4610, 1330, 4938, 17, 198, 198, 4480, 1280, 10786, 15414, 13, 14116, 3256, 705, 81, 11537, 355, 277, 25, 198, 220, 220, 220, 1208, 746, 81, 1386, 796, 685, 79, 13, 35312, 3419, 329, 279, 287, 277, ...
2.559471
227
# Python Web Scraping # Title : requests # Date : 2020-08-10 # Creator : tunealog import requests res = requests.get("https://google.com") res_err = requests.get("https://tunealog.tistory.com") # Response Code : 200 - No Problem print("Response Code : ", res.status_code) # Response Code : 403 - Problem print("Respo...
[ 2, 11361, 5313, 1446, 2416, 278, 198, 198, 2, 11851, 1058, 7007, 198, 2, 7536, 1058, 12131, 12, 2919, 12, 940, 198, 2, 21038, 1058, 14009, 11794, 198, 198, 11748, 7007, 198, 411, 796, 7007, 13, 1136, 7203, 5450, 1378, 13297, 13, 785...
2.811321
265
import pyautogui import time import pyperclip # 打开审查元素位置 921.6 # 2022/01/15 urls = ["tomford-product.html?productId=400463&goodsId=524636&warehouseId=10","tomford-product.html?productId=413813&goodsId=537981&warehouseId=10","tomford-product.html?productId=438131&goodsId=562140&warehouseId=10","tomford-product.html?pro...
[ 11748, 12972, 2306, 519, 9019, 198, 11748, 640, 198, 11748, 12972, 525, 15036, 198, 198, 2, 10545, 231, 241, 28156, 222, 22522, 94, 162, 253, 98, 17739, 225, 163, 112, 254, 19526, 235, 163, 121, 106, 860, 2481, 13, 21, 198, 2, 33160...
2.008175
3,425
__author__ = ["Francisco Clavero"] __email__ = ["fcoclavero32@gmail.com"] __status__ = "Prototype" """ Ignite trainer for a Bimodal GAN architecture. """ from abc import ABC from typing import Callable from overrides import overrides from torch.nn import BCEWithLogitsLoss from vscvs.decorators import kwargs_param...
[ 834, 9800, 834, 796, 14631, 42885, 4861, 1012, 8770, 78, 8973, 198, 834, 12888, 834, 796, 14631, 16072, 420, 5031, 332, 78, 2624, 31, 14816, 13, 785, 8973, 198, 834, 13376, 834, 796, 366, 19703, 8690, 1, 628, 198, 37811, 16583, 578, ...
2.455242
2,871
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"generate_translator": "00_data.ipynb", "default_translator_path": "00_data.ipynb", "strip_html": "00_data.ipynb", "OriTraTranslation": "00_data.ipynb", "create_ori_trans_d...
[ 2, 47044, 7730, 1677, 1137, 11617, 11050, 41354, 39345, 0, 8410, 5626, 48483, 0, 198, 198, 834, 439, 834, 796, 14631, 9630, 1600, 366, 18170, 1600, 366, 23144, 62, 15390, 62, 28751, 1600, 366, 18300, 62, 6371, 8973, 198, 198, 9630, 79...
2.084932
365