content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from unittest import TestCase from wsgisubdomain import SubdomainDispatcher
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 266, 45213, 271, 549, 27830, 1330, 3834, 27830, 7279, 8071, 2044, 628 ]
3.666667
21
import pytest from unittestmock import UnitTestMock from cykhash import Int64Set, Int32Set, Float64Set, Float32Set, PyObjectSet import cykhash SUFFIX={Int64Set : "int64", Int32Set : "int32", Float64Set : "float64", Float32Set : "float32", PyObjectSet : "pyobject"} @pyte...
[ 11748, 12972, 9288, 198, 6738, 555, 715, 395, 76, 735, 1330, 11801, 14402, 44, 735, 628, 198, 6738, 3075, 14636, 1077, 1330, 2558, 2414, 7248, 11, 2558, 2624, 7248, 11, 48436, 2414, 7248, 11, 48436, 2624, 7248, 11, 9485, 10267, 7248, ...
2.214777
582
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
3.670498
522
# Copyright 2021 MosaicML. All Rights Reserved. import pytest from composer.models import ModelHparams from composer.trainer.trainer_hparams import model_registry @pytest.mark.parametrize("model_name", model_registry.keys())
[ 2, 15069, 33448, 5826, 18452, 5805, 13, 1439, 6923, 33876, 13, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 26777, 13, 27530, 1330, 9104, 39, 37266, 198, 6738, 26777, 13, 2213, 10613, 13, 2213, 10613, 62, 71, 37266, 1330, 2746, 62, 2...
3.367647
68
from .base import GnuRecipe
[ 6738, 764, 8692, 1330, 18509, 84, 37523, 628, 198 ]
3.333333
9
#!/usr/bin/env python3 # coding: utf8 from labconstants import LabConstants if __name__ == '__main__': import argparse parser = argparse.ArgumentParser(description='色空間を変換する。Lab->RGB', formatter_class=argparse.RawTextHelpFormatter) parser.add_argument('lab', help="色。カンマ区切りで渡す。\n 0.0 <= l <= 100.0\n -86.1...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 25, 3384, 69, 23, 198, 6738, 2248, 9979, 1187, 1330, 3498, 34184, 1187, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1330, 18...
2.056738
282
# Copyright 2009-2010 by Ka-Ping Yee # # 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, 3717, 12, 10333, 416, 11611, 12, 49806, 575, 1453, 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, 1...
2.921539
8,004
import numpy as np import time from ray.rllib.policy.policy import Policy, LEARNER_STATS_KEY, ACTION_PROB, \ ACTION_LOGP from ray.rllib.policy.sample_batch import SampleBatch from ray.rllib.utils.annotations import override, DeveloperAPI from ray.rllib.utils.framework import try_import_torch from ray.rllib.utils.s...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 198, 6738, 26842, 13, 81, 297, 571, 13, 30586, 13, 30586, 1330, 7820, 11, 12509, 1503, 21479, 62, 2257, 33586, 62, 20373, 11, 40282, 62, 4805, 9864, 11, 3467, 198, 220, 220, 220, ...
2.476344
1,860
import os from .parser import parse_args from .logger import Logger from .configuration import Configuration from .requester import Requester import platform def main() -> None: """Main function where the program start""" args = parse_args() config_path = check_os_path() log = Logger(debug_flag=Tru...
[ 11748, 28686, 198, 6738, 764, 48610, 1330, 21136, 62, 22046, 198, 6738, 764, 6404, 1362, 1330, 5972, 1362, 198, 6738, 764, 11250, 3924, 1330, 28373, 198, 6738, 764, 8897, 7834, 1330, 9394, 7834, 198, 11748, 3859, 628, 198, 198, 4299, 13...
2.732591
359
from aiosqlite import connect as db_connect from time import time from typing import List, Optional from dataclasses import dataclass from .common import DBTable @dataclass
[ 6738, 257, 4267, 13976, 578, 220, 1330, 2018, 355, 20613, 62, 8443, 198, 6738, 640, 220, 220, 220, 220, 220, 220, 220, 1330, 640, 198, 6738, 19720, 220, 220, 220, 220, 220, 1330, 7343, 11, 32233, 198, 6738, 4818, 330, 28958, 1330, 4...
3.031746
63
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321...
3.198093
1,888
# A PREDICTIVE MODEL FOR GOOGLE STOCK PRICES USING LINEAR REGRESSION # IMPORTING ALL THE MODULES import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression # READING THE DATASET AND VISUALIZING A FEW ENTRIES dt=pd.read_csv...
[ 2, 317, 4810, 1961, 18379, 9306, 19164, 3698, 7473, 402, 6684, 38, 2538, 3563, 11290, 4810, 34444, 1294, 2751, 48920, 1503, 4526, 10761, 47621, 201, 198, 201, 198, 201, 198, 2, 30023, 9863, 2751, 11096, 3336, 19164, 6239, 1546, 201, 198...
2.375157
797
# AUTOGENERATED! DO NOT EDIT! File to edit: 100_test.ipynb (unless otherwise specified). __all__ = ['items_to_arrays'] # Cell from .core import * from .data import * from .models import * from .datasets import * from .augmentations import * from .datablock import * from .dataloader import * # Cell def items_to_array...
[ 2, 47044, 7730, 1677, 1137, 11617, 0, 8410, 5626, 48483, 0, 9220, 284, 4370, 25, 1802, 62, 9288, 13, 541, 2047, 65, 357, 25252, 4306, 7368, 737, 198, 198, 834, 439, 834, 796, 37250, 23814, 62, 1462, 62, 3258, 592, 20520, 198, 198, ...
2.770335
209
# coding=utf-8 """Useful miscellaneous tools and shortcuts for Sopel plugins *Availability: 3+* """ # tools.py - Sopel misc tools # Copyright 2008, Sean B. Palmer, inamidst.com # Copyright © 2012, Elad Alfassa <elad@fedoraproject.org> # Copyright 2012, Elsie Powell, embolalia.com # Licensed under the Eiffel Forum Lic...
[ 2, 19617, 28, 40477, 12, 23, 198, 37811, 11041, 913, 2984, 25673, 4899, 290, 32953, 329, 35643, 417, 20652, 198, 198, 9, 29841, 25, 513, 10, 9, 198, 37811, 198, 198, 2, 4899, 13, 9078, 532, 35643, 417, 12747, 4899, 198, 2, 15069, ...
2.559701
10,025
""" Produce TREC fair ranking runs from an oracle. This script assumes the data lives in a directory 'data'. It loads the training topics and uses them as an oracle for producing rankings. Usage: oracle-runs.py --task1 [options] oracle-runs.py --task2 [options] Options: -v, --verbose Write verbo...
[ 37811, 198, 11547, 344, 309, 38827, 3148, 12759, 4539, 422, 281, 393, 6008, 13, 198, 198, 1212, 4226, 18533, 262, 1366, 3160, 287, 257, 8619, 705, 7890, 4458, 220, 632, 15989, 262, 3047, 198, 4852, 873, 290, 3544, 606, 355, 281, 393, ...
2.775281
267
import argparse import csv import requests import urllib3 from urllib.parse import urljoin from lib import decrypt_beacon, decode_config, JsonEncoder import multiprocessing from functools import partial import datetime import pandas as pd if __name__ == "__main__": parser = argparse.ArgumentParser(description='...
[ 11748, 1822, 29572, 198, 11748, 269, 21370, 198, 11748, 7007, 198, 11748, 2956, 297, 571, 18, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 22179, 198, 6738, 9195, 1330, 42797, 62, 1350, 7807, 11, 36899, 62, 11250, 11, 449, 1559, ...
2.700226
884
# The MIT-Zero License # Copyright 2020 Amazon.com, Inc. or its affiliates. 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 limit...
[ 2, 383, 17168, 12, 28667, 13789, 198, 198, 2, 15069, 12131, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4...
2.301118
3,487
from core.constraints.hard.hard_constraint_1 import violates_hard_constraint_1 from core.constraints.hard.hard_constraint_2 import violates_hard_constraint_2 from core.constraints.soft.soft_constraint_1 import penalty_of_soft_constraint_1 from core.constraints.soft.soft_constraint_2 import penalty_of_soft_constraint_...
[ 198, 6738, 4755, 13, 1102, 2536, 6003, 13, 10424, 13, 10424, 62, 1102, 2536, 2913, 62, 16, 1330, 21806, 62, 10424, 62, 1102, 2536, 2913, 62, 16, 198, 6738, 4755, 13, 1102, 2536, 6003, 13, 10424, 13, 10424, 62, 1102, 2536, 2913, 62, ...
2.520699
1,087
#!/usr/bin/env python # Provide code as arg: ./whatever.py "0000 ... ..." import binascii import struct if __name__ == '__main__': import sys for code in sys.argv[1:]: pronto = bytearray.fromhex(code) pulses = pronto2lirc(pronto) output = "" count = 0 for pulse in ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 44290, 2438, 355, 1822, 25, 24457, 39664, 13, 9078, 366, 2388, 2644, 35713, 220, 198, 198, 11748, 9874, 292, 979, 72, 198, 11748, 2878, 628, 198, 361, 11593, 3672, 834, 6624, ...
1.973783
267
import torch from torch import nn class MutualInfoLoss(nn.Module): """ Mutual Information Loss derived from ss-with-RIM that also applied in this work. First term enforces to generate a sparse nSpixel dimension vector for each pixel; Second term indicates the cardinality o...
[ 11748, 28034, 201, 198, 6738, 28034, 1330, 299, 77, 201, 198, 201, 198, 201, 198, 4871, 48807, 12360, 43, 793, 7, 20471, 13, 26796, 2599, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 220, 220, 220, 220, 48807, 6188, 2201...
2.204743
1,729
from engi_mod import * Card( name = "Turret", type = "power", target = "self", rarity = "uncommon", cost = 1, const = dict( DAMAGE = 6, DAMAGE_UPGRADE = 3, MAGIC_NUMBER = "DAMAGE", ), desc = "At the end of your turn, deal !M! damage to a random enemy.", upgra...
[ 6738, 1786, 72, 62, 4666, 1330, 1635, 198, 198, 16962, 7, 198, 220, 220, 220, 1438, 796, 366, 17483, 1186, 1600, 198, 220, 220, 220, 2099, 796, 366, 6477, 1600, 198, 220, 220, 220, 2496, 796, 366, 944, 1600, 198, 220, 220, 220, 32...
2.137931
609
#!/usr/bin/python3 """ Define a class City that inherits from Base """ from sqlalchemy import Column, Integer, String, ForeignKey from model_state import Base class City(Base): """ A class City that inherits from Base """ __tablename__ = "cities" id = Column(Integer, primary_key=True, nullable=F...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 37811, 198, 7469, 500, 257, 1398, 2254, 326, 10639, 896, 422, 7308, 198, 37811, 198, 198, 6738, 44161, 282, 26599, 1330, 29201, 11, 34142, 11, 10903, 11, 8708, 9218, 198, 6738, 2746, 62, ...
2.79096
177
from collections import defaultdict from compressor.templatetags.compress import CompressorNode from django.template import ( Library, Node, Template, TemplateSyntaxError, Context) register = Library() CONTEXT_VARIABLE_NAME = 'static_grouper_dict' register.tag('addstatic', AddStaticNode) register.tag('stati...
[ 6738, 17268, 1330, 4277, 11600, 198, 6738, 49395, 13, 11498, 489, 265, 316, 3775, 13, 5589, 601, 1330, 3082, 44292, 19667, 198, 198, 6738, 42625, 14208, 13, 28243, 1330, 357, 198, 220, 220, 220, 10074, 11, 19081, 11, 37350, 11, 37350, ...
3.382353
102
# Generated by Django 3.1.1 on 2020-09-17 21:20 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 16, 319, 12131, 12, 2931, 12, 1558, 2310, 25, 1238, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from django.conf.urls import url from coverage_score_viewer.views import index, states, districts, municipalities, details, search, coverage_chart from map.views import map urlpatterns = [ url(r'^$', index, name='index'), url(r'^states/$', states, name='states'), url(r'^districts/$', districts, name='dist...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 5197, 62, 26675, 62, 1177, 263, 13, 33571, 1330, 6376, 11, 2585, 11, 12815, 11, 29364, 11, 3307, 11, 2989, 11, 5197, 62, 40926, 198, 6738, 3975, 13, 33571, 1330, 3...
2.774336
226
#Hanoi tower import time diskNumber = 1 while diskNumber != 0: print("============================") diskNumber = input("Give how many disk you have.\nGive 0 to end.\n============================\n") print("============================") diskNumber=int(diskNumber) moveTower(diskNumber,"A...
[ 2, 39, 5733, 72, 10580, 201, 198, 201, 198, 11748, 640, 201, 198, 201, 198, 39531, 15057, 796, 352, 201, 198, 4514, 11898, 15057, 14512, 657, 25, 201, 198, 220, 220, 220, 3601, 7203, 4770, 25609, 4943, 201, 198, 220, 220, 220, 11898...
2.930769
130
import requests from errors import PermissionsMissing # Servers # Subusers if __name__ == "__main__": print("I dont run. No use in trying to make me lol")
[ 11748, 7007, 198, 6738, 8563, 1330, 2448, 8481, 43730, 628, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 2930, 690, 628, 220, 220, 220, 1303, 220, 220, 3834, 18417, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, ...
2.825397
63
from Containers.ParsedStructure import ParsedElement from Tools.misc import strip_all from Grammar.Top_Grammar import Top_Grammar from Grammar.Functions import ExpressionFactory import logging log = logging.getLogger(__name__)
[ 6738, 2345, 50221, 13, 47, 945, 276, 1273, 5620, 1330, 23042, 276, 20180, 198, 6738, 20003, 13, 44374, 1330, 10283, 62, 439, 198, 6738, 20159, 3876, 13, 9126, 62, 38, 859, 3876, 1330, 5849, 62, 38, 859, 3876, 198, 6738, 20159, 3876, ...
3.492308
65
from .aggregates import ( AggregateDiff, ) from .fields import ( FieldDiff, FieldDiffContainer, IncrementalFieldDiff, )
[ 6738, 764, 9460, 2301, 689, 1330, 357, 198, 220, 220, 220, 19015, 49373, 28813, 11, 198, 8, 198, 6738, 764, 25747, 1330, 357, 198, 220, 220, 220, 7663, 28813, 11, 198, 220, 220, 220, 7663, 28813, 29869, 11, 198, 220, 220, 220, 10791...
2.72
50
from marshmallow_jsonapi import fields from marshmallow_jsonapi.flask import Schema from app.api.helpers.utilities import dasherize from utils.common import use_defaults @use_defaults() class EventImageSizeSchema(Schema): """ Api schema for image_size Model """ class Meta: """ Meta cl...
[ 6738, 22397, 42725, 62, 17752, 15042, 1330, 7032, 198, 6738, 22397, 42725, 62, 17752, 15042, 13, 2704, 2093, 1330, 10011, 2611, 198, 198, 6738, 598, 13, 15042, 13, 16794, 364, 13, 315, 2410, 1330, 288, 31218, 1096, 198, 6738, 3384, 4487...
2.583085
1,005
# Space: O(n) # Time: O(n)
[ 198, 2, 4687, 25, 440, 7, 77, 8, 198, 2, 3862, 25, 440, 7, 77, 8, 628, 628, 628, 628, 198 ]
1.714286
21
from django.db import models # car Model with input/attributes make, model, year, mpg
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 1097, 9104, 351, 5128, 14, 1078, 7657, 787, 11, 2746, 11, 614, 11, 285, 6024 ]
3.44
25
import ecfactory.mnt_cycles as mnt_cycles # Example (find an MNT cycle with D = -19) cycles = mnt_cycles.make_cycle(-19) print('Found a cycle: ' + str(cycles[0][0]) + ', ' + str(cycles[0][1]))
[ 11748, 9940, 69, 9548, 13, 76, 429, 62, 32503, 355, 285, 429, 62, 32503, 198, 198, 2, 17934, 357, 19796, 281, 337, 11251, 6772, 351, 360, 796, 532, 1129, 8, 198, 32503, 796, 285, 429, 62, 32503, 13, 15883, 62, 13696, 32590, 1129, ...
2.608108
74
import os import pytest import mock from pipenv._compat import TemporaryDirectory from pipenv.core import warn_in_virtualenv, load_dot_env from pipenv.utils import temp_environ @mock.patch('pipenv.environments.PIPENV_VIRTUALENV', 'totallyrealenv') @mock.patch('pipenv.environments.PIPENV_VERBOSITY', -1) @pytest.mark...
[ 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 11748, 15290, 198, 198, 6738, 7347, 24330, 13557, 5589, 265, 1330, 46042, 43055, 198, 6738, 7347, 24330, 13, 7295, 1330, 9828, 62, 259, 62, 32844, 24330, 11, 3440, 62, 26518, 62, 24330, 1...
2.643836
146
import PIL import streamlit as st import datetime import uuid from streamlit.uploaded_file_manager import UploadedFile from utils.utils import upload_image, create_unique_filename, save_to_google_sheet st.title("Foodify.ai Data Collection 🍔🌯🍫") st.write( "Upload or take a photo of your food and help us to build...
[ 11748, 350, 4146, 198, 11748, 4269, 18250, 355, 336, 198, 11748, 4818, 8079, 198, 11748, 334, 27112, 198, 6738, 4269, 18250, 13, 25850, 276, 62, 7753, 62, 37153, 1330, 36803, 276, 8979, 198, 6738, 3384, 4487, 13, 26791, 1330, 9516, 62, ...
2.303421
1,783
from django.db import models from django.core.cache import cache from common import config # class ModelToDictMixin(object): def get(cls, *args, **kwargs): """ 为 objects 管理类的 get 方法增加缓存功能 Model.get(pk=123) :param self: :param args: :param kwargs: :return: """ # 1、从缓存中获取数据 ...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 7295, 13, 23870, 1330, 12940, 198, 198, 6738, 2219, 1330, 4566, 628, 198, 2, 1398, 9104, 2514, 35, 713, 35608, 259, 7, 15252, 2599, 628, 198, 4299, 651, 7, 565, ...
1.490385
1,144
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # from functools import wraps import requests # Define standard timings in seconds SLEEP_ON_HIGH_LOAD: float = 9.0 TEST_DATA_FIELD = "some_data_field" TEST_RATE_LIMIT_THRESHOLD = 0.1 TEST_HEADERS_NAME = [ ("x-rate-limit-api-key-remaining", "x-rate-limit...
[ 2, 198, 2, 15069, 357, 66, 8, 33448, 3701, 26327, 11, 3457, 1539, 477, 2489, 10395, 13, 198, 2, 198, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 198, 11748, 7007, 198, 198, 2, 2896, 500, 3210, 4628, 654, 287, 4201, 198, 50, 253...
2.697561
615
# Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
[ 2, 15069, 2211, 4946, 25896, 5693, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, ...
2.379486
3,539
""" Created on August 14 2018 @author: fallahnejad@eeg.tuwien.ac.at """ import os import sys from osgeo import gdal, osr path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) if path not in sys.path: sys.path.append(path) def array2raster( outRasterPath, geo_transform, dataTyp...
[ 37811, 198, 41972, 319, 2932, 1478, 2864, 198, 198, 31, 9800, 25, 2121, 993, 710, 38442, 31, 1453, 70, 13, 28047, 86, 2013, 13, 330, 13, 265, 198, 37811, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 28686, 469, 78, 1330, 30...
2.132353
884
#!/usr/bin/python3 import sys, subprocess ############################################################################### # Config ############################################################################### dataFile = None binFile = None onlyFunc = False verbose = False #########################################...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 25064, 11, 850, 14681, 198, 198, 29113, 29113, 7804, 4242, 21017, 198, 2, 17056, 198, 29113, 29113, 7804, 4242, 21017, 198, 198, 7890, 8979, 796, 6045, 198, 8800, 8979, 796, 6...
3.320175
456
from InstagramCLI import InstagramCLI cli = InstagramCLI(username="", password="") data= cli.get_user_info(target_username="usnjsi77",save_to_device=True) print(data) cli.close()
[ 6738, 10767, 5097, 40, 1330, 10767, 5097, 40, 198, 44506, 796, 10767, 5097, 40, 7, 29460, 2625, 1600, 9206, 2625, 4943, 198, 7890, 28, 537, 72, 13, 1136, 62, 7220, 62, 10951, 7, 16793, 62, 29460, 2625, 385, 77, 8457, 72, 3324, 1600,...
2.918033
61
# Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module provides classes to comparsion the structures of the two molecule. As long as the two molecule have the same bond connection tables, the molecules are deemed to be same. The atom in the two molecule must be pa...
[ 2, 15069, 357, 66, 8, 350, 4948, 265, 5235, 7712, 4816, 13, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 17168, 13789, 13, 628, 198, 37811, 198, 1212, 8265, 3769, 6097, 284, 552, 945, 295, 262, 8573, 286, 262, 734, 198, 76, 2305,...
1.839041
4,672
#!/usr/bin/env python3 # Copyright (C) 2018 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause """Function for evaluating the nodes of a decision tree and extracting out the results from each of the nodes.""" # Import built in modules import argparse import sys import os # Import 3rd party modules # Import...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 628, 198, 2, 15069, 357, 34, 8, 2864, 8180, 10501, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, 18, 12, 2601, 682, 198, 198, 37811, 22203, 329, 22232, 262, 137...
2.903125
640
from dataclasses import dataclass @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 628, 198, 31, 19608, 330, 31172, 198 ]
3.133333
15
import torch import numpy as np def run_sis(T, G, S, I, newI, nu, mu, d, beta, N): ''' Runs the linearized SIS model, returning the total number of infected agents summed over all time steps. ''' #duplicate these variables along an additional axis to match the batch size nu = torch.diag(1 - nu)...
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4299, 1057, 62, 13429, 7, 51, 11, 402, 11, 311, 11, 314, 11, 649, 40, 11, 14364, 11, 38779, 11, 288, 11, 12159, 11, 399, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, ...
2.228981
3,699
import sys filename = sys.argv[1] test_input = open(filename, 'r') numberOfTest = int(test_input.readline().replace('\n', '').replace('\r', '').strip()) nodesR = [] distanceR = [] nodesC = [] distanceC = [] branchPoint = 0 output = open(filename.replace('in', 'out'), 'w') for i in range(numberOfTest): initDat...
[ 11748, 25064, 198, 198, 34345, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 198, 9288, 62, 15414, 796, 1280, 7, 34345, 11, 705, 81, 11537, 198, 198, 17618, 5189, 14402, 796, 493, 7, 9288, 62, 15414, 13, 961, 1370, 22446, 33491, 10786, ...
2.323529
510
''' Created on 2014-5-25 @author: xiajie ''' import numpy as np import prostate import preprocess if __name__ == '__main__': inputs, output, Ttype = prostate.loaddata() train_data, train_out, test_data, test_out = prostate.cookdata2(inputs, output, Ttype) X, X_mean, Y_mean, X_std = preprocess.center_data(...
[ 7061, 6, 198, 41972, 319, 1946, 12, 20, 12, 1495, 198, 198, 31, 9800, 25, 2124, 544, 73, 494, 198, 7061, 6, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 26711, 198, 11748, 662, 14681, 198, 198, 361, 11593, 3672, 834, 6624, 705, ...
2.240143
279
"""Contain the unit tests related to the views in app ``profiles``.""" from django.http.request import HttpRequest from django.test import TestCase from teamspirit.core.models import Address from teamspirit.profiles.models import Personal from teamspirit.profiles.views import ( add_id_file_view, add_medical_f...
[ 37811, 4264, 391, 262, 4326, 5254, 3519, 284, 262, 5009, 287, 598, 7559, 5577, 2915, 15506, 526, 15931, 198, 198, 6738, 42625, 14208, 13, 4023, 13, 25927, 1330, 367, 29281, 18453, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 19...
2.349977
4,326
from .packages import os, plt from .common_functions import parameter_check_function, random_binary_files_single, time_stamp
[ 6738, 764, 43789, 1330, 28686, 11, 458, 83, 198, 6738, 764, 11321, 62, 12543, 2733, 1330, 11507, 62, 9122, 62, 8818, 11, 4738, 62, 39491, 62, 16624, 62, 29762, 11, 640, 62, 301, 696, 628, 628, 628 ]
3.513514
37
#!/usr/bin/env python """ Program that runs a script or copy a file into a set of machines. """ import argparse import os import sys from threading import Thread import abc import subprocess import getpass import Queue NORMAL = '\033[00m' RED = '\033[0;31m' CLOUDSIM_PREFIX = 'OSRF_CloudSim_' CONST_PREFIX = 'OSRF_VRC...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 15167, 326, 4539, 257, 4226, 393, 4866, 257, 2393, 656, 257, 900, 286, 8217, 13, 198, 37811, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 25064, 198, 6...
2.187063
4,437
import theano import theano.tensor as TT from rllab.misc import ext import numpy as np import copy import rllab.misc.logger as logger from rllab.spaces.box import Box from rllab.envs.env_spec import EnvSpec from sandbox.finetuning.policies.concurrent_hier_policy2 import HierarchicalPolicy from sandbox.finetuning.algos....
[ 11748, 262, 5733, 198, 11748, 262, 5733, 13, 83, 22854, 355, 26653, 198, 6738, 374, 297, 397, 13, 44374, 1330, 1070, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4866, 198, 11748, 374, 297, 397, 13, 44374, 13, 6404, 1362, 355, 4970...
3.303318
422
import pytrace import py3D filename = 'perspective.png' ppu = 400 passes = 16 S = py3D.Sphere C = py3D.Color V = py3D.Vector cam = pytrace.Camera(V(0.0,10.0,0.0), V(0.0,0.0,0.0), 2.0, 2.0, V(0.0,0.0,1.0)) cam.set_ppu(ppu) center = S(V(0.0,0.0,0.0), 1.0, C(0.99,0.99,0.99)).set_reflectivity(0.8) bodies = [] bodies...
[ 11748, 12972, 40546, 198, 11748, 12972, 18, 35, 198, 198, 34345, 796, 705, 19276, 806, 425, 13, 11134, 6, 198, 381, 84, 796, 7337, 198, 6603, 274, 796, 1467, 198, 198, 50, 796, 12972, 18, 35, 13, 38882, 198, 34, 796, 12972, 18, 35...
1.672956
636
import asyncio import atexit import os import dotenv import requests from apscheduler.schedulers.background import BackgroundScheduler from flask import (Flask, make_response, redirect, render_template, request, send_from_directory, url_for) from flask_login import ( LoginManager, UserMixin, cur...
[ 11748, 30351, 952, 198, 11748, 379, 37023, 198, 11748, 28686, 198, 198, 11748, 16605, 24330, 198, 11748, 7007, 198, 6738, 257, 862, 1740, 18173, 13, 1416, 704, 377, 364, 13, 25249, 1330, 25353, 50, 1740, 18173, 198, 6738, 42903, 1330, 3...
2.69961
769
nombre = input("¿Cual es tu nombre?") print(f'Hola {nombre}')
[ 77, 2381, 260, 796, 5128, 7203, 126, 123, 34, 723, 1658, 12777, 299, 2381, 260, 1701, 8, 198, 4798, 7, 69, 6, 39, 5708, 1391, 77, 2381, 260, 92, 11537, 198 ]
2
31
import os os.getcwd() import sys sys.path.append('scvi') import torch import numpy as np import pandas as pd import scanpy as sc save_path = "/lustre/scratch117/cellgen/team205/tpcg/backup/backup_20190401/sc_sclassification/CellTypist/data_repo/MouseAtlas/MouseAtlas.total.h5ad" save_path2 = "/lustre/scratch117/cell...
[ 11748, 28686, 198, 418, 13, 1136, 66, 16993, 3419, 198, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 1416, 8903, 11537, 198, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198,...
2.584459
296
# Copyright 2018-2021 Jakub Kuczys (https://github.com/jack1142) # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
[ 2, 15069, 2864, 12, 1238, 2481, 25845, 549, 509, 1229, 89, 893, 357, 5450, 1378, 12567, 13, 785, 14, 19650, 1157, 3682, 8, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2...
2.861039
770
import re; import random import sys # splitter = re.compile('.', re.MULTILINE) if __name__ == '__main__': k = int(sys.argv[1]) n = int(sys.argv[2]) ma = Markov(n) for i in sys.argv[3:]: ma.Feed(open(i, 'r').read()) #print ma.probs #print ma.Dump(int(sys.argv[1])) words, hits = ma...
[ 11748, 302, 26, 198, 11748, 4738, 198, 11748, 25064, 198, 220, 220, 1303, 4328, 1967, 796, 302, 13, 5589, 576, 10786, 2637, 11, 302, 13, 44, 16724, 4146, 8881, 8, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 1...
2.0625
224
""" Dongyoon Han et al. "`Deep Pyramidal Residual Networks <https://arxiv.org/abs/1610.02915>`_" """ from . import ResNet class PyramidNet(ResNet): """ The base PyramidNet model Notes ----- This class is intended to define custom PyramidNets. For more convenience use predefined :class:`.tf.Pyram...
[ 37811, 198, 35, 506, 88, 2049, 9530, 2123, 435, 13, 366, 63, 29744, 9485, 859, 11624, 1874, 312, 723, 27862, 198, 27, 5450, 1378, 283, 87, 452, 13, 2398, 14, 8937, 14, 1433, 940, 13, 48891, 1314, 29, 63, 62, 1, 198, 198, 37811, ...
2.517688
1,159
# (c) 2019-2021, Alvaro Gomariz @ ETH Zurich # Computer-assisted Applications in Medicine (CAiM) Group, Prof. Orcun Goksel import numpy as np import tensorflow as tf from cnn import layers_keras as clayers, losses, metrics_keras as cmetrics import logging logger = logging.getLogger(__name__) logger.setLevel(loggin...
[ 2, 357, 66, 8, 13130, 12, 1238, 2481, 11, 978, 7785, 78, 402, 296, 283, 528, 220, 2488, 220, 35920, 43412, 198, 2, 13851, 12, 42191, 26622, 287, 11558, 357, 8141, 72, 44, 8, 4912, 11, 220, 4415, 13, 19083, 403, 402, 482, 741, 19...
1.952563
7,842
from re import sub chiffres = ['','one','two','three','four','five','six','seven','eight','nine','ten','eleven','twelve','thirteen','fourteen','fifteen','sixteen','seventeen','eighteen','nineteen'] nombres = ['','ten','twenty','thirty','forty','fifty','sixty','seventy','eighty','ninety'] def formater(x): """ ...
[ 6738, 302, 1330, 850, 198, 198, 354, 733, 411, 796, 37250, 41707, 505, 41707, 11545, 41707, 15542, 41707, 14337, 41707, 13261, 41707, 19412, 41707, 26548, 41707, 26022, 41707, 30888, 41707, 1452, 41707, 11129, 574, 41707, 4246, 9954, 41707, ...
1.933188
1,841
''' This script runs the ftrl-proximal model on data from combo.gl and extras.gl. author: David Thaler date: July 2015 ''' import avito2_io from run_model import compute_offset import sframes from ftrl_proximal import ftrl_proximal from hash_features import hash_features from eval import logloss from datet...
[ 7061, 6, 201, 198, 1212, 4226, 4539, 262, 277, 14859, 12, 1676, 87, 4402, 2746, 319, 1366, 422, 14831, 13, 4743, 290, 33849, 13, 4743, 13, 201, 198, 201, 198, 9800, 25, 3271, 536, 36213, 201, 198, 4475, 25, 2901, 1853, 201, 198, 7...
2.367683
1,640
foo = "foo" bar = "bar" baz = "baz" # When `__all__` is not defined, names starting with underscore is not imported with `from <module> import *` _qux = "qux"
[ 21943, 796, 366, 21943, 1, 198, 5657, 796, 366, 5657, 1, 198, 65, 1031, 796, 366, 65, 1031, 1, 198, 2, 1649, 4600, 834, 439, 834, 63, 318, 407, 5447, 11, 3891, 3599, 351, 44810, 318, 407, 17392, 351, 4600, 6738, 1279, 21412, 29, ...
2.789474
57
"""Deepstream event handling.""" from __future__ import absolute_import, division, print_function, with_statement from __future__ import unicode_literals from deepstreampy.constants import actions from deepstreampy.constants import topic as topic_constants from deepstreampy.constants import event as event_constants f...
[ 37811, 29744, 5532, 1785, 9041, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 351, 62, 26090, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 2...
2.22984
2,319
# Copyright 2021 Huawei Technologies Co., Ltd # # 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...
[ 2, 15069, 33448, 43208, 21852, 1766, 1539, 12052, 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.222924
5,069
from dataclasses import dataclass from enum import Enum @dataclass @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 33829, 1330, 2039, 388, 628, 198, 198, 31, 19608, 330, 31172, 628, 198, 31, 19608, 330, 31172, 198 ]
2.964286
28
import argparse import os import matplotlib.pyplot as plt import torch import torch.nn as nn from PIL import Image from torchvision.models import resnet18 from dataset import * from netvlad import EmbedNet from netvlad import NetVLAD parser = argparse.ArgumentParser(description='WayzNetVlad') # parser.add_argument('...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 28034, 10178, 13, 2753...
2.851421
774
from runtool.recurse_config import ( recursive_apply, recursive_apply_dict, recursive_apply_list, Versions, ) def transform(node: dict): """ Converts node to a version object if the node has a key "versions" else it multiplies the node by 2 if the node has key "double" """ if "vers...
[ 6738, 1057, 25981, 13, 8344, 12321, 62, 11250, 1330, 357, 198, 220, 220, 220, 45115, 62, 39014, 11, 198, 220, 220, 220, 45115, 62, 39014, 62, 11600, 11, 198, 220, 220, 220, 45115, 62, 39014, 62, 4868, 11, 198, 220, 220, 220, 18535, ...
2.666667
174
import yaml from .aggregation.translator import Translator as AggregatorTranslator from tube.etl.indexers.injection.translator import Translator as InjectionTranslator from .base.translator import Translator as BaseTranslator from tube.utils.dd import init_dictionary from tube.etl.outputs.es.writer import Writer
[ 11748, 331, 43695, 198, 6738, 764, 9460, 43068, 13, 7645, 41880, 1330, 3602, 41880, 355, 19015, 2301, 1352, 8291, 41880, 198, 6738, 12403, 13, 316, 75, 13, 9630, 364, 13, 259, 29192, 13, 7645, 41880, 1330, 3602, 41880, 355, 554, 29192, ...
3.686047
86
# 1 Still using the same DataFrame from the previous exercise insurance.csv plot the chart for charges and save it # as charges_plot.png import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv('data/insurance.csv', header=0) plt.plot(df['charges']) plt.title('Charges Plot') plt.ylabel('Charges') plt.savefi...
[ 2, 352, 7831, 1262, 262, 976, 6060, 19778, 422, 262, 2180, 5517, 5096, 13, 40664, 7110, 262, 8262, 329, 4530, 290, 3613, 340, 198, 2, 355, 4530, 62, 29487, 13, 11134, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 80...
2.901163
344
import sys from os import path d = path.dirname(__file__) # 获取当前路径 sys.path.append(d) from model import BankClient, BankName, Staff, Charge, Cheque, Loan, Lend, Payments, PossessCheque, Saving, PossessSaving, database from datetime import date, datetime, timedelta from peewee import DatabaseError, DataError, IntegrityE...
[ 11748, 25064, 198, 6738, 28686, 1330, 3108, 198, 67, 796, 3108, 13, 15908, 3672, 7, 834, 7753, 834, 8, 1303, 5525, 236, 115, 20998, 244, 37605, 241, 30298, 235, 164, 115, 107, 36181, 226, 198, 17597, 13, 6978, 13, 33295, 7, 67, 8, ...
3.263736
182
# application configuration from autonomia.settings import * # noqa DEBUG = True TESTING = True LOG_LEVEL = "DEBUG" WEBHOOK_DOMAIN = "localhost:5000" WEBHOOK_PATH = "hook" CHAT_ID = -123456 # Third party configuration API_TOKEN = "133505823:AAHZFMHno3mzVLErU5b5jJvaeG--qUyLyG0" REDIS_URL = ""
[ 2, 3586, 8398, 198, 6738, 11827, 544, 13, 33692, 1330, 1635, 220, 1303, 645, 20402, 198, 198, 30531, 796, 6407, 198, 51, 6465, 2751, 796, 6407, 198, 25294, 62, 2538, 18697, 796, 366, 30531, 1, 198, 8845, 33, 39, 15308, 62, 39170, 29...
2.414634
123
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 10088, 1330, 708, 81, 1136, 353, 198, 6738, 12972, 648, 21653, 13, 8019, 13, 17859, 19199, 1330, 8324, 20941, 6719, 16005, 10707, 4402, 6030, 198, 6738, 12972, 648, ...
2.420202
7,613
import sys if len(sys.argv) != 2: print 'usage: [edge pair input path]' exit(1) with open(sys.argv[1], 'r') as fi: node_dict = {} for line in fi: tmp = line.split() src = int(tmp[0]) if src not in node_dict: node_dict[src] = 1 else: node_dict[src]...
[ 11748, 25064, 198, 198, 361, 18896, 7, 17597, 13, 853, 85, 8, 14512, 362, 25, 198, 220, 220, 220, 3601, 705, 26060, 25, 685, 14907, 5166, 5128, 3108, 49946, 198, 220, 220, 220, 8420, 7, 16, 8, 198, 4480, 1280, 7, 17597, 13, 853, ...
1.982143
280
import numpy as np import numpy.random as rand import matplotlib.pyplot as plt from numpy.linalg import norm def derivativetest(fun, x0): """ Test the gradient and Hessian of a function. A large proportion parallel in the middle of both plots means accuraccy. INPUTS: fun: a function handle tha...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 13, 25120, 355, 43720, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 299, 32152, 13, 75, 1292, 70, 1330, 2593, 198, 198, 4299, 27255, 9288, 7, 12543, 11...
1.899539
1,085
# Generated by Django 2.2.4 on 2019-09-23 23:32 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 19, 319, 13130, 12, 2931, 12, 1954, 2242, 25, 2624, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
import pytest from brownie import Contract, chain, interface from rich.console import Console from helpers.sett.SnapshotManager import SnapshotManager from helpers.sett.simulation.SimulationManager import SimulationManager from helpers.registry import registry from helpers.registry.artifacts import artifacts from help...
[ 11748, 12972, 9288, 198, 6738, 7586, 494, 1330, 17453, 11, 6333, 11, 7071, 198, 6738, 5527, 13, 41947, 1330, 24371, 198, 198, 6738, 49385, 13, 17744, 13, 43826, 9442, 13511, 1330, 16026, 9442, 13511, 198, 6738, 49385, 13, 17744, 13, 143...
3.016204
432
import enum from typing import Optional from .client import Device from .util import lookup_enum class RefrigeratorDevice(Device): """A higher-level interface for a refrigerator.""" def set_temp_refrigerator_c(self, temp): """Set the refrigerator temperature in Celsius. """ value ...
[ 11748, 33829, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 764, 16366, 1330, 16232, 198, 6738, 764, 22602, 1330, 35847, 62, 44709, 628, 628, 198, 198, 4871, 6524, 18096, 1352, 24728, 7, 24728, 2599, 198, 220, 220, 220, 37227, 32, 2440...
2.612013
616
from ursinanetworking import * Server = UrsinaNetworkingServer("localhost", 25565) @Server.event @Server.event while True: Server.process_net_events()
[ 6738, 220, 1834, 259, 272, 316, 16090, 1330, 1635, 198, 198, 10697, 796, 37935, 1437, 7934, 16090, 10697, 7203, 36750, 1600, 14280, 2996, 8, 198, 198, 31, 10697, 13, 15596, 198, 198, 31, 10697, 13, 15596, 198, 198, 4514, 6407, 25, 198...
2.981132
53
#!/usr/bin/env python3 from aoc2021.util import print_solutions, import_strs from math import inf from itertools import permutations import copy Numbers = { "abcefg": 0, "cf": 1, "acdeg": 2, "acdfg": 3, "bcdf": 4, "abdfg": 5, "abdefg": 6, "acf": 7, "abcdefg": 8, "abcdfg": 9 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 257, 420, 1238, 2481, 13, 22602, 1330, 3601, 62, 82, 14191, 11, 1330, 62, 2536, 82, 198, 198, 6738, 10688, 1330, 1167, 198, 198, 6738, 340, 861, 10141, 1330, 9943, 328...
2.039548
177
import os import importlib if __name__ == "__main__": import sys import pickle assert len(sys.argv) >= 3 name = sys.argv[1] Launcher = find_launcher_using_name(name) cache = "/tmp/tmux_launcher/{}".format(name) if os.path.isfile(cache): instance = pickle.load(open(cache, 'r')) ...
[ 11748, 28686, 198, 11748, 1330, 8019, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1330, 25064, 198, 220, 220, 220, 1330, 2298, 293, 628, 220, 220, 220, 6818, 18896, 7, 17597, 13, 853, ...
2.177914
326
#!/usr/bin/env python import glob import os import shlex import sys import platform script_dir = os.path.dirname(__file__) jc3_handling_editor_root = os.path.normpath(os.path.join(script_dir, os.pardir)) sys.path.insert(0, os.path.abspath(os.path.join(jc3_handling_editor_root, 'tools'))) sys.path.insert(0, os.path.j...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 15095, 198, 11748, 28686, 198, 11748, 427, 2588, 198, 11748, 25064, 198, 11748, 3859, 198, 198, 12048, 62, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 8, 19...
2.428112
932
""" Res. & VM Mgmt. component of the Infrastructure Management & Abstraction (IMA) Interacts with Docker to replicate the container from origin to destiny """ from docker import APIClient
[ 37811, 198, 4965, 13, 1222, 16990, 337, 70, 16762, 13, 7515, 286, 262, 33709, 8549, 1222, 2275, 301, 7861, 357, 3955, 32, 8, 198, 9492, 8656, 351, 25716, 284, 24340, 262, 9290, 422, 8159, 284, 22701, 198, 37811, 198, 6738, 36253, 1330...
4
47
import gzip import struct import datetime import pandas as pd import os if __name__ == '__main__': bin_data = gzip.open(os.path.join('..', 'res', '08302019.NASDAQ_ITCH50.gz'), 'rb') msg_header = bin_data.read(1) itch = ITCH() while msg_header: if msg_header == "S": message = itc...
[ 11748, 308, 13344, 198, 11748, 2878, 198, 11748, 4818, 8079, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 9874, 62, 7890, 796, 30...
1.978701
939
''' 创造一个变量他等于5如果这个变量小于10会打印我打得过那些忍者,小于30会打印有点难,不过我能应付如果小于50会打印太多了 ''' ninjas = 5 if ninjas < 10: print('我打得过那些忍者') elif ninjas < 30: print('有点难,不过我能应付') elif ninjas < 50: print('太多了')
[ 7061, 6, 198, 26344, 249, 34460, 254, 31660, 10310, 103, 20998, 246, 34932, 237, 20015, 244, 163, 255, 231, 12859, 236, 20, 36685, 224, 162, 252, 250, 32573, 247, 10310, 103, 20998, 246, 34932, 237, 22887, 237, 12859, 236, 940, 27670, ...
0.916667
216
import numpy as np import mindspore.nn as nn from mindspore import Tensor, context from mindspore.ops import operations as P from mindspore.nn import WithLossCell, TrainOneStepCell from mindspore.nn import Momentum from mindspore.parallel._cost_model_context import set_cost_model_context
[ 11748, 299, 32152, 355, 45941, 198, 198, 11748, 2000, 2777, 382, 13, 20471, 355, 299, 77, 198, 6738, 2000, 2777, 382, 1330, 309, 22854, 11, 4732, 198, 6738, 2000, 2777, 382, 13, 2840, 1330, 4560, 355, 350, 198, 6738, 2000, 2777, 382, ...
3.360465
86
from gi.repository import GLib, Gio, Gtk from datetime import datetime, timedelta, date from agua_amiga.datastore import Datastore, convert_from_display_to_mL, convert_from_mL_to_display @Gtk.Template.from_file("ui_definitions/StreakWindow.glade")
[ 6738, 308, 72, 13, 260, 1930, 37765, 1330, 10188, 571, 11, 402, 952, 11, 402, 30488, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 11, 3128, 198, 6738, 556, 6413, 62, 321, 13827, 13, 19608, 459, 382, 1330, 16092, 459, 3...
2.862069
87
'Save a subset of lines from an input file; start at offset and count n lines' 'default 100 lines starting from 0' import sys import argparse parser = argparse.ArgumentParser( description = "Save a subset of lines from the input file to the output file" ) parser.add_argument( "input_file", help = "path to input file"...
[ 6, 16928, 257, 24637, 286, 3951, 422, 281, 5128, 2393, 26, 923, 379, 11677, 290, 954, 299, 3951, 6, 198, 1549, 891, 1721, 1802, 3951, 3599, 422, 657, 6, 198, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 198, 48610, 796, 1822, 29...
2.9
330
import datetime from typing import Optional, List, Union, TYPE_CHECKING from pygw2.core.enums import * from pygw2.utils import LazyLoader, BaseModel if TYPE_CHECKING: from pygw2.core.models.pvp import PvPEquipment from pygw2.core.models.sab import SAB from pygw2.core.models.guild import Guild from pyg...
[ 11748, 4818, 8079, 198, 6738, 19720, 1330, 32233, 11, 7343, 11, 4479, 11, 41876, 62, 50084, 2751, 198, 198, 6738, 12972, 70, 86, 17, 13, 7295, 13, 268, 5700, 1330, 1635, 198, 6738, 12972, 70, 86, 17, 13, 26791, 1330, 406, 12582, 174...
2.656388
227
import pandas as pd import matplotlib.pyplot as plt from io import BytesIO import base64
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 11748, 2779, 2414, 628 ]
3.103448
29
from __future__ import absolute_import from sentry.api.base import Endpoint from sentry.api.exceptions import ResourceDoesNotExist from sentry.app import raven from sentry.models import Team, TeamStatus from sentry.models.apikey import ROOT_KEY from .organization import OrganizationPermission
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 1908, 563, 13, 15042, 13, 8692, 1330, 5268, 4122, 198, 6738, 1908, 563, 13, 15042, 13, 1069, 11755, 1330, 20857, 13921, 3673, 3109, 396, 198, 6738, 1908, 563, 13, 1324, 1...
3.679012
81
# Задание 5.2b london_co = { 'r1' : { 'location': '21 New Globe Walk', 'vendor': 'Cisco', 'model': '4451', 'ios': '15.4', 'ip': '10.255.0.1' }, 'r2' : { 'location': '21 New Globe Walk', 'vendor': 'Cisco', 'model': '4451', 'ios': '15.4', 'ip': '10.255.0.2' }, ...
[ 2, 12466, 245, 16142, 43666, 16142, 22177, 18849, 16843, 642, 13, 17, 65, 198, 198, 75, 3391, 62, 1073, 796, 1391, 198, 220, 220, 220, 705, 81, 16, 6, 1058, 1391, 198, 220, 220, 220, 705, 24886, 10354, 705, 2481, 968, 18260, 6857, ...
1.967359
337
ADVANCED_QUERY_KEY = 'advancedQuery' ALL = 'all' AND = 'AND' AND_JOIN = ' AND ' AND_NOT_JOIN = ' AND NOT ' APPENDED = 'appended' APPLICATION_JSON = 'application/json' ASC = 'asc' AT_ID = '@id' AT_CONTEXT = '@context' AT_TYPE = '@type' AUDIT = 'audit' AUDIT_TITLE = 'Audit' BOOL = 'bool' BOOST_VALUES = 'boost_values' BUC...
[ 2885, 53, 20940, 1961, 62, 10917, 19664, 62, 20373, 796, 705, 32225, 2903, 20746, 6, 198, 7036, 796, 705, 439, 6, 198, 6981, 796, 705, 6981, 6, 198, 6981, 62, 45006, 1268, 796, 705, 5357, 705, 198, 6981, 62, 11929, 62, 45006, 1268, ...
2.221292
836
import pytest from app.app import create_app @pytest.fixture() @pytest.fixture() @pytest.fixture()
[ 11748, 12972, 9288, 198, 198, 6738, 598, 13, 1324, 1330, 2251, 62, 1324, 628, 198, 31, 9078, 9288, 13, 69, 9602, 3419, 628, 198, 31, 9078, 9288, 13, 69, 9602, 3419, 628, 198, 31, 9078, 9288, 13, 69, 9602, 3419, 198 ]
2.585366
41
#!/usr/bin/env python3 """LXD charm.""" import logging import os import shutil import subprocess import tarfile import tempfile from urllib.error import HTTPError, URLError from urllib.request import urlopen from ops.charm import ( ActionEvent, CharmBase, ConfigChangedEvent, InstallEvent, StartEv...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 43, 55, 35, 20024, 526, 15931, 198, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 850, 14681, 198, 11748, 13422, 7753, 198, 11748, 20218, 7753,...
2.069863
12,682
#!/usr/bin/env python3.9 import base64 import html from http.client import HTTPSConnection import json import threading import urllib.parse if __name__ == "__main__": import argparse import concurrent.futures as cofu import logging import pathlib import sys parser = argparse.ArgumentParser( ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 13, 24, 198, 198, 11748, 2779, 2414, 198, 11748, 27711, 198, 6738, 2638, 13, 16366, 1330, 38288, 32048, 198, 11748, 33918, 198, 11748, 4704, 278, 198, 11748, 2956, 297, 571, 13, 29572, ...
2.591127
834
import pygame import random pygame.init() WIDTH, HEIGHT = 960, 700 SCREEN = pygame.display.set_mode((WIDTH, HEIGHT)) WHITE = (255, 255, 255) BLACK = (0, 0, 0) RED = (255, 0, 0) BLUE = (0, 0, 255) CLOCK = pygame.time.Clock() FPS = 30 particles_list = [] container = Container(500, 500) generate_particles(contai...
[ 11748, 12972, 6057, 198, 11748, 4738, 198, 198, 9078, 6057, 13, 15003, 3419, 198, 198, 54, 2389, 4221, 11, 11179, 9947, 796, 41263, 11, 13037, 198, 6173, 2200, 1677, 796, 12972, 6057, 13, 13812, 13, 2617, 62, 14171, 19510, 54, 2389, 4...
2.154062
714
'''Script to make all interpretation based plots for the alert followup fast response paper''' import os import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import scipy.stats as st from francis import utils from results_utils import * from francis.universe.universe_plotter import UniversePlott...
[ 7061, 6, 7391, 284, 787, 477, 10794, 1912, 21528, 198, 1640, 262, 7995, 1061, 929, 3049, 2882, 3348, 7061, 6, 198, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198, 11748, 2603, ...
2.738971
272
#!/usr/bin/env python """Tests for `igit` package.""" # pylint: disable=redefined-outer-name import random import pytest import igit @pytest.fixture(scope="module")
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 51, 3558, 329, 4600, 328, 270, 63, 5301, 526, 15931, 198, 2, 279, 2645, 600, 25, 15560, 28, 445, 18156, 12, 39605, 12, 3672, 198, 198, 11748, 4738, 198, 198, 11748, 12972, 928...
2.746032
63
import argparse import json import os from xml.etree import ElementTree from cvat.api import CVATAPI from cvat.argument import cvat_args from cvat.cvat_xml import cvat_xml_to_coco if __name__ == '__main__': parser = argparse.ArgumentParser() cvat_args(parser) parser.add_argument("--job_id", action="append...
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 35555, 13, 316, 631, 1330, 11703, 27660, 198, 198, 6738, 269, 85, 265, 13, 15042, 1330, 26196, 1404, 17614, 198, 6738, 269, 85, 265, 13, 49140, 1330, 269, 85, 265, 6...
2.035897
585
# from django.shortcuts import render import json from rest_framework import status from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.permissions import AllowAny from backend.helpers import InputErrorMessage, JSONResponse from .models import UserSerialiser, User ...
[ 2, 422, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 11748, 33918, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 13, 33571, 1330, 3486, 3824, 769, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, ...
4.231707
82