content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import numpy as np from pytest import fixture, mark, skip from unittest.mock import patch from pathlib import Path from beyond.config import config from beyond.dates.eop import Eop from beyond.frames.stations import create_station from beyond.io.tle import Tle from beyond.propagators.keplernum import KeplerNum from be...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 12972, 9288, 1330, 29220, 11, 1317, 11, 14267, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 3675, 13, 11250, 1330, 4566, 198, 6738, 36...
2.859307
462
import pytest from diofant import (Add, Derivative, Ei, Eq, Function, I, Integral, LambertW, Piecewise, Rational, Sum, Symbol, acos, asin, asinh, besselj, cos, cosh, diff, erf, exp, li, log, pi, ratsimp, root, simplify, sin, sinh, sqrt, symbols, tan) from ...
[ 11748, 12972, 9288, 198, 198, 6738, 288, 952, 69, 415, 1330, 357, 4550, 11, 9626, 452, 876, 11, 412, 72, 11, 412, 80, 11, 15553, 11, 314, 11, 15995, 1373, 11, 36978, 54, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
2.04908
652
from typing import Union import torch import torch.nn as nn from kornia.color.hsv import rgb_to_hsv, hsv_to_rgb from kornia.constants import pi def adjust_saturation_raw(input: torch.Tensor, saturation_factor: Union[float, torch.Tensor]) -> torch.Tensor: r"""Adjust color saturation of an image. Expecting input ...
[ 6738, 19720, 1330, 4479, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 6738, 479, 3317, 13, 8043, 13, 11994, 85, 1330, 46140, 62, 1462, 62, 11994, 85, 11, 289, 21370, 62, 1462, 62, 81, 22296, 198, 673...
2.563214
2,887
'''Entry point into the pommerman module''' import gym import inspect from . import agents from . import configs from . import constants from . import forward_model from . import helpers from . import utility from . import network gym.logger.set_level(40) REGISTRY = None # Register environments with gym _register()...
[ 7061, 6, 30150, 966, 656, 262, 279, 296, 647, 805, 8265, 7061, 6, 198, 11748, 11550, 198, 11748, 10104, 198, 6738, 764, 1330, 6554, 198, 6738, 764, 1330, 4566, 82, 198, 6738, 764, 1330, 38491, 198, 6738, 764, 1330, 2651, 62, 19849, ...
2.840456
351
from django.urls import path from .views import ProfileView urlpatterns = [ path('', ProfileView.as_view(), name='user-profile'), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 33571, 1330, 13118, 7680, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 13118, 7680, 13, 292, 62, 1177, 22784, 1438, 11639, 7220, 12, 133...
3.021739
46
import sklearn.linear_model from autosklearn.pipeline.components.classification.passive_aggressive import \ PassiveAggressive from .test_base import BaseClassificationComponentTest
[ 11748, 1341, 35720, 13, 29127, 62, 19849, 198, 198, 6738, 44619, 74, 35720, 13, 79, 541, 4470, 13, 5589, 3906, 13, 4871, 2649, 13, 6603, 425, 62, 49639, 1330, 3467, 198, 220, 220, 220, 31652, 46384, 3314, 198, 198, 6738, 764, 9288, ...
3.686275
51
# coding=utf-8 # Copyright 2020 The TensorFlow Datasets 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 12131, 383, 309, 22854, 37535, 16092, 292, 1039, 46665, 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, 77...
3.429719
249
from data.data_loader_dad import ( NASA_Anomaly, WADI ) from exp.exp_basic import Exp_Basic from models.model import Informer from utils.tools import EarlyStopping, adjust_learning_rate from utils.metrics import metric from sklearn.metrics import classification_report import numpy as np import torch import t...
[ 6738, 1366, 13, 7890, 62, 29356, 62, 47984, 1330, 357, 198, 220, 220, 220, 8884, 62, 2025, 24335, 11, 198, 220, 220, 220, 370, 2885, 40, 198, 8, 198, 6738, 1033, 13, 11201, 62, 35487, 1330, 5518, 62, 26416, 198, 6738, 4981, 13, 19...
3.388489
139
"""Provide common mysensors fixtures.""" from __future__ import annotations from collections.abc import AsyncGenerator, Callable, Generator import json from typing import Any from unittest.mock import AsyncMock, MagicMock, patch from mysensors import BaseSyncGateway from mysensors.persistence import MySensorsJSONDeco...
[ 37811, 15946, 485, 2219, 616, 82, 641, 669, 34609, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 17268, 13, 39305, 1330, 1081, 13361, 8645, 1352, 11, 4889, 540, 11, 35986, 198, 11748, 33918, 198, 6738, 19720, 13...
2.902516
636
import cv2 as cv import numpy as np import copy import math import Edges import INTPoint eps = 1e-7 votes = {} Groups = [] VPoints = [] Centers = [] Cluster = [] voters = {} deal("data/1.jpg",'1')
[ 11748, 269, 85, 17, 355, 269, 85, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4866, 198, 11748, 10688, 198, 11748, 1717, 3212, 198, 11748, 3268, 7250, 1563, 198, 198, 25386, 796, 352, 68, 12, 22, 198, 29307, 796, 23884, 198, 38, ...
2.506329
79
from django.db import migrations, models from django.conf import settings from opaque_keys.edx.django.models import CourseKeyField
[ 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 32191, 62, 13083, 13, 276, 87, 13, 28241, 14208, 13, 27530, 1330, 20537, 9218, 15878, 628 ]
3.666667
36
"""Generate Customer Data""" import csv import random from config import MIN_CUSTOMER_ID, MAX_CUSTOMER_ID ACQUISITION_SOURCES = [ 'OrganicSearch', 'PaidSearch', 'Email', 'SocialMedia', 'Display', 'Affiliate' 'Referral' ] if __name__ == '__main__': main()
[ 37811, 8645, 378, 22092, 6060, 37811, 198, 198, 11748, 269, 21370, 198, 11748, 4738, 198, 198, 6738, 4566, 1330, 20625, 62, 34, 7759, 2662, 1137, 62, 2389, 11, 25882, 62, 34, 7759, 2662, 1137, 62, 2389, 198, 198, 2246, 10917, 1797, 17...
2.307087
127
import parsl from parsl.app.app import python_app from parsl.tests.configs.local_threads import config from parsl.executors.errors import UnsupportedFeatureError from parsl.executors import WorkQueueExecutor if __name__ == '__main__': local_config = config parsl.load(local_config) x = test_resource(2)
[ 11748, 13544, 75, 198, 6738, 13544, 75, 13, 1324, 13, 1324, 1330, 21015, 62, 1324, 198, 6738, 13544, 75, 13, 41989, 13, 11250, 82, 13, 12001, 62, 16663, 82, 1330, 4566, 198, 6738, 13544, 75, 13, 18558, 315, 669, 13, 48277, 1330, 791...
2.981308
107
import pathlib import re from typing import List, Optional, Dict, Set, Tuple, Iterable import shlex
[ 11748, 3108, 8019, 198, 11748, 302, 198, 6738, 19720, 1330, 7343, 11, 32233, 11, 360, 713, 11, 5345, 11, 309, 29291, 11, 40806, 540, 198, 11748, 427, 2588, 628 ]
3.482759
29
from cloud.permission import Permission, NeedPermission from cloud.message import error # Define the input output format of the function. # This information is used when creating the *SDK*. info = { 'input_format': { 'session_id': 'str', 'field': 'str', 'value?': 'str', }, 'output_...
[ 198, 6738, 6279, 13, 525, 3411, 1330, 2448, 3411, 11, 10664, 5990, 3411, 198, 6738, 6279, 13, 20500, 1330, 4049, 198, 198, 2, 2896, 500, 262, 5128, 5072, 5794, 286, 262, 2163, 13, 198, 2, 770, 1321, 318, 973, 618, 4441, 262, 1635, ...
2.598726
157
""" Write MCNP Material Cards ========================= Here we load a test reactor and write each component of one fuel block out as MCNP material cards. Normally, code-specific utility code would belong in a code-specific ARMI plugin. But in this case, the need for MCNP materials cards is so pervasive that it made ...
[ 37811, 198, 16594, 13122, 22182, 14633, 15824, 198, 4770, 2559, 28, 198, 198, 4342, 356, 3440, 257, 1332, 21905, 290, 3551, 1123, 7515, 286, 530, 5252, 2512, 503, 355, 198, 9655, 22182, 2587, 4116, 13, 198, 198, 43625, 11, 2438, 12, 1...
3.175497
302
import names import os import datetime from random import random def generate_gedcom_file(): """generate some gedcom file""" db = {} db['n_individuals'] = 0 db['max_individuals'] = 8000 db['n_families'] = 0 db['yougest'] = None gedcom_content = """ 0 HEAD 1 SOUR Gramps 2 VERS 3.3.0 2 N...
[ 11748, 3891, 198, 11748, 28686, 198, 11748, 4818, 8079, 198, 6738, 4738, 1330, 4738, 628, 198, 4299, 7716, 62, 2004, 785, 62, 7753, 33529, 198, 220, 220, 220, 37227, 8612, 378, 617, 308, 276, 785, 2393, 37811, 198, 220, 220, 220, 2061...
2.26484
438
""" Show how to have enemies shoot bullets aimed at the player. If Python and Arcade are installed, this example can be run from the command line with: python -m arcade.examples.sprite_bullets_enemy_aims """ import arcade import math import os SCREEN_WIDTH = 800 SCREEN_HEIGHT = 600 SCREEN_TITLE = "Sprites and Bullet...
[ 37811, 198, 15307, 703, 284, 423, 5775, 2686, 16043, 8998, 379, 262, 2137, 13, 198, 198, 1532, 11361, 290, 23190, 389, 6589, 11, 428, 1672, 460, 307, 1057, 422, 262, 3141, 1627, 351, 25, 198, 29412, 532, 76, 27210, 13, 1069, 12629, ...
2.796875
192
# This Part will gather Infos and demonstrate the use of Variables. usrName = input("What is your Name?") usrAge = int(input("What is your Age?")) usrGPA = float(input("What is your GPA?")) print () #cheap way to get a new line print ("Hello, %s" % (usrName)) print ("Did you know that in two years you will be %d years ...
[ 2, 770, 2142, 481, 6431, 4806, 418, 290, 10176, 262, 779, 286, 15965, 2977, 13, 198, 14629, 5376, 796, 5128, 7203, 2061, 318, 534, 6530, 1701, 8, 198, 14629, 23396, 796, 493, 7, 15414, 7203, 2061, 318, 534, 7129, 1701, 4008, 198, 14...
3.169014
142
a = input() a = a.replace('--', '2') a = a.replace('-.', '1') a = a.replace('.', '0') print(a)
[ 64, 796, 5128, 3419, 198, 64, 796, 257, 13, 33491, 10786, 438, 3256, 705, 17, 11537, 198, 64, 796, 257, 13, 33491, 10786, 12, 2637, 11, 705, 16, 11537, 198, 64, 796, 257, 13, 33491, 10786, 2637, 11, 705, 15, 11537, 198, 4798, 7, ...
2.021277
47
if __name__ == "__main__": msg = Message(sender="A", receiver="B") assert msg.sender is "A" assert msg.receiver is "B"
[ 198, 220, 220, 220, 220, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 31456, 796, 16000, 7, 82, 2194, 2625, 32, 1600, 9733, 2625, 33, 4943, 198, 220, 220, 220, 6818, 31456, 13, 82, 2194, 3...
2.278689
61
import logging from opbeat.handlers.logging import OpbeatHandler from opbeat.utils.stacks import iter_stack_frames from tests.helpers import get_tempstoreclient from tests.utils.compat import TestCase
[ 11748, 18931, 198, 198, 6738, 1034, 12945, 13, 4993, 8116, 13, 6404, 2667, 1330, 8670, 12945, 25060, 198, 6738, 1034, 12945, 13, 26791, 13, 301, 4595, 1330, 11629, 62, 25558, 62, 37805, 198, 6738, 5254, 13, 16794, 364, 1330, 651, 62, ...
3.578947
57
# -*- coding: utf-8 -*- # pylint: disable=E1101 from sqlalchemy import sql from sqlalchemy import orm from sqlalchemy.orm.exc import NoResultFound from .. import Base # http://www.iana.org/assignments/media-types/media-types.xhtml
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 279, 2645, 600, 25, 15560, 28, 36, 1157, 486, 198, 198, 6738, 44161, 282, 26599, 1330, 44161, 198, 6738, 44161, 282, 26599, 1330, 393, 76, 198, 198, 6738, 4416...
2.704545
88
# encoding: utf-8 from goods.models import Goods from django.views.generic.base import View
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 6738, 7017, 13, 27530, 1330, 38360, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 13, 8692, 1330, 3582, 628, 628, 198 ]
3.310345
29
#!/usr/bin/env python import errno import os import platform import sys import traceback from fcntl import flock, LOCK_EX, LOCK_NB from optparse import OptionParser from os import O_RDWR, O_CREAT, O_WRONLY, O_APPEND from os.path import basename, dirname, exists, realpath from os.path import join as pathjoin from sign...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 11454, 3919, 198, 11748, 28686, 198, 11748, 3859, 198, 11748, 25064, 198, 11748, 12854, 1891, 198, 198, 6738, 277, 66, 429, 75, 1330, 29556, 11, 406, 11290, 62, 6369, 11, 4...
2.394942
1,542
from direct.showbase.ShowBase import ShowBase from direct.task import Task from direct.actor.Actor import Actor import numpy as np app = MyApp() app.run()
[ 6738, 1277, 13, 12860, 8692, 13, 15307, 14881, 1330, 5438, 14881, 198, 6738, 1277, 13, 35943, 1330, 15941, 198, 6738, 1277, 13, 11218, 13, 40277, 1330, 27274, 198, 11748, 299, 32152, 355, 45941, 198, 198, 1324, 796, 2011, 4677, 3419, 19...
3.444444
45
from app import app app.run()
[ 6738, 598, 1330, 220, 598, 198, 198, 1324, 13, 5143, 3419, 198 ]
2.666667
12
"""Organize the calculation of statistics for each series in this DataFrame.""" import warnings from datetime import datetime from typing import Optional import pandas as pd from tqdm.auto import tqdm from visions import VisionsTypeset from pandas_profiling.config import Settings from pandas_profiling.model.correlati...
[ 37811, 26121, 1096, 262, 17952, 286, 7869, 329, 1123, 2168, 287, 428, 6060, 19778, 526, 15931, 198, 11748, 14601, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 32233, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 67...
2.306552
2,564
import operator stds = [] stdsDict = {} index = 0 if __name__ == "__main__": campers = ['PKUxk','THUsz_ai','THUsz_cs','THUsz_data','USTC_cs'] for camper in campers: filename = camper + '.txt' with open('data/%s'%(filename), "r") as f: data = f.readlines() for std in dat...
[ 11748, 10088, 198, 198, 301, 9310, 796, 17635, 198, 301, 9310, 35, 713, 796, 23884, 198, 9630, 796, 657, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1413, 364, 796, 37250, 40492, 52, 87, 74...
1.993485
307
#!/usr/bin/env python from __future__ import absolute_import, print_function import os import os.path import sys try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() NAME = "futur...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 11748, 25064, 628, 198, 28311, 25, 198, 220, 220, 220...
1.924417
2,871
from flask import Flask from .extensions import db from .routes import short from . import config def create_app(): """ Creates Flask App, connect to Database and register Blueprint of routes""" app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = config.DATABASE_CONNECTION_URI app.co...
[ 6738, 42903, 1330, 46947, 201, 198, 6738, 764, 2302, 5736, 1330, 20613, 201, 198, 6738, 764, 81, 448, 274, 1330, 1790, 201, 198, 6738, 764, 1330, 4566, 201, 198, 201, 198, 4299, 2251, 62, 1324, 33529, 201, 198, 220, 220, 220, 37227, ...
2.490196
204
import requests from bs4 import BeautifulSoup import urllib.request import os import random import time if __name__ == '__main__': html("https://stackoverflow.com/questions/50119673/nginx-fast-cgi-cache-on-error-page-404")
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 2956, 297, 571, 13, 25927, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 640, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 22...
2.924051
79
import os import numpy as np import pandas as pd from keras.utils import to_categorical from sklearn.model_selection import KFold, train_test_split
[ 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 41927, 292, 13, 26791, 1330, 284, 62, 66, 2397, 12409, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 509, 37, 727, 11, ...
3.08
50
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import sys import click import rhea from polyaxon_cli.cli.getters.experiment import ( get_experiment_job_or_local, get_project_experiment_or_local ) from polyaxon_cli.cli.upload import upload from polyaxon_cli.client imp...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 25064, 198, 198, 11748, 3904, 198, 11748, 374, 21632, 198, 198, 6738, 7514...
3.021538
325
""" A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, a2 + b2 = c2 For example, 32 + 42 = 9 + 16 = 25 = 52. There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product abc. """ solved = False for a in range(1, 1000): for b in range(1, 1000): for c in range(...
[ 37811, 198, 32, 48657, 363, 29456, 15055, 83, 318, 257, 900, 286, 1115, 3288, 3146, 11, 257, 1279, 275, 1279, 269, 11, 329, 543, 11, 198, 64, 17, 1343, 275, 17, 796, 269, 17, 198, 1890, 1672, 11, 3933, 1343, 5433, 796, 860, 1343, ...
2.462222
225
from decimal import Decimal import os from django.test import TestCase from unipath import Path from ....utils import refresh from ...media import tests from ..models import Transcript, TranscriptMedia MEDIA_TESTDATA_PATH = Path(tests.__file__).parent.child('testdata') RAW_MEDIA_PATH = MEDIA_TESTDATA_PATH.child('r...
[ 6738, 32465, 1330, 4280, 4402, 198, 11748, 28686, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 555, 541, 776, 1330, 10644, 198, 198, 6738, 19424, 26791, 1330, 14976, 198, 6738, 2644, 11431, 1330, 5254, 198, ...
2.968354
158
from bs4 import BeautifulSoup import requests import json import datetime import codecs import re featHolder = {} featHolder['name'] = 'Pathfinder 2.0 Ancestry feat list' featHolder['date'] = datetime.date.today().strftime("%B %d, %Y") listOfPages = codecs.open("ancestryFeats.csv", encoding='utf-8') for ...
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 7007, 198, 11748, 33918, 198, 11748, 4818, 8079, 198, 11748, 40481, 82, 198, 11748, 302, 198, 198, 27594, 39, 19892, 796, 23884, 198, 27594, 39, 19892, 17816, 3672, 20520, 796, 705,...
2.527132
258
import random
[ 11748, 4738, 628 ]
5
3
import unittest import scrape if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 42778, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.580645
31
if __name__ == "__main__": main()
[ 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.166667
18
# -*- coding: utf-8 -*- """ Created on Sat Dec 26 13:20:45 2015 Code for Kaggle What's Cooking Competition It uses the following classifiers with tf-idf,hashvectors and bag_of_words approach 1. Adaboost 2. Extratrees 3. Bagging 4. Random Forests @author: Rupak Chakraborty """ import numpy as np import time import json...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 7031, 4280, 2608, 1511, 25, 1238, 25, 2231, 1853, 198, 10669, 329, 509, 9460, 293, 1867, 338, 33774, 27348, 198, 1026, 3544, 262, 1708, 1398, 133...
2.720903
1,684
import random # Create a deck of cards deck = [x for x in range(52)] # Create suits and ranks lists suits = ["Spades", "Hearts", "Diamonds", "Clubs"] ranks = ["Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King"] # Shuffle the cards random.shuffle(deck) # Display the first four card...
[ 11748, 4738, 198, 198, 2, 13610, 257, 6203, 286, 4116, 198, 35875, 796, 685, 87, 329, 2124, 287, 2837, 7, 4309, 15437, 198, 198, 2, 13610, 14803, 290, 9803, 8341, 198, 16554, 796, 14631, 4561, 2367, 1600, 366, 1544, 5889, 1600, 366, ...
2.478723
188
#! usr/bin/env python3 # -*- coding:utf-8 -*- """ @Author:Kaiyin Zhou Usage: node_embeddings = tf.random.normal(shape=(5, 3)) adjacency_lists = [ tf.constant([[0, 1], [2, 4], [2, 4]], dtype=tf.int32), tf.constant([[0, 1], [2, 4], [2, 4]], dtype=tf.int32) ] layer...
[ 2, 0, 514, 81, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 13838, 25, 42, 1872, 88, 259, 32222, 198, 28350, 25, 198, 17440, 62, 20521, 67, 654, 796, 48700, 13,...
2.020408
245
# -*- coding: utf-8 -*- # # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 2864, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779,...
2.166963
21,394
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import ast from datetime import timedelta, datetime from random import randint from odoo import api, fields, models, tools, SUPERUSER_ID, _ from odoo.exceptions import UserError, AccessError, ValidationError, RedirectWa...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2142, 286, 10529, 2238, 13, 4091, 38559, 24290, 2393, 329, 1336, 6634, 290, 15665, 3307, 13, 198, 198, 11748, 6468, 198, 6738, 4818, 8079, 1330, 28805, 12514, 11, 481...
2.469948
7,437
# -*- coding: utf-8 -*- """ Config File for enviroment variables """ import os from importlib import import_module def get_config(): """ Get the Config Class instance defined in APP_SETTINGS environment variable :return The config class instance :rtype: Config """ config_imports = os.e...
[ 2, 220, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 16934, 9220, 329, 17365, 343, 296, 298, 9633, 198, 37811, 198, 198, 11748, 28686, 198, 6738, 1330, 8019, 1330, 1330, 62, 21412, 628, 628, 628, 628, 198,...
2.815574
244
from mysql_dao.select_dao import SelectDao as MysqlSelectDao from postgres_dao.ddl_dao import DdlDao from postgres_dao.dml_dao import DmlDao as PsqlDmlDao psql_ddl_dao = DdlDao() mysql_select_dao = MysqlSelectDao() psql_dml_dao = PsqlDmlDao() psql_ddl_dao.create_tables() county_data = mysql_select_dao.select_all_cou...
[ 6738, 48761, 62, 67, 5488, 13, 19738, 62, 67, 5488, 1330, 9683, 35, 5488, 355, 337, 893, 13976, 17563, 35, 5488, 198, 6738, 1281, 34239, 62, 67, 5488, 13, 1860, 75, 62, 67, 5488, 1330, 360, 25404, 35, 5488, 198, 6738, 1281, 34239, ...
2.117794
399
import time import logger from basetestcase import BaseTestCase from couchbase_helper.documentgenerator import DocumentGenerator from membase.api.rest_client import RestConnection from couchbase_helper.documentgenerator import BlobGenerator
[ 11748, 640, 198, 11748, 49706, 198, 6738, 1615, 316, 395, 7442, 1330, 7308, 14402, 20448, 198, 6738, 18507, 8692, 62, 2978, 525, 13, 22897, 8612, 1352, 1330, 16854, 8645, 1352, 198, 6738, 1066, 8692, 13, 15042, 13, 2118, 62, 16366, 1330...
4.016667
60
from bs4 import BeautifulSoup import requests from urllib.request import urlretrieve ROOT = 'http://pdaotao.duytan.edu.vn' # a = get_excel_url('http://pdaotao.duytan.edu.vn/EXAM_LIST_Detail/?ID=52289&lang=VN') main()
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 7007, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 1186, 30227, 198, 198, 13252, 2394, 796, 705, 4023, 1378, 79, 6814, 4265, 78, 13, 646, 20760, 272, 13, 15532, 13, 85, 77...
2.315789
95
# coding=utf-8 # Copyright 2021 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 33448, 3012, 11419, 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.906329
3,555
""" Implement transformation on Numba IR """ from __future__ import absolute_import, print_function from collections import namedtuple, defaultdict import logging from numba.analysis import compute_cfg_from_blocks, find_top_level_loops from numba import ir, errors, ir_utils from numba.analysis import compute_use_def...
[ 37811, 198, 3546, 26908, 13389, 319, 399, 2178, 64, 14826, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 3601, 62, 8818, 198, 198, 6738, 17268, 1330, 3706, 83, 29291, 11, 4277, 11600, 198, 11748, 18931, 198, ...
2.235694
6,186
import os import unittest from unittest import skipUnless import numpy as np from numpy.testing import assert_array_equal from parameterized import parameterized from monai.apps.pathology.datasets import MaskedInferenceWSIDataset from monai.apps.utils import download_url from monai.utils import optional_import from t...
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 1330, 14267, 28042, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 18747, 62, 40496, 198, 6738, 11507, 1143, 1330, 11507, 114...
1.781087
2,686
from manga_py.provider import Provider from .helpers.std import Std main = DoujinsCom
[ 6738, 15911, 62, 9078, 13, 15234, 1304, 1330, 32549, 198, 6738, 764, 16794, 364, 13, 19282, 1330, 520, 67, 628, 198, 198, 12417, 796, 5728, 73, 1040, 5377, 198 ]
3.068966
29
from PyQt5.QtCore import QModelIndex, QAbstractItemModel, Qt, pyqtSlot from PyQt5.QtWidgets import QItemDelegate, QWidget, QStyleOptionViewItem, QCheckBox
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 1195, 17633, 15732, 11, 1195, 23839, 7449, 17633, 11, 33734, 11, 12972, 39568, 38963, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 7449, 5005, 34637, 11, 1195,...
2.818182
55
# -*- coding: utf-8 -*- ''' Framework: Tensorflow Training samples: 1600 Validation samples: 400 RNN with 128 units Optimizer: Adam Epoch: 100 Loss: Cross Entropy Activation function: Relu for network and Soft-max for regression Regularization: Drop-out, keep_prob = 0.8 Accuracy of Validation set: 95% ''' from __future...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 21055, 6433, 25, 309, 22854, 11125, 198, 44357, 8405, 25, 26143, 198, 7762, 24765, 8405, 25, 7337, 198, 49, 6144, 351, 13108, 4991, 198, 27871, 320, 7509, ...
2.77712
507
import numpy as np import tensorflow as tf H = 2 N = 2 M = 3 BS = 10 def masked_softmax(logits, mask, dim): """ Takes masked softmax over given dimension of logits. Inputs: logits: Numpy array. We want to take softmax over dimension dim. mask: Numpy array of same shape as logits. Has 1...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 39, 796, 362, 198, 45, 796, 362, 198, 44, 796, 513, 198, 4462, 796, 838, 198, 198, 4299, 29229, 62, 4215, 9806, 7, 6404, 896, 11, 9335, 11, 5391, 2599, ...
2.392822
1,003
import numpy as np import pytest from astropy import convolution from scipy.signal import medfilt import astropy.units as u from ..spectra.spectrum1d import Spectrum1D from ..tests.spectral_examples import simulated_spectra from ..manipulation.smoothing import (convolution_smooth, box_smooth, ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 6738, 6468, 28338, 1330, 3063, 2122, 198, 6738, 629, 541, 88, 13, 12683, 282, 1330, 1117, 69, 2326, 198, 11748, 6468, 28338, 13, 41667, 355, 334, 198, 6738, 11485, 4443, 430, ...
2.659521
793
"""Module interpolating mathematical functions out of support points""" from scipy.interpolate import interp1d, lagrange, CubicSpline def interpolator(x_sup, y_sup, method): """Interpolates a mathematical function from a given set of points using either linear, polynomial or cubic spline for the interpol...
[ 37811, 26796, 39555, 803, 18069, 5499, 503, 286, 1104, 2173, 37811, 198, 198, 6738, 629, 541, 88, 13, 3849, 16104, 378, 1330, 987, 79, 16, 67, 11, 19470, 9521, 11, 7070, 291, 26568, 500, 628, 198, 4299, 39555, 1352, 7, 87, 62, 37330...
2.657895
342
import frappe
[ 11748, 5306, 27768 ]
4.333333
3
import json import matplotlib.pyplot as plt from pprint import pprint import numpy as np from scipy.stats import linregress from util.stats import * with open('data/game_stats.json', 'r') as f: df = json.load(f) X, y = [], [] for match, stats in df.items(): home, away = stats['home'], stats['away'] if home['mp'] !...
[ 11748, 33918, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 34242, 1330, 9493, 2301, 601, 198, 6738, 7736, 13, 342...
2.324324
407
import os import numpy as np import pandas as pd import tensorflow as tf from keras.preprocessing.image import ImageDataGenerator from keras.preprocessing.image import img_to_array, load_img from keras.utils.np_utils import to_categorical from sklearn.model_selection import StratifiedShuffleSplit from sklearn.preproces...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 41927, 292, 13, 3866, 36948, 13, 9060, 1330, 7412, 6601, 8645, 1352, 198, 6738, 41927, 292, 13...
2.585635
362
# -*- coding: utf-8 -*- n, w = map(int, input().split()) for _ in range(n): entrada = input() last_space = entrada.rfind(' ') if int(entrada[last_space:]) > w: print(entrada[:last_space])
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 77, 11, 266, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 198, 1640, 4808, 287, 2837, 7, 77, 2599, 198, 220, 24481, 4763, 796, 5128, 3419, 198, 220, 9...
2.208791
91
from sklearn import ensemble from m2cgen import assemblers, ast from tests import utils
[ 6738, 1341, 35720, 1330, 34549, 198, 198, 6738, 285, 17, 66, 5235, 1330, 11156, 8116, 11, 6468, 198, 6738, 5254, 1330, 3384, 4487, 628, 628 ]
3.68
25
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ import os from setuptools import setup, find_packages, Extension import pynumenc_meta # pylint: disable=redefined-builtin here = os.path.abspath(os.path.dirname(__file__)) # ...
[ 37811, 32, 900, 37623, 10141, 1912, 9058, 8265, 13, 198, 198, 6214, 25, 198, 5450, 1378, 8002, 3039, 13, 29412, 13, 2398, 14, 268, 14, 42861, 14, 17080, 2455, 278, 13, 6494, 198, 5450, 1378, 12567, 13, 785, 14, 79, 4464, 64, 14, 3...
2.220339
826
import numpy as np from skimage.transform import resize from skimage import measure from skimage.measure import regionprops
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 9060, 13, 35636, 1330, 47558, 198, 6738, 1341, 9060, 1330, 3953, 198, 6738, 1341, 9060, 13, 1326, 5015, 1330, 3814, 1676, 862 ]
4.1
30
# project/server/models.py import jwt import datetime from project.server import app, db, bcrypt
[ 2, 1628, 14, 15388, 14, 27530, 13, 9078, 198, 198, 11748, 474, 46569, 198, 11748, 4818, 8079, 198, 198, 6738, 1628, 13, 15388, 1330, 598, 11, 20613, 11, 275, 29609, 628 ]
3.225806
31
import codecs import os import sys from setuptools import setup from setuptools import find_packages def read_file(filename, encoding='utf8'): """Read unicode from given file.""" with codecs.open(filename, encoding=encoding) as fd: return fd.read() here = os.path.abspath(os.path.dirname(__file__)) ...
[ 11748, 40481, 82, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 628, 198, 4299, 1100, 62, 7753, 7, 34345, 11, 21004, 11639, 40477, 23, 6, 2599, ...
2.636364
649
# -*- coding: utf-8 -*- import copy import datetime import json import logging import subprocess import sys import warnings from email.mime.text import MIMEText from email.utils import formatdate from smtplib import SMTP from smtplib import SMTP_SSL from smtplib import SMTPAuthenticationError from smtplib import SMTPEx...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 4866, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 14601, 198, 6738, 3053, 13, 76, 524, 13, ...
3.422642
265
# -*- coding: utf-8 -*- # FLEDGE_BEGIN # See: http://fledge-iot.readthedocs.io/ # FLEDGE_END import asyncio import datetime import uuid import time import json from unittest.mock import MagicMock, call import sys import copy import pytest from fledge.services.core.scheduler.scheduler import Scheduler, AuditLogger, C...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 9977, 1961, 8264, 62, 33, 43312, 198, 2, 4091, 25, 2638, 1378, 69, 2965, 12, 5151, 13, 961, 83, 704, 420, 82, 13, 952, 14, 198, 2, 9977, 1961, 8264, 62, ...
1.695517
2,565
def marcs_cakewalk(calorie): """Hackerrank Problem: https://www.hackerrank.com/challenges/marcs-cakewalk/problem Marc loves cupcakes, but he also likes to stay fit. Each cupcake has a calorie count, and Marc can walk a distance to expend those calories. If Marc has eaten j cupcakes so far, after eating a c...
[ 4299, 1667, 6359, 62, 30560, 11152, 7, 9948, 19257, 2599, 198, 220, 220, 220, 37227, 32833, 8056, 962, 20647, 25, 3740, 1378, 2503, 13, 31153, 8056, 962, 13, 785, 14, 36747, 34120, 14, 3876, 6359, 12, 30560, 11152, 14, 45573, 628, 220...
2.961765
340
from django.shortcuts import render import requests from bs4 import BeautifulSoup def corona_data(request): "Testaaaa" corona_html = requests.get("https://www.mygov.in/covid-19") soup = BeautifulSoup(corona_html.content, 'html.parser') state_wise_data = soup.find_all('div', class_='views-row') inf...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 628, 198, 4299, 1162, 4450, 62, 7890, 7, 25927, 2599, 198, 220, 220, 220, 366, 14402, 24794, 1, 198, 220, 220, 220, ...
2.465732
642
# Script tests GPD model using UW truth data # Test outputs: # - type of event tested [EQS, EQP, SUS, SUP, THS, THP, SNS, SNP, PXS, PXP] # - phase [P, S, N] Note: N - not detected # - model time offset (t_truth - t_model_pick) import numpy import math import string import datetime import sys import os im...
[ 2, 12327, 5254, 402, 5760, 2746, 1262, 33436, 3872, 1366, 198, 2, 220, 220, 6208, 23862, 25, 198, 2, 220, 220, 220, 220, 532, 2099, 286, 1785, 6789, 685, 36, 48, 50, 11, 36529, 47, 11, 311, 2937, 11, 19549, 11, 2320, 50, 11, 232...
2.606925
491
import argparse import boto3 import datetime import json import os import posixpath import re import shutil import tempfile import uuid from concurrent import futures from multiprocessing import Pool from ultitrackerapi import get_backend, get_logger, get_s3Client, video backend_instance = get_backend() logger = ...
[ 11748, 1822, 29572, 198, 11748, 275, 2069, 18, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 1426, 844, 6978, 198, 11748, 302, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 11748, 334, 27112, 198, 198, ...
3
142
# --- SECTION 1 --- # Import the required libraries from sklearn import datasets, naive_bayes, svm, neighbors from sklearn.ensemble import VotingClassifier from sklearn.metrics import accuracy_score # Load the dataset breast_cancer = datasets.load_breast_cancer() x, y = breast_cancer.data, breast_cancer.target ...
[ 2, 220, 11420, 44513, 352, 11420, 201, 198, 2, 17267, 262, 2672, 12782, 201, 198, 6738, 1341, 35720, 1330, 40522, 11, 24354, 62, 24406, 274, 11, 264, 14761, 11, 12020, 201, 198, 6738, 1341, 35720, 13, 1072, 11306, 1330, 30061, 9487, 7...
2.398971
1,361
# Generated by Django 4.0.3 on 2022-03-23 14:31 import datetime from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 604, 13, 15, 13, 18, 319, 33160, 12, 3070, 12, 1954, 1478, 25, 3132, 198, 198, 11748, 4818, 8079, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.972222
36
# This code is part of Qiskit. # # (C) Copyright IBM 2018, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
[ 2, 770, 2438, 318, 636, 286, 1195, 1984, 270, 13, 198, 2, 198, 2, 357, 34, 8, 15069, 19764, 2864, 11, 12131, 13, 198, 2, 198, 2, 770, 2438, 318, 11971, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 13, 921, 743, 198, 2, 7330...
2.651394
1,004
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import json import mock import pytest from oauthlib.oauth2 import InvalidRequestFatalError from oauthlib.common import Request as OAuthRequest from pyramid import httpexceptions from h._compat import urlparse from h.exceptions import O...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 198, 11748, 15290, 198, 11748, 12972, 9288, 198, 198,...
3.35514
214
#!/usr/bin/python # Copyright 2003 Dave Abrahams # Copyright 2002, 2003, 2004 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) # Test conditional properties. import BoostBuild t = BoostBuild.Tester(...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 15069, 5816, 9935, 16660, 82, 198, 2, 15069, 6244, 11, 5816, 11, 5472, 14840, 1736, 385, 198, 2, 4307, 6169, 739, 262, 19835, 10442, 13789, 11, 10628, 352, 13, 15, 13, 198, 2, 357...
2.772824
471
from setuptools_rust_starter import PythonClass, ExampleClass
[ 6738, 900, 37623, 10141, 62, 11469, 62, 12339, 1330, 11361, 9487, 11, 17934, 9487, 628, 198 ]
4
16
import time from typing import Dict, List, Tuple, Optional from utils.logger_utils import LogManager from utils.str_utils import check_is_json from config import LOG_LEVEL, PROCESS_STATUS_FAIL from utils.time_utils import datetime_str_change_fmt from utils.exception_utils import LoginException, ParseDataException from...
[ 11748, 640, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 309, 29291, 11, 32233, 198, 198, 6738, 3384, 4487, 13, 6404, 1362, 62, 26791, 1330, 5972, 13511, 198, 6738, 3384, 4487, 13, 2536, 62, 26791, 1330, 2198, 62, 271, 62, 17752, ...
3.136612
183
from paddle.vision.transforms import ( ToTensor, RandomHorizontalFlip, RandomResizedCrop, SaturationTransform, Compose, HueTransform, BrightnessTransform, ContrastTransform, RandomCrop, Normalize, RandomRotation ) from paddle.vision.datasets import Cifar100 from paddle.io import DataLoader from paddle.optimizer...
[ 6738, 39517, 13, 10178, 13, 7645, 23914, 1330, 357, 198, 220, 220, 220, 1675, 51, 22854, 11, 14534, 27991, 38342, 7414, 541, 11, 14534, 4965, 1143, 34, 1773, 11, 311, 36921, 41762, 11, 3082, 577, 11, 198, 220, 220, 220, 31788, 41762, ...
2.32291
1,567
""" MIT License Copyright (c) 2020-present phenom4n4n Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, pub...
[ 37811, 198, 36393, 13789, 198, 198, 15269, 357, 66, 8, 12131, 12, 25579, 6566, 296, 19, 77, 19, 77, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 1659, 428, 3788, 290, 3917, ...
3.374214
636
str1= input("enter a string :") l1 ="" for i in str1 [::-1]: l1 = i+l1 print(l1) if str1 == l1: print("string is a palindrome") else : print("string is not a palindrome")
[ 2536, 16, 28, 5128, 7203, 9255, 257, 4731, 1058, 4943, 198, 75, 16, 796, 15931, 198, 1640, 1312, 287, 965, 16, 685, 3712, 12, 16, 5974, 198, 220, 220, 220, 300, 16, 796, 1312, 10, 75, 16, 198, 4798, 7, 75, 16, 8, 198, 361, 965...
2.216867
83
import json import re from string import ascii_uppercase from time import time from urllib.parse import urljoin import scrapy from more_itertools import first from scrapy import Request from product_spider.items import JkProduct, JKPackage from product_spider.utils.functions import strip
[ 11748, 33918, 198, 11748, 302, 198, 6738, 4731, 1330, 355, 979, 72, 62, 7211, 2798, 589, 198, 6738, 640, 1330, 640, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 22179, 198, 198, 11748, 15881, 88, 198, 6738, 517, 62, 270, 861, ...
3.560976
82
import os import sys import random import datetime import gym from gym import spaces import numpy as np from env.IDM import IDM from env.Road import Road from env.Vehicle import Vehicle import math # add sumo/tools into python environment if 'SUMO_HOME' in os.environ: tools = os.path.join(os.environ['SUMO_HOME'], ...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 4738, 198, 11748, 4818, 8079, 198, 11748, 11550, 198, 6738, 11550, 1330, 9029, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 17365, 13, 2389, 44, 1330, 4522, 44, 198, 6738, 17365, 13, 29197, ...
3.414634
164
import boto3 import ipaddress import json import logging import os import requests import uuid logger = logging.getLogger() logger.setLevel(logging.INFO) dynamodb = boto3.resource('dynamodb') table = dynamodb.Table(os.environ['DYNAMODB_TABLE']) client = boto3.client('ssm')
[ 11748, 275, 2069, 18, 198, 11748, 20966, 21975, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 7007, 198, 11748, 334, 27112, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 3419, 198, 6404, 1362, 13, 2617, ...
2.650943
106
#!/usr/bin/python from money import * c = Company("Example Inc") c.add_flow(FixedCost("Initial Cash", -500000)) c.add_flow(FixedCost("Incorporation", 500)) c.add_flow(ConstantCost("Office", 50000)) c.add_flow(PeriodicCost("Subscription", 4000, "2012-01-05", 14)) c.add_flow(DelayedCost("2012-02-01", ConstantCost("Offic...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 6738, 1637, 1330, 1635, 198, 198, 66, 796, 5834, 7203, 16281, 3457, 4943, 198, 66, 13, 2860, 62, 11125, 7, 13715, 13729, 7203, 24243, 16210, 1600, 532, 4059, 830, 4008, 198, 66, 13, 2860, 6...
2.541485
229
#!/usr/bin/env python import os import socket import subprocess import argparse import logging LOGGER = logging.getLogger(__name__) ping.short_name = 'PING' port.short_name = 'PORT'
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 11748, 17802, 198, 11748, 850, 14681, 198, 11748, 1822, 29572, 198, 11748, 18931, 628, 198, 25294, 30373, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628,...
2.921875
64
from openeo.udf import XarrayDataCube
[ 6738, 1280, 68, 78, 13, 463, 69, 1330, 1395, 18747, 6601, 29071, 628 ]
3
13
from PlayerState import * from pathFinder import PathFinder from StateLook4Resources import *
[ 6738, 7853, 9012, 1330, 1635, 198, 6738, 3108, 37, 5540, 1330, 10644, 37, 5540, 198, 198, 6738, 1812, 8567, 19, 33236, 1330, 1635, 198 ]
3.958333
24
# Copyright (c) 2009-2019 The Regents of the University of Michigan # This file is part of the HOOMD-blue project, released under the BSD 3-Clause License. # Maintainer: mphoward import unittest import numpy as np import hoomd from hoomd import md from hoomd import mpcd # unit tests for mpcd slit streaming geometry ...
[ 2, 15069, 357, 66, 8, 3717, 12, 23344, 383, 3310, 658, 286, 262, 2059, 286, 7055, 198, 2, 770, 2393, 318, 636, 286, 262, 40115, 2662, 35, 12, 17585, 1628, 11, 2716, 739, 262, 347, 10305, 513, 12, 2601, 682, 13789, 13, 198, 198, ...
3.015385
130
# Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ 2, 15069, 2211, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
3.651639
244
# -*- coding: utf-8 -*- import io import math import warnings from typing import Optional, Tuple import torch from torch import Tensor from torchaudio._internal import module_utils as _mod_utils import torchaudio __all__ = [ "spectrogram", "griffinlim", "amplitude_to_DB", "DB_to_amplitude", "comp...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 33245, 198, 11748, 10688, 198, 11748, 14601, 198, 6738, 19720, 1330, 32233, 11, 309, 29291, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 309, 22854, 198, 67...
2.289605
15,787
#!/usr/bin/env python3 from __future__ import absolute_import, division, print_function import curses import sys from collections import deque from datetime import datetime import numpy as np import rospy from diagnostic_msgs.msg import DiagnosticArray, DiagnosticStatus from geometry_msgs.msg import PoseStamped from ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 43878, 198, 11748, 25064, 198, 6738, 17268, 1330, 390, 4188, 198, 6738, 4818, 8079, 1...
2.841216
296
import argparse import os import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import pandas as pd from pathlib import Path def main(results: [ResultParam], plot_dir: Path): """generates box plots comparing two or more result sets for all labels Args: results ([ResultParam])...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, 198, 6...
2.432258
930
""" Default values : DO NOT CHANGE !!!""" LOG_FORMAT = "%(asctime)s: %(levelname)s: %(message)s" DATE_FORMAT = "%Y-%m-%d %H:%M:%S" MAXITERATIONS = 100 LIFE_PARAMETERS = {"theta_i":30,"theta_fl":36,"theta_gfl":28.6, "R":4.87,"n":1,"tau":3.5,"m":1,"A":-13.391, "B":6972.15,"num_...
[ 198, 37811, 15161, 3815, 1058, 8410, 5626, 5870, 27746, 37867, 2474, 15931, 198, 198, 25294, 62, 21389, 1404, 796, 36521, 7, 292, 310, 524, 8, 82, 25, 220, 4064, 7, 5715, 3672, 8, 82, 25, 220, 4064, 7, 20500, 8, 82, 1, 198, 35, ...
1.692967
2,332
try: import importlib.resources as pkg_resources except ImportError: # Try backported to PY<37 `importlib_resources`. import importlib_resources as pkg_resources from . import images from gym import Env, spaces from time import time import numpy as np from copy import copy import colorsys import pygame f...
[ 28311, 25, 198, 220, 220, 220, 1330, 1330, 8019, 13, 37540, 355, 279, 10025, 62, 37540, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 1303, 9993, 736, 9213, 284, 350, 56, 27, 2718, 4600, 11748, 8019, 62, 37540, 44646, 198, 220, ...
3.446602
103
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from gaiatest import GaiaTestCase from gaiatest.apps.lockscreen.app import LockScreen
[ 2, 770, 8090, 6127, 5178, 318, 2426, 284, 262, 2846, 286, 262, 29258, 5094, 198, 2, 13789, 11, 410, 13, 362, 13, 15, 13, 1002, 257, 4866, 286, 262, 4904, 43, 373, 407, 9387, 351, 428, 198, 2, 2393, 11, 921, 460, 7330, 530, 379, ...
3.298851
87
import torch import torch.nn as nn import torch.nn.functional as F
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376 ]
3.473684
19
import tables import numpy as np import matplotlib.pyplot as plt # Reading the file. fileh = tables.open_file('development.hdf5', mode='r') # Dimentionality of the data structure. print(fileh.root.utterance_test.shape) print(fileh.root.utterance_train.shape) print(fileh.root.label_train.shape) print(fileh.root.label_...
[ 11748, 8893, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 2, 11725, 262, 2393, 13, 198, 7753, 71, 796, 8893, 13, 9654, 62, 7753, 10786, 31267, 13, 71, 7568, 20, 3256, 42...
2.854701
117