content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# ########################################################## # FlatCAM: 2D Post-processing for Manufacturing # # File Author: Marius Adrian Stanciu (c) # # Date: 8/17/2019 # # MIT Licence # # #############...
[ 2, 1303, 29113, 14468, 7804, 2, 198, 2, 21939, 34, 2390, 25, 362, 35, 2947, 12, 36948, 329, 32760, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 9220, 6434, 25, 1526, 3754, 21462, 7299, 979, 84, 357, 66, 8...
2.165775
187
# -*- coding: utf-8 -*- """Class for the ogs COMPONENT_PROPERTIES file.""" from ogs5py.fileclasses.base import BlockFile
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 9487, 329, 262, 267, 14542, 24301, 1340, 3525, 62, 4805, 3185, 17395, 11015, 2393, 526, 15931, 201, 198, 6738, 267, 14542, 20, 9078, 13, 7753, 37724, 13, 869...
2.470588
51
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
[ 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 257, 4866, 286, 262, 13789, 379, 198, 2,...
2.234739
36,679
# # PySNMP MIB module XXX-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/XXX-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:44:42 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 27713, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490, 14, 67, 615, 47562, 19, 14, 13603,...
2.391815
104,049
from setuptools import setup # create __version__ exec(open('./_version.py').read()) setup( name="notedown", version=__version__, description="Convert markdown to IPython notebook.", author="Aaron O'Leary", author_email='dev@aaren.me', url='http://github.com/aaren/notedown', install_requir...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 2, 2251, 11593, 9641, 834, 198, 18558, 7, 9654, 7, 4458, 47835, 9641, 13, 9078, 27691, 961, 28955, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 1662, 276, 593, 1600, 198, 220, 22...
2.413043
184
# This is a reusable webcraawler architecture that can be adapted to scrape any webstie. # RESULTS: # Roughly 24 seconds per thousand courses scraped for ThreadPoolExecutor vs 63s for unthreaded script. # This is a very basic implementation of multithreading in order to show the proof of concept, but is a good base to...
[ 2, 770, 318, 257, 42339, 3992, 66, 430, 707, 1754, 10959, 326, 460, 307, 16573, 284, 42778, 597, 3992, 301, 494, 13, 198, 198, 2, 15731, 35342, 25, 198, 2, 29949, 306, 1987, 4201, 583, 7319, 10902, 15881, 276, 329, 14122, 27201, 230...
3.782609
230
from typing import List, Optional, NewType, Tuple, NamedTuple, Type import attr from jinja2 import Template as JinjaTemplate, StrictUndefined from genyrator.entities.Entity import Entity from genyrator.path import create_relative_path OutPath = NewType('OutPath', Tuple[List[str], str]) Import = NamedTuple('Import', ...
[ 6738, 19720, 1330, 7343, 11, 32233, 11, 968, 6030, 11, 309, 29291, 11, 34441, 51, 29291, 11, 5994, 198, 11748, 708, 81, 198, 6738, 474, 259, 6592, 17, 1330, 37350, 355, 17297, 6592, 30800, 11, 520, 2012, 31319, 18156, 198, 198, 6738, ...
2.60241
166
# uncompyle6 version 3.3.5 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)] # Embedded file name: c:\Jenkins\live\output\win_64_static\Release\python-bundle\MIDI Remote Scripts\Push2\mode_collector.py # Compiled at: 2018-11-30 15:48:11 from __fut...
[ 2, 34318, 2349, 21, 2196, 513, 13, 18, 13, 20, 198, 2, 11361, 18022, 8189, 362, 13, 22, 357, 21, 1828, 1157, 8, 198, 2, 4280, 3361, 3902, 422, 25, 11361, 513, 13, 22, 13, 18, 357, 12286, 11, 2758, 1987, 13130, 11, 1315, 25, 19...
2.807453
161
from gensim import corpora, models, similarities, matutils,utils from gensim.models import KeyedVectors import numpy as np #Word2vec Experiment testString = ['PAST_MEDICAL_HISTORY','PAST_SURGICAL_HISTORY','PHYSICAL_EXAMINATION'] ''' word_vectors = KeyedVectors.load_word2vec_format('~/Downloads/GoogleNews-vectors-negat...
[ 6738, 308, 641, 320, 1330, 3990, 64, 11, 4981, 11, 20594, 11, 2603, 26791, 11, 26791, 198, 6738, 308, 641, 320, 13, 27530, 1330, 7383, 276, 53, 478, 669, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 26449, 17, 35138, 29544, 198,...
2.741611
298
from base64 import decodestring as b64decode allowed_failures = [ 'https://ranobelib.me/', 'https://www.aixdzs.com/', 'https://webnovelindonesia.com/', b64decode("aHR0cHM6Ly9jb21yYWRlbWFvLmNvbS8=".encode()).decode() ] test_user_inputs = { b64decode("aHR0cHM6Ly9jb21yYWRlbWFvLmNvbS8=".encode()).deco...
[ 6738, 2779, 2414, 1330, 875, 375, 395, 1806, 355, 275, 2414, 12501, 1098, 198, 198, 40845, 62, 32165, 942, 796, 685, 198, 220, 220, 220, 705, 5450, 1378, 2596, 672, 417, 571, 13, 1326, 14, 3256, 198, 220, 220, 220, 705, 5450, 1378, ...
2.000632
4,748
#!/usr/bin/env python # coding: utf-8 # In[1]: import pandas as pd import re # In[2]: # In[3]: def textreader(text): '''Opens textfile and returns the content as a string''' with open(text, 'rt', encoding="utf8") as wiki: txtstring = wiki.read() return txtstring # In[44]: def...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 16, 5974, 628, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 302, 628, 198, 2, 554, 58, 17, 5974, 628, 220, 220, 220, ...
2.344918
1,525
import logging import json from dataclasses import dataclass from redis import Redis from typing import Iterable, Tuple, List, Iterator, Union, Dict from typing_extensions import TypedDict from backend import settings from caching.scripts import RedisScriptsPool from share.metaclasses import Singleton from radar.model...
[ 11748, 18931, 198, 11748, 33918, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 2266, 271, 1330, 2297, 271, 198, 6738, 19720, 1330, 40806, 540, 11, 309, 29291, 11, 7343, 11, 40806, 1352, 11, 4479, 11, 360, 713, 198, 6...
2.919192
198
# coding: utf-8 from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from django import forms from django.utils.translation import ugettext_lazy as _ from djangocms_baseplugins.baseplugin import defaults from djangocms_baseplugins.baseplugin.cms_plugins import BasePluginMixin from djangocm...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 269, 907, 13, 33803, 62, 8692, 1330, 40773, 37233, 14881, 198, 6738, 269, 907, 13, 33803, 62, 7742, 1330, 13877, 62, 7742, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, ...
3.355705
149
"""Utility functions for plotting. Author: Seth Axen E-mail: seth.axen@gmail.com""" from collections import deque import numpy as np def rgb_to_hsv(rgb): """Convert RGB colors to HSV colors.""" r, g, b = tuple(map(float, rgb)) if any([r > 1, g > 1, b > 1]): r /= 255. g /= 255. b ...
[ 37811, 18274, 879, 5499, 329, 29353, 13, 198, 198, 13838, 25, 20194, 12176, 268, 198, 36, 12, 4529, 25, 900, 71, 13, 897, 268, 31, 14816, 13, 785, 37811, 198, 6738, 17268, 1330, 390, 4188, 198, 198, 11748, 299, 32152, 355, 45941, 62...
1.80976
1,209
import pytest from utils.process import run, silent_run, RunError from utils.fs import in_temp_dir
[ 11748, 12972, 9288, 198, 198, 6738, 3384, 4487, 13, 14681, 1330, 1057, 11, 10574, 62, 5143, 11, 5660, 12331, 198, 6738, 3384, 4487, 13, 9501, 1330, 287, 62, 29510, 62, 15908, 628 ]
3.15625
32
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
[ 2, 10097, 32501, 198, 2, 15069, 357, 66, 8, 2321, 532, 2177, 11, 1052, 330, 13533, 11, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 45090, 416, 262, 347, 2088, 71, 7712, 4816, 13, 198, 2, 198, 2, 383, 1336, 5964, 318, 287, ...
7.580645
248
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ 2, 15069, 1584, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
2.021242
8,003
import struct from typing import Tuple from ledgercomm import Transport from boilerplate_client.boilerplate_cmd_builder import BoilerplateCommandBuilder, InsType from boilerplate_client.button import Button from boilerplate_client.exception import DeviceException from boilerplate_client.transaction import Transaction...
[ 11748, 2878, 198, 6738, 19720, 1330, 309, 29291, 198, 198, 6738, 37208, 9503, 1330, 19940, 198, 198, 6738, 36741, 6816, 62, 16366, 13, 2127, 5329, 6816, 62, 28758, 62, 38272, 1330, 3248, 5329, 6816, 21575, 32875, 11, 7088, 6030, 198, 67...
4.329268
82
import clpy import clpy.sparse.base _preamble_atomic_add = ''' #if __CUDA_ARCH__ < 600 __device__ double atomicAdd(double* address, double val) { unsigned long long* address_as_ull = (unsigned long long*)address; unsigned long long old = *address_as_ull, assumed; ...
[ 11748, 537, 9078, 198, 11748, 537, 9078, 13, 82, 29572, 13, 8692, 628, 198, 62, 79, 1476, 903, 62, 47116, 62, 2860, 796, 705, 7061, 198, 2, 361, 11593, 43633, 5631, 62, 31315, 834, 1279, 10053, 198, 834, 25202, 834, 4274, 17226, 455...
2.103571
280
from pytest import raises from discopy.cartesian import *
[ 6738, 12972, 9288, 1330, 12073, 198, 6738, 1221, 11081, 13, 26674, 35610, 1330, 1635, 628, 628, 628, 628 ]
3.611111
18
# A part of NonVisual Desktop Access (NVDA) # Copyright (C) 2007-2021 NV Access Limited, Babbage B.V., James Teh, Leonard de Ruijter, # Thomas Stivers, Accessolutions, Julien Cochuyt # This file is covered by the GNU General Public License. # See the file COPYING for more details. from typing import Any, Callabl...
[ 2, 317, 636, 286, 8504, 36259, 27850, 8798, 357, 27159, 5631, 8, 201, 198, 2, 15069, 357, 34, 8, 4343, 12, 1238, 2481, 23973, 8798, 15302, 11, 347, 32061, 347, 13, 53, 1539, 3700, 1665, 71, 11, 20131, 390, 11667, 2926, 353, 11, 20...
3.222813
9,600
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 770, 2438, 318, 636, 286, 1195, 1984, 270, 13, 198, 2, 198, 2, 357, 34, 8, 15069, 19764, 2177, 11, 33448, 13, 198, 2, 198, 2, 770, 2438, 318, 11971, 739, ...
3.350877
228
# Copyright 2019-present NAVER Corp. # Apache License v2.0 # Wonseok Hwang import os, json from copy import deepcopy from matplotlib.pylab import * import torch import torch.nn as nn import torch.nn.functional as F device = torch.device("cuda" if torch.cuda.is_available() else "cpu") from sqlova.utils.utils impor...
[ 2, 15069, 13130, 12, 25579, 11746, 5959, 11421, 13, 198, 2, 24843, 13789, 410, 17, 13, 15, 198, 198, 2, 370, 2591, 482, 367, 47562, 198, 198, 11748, 28686, 11, 33918, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 2603, 29487, 8019, ...
1.912207
2,130
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'Michael Liao' ''' async web application. ''' import logging; logging.basicConfig(level=logging.INFO) import asyncio, os, json, time from datetime import datetime from aiohttp import web loop = asyncio.get_event_loop() loop.run_until_complete(init(loop))...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 796, 705, 13256, 406, 13481, 6, 198, 198, 7061, 6, 198, 292, 13361, 3992, 3586, 13, 198, 7...
2.72
125
from __future__ import print_function import os import numpy as np import matplotlib.pyplot as plt import flopy fb = flopy.modflow.Modflow.load('freyberg', version='mf2005', model_ws=os.path.join('..', 'data', 'freyberg'), verbose=True) dis = fb.dis top = fb.dis.top fb.dis.top.plot(grid=True, colorbar=True) fb.d...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 11748, 781, 11081, 628, 198, 21855, 796, 781, 11081, 13, ...
2.4
285
from chia import components from chia.components.sample_transformers import identity from chia.components.sample_transformers.sample_transformer import SampleTransformer __all__ = ["SampleTransformer", "SampleTransformerFactory"]
[ 6738, 442, 544, 1330, 6805, 198, 6738, 442, 544, 13, 5589, 3906, 13, 39873, 62, 35636, 364, 1330, 5369, 198, 6738, 442, 544, 13, 5589, 3906, 13, 39873, 62, 35636, 364, 13, 39873, 62, 7645, 16354, 1330, 27565, 8291, 16354, 628, 198, ...
3.949153
59
# names = [] names.append('singi') names.append('lily') names.append('sam') print('I find a big dining-table,I can invite more friends.') names.insert(0, 'xiaoling') names.insert(2, 'fangsi') names.append('zhangqing') greets = ',would you like to have dinner with me ?' print(names[0]+greets) print(names[1]+greets)...
[ 2, 220, 198, 198, 14933, 796, 17635, 198, 14933, 13, 33295, 10786, 12215, 72, 11537, 198, 14933, 13, 33295, 10786, 75, 813, 11537, 198, 14933, 13, 33295, 10786, 37687, 11537, 198, 198, 4798, 10786, 40, 1064, 257, 1263, 17423, 12, 11487,...
2.591195
159
from django.template.defaultfilters import slugify from django.test import TestCase from package.models import Package, Version from pypi.slurper import Slurper TEST_PACKAGE_NAME = 'Django' TEST_PACKAGE_VERSION = '1.3' TEST_PACKAGE_REPO_NAME = 'django-uni-form'
[ 6738, 42625, 14208, 13, 28243, 13, 12286, 10379, 1010, 1330, 31065, 1958, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 5301, 13, 27530, 1330, 15717, 11, 10628, 198, 6738, 279, 4464, 72, 13, 6649, 333, 525, 1330,...
2.739583
96
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321...
5.354167
96
import inspect import numpy as np from pandas._libs import reduction as libreduction from pandas.util._decorators import cache_readonly from pandas.core.dtypes.common import ( is_dict_like, is_extension_array_dtype, is_list_like, is_sequence, ) from pandas.core.dtypes.generic import ABCSeries def f...
[ 11748, 10104, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 19798, 292, 13557, 8019, 82, 1330, 7741, 355, 9195, 445, 8110, 198, 6738, 19798, 292, 13, 22602, 13557, 12501, 273, 2024, 1330, 12940, 62, 961, 8807, 198, 198, 6738,...
2.246162
1,824
# -*- coding: utf-8 -*- """ @date: 2021/5/16 10:22 @file: test_shufflenetv1.py @author: zj @description: """ import torch from zcls.config import cfg from zcls.config.key_word import KEY_OUTPUT from zcls.model.recognizers.build import build_recognizer if __name__ == '__main__': test_shufflenet()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 31, 4475, 25, 33448, 14, 20, 14, 1433, 838, 25, 1828, 198, 31, 7753, 25, 1332, 62, 1477, 1648, 11925, 316, 85, 16, 13, 9078, 198, 31, 9800, 25, 19...
2.395349
129
#!/usr/bin/env pytest ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test /vsis3 # Author: Even Rouault <even dot rouault at spatialys dot com> # ############################################################################### # Copy...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 12972, 9288, 198, 29113, 29113, 7804, 4242, 21017, 198, 2, 720, 7390, 3, 198, 2, 198, 2, 4935, 25, 220, 27044, 1847, 14, 49656, 6208, 26264, 198, 2, 32039, 25, 220, 6208, 1220, 85, 13429, 18, ...
5.671395
1,269
import os.path from collections import Counter import pytest INPUT_TXT = os.path.join(os.path.dirname(__file__), 'input.txt') INPUT_S = '''\ 3,4,3,1,2 ''' EXPECTED = 5934 if __name__ == '__main__': raise SystemExit(main())
[ 11748, 28686, 13, 6978, 198, 6738, 17268, 1330, 15034, 198, 198, 11748, 12972, 9288, 198, 198, 1268, 30076, 62, 51, 25010, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 705, 15414, 13, 1...
2.383838
99
from selenium import webdriver browser = webdriver.Firefox() browser.get('http://localhost:8000') assert 'Django' in browser.title
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 198, 40259, 796, 3992, 26230, 13, 13543, 12792, 3419, 198, 40259, 13, 1136, 10786, 4023, 1378, 36750, 25, 33942, 11537, 198, 198, 30493, 705, 35, 73, 14208, 6, 287, 6444, 13, 7839 ]
3.3
40
#!/usr/bin/env python3 """ For the last column, print only the first character. Usage: $ printf "100,200\n0,\n" | python3 first_char_last_column.py Should print "100,2\n0," """ import csv from sys import stdin, stdout if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 1890, 262, 938, 5721, 11, 3601, 691, 262, 717, 2095, 13, 198, 28350, 25, 628, 220, 220, 220, 720, 30812, 366, 3064, 11, 2167, 59, 77, 15, 11, 59, 77, 1, 930, 2101...
2.582524
103
from pathlib import Path root = Path(__file__).parent.absolute() import envo envo.add_source_roots([root]) from pathlib import Path from typing import Any, Dict, List, Optional, Tuple from envo import Env, Namespace, env_var, logger, run from env_comm import StickybeakCommEnv as ParentEnv p = Namespace("p") T...
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 15763, 796, 10644, 7, 834, 7753, 834, 737, 8000, 13, 48546, 3419, 198, 198, 11748, 551, 13038, 198, 198, 268, 13038, 13, 2860, 62, 10459, 62, 19150, 26933, 15763, 12962, 198, 198, 6738, 3108, 8...
2.85124
121
from __future__ import print_function import zmq import time ADDR='tcp://127.0.0.1:11155' ctx = zmq.Context() srv = ctx.socket(zmq.REP) srv.bind(ADDR) #srv.setsockopt(zmq.RCVTIMEO, 3000); while True: try: msg = srv.recv() except Exception as e: print('zmq socket revc timedout:', e) else: print('cl...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 1976, 76, 80, 198, 11748, 640, 198, 198, 2885, 7707, 11639, 83, 13155, 1378, 16799, 13, 15, 13, 15, 13, 16, 25, 1157, 18742, 6, 198, 198, 49464, 796, 1976, 76, 80, 13, 219...
2.176796
181
"""Strip/reset AST in-place to match state after semantic analysis pass 1. Fine-grained incremental mode reruns semantic analysis (passes 2 and 3) and type checking for *existing* AST nodes (targets) when changes are propagated using fine-grained dependencies. AST nodes attributes are often changed during semantic an...
[ 37811, 1273, 5528, 14, 42503, 29273, 287, 12, 5372, 284, 2872, 1181, 706, 37865, 3781, 1208, 352, 13, 198, 198, 34389, 12, 2164, 1328, 29497, 4235, 302, 48381, 37865, 3781, 357, 6603, 274, 362, 290, 513, 8, 198, 392, 2099, 10627, 329,...
3.568129
866
import os import sys import shutil cwd_path = os.getcwd() sys.path.append(os.path.join(os.path.dirname(cwd_path), 'rt-thread', 'tools')) # BSP dist function
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 4423, 346, 198, 66, 16993, 62, 6978, 796, 28686, 13, 1136, 66, 16993, 3419, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 66, 16993, ...
2.507937
63
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) """This module contains utilities for using multi-methods in spack. You can think of multi-methods like overloaded methods...
[ 2, 15069, 2211, 12, 1238, 2481, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, ...
3.932249
369
# Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'conditions': [ ['OS!="win"', { 'variables': { 'config_h_dir': '.', # crafted for gcc/linux. }, }, { # else, ...
[ 2, 15069, 357, 66, 8, 3717, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 1...
2.060592
6,354
# def mul(a): # return lambda b:b*a # singler = mul(1) # addition = lambda b:b*1 # doubler = mul(2) # addition = lambda b:b*2 # tripler = mul(3) # addition = lambda b:b*3 # print(doubler(7)) # 7*2 = 14 # print(tripler(7)) # 7*3 = 21 # print(singler(7)) # 7*1 = 7 stud = BatchA("Thakor") print(stud.pr...
[ 2, 825, 35971, 7, 64, 2599, 198, 2, 220, 197, 7783, 37456, 275, 25, 65, 9, 64, 198, 198, 2, 1702, 1754, 796, 35971, 7, 16, 8, 220, 220, 220, 1303, 3090, 796, 37456, 275, 25, 65, 9, 16, 198, 2, 3385, 1754, 796, 35971, 7, 17, ...
2.011628
258
""" Create diaries in A5 and A4 sizes based on PDF templates. Julio Vega """ import datetime import math import sys from io import BytesIO from pathlib import Path from PyPDF2 import PdfFileReader, PdfFileWriter from reportlab.lib.pagesizes import A5, A4 from reportlab.lib.utils import ImageReader from reportlab.pdfb...
[ 37811, 198, 16447, 2566, 3166, 287, 317, 20, 290, 317, 19, 10620, 1912, 319, 12960, 24019, 13, 198, 198, 16980, 952, 30310, 198, 37811, 198, 11748, 4818, 8079, 198, 11748, 10688, 198, 11748, 25064, 198, 6738, 33245, 1330, 2750, 4879, 93...
2.724192
2,538
#!/usr/bin/env python import urllib2 import httplib from urlparse import urlparse import csv from wextractor.extractors.extractor import Extractor
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 2956, 297, 571, 17, 198, 11748, 1841, 489, 571, 198, 6738, 19016, 29572, 1330, 19016, 29572, 198, 11748, 269, 21370, 198, 198, 6738, 356, 742, 40450, 13, 2302, 974, 669, 13...
3.104167
48
#!/usr/bin/env python # Copyright 2014-2019 The PySCF Developers. 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 # # U...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 1946, 12, 23344, 383, 9485, 6173, 37, 34152, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341,...
2.242067
3,057
# Copyright (c) 2017-2018 {Flair Inc.} WESLEY PENG # # 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 agre...
[ 2, 15069, 357, 66, 8, 2177, 12, 7908, 1391, 7414, 958, 3457, 44587, 370, 1546, 25173, 350, 26808, 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...
3.810651
169
import crypto_tools from itertools import cycle vigenere.little_doc = vigenere_little_doc vigenere.full_doc = vigenere_full_doc
[ 11748, 21473, 62, 31391, 198, 6738, 340, 861, 10141, 1330, 6772, 628, 628, 628, 198, 198, 85, 9324, 567, 13, 31629, 62, 15390, 796, 410, 9324, 567, 62, 31629, 62, 15390, 198, 85, 9324, 567, 13, 12853, 62, 15390, 796, 410, 9324, 567,...
2.8125
48
""" Contexts are the "values" that Python would return. However Contexts are at the same time also the "contexts" that a user is currently sitting in. A ContextSet is typically used to specify the return of a function or any other static analysis operation. In jedi there are always multiple returns and not just one. "...
[ 37811, 198, 21947, 82, 389, 262, 366, 27160, 1, 326, 11361, 561, 1441, 13, 2102, 30532, 82, 389, 379, 262, 198, 31642, 640, 635, 262, 366, 22866, 82, 1, 326, 257, 2836, 318, 3058, 5586, 287, 13, 198, 198, 32, 30532, 7248, 318, 603...
2.438725
1,224
from typing import Tuple import click from .cmd import KiwiCommandType, KiwiCommand from .decorators import kiwi_command from ..executable import COMPOSE_EXE from ..instance import Instance from ..project import Project
[ 6738, 19720, 1330, 309, 29291, 198, 198, 11748, 3904, 198, 198, 6738, 764, 28758, 1330, 40011, 72, 21575, 6030, 11, 40011, 72, 21575, 198, 6738, 764, 12501, 273, 2024, 1330, 479, 14246, 72, 62, 21812, 198, 6738, 11485, 18558, 18187, 133...
3.716667
60
from . import ip __all__ = ['ip']
[ 6738, 764, 1330, 20966, 628, 198, 834, 439, 834, 796, 37250, 541, 20520, 198 ]
2.571429
14
from itertools import groupby
[ 6738, 340, 861, 10141, 1330, 1448, 1525, 628 ]
3.875
8
# -*- coding: UTF-8 -*- # !/usr/bin/python # @time :2019/5/10 9:13 # @author :Mo # @function :path of FeatureProject import pathlib import sys import os # base dir projectdir = str(pathlib.Path(os.path.abspath(__file__)).parent.parent) sys.path.append(projectdir) # path of BERT model model_dir...
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 201, 198, 2, 5145, 14, 14629, 14, 8800, 14, 29412, 201, 198, 2, 2488, 2435, 220, 220, 220, 220, 1058, 23344, 14, 20, 14, 940, 860, 25, 1485, 201, 198, 2, 2488, 9800, 220, ...
2.255814
258
"""Test for .prep.read module """ from hidrokit.prep import read import numpy as np import pandas as pd A = pd.DataFrame( data=[ [1, 3, 4, np.nan, 2, np.nan], [np.nan, 2, 3, np.nan, 1, 4], [2, np.nan, 1, 3, 4, np.nan] ], columns=['A', 'B', 'C', 'D', 'E', 'F'] ) A_date = A.set_inde...
[ 37811, 14402, 329, 764, 46012, 13, 961, 8265, 198, 37811, 198, 198, 6738, 24519, 305, 15813, 13, 46012, 1330, 1100, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 32, 796, 279, 67, 13, 6601, 19778,...
1.867987
303
from flasgger import swag_from from app.blueprints.base_blueprint import Blueprint, BaseBlueprint, request, Security, Auth from app.controllers.department_controller import DepartmentController url_prefix = '{}/departments'.format(BaseBlueprint.base_url_prefix) department_blueprint = Blueprint('department', __name__,...
[ 6738, 781, 292, 26679, 1330, 1509, 363, 62, 6738, 198, 198, 6738, 598, 13, 17585, 17190, 13, 8692, 62, 17585, 4798, 1330, 39932, 11, 7308, 14573, 4798, 11, 2581, 11, 4765, 11, 26828, 198, 6738, 598, 13, 3642, 36667, 13, 10378, 1823, ...
3.685185
108
import argparse from keras import optimizers import matplotlib.pyplot as plt import numpy as np import datetime from keras.callbacks import TensorBoard import glob import os import tensorflow as tf from models import * from utils.lr_controller import ReduceLROnPlateau from utils.data_loader import data_loader, data_loa...
[ 11748, 1822, 29572, 198, 6738, 41927, 292, 1330, 6436, 11341, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4818, 8079, 198, 6738, 41927, 292, 13, 13345, 10146, 1330, 309, ...
2.891187
2,417
import pandas as pd from catalyst.constants import LOG_LEVEL from catalyst.exchange.utils.stats_utils import prepare_stats from catalyst.gens.sim_engine import ( BAR, SESSION_START ) from logbook import Logger log = Logger('LiveGraphClock', level=LOG_LEVEL)
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 31357, 13, 9979, 1187, 1330, 41605, 62, 2538, 18697, 198, 6738, 31357, 13, 1069, 3803, 13, 26791, 13, 34242, 62, 26791, 1330, 8335, 62, 34242, 198, 6738, 31357, 13, 70, 641, 13, 14323, 62, ...
3.045455
88
# -*- coding: utf-8 -*- from __future__ import unicode_literals import inspect from task.models import InveraTask from api.utils import send_test_csv_report from django.contrib.auth.models import User from rest_framework.test import APIClient, APITestCase from rest_framework.reverse import reverse from rest_framewor...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 10104, 198, 198, 6738, 4876, 13, 27530, 1330, 554, 332, 64, 25714, 198, 6738, 40391, 13, 267...
3.185484
124
from chill import * source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/seidel-2d/kernel.c') destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/seidel-2d/tmp_files/6745.c') procedure('kernel_seidel_2d') loop(0) known(' n > 2 ') tile(0,2,16,2)...
[ 6738, 20493, 1330, 1635, 198, 10459, 10786, 14, 84, 3046, 82, 14, 354, 14751, 13, 315, 993, 13, 15532, 14, 11321, 14, 11195, 14, 84, 1157, 11785, 1415, 14, 8019, 14, 88, 4852, 83, 62, 7114, 84, 14, 35428, 26968, 14, 35428, 26968, ...
2.04878
164
import json import aiohttp
[ 11748, 33918, 198, 198, 11748, 257, 952, 4023, 628, 628, 198 ]
2.909091
11
"""Unit tests for nautobot_device_onboarding.netdev_keeper module and its classes. (c) 2020-2021 Network To Code 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/LICE...
[ 37811, 26453, 5254, 329, 299, 2306, 672, 313, 62, 25202, 62, 261, 27794, 13, 3262, 7959, 62, 13884, 8265, 290, 663, 6097, 13, 198, 198, 7, 66, 8, 12131, 12, 1238, 2481, 7311, 1675, 6127, 198, 26656, 15385, 739, 262, 24843, 13789, 11...
3.630037
273
# Created by ay27 at 17/4/9 import os import matplotlib.pyplot as plt import struct import numpy as np if __name__ == '__main__': # read_image('../../data/ilsvrc2012/img.bin') # read_label('../../data/ilsvrc2012/label.bin', '../../data/ilsvrc2012/val.txt') # read_image('../../build/cifar100_train_image...
[ 2, 15622, 416, 38762, 1983, 379, 1596, 14, 19, 14, 24, 198, 11748, 28686, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2878, 198, 11748, 299, 32152, 355, 45941, 628, 628, 198, 361, 11593, 3672, 834, ...
2.329073
313
# Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ Test for the piezo tensor class """ __author__ = "Shyam Dwaraknath" __version__ = "0.1" __maintainer__ = "Shyam Dwaraknath" __email__ = "shyamd@lbl.gov" __status__ = "Development" __date__ = "4/1/16" import os import un...
[ 2, 15069, 357, 66, 8, 350, 4948, 265, 5235, 7712, 4816, 13, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 17168, 13789, 13, 628, 198, 37811, 198, 14402, 329, 262, 2508, 10872, 11192, 273, 1398, 198, 37811, 198, 198, 834, 9800, 834, ...
2.636364
187
# Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
[ 2, 15069, 2813, 10799, 8909, 16685, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428,...
2.870322
1,149
from direct.showbase import DirectObject from otp.otpbase import OTPGlobals import sys from direct.gui.DirectGui import * from pandac.PandaModules import * from otp.otpbase import OTPLocalizer
[ 6738, 1277, 13, 12860, 8692, 1330, 4128, 10267, 198, 6738, 30972, 79, 13, 313, 79, 8692, 1330, 21676, 6968, 75, 672, 874, 198, 11748, 25064, 198, 6738, 1277, 13, 48317, 13, 13470, 8205, 72, 1330, 1635, 198, 6738, 19798, 330, 13, 47, ...
3.163934
61
import argparse import json import numpy as np import pandas as pd import os from sklearn.linear_model import LogisticRegression from sklearn.model_selection import train_test_split from sklearn.metrics import classification_report,f1_score from keras.models import Sequential from keras.layers import Dense, Dropout fro...
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 5972, 2569, 8081, 2234, 198, 6738, 1341, 35720, 13, ...
2.426749
4,546
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under ...
[ 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379,...
3.674419
215
''' ------------------------------------------------------------------------------------------------- This code accompanies the paper titled "Human injury-based safety decision of automated vehicles" Author: Qingfan Wang, Qing Zhou, Miao Lin, Bingbing Nie Corresponding author: Bingbing Nie (nbb@tsinghua.edu.cn) -------...
[ 7061, 6, 198, 10097, 3880, 12, 198, 1212, 2438, 48159, 262, 3348, 11946, 366, 20490, 5095, 12, 3106, 3747, 2551, 286, 16359, 5672, 1, 198, 13838, 25, 28927, 24408, 15233, 11, 28927, 32222, 11, 337, 13481, 5164, 11, 21631, 4623, 399, 4...
1.936807
1,804
# Training to a set of multiple objects (e.g. ShapeNet or DTU) # tensorboard logs available in logs/<expname> import sys import os sys.path.insert( 0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")) ) import warnings import trainlib from model import make_model, loss from render import NeRF...
[ 2, 13614, 284, 257, 900, 286, 3294, 5563, 357, 68, 13, 70, 13, 25959, 7934, 393, 24311, 52, 8, 198, 2, 11192, 273, 3526, 17259, 1695, 287, 17259, 14, 27, 11201, 3672, 29, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 17597, ...
2.595238
462
import os import sys from pathlib import Path from typing import Sequence from napari_plugin_engine.dist import standard_metadata from napari_plugin_engine.exceptions import PluginError from qtpy.QtCore import QEvent, QProcess, QProcessEnvironment, QSize, Qt, Slot from qtpy.QtGui import QFont, QMovie from qtpy.QtWidge...
[ 11748, 28686, 198, 11748, 25064, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 45835, 198, 198, 6738, 25422, 2743, 62, 33803, 62, 18392, 13, 17080, 1330, 3210, 62, 38993, 198, 6738, 25422, 2743, 62, 33803, 62, 18392, 13, 1...
2.863354
483
__all__ = ('create_partial_webhook_from_id', ) from scarletio import export from ..core import USERS from .preinstanced import WebhookType from .webhook import Webhook
[ 834, 439, 834, 796, 19203, 17953, 62, 47172, 62, 12384, 25480, 62, 6738, 62, 312, 3256, 1267, 198, 198, 6738, 10153, 1616, 952, 1330, 10784, 198, 198, 6738, 11485, 7295, 1330, 1294, 4877, 198, 198, 6738, 764, 3866, 8625, 2903, 1330, 5...
3.245283
53
SCRABBLE_LETTER_VALUES = { 'a': 1, 'b': 3, 'c': 3, 'd': 2, 'e': 1, 'f': 4, 'g': 2, 'h': 4, 'i': 1, 'j': 8, 'k': 5, 'l': 1, 'm': 3, 'n': 1, 'o': 1, 'p': 3, 'q': 10, 'r': 1, 's': 1, 't': 1, 'u': 1, 'v': 4, 'w': 4, 'x': 8, 'y': 4, 'z': 10 } def getWordScore(word, n): """ Returns the score for a word. Assu...
[ 6173, 3861, 15199, 2538, 62, 28882, 5781, 62, 23428, 35409, 796, 1391, 198, 220, 220, 220, 705, 64, 10354, 352, 11, 705, 65, 10354, 513, 11, 705, 66, 10354, 513, 11, 705, 67, 10354, 362, 11, 705, 68, 10354, 352, 11, 705, 69, 10354...
2.376392
449
# coding: utf-8 """ LUSID API # Introduction This page documents the [LUSID APIs](https://www.lusid.com/api/swagger), which allows authorised clients to query and update their data within the LUSID platform. SDKs to interact with the LUSID APIs are available in the following languages : * [C#](https://gith...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 406, 2937, 2389, 7824, 628, 220, 220, 220, 1303, 22395, 220, 770, 2443, 4963, 262, 685, 43, 2937, 2389, 23113, 16151, 5450, 1378, 2503, 13, 41790, 312, 13, 785, ...
3.393807
8,913
import os import sys import sqlite3 con = None filename = 'certificado' # Abrir banco de dados para ler nomes. try: con = sqlite3.connect('math.db') cur = con.cursor() cur.execute('select * from math') data = cur.fetchall() except sqlite3.Error, e: print "Error %s:" % e.args[0] sys.exit(...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 44161, 578, 18, 198, 198, 1102, 796, 6045, 198, 34345, 796, 705, 22583, 811, 4533, 6, 198, 198, 2, 317, 1671, 343, 3958, 1073, 390, 9955, 418, 31215, 300, 263, 299, 2586, 13, 198, 28311, ...
2.122449
441
from pathlib import Path from meth5.meth5 import MetH5File
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 11248, 20, 13, 76, 2788, 20, 1330, 3395, 39, 20, 8979, 628 ]
3.157895
19
#!/usr/bin/env python # script to make seasonal means and stddev images of 4-day sig0 # values. import os import sys import glob import numpy as np import sirpy2 as sp2 import argparse from osgeo import gdal DATADIR = "./" NODATA_VALUE = -9999.0 Q2M = { "JAS": list(range(7, 10)), "OND": list(range(10, 13)),...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 4226, 284, 787, 21819, 1724, 290, 336, 1860, 1990, 4263, 286, 604, 12, 820, 43237, 15, 198, 2, 3815, 13, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 15095, 198, 11...
2.115694
2,982
primeiro = int(input('Digite o priemiro termo da PA: ')) razo = int(input('Digite a razo da PA: ')) termo = primeiro cont = 1 total = 0 mais = 10 while mais != 0: total += mais while cont <= total: print(f'{termo} ', end='') termo += razo cont += 1 print('Pausa') mais = int(input...
[ 35505, 7058, 796, 493, 7, 15414, 10786, 19511, 578, 267, 1293, 368, 7058, 3381, 78, 12379, 8147, 25, 705, 4008, 198, 3247, 78, 796, 493, 7, 15414, 10786, 19511, 578, 257, 374, 44299, 12379, 8147, 25, 705, 4008, 198, 4354, 78, 796, 6...
2.318919
185
from lxml.etree import Element, QName from typing import Union, List, Any from tqdm import tqdm import logging from arxml_data_extractor.handler import value_handler from arxml_data_extractor.handler.path_handler import PathHandler from arxml_data_extractor.asr.asr_parser import AsrParser from arxml_data_extra...
[ 6738, 300, 19875, 13, 316, 631, 1330, 11703, 11, 1195, 5376, 201, 198, 6738, 19720, 1330, 4479, 11, 7343, 11, 4377, 201, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 201, 198, 11748, 18931, 201, 198, 201, 198, 6738, 610, 19875, ...
3.135484
155
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE is licensed under the MIT License. License for BK-BASE : ---------------------------------------------------------------...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 24893, 1087, 318, 10607, 284, 1104, 262, 1280, 2723, 2055, 416, 1642, 347, 42, 12, 33, 11159, 220, 1695, 13, 198, 15269, 357, 34, 8, 33448, 2320, 43, 317, ...
2.700162
1,234
import locale import glob import os import os.path import requests import tarfile import sys import re import gensim from gensim.models.doc2vec import TaggedDocument from collections import namedtuple from gensim.models import Doc2Vec import gensim.models.doc2vec from collections import OrderedDict import multiproces...
[ 11748, 36693, 198, 11748, 15095, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 11748, 7007, 198, 11748, 13422, 7753, 198, 11748, 25064, 198, 11748, 302, 198, 198, 11748, 308, 641, 320, 198, 6738, 308, 641, 320, 13, 27530, 13, 153...
2.341922
1,863
import unittest from caravan.task import Task from caravan.tables import Tables if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 44321, 13, 35943, 1330, 15941, 198, 6738, 44321, 13, 83, 2977, 1330, 33220, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, ...
3.023256
43
# -*- coding: utf-8 -*- import os import json from splash import defaults from splash.utils import to_bytes, path_join_secure from splash.errors import BadOption def save_args_to_cache(self, cache): """ Process save_args and put all values to cache. Return a list of (name, key) pairs. ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 11748, 33918, 198, 198, 6738, 22870, 1330, 26235, 198, 6738, 22870, 13, 26791, 1330, 284, 62, 33661, 11, 3108, 62, 22179, 62, 22390, 198, 6738, 22870, ...
2.333895
593
# code.... a = 1 b = 2 c = 3 s = a+b+c r = s/3 print(r) # code.... ''' def average(): a=1 b=2 c=3 s=a+b+c r=s/3 print(r) average() ''' ''' #input #parameter #argument def average(a,b,c): s=a+b+c r=s/3 print(r) average(10,20,30) ''' print(average(10, 20, 30))
[ 2, 2438, 1106, 198, 64, 796, 352, 198, 65, 796, 362, 198, 66, 796, 513, 198, 82, 796, 257, 10, 65, 10, 66, 198, 81, 796, 264, 14, 18, 198, 4798, 7, 81, 8, 198, 2, 2438, 1106, 198, 198, 7061, 6, 198, 4299, 2811, 33529, 198, ...
1.675978
179
#!/usr/bin/env python # runs after the job (and after the default post-filter) from galaxy.tools.parameters import DataToolParameter # Older py compatibility try: set() except: from sets import Set as set
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 4539, 706, 262, 1693, 357, 392, 706, 262, 4277, 1281, 12, 24455, 8, 198, 6738, 16161, 13, 31391, 13, 17143, 7307, 1330, 6060, 25391, 36301, 198, 2, 35527, 12972, 17764, 198, ...
3.359375
64
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the listtransactions API from test_framework.test_framework import BitcoinTestFramework from ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 2, 15069, 357, 66, 8, 1946, 12, 4626, 383, 6185, 7231, 6505, 198, 2, 4307, 6169, 739, 262, 17168, 3788, 5964, 11, 766, 262, 19249, 198, 2, 2393, 27975, 45761, 393, 2638, 1378, ...
2.629464
448
# -*- coding: utf-8 -*- ''' Salt module to manage unix mounts and the fstab file ''' from __future__ import absolute_import # Import python libs import os import re import logging # Import salt libs import salt.utils from salt._compat import string_types from salt.utils import which as _which from salt.exceptions imp...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 43061, 8265, 284, 6687, 555, 844, 30790, 290, 262, 277, 39029, 2393, 198, 7061, 6, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 2, 1726...
1.816444
13,075
from django.contrib import admin from base.models import Topic, Photo admin.site.register(Topic, TopicAdmin) admin.site.register(Photo, PhotoAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 2779, 13, 27530, 1330, 47373, 11, 5555, 628, 628, 198, 198, 28482, 13, 15654, 13, 30238, 7, 33221, 11, 47373, 46787, 8, 198, 28482, 13, 15654, 13, 30238, 7, 6191, 11, 5...
3.347826
46
################################################################# # MET v2 Metadate Explorer Tool # # This Software is Open Source. See License: https://github.com/TERENA/met/blob/master/LICENSE.md # Copyright (c) 2012, TERENA All rights reserved. # # This Software is based on MET v1 developed for TERENA by Yaco Sistem...
[ 29113, 29113, 2, 198, 2, 31243, 410, 17, 3395, 324, 378, 19142, 16984, 198, 2, 198, 2, 770, 10442, 318, 4946, 8090, 13, 4091, 13789, 25, 3740, 1378, 12567, 13, 785, 14, 5781, 45510, 14, 4164, 14, 2436, 672, 14, 9866, 14, 43, 2149,...
3.82199
191
import traceback from pprint import pformat from threading import Thread import itchat import logging from wxpy.chat import Chat from wxpy.chats import Chats from wxpy.friend import Friend from wxpy.group import Group from wxpy.message import MessageConfigs, Messages, Message, MessageConfig from wxpy.mp import MP fro...
[ 11748, 12854, 1891, 198, 6738, 279, 4798, 1330, 279, 18982, 198, 6738, 4704, 278, 1330, 14122, 198, 198, 11748, 340, 17006, 198, 11748, 18931, 198, 198, 6738, 266, 87, 9078, 13, 17006, 1330, 24101, 198, 6738, 266, 87, 9078, 13, 354, 1...
2.098926
1,304
# Set up configuration variables __all__ = ['custom_viewer', 'qglue', 'test'] import os import sys from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution('glue-core').version except DistributionNotFound: __version__ = 'undefined' from ._mpl_backend import Matp...
[ 2, 5345, 510, 8398, 9633, 198, 198, 834, 439, 834, 796, 37250, 23144, 62, 1177, 263, 3256, 705, 80, 4743, 518, 3256, 705, 9288, 20520, 198, 198, 11748, 28686, 198, 198, 11748, 25064, 198, 198, 6738, 279, 10025, 62, 37540, 1330, 651, ...
3.340557
323
from algovision import app if(__name__=="__main__"): app.run(debug=True,host='0.0.0.0')
[ 6738, 435, 9567, 1166, 1330, 598, 198, 198, 361, 7, 834, 3672, 834, 855, 1, 834, 12417, 834, 1, 2599, 198, 220, 220, 220, 598, 13, 5143, 7, 24442, 28, 17821, 11, 4774, 11639, 15, 13, 15, 13, 15, 13, 15, 11537, 198 ]
2.162791
43
""" Base settings for Proxito Some of these settings will eventually be backported into the main settings file, but currently we have them to be able to run the site with the old middleware for a staged rollout of the proxito code. """
[ 37811, 198, 14881, 6460, 329, 1041, 87, 10094, 198, 198, 4366, 286, 777, 6460, 481, 4191, 307, 736, 9213, 656, 262, 1388, 6460, 2393, 11, 198, 4360, 3058, 356, 423, 606, 284, 307, 1498, 284, 1057, 262, 2524, 351, 262, 1468, 3504, 15...
4.175439
57
"""Test the search module""" from collections.abc import Iterable, Sized from io import StringIO from itertools import chain, product from functools import partial import pickle import sys from types import GeneratorType import re import numpy as np import scipy.sparse as sp import pytest from sklearn.utils.fixes im...
[ 37811, 14402, 262, 2989, 8265, 37811, 198, 198, 6738, 17268, 13, 39305, 1330, 40806, 540, 11, 311, 1143, 198, 6738, 33245, 1330, 10903, 9399, 198, 6738, 340, 861, 10141, 1330, 6333, 11, 1720, 198, 6738, 1257, 310, 10141, 1330, 13027, 19...
2.389223
6,477
# Generated by Django 3.2.7 on 2021-09-13 03:52 import uuid from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 22, 319, 33448, 12, 2931, 12, 1485, 7643, 25, 4309, 198, 198, 11748, 334, 27112, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.810811
37
import re import sys input_file = open(str(sys.argv[1]), 'r') # Open file for reading line = input_file.read() # "if z then while x * 4 - 2 do skip endwhile else x := 7 endif; y := 1" input_string = line.strip("\n") lexer = Lexer(input_string) hashtable = {} tokens_list = [] new = [] # keeping track of curr...
[ 11748, 302, 198, 11748, 25064, 628, 198, 198, 15414, 62, 7753, 796, 1280, 7, 2536, 7, 17597, 13, 853, 85, 58, 16, 46570, 705, 81, 11537, 220, 1303, 4946, 2393, 329, 3555, 198, 1370, 796, 5128, 62, 7753, 13, 961, 3419, 198, 2, 366,...
2.164063
512
import sys sys.path.append('/usr/local/lib/python3.4/site-packages/') from warc_dedup import deduplicate if __name__ == '__main__': main()
[ 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 14, 14629, 14, 12001, 14, 8019, 14, 29412, 18, 13, 19, 14, 15654, 12, 43789, 14, 11537, 198, 198, 6738, 1175, 66, 62, 9395, 929, 1330, 4648, 84, 489, 5344, 628, 198, 361, 11593, ...
2.534483
58
import os import requests import xmltodict import csv import json # # # # # # # # # # # FRED DATA BELOW # # # # # # # # # # # FRED_BASE_URL = 'https://api.stlouisfed.org/fred/' GEOFRED_BASE_URL = 'https://api.stlouisfed.org/geofred/' FRED_SERIES_OBS_URL = FRED_BASE_URL + 'series/observations?' GEOFRED_SERIES_META_U...
[ 11748, 28686, 198, 11748, 7007, 198, 11748, 2124, 76, 2528, 375, 713, 198, 11748, 269, 21370, 198, 11748, 33918, 198, 198, 2, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 198, 2, 8782, 1961, 42865, 45339, 1303, 198, 2, 1303, ...
2.173633
311
''' This is the Settings File for the Mattermost-Octane Bridge. You can change various variables here to customize and set up the client. ''' '''----------------------Mattermost Webhook Configuration----------------------''' #URL of the webhook from mattermost. To create one go to `Main Menu -> Integrations -> Incom...
[ 7061, 6, 198, 1212, 318, 262, 16163, 9220, 329, 262, 16900, 1712, 12, 12349, 1531, 10290, 13, 198, 1639, 460, 1487, 2972, 9633, 994, 284, 24184, 290, 900, 510, 262, 5456, 13, 198, 7061, 6, 628, 198, 7061, 6, 19351, 438, 44, 1436, ...
3.532033
359
print(1)
[ 220, 3601, 7, 16, 8 ]
2
5
# -*- encoding:utf-8 -*- # @Time : 2021/1/3 15:15 # @Author : gfjiang import os.path as osp import mmcv import numpy as np import cvtools import matplotlib.pyplot as plt import cv2.cv2 as cv from functools import partial import torch import math from cvtools.utils.path import add_prefix_filename_suffix from mmdet....
[ 2, 532, 9, 12, 21004, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 33448, 14, 16, 14, 18, 1315, 25, 1314, 198, 2, 2488, 13838, 220, 1058, 308, 69, 39598, 198, 11748, 28686, 13, 6978, 355, 267, 2777, ...
2.304416
634
# -*- coding: utf-8 -*- """ tradingAPI.low_level ~~~~~~~~~~~~~~ This module provides the low level functions with the service. """ import time import re from datetime import datetime from pyvirtualdisplay import Display from bs4 import BeautifulSoup from splinter import Browser from .glob import Glob from .links imp...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 2213, 4980, 17614, 13, 9319, 62, 5715, 198, 15116, 8728, 4907, 198, 198, 1212, 8265, 3769, 262, 1877, 1241, 5499, 351, 262, 2139, 13, 198, 37811, 198, ...
3.493421
152