content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# Copyright (c) 2021-Present (Prashanth Pradeep) # 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...
[ 2, 15069, 357, 66, 8, 33448, 12, 34695, 357, 6836, 1077, 29313, 1736, 671, 538, 8, 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, 1184...
3.869318
176
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making (BlueKing) available. Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain ...
[ 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, 357, 14573, 15708, 8, 1695, 13, 198, 15269, 357, 34, 8, 2177, 2320, 43, 317, 1959, 15...
2.586932
903
""" "" `multiprocessing` . """ from multiprocessing import Process import os if __name__ == "__main__": main()
[ 37811, 198, 15931, 220, 198, 63, 16680, 541, 305, 919, 278, 63, 220, 220, 220, 220, 198, 220, 764, 198, 37811, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 198, 11748, 28686, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12...
2.423077
52
__author__ = '@dominofire' import os from sweeper.cloud import resource_config_combinations from sweeper.cloud.localhost import resource_config_factory as config_factory from sweeper.resource import Resource
[ 834, 9800, 834, 796, 705, 31, 3438, 259, 1659, 557, 6, 198, 198, 11748, 28686, 198, 198, 6738, 3490, 5723, 13, 17721, 1330, 8271, 62, 11250, 62, 24011, 7352, 198, 6738, 3490, 5723, 13, 17721, 13, 36750, 1330, 8271, 62, 11250, 62, 69...
3.610169
59
# Copyright 2021 Google LLC. 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 or a...
[ 2, 15069, 33448, 3012, 11419, 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, 351, 262, 13789, ...
3.572
250
from __future__ import absolute_import, division, print_function import matplotlib import numpy as np import os import subprocess import sys import tempfile matplotlib.use('pdf') import matplotlib.pyplot as plt from abc import abstractmethod, ABCMeta from dragonn.metrics import ClassificationResult from sklearn.svm imp...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 11748, 2603, 29487, 8019, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 20218, 7753, 198, ...
2.43958
1,142
# -*- coding: utf-8 -*- # Generated by Django 1.11.10 on 2018-03-20 08:34 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import parler.models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 940, 319, 2864, 12, 3070, 12, 1238, 8487, 25, 2682, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.813333
75
import logging import random from dgt.graph.graph_matcher import GraphWeightedMatch from dgt.utils import graph_iterations _logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 11748, 4738, 198, 198, 6738, 288, 13655, 13, 34960, 13, 34960, 62, 6759, 2044, 1330, 29681, 25844, 276, 23850, 198, 6738, 288, 13655, 13, 26791, 1330, 4823, 62, 2676, 602, 198, 198, 62, 6404, 1362, 796, 18931, 13, 1...
3.188679
53
import argparse import cv2 import common # from .utils.cropAtCenter import cropImageCenter # from cropAtCenter import cropImageCenter from gabriel_client.websocket_client import WebsocketClient from gabriel_client.opencv_adapter import OpencvAdapter DEFAULT_SERVER_HOST = '128.2.212.50' DEFAULT_ZOOM_FACTOR = 10 ...
[ 11748, 1822, 29572, 198, 11748, 269, 85, 17, 198, 198, 11748, 2219, 198, 2, 422, 764, 26791, 13, 31476, 2953, 23656, 1330, 13833, 5159, 23656, 198, 2, 422, 13833, 2953, 23656, 1330, 13833, 5159, 23656, 198, 198, 6738, 308, 397, 11719, ...
2.887097
124
from api import get_result import os import shutil from glob import glob from PIL import Image if __name__ == '__main__': image_files = glob('./test_images/*.*') result_dir = './test_results' if os.path.exists(result_dir): shutil.rmtree(result_dir) os.mkdir(result_dir) txt_file = os.path.j...
[ 6738, 40391, 1330, 651, 62, 20274, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 6738, 15095, 1330, 15095, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 2939, ...
2.239875
321
# Copyright (C) 2010-2011 Richard Lincoln # # 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, copy, modify, merge, publish...
[ 2, 15069, 357, 34, 8, 3050, 12, 9804, 6219, 12406, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 366, 25423, 123...
3.865132
304
from __future__ import unicode_literals
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 628, 198 ]
3.5
12
# Copyright 2020 Curtin University # # 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 writi...
[ 2, 15069, 12131, 19569, 259, 2059, 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, 743...
3.628975
283
''' Created on Mar 22, 2018 Edited on Jan 11, 2019 @author: npvance2 @author: curtisd2 Variables that will need to be edited/personalized: monitorID in Variables() (line 27) projectStartDate in Variables() (line 28) projectEndDate in Variables() (line 29) authToken in getAuthToken() (...
[ 7061, 6, 198, 41972, 319, 1526, 2534, 11, 2864, 198, 45882, 319, 2365, 1367, 11, 13130, 198, 198, 31, 9800, 25, 45941, 19259, 17, 198, 31, 9800, 25, 1090, 83, 9409, 17, 198, 198, 23907, 2977, 326, 481, 761, 284, 307, 13012, 14, 22...
2.871212
396
#! /opt/cloud_sdk/bin/python import asyncio import logging import subprocess import sys import citc_cloud sys.excepthook = handle_exception if __name__ == "__main__": log = logging.getLogger("startnode") log.setLevel(logging.INFO) handler = logging.FileHandler('/var/log/slurm/elastic.log') formatt...
[ 2, 0, 1220, 8738, 14, 17721, 62, 21282, 74, 14, 8800, 14, 29412, 198, 198, 11748, 30351, 952, 198, 11748, 18931, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 15433, 66, 62, 17721, 628, 628, 198, 17597, 13, 1069, 344, 79, 4...
2.476596
235
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # michael a.g. avzis # orthologue # (c) 1998-2018 all rights reserved # """ Verify that component registration interacts correctly with the pyre configurator model """ # access # print(" -- importing pyre") import pyre # print(" -- done") # main if __name__ == "_...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 285, 40302, 257, 13, 70, 13, 1196, 89, 271, 198, 2, 29617, 39795, 198, 2, 357, 66, 8, 7795, 12, ...
2.789063
128
import asyncio from io import BytesIO import pytest from asyncssh.connection import SSHClientConnection from asyncssh.stream import SSHReader from scrapli.exceptions import ScrapliConnectionNotOpened, ScrapliTimeout def test_write(asyncssh_transport): asyncssh_transport.stdin = BytesIO() asyncssh_t...
[ 11748, 30351, 952, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 198, 11748, 12972, 9288, 198, 6738, 30351, 45824, 13, 38659, 1330, 33825, 11792, 32048, 198, 6738, 30351, 45824, 13, 5532, 1330, 33825, 33634, 198, 198, 6738, 19320, 489, 7...
2.782609
207
from django.shortcuts import get_object_or_404 import jingo import waffle from django.contrib.auth.models import User from challenges.models import Submission, Category from projects.models import Project from blogs.models import BlogEntry from events.models import Event def splash(request, project, slug, template_n...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 198, 11748, 474, 32735, 198, 11748, 266, 30697, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 6459, 13, 27530, ...
2.275173
1,301
from plotly.subplots import make_subplots import plotly.graph_objects as go import plotly.io as pio from dataProcessor import parseLabels, parseLangs import plotly.io as pio import os years = parseLabels() langs = parseLangs() #make the plotly results fig = make_subplots( rows=1, cols=2, specs=[[{"type": "x...
[ 6738, 7110, 306, 13, 7266, 489, 1747, 1330, 787, 62, 7266, 489, 1747, 198, 11748, 7110, 306, 13, 34960, 62, 48205, 355, 467, 198, 11748, 7110, 306, 13, 952, 355, 279, 952, 198, 6738, 1366, 18709, 273, 1330, 21136, 17822, 1424, 11, 2...
2.414545
275
# Copyright 2019 BDL Benchmarks 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, 13130, 347, 19260, 25187, 14306, 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, 1184...
3.821608
398
# # PySNMP MIB module CXConsoleDriver-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CXConsoleDriver-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:32:28 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 327, 55, 47581, 32103, 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...
3.073354
1,595
# coding:utf-8 import datetime import json import re import redis from config.conf import get_redis_args redis_args = get_redis_args()
[ 2, 19617, 25, 40477, 12, 23, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 11748, 302, 198, 198, 11748, 2266, 271, 198, 6738, 4566, 13, 10414, 1330, 651, 62, 445, 271, 62, 22046, 198, 198, 445, 271, 62, 22046, 796, 651, 62, 445, ...
2.857143
49
import base64 import logging import msgpack logger = logging.getLogger(__name__) loadargs = {'use_list': False, 'raw': False} if msgpack.version < (1, 0, 0): loadargs['encoding'] = 'utf-8' else: loadargs['strict_map_key'] = False VSIG = b'MSGVIV'.ljust(8, b'\x00')
[ 11748, 2779, 2414, 198, 11748, 18931, 198, 198, 11748, 31456, 8002, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 2220, 22046, 796, 1391, 6, 1904, 62, 4868, 10354, 10352, 11, 705, 1831, 10354...
2.378151
119
"""This forms the core of the pytest plugin.""" import pytest import testing.postgresql from pytest_pgsql import database from pytest_pgsql import ext def pytest_addoption(parser): """Add configuration options for pytest_pgsql.""" parser.addoption( '--pg-extensions', action='store', default='', ...
[ 37811, 1212, 5107, 262, 4755, 286, 262, 12972, 9288, 13877, 526, 15931, 198, 198, 11748, 12972, 9288, 198, 11748, 4856, 13, 7353, 34239, 13976, 198, 198, 6738, 12972, 9288, 62, 6024, 25410, 1330, 6831, 198, 6738, 12972, 9288, 62, 6024, ...
2.988439
692
# written by abraham on aug 24
[ 2, 3194, 416, 450, 13220, 319, 16339, 1987, 628 ]
3.555556
9
import glob from os import walk exclude_folders = [ 'node_modules', 'ios', 'android', '__pycache__' ] exclude_files = [ 'json', 'txt', 'traineddata', 'lstmf', 'yml', 'md' 'log', 'env', 'gitignore', 'dockerignore' ] # get all files in directory dirr = '/home/vik...
[ 11748, 15095, 198, 6738, 28686, 1330, 2513, 198, 198, 1069, 9152, 62, 11379, 364, 796, 685, 198, 220, 220, 220, 705, 17440, 62, 18170, 3256, 198, 220, 220, 220, 705, 4267, 3256, 198, 220, 220, 220, 705, 19411, 3256, 198, 220, 220, 2...
2.394904
314
from models.contact import Contact testdata = [Contact(first_name="Firstname", last_name="Lastname", mobile_phone="+12345678", work_phone="12345", home_phone="67890", fax="55443322", email_1="email_1@email.com", email_2="email_2@email.com", email_3="emai...
[ 198, 6738, 4981, 13, 32057, 1330, 14039, 198, 198, 9288, 7890, 796, 685, 17829, 7, 11085, 62, 3672, 2625, 5962, 3672, 1600, 938, 62, 3672, 2625, 5956, 3672, 1600, 5175, 62, 4862, 2625, 10, 10163, 2231, 30924, 1600, 198, 220, 220, 220,...
1.985437
206
# Copyright 2014-2015 Canonical Limited. # # 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 ...
[ 2, 15069, 1946, 12, 4626, 19507, 605, 15302, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 19...
2.2171
3,731
"""Implements the generic progress logger class, and the ProgressBar class. """ from tqdm import tqdm, tqdm_notebook from collections import OrderedDict import time SETTINGS = { 'notebook': False } def default_bar_logger(logger, bars=None, ignored_bars=None, logged_bars='all', min_time_int...
[ 37811, 3546, 1154, 902, 262, 14276, 4371, 49706, 1398, 11, 290, 262, 18387, 10374, 1398, 13, 198, 37811, 198, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 11, 256, 80, 36020, 62, 11295, 2070, 198, 6738, 17268, 1330, 14230, 1068, 3...
2.241379
319
import gdsfactory as gf from gdsfactory.component import Component yaml = """ name: test_component_yaml_without_cell instances: mmi: component: mmi1x2 bend: component: bend_s connections: bend,o1: mmi,o2 """ def test_component_from_yaml_without_cell() -> Component: """bezier does n...
[ 11748, 308, 9310, 69, 9548, 355, 308, 69, 198, 6738, 308, 9310, 69, 9548, 13, 42895, 1330, 35100, 198, 198, 88, 43695, 796, 37227, 198, 3672, 25, 198, 220, 220, 220, 1332, 62, 42895, 62, 88, 43695, 62, 19419, 62, 3846, 198, 198, 8...
2.358156
282
from pathlib import Path from types import GeneratorType from typing import AsyncIterable, Iterable, TypeAlias import ujson from cats.errors import MalformedHeadersError try: from django.db.models import QuerySet, Model except ImportError: QuerySet = type('QuerySet', (list,), {}) Model = type('Model', (l...
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 3858, 1330, 35986, 6030, 198, 6738, 19720, 1330, 1081, 13361, 29993, 540, 11, 40806, 540, 11, 5994, 40489, 198, 198, 11748, 334, 17752, 198, 198, 6738, 11875, 13, 48277, 1330, 4434, 12214, 13847, ...
2.725
360
from __future__ import absolute_import try: import urlparse as _urlparse except ImportError: from urllib import parse as _urlparse urlparse = _urlparse.urlparse
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 19016, 29572, 355, 4808, 6371, 29572, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 2956, 297, 571, 1330, 21136, 355, 4808, 6371, ...
3.107143
56
import setuptools setuptools.setup( name="monet_memory_optimized_training", version="0.0.1", description="Memory Optimized Network Training Framework", url="https://github.com/philkr/lowrank_conv", packages=setuptools.find_packages(include = ['monet', 'monet.*', 'models', 'checkmate', 'gist']), ...
[ 11748, 900, 37623, 10141, 198, 198, 2617, 37623, 10141, 13, 40406, 7, 198, 220, 220, 220, 1438, 2625, 2144, 316, 62, 31673, 62, 40085, 1143, 62, 34409, 1600, 198, 220, 220, 220, 2196, 2625, 15, 13, 15, 13, 16, 1600, 198, 220, 220, ...
2.701571
191
# -*- coding: utf-8 -*- """ @date Created on Thu Dec 18 13:56:33 2014 @copyright (C) 2014-2015 EOMYS ENGINEERING. @author pierre_b """ from unittest import TestCase from ddt import ddt, data from pyleecan.Classes.Arc1 import Arc1 from pyleecan.Classes.Segment import Segment from pyleecan.Classes.MagnetType11 import...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 4475, 15622, 319, 26223, 4280, 1248, 1511, 25, 3980, 25, 2091, 1946, 198, 31, 22163, 4766, 357, 34, 8, 1946, 12, 4626, 412, 2662, 16309, 36924, 8881, 1...
2.29402
602
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ """ from operator import mod from tomo_encoders.misc.voxel_processing import modified_autocontrast, TimerGPU from tomo_encoders.reconstruction.recon import recon_patches_3d import cupy as cp import numpy as np from skimage.filters import threshold_otsu from tomo_en...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 220, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 220, 198, 37811, 220, 198, 37811, 220, 198, 6738, 10088, 1330, 953, 198, 6738, 284, 5908, 62, 12685, 375, 364, 13...
2.168807
545
# Generated by Django 2.2.1 on 2019-06-22 11:03 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 16, 319, 13130, 12, 3312, 12, 1828, 1367, 25, 3070, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# -*- coding: UTF-8 -*- import json from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt import tushare as ts from .publiceClass import DateEncoder
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 33571, 13, 12501, 273, 2024, 13, 6359, 41871, 1330, 269, 27891, 69, 62,...
2.921875
64
from mock import patch, MagicMock from django.contrib.auth.models import User from django.test import TestCase from django.core.urlresolvers import reverse from django.utils.datastructures import MultiValueDictKeyError from account.models import Role, Team, Organization from physical.tests.factory import EnvironmentF...
[ 6738, 15290, 1330, 8529, 11, 6139, 44, 735, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 6...
3.895833
96
# Generated by Django 3.1.4 on 2021-05-05 21:16 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 19, 319, 33448, 12, 2713, 12, 2713, 2310, 25, 1433, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
#!/usr/bin/python3 """ Good morning! Here's your coding interview problem for today. This problem was recently asked by Google. Given a list of numbers and a number k, return whether any two numbers from the list add up to k. For example, given [10, 15, 3, 7] and k of 17, return true since 10 + 7 is 17. Bonus: Can ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 37811, 198, 10248, 3329, 0, 3423, 338, 534, 19617, 2720, 1917, 329, 1909, 13, 198, 198, 1212, 1917, 373, 2904, 1965, 416, 3012, 13, 198, 198, 15056, 257, 1351, 286, 3146, 290, 257, 1271...
3.237288
118
import json import setuptools with open("template/README.md", "r") as fh: long_description = fh.read() with open('requirements.txt') as fr: requirements = fr.read().strip().split('\n') with open('metadata.json') as fr: metadata = json.load(fr) setuptools.setup( name="", # Name of the repository ...
[ 11748, 33918, 198, 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 7203, 28243, 14, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 4480, 1280...
2.833977
259
""" @Time : 201/21/19 10:41 @Author : TaylorMei @Email : mhy845879017@gmail.com @Project : iccv @File : train_base3.py @Function: """ import datetime import os import torch from torch import nn from torch import optim from torch.autograd import Variable from torch.backends import cudnn from torch.ut...
[ 37811, 198, 2488, 7575, 220, 220, 220, 1058, 580, 14, 2481, 14, 1129, 838, 25, 3901, 198, 2488, 13838, 220, 1058, 8121, 5308, 72, 198, 2488, 15333, 220, 220, 1058, 285, 12114, 23, 29334, 3720, 29326, 31, 14816, 13, 785, 198, 220, 19...
2.619974
771
import unittest from app.models import Comment, Pitch from app import db
[ 11748, 555, 715, 395, 198, 6738, 598, 13, 27530, 1330, 18957, 11, 33517, 198, 6738, 598, 1330, 20613 ]
4
18
from django.shortcuts import render from django.http import HttpResponse from django.contrib.auth.decorators import login_required from django.views.decorators.csrf import csrf_exempt from django.template import loader from django.db import connection from django.http import HttpResponseRedirect import datetime from dj...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 42625, 14208, 13, ...
3.730769
130
import logging import pytest import re from . import text from ... import matchers from ...utils import answer, SimpleTrigger logger = logging.getLogger(__name__) def test_serialize_text_any(): m_old = text.Any() m_new = matchers.deserialize(matchers.serialize(m_old)) assert isinstance(m_new, text.An...
[ 11748, 18931, 198, 11748, 12972, 9288, 198, 11748, 302, 198, 6738, 764, 1330, 2420, 198, 6738, 2644, 1330, 2603, 3533, 198, 6738, 2644, 26791, 1330, 3280, 11, 17427, 48344, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834...
2.718254
252
"""Objects representing API interface to Wikibase site.""" # # (C) Pywikibot team, 2012-2022 # # Distributed under the terms of the MIT license. # import datetime import json import uuid from contextlib import suppress from typing import Optional from warnings import warn import pywikibot from pywikibot.data import ap...
[ 37811, 10267, 82, 10200, 7824, 7071, 284, 11145, 571, 589, 2524, 526, 15931, 198, 2, 198, 2, 357, 34, 8, 9485, 20763, 571, 313, 1074, 11, 2321, 12, 1238, 1828, 198, 2, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 17168, 5964, 13,...
2.179253
3,509
from flask import Flask from flask import render_template, request from flask import jsonify import requests import json app = Flask(__name__) app.run(debug=True)
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 1330, 8543, 62, 28243, 11, 2581, 220, 198, 6738, 42903, 1330, 33918, 1958, 198, 11748, 7007, 198, 11748, 33918, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 628, 198, 1324, 13, 5143, 7, 2444...
3.666667
45
from pyspark.sql import SparkSession # spark = SparkSession.builder.master("local[*]").getOrCreate() spark = SparkSession.builder.getOrCreate() file_path = "C:\home_work\local_github\Spark-The-Definitive-Guide\data\/flight-data\csv\/2015-summary.csv" # COMMAND ---------- # COMMAND ---------- flightData2015 = spa...
[ 6738, 279, 893, 20928, 13, 25410, 1330, 17732, 36044, 198, 198, 2, 9009, 796, 17732, 36044, 13, 38272, 13, 9866, 7203, 12001, 58, 9, 60, 11074, 1136, 5574, 16447, 3419, 198, 198, 2777, 668, 796, 17732, 36044, 13, 38272, 13, 1136, 5574...
2.666667
594
import os import pickle import pytest import pandas as pd from shapely import wkt from intake_postgres import PostgresSource from intake import open_catalog from .util import verify_datasource_interface TEST_DATA_DIR = 'tests' TEST_DATA = [ ('sample1', 'sample1.csv'), ('sample2_1', 'sample2_1.csv'), ('sa...
[ 11748, 28686, 198, 11748, 2298, 293, 198, 11748, 12972, 9288, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 5485, 306, 1330, 266, 21841, 198, 198, 6738, 10337, 62, 7353, 34239, 1330, 2947, 34239, 7416, 198, 6738, 10337, 1330, 1280, 6...
2.443662
568
# file = open('C:\\Users\\dks10\\OneDrive\\Desktop\\Projects\\Code\\Python\\PythonCrypto\\Module_3\\eye.png', 'rb') file = open('encrypt_eye.png', 'rb') image = file.read() file.close() image = bytearray(image) key = 48 for index, value in enumerate(image): image[index] = value^key file = open('2eye.png','wb') ...
[ 2, 2393, 796, 1280, 10786, 34, 25, 6852, 14490, 6852, 67, 591, 940, 6852, 3198, 24825, 6852, 36881, 6852, 16775, 82, 6852, 10669, 6852, 37906, 6852, 37906, 23919, 78, 6852, 26796, 62, 18, 6852, 25379, 13, 11134, 3256, 705, 26145, 11537,...
2.619403
134
import time import logging from ledfxcontroller.effects import Effect from threading import Thread import voluptuous as vol _LOGGER = logging.getLogger(__name__) DEFAULT_RATE = 1.0 / 60.0
[ 11748, 640, 198, 11748, 18931, 198, 6738, 2957, 21373, 36500, 13, 34435, 1330, 7896, 198, 6738, 4704, 278, 1330, 14122, 198, 11748, 2322, 37623, 5623, 355, 2322, 198, 198, 62, 25294, 30373, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 367...
3.258621
58
n=int(input()) c = 1 while c**2 < n: print(c**2) c += 1
[ 77, 28, 600, 7, 15414, 28955, 198, 66, 796, 352, 198, 4514, 269, 1174, 17, 1279, 299, 25, 198, 220, 220, 3601, 7, 66, 1174, 17, 8, 198, 220, 220, 269, 15853, 352, 198 ]
1.823529
34
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628, 198 ]
3
7
from nltk.tokenize import sent_tokenize, word_tokenize from nltk.corpus import stopwords import speech_recognition as sr import nltk from google_images_download import google_images_download response = google_images_download.googleimagesdownload() r = sr.Recognizer() with sr.Microphone() as source: print("Say some...
[ 6738, 299, 2528, 74, 13, 30001, 1096, 1330, 1908, 62, 30001, 1096, 11, 1573, 62, 30001, 1096, 198, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 2245, 10879, 198, 11748, 4046, 62, 26243, 653, 355, 19677, 198, 11748, 299, 2528, 74, ...
2.967033
273
from dataclasses import dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198 ]
3.777778
9
# Copyright (c) 2009-2021 The Regents of the University of Michigan # This file is part of the HOOMD-blue project, released under the BSD 3-Clause # License. """MPI communicator.""" from hoomd import _hoomd import hoomd import contextlib def barrier(self): """Perform a barrier synchronization across al...
[ 2, 15069, 357, 66, 8, 3717, 12, 1238, 2481, 383, 3310, 658, 286, 262, 2059, 286, 7055, 198, 2, 770, 2393, 318, 636, 286, 262, 40115, 2662, 35, 12, 17585, 1628, 11, 2716, 739, 262, 347, 10305, 513, 12, 2601, 682, 198, 2, 13789, 1...
2.915709
261
from config import DataGeneratorCfg from sklearn.datasets.samples_generator import make_blobs import numpy as np
[ 6738, 4566, 1330, 6060, 8645, 1352, 34, 40616, 198, 6738, 1341, 35720, 13, 19608, 292, 1039, 13, 82, 12629, 62, 8612, 1352, 1330, 787, 62, 2436, 8158, 198, 11748, 299, 32152, 355, 45941, 628 ]
3.352941
34
import _ast from peon.src.project.file.function_def.function import FunctionLint
[ 11748, 4808, 459, 198, 198, 6738, 613, 261, 13, 10677, 13, 16302, 13, 7753, 13, 8818, 62, 4299, 13, 8818, 1330, 15553, 43, 600, 628, 628, 628, 198 ]
3.142857
28
############################################################################### # # '''Website Database-connection-related features''' # # # ...
[ 29113, 29113, 7804, 4242, 21017, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
1.799043
1,463
from minio import Minio import json import os from .Inspector import Inspector from .topic_model import topic_model #def handle(event):
[ 6738, 949, 952, 1330, 1855, 952, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 764, 818, 4443, 273, 1330, 24625, 198, 6738, 764, 26652, 62, 19849, 1330, 7243, 62, 19849, 198, 198, 2, 4299, 5412, 7, 15596, 2599, 198 ]
3.512821
39
""" Proxmox VE exporter for the Prometheus monitoring system. """ import sys from argparse import ArgumentParser from pve_exporter.http import start_http_server def main(args=None): """ Main entry point. """ parser = ArgumentParser() parser.add_argument('config', nargs='?', default='pve.yml', ...
[ 37811, 198, 2964, 87, 76, 1140, 569, 36, 1033, 4337, 329, 262, 42696, 9904, 1080, 13, 198, 37811, 198, 198, 11748, 25064, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 6738, 279, 303, 62, 1069, 26634, 13, 4023, 1330, 923, 62, 4023,...
2.573718
312
#SPDX-License-Identifier: MIT import logging, os, sys, time, requests, json from datetime import datetime from multiprocessing import Process, Queue import pandas as pd import sqlalchemy as s from workers.worker_base import Worker # NOTE: This worker primarily inserts rows into the REPO_INFO table, which serves the pr...
[ 2, 4303, 36227, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 11748, 18931, 11, 28686, 11, 25064, 11, 640, 11, 7007, 11, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 11, 4670, 518, 198, ...
3.944186
215
# coding: utf-8 from __future__ import print_function from __future__ import division from __future__ import absolute_import from __future__ import unicode_literals import argparse
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17...
3.603774
53
from fbs_runtime.application_context.PyQt5 import ApplicationContext, cached_property from fbs_runtime.platform import is_windows, is_mac # system imports import sys # module imports from PyQt5 import uic, QtWidgets from PyQt5.QtWidgets import QMessageBox import numpy as np import matplotlib.pyplot as plt import matp...
[ 6738, 277, 1443, 62, 43282, 13, 31438, 62, 22866, 13, 20519, 48, 83, 20, 1330, 15678, 21947, 11, 39986, 62, 26745, 198, 6738, 277, 1443, 62, 43282, 13, 24254, 1330, 318, 62, 28457, 11, 318, 62, 20285, 198, 2, 1080, 17944, 198, 11748...
2.75974
308
import io import logging import os import sys from PyQt5 import QtGui, QtCore, QtWidgets from helpus import icon_file_path from helpus import __version__ LOGGER = logging.getLogger('HelpUs') LOGGER.setLevel(logging.DEBUG) def get_qtconsole_object(): if isinstance(sys.stdin, MyBreakPoint): return sys.s...
[ 11748, 33245, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 8205, 72, 11, 33734, 14055, 11, 33734, 54, 312, 11407, 198, 6738, 1037, 385, 1330, 7196, 62, 7753, 62, 6978, 198, 67...
2.481928
498
import math def test_01(): schedule = Schedule(100, 10) for batch in schedule: print(batch) print(schedule) if __name__ == "__main__": test_02()
[ 11748, 10688, 628, 198, 4299, 1332, 62, 486, 33529, 198, 220, 220, 220, 7269, 796, 19281, 7, 3064, 11, 838, 8, 198, 220, 220, 220, 329, 15458, 287, 7269, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 43501, 8, 198, 220, 2...
2.328947
76
# -*- coding: utf-8 -*- import asyncio import os import sys root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(root + '/python') import ccxt.async as ccxt # noqa: E402 if __name__ == '__main__': print(asyncio.get_event_loop().run_until_complete(test_gdax()))
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 30351, 952, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 15763, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 69...
2.409091
132
__author__ = 'Rio'
[ 834, 9800, 834, 796, 705, 49, 952, 6, 198 ]
2.111111
9
from abc import ABCMeta, abstractmethod
[ 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 628 ]
4.1
10
from __future__ import absolute_import import os import shutil import locket import string from toolz import memoize from contextlib import contextmanager from .utils import nested_get, flatten # http://stackoverflow.com/questions/295135/turn-a-string-into-a-valid-filename-in-python valid_chars = "-_.() " + string....
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 300, 5459, 198, 11748, 4731, 198, 6738, 2891, 89, 1330, 16155, 1096, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 6738, 764, 26...
2.612121
330
''' model ensemble for cifar10 // input size(32,32) ''' import torch import torchvision import copy import torch.nn as nn from resnetv2 import ResNet50 as resnet50v2
[ 7061, 6, 201, 198, 19849, 34549, 329, 269, 361, 283, 940, 220, 3373, 5128, 2546, 7, 2624, 11, 2624, 8, 201, 198, 7061, 6, 201, 198, 201, 198, 201, 198, 11748, 28034, 201, 198, 11748, 28034, 10178, 201, 198, 201, 198, 11748, 4866, ...
2.466667
75
# -*- coding: utf-8 -*- """ Function that implement Complement the Complementary Cumulative Distribution Function (CCDF). """ # # written by Chengcheng Shao <sccotte@gmail.com> import numpy as np import pandas as pd def ccdf(s): """ Parameters: `s`, series, the values of s should be variable to be ha...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 15553, 326, 3494, 955, 26908, 262, 955, 26908, 560, 27843, 13628, 198, 20344, 3890, 15553, 357, 4093, 8068, 737, 198, 37811, 198, 2, 198, 2, 3194, 416, 27692, 239...
2.345489
521
# -*- coding: utf-8 -*- from __future__ import print_function import numpy as np import pandas as pd from lifelines.fitters import UnivariateFitter from lifelines.utils import _preprocess_inputs, _additive_estimate, StatError, inv_normal_cdf,\ median_survival_times from lifelines.plotting import plot_loglogs
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 3868, 20655, 13, 11147, 1010, 13...
3.038462
104
import numpy as np from pydmfet import tools from .fermi import find_efermi, entropy_corr from pyscf import ao2mo, gto, scf, dft, lib from pydmfet.qcwrap import fermi import time from functools import reduce # The following is deprecated! ''' def rhf(mol, OEI, TEI, Norb, Nelec, OneDM0=None ): # Get the RHF...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 279, 5173, 76, 34045, 1330, 4899, 198, 6738, 764, 2232, 11632, 1330, 1064, 62, 891, 7780, 72, 11, 40709, 62, 10215, 81, 198, 6738, 279, 893, 12993, 1330, 257, 78, 17, 5908, 11, 308, 1462, 11...
1.9
1,330
#!/usr/bin/env python # # Copyright Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENS...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 220, 15069, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 220, 220, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, ...
3.034398
814
# pylint:disable=line-too-long import logging from ...sim_type import SimTypeFunction, SimTypeShort, SimTypeInt, SimTypeLong, SimTypeLongLong, SimTypeDouble, SimTypeFloat, SimTypePointer, SimTypeChar, SimStruct, SimTypeFixedSizeArray, SimTypeBottom, SimUnion, SimTypeBool from ...calling...
[ 2, 279, 2645, 600, 25, 40223, 28, 1370, 12, 18820, 12, 6511, 198, 11748, 18931, 198, 198, 6738, 2644, 14323, 62, 4906, 1330, 3184, 6030, 22203, 11, 220, 220, 220, 220, 3184, 6030, 16438, 11, 3184, 6030, 5317, 11, 3184, 6030, 14617, ...
3.012982
30,272
"""Define the aiolookin package.""" from .device import async_get_device # noqa
[ 37811, 7469, 500, 262, 257, 1669, 566, 259, 5301, 526, 15931, 198, 6738, 764, 25202, 1330, 30351, 62, 1136, 62, 25202, 220, 1303, 645, 20402, 198 ]
3.115385
26
# -*- coding: utf-8 -*- from .common import loadOde from .common import dGeomID from .common import dSpaceID from .common import dVector3 from ctypes import POINTER from ctypes import CFUNCTYPE from ctypes import c_void_p from ctypes import c_int32 dNearCallback = CFUNCTYPE(None, c_void_p, dGeomID, dGeomID) dQuadTr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 764, 11321, 1330, 3440, 46, 2934, 198, 6738, 764, 11321, 1330, 288, 10082, 296, 2389, 198, 6738, 764, 11321, 1330, 288, 14106, 2389, 198, 6738, 764, 11321, 13...
2.588328
634
#!/usr/bin/python3 # pip3 install websockets import asyncio import websockets import json import datetime import sys # wbsocket event loop # connect to pythd, subscribe to and start publishing on two symbols if __name__ == '__main__': uri='ws://localhost:8910' eloop = asyncio.get_event_loop() try: eloop.r...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 2, 7347, 18, 2721, 2639, 11603, 198, 11748, 30351, 952, 198, 11748, 2639, 11603, 198, 11748, 33918, 198, 11748, 4818, 8079, 198, 11748, 25064, 628, 198, 2, 266, 1443, 5459, 1785, 905...
2.883871
155
''' Given an array of intervals, merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input. Input: intervals = [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6],[8,10],[15,18]] Explanation: Since intervals [1,3] and [2,6] overlaps, merge them into [1,6]....
[ 7061, 6, 198, 15056, 281, 7177, 286, 20016, 11, 20121, 477, 32997, 20016, 11, 220, 198, 392, 1441, 281, 7177, 286, 262, 1729, 12, 2502, 75, 5912, 20016, 326, 3002, 477, 262, 20016, 287, 262, 5128, 13, 198, 198, 20560, 25, 20016, 796...
2.864721
377
"""Unit tests.""" import inspect import json from mock import Mock import os import sys import uuid import pytest # Add the lambda directory to the python library search path lambda_dir = os.path.join( os.path.dirname(inspect.getfile(inspect.currentframe())), '..') sys.path.append(lambda_dir) import lambdautils...
[ 37811, 26453, 5254, 526, 15931, 198, 198, 11748, 10104, 198, 11748, 33918, 198, 6738, 15290, 1330, 44123, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 334, 27112, 198, 198, 11748, 12972, 9288, 198, 198, 2, 3060, 262, 37456, 8619, 284...
2.642166
1,034
import os from testr.packages import make_regress_files regress_files = ['starcheck.txt', 'starcheck/pcad_att_check.txt'] clean = {'starcheck.txt': [(r'\s*Run on.*[\n\r]*', ''), (os.environ['SKA'], '')], 'starcheck/pcad_att_check.txt': [(os.environ['SKA'], '')]} m...
[ 11748, 28686, 198, 6738, 1332, 81, 13, 43789, 1330, 787, 62, 2301, 601, 62, 16624, 198, 198, 2301, 601, 62, 16624, 796, 37250, 7364, 9122, 13, 14116, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.010989
182
""" WSGI config for testsite project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION``...
[ 37811, 198, 19416, 18878, 4566, 329, 5254, 578, 1628, 13, 198, 198, 1212, 8265, 4909, 262, 25290, 18878, 3586, 973, 416, 37770, 338, 2478, 4382, 198, 392, 597, 3227, 25290, 18878, 40854, 13, 632, 815, 15651, 257, 8265, 12, 5715, 7885, ...
3.248447
483
#!/usr/bin/env python3 -u # -* encoding: utf-8 *- import argparse import asyncore import json import logging import signal import sys import os from types import FrameType from typing import Tuple, Sequence, Any, Union, Optional, List, Dict from concurrent.futures import ThreadPoolExecutor as Pool import daemon from...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 532, 84, 198, 2, 532, 9, 21004, 25, 3384, 69, 12, 23, 1635, 12, 198, 198, 11748, 1822, 29572, 198, 11748, 355, 2047, 7295, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 6737, 198,...
3.147727
176
import requests from bs4 import BeautifulSoup, element
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 11, 5002, 628 ]
4
14
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from product_details import settings_defaults def settings_fallback(key): """Grab user-defined settings, or fall back to default.""" try: return getattr(settings, key) except (AttributeError, ImportError, Imp...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 12205, 525, 306, 16934, 1522, 198, 198, 6738, 1720, 62, 36604, 1330, 6460, 62, 12286, 82, 628, 198, 4299, 6460, 62, 7207, 1891, 7, 25...
3.206612
121
# CPU: 0.06 s possessed, found, condition = map(int, input().split()) possessed += found count = 0 while possessed >= condition: div, mod = divmod(possessed, condition) count += div possessed = div + mod print(count)
[ 2, 9135, 25, 657, 13, 3312, 264, 198, 79, 793, 6676, 11, 1043, 11, 4006, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 79, 793, 6676, 15853, 1043, 198, 9127, 796, 657, 198, 4514, 17273, 18189, 4006, 25, 198, 220, 220, 220...
2.898734
79
""" Copyright 2017-2018 yhenon (https://github.com/yhenon/) Copyright 2017-2018 Fizyr (https://fizyr.com) 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-...
[ 37811, 198, 15269, 2177, 12, 7908, 331, 831, 261, 357, 5450, 1378, 12567, 13, 785, 14, 88, 831, 261, 34729, 198, 15269, 2177, 12, 7908, 376, 528, 2417, 357, 5450, 1378, 69, 528, 2417, 13, 785, 8, 198, 198, 26656, 15385, 739, 262, ...
2.199519
2,912
from . import events # noqa from django.core.wsgi import get_wsgi_application import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "hoover.site.settings") application = get_wsgi_application()
[ 6738, 764, 1330, 2995, 220, 1303, 645, 20402, 198, 6738, 42625, 14208, 13, 7295, 13, 18504, 12397, 1330, 651, 62, 18504, 12397, 62, 31438, 198, 11748, 28686, 198, 418, 13, 268, 2268, 13, 2617, 12286, 7203, 35028, 1565, 11230, 62, 28480,...
2.941176
68
#!/usr/bin/env python #Copyright (C) 2013 by Glenn Hickey # #Released under the MIT license, see LICENSE.txt #!/usr/bin/env python """This is a two-state continuous time markov model: 0: unconstratined. 1: constrained. There are two transition rates to go between states. lossRate: 1->0 and gainRate: 0->1. Probabi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15269, 357, 34, 8, 2211, 416, 17551, 367, 40389, 198, 2, 198, 2, 45037, 739, 262, 17168, 5964, 11, 766, 38559, 24290, 13, 14116, 198, 2, 48443, 14629, 14, 8800, 14, 24330, ...
3.893069
505
from django.test import TestCase from .validators import validate_budget_period from .models import Budget, Expense, Payment from django.contrib.auth.models import User from django.core.exceptions import ValidationError
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 764, 12102, 2024, 1330, 26571, 62, 37315, 62, 41007, 198, 6738, 764, 27530, 1330, 15401, 11, 5518, 1072, 11, 28784, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530...
3.779661
59
# Generated by Django 3.2.3 on 2021-06-13 19:58 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 18, 319, 33448, 12, 3312, 12, 1485, 678, 25, 3365, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
# Copyright 2013-2022 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) import re from spack.package import *
[ 2, 15069, 2211, 12, 1238, 1828, 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.414286
70
print(18 * 1234) print(18 * 1234 * 2) print(0 * 1) print(1 * 0) print(0.0 * 1.0) print(1.0 * 0.0)
[ 4798, 7, 1507, 1635, 1105, 2682, 8, 198, 4798, 7, 1507, 1635, 1105, 2682, 1635, 362, 8, 198, 4798, 7, 15, 1635, 352, 8, 198, 4798, 7, 16, 1635, 657, 8, 198, 4798, 7, 15, 13, 15, 1635, 352, 13, 15, 8, 198, 4798, 7, 16, 13, ...
1.814815
54
num = int(input()) d1 = (num % 10 ** 4) // 10 ** 3 d2 = (num % 10 ** 3) // 10 ** 2 d3 = (num % 10 ** 2) // 10 d4 = num % 10 print(" ", d1) print(" ", d2) print(" ", d3) print(" ", d4) # print("Python", , "is the best") _quit = 1 print(_quit * 2)
[ 22510, 796, 493, 7, 15414, 28955, 198, 67, 16, 796, 357, 22510, 4064, 838, 12429, 604, 8, 3373, 838, 12429, 513, 198, 67, 17, 796, 357, 22510, 4064, 838, 12429, 513, 8, 3373, 838, 12429, 362, 198, 67, 18, 796, 357, 22510, 4064, 83...
2.132231
121
import csv from os import listdir from os.path import isfile, join from osgeo import ogr from multiprocessing import Pool driver = ogr.GetDriverByName('GeoJSON') countryFile = driver.Open("../data/external/countries.json") layer = countryFile.GetLayer() def getCountry(lat, lng): """ Checks given gps-incom...
[ 11748, 269, 21370, 198, 6738, 28686, 1330, 1351, 15908, 198, 6738, 28686, 13, 6978, 1330, 318, 7753, 11, 4654, 198, 198, 6738, 28686, 469, 78, 1330, 267, 2164, 198, 6738, 18540, 305, 919, 278, 1330, 19850, 198, 198, 26230, 796, 267, 2...
2.337625
699
import cv2 import numpy as np def process_core(image): ''' Returns an inverted preprocessed binary image, with noise reduction achieved with greyscaling, Gaussian Blur, Otsu's Threshold, and an open morph. ''' #apply greyscaling, Gaussian Blur, and Otsu's Threshold greyscale = cv2.cvtColor...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4299, 1429, 62, 7295, 7, 9060, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 16409, 281, 37204, 662, 14681, 276, 13934, 2939, 11, 351, 7838, 198, 220, 220,...
2.507163
349
# Copyright (c) Facebook, Inc. and its affiliates. """ Tasks come above datasets in hierarchy level. In case you want to implement a new task, you need to inherit ``BaseTask`` class. You need to implement ``_get_available_datasets`` and ``_preprocess_item`` functions to complete the implementation. You can check the so...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 37811, 198, 51, 6791, 1282, 2029, 40522, 287, 18911, 1241, 13, 554, 1339, 345, 765, 284, 198, 320, 26908, 257, 649, 4876, 11, 345, 761, 284, 16955, 7559, 14881, 2...
2.763926
377
from numba import jit import numpy as np
[ 6738, 997, 7012, 1330, 474, 270, 198, 11748, 299, 32152, 355, 45941 ]
3.333333
12
# vim:ts=4:sts=4:sw=4:expandtab from token import token_container from satori.core.export.type_helpers import DefineException AccessDenied = DefineException('AccessDenied', 'You don\'t have rights to call this procedure') def init(): global Privilege from satori.core.models import Privilege
[ 2, 43907, 25, 912, 28, 19, 25, 6448, 28, 19, 25, 2032, 28, 19, 25, 11201, 392, 8658, 198, 6738, 11241, 1330, 11241, 62, 34924, 198, 6738, 264, 1352, 72, 13, 7295, 13, 39344, 13, 4906, 62, 16794, 364, 1330, 2896, 500, 16922, 198, ...
3.089109
101