content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import sys from django.apps import AppConfig from django.db.models.signals import post_save
[ 11748, 25064, 198, 198, 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281, 62, 21928, 628 ]
3.357143
28
from dataclasses import dataclass from typing import overload from .words import Word @overload @overload @dataclass @dataclass(repr=False) @dataclass(repr=False) @dataclass(repr=False) @dataclass(repr=False) @dataclass(repr=False) @dataclass(repr=False) @dataclass(repr=False) @dataclass(repr=False...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 31754, 198, 6738, 764, 10879, 1330, 9678, 198, 198, 31, 2502, 2220, 198, 31, 2502, 2220, 628, 628, 198, 31, 19608, 330, 31172, 628, 198, 31, 19608, 330, 31172, 7,...
2.356322
174
# # PySNMP MIB module SYMME1T1 (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/neermitt/Dev/kusanagi/mibs.snmplabs.com/asn1/SYMME1T1 # Produced by pysmi-0.3.4 at Tue Jul 30 11:34:59 2019 # On host NEERMITT-M-J0NV platform Darwin version 18.6.0 by user neermitt # Using Python version 3.7.4 (default, Jul 9 2019...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 19704, 44, 11682, 16, 51, 16, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490, 14, 710, 7780, 715, 14, ...
2.608591
7,892
from google.cloud import datastore import os import json client = datastore.Client()
[ 6738, 23645, 13, 17721, 1330, 4818, 459, 382, 198, 11748, 28686, 198, 11748, 33918, 198, 198, 16366, 796, 4818, 459, 382, 13, 11792, 3419, 198 ]
3.44
25
# http://adventofcode.com/2017/day/2 code = """5048 177 5280 5058 4504 3805 5735 220 4362 1809 1521 230 772 1088 178 1794 6629 3839 258 4473 5961 6539 6870 4140 4638 387 7464 229 4173 5706 185 271 5149 2892 5854 2000 256 3995 5250 249 3916 184 2497 210 4601 3955 1110 5340 153 468 550 126 495 142 385 144 165 188 609...
[ 2, 2638, 1378, 324, 1151, 1659, 8189, 13, 785, 14, 5539, 14, 820, 14, 17, 628, 628, 198, 8189, 796, 37227, 1120, 2780, 197, 22413, 197, 4309, 1795, 197, 1120, 3365, 197, 17885, 19, 197, 23734, 20, 197, 3553, 2327, 197, 17572, 197, ...
1.808418
689
import logging from Tensile.SolutionStructs import Convolution from YamlBuilder.YamlBuilder import YamlBuilder log =logging.getLogger("testlog")
[ 11748, 18931, 198, 6738, 40280, 576, 13, 46344, 44909, 82, 1330, 34872, 2122, 198, 6738, 14063, 75, 32875, 13, 56, 43695, 32875, 1330, 14063, 75, 32875, 198, 198, 6404, 796, 6404, 2667, 13, 1136, 11187, 1362, 7203, 9288, 6404, 4943, 198...
3.560976
41
""" This module will Help You to Search on Different Websites like Google,Youtube,etc. You can search on more than 25 websites very easily by just 2 lines of code. Websites Supported:- 1.Google -google_search("Python") 2.Youtube -youtube_search("Python") 3.Bing -bing_search("Python") 4.Quora -quora_search("5 P...
[ 37811, 198, 1212, 8265, 481, 10478, 921, 284, 11140, 319, 20615, 47736, 2737, 588, 3012, 11, 56, 9762, 11, 14784, 13, 628, 198, 1639, 460, 2989, 319, 517, 621, 1679, 9293, 845, 3538, 416, 655, 362, 3951, 286, 2438, 13, 628, 198, 113...
2.624035
6,216
import os, sys, shutil import hashlib sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) from common.vars import * from common.MIME import * def get_file_size(file_name: str, human_readable: bool = True): """ Get file in size in given unit like KB, MB or GB :param file_name...
[ 11748, 28686, 11, 25064, 11, 4423, 346, 198, 11748, 12234, 8019, 198, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753,...
2.387387
666
import numpy as np import os, sys import argparse from tqdm import tqdm import paddle.nn as nn import paddle from x2paddle.torch2paddle import DataLoader import paddle.nn.functional as F sys.path.append('/home/aistudio') import scipy.io as sio from utils.loader import get_validation_data, get_testA_data import utils fr...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 11, 25064, 198, 11748, 1822, 29572, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 39517, 13, 20471, 355, 299, 77, 198, 11748, 39517, 198, 6738, 2124, 17, 79, 37382, 13, ...
2.683367
1,497
#!/usr/bin/env python3 import argparse import os import time os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE" import connexion import logging # import umap from flask import send_from_directory, redirect, json import numpy as np from sklearn.decomposition import PCA from sklearn.manifold import MDS, TSNE from copy impor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 640, 198, 198, 418, 13, 268, 2268, 14692, 42, 7378, 62, 35, 52, 31484, 6158, 62, 40347, 62, 11380, 8973, 796, 366, 5446, 8...
2.226577
2,220
#imports import pandas as pd import os import ast import sklearn as skl import sklearn.utils, sklearn.preprocessing, sklearn.decomposition, sklearn.svm import matplotlib.pyplot as plt import numpy as np import pylab import librosa import ffmpeg import audioread import sklearn import librosa.display import datetime ...
[ 2, 320, 3742, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 11748, 6468, 198, 198, 11748, 1341, 35720, 355, 1341, 75, 198, 11748, 1341, 35720, 13, 26791, 11, 1341, 35720, 13, 3866, 36948, 11, 1341, 35720, 13, 12501, 29...
2.822828
587
#!/usr/bin/env python3 import numpy as np import pandas as pd import re regex = re.compile('[^A-Za-zÀ-ÿ]') def extract_mean_word_vectors(data, vocabulary, embeddings): ''' extracts mean of word vectors for each tweet ''' print('> extracting mean of word vectors') # get vocab equivalence to twe...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 302, 198, 260, 25636, 796, 302, 13, 5589, 576, 10786, 58, 61, 32, 12, 57, 64, 12, 89, 127, 222,...
2.495722
1,870
import sys from inspect import Signature from types import CodeType, FunctionType from typing import Any, Tuple if sys.version_info >= (3, 8): copy_code = CodeType.replace else: PY_36_37_CODE_ARGS: Tuple[str, ...] = ( "co_argcount", "co_kwonlyargcount", "co_nlocals", "co_stacks...
[ 11748, 25064, 198, 6738, 10104, 1330, 34894, 198, 6738, 3858, 1330, 6127, 6030, 11, 15553, 6030, 198, 6738, 19720, 1330, 4377, 11, 309, 29291, 628, 198, 361, 25064, 13, 9641, 62, 10951, 18189, 357, 18, 11, 807, 2599, 198, 220, 220, 22...
2.136625
871
from .forms import NewProductForm from django.db import models from django.shortcuts import render, resolve_url from django.http.response import JsonResponse from quote.models import Product, Brand, User # ! INVENTORY VIEWS
[ 6738, 764, 23914, 1330, 968, 15667, 8479, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 10568, 62, 6371, 198, 6738, 42625, 14208, 13, 4023, 13, 26209, 1330, 449, 1559, 31077, 1...
3.66129
62
from osgeo import gdal import glob import os import numpy as np
[ 6738, 28686, 469, 78, 1330, 308, 31748, 198, 11748, 15095, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 628, 628, 628, 628, 198 ]
3
24
NAME = ['DLRModel'] VERSION = "1.9.1"
[ 20608, 796, 37250, 19260, 49, 17633, 20520, 198, 198, 43717, 796, 366, 16, 13, 24, 13, 16, 1, 198 ]
2.052632
19
import pytest from sqlalchemy import func from sqlalchemy.future import select from app.models import ExampleModel from app.tasks import example_task pytestmark = pytest.mark.asyncio
[ 11748, 12972, 9288, 198, 6738, 44161, 282, 26599, 1330, 25439, 198, 6738, 44161, 282, 26599, 13, 37443, 1330, 2922, 198, 198, 6738, 598, 13, 27530, 1330, 17934, 17633, 198, 6738, 598, 13, 83, 6791, 1330, 1672, 62, 35943, 198, 198, 9078,...
3.462963
54
from abc import ABC, abstractmethod from typing import TYPE_CHECKING, Optional import pandas as pd if TYPE_CHECKING: from sklearn.base import TransformerMixin
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 11, 32233, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 361, 41876, 62, 50084, 2751, 25, 198, 220, 220, 220, 422, 1341, 35720, 13, ...
3.367347
49
# Copyright 2014 Diamond Light Source Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
[ 2, 15069, 1946, 13566, 4401, 8090, 12052, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, ...
2.208371
14,311
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may ...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 201, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 201, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 201, 198, 2, 5115, 6634, 9238, 13, ...
2.508901
955
import os import numpy as np from cv2 import cv2 from PIL import Image import matplotlib.pyplot as plt from tensorflow import keras from keras.preprocessing.image import array_to_img, img_to_array, load_img PATH = os.getcwd() ## ----- LOAD DATA ------ ## ----- IMAGE AUGMENTATION -----
[ 11748, 28686, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 269, 85, 17, 1330, 269, 85, 17, 201, 198, 6738, 350, 4146, 1330, 7412, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 201, 198, 673...
2.6
120
# -*- coding: utf-8 -*- import scrapy import json from jsonpath import jsonpath import re from ..items import TaobaoSpiderItem from ..settings import cookies from urllib import parse error_num = 0
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 15881, 88, 198, 11748, 33918, 198, 6738, 33918, 6978, 1330, 33918, 6978, 198, 11748, 302, 198, 6738, 11485, 23814, 1330, 11940, 672, 5488, 41294, 7449, 198, 6738, 1...
3.245902
61
from django.db.models.signals import ModelSignal cb_pre_save = ModelSignal(providing_args=["instance"], use_caching=True) cb_post_save = ModelSignal(providing_args=["instance", "created"], use_caching=True) cb_pre_delete = ModelSignal(providing_args=["instance"], use_caching=True) cb_post_delete = ModelSignal(providi...
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 9104, 11712, 282, 198, 198, 21101, 62, 3866, 62, 21928, 796, 9104, 11712, 282, 7, 15234, 2530, 62, 22046, 28, 14692, 39098, 33116, 779, 62, 66, 8103, 28, 17821, 8, 198, ...
2.903226
124
from flask import render_template,redirect,url_for, flash,request from flask_login import login_user,logout_user,login_required from . import auth from ..models import User from .forms import LoginForm,RegistrationForm from .. import db from ..email import mail_message from flask_http_response import success, result, ...
[ 6738, 42903, 1330, 8543, 62, 28243, 11, 445, 1060, 11, 6371, 62, 1640, 11, 7644, 11, 25927, 198, 6738, 42903, 62, 38235, 1330, 17594, 62, 7220, 11, 6404, 448, 62, 7220, 11, 38235, 62, 35827, 198, 6738, 764, 1330, 6284, 198, 6738, 11...
3.328571
140
from django.urls import ( path, ) from .views import ( proxy_document, proxy_pdf, ) app_name = 'django_simple_file_handler' urlpatterns = [ path( 'documents/<proxy_slug>', proxy_document, name='proxy_document', ), path( 'pdf/<proxy_slug>', proxy_pdf,...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 357, 198, 220, 220, 220, 3108, 11, 198, 8, 628, 198, 6738, 764, 33571, 1330, 357, 198, 220, 220, 220, 15741, 62, 22897, 11, 198, 220, 220, 220, 15741, 62, 12315, 11, 198, 8, 628, 198, 1324, ...
2
178
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import datetime import io import json import logging import os import copy from builtins import object from builtins import str from typing import Any from typing import...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 4818, 8079, ...
3.801075
186
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT """ # This suite consists of all test cases that are passing and have been verified. import pytest import os impo...
[ 37811, 198, 15269, 357, 66, 8, 25767, 669, 284, 262, 4946, 513, 35, 7117, 4935, 13, 1114, 1844, 6634, 290, 5964, 2846, 3387, 766, 262, 38559, 24290, 379, 262, 6808, 286, 428, 6082, 13, 198, 198, 4303, 36227, 12, 34156, 12, 33234, 74...
3.255556
270
from unittest import TestCase from tt.dataaccess.utils import *
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 256, 83, 13, 7890, 15526, 13, 26791, 1330, 1635, 628 ]
3.421053
19
import quark_hash import weakref import binascii import StringIO from binascii import unhexlify teststart = '700000005d385ba114d079970b29a9418fd0549e7d68a95c7f168621a314201000000000578586d149fd07b22f3a8a347c516de7052f034d2b76ff68e0d6ecff9b77a45489e3fd511732011df0731000'; testbin = unhexlify(teststart) hash_bin = quar...
[ 11748, 627, 668, 62, 17831, 198, 11748, 4939, 5420, 198, 11748, 9874, 292, 979, 72, 198, 11748, 10903, 9399, 198, 198, 6738, 9874, 292, 979, 72, 1330, 555, 33095, 75, 1958, 198, 198, 9288, 9688, 796, 705, 22, 24598, 20, 67, 27203, 7...
2.261438
153
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ 责任链模式 """ if __name__ == '__main__': hb = ConcreteHandlerB(Level(2)) ha = ConcreteHandlerA(Level(1), hb) req = Request(Level(2), "Request with Level 2") ha.handle_request(req)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 220, 220, 220, 5525, 112, 96, 20015, 119, 165, 241, 122, 162, 101, 94, 28156, 237, 198, 37811, ...
2.08
125
""" This CASA script (optionally) reduces an available (concatenated) MS by time-averaging and sub-selecting a given velocity range. It is called inside csalt.synthesize.make_data(), or can be used as a standalone script for a real dataset as casa -c format_data.py configs/gen_<cfg_file> <a...
[ 37811, 198, 220, 220, 220, 770, 35106, 32, 4226, 357, 18076, 453, 8, 12850, 281, 1695, 357, 1102, 9246, 268, 515, 8, 6579, 416, 220, 198, 220, 220, 220, 640, 12, 8770, 3039, 290, 850, 12, 19738, 278, 257, 1813, 15432, 2837, 13, 22...
2.136087
3,123
# Example: printing the list of builtin layouts import json from nicetable.nicetable import NiceTable # from __future__ import annotations # only for Python 3.7 and up? out = NiceTable(['Layout', 'Description']) for layout in NiceTable.builtin_layouts(): out.append(layout) print(out) # Example: printi...
[ 2, 17934, 25, 13570, 262, 1351, 286, 3170, 259, 38489, 201, 198, 11748, 33918, 201, 198, 6738, 9200, 316, 540, 13, 6988, 316, 540, 1330, 18460, 10962, 201, 198, 2, 422, 11593, 37443, 834, 1330, 37647, 220, 220, 1303, 691, 329, 11361, ...
2.699465
935
import logging from vkbottle import User from forwarding_bot.vk._middleware import middleware_bp from ._blueprint import bot_bp logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 198, 6738, 410, 74, 10985, 293, 1330, 11787, 198, 198, 6738, 43448, 62, 13645, 13, 85, 74, 13557, 27171, 1574, 1330, 3504, 1574, 62, 46583, 198, 6738, 47540, 17585, 4798, 1330, 10214, 62, 46583, 198, 198, 6404, 1362, ...
3.188679
53
# coding: utf-8 from __future__ import absolute_import, unicode_literals from django.core import checks from django.db import models from django.utils.translation import gettext_lazy as _ try: from django.utils.module_loading import import_string except ImportError: # pragma: no cover, Django 1.6 compat from...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 7295, 1330, 8794, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, ...
3.28169
142
import pathlib import sys sys.path.append(str(pathlib.Path(__file__).parent))
[ 11748, 3108, 8019, 198, 11748, 25064, 198, 198, 17597, 13, 6978, 13, 33295, 7, 2536, 7, 6978, 8019, 13, 15235, 7, 834, 7753, 834, 737, 8000, 4008, 198 ]
2.821429
28
# SPDX-FileCopyrightText: 2022-present Ofek Lev <oss@ofek.dev> # # SPDX-License-Identifier: MIT from hatchling.version.source.plugin.interface import VersionSourceInterface
[ 2, 30628, 55, 12, 8979, 15269, 8206, 25, 33160, 12, 25579, 3226, 988, 16042, 1279, 793, 31, 1659, 988, 13, 7959, 29, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 6738, 25834, 1359, 13, 9641, 13, 10459, 13...
3.346154
52
#!/usr/bin/env python import rospy from geodesy.utm import gridZone def main(): """ Simple utility script to find the UTM zone of WGS84 coords """ TAG = "[find_zone.main] " lat = rospy.get_param('~lat', None) lon = rospy.get_param('~lon', None) # Check that at least lat and lon are provided missing_args =...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 686, 2777, 88, 198, 6738, 4903, 4147, 88, 13, 26841, 1330, 10706, 26961, 198, 198, 4299, 1388, 33529, 198, 197, 37811, 198, 197, 26437, 10361, 4226, 284, 1064, 262, 471, 15...
2.337634
465
"""set of filter functions""" import datetime import uuid def choose_current_date_partition(): """gets the parition for current date""" return datetime.date.today().strftime('$%Y%m%d') def add_bigquery_insert_uuid(row): """formats output_row and adds a uuid to be inserted""" output_row = dict() ...
[ 37811, 2617, 286, 8106, 5499, 37811, 198, 198, 11748, 4818, 8079, 198, 11748, 334, 27112, 198, 198, 4299, 3853, 62, 14421, 62, 4475, 62, 3911, 653, 33529, 198, 220, 220, 220, 37227, 11407, 262, 1582, 653, 329, 1459, 3128, 37811, 628, ...
2.798658
149
import tensorflow as tf import numpy as np import pytesseract import cv2 import json import time from tensorflow import keras pytesseract.pytesseract.tesseract_cmd = r'C:/Program Files/Tesseract-OCR/tesseract.exe' img_height = 180 img_width = 180 image_name = 'test1.jpg' model_name = '1627062415' class_names = ['dr...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 83, 408, 263, 529, 198, 11748, 269, 85, 17, 198, 11748, 33918, 198, 11748, 640, 198, 6738, 11192, 273, 11125, 1330, 41927, 292, 198, 198, 9078,...
2.704225
497
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2011, 2012 Pablo A. Costesich <pcostesi@alu.itba.edu.ar> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 220, 220, 220, 220, 220, 220, 15069, 2813, 11, 2321, 33185, 317, 13, 6446, 274, 488, 1279, 14751, 455, 46551, 31, ...
2.27501
2,549
import timeit # from datetime import datetime from medocControl import * from psychopy import core import random while True: # startTime = timeit.default_timer() # poll_for_change('IDLE') # core.wait(5) # command = random.randint(101,171) command = 117 if poll_for_change('IDLE', poll_max=-1): ...
[ 11748, 640, 270, 198, 198, 2, 422, 4818, 8079, 1330, 4818, 8079, 198, 6738, 1117, 420, 15988, 1330, 1635, 198, 6738, 3795, 11081, 1330, 4755, 198, 11748, 4738, 198, 198, 4514, 6407, 25, 198, 220, 220, 220, 1303, 923, 7575, 796, 640, ...
2.655172
1,131
from __future__ import absolute_import, unicode_literals from saefportal.settings import COMPARISON_PROFILE_THRESHOLD from .analyzer import Analyzer from analyzer.models import ActualColumnProfile, ExpectedColumnProfile from analyzer.enums import Column
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 473, 891, 634, 282, 13, 33692, 1330, 24301, 1503, 39960, 62, 31190, 25664, 62, 4221, 19535, 39, 15173, 198, 6738, 764, 38200, 9107, 1330, ...
3.690141
71
import numpy as np import tensorflow as tf from utils.xer import wer from utils.tools import bytes_to_string class ErrorRate(tf.keras.metrics.Metric): """ Metric for WER and CER """
[ 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 11192, 273, 11125, 355, 48700, 201, 198, 6738, 3384, 4487, 13, 87, 263, 1330, 266, 263, 201, 198, 6738, 3384, 4487, 13, 31391, 1330, 9881, 62, 1462, 62, 8841, 201, 198, 201, ...
2.493827
81
from unittest import TestCase from rest_framework import status from rest_framework.test import APIClient from environments.models import Environment, Identity from features.models import Feature, FeatureState from organisations.models import Organisation from projects.models import Project from tests.utils import He...
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 13, 9288, 1330, 3486, 2149, 75, 1153, 198, 198, 6738, 12493, 13, 27530, 1330, 9344, 11, 27207, 198, 6738, 3033, 13, 27530...
4.657143
70
# -*- coding:utf-8 -*- # @Time : 2020/06/10 # @Author : Wu Wen Jie(6692776@qq.com) # @FileName : mpython_conn.py # @Description : A transfer protocol between mPython board and PC python # @Version : 0.3.2 from serial.tools.list_ports import comports as list_serial_ports from serial import Serial import threading...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 220, 1058, 12131, 14, 3312, 14, 940, 198, 2, 2488, 13838, 220, 220, 1058, 18027, 31164, 449, 494, 7, 36657, 1983, 4304, 31, 38227, 13, 785, ...
2.717949
390
import torchlib from torch.utils.data import DataLoader, Dataset from torchvision import datasets, transforms # ============================================================================== # = custom dataset = # =======================================...
[ 11748, 28034, 8019, 198, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 11, 16092, 292, 316, 198, 6738, 28034, 10178, 1330, 40522, 11, 31408, 628, 628, 628, 198, 2, 38093, 25609, 28, 198, 2, 796, 220, 220, 220, 220, 220, ...
2.715543
341
# a pretty straightforward Muenchian grouping test from Xml.Xslt import test_harness sheet_1 = """<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" indent="yes"/> <xsl:key name="skills-by-mark" match="skill" use="@m...
[ 2, 257, 2495, 15836, 8252, 24421, 666, 36115, 1332, 198, 198, 6738, 1395, 4029, 13, 55, 82, 2528, 1330, 1332, 62, 9869, 1108, 198, 198, 21760, 62, 16, 796, 37227, 47934, 19875, 2196, 2625, 16, 13, 15, 1, 21004, 2625, 40477, 12, 23, ...
2.216726
849
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from collections.abc import Iterable if __name__ == '__main__': # 字典 d = {'a': 1, 'b': 2, 'c': 3} for key in d: print(key,d[key]) # 字符串 for x in 'abc': print(x) # 对象是否客迭代 iter=isinstance(['a','b','c'], Iterable) print(it...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 17268, 13, 39305, 1330, 40806, 540, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, ...
1.626943
579
#!/usr/bin/env python """Convert gzipped files on s3 biodata to xz compression format. This conversion is designed to save time and space for download. Some download utilities to speed things up: axel, aria2, lftp """ import os import sys import socket import subprocess import boto import fabric.api as fabric if __...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 3103, 1851, 308, 89, 3949, 3696, 319, 264, 18, 32449, 1045, 284, 2124, 89, 19794, 5794, 13, 198, 198, 1212, 11315, 318, 3562, 284, 3613, 640, 290, 2272, 329, 4321, 13, 198, 19...
3.111111
126
from __future__ import annotations from datetime import datetime from typing import Optional, Sequence, Tuple, Union from wyze_sdk.models import datetime_to_epoch from .base import ExServiceClient, WyzeResponse class ScaleServiceClient(ExServiceClient): """ Scale service client is the wrapper on the reques...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 32233, 11, 45835, 11, 309, 29291, 11, 4479, 198, 198, 6738, 266, 88, 2736, 62, 21282, 74, 13, 27530, 1330, 4818, 8079, 62, 146...
2.330979
3,257
# Generated by Django 2.0.7 on 2018-07-06 14:37 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 22, 319, 2864, 12, 2998, 12, 3312, 1478, 25, 2718, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
from setuptools import setup, find_packages setup( name="pre_wigs_validation", version="0.1.0", description="Pre-WIG Validator for Linux", author="steno", author_email="steno@amazon.com", packages=find_packages(exclude=["tests"]), include_package_data=True, install_requires=...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 201, 198, 201, 198, 201, 198, 40406, 7, 201, 198, 220, 220, 220, 1438, 2625, 3866, 62, 86, 9235, 62, 12102, 341, 1600, 201, 198, 220, 220, 220, 2196, 2625, 15, 13, 16, 13, ...
2.6
165
import pathlib import sys import tensorflow as tf import numpy as np from tensorflow.python.ops import init_ops from tensorflow.python.ops.rnn_cell_impl import _Linear, LSTMStateTuple from tensorflow.python.ops import variable_scope as vs from utils import * if __name__ == '__main__': batch_num = 1 hidden_n...
[ 11748, 3108, 8019, 198, 11748, 25064, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 2840, 1330, 2315, 62, 2840, 198, 6738, 11192, 273, 11125, 13, 29412, ...
1.674183
29,403
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the Mozilla Firefox history database plugin.""" import collections import unittest from plaso.formatters import firefox as _ # pylint: disable=unused-import from plaso.lib import eventdata from plaso.lib import timelib from plaso.parsers import sqlite from plaso...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 51, 3558, 329, 262, 29258, 16802, 2106, 6831, 13877, 526, 15931, 198, 198, 11748, 17268, 198, 11748, 555, 715, 395, 198...
2.664297
3,658
"""Embedded Structures. Various structure can be embedded in the body, without an operation header. Saved Chapters: A saved chapter is a header structure embedded in the body. There is no command identifier, so the command type is actually the first field of the header - length/offset. Applying the `subheader` struc...
[ 37811, 31567, 47238, 32112, 942, 13, 198, 198, 40009, 4645, 460, 307, 14553, 287, 262, 1767, 11, 1231, 281, 4905, 13639, 13, 198, 198, 50, 9586, 42448, 25, 198, 198, 32, 7448, 6843, 318, 257, 13639, 4645, 14553, 287, 262, 1767, 13, ...
2.508242
728
#p for row in range(13): for col in range(6): if (col==0 or row==0 and col!=5) or (row==1 and col==5)or (row==2 and col==5)or (row==3 and col==5)or (row==4 and col==5) or (row==5 and col!=5):#p print("*",end=" ") else: print(" ",end=" ") print()
[ 2, 79, 201, 198, 1640, 5752, 287, 2837, 7, 1485, 2599, 201, 198, 220, 220, 220, 329, 951, 287, 2837, 7, 21, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 611, 357, 4033, 855, 15, 393, 5752, 855, 15, 290, 951, 0, 28, 20, ...
1.875776
161
from mkdocs.config import config_options from mkdocs.plugins import BasePlugin from pdf_with_js.printer import Printer import random
[ 201, 198, 6738, 33480, 31628, 13, 11250, 1330, 4566, 62, 25811, 201, 198, 6738, 33480, 31628, 13, 37390, 1330, 7308, 37233, 201, 198, 201, 198, 6738, 37124, 62, 4480, 62, 8457, 13, 1050, 3849, 1330, 1736, 3849, 201, 198, 11748, 4738, ...
3.27907
43
from ..algorithms.classify import trained_model
[ 6738, 11485, 282, 7727, 907, 13, 4871, 1958, 1330, 8776, 62, 19849, 628, 628, 628 ]
3.533333
15
''' information masking section ''' import logging import timeit from . import encrypt_the_info from . import null_the_info def masking_method_selection(start_dataframe, mask_col, mask_method, save_to_file, masked_file, logger): ''' Basic check that all input is properly provided ...
[ 7061, 6, 198, 17018, 9335, 278, 2665, 198, 7061, 6, 198, 11748, 18931, 198, 11748, 640, 270, 198, 6738, 764, 1330, 34117, 62, 1169, 62, 10951, 198, 6738, 764, 1330, 9242, 62, 1169, 62, 10951, 628, 198, 4299, 9335, 278, 62, 24396, 62...
2.681758
751
__author__ = 'mason' from domain_orderFulfillment import * from timer import DURATION from state import state import numpy as np ''' Several objects to choose from, need to consider weights Same as problem 4 but only 1 robot ''' DURATION.TIME = { 'lookupDB': GetCostOfLookup, 'wrap': GetCostOfWrap, ...
[ 834, 9800, 834, 796, 705, 76, 888, 6, 198, 198, 6738, 7386, 62, 2875, 37, 4754, 359, 434, 1330, 1635, 198, 6738, 19781, 1330, 360, 4261, 6234, 198, 6738, 1181, 1330, 1181, 198, 11748, 299, 32152, 355, 45941, 198, 198, 7061, 6, 198, ...
2.045662
657
"""Track visualization""" from matplotlib import pyplot as plt def plot_trj( trj, coords=None, ax=None, scale=None, line_fmt="x:", line_color=None, line_label="Trajectory", line_width=None, marker_size=None, alpha=None, start_end=(True, True), ): """[summary] Args...
[ 37811, 24802, 32704, 37811, 198, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 628, 198, 4299, 7110, 62, 2213, 73, 7, 198, 220, 220, 220, 491, 73, 11, 198, 220, 220, 220, 763, 3669, 28, 14202, 11, 198, 220, 220, ...
2.083135
842
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
[ 2, 15069, 2864, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 11074, 198, 2, 921, 743, 407, 779, 428, 2393, ...
3.12404
911
import pyfoursquare as foursquare # == OAuth2 Authentication == # # This mode of authentication is the required one for Foursquare # The client id and client secret can be found on your application's Details # page located at https://foursquare.com/oauth/ client_id = "E50NJYAFUAPXPAKU5XQNBTXPGKRRSNUGAYWTUUH3RKJ22HH4"...
[ 11748, 12972, 69, 4662, 421, 533, 355, 1440, 23415, 198, 198, 2, 6624, 440, 30515, 17, 48191, 6624, 198, 2, 198, 2, 770, 4235, 286, 18239, 318, 262, 2672, 530, 329, 376, 4662, 421, 533, 198, 198, 2, 383, 5456, 4686, 290, 5456, 320...
2.97597
541
import numpy as np import matplotlib.pyplot as plt mg = 10 xlist = np.linspace(0,np.pi/2,100) f1 = 3*mg/2*(np.sin(xlist)*np.cos(xlist)*3/2-np.cos(xlist)) f2 = 3*mg/2*(-np.sin(xlist)+(3*np.sin(xlist)**2-1)/2) + mg plt.plot(xlist, f1, '-', markersize=1, label = r"$F_x$") plt.plot(xlist, f2, '-', markersize=1, label = ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 11296, 796, 838, 198, 198, 87, 4868, 796, 45941, 13, 21602, 10223, 7, 15, 11, 37659, 13, 14415, 14, 17, 11, 3064, 8, 198, 69, 1...
1.904348
230
from graphs import __version__ from graphs.graph import Vertix ,Edge,Graph graph = Graph()
[ 6738, 28770, 1330, 11593, 9641, 834, 198, 6738, 28770, 13, 34960, 1330, 24417, 844, 837, 37021, 11, 37065, 628, 198, 198, 34960, 796, 29681, 3419, 628, 198 ]
3.555556
27
import torch.utils.data import torch.nn as nn def test(model, data_loader, device, loggi, flag): """Evaluate model for dataset.""" # set eval state for Dropout and BN layers model.eval() # init loss and accuracy loss_ = 0.0 acc_ = 0.0 acc_domain_ = 0.0 n_total = 0 # set loss funct...
[ 11748, 28034, 13, 26791, 13, 7890, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 4299, 1332, 7, 19849, 11, 1366, 62, 29356, 11, 3335, 11, 2604, 12397, 11, 6056, 2599, 198, 220, 220, 220, 37227, 36, 2100, 4985, 2746, 329, 270...
2.324607
573
# -*- coding: utf-8 -*- # Copyright (c) 2019, Brandon Nielsen # All rights reserved. # # This software may be modified and distributed under the terms # of the BSD license. See the LICENSE file for details. from aniso8601.builders import TupleBuilder from aniso8601.builders.python import PythonTimeBuilder from aniso...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 357, 66, 8, 13130, 11, 14328, 31154, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 3788, 743, 307, 9518, 290, 9387, 739, 262, 2846, 198, 2, 28...
3.482014
139
import argparse from jiant.proj.simple import runscript as run import jiant.scripts.download_data.runscript as downloader if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("-t", "--task_name") parser.add_argument("-d", "--data_dir") parser.add_argument("-e", "--exp_d...
[ 11748, 1822, 29572, 198, 198, 6738, 474, 3014, 13, 1676, 73, 13, 36439, 1330, 1057, 12048, 355, 1057, 198, 11748, 474, 3014, 13, 46521, 13, 15002, 62, 7890, 13, 5143, 12048, 355, 4321, 263, 628, 198, 198, 361, 11593, 3672, 834, 6624, ...
2.362667
375
from django.contrib import messages from django.contrib.auth import authenticate, login as dj_login, logout as dj_logout from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import ( AuthenticationForm, PasswordChangeForm, PasswordResetForm, SetPasswordForm, ) from dj...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 8323, 5344, 11, 17594, 355, 42625, 62, 38235, 11, 2604, 448, 355, 42625, 62, 6404, 448, 198, 6738, 42625, 14208, 13, 3642, 822, 13...
2.926396
394
# -*- coding: utf-8 -*- """Command line tool tester (CLIToolTester).""" __version__ = '20191217'
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 21575, 1627, 2891, 256, 7834, 357, 5097, 2043, 970, 51, 7834, 21387, 15931, 198, 198, 834, 9641, 834, 796, 705, 23344, 1065, 1558, 6, 198 ]
2.45
40
# Generated by Django 3.2.9 on 2021-12-20 20:36 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 24, 319, 33448, 12, 1065, 12, 1238, 1160, 25, 2623, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import requests import sys import time from functools import wraps from multiprocessing import Pool from dci_downloader.fs import create_parent_dir from dciclient.v1.api.context import build_signature_context from dciclient.v1.api import component as dci_compone...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 11748, 7007, 198, 11748, 25064, 198, 11748, 640, 198, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, ...
2.682609
230
default_app_config = 'categories.apps.CategoriesConfig'
[ 12286, 62, 1324, 62, 11250, 796, 705, 66, 26129, 13, 18211, 13, 34, 26129, 16934, 6, 198 ]
3.294118
17
# flake8: noqa from .rbcz import ( read_statement, read_statements, read_statements_from_imap )
[ 2, 781, 539, 23, 25, 645, 20402, 198, 6738, 764, 81, 15630, 89, 1330, 357, 198, 220, 220, 220, 1100, 62, 26090, 11, 198, 220, 220, 220, 1100, 62, 14269, 3196, 11, 198, 220, 220, 220, 1100, 62, 14269, 3196, 62, 6738, 62, 320, 499...
2.25
48
# 1017. 负二进制转换 # # 20200801 # huao # 观察奇数位上的1,如果该位置为1,那么使用负二进制表示时,会比实际二进制时少2**(i+1) # 把这个差值加进去,并进行处理加完以后的值 # 处理完以后,得到的数字的二进制表示就是原数的负二进制表示 sol = Solution() print(sol.baseNeg2(4))
[ 2, 8949, 22, 13, 5525, 112, 253, 12859, 234, 32573, 249, 26344, 114, 164, 121, 105, 162, 235, 95, 198, 2, 198, 2, 1160, 11528, 486, 198, 2, 289, 84, 5488, 198, 2, 5525, 100, 224, 43380, 253, 25001, 229, 46763, 108, 19526, 235, 4...
0.740741
243
import typing from dataclasses import dataclass from utils.mixins import DataMixin @dataclass()
[ 11748, 19720, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 6738, 3384, 4487, 13, 19816, 1040, 1330, 6060, 35608, 259, 628, 198, 31, 19608, 330, 31172, 3419, 198 ]
3.193548
31
import configparser import jira class JiraConfig(object): """ PolarionConfig represents data that must be provided through config (ini) file (to enable communication with the polarion importer APIs) """ KEY_SECTION = 'jira' KEY_PROJECT = 'project' KEY_URL = 'url' KEY_USERNAME = 'username...
[ 11748, 4566, 48610, 198, 11748, 474, 8704, 628, 198, 4871, 449, 8704, 16934, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 32909, 295, 16934, 6870, 1366, 326, 1276, 307, 2810, 832, 198, 220, 220, 4566, 357, 5362, 8, 2393, ...
2.337931
870
import ensurepip if __name__ == "__main__": ensurepip._main()
[ 11748, 4155, 79, 541, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 4155, 79, 541, 13557, 12417, 3419, 198 ]
2.481481
27
# -*- coding: utf-8 -*- from trytond.model import fields from trytond.pool import PoolMeta __metaclass__ = PoolMeta __all__ = ['SaleConfiguration']
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 1949, 83, 623, 13, 19849, 1330, 7032, 198, 6738, 1949, 83, 623, 13, 7742, 1330, 19850, 48526, 198, 198, 834, 4164, 330, 31172, 834, 796, 19850, 48526, 198, 834, ...
2.830189
53
import cv2 import numpy as np import pycocotools.mask as mask_util from matplotlib.pyplot import contour __all__ = [ "mask_to_polygon", "polygons_to_mask", "area", "bbox", "coco_poygons_to_mask", ] def mask_to_polygon( mask, min_score: float = 0.5, approx: float = 0.0, relative: bool = True )...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 66, 420, 313, 10141, 13, 27932, 355, 9335, 62, 22602, 198, 6738, 2603, 29487, 8019, 13, 9078, 29487, 1330, 542, 454, 198, 198, 834, 439, 834, 796, 685, 198, ...
2.264657
1,194
MOUNT_PATH = "" # in case you are mounting data storage externally SPLIT = 'training' KITTI_WORK_DIR = "./" KITTI_DATA_DIR = "../input/kitti-3d-object-detection-dataset" NUSCENES_WORK_DIR = MOUNT_PATH + "/storage/slurm/kimal/eagermot_workspace/nuscenes" NUSCENES_DATA_DIR = MOUNT_PATH + "/storage/slurm/kimal/datasets...
[ 44, 28270, 62, 34219, 796, 13538, 220, 1303, 287, 1339, 345, 389, 17260, 1366, 6143, 45107, 198, 4303, 43, 2043, 796, 705, 34409, 6, 198, 198, 42, 22470, 40, 62, 33249, 62, 34720, 796, 366, 19571, 1, 198, 42, 22470, 40, 62, 26947, ...
2.411348
141
"""Functions which help end users define customize node_match and edge_match functions to use during isomorphism checks. """ from itertools import permutations import types import networkx as nx __all__ = ['categorical_node_match', 'categorical_edge_match', 'categorical_multiedge_match',...
[ 37811, 24629, 2733, 543, 1037, 886, 2985, 8160, 24184, 10139, 62, 15699, 290, 201, 198, 14907, 62, 15699, 5499, 284, 779, 1141, 318, 25831, 1042, 8794, 13, 201, 198, 37811, 201, 198, 6738, 340, 861, 10141, 1330, 9943, 32855, 201, 198, ...
2.740447
2,774
# Copyright (C) 2019-2020 HERE Europe B.V. # # 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 t...
[ 2, 15069, 357, 34, 8, 13130, 12, 42334, 15698, 2031, 347, 13, 53, 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, ...
3.043103
812
import configargparse import logging import os class StoreLoggingLevelAction(configargparse.Action): """This class converts string into logging level """ LEVELS = { 'CRITICAL': logging.CRITICAL, 'ERROR': logging.ERROR, 'WARNING': logging.WARNING, 'INFO': logging.INFO, ...
[ 11748, 4566, 853, 29572, 198, 11748, 18931, 198, 11748, 28686, 628, 198, 4871, 9363, 11187, 2667, 4971, 12502, 7, 11250, 853, 29572, 13, 12502, 2599, 198, 220, 220, 220, 37227, 1212, 1398, 26161, 4731, 656, 18931, 1241, 198, 220, 220, 2...
2.510373
482
# Copyright 2015, eBay Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
[ 2, 220, 220, 220, 15069, 1853, 11, 21698, 3457, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, ...
3.188462
260
## @ CfgDataTool.py # # Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ## import sys import collections sys.dont_write_bytecode = True from IfwiUtility import * from CommonUtility import * CFGDATA_INT_GUID = b'\xD0\x6C\x6E\x01\x34\x48\x7E\x4...
[ 2235, 2488, 327, 40616, 6601, 25391, 13, 9078, 198, 2, 198, 2, 15069, 357, 66, 8, 2177, 532, 12131, 11, 8180, 10501, 13, 1439, 2489, 10395, 29847, 11473, 29, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, 17, 1...
2.188172
186
import win32serviceutil import win32service import win32event import servicemanager from eve_service import EveService if __name__ == '__main__': win32serviceutil.HandleCommandLine(EveWindowsService)
[ 11748, 1592, 2624, 15271, 22602, 198, 11748, 1592, 2624, 15271, 198, 11748, 1592, 2624, 15596, 198, 11748, 37756, 8463, 3536, 198, 198, 6738, 28001, 62, 15271, 1330, 12882, 16177, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 1241...
3.409836
61
# Copyright (c) 2020 Marco Mangan <marco.mangan@gmail.com> # License: BSD 3 clause from dyrapy.datasets import load_ouvidoria
[ 2, 15069, 357, 66, 8, 12131, 16556, 27609, 272, 1279, 3876, 1073, 13, 76, 37089, 31, 14816, 13, 785, 29, 198, 2, 13789, 25, 347, 10305, 513, 13444, 198, 198, 6738, 20268, 2416, 88, 13, 19608, 292, 1039, 1330, 3440, 62, 280, 16921, ...
2.844444
45
import os import glob import json import tflit import pytest import numpy as np model_dir = os.path.join(os.path.dirname(__file__), 'models') model_file = os.path.join(model_dir, '{}.tflite') model_info_file = os.path.join(model_dir, '{}.json') @pytest.mark.parametrize('name', [ os.path.splitext(os.path.basena...
[ 11748, 28686, 198, 11748, 15095, 198, 11748, 33918, 198, 11748, 256, 2704, 270, 198, 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 628, 198, 19849, 62, 15908, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672,...
2.418182
165
import argparse from core.game_looper import GameLooper if __name__ == "__main__": parser = argparse.ArgumentParser(description="Run the Adversarial Game Server.") parser.add_argument('--port', '--p', type=int, default=8080, help='Port to run the server on') parser.add_argument('--game-file', default='sa...
[ 11748, 1822, 29572, 198, 198, 6738, 4755, 13, 6057, 62, 5439, 3575, 1330, 3776, 27654, 3575, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 30751, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11...
2.712042
191
""" Functions related user logins, signups, password authentications, logouts, etc ... """ from lib_db import User, UserID, Group, VerifyUser from google.appengine.api import mail import hashlib import random import re import string import stripe PASS_RE = re.compile(r"^.{3,20}$") EMAIL_RE = re.compile(r"^[\S]+@[\S]+\...
[ 37811, 198, 24629, 2733, 3519, 2836, 2604, 1040, 11, 1051, 4739, 11, 9206, 8323, 3736, 11, 198, 6404, 5269, 11, 3503, 2644, 198, 37811, 198, 6738, 9195, 62, 9945, 1330, 11787, 11, 11787, 2389, 11, 4912, 11, 49899, 12982, 198, 6738, 23...
2.439092
4,318
from pymodbus.client.sync import ModbusSerialClient client = ModbusSerialClient( method='rtu', port='/dev/ttyS0', baudrate=9600, timeout=3, parity='N', stopbits=1, bytesize=8 ) if client.connect(): # Trying for connect to Modbus Server/Slave '''Reading from a holding register with the...
[ 6738, 12972, 4666, 10885, 13, 16366, 13, 27261, 1330, 3401, 10885, 32634, 11792, 198, 198, 16366, 796, 3401, 10885, 32634, 11792, 7, 198, 220, 220, 220, 2446, 11639, 17034, 84, 3256, 198, 220, 220, 220, 2493, 11639, 14, 7959, 14, 42852,...
2.6
265
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
[ 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 220, 220, ...
3.423221
267
import random import math import numpy as np import pandas as pd import torch import torch.nn as nn import torch.optim as optim import torch.autograd as autograd from tqdm import tqdm from ray.tune import run, Trainable, sample_from from dqn import DQN, update_target from loss import TDLoss, StableTDLoss from pbuffer ...
[ 11748, 4738, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 28034, 13, 230...
2.106715
3,336
import qimpy as qp import torch import pytest @pytest.mark.mpi_skip def main(): """Run test and additionally plot for visual inspection.""" import matplotlib.pyplot as plt qp.utils.log_config() qp.rc.init() # Plot a single blip function for testing: plt.figure() coeff = torch.zeros(12)...
[ 11748, 10662, 320, 9078, 355, 10662, 79, 198, 11748, 28034, 198, 11748, 12972, 9288, 628, 198, 31, 9078, 9288, 13, 4102, 13, 3149, 72, 62, 48267, 628, 198, 4299, 1388, 33529, 198, 220, 220, 220, 37227, 10987, 1332, 290, 36527, 7110, 3...
1.84217
811
from django.db import models # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 198, 2, 13610, 534, 4981, 994, 13, 628 ]
3.6875
16
import numpy as np import bruges import scipy.stats import scipy.linalg import warnings from scipy.ndimage import gaussian_filter from typing import Tuple, Union, List, Optional, Callable, Any # TODO: Add support for horizons that "stop"/"vanish" (i.e. a layer is eroded). class SyntheticData: """Class for genera...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 275, 2143, 274, 198, 11748, 629, 541, 88, 13, 34242, 198, 11748, 629, 541, 88, 13, 75, 1292, 70, 198, 11748, 14601, 198, 6738, 629, 541, 88, 13, 358, 9060, 1330, 31986, 31562, 62, 24455, 19...
2.118168
8,691
""" Python Character Mapping Codec generated from '8859-8.TXT'. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import codecs ### Codec APIs ### encodings module API ### Decoding Map decoding_map = { 0x00aa: 0x00d7, # MULTIPLICATION SIGN 0x00af: ...
[ 37811, 11361, 15684, 337, 5912, 39298, 7560, 422, 705, 3459, 3270, 12, 23, 13, 51, 25010, 4458, 628, 198, 25354, 416, 13067, 12, 31258, 20607, 7423, 357, 7617, 31, 293, 2022, 3686, 13, 785, 737, 198, 198, 7, 66, 8, 15069, 31171, 711...
1.791146
881
import argparse import subprocess import os import time import random if __name__ == "__main__": main()
[ 11748, 1822, 29572, 198, 11748, 850, 14681, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 4738, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
3.114286
35
# automatically generated by the FlatBuffers compiler, do not modify # namespace: FBOutput import tdw.flatbuffers
[ 2, 6338, 7560, 416, 262, 21939, 36474, 364, 17050, 11, 466, 407, 13096, 198, 198, 2, 25745, 25, 13186, 26410, 198, 198, 11748, 41560, 86, 13, 38568, 36873, 364, 198 ]
3.866667
30