content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import unittest from flydenity import Parser if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 6129, 6559, 414, 1330, 23042, 263, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.594595
37
import os
[ 11748, 28686, 628, 198 ]
3
4
import unittest from resthelper.utils import build_restful_url if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 1334, 2978, 525, 13, 26791, 1330, 1382, 62, 2118, 913, 62, 6371, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419 ]
2.690476
42
""" python-rq based backend This backend will send your messages asynchronously with python-rq. Before using this backend, make sure that django-rq is installed and configured. Usage ----- In settings.py SENDSMS_BACKEND = 'sendsms.backends.rq.SmsBackend' RQ_SENDSMS_BACKEND = 'actual.backend.to.use.SmsBack...
[ 37811, 21015, 12, 81, 80, 1912, 30203, 198, 198, 1212, 30203, 481, 3758, 534, 6218, 355, 24871, 3481, 351, 21015, 12, 81, 80, 13, 198, 198, 8421, 1262, 428, 30203, 11, 787, 1654, 326, 42625, 14208, 12, 81, 80, 318, 6589, 290, 198, ...
2.782258
248
#Autogenerated schema from openpyxl.descriptors.serialisable import Serialisable from openpyxl.descriptors import ( Typed, String, Bool, Sequence, ) from openpyxl.descriptors.excel import CellRange
[ 2, 16541, 519, 877, 515, 32815, 198, 6738, 1280, 9078, 87, 75, 13, 20147, 1968, 669, 13, 46911, 43942, 1330, 23283, 43942, 198, 6738, 1280, 9078, 87, 75, 13, 20147, 1968, 669, 1330, 357, 198, 220, 220, 220, 17134, 276, 11, 198, 220,...
2.703704
81
from kol.request.GenericRequest import GenericRequest from kol.manager import PatternManager import re
[ 6738, 479, 349, 13, 25927, 13, 46189, 18453, 1330, 42044, 18453, 198, 6738, 479, 349, 13, 37153, 1330, 23939, 13511, 198, 11748, 302, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220 ]
3.194444
36
import json import sys def compatible_loads(json_data): """ Function json.loads in python 3.0 - 3.5 can't handle bytes, so this function handle it. :param json_data: :return: unicode (str if it's python 3) """ if isinstance(json_data, bytes) and (3, 0) <= sys.version_info < (3, 6): ...
[ 11748, 33918, 201, 198, 11748, 25064, 201, 198, 201, 198, 201, 198, 4299, 11670, 62, 46030, 7, 17752, 62, 7890, 2599, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 15553, 33918, 13, 46030, 287, 21015, 513, 13, 15, 532, 51...
2.309701
268
import sys,time from colorama import Fore, Back, Style sprint (Fore.RED + ". tool- -DaduVoke- @2021") import socket import _thread import time try: scan = Core() scan.GetData(input(" IP URL\n")) print(bcolors.WARNING,":",Core.mode,"\n :",Core.ipurl,"\n :",Core.networ...
[ 11748, 25064, 11, 2435, 201, 198, 201, 198, 201, 198, 201, 198, 6738, 3124, 1689, 1330, 4558, 11, 5157, 11, 17738, 201, 198, 201, 198, 82, 4798, 357, 16351, 13, 22083, 1343, 27071, 2891, 12, 220, 220, 532, 46270, 84, 53, 2088, 12, ...
1.901099
364
# This file is part of the clacks framework. # # http://clacks-project.org # # Copyright: # (C) 2010-2012 GONICUS GmbH, Germany, http://www.gonicus.de # # License: # GPL-2: http://www.gnu.org/licenses/gpl-2.0.html # # See the LICENSE file in the project's top-level directory for details. """ The object base class. ...
[ 2, 770, 2393, 318, 636, 286, 262, 537, 4595, 9355, 13, 198, 2, 198, 2, 220, 2638, 1378, 565, 4595, 12, 16302, 13, 2398, 198, 2, 198, 2, 15069, 25, 198, 2, 220, 357, 34, 8, 3050, 12, 6999, 402, 1340, 2149, 2937, 402, 2022, 39, ...
2.703586
948
""" Testing default benchmarks in single thred and parallel configuration Check whether it generates correct outputs and resulting values Copyright (C) 2017-2019 Jiri Borovec <jiri.borovec@fel.cvut.cz> """ import argparse import logging import os import shutil import sys import unittest try: # python 3 from uni...
[ 37811, 198, 44154, 4277, 31747, 287, 2060, 294, 445, 290, 10730, 8398, 198, 9787, 1771, 340, 18616, 3376, 23862, 290, 7186, 3815, 198, 198, 15269, 357, 34, 8, 2177, 12, 23344, 449, 14783, 12182, 659, 66, 1279, 73, 14783, 13, 2865, 659...
2.894207
397
from .errors_exception_handling import errors_exception_handling
[ 6738, 764, 48277, 62, 1069, 4516, 62, 4993, 1359, 1330, 8563, 62, 1069, 4516, 62, 4993, 1359, 198 ]
3.611111
18
#!/usr/bin/env python ################################################################################################## ## mtstub.py ## ## emulates rockblock api so I don't have to burn credits testing... ################################################################################################## import cgi #i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 29113, 29113, 29113, 2235, 198, 2235, 45079, 301, 549, 13, 9078, 198, 2235, 198, 2235, 795, 15968, 3881, 9967, 40391, 523, 314, 836, 470, 423, 284, 4245, 10824, 4856, 986, 198, 29...
4.47619
105
#sum(iterable, start=0, /) #Return the sum of a 'start' value (default: 0) plus an iterable of numbers #When the iterable is empty, return the start value. '''This function is intended specifically for use with numeric values and may reject non-numeric types.''' a = [1,3,5,7,9,4,6,2,8] print(sum(a)) pr...
[ 201, 198, 2, 16345, 7, 2676, 540, 11, 923, 28, 15, 11, 1220, 8, 201, 198, 2, 13615, 262, 2160, 286, 257, 705, 9688, 6, 1988, 357, 12286, 25, 657, 8, 5556, 281, 11629, 540, 286, 3146, 201, 198, 2, 2215, 262, 11629, 540, 318, 65...
2.598485
132
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021 # by the softwar...
[ 29113, 29113, 14468, 2, 198, 2, 383, 5136, 329, 262, 8495, 286, 13435, 6682, 11998, 35432, 19193, 198, 2, 25161, 357, 41957, 1546, 6101, 8, 373, 4635, 739, 262, 46984, 5136, 329, 262, 198, 2, 8495, 286, 13435, 6682, 11998, 357, 41957,...
2.5535
1,243
# coding: utf8 """ Ortholog Based Bait Design Script for creating Elateridae ortholog based baits suitable submission to myBaits Compares t_coffee AA alignment scores with nucleotide tranalignments to find conserved blocks Author Jackson Eyres jackson.eyres@canada.ca License: MIT Copywright: Government of Canada """ i...
[ 2, 19617, 25, 3384, 69, 23, 198, 37811, 198, 5574, 400, 928, 13403, 347, 4548, 8495, 12327, 329, 4441, 2574, 729, 31718, 29617, 928, 1912, 26605, 896, 11080, 14498, 284, 616, 34458, 896, 198, 7293, 3565, 256, 62, 1073, 5853, 15923, 19...
2.267682
5,316
import sys import numpy as np sys.path.append("d:/data/annooptimize") import triangle import time tinternal = list()
[ 11748, 25064, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 17597, 13, 6978, 13, 33295, 7203, 67, 14079, 7890, 14, 1236, 78, 40085, 1096, 4943, 201, 198, 11748, 22950, 201, 198, 11748, 640, 201, 198, 201, 198, 83, 32538, 796, 135...
2.777778
45
from util.infinity import INFINITY from tc_python.arule import ARule from t_core.rollbacker import Rollbacker from t_core.resolver import Resolver
[ 201, 198, 6738, 7736, 13, 10745, 6269, 1330, 3268, 20032, 9050, 201, 198, 6738, 37096, 62, 29412, 13, 283, 2261, 1330, 5923, 2261, 201, 198, 6738, 256, 62, 7295, 13, 2487, 49978, 1330, 8299, 49978, 201, 198, 6738, 256, 62, 7295, 13, ...
2.890909
55
from unittest import TestCase from propara.commonsense.semantic_lexicon_knowledge.ai2_lexicon import AI2Lexicon, AI2LexiconPredicate, AI2LexiconArg, AI2LexiconIndications, \ AI2LexiconPattern
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 386, 1845, 64, 13, 9503, 46563, 13, 43616, 5109, 62, 2588, 4749, 62, 45066, 13, 1872, 17, 62, 2588, 4749, 1330, 9552, 17, 45117, 4749, 11, 9552, 17, 45117, 4749, 39156, 5344, 1...
2.955224
67
# -*- coding: utf-8 -*- """ Fitbit API Library ------------------ :copyright: 2012-2015 ORCAS. :license: BSD, see LICENSE for more details. """ from .api import Fitbit, FitbitOauthClient, FitbitOauth2Client # Meta. __title__ = 'fitbit' __author__ = 'Issac Kelly and ORCAS' __author_email__ = 'bpitcher@orcasinc.com' ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31805, 2545, 7824, 10074, 198, 1783, 438, 198, 198, 25, 22163, 4766, 25, 2321, 12, 4626, 6375, 34, 1921, 13, 198, 25, 43085, 25, 347, 10305, 11, 766, 38559...
2.543011
186
from django.urls import include, path from exchange.api.views import LatestOrdersListAPIView, OrderViewSet, ProfileAPIView from rest_framework.routers import DefaultRouter router = DefaultRouter() router.register(r'orders', OrderViewSet, basename='orders') urlpatterns = [ path('profile/', ProfileAPIView.as_view()...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 2291, 11, 3108, 198, 6738, 5163, 13, 15042, 13, 33571, 1330, 26603, 35422, 364, 8053, 2969, 3824, 769, 11, 8284, 7680, 7248, 11, 13118, 2969, 3824, 769, 198, 6738, 1334, 62, 30604, 13, 472, 1010...
3.078947
152
from bs4 import BeautifulSoup import requests import re
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 7007, 198, 11748, 302 ]
3.928571
14
# -*- coding: utf-8 -*- from cfmacro.processors import SgProcessor from cfmacro.core.engine import ProcessorEngine from cfmacro.core.template import TemplateProcessor def lambda_handler(event, context): """ Implement a core handler for security groups ingress / egress :param event: :param context: ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 30218, 20285, 305, 13, 14681, 669, 1330, 311, 70, 18709, 273, 198, 6738, 30218, 20285, 305, 13, 7295, 13, 18392, 1330, 32893, 13798, 198, 6738, 30218, 20285, ...
2.657492
327
import torch import argparse from roberta_modeling import RobertaJointForLong from transformers.modeling_roberta import RobertaConfig, RobertaModel from torch.utils.data import TensorDataset, SequentialSampler, DataLoader import utils from tqdm import tqdm import os import json import collections import pickle import p...
[ 11748, 28034, 198, 11748, 1822, 29572, 198, 6738, 686, 4835, 64, 62, 4666, 10809, 1330, 5199, 64, 41, 1563, 1890, 14617, 198, 6738, 6121, 364, 13, 4666, 10809, 62, 305, 4835, 64, 1330, 5199, 64, 16934, 11, 5199, 64, 17633, 198, 6738, ...
2.349352
1,852
""" Django settings for city-infrastructure-platform project. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import os import environ import sentry_sdk from djan...
[ 37811, 198, 35, 73, 14208, 6460, 329, 1748, 12, 10745, 6410, 12, 24254, 1628, 13, 198, 198, 1890, 517, 1321, 319, 428, 2393, 11, 766, 198, 5450, 1378, 31628, 13, 28241, 648, 404, 305, 752, 13, 785, 14, 268, 14, 17, 13, 17, 14, 4...
2.331677
4,025
# !/usr/bin/python # -*- coding: utf-8 -*- # @time : 2021/7/25 19:30 # @author : Mo # @function: predict model, - # linux import platform import json import sys import os path_root = os.path.abspath(os.path.join(os.path.dirname(__file__), "../..")) path_sys = os.path.join(path_root, "pytorch_nlu", "pytorch_textcl...
[ 2, 5145, 14, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 2435, 220, 220, 220, 1058, 33448, 14, 22, 14, 1495, 678, 25, 1270, 198, 2, 2488, 9800, 220, 1058, 4270, 198, ...
2.26555
418
import unittest from stringsheet.parser import create_spreadsheet_values from stringsheet.parser import create_language_sheet_values from stringsheet.parser import parse_resources if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 13042, 25473, 13, 48610, 1330, 2251, 62, 43639, 21760, 62, 27160, 198, 6738, 13042, 25473, 13, 48610, 1330, 2251, 62, 16129, 62, 21760, 62, 27160, 198, 6738, 13042, 25473, 13, 48610, 1330, 21136, 62...
3.492537
67
import cv2
[ 11748, 269, 85, 17 ]
2.5
4
import os, sys import numpy as np from sedflow import obs as Obs from sedflow import train as Train from provabgs import infer as Infer from provabgs import models as Models #################################################### # input #################################################### sample = sys.argv[1] itrain...
[ 11748, 28686, 11, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 10081, 11125, 1330, 10201, 355, 11086, 198, 6738, 10081, 11125, 1330, 4512, 355, 16835, 198, 198, 6738, 899, 397, 14542, 1330, 13249, 355, 554, 2232, 198, 6738, ...
2.472152
790
import json import time import re from .keyvalue_provider import KeyValueProvider from .gcloud_artifact_store import GCloudArtifactStore from .util import timeit
[ 11748, 33918, 198, 11748, 640, 198, 11748, 302, 198, 6738, 764, 2539, 8367, 62, 15234, 1304, 1330, 7383, 11395, 29495, 198, 6738, 764, 70, 17721, 62, 433, 29660, 62, 8095, 1330, 402, 18839, 8001, 29660, 22658, 198, 6738, 764, 22602, 133...
3.704545
44
# -*- coding: utf-8 -*- # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 2211, 3012, 3457, 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, 3...
2.541615
4,830
# coding: utf-8 from __future__ import unicode_literals, print_function, division, absolute_import HOME_ACCESSED = "home-accessed"
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 11, 3601, 62, 8818, 11, 7297, 11, 4112, 62, 11748, 198, 39069, 62, 26861, 7597, 1961, 796, 366, 11195, 12, 15526, 276, 1, 198 ]
3.119048
42
import logging from urllib.parse import unquote, urlparse from pathlib import PurePosixPath import requests from requests.exceptions import ReadTimeout, ConnectionError, HTTPError from django.core.management.base import BaseCommand from django.core.files.base import ContentFile from places.models import Place, Image ...
[ 11748, 18931, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 555, 22708, 11, 19016, 29572, 198, 6738, 3108, 8019, 1330, 17129, 21604, 844, 15235, 198, 198, 11748, 7007, 198, 6738, 7007, 13, 1069, 11755, 1330, 4149, 48031, 11, 26923, 12331, ...
3.618182
110
# -*- coding: utf-8 -*- # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 1946, 3012, 3457, 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, 3...
2.607772
3,860
''' Created on Dec 28, 2021 @author: Itay Abstracting the DB connection piece ''' import mysql.connector as My from app import logging as L from app import exceptions as exceptions
[ 7061, 6, 198, 41972, 319, 4280, 2579, 11, 33448, 198, 198, 31, 9800, 25, 632, 323, 198, 198, 23839, 278, 262, 20137, 4637, 3704, 198, 7061, 6, 198, 11748, 48761, 13, 8443, 273, 355, 2011, 198, 6738, 598, 1330, 18931, 355, 406, 198, ...
3.714286
49
import os from tqdm import tqdm import cv2 import numpy as np #pre process test data: path = "raw_test_data/" list_width = [] list_height = [] list_image = [] pre_process() for image in list_image: print(image.shape)
[ 11748, 28686, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 3866, 1429, 1332, 1366, 25, 198, 6978, 796, 366, 1831, 62, 9288, 62, 7890, 30487, 198, 198, 486...
2.458333
96
# 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 applica...
[ 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, ...
3.198198
555
import functools import glob import itertools import logging import os from progressbar import progressbar import re import requests from typing import List def alphanumeric_glob(pattern: str): """Glob and sort alpahnumerically. Limitations: exactly one `*', no `?', file names with single extention.""" matches...
[ 11748, 1257, 310, 10141, 198, 11748, 15095, 198, 11748, 340, 861, 10141, 198, 11748, 18931, 198, 11748, 28686, 198, 6738, 4371, 5657, 1330, 4371, 5657, 198, 11748, 302, 198, 11748, 7007, 198, 6738, 19720, 1330, 7343, 198, 198, 4299, 435, ...
3.153333
150
#Copyright 2021 Neil Flood and Sam Gillingham. All rights reserved. # #Permission is hereby granted, free of charge, to any person #obtaining a copy of this software and associated documentation #files (the "Software"), to deal in the Software without restriction, #including without limitation the rights to use, cop...
[ 2, 15269, 33448, 15929, 25588, 290, 3409, 402, 4509, 2763, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 220, 198, 2, 672, 7339, 257, 4866, 286, 428, 3788, 290, 3...
3.088679
530
import os import numpy as np import pandas as pd from sklearn.preprocessing import LabelEncoder def read_dataset_from_npy(path): """ Read dataset from .npy file """ data = np.load(path, allow_pickle=True) return data[()]['X'], data[()]['y'], data[()]['train_idx'], data[()]['test_idx'] def read_dataset...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 36052, 27195, 12342, 198, 198, 4299, 1100, 62, 19608, 292, 316, 62, 6738, 62, 77, 9078, 7, 6978, 25...
2.088118
1,759
from __future__ import print_function, division, unicode_literals import os import warnings import numpy as np from scipy import interpolate import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt from pymatgen.io.vasp.outputs import Vasprun from pymatgen.core.structure import Structure from pymatg...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 11, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 28686, 198, 11748, 14601, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 629, 541, 88, 1330, 39555, 378, 198, 198, 11...
2.06971
8,435
from aiopylimit import AIOPyRateLimit from aiopylimit import AIOPyRateLimitException import asynctest import asyncio
[ 6738, 257, 72, 11081, 32374, 1330, 9552, 3185, 88, 32184, 39184, 198, 6738, 257, 72, 11081, 32374, 1330, 9552, 3185, 88, 32184, 39184, 16922, 198, 11748, 355, 2047, 310, 395, 198, 11748, 30351, 952, 628 ]
3.371429
35
# coding: utf-8 import sys import shutil import requests import wx from pathlib import Path from urllib.parse import urljoin, urlsplit from tempfile import TemporaryFile from zipfile import ZipFile from bookworm import typehints as t from bookworm import app from bookworm.http_tools import RemoteJsonResource, HttpReso...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 25064, 198, 11748, 4423, 346, 198, 11748, 7007, 198, 11748, 266, 87, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 22179, 11, 2956, 7278, 489, ...
2.717833
443
# -*- coding: utf-8 -*- """ *************************************************************************** v_proj.py --------- Date : November 2017 Copyright : (C) 2017 by Mdric Ribreux Email : medspx at medspx dot fr ******************************************...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 17174, 17174, 4557, 8162, 198, 220, 220, 220, 410, 62, 1676, 73, 13, 9078, 198, 220, 220, 220, 45337, 198, 220, 220, 220, 7536, 220, 220, 220, 220, ...
2.366397
494
# Copyright 2013 Devsim LLC # # 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, s...
[ 2, 15069, 2211, 6245, 14323, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 74...
2.956857
649
from dataclasses import dataclass import os path_base_default = os.getenv('ASTRO_IMAGING_DATA_PATH', default='./') paths_default = Paths()
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 11748, 28686, 198, 198, 6978, 62, 8692, 62, 12286, 796, 28686, 13, 1136, 24330, 10786, 1921, 5446, 46, 62, 3955, 4760, 2751, 62, 26947, 62, 34219, 3256, 4277, 28, 4458, 14, 11537, 6...
2.698113
53
#!/usr/bin/env python from typing import Tuple import argparse from src.loadopts import * METHOD = "RobOC-AT" SAVE_FREQ = 5 PRINT_FREQ = 20 FMT = "{description}={scale}-{leverage}" \ "={learning_policy}-{optimizer}-{lr}" \ "={attack}-{epsilon:.4f}-{stepsize}-{steps}" \ "={batch_size}={trans...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 628, 198, 6738, 19720, 1330, 309, 29291, 198, 11748, 1822, 29572, 198, 6738, 12351, 13, 2220, 404, 912, 1330, 1635, 628, 198, 198, 49273, 796, 366, 14350, 4503, 12, 1404, 1, 198, 4090, 6089...
2.580645
1,178
from django.db import models # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 13610, 534, 4981, 994, 13, 628, 628, 628, 198 ]
3.315789
19
# seq2seq LSTM (no-convolutional model) for time series prediction import numpy as np import torch import torchvision import torch.utils.data as data import torchvision.transforms as transforms import pandas as pd import h5py import os import sys import json import time import pdb from jma_timeseries_dataset import...
[ 2, 33756, 17, 41068, 406, 2257, 44, 357, 3919, 12, 42946, 2122, 282, 2746, 8, 329, 640, 2168, 17724, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 220, 198, 11748, 28034, 10178, 198, 11748, 28034, 13, 26791, 13, 7890, 355, 13...
1.747234
4,609
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628 ]
3.333333
6
import inspect import sys from abc import ABC, abstractmethod from enum import Enum from typing import List, Union, Type, Optional, Dict, Any from pydantic import BaseModel from onemsdk.exceptions import NodeTagMismatchException, ONEmSDKException from .node import Node __all__ = ['Tag', 'HeaderTag', 'FooterTag', 'Br...
[ 11748, 10104, 198, 11748, 25064, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 19720, 1330, 7343, 11, 4479, 11, 5994, 11, 32233, 11, 360, 713, 11, 4377, 198, 198, 6738, 279, 5173, 5109...
2.612591
413
""" 1. program -> define-list 2. define-list -> define define-list | empty 3. define -> type ID define-type 4. define-type -> var-define-follow | fun-define-follow 5. var-define-follow -> ; | [ NUM ] ; 6. type -> int | void 7. fun-define-follo...
[ 628, 198, 37811, 198, 16, 13, 220, 1430, 4613, 8160, 12, 4868, 198, 17, 13, 220, 8160, 12, 4868, 4613, 8160, 8160, 12, 4868, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 930, 6565, 198, 18...
2.449804
3,835
import json import hashlib import logging import os import threading import time import datetime import itertools import peewee from passlib.apps import custom_app_context as pwd_context from playhouse.postgres_ext import ArrayField, DateTimeTZField, PostgresqlExtDatabase from flask.ext.login import UserMixin, Anonymo...
[ 11748, 33918, 198, 11748, 12234, 8019, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 4704, 278, 198, 11748, 640, 198, 11748, 4818, 8079, 198, 11748, 340, 861, 10141, 198, 198, 11748, 613, 413, 1453, 198, 6738, 1208, 8019, 13, 18211, ...
2.623996
2,117
import numpy as np import time import logging from .base import BaseClassifier import scipy.sparse as sp from ._svm import train_one from functools import partial from ..utils import sparse from ..data import data_loader from ._svm import train_one, _get_liblinear_solver_type from joblib import Parallel, delayed from ....
[ 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 11748, 18931, 198, 6738, 764, 8692, 1330, 7308, 9487, 7483, 198, 11748, 629, 541, 88, 13, 82, 29572, 355, 599, 198, 6738, 47540, 82, 14761, 1330, 4512, 62, 505, 198, 6738, 1257, 310...
3.431193
109
#!/usr/bin/env python3 import ipaddress import random import unittest import ipgroup if __name__ == "__main__": unittest.main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 20966, 21975, 198, 11748, 4738, 198, 11748, 555, 715, 395, 198, 198, 11748, 20966, 8094, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 22...
2.705882
51
from dataclasses import dataclass from pickle import FALSE from dol import Dol from asm_section_list import AsmSection, AsmSectionType def calc_generic_progress(dol: Dol, asm_list: list[AsmSection]): # Sum up code/data in ASM asm_code_size = 0 asm_data_size = 0 for section in asm_list: if secti...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 2298, 293, 1330, 26563, 198, 6738, 288, 349, 1330, 25143, 198, 6738, 355, 76, 62, 5458, 62, 4868, 1330, 1081, 76, 16375, 11, 1081, 76, 16375, 6030, 198, 198, 4299, 42302, 62, ...
2.340399
802
import utils import argparse import wandb from os.path import join from qm9 import dataset from qm9 import losses from qm9.models import get_optim, get_model from flows.utils import assert_mean_zero_with_mask, remove_mean_with_mask,\ assert_correctly_masked import torch import time import pickle import numpy as np ...
[ 11748, 3384, 4487, 198, 11748, 1822, 29572, 198, 11748, 11569, 65, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 6738, 10662, 76, 24, 1330, 27039, 198, 6738, 10662, 76, 24, 1330, 9089, 198, 6738, 10662, 76, 24, 13, 27530, 1330, 651, 62...
2.407143
2,240
# -*- coding: utf-8 -*- # Copyright (c) 2021. Distributed under the terms of the MIT License. from vise.util.string import numbers_to_lowercases
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 220, 15069, 357, 66, 8, 33448, 13, 4307, 6169, 739, 262, 2846, 286, 262, 17168, 13789, 13, 198, 6738, 410, 786, 13, 22602, 13, 8841, 1330, 3146, 62, 1462, 62, 210...
3.041667
48
accounts = find_accounts('python') if accounts is None: print("Error: DB not available") else: print("Accounts found: Would list them here...") db_is_availble = True
[ 198, 23317, 82, 796, 1064, 62, 23317, 82, 10786, 29412, 11537, 198, 361, 5504, 318, 6045, 25, 198, 220, 220, 220, 3601, 7203, 12331, 25, 20137, 407, 1695, 4943, 198, 17772, 25, 198, 220, 220, 220, 3601, 7203, 30116, 82, 1043, 25, 10...
2.788732
71
import os import json import shutil import tempfile import mock import pytest from opencivicdata.models import Person from pupa.scrape import Person as ScrapePerson from pupa.scrape import Organization as ScrapeOrganization from pupa.importers.base import omnihash, BaseImporter from pupa.importers import PersonImporter...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 11748, 15290, 198, 11748, 12972, 9288, 198, 6738, 1280, 66, 16482, 7890, 13, 27530, 1330, 7755, 198, 6738, 15552, 64, 13, 1416, 13484, 1330, 7755, 355, ...
3.801325
151
#!/usr/bin/env python # -*- coding: utf-8 -*- # # 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 t...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 7...
3.589744
234
#!/usr/bin/env python3 # Day 22: Sort Characters By Frequency # # Given a string, sort it in decreasing order based on the frequency of # characters. import collections # Tests assert Solution().frequencySort("tree") in ["eert", "eetr"] assert Solution().frequencySort("cccaaa") in ["cccaaa", "aaaccc"] assert Solutio...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 3596, 2534, 25, 33947, 26813, 2750, 31902, 198, 2, 198, 2, 11259, 257, 4731, 11, 3297, 340, 287, 24030, 1502, 1912, 319, 262, 8373, 286, 198, 2, 3435, 13, 198, 198, 117...
3.297297
111
''' : lociloc 1. 2. 1 3. dataframe, indexcolumns,ilocloc ,iloc, loc ''' import numpy as np import pandas as pd
[ 7061, 6, 198, 25, 1179, 346, 420, 198, 16, 13, 220, 198, 17, 13, 352, 198, 18, 13, 220, 198, 198, 7890, 14535, 11, 6376, 28665, 82, 11, 346, 420, 17946, 198, 11, 346, 420, 11, 1179, 198, 7061, 6, 198, 11748, 299, 32152, 355, 4...
2.107143
56
"""Runner to discover, run and collect the results of all the checks.""" def import_module(module_path): """Import a Python file as a module in the current context. @param module_path: Path to the Python file. @return: A reference to the module once loaded. """ import os import sys modu...
[ 37811, 49493, 284, 7073, 11, 1057, 290, 2824, 262, 2482, 286, 477, 262, 8794, 526, 15931, 198, 198, 4299, 1330, 62, 21412, 7, 21412, 62, 6978, 2599, 198, 220, 220, 220, 37227, 20939, 257, 11361, 2393, 355, 257, 8265, 287, 262, 1459, ...
2.546318
421
# Copyright (c) 2016 Mirantis, Inc. # # 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 w...
[ 2, 15069, 357, 66, 8, 1584, 7381, 20836, 11, 3457, 13, 198, 2, 198, 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, ...
2.294133
3,869
""" Various utility functions for using mmdetection in Determined that may be useful even if not using the provided MMDetTrial. build_fp16_loss_scaler is large derived from the original mmcv code at https://github.com/open-mmlab/mmcv/blob/master/mmcv/runner/hooks/optimizer.py mmcv is covered by the Apache 2.0 License....
[ 37811, 198, 40009, 10361, 5499, 329, 1262, 8085, 15255, 3213, 287, 360, 23444, 326, 743, 307, 4465, 198, 10197, 611, 407, 1262, 262, 2810, 20806, 11242, 51, 4454, 13, 198, 198, 11249, 62, 46428, 1433, 62, 22462, 62, 1416, 36213, 318, ...
2.251295
1,930
"""tests bigquery client""" import unittest from gcloud.datastores.bigquery import BigqueryClient
[ 37811, 41989, 1263, 22766, 5456, 37811, 198, 198, 11748, 555, 715, 395, 198, 198, 6738, 308, 17721, 13, 19608, 459, 2850, 13, 14261, 22766, 1330, 4403, 22766, 11792, 198 ]
3.448276
29
fruits = ["orange", "banana", "apple", "avocado", "kiwi", "apricot", "cherry", "grape", "coconut", "lemon", "mango", "peach", "pear", "strawberry", "pineapple", "apple", "orange", "pear", "grape", "banana" ] filters = dict() for key in fruits: filters[key] = 1 result =...
[ 69, 50187, 796, 14631, 43745, 1600, 366, 3820, 2271, 1600, 366, 18040, 1600, 366, 615, 33441, 1600, 366, 4106, 37686, 1600, 366, 499, 1173, 313, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 2044, 563, 1600, ...
2.11976
167
from sklearn import preprocessing import pandas as pd import numpy as np #import matplotlib.pyplot as plt #Abrindo o dados como Dataframe dados = pd.read_csv('dados/001.csv') #Iniciando o mtodo para binanizar as classe sim=1; no=0 pre = preprocessing.LabelBinarizer() #Binazirando a classe jogou, e atribundo a uma ma...
[ 6738, 1341, 35720, 1330, 662, 36948, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 2, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 2, 32, 1671, 521, 78, 267, 9955, 418, 401, 78,...
2.332518
818
# Copyright 2021 The Kubeflow 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 applicabl...
[ 2, 15069, 33448, 383, 24921, 891, 9319, 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, ...
3.693452
336
from ctypes import c_uint32, c_void_p, string_at from rotypes.idldsl import define_winrt_com_method, GUID from rotypes.inspectable import IInspectable, IUnknown define_winrt_com_method(IBufferByteAccess, 'Buffer', retval=c_void_p) define_winrt_com_method(IBuffer, 'get_Capacity', propget=c_uint32) define_winrt_com...
[ 6738, 269, 19199, 1330, 269, 62, 28611, 2624, 11, 269, 62, 19382, 62, 79, 11, 4731, 62, 265, 198, 198, 6738, 686, 19199, 13, 312, 335, 6649, 1330, 8160, 62, 5404, 17034, 62, 785, 62, 24396, 11, 19348, 2389, 198, 6738, 686, 19199, ...
2.610778
167
# -*- coding: utf-8 -*- """ Playground documentation. Module defining Playground Base Class """ import os from abc import ABC import yaml import pymunk from .utils import PositionAreaSampler from .utils.definitions import SPACE_DAMPING, CollisionTypes, SceneElementTypes # pylint: disable=unused-argument # pylint:...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 3811, 2833, 10314, 13, 198, 198, 26796, 16215, 3811, 2833, 7308, 5016, 198, 198, 37811, 198, 198, 11748, 28686, 198, 6738, 450, 66, 1330, 9738, 198, 11748, 331, 4...
2.420865
3,374
# -*- coding: utf-8 -*- import zlib from UEManifestReader.enums import * from UEManifestReader.classes.FCustomFields import FCustomFields from UEManifestReader.classes.FManifestMeta import FManifestMeta from UEManifestReader.classes.FChunkDataList import FChunkDataList from UEManifestReader.classes.FManifestHeader imp...
[ 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 1976, 8019, 198, 6738, 471, 3620, 272, 8409, 33634, 13, 268, 5700, 1330, 1635, 198, 6738, 471, 3620, 272, 8409, 33634, 13, 37724, 13, 4851, 1824, 15878, 82, ...
3.335329
167
#module.py #if __name__=="__main__": # print(__name__)
[ 2, 21412, 13, 9078, 201, 198, 201, 198, 2, 361, 11593, 3672, 834, 855, 1, 834, 12417, 834, 1298, 201, 198, 2, 220, 220, 220, 3601, 7, 834, 3672, 834, 8 ]
1.967742
31
import csv import json import pickle import logging import re import pandas import gzip import os import numpy as np from random import randint, random from tqdm import tqdm from retriever.dense_retriever import DenseRetriever from models.tokenization import tokenize from typing import Union, List def get_example...
[ 11748, 269, 21370, 198, 11748, 33918, 198, 11748, 2298, 293, 198, 11748, 18931, 198, 11748, 302, 198, 11748, 19798, 292, 198, 11748, 308, 13344, 198, 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 4738, 1330, 43720...
1.951472
4,925
# Generated by Django 2.1.5 on 2019-01-22 08:33 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 20, 319, 13130, 12, 486, 12, 1828, 8487, 25, 2091, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
from django.conf import settings #from proxyclient.v2 import client as proxy_client from openstack_dashboard.utils import proxy_client # #def logout(request): # _proxy(request).logout(request.user.id) #
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 2, 6738, 15741, 16366, 13, 85, 17, 1330, 5456, 355, 15741, 62, 16366, 198, 6738, 1280, 25558, 62, 42460, 3526, 13, 26791, 1330, 15741, 62, 16366, 198, 198, 2, 198, 2, 4299, 2604, ...
3.028169
71
import overtime as ot times = ['14:00','14:05', '14:10', '14:15', '14:20', '14:25', '14:30', '14:35', '14:40', '14:45', '14:50', '14:55'] tfl_data = ot.TflInput(['victoria', 'central', 'bakerloo', 'piccadilly'], ['inbound', 'outbound'], times)
[ 201, 198, 11748, 17820, 355, 30972, 201, 198, 201, 198, 22355, 796, 37250, 1415, 25, 405, 41707, 1415, 25, 2713, 3256, 705, 1415, 25, 940, 3256, 705, 1415, 25, 1314, 3256, 705, 1415, 25, 1238, 3256, 705, 1415, 25, 1495, 3256, 705, 1...
2.163793
116
import json from pathlib import Path import click import datacube from datacube.index.hl import Doc2Dataset from odc.apps.dc_tools.utils import ( index_update_dataset, update_if_exists, allow_unsafe, transform_stac, ) from ._stac import stac_transform from typing import Generator, Optional import loggi...
[ 11748, 33918, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 3904, 198, 11748, 4818, 330, 3266, 198, 6738, 4818, 330, 3266, 13, 9630, 13, 18519, 1330, 14432, 17, 27354, 292, 316, 198, 6738, 16298, 66, 13, 18211, 13, 17896, 62, 3...
2.533333
240
""" WARNING: Using this script outside any server except one with IP 127.0.0.1 means risking getting an instant and permanent ban, anywhere you use it. The script was created *ONLY FOR LOCAL* testing purposes. NEVER, NEVER, *NEVER* run it in an online multiplayer server. At least unless you're a dumb freak. ""...
[ 37811, 198, 31502, 25, 198, 220, 220, 220, 8554, 428, 4226, 2354, 597, 4382, 2845, 530, 351, 6101, 18112, 13, 15, 13, 15, 13, 16, 1724, 37234, 1972, 198, 220, 220, 220, 281, 9113, 290, 7748, 3958, 11, 6609, 345, 779, 340, 13, 198,...
2.635628
247
# -*- coding: utf-8 -*- """ gluster-georep-tools.setup.py :copyright: (c) 2016 by Aravinda VK :license: MIT, see LICENSE for more details. """ from setuptools import setup setup( name="gluster-georep-tools", version="0.2", packages=["gluster_georep_tools", "gluster_georep_tools....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 1278, 5819, 12, 469, 382, 79, 12, 31391, 13, 40406, 13, 9078, 198, 220, 220, 220, 1058, 22163, 4766, 25, 357, 66, 8, 1584, 416, 317, 4108,...
2.355412
619
""" PyTorch Profiler With TensorBoard ==================================== This tutorial demonstrates how to use TensorBoard plugin with PyTorch Profiler to detect performance bottlenecks of the model. Introduction ------------ PyTorch 1.8 includes an updated profiler API capable of recording the CPU side operations ...
[ 37811, 198, 20519, 15884, 354, 4415, 5329, 2080, 309, 22854, 29828, 198, 10052, 1421, 198, 1212, 11808, 15687, 703, 284, 779, 309, 22854, 29828, 13877, 351, 9485, 15884, 354, 4415, 5329, 198, 1462, 4886, 2854, 3005, 11925, 721, 591, 286, ...
3.654955
3,814
# coding: utf-8 from .__utils__ import grayscaleOf, makeImage, sortByGrayscale NAME = "imgtoch" VERSIONNUM = 0, 2, 3 VERSION = ".".join(map(str, VERSIONNUM)) AUTHOR = "hrpzcf" EMAIL = "hrpzcf@foxmail.com" WEBSITE = "https://gitee.com/hrpzcf/imgtoch" __all__ = ["grayscaleOf", "makeImage", "sortByGrayscale"]
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 764, 834, 26791, 834, 1330, 1036, 592, 38765, 5189, 11, 787, 5159, 11, 3297, 3886, 8642, 592, 38765, 198, 198, 20608, 796, 366, 9600, 1462, 354, 1, 198, 43717, 41359, 796, 657, 11, 3...
2.303704
135
import typing as t from gradient_boosting_model.config.core import config import numpy as np import pandas as pd from marshmallow import fields, Schema, ValidationError def drop_na_inputs(*, input_data: pd.DataFrame) -> pd.DataFrame: """Check model inputs for na values and filter.""" validated_data = input...
[ 11748, 19720, 355, 256, 198, 198, 6738, 31312, 62, 39521, 278, 62, 19849, 13, 11250, 13, 7295, 1330, 4566, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 22397, 42725, 1330, 7032, 11, 10011, ...
2.787234
470
import os from rlbot.agents.base_agent import BOT_CONFIG_AGENT_HEADER from rlbot.agents.base_dotnet_agent import BaseDotNetAgent from rlbot.parsing.custom_config import ConfigHeader, ConfigObject
[ 11748, 28686, 198, 198, 6738, 374, 75, 13645, 13, 49638, 13, 8692, 62, 25781, 1330, 347, 2394, 62, 10943, 16254, 62, 4760, 3525, 62, 37682, 1137, 198, 6738, 374, 75, 13645, 13, 49638, 13, 8692, 62, 26518, 3262, 62, 25781, 1330, 7308, ...
3
66
# coding=utf-8 import inspect from functools import wraps def contract(pre_conditions, post_conditions): """ Pre is before. Post is after. """ return _ def processing(pre_process, post_process): "Procemanns" return _ someworkflow = compose(contract, processing, add_one) print somew...
[ 2, 19617, 28, 40477, 12, 23, 198, 11748, 10104, 198, 6738, 1257, 310, 10141, 1330, 27521, 628, 628, 628, 198, 4299, 2775, 7, 3866, 62, 17561, 1756, 11, 1281, 62, 17561, 1756, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3771...
2.821705
129
''' Gets the core asm module out of an emscripten output file. By default it adds a ';' to end the var asm = ... statement. You can add a third param to customize that. If the third param is 'swap-in', it will emit code to swap this asm module in, instead of the default one. XXX this probably doesn't work with cl...
[ 7061, 6, 198, 38, 1039, 262, 4755, 355, 76, 8265, 503, 286, 281, 795, 12048, 268, 5072, 2393, 13, 198, 198, 3886, 4277, 340, 6673, 257, 705, 26, 6, 284, 886, 262, 628, 220, 1401, 355, 76, 796, 2644, 198, 198, 26090, 13, 921, 460...
2.987531
401
import torch import pdb from torch.autograd import gradcheck import fused_conv_bias_relu ConvBiasReLU = ConvBiasReLU_.apply ConvBiasMaskReLU = ConvBiasMaskReLU_.apply ConvBias = ConvBias_.apply
[ 11748, 28034, 198, 11748, 279, 9945, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 3915, 9122, 198, 11748, 43954, 62, 42946, 62, 65, 4448, 62, 260, 2290, 628, 628, 198, 198, 3103, 85, 33, 4448, 3041, 41596, 796, 34872, 33, 4448, 3041, ...
2.702703
74
# Copyright 2015 Cisco Systems # 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 law...
[ 2, 15069, 1853, 28289, 11998, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 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, 1...
2.901596
376
from jogo import desenha_jogo from random import randint import sys
[ 6738, 220, 474, 24076, 1330, 748, 268, 3099, 62, 73, 24076, 198, 6738, 4738, 1330, 43720, 600, 198, 11748, 25064, 628, 628, 220, 220, 220, 220, 220, 220, 220, 220, 628, 628 ]
2.625
32
from datetime import date, datetime from DesksReminder.Basics.dataFinder import Data from DesksReminder.Basics.nickNames import ContactBook from Config.settings import JIRA_URL __author__ = 'Manuel Escriche' if __name__ == "__main__": pass
[ 6738, 4818, 8079, 1330, 3128, 11, 4818, 8079, 198, 6738, 2935, 591, 8413, 5540, 13, 15522, 873, 13, 7890, 37, 5540, 1330, 6060, 198, 6738, 2935, 591, 8413, 5540, 13, 15522, 873, 13, 17172, 36690, 1330, 14039, 10482, 198, 6738, 17056, ...
3.061728
81
#!/usr/bin/python import sys import re if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 25064, 198, 11748, 302, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 1388, 3419, 198 ]
2.277778
36
import random import numpy as np import numpy.linalg as LA import scipy as spy import time from itertools import * import sys import cvxpy as cvx from random import randint import numpy as np import random from scipy.sparse import csc_matrix from scipy import sparse as sp import networkx as nx
[ 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 13, 75, 1292, 70, 355, 9131, 198, 11748, 629, 541, 88, 355, 13997, 198, 11748, 640, 198, 6738, 340, 861, 10141, 1330, 1635, 198, 11748, 25064, 198, 11748, 269, 8...
3.16129
93
import sys import glob from os.path import join from multiprocessing import Pool import numpy as np import matplotlib.pyplot as plt from skimage import io, color from PIL import Image, ImageEnhance import torch from torch.utils.data import Dataset, DataLoader, TensorDataset import torch.nn.functional as F import torch...
[ 11748, 25064, 198, 11748, 15095, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 6738, 18540, 305, 919, 278, 1330, 19850, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 134...
2.147359
2,253
# python 3.7 """Utility functions for image editing from latent space.""" import os.path import numpy as np __all__ = [ 'parse_indices', 'interpolate', 'mix_style', 'get_layerwise_manipulation_strength', 'manipulate', 'parse_boundary_list' ] def parse_indices(obj, min_val=None, max_val=None): """Parses in...
[ 2, 21015, 513, 13, 22, 198, 37811, 18274, 879, 5499, 329, 2939, 12857, 422, 41270, 2272, 526, 15931, 198, 198, 11748, 28686, 13, 6978, 198, 11748, 299, 32152, 355, 45941, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 2...
2.739483
5,919
/home/runner/.cache/pip/pool/24/e8/39/183700a0b2d2a9545f3da2571d82b53df290aab3a51dc229b113d16e6c
[ 14, 11195, 14, 16737, 11757, 23870, 14, 79, 541, 14, 7742, 14, 1731, 14, 68, 23, 14, 2670, 14, 1507, 2718, 405, 64, 15, 65, 17, 67, 17, 64, 3865, 2231, 69, 18, 6814, 1495, 4869, 67, 6469, 65, 4310, 7568, 24369, 64, 397, 18, 64...
1.714286
56
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628, 628, 198 ]
2.875
8
"""Check new Revision ID: 92235b77ea53 Revises: 381fdb66ec27 Create Date: 2017-10-14 02:38:51.007307 """ # revision identifiers, used by Alembic. revision = '92235b77ea53' down_revision = '381fdb66ec27' from alembic import op import sqlalchemy as sa # op.create_unique_constraint(None, 'ActiveTranslationMessag...
[ 37811, 9787, 649, 198, 198, 18009, 1166, 4522, 25, 860, 1828, 2327, 65, 3324, 18213, 4310, 198, 18009, 2696, 25, 4353, 16, 69, 9945, 2791, 721, 1983, 198, 16447, 7536, 25, 2177, 12, 940, 12, 1415, 7816, 25, 2548, 25, 4349, 13, 25816...
2.618421
228
import subprocess import os def get_connected_devices() -> list: """ Returns a list of tuples containing the Device name and the android Version :return: """ devices = [] devices_output = subprocess.check_output(["adb", "devices"]).decode("utf-8").strip("List of devices attached").split("\n") ...
[ 11748, 850, 14681, 198, 11748, 28686, 628, 198, 4299, 651, 62, 15236, 62, 42034, 3419, 4613, 1351, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 16409, 257, 1351, 286, 12777, 2374, 7268, 262, 16232, 1438, 290, 262, 19286, 10628, ...
2.471474
2,191
import glob import os import sys from tempfile import TemporaryDirectory import netCDF4 import numpy as np import numpy.ma as ma from all_products_fun import Check from lidar_fun import LidarFun from cloudnetpy import concat_lib from cloudnetpy.instruments import ceilo2nc SCRIPT_PATH = os.path.dirname(os.path.realpa...
[ 11748, 15095, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 20218, 7753, 1330, 46042, 43055, 198, 198, 11748, 2010, 34, 8068, 19, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 13, 2611, 355, 17266, 198, 6738, 477, 62, 2...
2.50885
226
from sqlalchemy import Column, func from clickhouse_sqlalchemy import types, Table from tests.testcase import ( BaseAbstractTestCase, HttpSessionTestCase, NativeSessionTestCase, )
[ 6738, 44161, 282, 26599, 1330, 29201, 11, 25439, 198, 198, 6738, 3904, 4803, 62, 25410, 282, 26599, 1330, 3858, 11, 8655, 198, 6738, 5254, 13, 9288, 7442, 1330, 357, 198, 220, 220, 220, 7308, 23839, 14402, 20448, 11, 367, 29281, 36044, ...
3.54717
53