content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from enum import Enum class SupportedProtocols(Enum): """Contains a list of all supported protocols (currently only http and https Value: http : "http" https : "https" """ http = "http" https = "https" class Methods(Enum): """Contains a list of all supported HTTP Verbs ""...
[ 6738, 33829, 1330, 2039, 388, 628, 198, 4871, 36848, 19703, 4668, 82, 7, 4834, 388, 2599, 198, 220, 220, 220, 37227, 4264, 1299, 257, 1351, 286, 477, 4855, 19565, 357, 41745, 691, 2638, 290, 3740, 198, 220, 220, 220, 11052, 25, 198, ...
2.487952
166
from conet.datasets.bengali_dataset import DATA_DIR from sklearn.model_selection import StratifiedKFold
[ 6738, 369, 316, 13, 19608, 292, 1039, 13, 65, 1516, 7344, 62, 19608, 292, 316, 1330, 42865, 62, 34720, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 29186, 1431, 42, 37, 727, 198 ]
3.058824
34
from django.http import JsonResponse import stripe # Create your views here.
[ 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 198, 198, 11748, 39858, 198, 198, 2, 13610, 534, 5009, 994, 13 ]
3.714286
21
# Copyright (c) 2018-2019 Robin Jarry # SPDX-License-Identifier: MIT import os import shlex from typing import List import cffi HERE = os.path.dirname(__file__) BUILDER = cffi.FFI() with open(os.path.join(HERE, "cdefs.h")) as f: BUILDER.cdef(f.read()) HEADERS = search_paths("LIBYANG_HEADERS") LIBRARIES = se...
[ 2, 15069, 357, 66, 8, 2864, 12, 23344, 12325, 449, 6532, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 198, 11748, 28686, 198, 11748, 427, 2588, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, 269, 487, 72, 628, 198,...
2.129717
424
import os import json import urllib import requests import datetime def calc_transportation(body): """ 移動の予定のみreturn. """ margin = 5*60 #margin before next event start ret = [] for i in range(len(body)): indict = {} if i==0: dur = get_time(os.environ["HO...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 2956, 297, 571, 198, 11748, 7007, 198, 198, 11748, 4818, 8079, 628, 198, 198, 4299, 42302, 62, 7645, 10189, 7, 2618, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 13328, 100, 119, 47...
2.006522
460
# we need to import this in order to be able to import the simulator # it does not have to do anything other than be imported. from util import path from examples.minimalExample.SimulatorCrownstone import SimulatorCrownstone from simulator import SimulationGui, JsonFileStore, Simulator config = JsonFileStore('./minim...
[ 2, 356, 761, 284, 1330, 428, 287, 1502, 284, 307, 1498, 284, 1330, 262, 35375, 198, 2, 340, 857, 407, 423, 284, 466, 1997, 584, 621, 307, 17392, 13, 198, 6738, 7736, 1330, 3108, 198, 198, 6738, 6096, 13, 1084, 4402, 16281, 13, 889...
3.064935
308
def locate_associated_files(in_file: str): """ Locates associated json (and possibly bvec & bval) files. Parameters ---------- in_file : str Input file. Returns ------- Tuple[str, str, str] Tuple of associated json (and possibly bvec & bval) files. """ from dmri...
[ 4299, 17276, 62, 32852, 62, 16624, 7, 259, 62, 7753, 25, 965, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 15181, 689, 3917, 33918, 357, 392, 5457, 275, 35138, 1222, 275, 2100, 8, 3696, 13, 628, 220, 220, 220, 40117, 198, ...
2.530249
281
from multipledispatch import dispatch
[ 6738, 5021, 10137, 8802, 963, 1330, 27965, 198 ]
4.75
8
n1 = int(input("Informe um número: ")) n2 = int(input("Informe um número maior que o anterior: ")) for x in range(n1, n2 + 1): cont=0 for y in range(n1, x + 1): if x%y==0: cont+=1 if cont<=2: print("{} ".format(y), end="")
[ 77, 16, 796, 493, 7, 15414, 7203, 818, 687, 68, 23781, 299, 21356, 647, 78, 25, 366, 4008, 198, 77, 17, 796, 493, 7, 15414, 7203, 818, 687, 68, 23781, 299, 21356, 647, 78, 17266, 1504, 8358, 267, 32700, 25, 366, 4008, 198, 198, ...
1.783439
157
#Libraries import pickle # To ignore warnings import warnings import numpy as np import pandas as pd import re as re from sklearn.tree import DecisionTreeClassifier warnings.filterwarnings("ignore") ################################################################################ ### Data Ingestion & Splitting ######...
[ 2, 43, 11127, 198, 11748, 2298, 293, 198, 2, 1675, 8856, 14601, 198, 11748, 14601, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 302, 355, 302, 198, 6738, 1341, 35720, 13, 21048, 1330, 2642...
2.748213
1,819
from SloppyCell.ReactionNetworks import * # This file was distributed with Ingenue f = file('spg1_4cell.net') lines = f.readlines() for ii, line in enumerate(lines): if line.startswith('&width'): width = int(line.split()[1]) elif line.startswith('&height'): height = int(line.split()[1]) e...
[ 6738, 3454, 26696, 28780, 13, 3041, 2673, 7934, 5225, 1330, 1635, 198, 198, 2, 770, 2393, 373, 9387, 351, 554, 5235, 518, 198, 69, 796, 2393, 10786, 2777, 70, 16, 62, 19, 3846, 13, 3262, 11537, 198, 6615, 796, 277, 13, 961, 6615, ...
1.769681
5,983
''' read or write text files in python ''' # %% # read a text file # open the file for reading with open("dumps/test.txt", mode='r') as f: # read all the file content fStr = f.read() # please note that once again calling f.read() will return empty string print(fStr) # this will print the whole fi...
[ 7061, 6, 198, 961, 393, 3551, 2420, 3696, 287, 21015, 198, 7061, 6, 198, 198, 2, 43313, 198, 2, 1100, 257, 2420, 2393, 198, 2, 1280, 262, 2393, 329, 3555, 198, 4480, 1280, 7203, 67, 8142, 14, 9288, 13, 14116, 1600, 4235, 11639, 81...
2.836299
281
from django.contrib.auth.backends import BaseBackend, UserModel, ModelBackend from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission from django.db.models import Exists, OuterRef, Q import rest_framework_simplejwt.serializers from pprint import pprint class MyModelBackend(Mod...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 1891, 2412, 1330, 7308, 7282, 437, 11, 11787, 17633, 11, 9104, 7282, 437, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13...
3.174603
126
# pylint: disable=missing-docstring import datetime from core.models import instruments from datasource.models import candles
[ 2, 279, 2645, 600, 25, 15560, 28, 45688, 12, 15390, 8841, 198, 11748, 4818, 8079, 198, 198, 6738, 4755, 13, 27530, 1330, 12834, 198, 6738, 19395, 1668, 13, 27530, 1330, 32268, 628 ]
4
32
from __future__ import annotations from ..ocr import ocrhandle, ocr_rectify from ..utils import segment from ..utils.device import Device from ..utils.log import logger from ..utils.recognize import Recognizer, Scene, RecognizeError from ..utils.solver import BaseSolver from ..data import recruit_tag, recruit_agent ...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 11485, 1696, 1330, 267, 6098, 28144, 11, 267, 6098, 62, 2554, 1958, 198, 6738, 11485, 26791, 1330, 10618, 198, 6738, 11485, 26791, 13, 25202, 1330, 16232, 198, 6738, 11485, 26791, 13, ...
1.609197
6,415
# coding=utf-8 # Author: Rion B Correia # Date: April 17, 2020 # # Description: Demographics # # import configparser import numpy as np import pandas as pd import sqlalchemy from sqlalchemy import event from utils import add_own_encoders, ensurePathExists, map_age_to_age_group import matplotlib as mpl mpl.rcParams['mat...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 6434, 25, 371, 295, 347, 2744, 260, 544, 198, 2, 7536, 25, 3035, 1596, 11, 12131, 198, 2, 198, 2, 12489, 25, 1897, 24188, 198, 2, 198, 2, 198, 11748, 4566, 48610, 198, 11748, 299, 32152, 355,...
2.100641
3,746
import logging import os import aiobotocore from ..helpers.env import getenv BOT_IP = getenv('BOT_IP') SSH_KEY_NAME = getenv('SSH_KEY_NAME') _template = get_template() _session = aiobotocore.get_session()
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 257, 72, 672, 313, 420, 382, 198, 6738, 11485, 16794, 364, 13, 24330, 1330, 651, 24330, 628, 198, 33, 2394, 62, 4061, 796, 651, 24330, 10786, 33, 2394, 62, 4061, 11537, 198, 5432, 39, 62, ...
2.559524
84
# Copyright (C) 2018 Seoul National University # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
[ 2, 15069, 357, 34, 8, 2864, 22372, 2351, 2059, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198,...
2.659763
1,014
""" @author: tenghehan 将 video 形式的视频数据转化成 image sequence 形式的数据. """ import cv2 import os import argparse from tqdm import tqdm from utils.log import get_logger if __name__ == "__main__": args = parse_args() with VideoFramer(args, video_path=args.VIDEO_PATH) as vdo_frm: vdo_frm.run()
[ 37811, 198, 31, 9800, 25, 256, 1516, 258, 7637, 198, 198, 49546, 2008, 10263, 121, 95, 28156, 237, 21410, 164, 100, 228, 165, 95, 239, 46763, 108, 162, 235, 106, 164, 121, 105, 44293, 244, 22755, 238, 2939, 8379, 10263, 121, 95, 281...
1.993421
152
""" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER Copyright (c) 2015 Juniper Networks, Inc. All rights reserved. Use is subject to license terms. 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 th...
[ 37811, 198, 18227, 5626, 8355, 5781, 6375, 22657, 46, 6089, 27975, 38162, 9947, 5626, 34444, 6375, 12680, 45811, 39837, 1137, 198, 198, 15269, 357, 66, 8, 1853, 7653, 9346, 27862, 11, 3457, 13, 198, 3237, 2489, 10395, 13, 198, 198, 1104...
2.948571
700
"""Write, Read and Plot 1D input files for swak4foam ========================================================================== This module allows to read OpenFoam output of one dimensional computation and then write, plot and read input files for Boundary and Initial Conditions imposition in 3D computation (via swak4f...
[ 37811, 16594, 11, 4149, 290, 28114, 352, 35, 5128, 3696, 329, 1509, 461, 19, 6513, 321, 198, 23926, 2559, 855, 198, 1212, 8265, 3578, 284, 1100, 4946, 37, 78, 321, 5072, 286, 530, 38517, 29964, 198, 392, 788, 3551, 11, 7110, 290, 11...
1.943524
3,984
import argparse import logging import os import queue import sys import confuse from energy_usage.influx_client import InfluxClient from energy_usage.mqtt_client import MqttClient from energy_usage.sep import parse_sep, usage_to_datapoints if __name__ == '__main__': main()
[ 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 16834, 198, 11748, 25064, 198, 198, 11748, 27531, 198, 198, 6738, 2568, 62, 26060, 13, 10745, 22564, 62, 16366, 1330, 4806, 22564, 11792, 198, 6738, 2568, 62, 26060, 13...
3.053191
94
import builtins import sys class Didatic_test: """ A class to configure and run simple didatic tests Didatic_test(Callable=None, args={}, test_name=None, keyboard_inputs=(), \ expected_output=None, expected_prints="", verbose=None, \ run_output_test=None, run_prints_test=None, ) ...
[ 11748, 3170, 1040, 198, 11748, 25064, 628, 198, 4871, 7731, 1512, 62, 9288, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 317, 1398, 284, 17425, 290, 1057, 2829, 750, 1512, 5254, 628, 220, 220, 220, 7731, 1512, 62, 9288, 7, 141...
2.252578
6,109
import dgl import torch.nn.functional import typing as _typing from dgl.nn.pytorch.conv import GINConv from .. import base_encoder, encoder_registry from ... import _utils class ApplyNodeFunc(torch.nn.Module): """Update the node feature hv with MLP, BN and ReLU.""" class MLP(torch.nn.Module): """MLP with li...
[ 11748, 288, 4743, 198, 11748, 28034, 13, 20471, 13, 45124, 198, 11748, 19720, 355, 4808, 774, 13886, 198, 6738, 288, 4743, 13, 20471, 13, 9078, 13165, 354, 13, 42946, 1330, 402, 1268, 3103, 85, 198, 6738, 11485, 1330, 2779, 62, 12685, ...
2.276647
835
# # Copyright 2004,2005 Dave Cridland <dave@cridland.net> # # This file forms part of the Infotrope Python Library. # # The Infotrope Python Library is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either versi...
[ 2, 198, 2, 15069, 5472, 11, 14315, 9935, 3864, 312, 1044, 1279, 67, 1015, 31, 66, 6058, 1044, 13, 3262, 29, 198, 2, 198, 2, 770, 2393, 5107, 636, 286, 262, 4806, 313, 305, 431, 11361, 10074, 13, 198, 2, 198, 2, 383, 4806, 313, ...
3.460208
289
#%% import os, sys, glob from collections import defaultdict from pygromos.gromos.gromosPP import GromosPP from pygromos.gromos.gromosXX import GromosXX from pygromos.files import imd import restraintmaker #CHANGE HERE gromos_bin_path = "/home/bschroed/Documents/code/gromosPP/installed/bin" restraintmaker_path = os.p...
[ 2, 16626, 198, 11748, 28686, 11, 25064, 11, 15095, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 12972, 70, 398, 418, 13, 70, 398, 418, 13, 70, 398, 418, 10246, 1330, 402, 398, 418, 10246, 198, 6738, 12972, 70, 398, 418, 13, 70, ...
2.22063
1,047
#!/usr/bin/env python """ Load football network in GML format and compute some network statistcs. Shows how to download GML graph in a zipped file, unpack it, and load into a NetworkX graph. Requires Internet connection to download the URL http://www-personal.umich.edu/~mejn/netdata/football.zip """ # Author: Aric H...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 8912, 4346, 3127, 287, 402, 5805, 5794, 290, 24061, 617, 3127, 10118, 6359, 13, 198, 198, 2484, 1666, 703, 284, 4321, 402, 5805, 4823, 287, 257, 1976, 3949, 2393, 11, 555, ...
2.612766
470
# -*- coding: utf-8 -*- import scrapy import json from locations.items import GeojsonPointItem CATEGORY_MAPPING = { '1': 'Donation Site', '2': 'Outlet', '3': 'Retail Store', '4': 'Job & Career Support', '5': 'Headquarters' }
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 15881, 88, 198, 11748, 33918, 198, 6738, 7064, 13, 23814, 1330, 2269, 13210, 1559, 12727, 7449, 198, 198, 34, 6158, 38, 15513, 62, 44, 24805, 2751, 796, 1391, 198...
2.352381
105
# coding=utf-8 from __future__ import unicode_literals import sys from IPython import start_ipython import argparse from apps.core.models.client import Client import apps.conf # flake8: noqa from tornado.options import options import subprocess managers = [ShellManage, DBShellManage, # flake8: noqa ...
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 25064, 198, 6738, 6101, 7535, 1330, 923, 62, 541, 7535, 198, 11748, 1822, 29572, 198, 6738, 6725, 13, 7295, 13, 27530, 13, 16366...
2.798387
124
from direct.directnotify.DirectNotifyGlobal import directNotify from direct.fsm.StatePush import FunctionCall from direct.showbase.PythonUtil import formatTimeExact, normalDistrib from direct.task import Task
[ 6738, 1277, 13, 12942, 1662, 1958, 13, 13470, 3673, 1958, 22289, 1330, 1277, 3673, 1958, 198, 6738, 1277, 13, 69, 5796, 13, 9012, 49222, 1330, 15553, 14134, 198, 6738, 1277, 13, 12860, 8692, 13, 37906, 18274, 346, 1330, 5794, 7575, 3109...
3.87037
54
import logging from core.model.graph import Graph from core.model.lines import LinePool, Line from core.model.ptn import Link, Stop from common.model.net import Net from common.util.constants import LINE_SECTION_HEADER, LINE_ROUTE_ITEMS_SECTION_HEADER, \ LINE_ROUTE_ITEMS_DIRECTION_HEADER, LINE_ROUTE_ITEMS_LINE_NAM...
[ 11748, 18931, 198, 198, 6738, 4755, 13, 19849, 13, 34960, 1330, 29681, 198, 6738, 4755, 13, 19849, 13, 6615, 1330, 6910, 27201, 11, 6910, 198, 6738, 4755, 13, 19849, 13, 457, 77, 1330, 7502, 11, 13707, 198, 6738, 2219, 13, 19849, 13, ...
2.756944
144
"""Implementation of the teleport command.""" from mcipc.rcon.client import Client from mcipc.rcon.types import Anchor, Rotation, Vec3 __all__ = ['teleport'] def teleport(self: Client, *, destination: str = None, location: Vec3 = None, targets: str = None, rotation: Rotation = None, facin...
[ 37811, 3546, 32851, 286, 262, 32713, 3141, 526, 15931, 198, 198, 6738, 36650, 541, 66, 13, 81, 1102, 13, 16366, 1330, 20985, 198, 6738, 36650, 541, 66, 13, 81, 1102, 13, 19199, 1330, 29253, 273, 11, 371, 14221, 11, 38692, 18, 628, 1...
2.493458
535
import re from typing import Dict, Tuple, NewType FUNCTION_REGEX = r'^def [\w_]*' BEGIN_INSERT_REGEX = r'# begin insert ' END_INSERT_REGEX = r'# end insert' SpecObject = NewType('SpecObjects', Tuple[Dict[str, str], Dict[str, str], Dict[str, str], Dict[str, str]]) def get_spec(file_name: str) -> SpecObject: """...
[ 11748, 302, 198, 6738, 19720, 1330, 360, 713, 11, 309, 29291, 11, 968, 6030, 628, 198, 42296, 4177, 2849, 62, 31553, 6369, 796, 374, 6, 61, 4299, 685, 59, 86, 62, 60, 9, 6, 198, 33, 43312, 62, 20913, 17395, 62, 31553, 6369, 796, ...
2.010934
2,012
# proxy module from __future__ import absolute_import from envisage.ui.action.action_set import *
[ 2, 15741, 8265, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 45633, 496, 13, 9019, 13, 2673, 13, 2673, 62, 2617, 1330, 1635, 198 ]
3.62963
27
import warnings from typing import Optional, Union, Callable, List from typeguard import typechecked import tensorflow as tf from tensorflow_addons.utils.types import FloatTensorLike from tensorflow_addons.optimizers.utils import is_variable_matched_by_regexes @tf.keras.utils.register_keras_serializable(package="Ad...
[ 11748, 14601, 198, 198, 6738, 19720, 1330, 32233, 11, 4479, 11, 4889, 540, 11, 7343, 198, 6738, 2099, 14864, 1330, 2099, 26752, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 62, 39996, 13, 26791, 13, 1919...
2.718987
395
for i in range(1,26): print('{0:5d}{1:5d}{2:6d}{3:6d}{4:6d}{5:6d}{6:6d}{7:6d}'.format(i,i*i,i+25,(i+25)*(i+25),i+50,(i+50)*(i+50),i+75,(i+75)*(i+75))) # the characters in the curly brackets {} are placeholders for the data. # the character before the colon indicates which of the data pieces should go where. # the ...
[ 1640, 1312, 287, 2837, 7, 16, 11, 2075, 2599, 198, 220, 220, 220, 3601, 10786, 90, 15, 25, 20, 67, 18477, 16, 25, 20, 67, 18477, 17, 25, 21, 67, 18477, 18, 25, 21, 67, 18477, 19, 25, 21, 67, 18477, 20, 25, 21, 67, 18477, 21,...
2.846995
183
import numpy as np from multiprocessing import Pool import glob import os import pandas as pd import tensorflow as tf # MAP # restrict on @K is in ap_at_n # data load generator
[ 11748, 299, 32152, 355, 45941, 198, 6738, 18540, 305, 919, 278, 1330, 19850, 198, 11748, 15095, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 11192, 273, 11125, 355, 48700, 628, 198, 2, 34645, 198, 2, 4239, 319, ...
3.192982
57
"""Python Script Template.""" from .model_based import MBMPOAgent, MPCAgent
[ 37811, 37906, 12327, 37350, 526, 15931, 198, 6738, 764, 19849, 62, 3106, 1330, 10771, 7378, 23621, 6783, 11, 4904, 8141, 6783, 198 ]
3.454545
22
import argparse import os import re from pathlib import Path import numpy as np import pandas as pd from cascade.dismod.constants import DensityEnum, IntegrandEnum from cascade.dismod.db.wrapper import get_engine from cascade.input_data.configuration.id_map import make_integrand_map MEASURES_ACCEPTABLE_TO_ELMO = { ...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 302, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 44847, 13, 67, 1042, 375, 13, 9979, 1187, 1330, ...
2.047847
1,254
# authors: # connor archard # geoff keating # # updated: # 12-15-2016 # # brief: # main file for llana operation if __name__ == "__main__": print "Hello world"
[ 2, 7035, 25, 198, 2, 220, 369, 13099, 3934, 446, 198, 2, 220, 4903, 2364, 885, 803, 198, 2, 198, 2, 6153, 25, 198, 2, 220, 1105, 12, 1314, 12, 5304, 198, 2, 198, 2, 4506, 25, 198, 2, 220, 1388, 2393, 329, 32660, 2271, 4905, ...
2.522388
67
# coding: utf-8 from fal.task import Task import numpy as np from PIL import Image from matplotlib.pyplot import imshow from matplotlib.pyplot import hist import matplotlib.pyplot as plt if __name__ == '__main__': # Let'c create compression task task = Task() # We define in 'data flow' that we wish t...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 24215, 13, 35943, 1330, 15941, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 2603, 29487, 8019, 13, 9078, 29487, 1330, 545, 12860, 198, 6738, 2603, 294...
2.884477
554
# coding: utf8 import torch.utils.model_zoo as model_zoo from torchvision.models.resnet import BasicBlock from torch import nn import math import timm import urllib from PIL import Image from timm.data import resolve_data_config from timm.data.transforms_factory import create_transform import torch.nn.functional as F ...
[ 2, 19617, 25, 3384, 69, 23, 198, 198, 11748, 28034, 13, 26791, 13, 19849, 62, 89, 2238, 355, 2746, 62, 89, 2238, 198, 6738, 28034, 10178, 13, 27530, 13, 411, 3262, 1330, 14392, 12235, 198, 6738, 28034, 1330, 299, 77, 198, 11748, 106...
2.539363
597
import csv import glob import json import os import re import copy from dateutil.parser import parse from datetime import datetime, timezone # `or '.'` because when you're in the same directory as this code # `ValueError: no path specified` gets thrown by `relpath` with empty input src_dir = os.path.relpath(os.path.d...
[ 11748, 269, 21370, 198, 11748, 15095, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 4866, 198, 198, 6738, 3128, 22602, 13, 48610, 1330, 21136, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 640, 11340, 198, 198, 2, 46...
2.338834
1,939
from django.conf import settings from django.contrib import admin from django.contrib.auth.decorators import login_required from django.contrib.flatpages import views as flatpage_views from django.http import HttpResponse from django.urls import include, path, re_path from edd.branding.views import favicon as favicon_...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 42625, 14208, 13, 3642, 822, 13,...
2.791377
719
import os from enum import Enum from typing import Optional __all__ = [ "ColorDepth", ] class ColorDepth(str, Enum): """ Possible color depth values for the output. """ value: str #: One color only. DEPTH_1_BIT = "DEPTH_1_BIT" #: ANSI Colors. DEPTH_4_BIT = "DEPTH_4_BIT" #:...
[ 11748, 28686, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 19720, 1330, 32233, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 10258, 48791, 1600, 198, 60, 628, 198, 4871, 5315, 48791, 7, 2536, 11, 2039, 388, 2599, 198, ...
2.270049
611
"""Utilities ============ .. autoclass:: SetOfVariables :members: :private-members: .. autoclass:: SetOfSpectra :members: :private-members: .. autoclass:: StackOfSetOfVariables :members: :private-members: """ import numpy as np from spectratmo.phys_const import g, Gamma_dah class SetOfVariable...
[ 37811, 18274, 2410, 198, 25609, 198, 198, 492, 1960, 420, 31172, 3712, 5345, 5189, 23907, 2977, 198, 220, 220, 1058, 30814, 25, 198, 220, 220, 1058, 19734, 12, 30814, 25, 198, 198, 492, 1960, 420, 31172, 3712, 5345, 5189, 49738, 430, ...
2.707317
205
# -*- coding: utf-8 -*- import os import telebot import config import random import sys import time import psycopg2 from telebot import types # Config vars token = os.environ['TELEGRAM_TOKEN'] DATABASE_URL=os.environ['DATABASE_URL'] connect = psycopg2.connect(DATABASE_URL, sslmode='require') cursor = connect....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 11748, 5735, 13645, 198, 11748, 4566, 198, 11748, 4738, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 17331, 22163, 70, 17, 198, 6738, 5735, 13645, 13...
2.450331
302
from .speech import Speech
[ 6738, 764, 45862, 1330, 24709 ]
5.2
5
import os import logging from .insilico_filter import InSilicoFilter from .csq_filter import CsqFilter lof_csq = {'frameshift_variant', 'stop_gained', 'splice_acceptor_variant', 'splice_donor_variant'} class VepFilter(CsqFilter): '''An object that filters VCF records based on annotated VEP data.''' ...
[ 11748, 28686, 198, 11748, 18931, 198, 6738, 764, 1040, 346, 3713, 62, 24455, 1330, 554, 15086, 3713, 22417, 198, 6738, 764, 6359, 80, 62, 24455, 1330, 327, 31166, 22417, 198, 198, 75, 1659, 62, 6359, 80, 796, 1391, 6, 19298, 5069, 213...
1.853509
7,195
import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( '.molecule/ansible_inventory').get_hosts('all')
[ 11748, 1332, 10745, 430, 13, 26791, 13, 504, 856, 62, 16737, 198, 198, 9288, 10745, 430, 62, 4774, 82, 796, 1332, 10745, 430, 13, 26791, 13, 504, 856, 62, 16737, 13, 2025, 82, 856, 49493, 7, 198, 220, 220, 220, 45302, 76, 2305, 23...
2.689655
58
""" Isotropic Gaussian blobs """ from collections import OrderedDict import logging import numpy as np from abc import ABCMeta, abstractmethod from ..utils.errors import ProgressiveError, ProgressiveStopIteration from progressivis import ProgressiveError, SlotDescriptor from ..table.module import TableModule from ..t...
[ 37811, 198, 3792, 46084, 12822, 31562, 698, 8158, 198, 37811, 198, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 18931, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 198, 6...
3.397727
264
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # # import cv2
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 42...
3.637931
58
#!/usr/bin/env python from .statement import Statement from ..expr.nameexpr import NameExpr from ..expr.literalexpr import LiteralExpr from ..type.type import Type from . import _import
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 764, 26090, 1330, 21983, 198, 6738, 11485, 31937, 13, 3672, 31937, 1330, 6530, 3109, 1050, 198, 6738, 11485, 31937, 13, 17201, 1000, 87, 1050, 1330, 25659, 1691, 3109, 1050, 1...
3.2
60
#!/usr/bin/env python import argparse import os import cv2 import math import numpy as np from tqdm import tqdm from sklearn.model_selection import KFold from sklearn import metrics from scipy.optimize import brentq from scipy import interpolate from sklearn.metrics import roc_curve, auc import torch import torch.nn ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 269, 85, 17, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, ...
2.343269
1,040
# Copyright 2020 Adap GmbH. 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 ag...
[ 2, 15069, 12131, 1215, 499, 402, 2022, 39, 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, 35...
2.462264
3,286
# # Copyright 2009-2013 by The Regents of the University of California # 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 from # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
[ 2, 198, 2, 15069, 3717, 12, 6390, 416, 383, 3310, 658, 286, 262, 2059, 286, 3442, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846...
3.28739
341
# -*- encoding:utf-8 -*- import pandas as pd import numpy as np from datetime import datetime dire = '../../data/' start = datetime.now() orderHistory_train = pd.read_csv(dire + 'train/orderHistory_train.csv', encoding='utf-8') orderFuture_train = pd.read_csv(dire + 'train/orderFuture_train3.csv', encoding='utf-8') u...
[ 2, 532, 9, 12, 21004, 25, 40477, 12, 23, 532, 9, 12, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 4818, 8079, 1330, 4818, 8079, 628, 198, 67, 557, 796, 705, 40720, 40720, 7890, 14, 6, 198, ...
2.354183
2,606
from abc import ABC, abstractmethod from tqdm import tqdm, tqdm_notebook from ..processors import Processor class BaseAgent(ABC): """Abstract Agentclass Parameters ---------- action_spec: dict Have to define 'type' and 'shape' state_spec: dict, optional Have to define 'type' an...
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 11, 256, 80, 36020, 62, 11295, 2070, 198, 198, 6738, 11485, 14681, 669, 1330, 32893, 628, 198, 4871, 7308, 36772, 7, 24694, 2599, 198, ...
2.720588
204
from datetime import datetime,timedelta current:datetime = None
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 16514, 276, 12514, 198, 198, 14421, 25, 19608, 8079, 796, 6045 ]
3.555556
18
# -*- coding: utf-8 -*- """ fysql.databases ~~~~~~~~~~~~~~~ :copyright: (c) 2016 by Gasquez Florian :license: MIT, see LICENSE for more details. """ from __future__ import unicode_literals from collections import OrderedDict from warnings import filterwarnings import mysql.connector as mysql_connector from .excepti...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 197, 69, 893, 13976, 13, 19608, 18826, 198, 197, 15116, 8728, 4907, 93, 198, 197, 25, 22163, 4766, 25, 357, 66, 8, 1584, 416, 14345, 22281, 4432, 666, 198,...
3.295082
122
"""Fixtures to testing Opencart login page""" import os import sys import pytest from selenium import webdriver as WD from Selenium.Opencart_windows_operations.models.page_objects.page_objects import LoginPage, \ ProductPage, ProductsPage, ProductManager, DownloadPage, DownloadManager, CustomMenuDesignPage, Custom...
[ 37811, 37, 25506, 284, 4856, 4946, 26674, 17594, 2443, 37811, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 12972, 9288, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 355, 48963, 198, 198, 6738, 15300, 47477, 13, 11505, 26674, 62, 2...
2.799931
2,914
TRUE = 1 # ACK, YES FALSE = 0 # NAK, NO class i2c (object): # for polymorphism ''' i2c class hierarchy ------------------- i2c \ aardvark_i2c / (aardv.py) aardvark ''' def choose_master (rpt=FALSE): ''' TO CONSIDER FOLLOWING SCENAR...
[ 198, 5446, 8924, 220, 796, 352, 1303, 7125, 42, 11, 21560, 198, 37, 23719, 796, 657, 1303, 399, 10206, 11, 8005, 198, 198, 4871, 1312, 17, 66, 357, 15252, 2599, 1303, 329, 34196, 1042, 198, 220, 220, 220, 705, 7061, 198, 220, 220, ...
1.893543
573
# -*- coding: utf-8 -*- """ Created on Tue Jun 4 16:35:53 2019 @author: technosap """ import ctypes import time import math from modular_client import ModularClient # for nozzle control if __name__ == "__main__": main()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 7653, 220, 604, 1467, 25, 2327, 25, 4310, 13130, 198, 198, 31, 9800, 25, 1579, 418, 499, 198, 37811, 198, 198, 11748, 269, 19199, 198, 1...
2.804878
82
"""Create CSVs from all tables on a Wikipedia article.""" import csv import os from bs4 import BeautifulSoup import requests from pprint import pprint def scrape(url, output_name): """Create CSVs from all tables in a Wikipedia article. ARGS: url (str): The full URL of the Wikipedia article to scrape...
[ 37811, 16447, 9429, 23266, 422, 477, 8893, 319, 257, 15312, 2708, 526, 15931, 198, 198, 11748, 269, 21370, 198, 11748, 28686, 198, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 7007, 198, 6738, 279, 4798, 1330, 279, 4798, ...
2.285354
2,376
import time import socket import curses import netaddr import threading import collections from terminaltables import SingleTable import evillimiter.networking.utils as netutils from .menu import CommandMenu from evillimiter.networking.utils import BitRate from evillimiter.console.io import IO from evillim...
[ 11748, 640, 201, 198, 11748, 17802, 201, 198, 11748, 43878, 201, 198, 11748, 2010, 29851, 201, 198, 11748, 4704, 278, 201, 198, 11748, 17268, 201, 198, 6738, 5651, 2501, 2977, 1330, 14206, 10962, 201, 198, 201, 198, 11748, 819, 359, 320...
3.372727
220
""" A helper module to assist with gen:call-style message parsing and replying. A generic incoming message looks like ``{$gen_call, {From, Ref}, Message}``. """ from Pyrlang import Term class GenBase: """ Base class for Gen messages, do not use directly. See ``GenIncomingMessage`` and ``GenIncomingCa...
[ 37811, 317, 31904, 8265, 284, 3342, 351, 2429, 25, 13345, 12, 7635, 3275, 32096, 290, 1128, 3157, 13, 198, 220, 220, 220, 317, 14276, 15619, 3275, 3073, 588, 7559, 90, 3, 5235, 62, 13345, 11, 1391, 4863, 11, 6524, 5512, 16000, 92, 1...
2.353896
1,848
r""" Relative Interiors of Polyhedra and Cones """ # **************************************************************************** # Copyright (C) 2021 Matthias Koeppe # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # ...
[ 81, 37811, 198, 6892, 876, 4225, 12706, 286, 12280, 704, 430, 290, 1482, 274, 198, 37811, 198, 198, 2, 41906, 17174, 46068, 198, 2, 220, 220, 220, 220, 220, 220, 15069, 357, 34, 8, 33448, 45524, 4448, 509, 2577, 27768, 198, 2, 198, ...
2.146271
6,946
import ipaddress import re from lennoxs30api.s30exception import EC_AUTHENTICATE, EC_LOGIN, S30Exception import voluptuous as vol from . import Manager from .const import ( CONF_ALLERGEN_DEFENDER_SWITCH, CONF_APP_ID, CONF_CLOUD_CONNECTION, CONF_CREATE_INVERTER_POWER, CONF_CREATE_SENSORS, CONF_F...
[ 11748, 20966, 21975, 198, 11748, 302, 198, 6738, 300, 1697, 1140, 82, 1270, 15042, 13, 82, 1270, 1069, 4516, 1330, 13182, 62, 32, 24318, 3525, 2149, 6158, 11, 13182, 62, 25294, 1268, 11, 311, 1270, 16922, 198, 198, 11748, 2322, 37623, ...
2.093389
3,116
# -*- coding: utf-8 -*- """ Created on Fri Sep 25 14:51:38 2020 @author: haukeh """ #%%Import of required packages import numpy as np import pandas as pd import os import sys import plotly.graph_objs as go from plotly.offline import plot #%% Function to read results csv files #%% Function to create dictionaries cont...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 8621, 1679, 1478, 25, 4349, 25, 2548, 12131, 198, 198, 31, 9800, 25, 387, 4649, 71, 198, 37811, 198, 198, 2, 16626, 20939, 286, 2672, 10...
2.289072
851
from typing import Callable, Dict, Hashable, Optional, Tuple, Union from .._internal.utils import SlotsReprMixin from ..core import DependencyInstance, DependencyProvider class LazyCall(SlotsReprMixin): """ Dependency which is the result of the call of the given function with the given arguments. .....
[ 6738, 19720, 1330, 4889, 540, 11, 360, 713, 11, 21059, 540, 11, 32233, 11, 309, 29291, 11, 4479, 198, 198, 6738, 11485, 62, 32538, 13, 26791, 1330, 3454, 1747, 6207, 81, 35608, 259, 198, 6738, 11485, 7295, 1330, 37947, 1387, 33384, 11...
2.463821
1,382
import torch #from pytorch_lightning import LightingModule from transformers import AutoModelForSeq2SeqLM, MBartForConditionalGeneration PATH = "../longformer/models/LongTinyMBART" model = AutoModelForSeq2SeqLM.from_pretrained(PATH) # model_torch = torch.load(PATH) # model = model_torch # model_lightning = MyLight...
[ 11748, 28034, 198, 2, 6738, 12972, 13165, 354, 62, 2971, 768, 1330, 43150, 26796, 198, 6738, 6121, 364, 1330, 11160, 17633, 1890, 4653, 80, 17, 4653, 80, 31288, 11, 10771, 433, 1890, 25559, 1859, 8645, 341, 198, 198, 34219, 796, 366, ...
2.705357
224
import pytest import csv from astropy.utils.data import get_pkg_data_filename from astropy.io import fits as pyfits from astropy.time import Time as astropyTime from pyke import kepconvert from pyke import kepio from ..kepio import delete fake_lc = get_pkg_data_filename("data/golden-lc.fits") SUPPORTED_CONVERSION = [...
[ 11748, 12972, 9288, 198, 11748, 269, 21370, 198, 6738, 6468, 28338, 13, 26791, 13, 7890, 1330, 651, 62, 35339, 62, 7890, 62, 34345, 198, 6738, 6468, 28338, 13, 952, 1330, 11414, 355, 12972, 21013, 198, 6738, 6468, 28338, 13, 2435, 1330,...
2.346847
222
import logging import sys
[ 11748, 18931, 198, 11748, 25064, 198 ]
4.333333
6
from __future__ import print_function, division import os import argparse import torch import torch.nn as nn from os.path import exists from torch.utils.data import Dataset, DataLoader from model.cnn_geometric_model import CNNGeometric, TwoStageCNNGeometric from data.pf_dataset import PFDataset, PFPascalDataset from da...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28686, 13, 6978, 1330, 7160, 198, 6738, 28034, 13, 26791, 13,...
2.494697
2,923
# Copyright © 2020 Interplanetary Database Association e.V., # Planetmint and IPDB software contributors. # SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0) # Code is Apache-2.0 and docs are CC-BY-4.0 from planetmint.backend.tarantool.connection import TarantoolDB
[ 2, 15069, 10673, 12131, 4225, 11578, 8527, 24047, 5396, 304, 13, 53, 1539, 198, 2, 11397, 34289, 290, 314, 5760, 33, 3788, 20420, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 357, 25189, 4891, 12, 17, 13, 15, 5357, 12624, ...
3.033333
90
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- """ ------- main.py ------- Main methods (views + routes) implemented in the API. .. moduleauthor:: Fabio Madeira :module_version: 1.0 :created_on: 28-02-2015 """ import webapp2 import logging import os import jinja2 import urllib from tools import * from google.appeng...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 13, 22, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 26866, 198, 12417, 13, 9078, 198, 26866, 198, 13383, 5050, 357, 33571, 1343, 11926, 8, 9...
2.475524
1,001
#!/scratch/Anaconda2.4.0/bin/python import pandas as pd import numpy as np import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt from matplotlib import dates as matdates from matplotlib import lines as matlines import os import time from datetime import datetime """ This Module is structured to...
[ 2, 48443, 1416, 36722, 14, 2025, 330, 13533, 17, 13, 19, 13, 15, 14, 8800, 14, 29412, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 198, 198, 6759, 29487, 8019, 13, 1904, 10...
2.637931
406
#!/usr/bin/env python # -*- coding: utf-8 -*- """This module declares the different meanings that the Orbit 6 components can take and their conversions """ from numpy import cos, arccos, sin, arcsin, arctan2, sqrt, arctanh, sinh, cosh import numpy as np from ..errors import UnknownFormError from ..utils.node import...
[ 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, 1212, 8265, 24183, 262, 1180, 26368, 326, 262, 38161, 718, 6805, 460, 1011, 198, 392, 511, 32626, 198, 3781...
1.91614
5,700
# Copyright (c) 2020 DDN. All rights reserved. # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. import threading from kombu.connection import BrokerConnection from kombu.messaging import Exchange from kombu.entity import TRANSIENT_DELIVERY_MODE import os import sys...
[ 2, 15069, 357, 66, 8, 12131, 20084, 45, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 17168, 12, 7635, 198, 2, 5964, 326, 460, 307, 1043, 287, 262, 38559, 24290, 2393, 13, 628, 198, 11748, 47...
3.572347
311
# Generated by Django 3.1.12 on 2021-06-23 17:25 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 1065, 319, 33448, 12, 3312, 12, 1954, 1596, 25, 1495, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.8
30
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT license. """ python -m tf2onnx.convert : tool to convert a frozen tensorflow to onnx """ from __future__ import division from __future__ import print_function import argparse import sys import onnx from onnx import helper import te...
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 5964, 13, 198, 198, 37811, 198, 29412, 532, 76, 48700, 17, 261, 77, 87, 13, 1102, 1851, 1058, 2891, 284, 10385, 257, 12912, 11192, 273, ...
2.704241
896
from .compare import ( CompareABC, CompareDicts, CompareEndswith, CompareIgnore, CompareIgnoreOrder ) from .message import Message from .request import Request from .response import ( BaseBodyParser, JSONBodyParser, Response, XMLBodyParser, get_schema, validate_response )
[ 6738, 764, 5589, 533, 1330, 357, 198, 220, 220, 220, 27814, 24694, 11, 198, 220, 220, 220, 27814, 35, 14137, 11, 198, 220, 220, 220, 27814, 12915, 2032, 342, 11, 198, 220, 220, 220, 27814, 32916, 382, 11, 198, 220, 220, 220, 27814, ...
2.756522
115
#!/usr/bin/env python3 """ Convert a base64 string back to a normal string (decode). """ import readline # to overcome the 4k input limit from lib.jhash import base64_to_str as back ############################################################################## if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 198, 3103, 1851, 257, 2779, 2414, 4731, 736, 284, 257, 3487, 4731, 357, 12501, 1098, 737, 198, 37811, 198, 198, 11748, 1100, 1370, 220, 220, 220, 1303, 284, 10980, 262,...
3.5
88
import numpy as np from ai_economist.foundation.base.base_component import BaseComponent, component_registry @component_registry.add class GetEducated(BaseComponent): """ Environments expand the agents' state/action spaces by querying: get_n_actions get_additional_state_fields Environments ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 257, 72, 62, 13926, 396, 13, 42526, 13, 8692, 13, 8692, 62, 42895, 1330, 7308, 21950, 11, 7515, 62, 2301, 4592, 198, 198, 31, 42895, 62, 2301, 4592, 13, 2860, 198, 4871, 3497, 33380, 515, 7,...
2.3804
1,898
# This file is part of QuTiP. # # QuTiP is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # QuTiP is distributed in the ...
[ 2, 770, 2393, 318, 636, 286, 2264, 40533, 47, 13, 198, 2, 198, 2, 220, 220, 220, 2264, 40533, 47, 318, 1479, 3788, 25, 345, 460, 17678, 4163, 340, 290, 14, 273, 13096, 198, 2, 220, 220, 220, 340, 739, 262, 2846, 286, 262, 22961,...
2.623094
918
from math import radians, sin, cos, tan angulo = float(input('Digita o angulo que voce deseja: ')) seno = sin(radians(angulo)) print('O angulo de {} tem o seno de {:.2f}'.format(angulo, seno)) coseno = cos(radians(angulo)) print('O angulo de {} tem o cosseno de {:.2f}'.format(angulo, coseno)) tangente = tan(radians(ang...
[ 6738, 10688, 1330, 2511, 1547, 11, 7813, 11, 8615, 11, 25706, 198, 648, 43348, 796, 12178, 7, 15414, 10786, 19511, 5350, 267, 3550, 43348, 8358, 7608, 344, 748, 68, 6592, 25, 705, 4008, 198, 6248, 78, 796, 7813, 7, 6335, 1547, 7, 64...
2.52514
179
# -*- coding: utf-8 -*- # # Copyright 2016 Continuum Analytics, Inc. # May be copied and distributed freely only as part of an Anaconda or # Miniconda installation. # """ This folder contains jinja2 templates used by Anaconda Navigator. This folder is defined as a python module so that some convenience global variabl...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 1584, 6389, 13814, 30437, 11, 3457, 13, 198, 2, 1737, 307, 18984, 290, 9387, 12748, 691, 355, 636, 286, 281, 1052, 330, 13533, 393, 198, 2, 1855, 2...
3.157068
191
from flask import Flask, render_template, abort, redirect, url_for from flask_script import Manager from jinja2 import TemplateNotFound app = Flask(__name__) app.config['TESTING'] = True manager = Manager(app) @app.route('/', endpoint='frontend-index') @app.route('/<page>', endpoint='frontend-pages') def show(page...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 15614, 11, 18941, 11, 19016, 62, 1640, 198, 6738, 42903, 62, 12048, 1330, 9142, 198, 6738, 474, 259, 6592, 17, 1330, 37350, 3673, 21077, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834,...
2.734884
215
import requests from decouple import config from django.shortcuts import render, redirect from django.core.exceptions import ObjectDoesNotExist from users.models import UserPreferences from diary.models import DiaryEntry from diary.forms import DiaryEntryForm
[ 11748, 7007, 198, 6738, 875, 43846, 1330, 4566, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 9515, 13921, 3673, 3109, 396, 198, 6738, 2985, 13, 27530, 1330, ...
4.278689
61
""" 关于logo创意: 1. 基础元素为M和K的负空间设计 2. 白色部分创意来自弦图 3. 整体图案本身可生成一个不错的分形 4. 配色致敬3B1B(具体的蓝色和棕色还得再微调一下) logo主要创意由@GrakePCH提供,@GZTime、@cigar666、@鹤翔万里都提供了不少宝贵意见。目前设计工作还在继续完善,希望大家多提意见和建议 """ from manimlib.imports import * # final
[ 198, 37811, 198, 17739, 111, 12859, 236, 6404, 78, 26344, 249, 35707, 237, 171, 120, 248, 628, 197, 16, 13, 220, 10263, 253, 118, 163, 94, 222, 17739, 225, 163, 112, 254, 10310, 118, 44, 161, 240, 234, 42, 21410, 164, 112, 253, 16...
0.733129
326
import uuid from .client import QuickBooks from .exceptions import QuickbooksException from .objects.batchrequest import IntuitBatchRequest, BatchItemRequest, BatchOperation, BatchResponse, BatchItemResponse
[ 11748, 334, 27112, 198, 198, 6738, 764, 16366, 1330, 12029, 30650, 198, 6738, 764, 1069, 11755, 1330, 12029, 12106, 16922, 198, 6738, 764, 48205, 13, 43501, 25927, 1330, 2558, 5013, 33, 963, 18453, 11, 347, 963, 7449, 18453, 11, 347, 96...
4
53
from arizona.asr.learner import Wav2AsrLearner learner = Wav2AsrLearner( pretrain_model='path/to/pretrain.pt', finetune_model='path/to/finetune.pt', dictionary='path/to/dict.ltr.txt', lm_type='kenlm', lm_lexicon='path/to/lm/lexicon.txt', lm_model='path/to/lm/lm.bin', lm_weight=1.5, ...
[ 6738, 257, 380, 7551, 13, 292, 81, 13, 3238, 1008, 1330, 370, 615, 17, 1722, 81, 14961, 1008, 198, 198, 3238, 1008, 796, 370, 615, 17, 1722, 81, 14961, 1008, 7, 198, 220, 220, 220, 2181, 3201, 62, 19849, 11639, 6978, 14, 1462, 14,...
1.961864
236
"""Test Satellite model.""" import os import tempfile import numpy as np import pytest from nowcasting_dataset.data_sources.fake import satellite_fake from nowcasting_dataset.data_sources.satellite.satellite_model import Satellite
[ 37811, 14402, 33530, 2746, 526, 15931, 198, 11748, 28686, 198, 11748, 20218, 7753, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 198, 6738, 783, 19913, 62, 19608, 292, 316, 13, 7890, 62, 82, 2203, 13, 30706, 133...
3.42029
69
# # Copyright (c) 2021 Arm Limited and Contributors. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # """Registry of available host test plugins.""" class HostTestRegistry: """Register and store host test plugins for further usage.""" # Here we actually store all the plugins PLUGINS = {} # '...
[ 2, 198, 2, 15069, 357, 66, 8, 33448, 7057, 15302, 290, 25767, 669, 13, 1439, 2489, 10395, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 198, 37811, 8081, 4592, 286, 1695, 2583, 1332, 20652, ...
2.207683
2,369
import logging import os import sys from genofunk import apply
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 2429, 1659, 2954, 1330, 4174, 628 ]
3.823529
17
#!/usr/bin/env python2 # encoding: utf-8 #################################################### # # Description: Alert for invasion using pushbullet. # Author: Donie Leigh<donie.leigh at gmail.com> # License: MIT # #################################################### import sys, getopt, time, json from Conf...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 29113, 14468, 4242, 198, 2, 198, 2, 12489, 25, 220, 23276, 329, 11796, 1262, 4574, 15065, 1616, 13, 198, 2, 6434, 25, 220, 220, 220, ...
2.219663
1,129
import objects import logging import sqlite3 import threading import json import serverprotocol import sqlite3 import base64 import socket tileset = [] SCODE_NEEDAUTH = 0 SCODE_BANNED = 1 SCODE_BADAUTH = 2 SCODE_BADREG = 3
[ 11748, 5563, 198, 11748, 18931, 198, 11748, 44161, 578, 18, 198, 11748, 4704, 278, 198, 11748, 33918, 198, 11748, 4382, 11235, 4668, 198, 11748, 44161, 578, 18, 198, 11748, 2779, 2414, 198, 11748, 17802, 628, 198, 83, 2915, 316, 796, 17...
2.825
80
# Generated by Django 2.1 on 2018-08-21 18:45 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 319, 2864, 12, 2919, 12, 2481, 1248, 25, 2231, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.892857
28
from flask import current_app from flask_restplus import Resource from ._api import API @API.route('/version')
[ 6738, 42903, 1330, 1459, 62, 1324, 198, 6738, 42903, 62, 2118, 9541, 1330, 20857, 198, 198, 6738, 47540, 15042, 1330, 7824, 198, 198, 31, 17614, 13, 38629, 10786, 14, 9641, 11537, 628 ]
3.5625
32
#!bin/usr/env python #Jianheng Liu @ Zhanglab, SYSU #Feb, 2018 #Email: liujh26@mail2.sysu.edu.cn #Usage: This program is used to merge multiple BAM filtes to one, then sort and index it #Input: [.bam] import sys,os import argparse import pysam import time from time import gmtime, strftime if __name__ == "__main__": ...
[ 2, 0, 8800, 14, 14629, 14, 24330, 21015, 198, 198, 2, 41, 666, 31753, 18258, 2488, 19439, 23912, 11, 19704, 12564, 198, 2, 15146, 11, 2864, 198, 2, 15333, 25, 7649, 23577, 71, 2075, 31, 4529, 17, 13, 17597, 84, 13, 15532, 13, 3152...
2.62685
946