content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import click from ..console import CONTEXT_SETTINGS from .check import check_run from .ls import ls from .prune import prune from .reload import reload_env from .shell import shell from .start import star...
[ 2, 357, 34, 8, 16092, 324, 519, 11, 3457, 13, 2864, 12, 25579, 198, 2, 1439, 2489, 10395, 198, 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 357, 3826, 38559, 24290, 8, 198, 11748, 3904, 198, 198, 6738, 11485, 419...
3.142857
161
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables from ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 26144, 35986, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760, 644, 345, 389, 1804, 0, 17202, ...
3.626087
115
from locust import HttpUser, TaskSet, task, constant from locust import LoadTestShape
[ 6738, 1179, 436, 1330, 367, 29281, 12982, 11, 15941, 7248, 11, 4876, 11, 6937, 198, 6738, 1179, 436, 1330, 8778, 14402, 33383, 628, 628 ]
3.708333
24
# coding:utf-8 from sqlalchemy import text from db.basic_db import db_session from db.models import SeedIds from decorators.decorator import db_commit_decorator def get_seed(): """ Get all user id to be crawled :return: user ids """ return db_session.query(SeedIds).filter(text('status=0')).all() d...
[ 2, 19617, 25, 40477, 12, 23, 198, 6738, 44161, 282, 26599, 1330, 2420, 198, 6738, 20613, 13, 35487, 62, 9945, 1330, 20613, 62, 29891, 198, 6738, 20613, 13, 27530, 1330, 23262, 7390, 82, 198, 6738, 11705, 2024, 13, 12501, 273, 1352, 13...
2.578947
266
""" Area Weighted Interpolation """ import numpy as np import geopandas as gpd from ._vectorized_raster_interpolation import _fast_append_profile_in_gdf import warnings from scipy.sparse import dok_matrix, diags, coo_matrix import pandas as pd from tobler.util.util import _check_crs, _nan_check, _inf_check, _check_p...
[ 37811, 198, 30547, 14331, 276, 4225, 16104, 341, 198, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 30324, 392, 292, 355, 27809, 67, 198, 6738, 47540, 31364, 1143, 62, 81, 1603, 62, 3849, 16104, 341, 1330, 4808, 7217,...
2.543673
6,583
## # This software was developed and / or modified by Raytheon Company, # pursuant to Contract DG133W-05-CQ-1067 with the US Government. # # U.S. EXPORT CONTROLLED TECHNICAL DATA # This software product contains export-restricted data whose # export/transfer/disclosure is restricted by U.S. law. Dissemination # to ...
[ 2235, 198, 2, 770, 3788, 373, 4166, 290, 1220, 393, 9518, 416, 7760, 1169, 261, 5834, 11, 198, 2, 12997, 284, 17453, 46133, 16945, 54, 12, 2713, 12, 34, 48, 12, 940, 3134, 351, 262, 1294, 5070, 13, 201, 198, 2, 220, 201, 198, 2,...
2.24784
21,873
import time old_input_value = False flag_falling_edge = None start = None flag_output_mask = False DELAY_CONST = 10 # delay time from falling edge ... . output = None if __name__ == '__main__': DELAY_CONST=int(input("Hello \nPlease Enter Your delay value here :")) while True: ...
[ 11748, 640, 201, 198, 201, 198, 201, 198, 727, 62, 15414, 62, 8367, 796, 10352, 201, 198, 32109, 62, 7207, 278, 62, 14907, 796, 6045, 201, 198, 9688, 796, 6045, 201, 198, 32109, 62, 22915, 62, 27932, 796, 10352, 201, 198, 35, 3698, ...
2.25
164
from ansiblemetrics.ansible_modules import DEPRECATED_MODULES_LIST from ansiblemetrics.ansible_metric import AnsibleMetric
[ 6738, 9093, 856, 4164, 10466, 13, 504, 856, 62, 18170, 1330, 5550, 47, 38827, 11617, 62, 33365, 6239, 1546, 62, 45849, 198, 6738, 9093, 856, 4164, 10466, 13, 504, 856, 62, 4164, 1173, 1330, 28038, 856, 9171, 1173, 628 ]
3.179487
39
""" This module does validation for data input in incidents """ import re
[ 37811, 770, 8265, 857, 21201, 329, 1366, 5128, 287, 10207, 37227, 198, 11748, 302, 628, 198, 220, 220, 220, 220 ]
4
20
#!/usr/bin/python from distutils.version import LooseVersion import argparse import logging import requests import re session = requests.Session() # authorization token TOKEN_URL = "https://auth.docker.io/token?service=registry.docker.io&scope=repository:%s:pull" # find all tags TAGS_URL = "https://index.docker.io...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 6738, 1233, 26791, 13, 9641, 1330, 6706, 577, 14815, 198, 198, 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 7007, 198, 11748, 302, 198, 198, 29891, 796, 7007, 13, 36044, 3419, 198, 198, ...
2.725777
547
from .terraform import TerraformManager import pytest from _pytest.tmpdir import TempPathFactory
[ 6738, 764, 353, 430, 687, 1330, 24118, 687, 13511, 198, 11748, 12972, 9288, 198, 6738, 4808, 9078, 9288, 13, 22065, 15908, 1330, 24189, 15235, 22810, 628 ]
3.769231
26
#!/usr/bin/env python # -*- coding: utf-8 -*- # # vim: encoding=utf-8 # # 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 yo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 1303, 198, 2, 43907, 25, 21004, 28, 40477, 12, 23, 198, 2, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8...
2.738562
1,071
# -*- coding: utf-8 -*- #Copyright (c) 2010,12 Walter Bender #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, ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15269, 357, 66, 8, 3050, 11, 1065, 15819, 34535, 198, 198, 2, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 165...
3.15245
551
try: from django.forms.utils import pretty_name except ImportError: from django.forms.forms import pretty_name from django.template import Context from django.template.loader import render_to_string from .compat import context_flatten
[ 28311, 25, 198, 220, 220, 220, 422, 42625, 14208, 13, 23914, 13, 26791, 1330, 2495, 62, 3672, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 42625, 14208, 13, 23914, 13, 23914, 1330, 2495, 62, 3672, 198, 6738, 42625, 14208, 13...
3.450704
71
""" """ from eodc_openeo_bindings.map_utils import map_default def map_lt(process): """ """ param_dict = {'y': 'float'} return map_default(process, 'lt', 'apply', param_dict) def map_lte(process): """ """ param_dict = {'y': 'float'} return map_default(process, 'lte', 'apply',...
[ 37811, 198, 198, 37811, 198, 198, 6738, 304, 375, 66, 62, 404, 1734, 78, 62, 21653, 654, 13, 8899, 62, 26791, 1330, 3975, 62, 12286, 628, 198, 4299, 3975, 62, 2528, 7, 14681, 2599, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 37...
2.421446
401
"""FLOW RELATED SYSTEM TEST CASES."""
[ 37811, 3697, 3913, 29749, 11617, 36230, 43001, 35106, 1546, 526, 15931, 198 ]
3.166667
12
#!/usr/bin/python # -*- coding: utf-8 -*- from flask import Flask, request, abort, render_template from datetime import timedelta import pymysql from search import start_search, decorate page_dir = "E:/WEBPAGES_RAW" app = Flask(__name__) app.config['DEBUG'] = True app.config['SEND_FILE_MAX_AGE_DEFAULT'] ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 6738, 42903, 1330, 46947, 11, 2581, 11, 15614, 11, 8543, 62, 28243, 201, 198, 6738, 4818, 8079, 1330, 28...
2.507389
203
#!/usr/bin/env pvpython # -*- Python -*- (syntax highlighting) # ---------------------------------------------------------------------- # # Brad T. Aagaard, U.S. Geological Survey # Charles A. Williams, GNS Science # Matthew G. Knepley, University at Buffalo # # This code was developed as part of the Computational Infr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 279, 85, 29412, 198, 2, 532, 9, 12, 11361, 532, 9, 12, 357, 1837, 41641, 21292, 8, 198, 2, 16529, 23031, 198, 2, 198, 2, 8114, 309, 13, 317, 8126, 446, 11, 471, 13, 50, 13, 34246, 13084, 1...
3.019068
944
from spaceone.inventory.libs.manager import AWSManager # todo: __init__ #
[ 6738, 2272, 505, 13, 24807, 13, 8019, 82, 13, 37153, 1330, 30865, 13511, 628, 198, 2, 284, 4598, 25, 11593, 15003, 834, 220, 220, 220, 220, 220, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198 ]
2.214286
42
#!/usr/bin/env python import argparse import hashlib import os import tempfile from lib.config import s3_config from lib.util import download, rm_rf, s3put DIST_URL = 'https://atom.io/download/atom-shell/' if __name__ == '__main__': import sys sys.exit(main())
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 198, 11748, 12234, 8019, 198, 11748, 28686, 198, 11748, 20218, 7753, 198, 198, 6738, 9195, 13, 11250, 1330, 264, 18, 62, 11250, 198, 6738, 9195, 13, 22602, 1330,...
2.787879
99
# import the necessary packages from sklearn.cluster import KMeans import skimage import matplotlib.pyplot as plt import argparse import cv2 # import the necessary packages import numpy as np import cv2 # construct the argument parser and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("-i...
[ 2, 1330, 262, 3306, 10392, 201, 198, 6738, 1341, 35720, 13, 565, 5819, 1330, 509, 5308, 504, 201, 198, 11748, 1341, 9060, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 11748, 1822, 29572, 201, 198, 11748...
2.564682
487
from sys import argv from base64 import b64encode with open("data", 'rb') as fIn: b = fIn.read() print(b64encode(b).decode())
[ 6738, 25064, 1330, 1822, 85, 198, 6738, 2779, 2414, 1330, 275, 2414, 268, 8189, 198, 198, 4480, 1280, 7203, 7890, 1600, 705, 26145, 11537, 355, 277, 818, 25, 198, 220, 220, 220, 275, 796, 277, 818, 13, 961, 3419, 198, 220, 220, 220,...
2.436364
55
#!/usr/bin/env python # -*- coding: utf-8 -*- """ .. codeauthor:: Cdric Dumay <cedric.dumay@gmail.com> """ import logging import sys, os, json from cdumay_rest_client.client import RESTClient from cdumay_rest_client.exceptions import NotFound, HTTPException def oncritical(exc): """description of oncritical"""...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 492, 2438, 9800, 3712, 327, 67, 1173, 30933, 323, 1279, 771, 1173, 13, 67, 388, 323, 31, 14816, 13, ...
2.363112
694
import numpy as np import pytest import apexpy import tempfile import os import h5py from ttools import create_dataset, config, io, utils map_periods = [np.timedelta64(10, 'm'), np.timedelta64(30, 'm'), np.timedelta64(1, 'h'), np.timedelta64(2, 'h')] def test_calculate_bins(): mlat = np.arange(10)[None, :, N...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 11748, 40167, 9078, 198, 11748, 20218, 7753, 198, 11748, 28686, 198, 11748, 289, 20, 9078, 198, 198, 6738, 256, 31391, 1330, 2251, 62, 19608, 292, 316, 11, 4566, 11, 33245, 11...
1.930213
1,175
import typer if __name__ == "__main__": typer.run(main)
[ 11748, 1259, 525, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1259, 525, 13, 5143, 7, 12417, 8, 198 ]
2.285714
28
import socket import threading from time import sleep from threading import Thread import json import sys try: timeout = 5 if len(sys.argv) > 1: if (len(sys.argv) -1 ) % 2 != 0: print "\nInvalid number of arguments\n\n-t Time between tests in seconds\n" ...
[ 11748, 17802, 201, 198, 11748, 4704, 278, 201, 198, 6738, 640, 1330, 3993, 201, 198, 6738, 4704, 278, 1330, 14122, 201, 198, 11748, 33918, 201, 198, 11748, 25064, 201, 198, 201, 198, 201, 198, 28311, 25, 201, 198, 220, 220, 220, 220, ...
1.95528
805
#!/usr/bin/env python2 import math import os import random import sys import time import logging import argparse import numpy as np from six.moves import xrange import json import torch import torch.nn as nn import torch.optim as optim from torch import cuda from torch.autograd import Variable from torch.nn.utils im...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 198, 11748, 10688, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 18931, 198, 11748, 1822, 29572, 198, 198, 11748, 299, 32152, 355, 45941, 198, ...
2.605946
1,581
# Copyright (c) 2013-2014 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
[ 2, 15069, 357, 66, 8, 2211, 12, 4967, 37927, 13200, 11, 3457, 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, ...
2.258173
2,386
from math import sqrt for prime in stream_primes(10001): print(prime)
[ 6738, 10688, 1330, 19862, 17034, 198, 198, 1640, 6994, 287, 4269, 62, 1050, 999, 7, 3064, 486, 2599, 198, 220, 220, 220, 3601, 7, 35505, 8, 198 ]
2.777778
27
import datetime from app.models import Log from flask_login import current_user from app.extensions import db # https://stackoverflow.com/questions/6558535/find-the-date-for-the-first-monday-after-a-given-date
[ 11748, 4818, 8079, 198, 6738, 598, 13, 27530, 1330, 5972, 198, 6738, 42903, 62, 38235, 1330, 1459, 62, 7220, 198, 6738, 598, 13, 2302, 5736, 1330, 20613, 628, 198, 2, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 35916, ...
3.132353
68
power = {'BUSES': {'Area': 1.33155, 'Bus/Area': 1.33155, 'Bus/Gate Leakage': 0.00662954, 'Bus/Peak Dynamic': 0.0, 'Bus/Runtime Dynamic': 0.0, 'Bus/Subthreshold Leakage': 0.0691322, 'Bus/Subthreshold Leakage with power gating': 0.0259246, 'Gate...
[ 6477, 796, 1391, 6, 45346, 1546, 10354, 1391, 6, 30547, 10354, 352, 13, 2091, 18742, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 16286, 14, 30547, 10354, 352, 13, 2091, 18742, 11, 198, 220, 220, 220, 220, 220, ...
2.34359
29,282
from typing import List, Dict import json from gtmcore.http import ConcurrentRequestManager, ConcurrentRequest from gtmcore.environment.packagemanager import PackageManager, PackageResult, PackageMetadata from gtmcore.container import container_for_context from gtmcore.labbook import LabBook from gtmcore.logging impor...
[ 6738, 19720, 1330, 7343, 11, 360, 713, 198, 11748, 33918, 198, 6738, 308, 17209, 7295, 13, 4023, 1330, 13223, 6657, 18453, 13511, 11, 13223, 6657, 18453, 198, 198, 6738, 308, 17209, 7295, 13, 38986, 13, 8002, 363, 8463, 3536, 1330, 1571...
3.553398
103
"""Conversion of Matplotlib / Seaborn inputs to plotly.""" import os.path as op from pkg_resources import resource_filename import json def mpl_to_px_inputs(inputs, plt_types=None): """Convert typical matplotlib inputs to plotly to simplify API. Parameters ---------- inputs : dict Dictionary ...
[ 37811, 3103, 9641, 286, 6550, 29487, 8019, 1220, 1001, 397, 1211, 17311, 284, 7110, 306, 526, 15931, 198, 11748, 28686, 13, 6978, 355, 1034, 198, 6738, 279, 10025, 62, 37540, 1330, 8271, 62, 34345, 198, 11748, 33918, 628, 198, 4299, 285...
2.471983
464
"""Fizzbuzz for loop variant 3""" for x in range(1, 101): OUTPUT = "" if x % 3 == 0: OUTPUT += "Fizz" if x % 5 == 0: OUTPUT += "Buzz" print(OUTPUT or x)
[ 37811, 37, 6457, 65, 4715, 329, 9052, 15304, 513, 37811, 198, 1640, 2124, 287, 2837, 7, 16, 11, 8949, 2599, 198, 220, 220, 220, 16289, 30076, 796, 13538, 198, 220, 220, 220, 611, 2124, 4064, 513, 6624, 657, 25, 198, 220, 220, 220, ...
2.021739
92
from tensor.main_module import Tensor import numpy as np
[ 6738, 11192, 273, 13, 12417, 62, 21412, 1330, 309, 22854, 198, 11748, 299, 32152, 355, 45941 ]
3.5
16
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
[ 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 257, 4866, 286, 262, 13789, 379, 198, 2,...
3.14658
307
# coding=utf-8 # Copyright (c) 2021 Ant Group import sys LABEL_SEP = '@' INDENT_STRING1 = ' ' INDENT_STRING2 = '' EMPTY_TOKEN = '___EMPTY___'
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 357, 66, 8, 33448, 3738, 4912, 198, 198, 11748, 25064, 198, 198, 48780, 3698, 62, 5188, 47, 796, 705, 31, 6, 198, 198, 12115, 3525, 62, 18601, 2751, 16, 796, 705, 705, 198, 12115, 3525, ...
2.272727
66
import pytest from iminuit import minimize import numpy as np from numpy.testing import assert_allclose, assert_equal opt = pytest.importorskip("scipy.optimize")
[ 11748, 12972, 9288, 198, 6738, 545, 259, 5013, 1330, 17775, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 439, 19836, 11, 6818, 62, 40496, 198, 198, 8738, 796, 12972, 9288, 13, 11748, 669, 74, 5...
3.016667
60
# coded by: salism3 # 23 - 05 - 2020 23:18 (Malam Takbir) from bs4 import BeautifulSoup as parser from . import sorting import re
[ 2, 30817, 416, 25, 3664, 1042, 18, 201, 198, 2, 2242, 532, 8870, 532, 12131, 2242, 25, 1507, 357, 15029, 321, 15804, 65, 343, 8, 201, 198, 201, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 355, 30751, 201, 198, 6738, 764, 1330,...
2.72
50
# coding: utf-8 """ TGS API A production scale tool for BYOND server management # noqa: E501 OpenAPI spec version: 9.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import swagger_client from swagger_client.model...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 309, 14313, 7824, 628, 220, 220, 220, 317, 3227, 5046, 2891, 329, 11050, 18672, 4382, 4542, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 4946, 17614,...
2.808383
167
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Python codebase for the housing classification ML problem', author='Joesan', license='', )
[ 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 10677, 3256, 198, 220, 220, 220, 10392, 28, 19796, 62, 43789, 22784, 198, 220, 220, 220, 2196, 11639, 15, 13, 16, 13, 15,...
2.9375
80
# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from mmedit.models.backbones.sr_backbones.edvr_net import (EDVRNet, PCDAlignment, TSAFusion) def test_pcd_alignment(): "...
[ 2, 15069, 357, 66, 8, 4946, 44, 5805, 397, 13, 1439, 2489, 10395, 13, 198, 11748, 12972, 9288, 198, 11748, 28034, 198, 198, 6738, 285, 1150, 270, 13, 27530, 13, 1891, 35095, 13, 27891, 62, 1891, 35095, 13, 276, 37020, 62, 3262, 1330...
1.928604
2,171
# type: ignore __all__ = [ "readDatastoreImage", "datastore", ]
[ 2, 2099, 25, 8856, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 961, 27354, 459, 382, 5159, 1600, 198, 220, 220, 220, 366, 19608, 459, 382, 1600, 198, 60, 628, 198 ]
2.142857
35
import os from shutil import rmtree from tempfile import mkdtemp from unittest import TestCase from enjoliver import generator
[ 11748, 28686, 198, 6738, 4423, 346, 1330, 374, 16762, 631, 198, 6738, 20218, 7753, 1330, 33480, 67, 29510, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 551, 73, 349, 1428, 1330, 17301, 628, 628, 628 ]
3.5
38
# Enter your code here. Read input from STDIN. Print output to STDOUT import calendar mm,dd,yyyy = map(int,input().split()) day = ["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"] val = int (calendar.weekday(yyyy,mm,dd)) print(day[val])
[ 2, 6062, 534, 2438, 994, 13, 4149, 5128, 422, 48571, 1268, 13, 12578, 5072, 284, 48571, 12425, 198, 198, 11748, 11845, 198, 198, 3020, 11, 1860, 11, 22556, 22556, 796, 3975, 7, 600, 11, 15414, 22446, 35312, 28955, 198, 198, 820, 796, ...
2.623762
101
"""Defines the models for trigger rules and events""" from __future__ import unicode_literals import django.contrib.postgres.fields from django.db import models, transaction from django.utils.timezone import now
[ 37811, 7469, 1127, 262, 4981, 329, 7616, 3173, 290, 2995, 37811, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 7353, 34239, 13, 25747, 198, 6738, 42625, 14208, 13, 994...
3.677966
59
""" Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Silver Medal" and "Bronze Medal". Example 1: Input: [5, 4, 3, 2, 1] Output: ["Gold Medal", "Silver Medal", "Bronze Medal", "4", "5"] Explanation: The fir...
[ 37811, 198, 15056, 8198, 286, 399, 10856, 11, 1064, 511, 3585, 9803, 290, 262, 661, 351, 262, 1353, 220, 198, 15542, 4511, 8198, 11, 508, 481, 307, 11343, 28057, 25, 366, 13306, 9064, 1600, 366, 26766, 9064, 1, 290, 220, 198, 1, 187...
3.403061
196
from ..base import BaseHistoryItem, GenericHistoryItem from ..utils import PolymorphicBase
[ 6738, 11485, 8692, 1330, 7308, 18122, 7449, 11, 42044, 18122, 7449, 198, 6738, 11485, 26791, 1330, 12280, 24503, 291, 14881, 628, 628, 198 ]
4.130435
23
import sys import numpy as np from sern import * ids, lon, lat = np.loadtxt('nodes', unpack = True) links = np.loadtxt('links', dtype = 'int') A, b = AdjacencyMatrix(ids, links) lon, lat = lon[b], lat[b] n = A.shape[0] # LinkProbability expects A as triu A = A[np.triu_indices(n, 1)] # play around with the scale, may...
[ 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1055, 77, 1330, 1635, 198, 198, 2340, 11, 300, 261, 11, 3042, 796, 45941, 13, 2220, 14116, 10786, 77, 4147, 3256, 555, 8002, 796, 6407, 8, 198, 28751, 796, 45941, 13, 2220, ...
2.568905
283
# Copyright 2018 Flight Lab authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
[ 2, 15069, 2864, 13365, 3498, 7035, 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, 198, 2, 921,...
3.994737
190
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .acquisition import AcquisitionFunction from .analytic import ( AnalyticAcquisitionFunction, ConstrainedExpectedImprovement, ExpectedImprovement, NoisyExpectedImprovement, PosteriorMean, Probabil...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 1439, 6923, 33876, 198, 198, 6738, 764, 43561, 10027, 1330, 44564, 22203, 198, 6738, 764, 38200, 13370, 1330, ...
2.729583
551
"""Randomize the minitaur_gym_alternating_leg_env when reset() is called. The randomization include swing_offset, extension_offset of all legs that mimics bent legs, desired_pitch from user input, battery voltage and motor damping. """ import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(in...
[ 37811, 29531, 1096, 262, 949, 270, 2899, 62, 1360, 76, 62, 33645, 803, 62, 1455, 62, 24330, 618, 13259, 3419, 318, 1444, 13, 198, 198, 464, 4738, 1634, 2291, 9628, 62, 28968, 11, 7552, 62, 28968, 286, 477, 7405, 326, 17007, 873, 198...
2.768627
255
""" The TensorProductState class and supporting functionality. """ #*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTESS, the U....
[ 37811, 198, 464, 309, 22854, 15667, 9012, 1398, 290, 6493, 11244, 13, 198, 37811, 198, 2, 17174, 17174, 17174, 8162, 198, 2, 15069, 1853, 11, 13130, 2351, 8987, 1222, 14044, 23555, 286, 3837, 544, 11, 11419, 357, 11251, 7597, 737, 198, ...
4.091912
272
import graphene import graphene_django from django.http import HttpResponseForbidden from graphene_django.views import GraphQLView from graphql import GraphQLError from edivorce.apps.core.models import Document graphql_schema = graphene.Schema(query=Query, mutation=Mutations)
[ 11748, 42463, 198, 11748, 42463, 62, 28241, 14208, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 1890, 37978, 198, 6738, 42463, 62, 28241, 14208, 13, 33571, 1330, 29681, 9711, 7680, 198, 6738, 4823, 13976, 1330, 29681, 48, 2...
3.457831
83
from .exceptions import MazeNotSolved, AlgorithmNotFound from .dijkstra import Dijkstra from .astar import Astar from functools import wraps import warnings from daedalus import Maze as _maze from PIL import Image warnings.simplefilter("once", UserWarning)
[ 6738, 764, 1069, 11755, 1330, 33412, 3673, 50, 5634, 11, 978, 42289, 3673, 21077, 198, 6738, 764, 67, 45961, 12044, 1330, 360, 45961, 12044, 198, 6738, 764, 459, 283, 1330, 317, 7364, 198, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, ...
3.48
75
import os
[ 11748, 28686, 628, 628 ]
3.25
4
#!/usr/bin/python """Interface to OpenShift oc command""" import os import shlex import shutil import subprocess from ansible.module_utils.basic import AnsibleModule ADDITIONAL_PATH_LOOKUPS = ['/usr/local/bin', os.path.expanduser('~/bin')] def locate_oc_binary(): """Find and return oc binary file""" # htt...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 37811, 39317, 284, 4946, 33377, 267, 66, 3141, 37811, 198, 198, 11748, 28686, 198, 11748, 427, 2588, 198, 11748, 4423, 346, 198, 11748, 850, 14681, 198, 198, 6738, 9093, 856, 13, 21412, 62, 2...
2.392544
912
import fractions
[ 11748, 49876, 628 ]
6
3
import ansible import pprint from ansible import utils from jinja2 import Environment, PackageLoader from collections import namedtuple from ansible import utils from ansible.parsing.dataloader import DataLoader from ansible.vars import VariableManager from ansible.inventory import Inventory from ansible.executor.playb...
[ 11748, 9093, 856, 198, 11748, 279, 4798, 198, 6738, 9093, 856, 1330, 3384, 4487, 198, 6738, 474, 259, 6592, 17, 1330, 9344, 11, 15717, 17401, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 9093, 856, 1330, 3384, 4487, 198, 6738, ...
1.67489
1,824
#!/usr/bin/env python3 import itertools import string from elasticsearch import Elasticsearch,helpers import sys import os from glob import glob import pandas as pd import json host = sys.argv[1] port = int(sys.argv[2]) alias = sys.argv[3] print(host) print(port) print(alias) es = Elasticsearch([{'host':...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 340, 861, 10141, 198, 11748, 4731, 198, 6738, 27468, 12947, 1330, 48567, 12947, 11, 16794, 364, 198, 11748, 25064, 198, 11748, 28686, 198, 6738, 15095, 1330, 15095, 198, ...
2.544888
802
print a if b: if c: d e
[ 4798, 257, 198, 198, 361, 275, 25, 220, 220, 220, 220, 198, 220, 220, 220, 611, 269, 25, 198, 220, 220, 220, 220, 220, 220, 220, 288, 198, 220, 220, 220, 304, 198 ]
1.363636
33
from absl import app from mainLoop import main if __name__ == '__main__': app.run(main)
[ 201, 198, 6738, 2352, 75, 1330, 598, 201, 198, 6738, 1388, 39516, 1330, 1388, 201, 198, 220, 220, 220, 220, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 220, 220, 220, 598, 13, 5143, 7, 1...
2.255319
47
from __future__ import absolute_import from builtins import str from builtins import input import sys import argparse from . import bosart_scrape import datetime import json if __name__ == '__main__': main()
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 3170, 1040, 1330, 965, 198, 6738, 3170, 1040, 1330, 5128, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 6738, 764, 1330, 37284, 433, 62, 1416, 13484, 198, 11748, 4818, 8079, ...
3.384615
65
#!/usr/bin/env python # vgm2electron.py # Tool for converting SN76489-based PSG VGM data to Acorn Electron # By Simon Morris (https://github.com/simondotm/) # See https://github.com/simondotm/vgm-packer # # Copyright (c) 2019 Simon Morris. All rights reserved. # # "MIT License": # Permission is hereby granted, free of ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 410, 39870, 17, 9509, 1313, 13, 9078, 198, 2, 16984, 329, 23202, 11346, 22, 2414, 4531, 12, 3106, 6599, 38, 569, 15548, 1366, 284, 4013, 1211, 5903, 1313, 198, 2, 2750, 11288, 144...
2.913587
1,759
import webapp2 import tweepy import json import csv import os import statistics import bokeh from bokeh.io import show, output_file from bokeh.plotting import figure from bokeh.models import HoverTool, ColumnDataSource from bokeh.embed import components, json_item from bokeh.resources import INLINE from bokeh.models.gl...
[ 11748, 3992, 1324, 17, 198, 11748, 4184, 538, 88, 198, 11748, 33918, 198, 11748, 269, 21370, 198, 11748, 28686, 198, 11748, 7869, 198, 11748, 1489, 365, 71, 198, 6738, 1489, 365, 71, 13, 952, 1330, 905, 11, 5072, 62, 7753, 198, 6738, ...
2.338318
4,079
import unittest import clifford as cl from clifford import g3c from numpy import pi, e import numpy as np from scipy.sparse.linalg.matfuncs import _sinch as sinch from clifford import MultiVector from pygacal.common.cgatools import ( Sandwich, Dilator, Translator, Reflector, inversion, Ro...
[ 11748, 555, 715, 395, 198, 198, 11748, 19516, 585, 355, 537, 198, 6738, 19516, 585, 1330, 308, 18, 66, 198, 6738, 299, 32152, 1330, 31028, 11, 304, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 629, 541, 88, 13, 82, 29572, 13,...
2.157791
507
# # # # # # # # Developed by Yakov V. Panov (C) Ling Black 2020 # @site http://ling.black # # # # # # # # Developed by Yakov V. Panov (C) Ling Black 2020 # @site http://ling.black from typing import List from fastapi import APIRouter, Depends, HTTPException from pydantic import BaseModel...
[ 2, 220, 220, 198, 2, 220, 220, 198, 2, 220, 220, 198, 2, 220, 220, 198, 2, 220, 220, 198, 2, 220, 220, 198, 2, 198, 2, 220, 6013, 276, 416, 30254, 709, 569, 13, 5961, 709, 357, 34, 8, 25116, 220, 2619, 12131, 198, 2, 220, ...
3.091837
294
from pandac.PandaModules import *
[ 6738, 19798, 330, 13, 47, 5282, 5841, 5028, 1330, 1635, 198 ]
3.090909
11
import datetime import pickle import tensorflow as tf def save_checkpoint(model, current_step, epoch, output_path, **kwargs): """ Save TF Vocoder model """ state = { 'model': model.weights, 'step': current_step, 'epoch': epoch, 'date': datetime.date.today().strftime("%B %d, %Y"...
[ 11748, 4818, 8079, 198, 11748, 2298, 293, 198, 11748, 11192, 273, 11125, 355, 48700, 628, 198, 4299, 3613, 62, 9122, 4122, 7, 19849, 11, 1459, 62, 9662, 11, 36835, 11, 5072, 62, 6978, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220,...
2.354108
353
from flee import flee """ Generation 1 code. Incorporates only distance, travel always takes one day. """ if __name__ == "__main__": test_path_choice()
[ 6738, 11562, 1330, 11562, 198, 198, 37811, 198, 8645, 341, 352, 2438, 13, 3457, 31150, 689, 691, 5253, 11, 3067, 1464, 2753, 530, 1110, 13, 198, 37811, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, ...
3.137255
51
import matplotlib matplotlib.use('Agg') import config import parse_midas_data import parse_HMP_data import os.path import pylab import sys import numpy import diversity_utils import gene_diversity_utils import calculate_substitution_rates import stats_utils import matplotlib.colors as colors import matplotlib.cm a...
[ 11748, 2603, 29487, 8019, 220, 220, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 220, 198, 11748, 4566, 198, 11748, 21136, 62, 13602, 292, 62, 7890, 198, 11748, 21136, 62, 39, 7378, 62, 7890, 198, 11748, 28686, 13, 6978, 198, ...
2.474107
4,229
import sys import copy import matplotlib import matplotlib.pyplot as plt import seaborn as sns from collections import Counter from .utils import * import numpy as np import pandas as pd
[ 11748, 25064, 198, 11748, 4866, 198, 11748, 2603, 29487, 8019, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 6738, 17268, 1330, 15034, 198, 6738, 764, 26791, 1330, 1635, 19...
3.509434
53
""" DataWriter.py """ from DataController import DataController from DataReader import DataReader from vtk import vtkMetaImageWriter from vtk import vtkXMLImageDataWriter
[ 37811, 198, 6601, 34379, 13, 9078, 198, 37811, 198, 198, 6738, 6060, 22130, 1330, 6060, 22130, 198, 6738, 6060, 33634, 1330, 6060, 33634, 198, 6738, 410, 30488, 1330, 410, 30488, 48526, 5159, 34379, 198, 6738, 410, 30488, 1330, 410, 30488...
3.76087
46
from itertools import chain from django.conf import settings from django.contrib.gis.db import models as gis_models from django.db import models, router, transaction from django.utils import timezone from django.utils.translation import gettext_lazy as _ from ..fields import CleaningJsonField from ..validators import...
[ 6738, 340, 861, 10141, 1330, 6333, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 70, 271, 13, 9945, 1330, 4981, 355, 308, 271, 62, 27530, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981...
3.655172
145
#!/usr/bin/env python # encoding:utf-8 # ############################################################################## # The MIT License (MIT) # # Copyright (c) [2015] [baidu.com] # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (th...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 40477, 12, 23, 198, 198, 2, 1303, 29113, 29113, 7804, 4242, 2, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 685, 4626, 60, 685, 65, ...
3.792683
410
a = 5 b = 7 a,b = b,a print a print b
[ 64, 796, 642, 198, 65, 796, 767, 198, 198, 64, 11, 65, 796, 275, 11, 64, 198, 198, 4798, 257, 198, 4798, 275, 198 ]
1.666667
24
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Tests for the union find data structure. """ try: from ..unionfind import UnionFind except ValueError: pass def test_unionfind_basics(): """ Test the basic properties of unionfind. """ u = UnionFind([1, 2, 3]) assert u.in_same_set(1,...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 51, 3558, 329, 262, 6441, 1064, 1366, 4645, 13, 198, 37811, 198, 198, 28311, 25, 198, 220, 220, 220, ...
2.138477
1,011
# Genetic Algorithm for solving the Traveling Salesman problem # Authors: Mihaela Stoycheva, Vukan Turkulov # Includes import configparser import math import matplotlib.pyplot as plt import numpy import random import sys from operator import itemgetter #Global variables(yay!) # Configuration variables(read from co...
[ 2, 42295, 978, 42289, 329, 18120, 262, 13524, 278, 17329, 805, 1917, 198, 2, 46665, 25, 337, 4449, 3010, 64, 520, 726, 2395, 6862, 11, 569, 2724, 272, 8484, 377, 709, 198, 198, 2, 29581, 198, 11748, 4566, 48610, 198, 11748, 10688, 1...
2.540166
361
# Generated by Django 3.2.8 on 2021-11-25 17:50 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 23, 319, 33448, 12, 1157, 12, 1495, 1596, 25, 1120, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
from plugins.core.player_manager_plugin.plugin import PlayerManagerPlugin from plugins.core.player_manager_plugin.manager import ( Banned, UserLevels, permissions, PlayerManager )
[ 6738, 20652, 13, 7295, 13, 7829, 62, 37153, 62, 33803, 13, 33803, 1330, 7853, 13511, 37233, 198, 6738, 20652, 13, 7295, 13, 7829, 62, 37153, 62, 33803, 13, 37153, 1330, 357, 198, 220, 220, 220, 347, 3577, 11, 198, 220, 220, 220, 117...
3.213115
61
from builtins import str from builtins import range from builtins import object import logging import inspect import os def validate_custom_attributes(custom_attributes_dict, section, custom_attributes): section_dict = {} if custom_attributes and section in custom_attributes_dict...
[ 6738, 3170, 1040, 1330, 965, 198, 6738, 3170, 1040, 1330, 2837, 198, 6738, 3170, 1040, 1330, 2134, 198, 11748, 18931, 198, 11748, 10104, 198, 11748, 28686, 198, 198, 4299, 26571, 62, 23144, 62, 1078, 7657, 7, 23144, 62, 1078, 7657, 62, ...
1.713996
1,479
import gdb cache = TypeCache()
[ 198, 11748, 308, 9945, 198, 220, 220, 220, 220, 198, 23870, 796, 5994, 30562, 3419, 198 ]
2.3125
16
import os import sys directory = sys.argv[1] outfile = open("key_phrases.csv","w") files = {} for filename in os.listdir(directory): text=[] with open(os.path.join(directory, filename)) as f: text=[l.strip() for l in f if len(l.strip())>2] data='' for t in text: if len(t.split()) > 1: data = data+'. '+t.s...
[ 11748, 28686, 198, 11748, 25064, 198, 34945, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 448, 7753, 796, 1280, 7203, 2539, 62, 746, 81, 1386, 13, 40664, 2430, 86, 4943, 198, 198, 16624, 796, 23884, 198, 198, 1640, 29472, 287, 28686, 1...
2.432024
331
"""Unit tests for helper utilities in :mod:`dftinputgen.utils`.""" import os import pytest from ase import io as ase_io from dftinputgen.utils import get_elem_symbol from dftinputgen.utils import read_crystal_structure from dftinputgen.utils import get_kpoint_grid_from_spacing from dftinputgen.utils import DftInputG...
[ 37811, 26453, 5254, 329, 31904, 20081, 287, 1058, 4666, 25, 63, 67, 701, 15414, 5235, 13, 26791, 63, 526, 15931, 198, 198, 11748, 28686, 198, 11748, 12972, 9288, 198, 198, 6738, 257, 325, 1330, 33245, 355, 257, 325, 62, 952, 198, 198,...
2.673797
187
from django.contrib.auth.models import User from django.db.models import (Model, TextField, DateTimeField, ForeignKey, CASCADE) from asgiref.sync import async_to_sync from channels.layers import get_channel_layer from django.db import models import json
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 357, 17633, 11, 8255, 15878, 11, 7536, 7575, 15878, 11, 8708, 9218, 11, 198, 220, 220, 220, 220, 220, 220, 220, ...
2.672897
107
import tensorflow as tf import numpy as np # utility methods def batch_mlp(input, output_sizes, variable_scope): """Apply MLP to the final axis of a 3D tensor (reusing already defined MLPs). Args: input: input tensor of shape [B,n,d_in]. output_sizes: An iterable containing the output sizes of the MLP a...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 10361, 5050, 198, 4299, 15458, 62, 4029, 79, 7, 15414, 11, 5072, 62, 82, 4340, 11, 7885, 62, 29982, 2599, 198, 220, 37227, 44836, 10373, 47, 284, ...
2.261796
1,971
from typing import Dict, Tuple, Optional from pathlib import Path import asyncio from ._mask import Mask from ._event import Event from ._base import InotifyBase __all__ = ('Minotaur',)
[ 6738, 19720, 1330, 360, 713, 11, 309, 29291, 11, 32233, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 30351, 952, 198, 198, 6738, 47540, 27932, 1330, 18007, 198, 6738, 47540, 15596, 1330, 8558, 198, 6738, 47540, 8692, 1330, 554, ...
3.410714
56
"""! @brief Collection of examples devoted to containers. @authors Andrei Novikov (pyclustering@yandex.ru) @date 2014-2020 @copyright BSD-3-Clause """
[ 37811, 0, 201, 198, 201, 198, 31, 65, 3796, 12251, 286, 6096, 13378, 284, 16472, 13, 201, 198, 201, 198, 31, 41617, 10948, 72, 5267, 1134, 709, 357, 9078, 565, 436, 1586, 31, 88, 392, 1069, 13, 622, 8, 201, 198, 31, 4475, 1946, ...
2.555556
63
import argparse import sys import torch import numpy as np import torch.nn as nn from torch.utils.data import DataLoader from torchvision.datasets import MNIST from torchvision.datasets import CIFAR10 import torchvision.transforms as transforms import matplotlib.pyplot as plt parser = argparse.ArgumentParser(descripti...
[ 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 6738, 28034, 10178, 13, 19608, 292, ...
2.00048
4,165
# -*- coding: utf-8 -*- """CNN.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1Tq6HUya2PrC0SmyOIFo2c_eVtguRED2q """ import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch.utils.data import DataL...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 18474, 13, 541, 2047, 65, 198, 198, 38062, 4142, 7560, 416, 1623, 4820, 2870, 13, 198, 198, 20556, 2393, 318, 5140, 379, 198, 220, 220, 220, 3740, 1378, 4033, 3...
2.731588
611
# -*- coding: utf-8 -*- # @Time : 2020-07-30 15:06 # @Author : yingyuankai # @Email : yingyuankai@aliyun.com # @File : qa_evaluators.py import os import logging import numpy as np import tensorflow as tf import json from pprint import pprint from collections import defaultdict from aispace.utils.eval_utils ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 12131, 12, 2998, 12, 1270, 1315, 25, 3312, 198, 2, 2488, 13838, 220, 1058, 331, 278, 24767, 962, 1872, 198, 2, 2488, 15333, 220, ...
2.630252
238
import pytest import torch def pytest_report_header(): return f'torch: {torch.__version__}'
[ 11748, 12972, 9288, 198, 11748, 28034, 628, 628, 198, 4299, 12972, 9288, 62, 13116, 62, 25677, 33529, 198, 220, 220, 220, 1441, 277, 470, 273, 354, 25, 1391, 13165, 354, 13, 834, 9641, 834, 92, 6, 198 ]
2.702703
37
"""Treadmill hierarchical scheduler. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import abc import collections import datetime import heapq import itertools import logging import operator import sys import tim...
[ 37811, 51, 961, 17805, 38958, 6038, 18173, 13, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, ...
2.250916
10,103
import random import sys import time import json import os import warnings import numpy as np import glob, os stat_mini = 1 stat_max = 0 listBanners = [] #HOW TO USE IT: #1 copy the opening.txt #2 remove the graphic (but do keep top logo for consistency) #3 add ASCII art that is 78 or less characters in widt...
[ 11748, 4738, 198, 11748, 25064, 198, 11748, 640, 198, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 14601, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 11748, 15095, 11, 28686, 198, 198, 14269, 62, 45313, 220, 220, 220, 220, 7...
2.571429
161
from dataclasses import dataclass LIGHT = theme( name='LIGHT', bg_color=None, fg_color='black', lb_color='#f0f0f0', ttk_theme='xpnative' ) DARK = theme( name='DARK', bg_color='#424242', fg_color='white', lb_color='#4...
[ 6738, 4818, 330, 28958, 220, 1330, 4818, 330, 31172, 201, 198, 201, 198, 43, 9947, 796, 7505, 7, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 43, 9947, 3256, 220, 201, 198, 220, 220, 220, 220, 220, 220, 220, 275, 70, ...
1.650224
223
import os import sys import re import json import logging import torch from transformers import ( HfArgumentParser, set_seed, AutoTokenizer, AutoConfig, EvalPrediction, ) from src.model.ca_mtl import CaMtl, CaMtlArguments from src.utils.misc import MultiTaskDataArguments, Split from src.mtl_traine...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 33918, 198, 11748, 18931, 198, 198, 11748, 28034, 198, 6738, 6121, 364, 1330, 357, 198, 220, 220, 220, 367, 69, 28100, 1713, 46677, 11, 198, 220, 220, 220, 900, 62, 28826, ...
2.850515
194
#!/usr/bin/env python3 """Read data in CSV format from websocket """ import sys import asyncio import websockets # read url from command line if len(sys.argv) >= 2: uri = sys.argv[1] else: # host url and port uri = "ws://localhost:8314" print("*==* ", sys.argv[0], " Lese Daten von url ", uri) # run web...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 5569, 1366, 287, 44189, 5794, 422, 2639, 5459, 198, 37811, 198, 198, 11748, 25064, 198, 11748, 30351, 952, 198, 11748, 2639, 11603, 198, 198, 2, 1100, 19016, 422, 3141, 1627, ...
2.587838
148
import os import sys import itertools import json _NONE = object() sys.modules[__name__] = SettingManager()
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 340, 861, 10141, 198, 11748, 33918, 198, 198, 62, 45, 11651, 796, 2134, 3419, 628, 198, 198, 17597, 13, 18170, 58, 834, 3672, 834, 60, 796, 25700, 13511, 3419, 198 ]
3.027027
37
""" This file contains partial objects related to Roblox groups. """ from __future__ import annotations from typing import TYPE_CHECKING from ..bases.basegroup import BaseGroup from ..bases.baseuser import BaseUser if TYPE_CHECKING: from ..client import Client
[ 37811, 198, 198, 1212, 2393, 4909, 13027, 5563, 3519, 284, 3851, 75, 1140, 2628, 13, 198, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 198, 198, 6738, 11485, 65, 1386, 13, 8692, ...
3.613333
75