content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import numpy as np import pickle import codecs import os from collections import Counter import re import math import scipy.stats as statss import json import random import numpy import codecs from seqeval.metrics import precision_score, recall_score, f1_score #from sklearn.metrics import f1_score from nltk.tokenize i...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 11748, 40481, 82, 198, 11748, 28686, 198, 6738, 17268, 1330, 15034, 198, 11748, 302, 198, 11748, 10688, 198, 11748, 629, 541, 88, 13, 34242, 355, 1185, 824, 198, 11748, 33918, 1...
2.222379
2,842
import pytest import torch from pytorch_toolbelt.modules import HFF, ResidualDeconvolutionUpsample2d skip_if_no_cuda = pytest.mark.skipif(not torch.cuda.is_available(), reason="Cuda is not available") # def test_upsample(): # block = DepthToSpaceUpsample2d(1) # original = np.expand_dims(cv2.imread("lena.pn...
[ 11748, 12972, 9288, 198, 11748, 28034, 198, 6738, 12972, 13165, 354, 62, 25981, 37976, 13, 18170, 1330, 367, 5777, 11, 1874, 312, 723, 10707, 261, 85, 2122, 52, 862, 1403, 17, 67, 198, 198, 48267, 62, 361, 62, 3919, 62, 66, 15339, 7...
2.200521
384
"""unlimited_studies URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') C...
[ 37811, 403, 10698, 62, 19149, 444, 10289, 28373, 198, 198, 464, 4600, 6371, 33279, 82, 63, 1351, 11926, 32336, 284, 5009, 13, 1114, 517, 1321, 3387, 766, 25, 198, 220, 220, 220, 3740, 1378, 31628, 13, 28241, 648, 404, 305, 752, 13, ...
2.579888
895
# Copyright 2020 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
[ 2, 220, 220, 15069, 12131, 3012, 11419, 198, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
2.297835
1,155
# Generated by Django 3.0.8 on 2020-08-02 18:43 from django.db import migrations, models import django.utils.timezone
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 23, 319, 12131, 12, 2919, 12, 2999, 1248, 25, 3559, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 26791, 13, 2435, 11340, 628 ]
2.926829
41
from PySide import QtGui from PySide.QtGui import QDialog, QFileDialog, QDialogButtonBox from mapclientplugins.pointwiserigidregistrationstep.ui_configuredialog import Ui_Dialog INVALID_STYLE_SHEET = 'background-color: rgba(239, 0, 0, 50)' DEFAULT_STYLE_SHEET = '' class ConfigureDialog(QtGui.QDialog): ...
[ 201, 198, 201, 198, 6738, 9485, 24819, 1330, 33734, 8205, 72, 201, 198, 6738, 9485, 24819, 13, 48, 83, 8205, 72, 1330, 1195, 44204, 11, 1195, 8979, 44204, 11, 1195, 44204, 21864, 14253, 201, 198, 6738, 3975, 16366, 37390, 13, 4122, 86...
2.321478
2,165
#!/usr/bin/env python from setuptools import setup project = "rdflib-sqlalchemy" version = "0.5.2.dev0" setup( name=project, version=version, description="rdflib extension adding SQLAlchemy as an AbstractSQLStore back-end store", author="Graham Higgins, Adam Ever-Hadani", author_email="gjhiggins@...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 16302, 796, 366, 4372, 2704, 571, 12, 25410, 282, 26599, 1, 198, 9641, 796, 366, 15, 13, 20, 13, 17, 13, 7959, 15, 1, 628, 198, 40406...
2.622435
731
from flask import current_app from flask import render_template from . import index_blu from info import redis_store @index_blu.route('/') #在打开网页的时候.会默认请求根路径favicon.ico @index_blu.route('/favicon.ico')
[ 6738, 42903, 1330, 1459, 62, 1324, 198, 6738, 42903, 1330, 8543, 62, 28243, 198, 198, 6738, 764, 1330, 6376, 62, 65, 2290, 198, 6738, 7508, 1330, 2266, 271, 62, 8095, 198, 31, 9630, 62, 65, 2290, 13, 38629, 10786, 14, 11537, 198, 19...
1.970874
103
""" Merge function for 2048 game. """ def merge(line): """ Function that merges a single row or column in 2048. """ # replace with your code zeros = [] for _ in line: zeros.append(0) result_index = 0 #in this step restlt = [0,0,0,0] result = zeros[:] for _ in range(len(l...
[ 37811, 198, 13102, 469, 2163, 329, 36117, 983, 13, 198, 37811, 198, 198, 4299, 20121, 7, 1370, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 15553, 326, 4017, 3212, 257, 2060, 5752, 393, 5721, 287, 36117, 13, 198, 220, 220, 2...
2.116822
428
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import sys import tensorflow as tf import logging import scipy as scp from collections import namedtuple import cv2 import tensorvision.utils as tv_utils import tensorvision.core as tv_core import seg_utils.seg_utils as tv_seg import time import net.mono...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 25064, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 18931, 198,...
2.128954
411
import sys import gevent from gevent.event import Event from ws4py.exc import HandshakeError from ws4py.client.geventclient import WebSocketClient from . import common # Handles the WebSocket once it has been upgraded by the HTTP layer.
[ 11748, 25064, 198, 198, 11748, 4903, 1151, 198, 6738, 4903, 1151, 13, 15596, 1330, 8558, 198, 198, 6738, 266, 82, 19, 9078, 13, 41194, 1330, 7157, 32431, 12331, 198, 6738, 266, 82, 19, 9078, 13, 16366, 13, 469, 1151, 16366, 1330, 5313...
3.492754
69
from abc import abstractmethod, ABC class Criterion(ABC): """Abstract base class to implement new criteria.""" @abstractmethod @abstractmethod def __call__(self, perturbed: T, outputs: T) -> T: """Returns a boolean tensor indicating which perturbed inputs are adversarial. Args: ...
[ 6738, 450, 66, 1330, 12531, 24396, 11, 9738, 628, 198, 4871, 10056, 28019, 7, 24694, 2599, 198, 220, 220, 220, 37227, 23839, 2779, 1398, 284, 3494, 649, 9987, 526, 15931, 628, 220, 220, 220, 2488, 397, 8709, 24396, 628, 220, 220, 220,...
2.681739
575
print('Hola Mundo') print('Hola che')
[ 4798, 10786, 39, 5708, 33324, 78, 11537, 198, 4798, 10786, 39, 5708, 1125, 11537, 198 ]
2.533333
15
# -*- coding=utf-8 -*- import random import os,pickle import pygame from globals import * from matrix import Matrix
[ 2, 532, 9, 12, 19617, 28, 40477, 12, 23, 532, 9, 12, 198, 11748, 4738, 198, 11748, 28686, 11, 27729, 293, 198, 11748, 12972, 6057, 198, 6738, 15095, 874, 1330, 1635, 198, 6738, 17593, 1330, 24936, 628, 628 ]
3.131579
38
# coding: utf8 { '%(module)s not installed': '%(module)s not installed', '%(system_name)s - Verify Email': '%(system_name)s - I-verify ang Email', '%I:%M %p': '%I:%M %p', '%I:%M:%S %p': '%I:%M:%S %p', '%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S', '%m-%d-%Y': '%m-%d-%Y', '%m-%d-%Y %I:%M %p': '%m-%d-%Y %I:%M %p', '%m-%d-%Y %...
[ 2, 19617, 25, 3384, 69, 23, 198, 90, 198, 6, 4, 7, 21412, 8, 82, 407, 6589, 10354, 705, 4, 7, 21412, 8, 82, 407, 6589, 3256, 198, 6, 4, 7, 10057, 62, 3672, 8, 82, 532, 49899, 9570, 10354, 705, 4, 7, 10057, 62, 3672, 8, 82,...
3.00652
22,086
from learner.flappy_util import Utility from learner.flappy_inputs import Inputs from learner.flappy_processor import FlappyProcessor from learner.flappy_callback import FlappySession
[ 6738, 22454, 1008, 13, 2704, 7774, 62, 22602, 1330, 34030, 198, 6738, 22454, 1008, 13, 2704, 7774, 62, 15414, 82, 1330, 23412, 82, 198, 6738, 22454, 1008, 13, 2704, 7774, 62, 41341, 1330, 1610, 7774, 18709, 273, 198, 6738, 22454, 1008, ...
3.66
50
""" Package to handle setup of command line argument processing for Mix API Cli """ from ..util.commands import register_root_argparser, register_cmd_group, register_cmd_module _cmd_registered = False
[ 37811, 198, 27813, 284, 5412, 9058, 286, 3141, 1627, 4578, 7587, 329, 15561, 7824, 1012, 72, 198, 37811, 198, 6738, 11485, 22602, 13, 9503, 1746, 1330, 7881, 62, 15763, 62, 853, 48610, 11, 7881, 62, 28758, 62, 8094, 11, 7881, 62, 2875...
3.796296
54
"""Generate accompaniments using RealBand and save them.""" import argparse import os import sys import time import traceback from pywinauto.timings import TimeoutError from ..realband_controller import RealBandController if __name__ == '__main__': main()
[ 37811, 8645, 378, 10600, 6800, 1262, 6416, 31407, 290, 3613, 606, 526, 15931, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 12854, 1891, 198, 198, 6738, 12972, 86, 1437, 9390, 13, 16514, ...
3.454545
77
#!/usr/bin/env python2.7 """ This script instantiates critical components of our webapps. We need at least one home subreddit to get things going. We also need a first user to admin our first subreddit. """ import os import sys import readline from pprint import pprint from flask import * from werkzeug import check_pa...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 13, 22, 198, 37811, 198, 1212, 4226, 9113, 32820, 4688, 6805, 286, 674, 3992, 18211, 13, 198, 1135, 761, 379, 1551, 530, 1363, 25163, 284, 651, 1243, 1016, 13, 198, 1135, 635, 761, 25...
3.056962
316
""" Dimensionnality =============== """ from ansys.grpc.dpf import field_definition_pb2 from ansys.dpf.core.common import natures class Dimensionnality: """Class representing the dimensionnality of the field Read list of dim (1D vector for scalar and vector and 2D vector for matrix) and create a f...
[ 37811, 198, 29271, 3004, 77, 1483, 198, 25609, 18604, 198, 37811, 198, 198, 6738, 9093, 893, 13, 2164, 14751, 13, 26059, 69, 1330, 2214, 62, 46758, 62, 40842, 17, 198, 6738, 9093, 893, 13, 26059, 69, 13, 7295, 13, 11321, 1330, 299, ...
2.488801
759
''' The function create_mscc_dataset is Copyright 2016 Oren Melamud Modifications copyright (C) 2018 Tatsuya Aoki This code is based on https://github.com/orenmel/context2vec/blob/master/context2vec/eval/mscc_text_tokenize.py Used to convert the Microsoft Sentence Completion Challnege (MSCC) learning corpus into ...
[ 7061, 6, 201, 198, 464, 2163, 2251, 62, 907, 535, 62, 19608, 292, 316, 318, 15069, 1584, 440, 918, 5616, 321, 463, 201, 198, 5841, 6637, 6634, 357, 34, 8, 2864, 309, 19231, 3972, 317, 18228, 201, 198, 201, 198, 1212, 2438, 318, 19...
2.673653
334
import numpy # Evaluate trading system defined in current file. if __name__ == '__main__': from toolkit import quantiacsWeb results = quantiacsWeb.runtsWeb(__file__)
[ 11748, 299, 32152, 201, 198, 201, 198, 201, 198, 2, 26439, 4985, 7313, 1080, 5447, 287, 1459, 2393, 13, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 220, 220, 220, 422, 2891, 15813, 1330, 5554, 9607, ...
2.772727
66
#!/usr/bin/env python """Main tvnamer utility functionality """ import os import sys import logging import warnings try: import readline except ImportError: pass import json import tvdb_api from typing import List, Union, Optional from tvnamer import cliarg_parser, __version__ from tvnamer.config_defaults...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 13383, 31557, 77, 2382, 10361, 11244, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 18931, 198, 11748, 14601, 198, 198, 28311, 25, 198, 220, 220, 220, 13...
2.223064
7,917
"""Resample to 0.7 iso to be able to use BrainVoyager DNN segmentation.""" import os import subprocess import numpy as np import nibabel as nb # ============================================================================= NII_NAMES = [ '/home/faruk/data/DATA_MRI_NIFTI/src/sub-01_ses-T2s/MP2RAGE_650micron/sub-01_...
[ 37811, 4965, 1403, 284, 657, 13, 22, 47279, 284, 307, 1498, 284, 779, 14842, 53, 726, 3536, 360, 6144, 10618, 341, 526, 15931, 198, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 33272, 9608, ...
2.1875
1,648
""" File-Name: [app]/urls.py File-Desc: App specific urls App-Name: las_util Project-Name: Las-Util-Django Copyright: Copyright (c) 2019, DC Slagel License-Identifier: BSD-3-Clause """ from django.urls import path, re_path from . import views urlpatterns = [ path('', views.home, name='home'), #--------------...
[ 37811, 198, 8979, 12, 5376, 25, 685, 1324, 60, 14, 6371, 82, 13, 9078, 198, 8979, 12, 24564, 25, 2034, 2176, 2956, 7278, 198, 4677, 12, 5376, 25, 39990, 62, 22602, 198, 16775, 12, 5376, 25, 10123, 12, 18274, 346, 12, 35, 73, 14208...
2.730245
367
from django.contrib import admin from drones.models import DroneCategory, Drone, Pilot, Competition admin.site.register(DroneCategory) admin.site.register(Drone) admin.site.register(Pilot) admin.site.register(Competition)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 15382, 13, 27530, 1330, 38959, 27313, 11, 38959, 11, 21697, 11, 27348, 198, 198, 28482, 13, 15654, 13, 30238, 7, 6187, 505, 27313, 8, 198, 28482, 13, 15654, 13, 30238, 7,...
3.393939
66
""" This module computes alignment solutions between all "a priori" solutions for a dataset and GAIA. """ import pytest import numpy as np from drizzlepac.haputils import testutils from ..resources import BaseACS, BaseWFC3 def compare_apriori(dataset): """This test will perform fits between ALL a priori s...
[ 37811, 770, 8265, 552, 1769, 19114, 8136, 1022, 477, 366, 64, 3161, 72, 1, 8136, 198, 220, 220, 220, 329, 257, 27039, 290, 14545, 3539, 13, 198, 198, 37811, 198, 11748, 12972, 9288, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, ...
2.45402
1,729
# # Copyright 2016 Cluster Labs, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
[ 2, 198, 2, 15069, 1584, 38279, 23500, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13,...
3.654867
339
# -*- encoding: utf-8 -*- # Copyright © 2012 New Dream Network, LLC (DreamHost) # 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....
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 10673, 2321, 968, 7610, 7311, 11, 11419, 357, 30571, 17932, 8, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 1...
3.185255
529
from django.apps import AppConfig from modules.index import InvertedIndex from myPersonalSite.settings import DEBUG
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 198, 6738, 13103, 13, 9630, 1330, 554, 13658, 15732, 198, 6738, 616, 30228, 29123, 13, 33692, 1330, 16959, 628, 198 ]
4.214286
28
#!/usr/bin/python IMAGE_WIDTH = 25 IMAGE_HEIGHT = 6 PIXEL_MISSING = -1 PIXEL_BLACK = 0 PIXEL_WHITE = 1 PIXEL_TRANSPARENT = 2 # Open input file filename = "day08.txt" f = open(filename, "r") fewest_zeroes = IMAGE_WIDTH * IMAGE_HEIGHT + 1 fewest_zeroes_layer = None layers = [] with open(filename, "r...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 3955, 11879, 62, 54, 2389, 4221, 796, 1679, 198, 3955, 11879, 62, 13909, 9947, 796, 718, 198, 198, 47, 10426, 3698, 62, 44, 16744, 2751, 220, 220, 220, 220, 796, 532, 16, 198, 47, 10...
1.973747
838
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
# ----------* CHALLENGE 74 *---------- # Enter a list of ten colours. Ask the user for a starting number between 0 and 4 # and an end number between 5 and 9. Display the list for those colours # between the start and end numbers the user input. list_colours = ["red", "blue", "green", "yellow", "orange", "purple"...
[ 2, 24200, 438, 9, 5870, 7036, 1677, 8264, 8915, 1635, 35937, 201, 198, 2, 6062, 257, 1351, 286, 3478, 18915, 13, 16981, 262, 2836, 329, 257, 3599, 1271, 1022, 657, 290, 604, 201, 198, 2, 290, 281, 886, 1271, 1022, 642, 290, 860, 1...
3.109195
174
"""Perform a reCAPTCHA verification server-side""" import requests try: from dateutil.parser import parse as parse_date except ImportError: from datetime import datetime def parse_date(datestr): """Parse a date from ISO format yyyy-MM-dd'T'HH:mm:ssZZ""" return datetime.strptime('%Y-%m-%dT%H...
[ 37811, 5990, 687, 257, 302, 33177, 51, 49285, 19637, 4382, 12, 1589, 37811, 198, 11748, 7007, 198, 28311, 25, 198, 220, 220, 220, 422, 3128, 22602, 13, 48610, 1330, 21136, 355, 21136, 62, 4475, 198, 16341, 17267, 12331, 25, 198, 220, ...
2.499553
1,119
import numpy as np import os import cv2 import csv path = "./test/" CROP_SIZE = 600 csv_write = csv.writer(open('scale.csv','w',newline='')) for f in os.listdir(path): name,_ = f.split("_") img = cv2.imread(path+f) sp = img.shape x = sp[1] / CROP_SIZE y = sp[0] / CROP_SIZE csv_write.writerow([name,x,y]) print(...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 269, 85, 17, 198, 11748, 269, 21370, 198, 198, 6978, 796, 366, 19571, 9288, 30487, 198, 9419, 3185, 62, 33489, 796, 10053, 198, 198, 40664, 62, 13564, 796, 269, 21370, 13, ...
2.219684
569
from typing import Union import pytest from flow.testing import ComponentTest from flow_types import base component_dir = "flow_package_maths/advanced/log_base" @pytest.mark.parametrize( "val_in, base_in, result", [ [base.Double(4.5), base.Int(2), 2.1699], [base.Bool(True), base.Int(4), 0], ...
[ 6738, 19720, 1330, 4479, 198, 198, 11748, 12972, 9288, 198, 6738, 5202, 13, 33407, 1330, 35100, 14402, 198, 6738, 5202, 62, 19199, 1330, 2779, 198, 198, 42895, 62, 15908, 796, 366, 11125, 62, 26495, 62, 11018, 82, 14, 32225, 2903, 14, ...
2.384058
138
import re from functools import wraps from flask import current_app, request ip_regex = '''^(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\.( 25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\.( 25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\.( 25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)$'''
[ 11748, 302, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 198, 6738, 42903, 1330, 1459, 62, 1324, 11, 2581, 628, 198, 541, 62, 260, 25636, 796, 705, 7061, 61, 7, 1495, 58, 15, 12, 20, 60, 91, 17, 58, 15, 12, 19, 7131, 15, 12, ...
1.418605
215
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from datetime import datetime from pony import orm from flask import current_app from flask_login import UserMixin from smilepack.database import db from smilepack.bl.registry import Resource class Icon(db.Entity): """Иконка категории или раздела""" filename ...
[ 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, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 26902, 1330, 393, 76, 198, 6738, 42903, 1330, 1459, 62, ...
2.14
3,400
from sqlalchemy import Index, MetaData, Table, Column, Integer, ForeignKey meta = MetaData()
[ 6738, 44161, 282, 26599, 1330, 12901, 11, 30277, 6601, 11, 8655, 11, 29201, 11, 34142, 11, 8708, 9218, 198, 198, 28961, 796, 30277, 6601, 3419, 628 ]
3.653846
26
import argparse import pandas as pd from django.core.management.base import BaseCommand from firecares.firestation.models import FireDepartment from firecares.firecares_core.models import PredeterminedUser
[ 11748, 1822, 29572, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 2046, 66, 3565, 13, 6495, 17529, 13, 27530, 1330, 3764, 36261, 198, 6738, 2046, 66, 3565, ...
3.833333
54
import os import argparse from xtest import __version__, __description__ from webdriver_manager.firefox import GeckoDriverManager from xtest.utils.webdriver_manager_extend import ChromeDriverManager def main(): """ 命令行工具 """ parser = argparse.ArgumentParser(description=__description__) parser.ad...
[ 11748, 28686, 198, 11748, 1822, 29572, 198, 6738, 220, 742, 395, 1330, 11593, 9641, 834, 11, 11593, 11213, 834, 198, 6738, 3992, 26230, 62, 37153, 13, 6495, 12792, 1330, 2269, 37549, 32103, 13511, 198, 6738, 220, 742, 395, 13, 26791, 13...
2.549296
994
""" 一、程序错误: 1. 程序编写的时候有问题-bug 2. 用户输入脏数据-通过检查校验来对用户输入进行处理 3. 程序运行过程中无法预测的,比如:网络问题, 磁盘问题等-异常 4. 业务问题 程序中所有的错误都需要进行处理 二、程序调式: 跟踪程序的执行,查看相应变量的值 三、程序测试: 测试人员:程序上生产(production)之前,会通过多个测试环境(test, uat, stg) 开发人员:单元测试(开发环境) """ # 获取python自带异常错误类 # import re # list_a = dir(__builtins__) # list_b = [i for i in list_a if re.matc...
[ 37811, 198, 31660, 23513, 163, 101, 233, 41753, 237, 165, 242, 247, 46237, 107, 25, 198, 16, 13, 13328, 101, 233, 41753, 237, 163, 120, 244, 37863, 247, 21410, 33768, 114, 161, 222, 247, 17312, 231, 29785, 106, 165, 95, 246, 12, 254...
1.513667
878
import pandas as pd from bach import DataFrame
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 275, 620, 1330, 6060, 19778, 628, 628 ]
3.1875
16
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import generic.models from django.conf import settings import generic.search import rights.utils
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 198, 11748, 14276, 13, 27530, 198, 6738, ...
3.4
60
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 12131, 383, 3012, 4992, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, ...
3.149184
858
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.SocialInfoView import SocialInfoView
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 2829, 17752, 355, 33918, 198, 198, 6738, 435, 541, 323, 13, 64, 404, 13, 15042, 13, 26209, 13, 2348, 541, 323,...
2.833333
72
# Generated by Django 3.1.7 on 2021-05-12 02:17 import datetime from django.db import migrations, models from django.utils.timezone import utc
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 22, 319, 33448, 12, 2713, 12, 1065, 7816, 25, 1558, 198, 198, 11748, 4818, 8079, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 6738, 42625, 14208, 13, 26791, 13, 2435,...
3.020833
48
from django.test import TestCase from student_feedback_app.models import * from student_feedback_app.forms import FeedbackForm
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 3710, 62, 12363, 1891, 62, 1324, 13, 27530, 1330, 1635, 198, 6738, 3710, 62, 12363, 1891, 62, 1324, 13, 23914, 1330, 37774, 8479, 198 ]
3.735294
34
raio = float(input()) area = 3.14159 * raio ** 2 print(f'A={area:.4f}')
[ 430, 952, 796, 12178, 7, 15414, 28955, 198, 20337, 796, 513, 13, 1415, 19707, 1635, 2179, 952, 12429, 362, 198, 4798, 7, 69, 6, 32, 34758, 20337, 25, 13, 19, 69, 92, 11537, 198 ]
2.117647
34
import time import Queue import bisect import logging import weakref import threading import collections from lighthouse.util.misc import * from lighthouse.util.disassembler import disassembler logger = logging.getLogger("Lighthouse.Metadata") #------------------------------------------------------------------------...
[ 11748, 640, 198, 11748, 4670, 518, 198, 11748, 47457, 478, 198, 11748, 18931, 198, 11748, 4939, 5420, 198, 11748, 4704, 278, 198, 11748, 17268, 198, 198, 6738, 46371, 13, 22602, 13, 44374, 1330, 1635, 198, 6738, 46371, 13, 22602, 13, 63...
2.732642
12,631
from bottle import route, run, template, request import tensorflow as tf import numpy as np import os from tensorflow.contrib import learn import json from io import StringIO import data_helpers tf.flags.DEFINE_string("checkpoint_dir", ".", "Checkpoint directory from training run") tf.flags.DEFINE_boolean("allow_soft...
[ 6738, 9294, 1330, 6339, 11, 1057, 11, 11055, 11, 2581, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 6738, 11192, 273, 11125, 13, 3642, 822, 1330, 2193, 198, 11748, 33918, 198, 67...
2.919861
287
import json f = open("../../config/matcher.txt", "r") table_list = [] processor_list = [] match_map = {} while True: line = f.readline() # print(line) if not line: break elif line[0] == '#' or line[0] == '/' or line == "\n": continue else: l = line.split() # pri...
[ 198, 11748, 33918, 198, 198, 69, 796, 1280, 7203, 40720, 40720, 11250, 14, 6759, 2044, 13, 14116, 1600, 366, 81, 4943, 198, 198, 11487, 62, 4868, 796, 17635, 198, 198, 41341, 62, 4868, 796, 17635, 198, 198, 15699, 62, 8899, 796, 23884...
1.966618
689
# Image handling imports from skimage import data, io from skimage.transform import rescale, resize from skimage.util import img_as_ubyte from skimage.color import rgba2rgb # Excel manipulation imports from openpyxl import Workbook from openpyxl.styles import PatternFill, Color from openpyxl.utils.cell import get_colu...
[ 2, 7412, 9041, 17944, 198, 6738, 1341, 9060, 1330, 1366, 11, 33245, 198, 6738, 1341, 9060, 13, 35636, 1330, 6811, 1000, 11, 47558, 198, 6738, 1341, 9060, 13, 22602, 1330, 33705, 62, 292, 62, 549, 88, 660, 198, 6738, 1341, 9060, 13, ...
2.54312
1,519
# -*- coding: utf-8 -*- """ Created on Tue May 25 13:35:36 2021 @author: xie(508) """ import numpy as np import Funcs import time from scipy import sparse from scipy.sparse.linalg import eigs #########################################
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 1737, 1679, 1511, 25, 2327, 25, 2623, 33448, 198, 198, 31, 9800, 25, 2124, 494, 7, 33042, 8, 198, 37811, 198, 198, 11748, 299, 32152, 35...
2.938272
81
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 29113, 7804, 4242, 2235, 198, 2, 198, 2, 220, 220, 220, 4946, 1137, 47, 11, 4946, 8090, 8549, 28186, 198, 2, 220, 220, 220, 15069, 357, 34, 8, 5472, 12, 10333...
3.232456
456
# coding=utf-8 import os as os import io as io import datetime as dt from ruffus import * from pipelines.auxmod.auxiliary import read_chromsizes, open_comp, collect_full_paths from pipelines.auxmod.enhancer import process_merged_encode_enhancer, \ process_vista_enhancer, merge_genehancer_annotation, process_hsa_...
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 11748, 28686, 355, 28686, 198, 11748, 33245, 355, 33245, 198, 11748, 4818, 8079, 355, 288, 83, 198, 198, 6738, 374, 1648, 385, 1330, 1635, 198, 198, 6738, 31108, 13, 14644, 4666, 13, 14644, 28129...
1.720052
54,553
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628, 628, 628, 628, 628 ]
2.8
10
from .settings import * # AWS URLs AWS_STORAGE_BUCKET_NAME = 'sng-files2' AWS_S3_CUSTOM_DOMAIN = '%s.s3.amazonaws.com' % AWS_STORAGE_BUCKET_NAME STATIC_URL = "https://%s/%s/" % (AWS_S3_CUSTOM_DOMAIN, STATIC_FILES_LOCATION) MEDIA_URL = "https://%s/%s/" % (AWS_S3_CUSTOM_DOMAIN, MEDIA_FILES_LOCATION) # Database DATABASE...
[ 6738, 764, 33692, 1330, 1635, 198, 198, 2, 30865, 32336, 198, 12298, 50, 62, 2257, 1581, 11879, 62, 33, 16696, 2767, 62, 20608, 796, 705, 82, 782, 12, 16624, 17, 6, 198, 12298, 50, 62, 50, 18, 62, 34, 7759, 2662, 62, 39170, 29833,...
2.092949
312
from pymtl import * from lizard.model.hardware_model import HardwareModel from lizard.model.flmodel import FLModel
[ 6738, 279, 4948, 28781, 1330, 1635, 198, 198, 6738, 42406, 13, 19849, 13, 10424, 1574, 62, 19849, 1330, 28715, 17633, 198, 6738, 42406, 13, 19849, 13, 2704, 19849, 1330, 9977, 17633, 628 ]
3.65625
32
from bug_killer_app.datastore.project_table.project_item import ProjectItem class DummyTransactWrite: """ Unit tests can't use a connection for transact write. Instead, we batch write items """
[ 6738, 5434, 62, 32156, 62, 1324, 13, 19608, 459, 382, 13, 16302, 62, 11487, 13, 16302, 62, 9186, 1330, 4935, 7449, 628, 198, 4871, 360, 13513, 8291, 529, 16594, 25, 198, 220, 220, 220, 37227, 11801, 5254, 460, 470, 779, 257, 4637, 3...
3.703704
54
#!/usr/bin/env python3 import argparse import logging import time from uuid import uuid4 import grpc import yandexcloud from yandex.cloud.marketplace.v1.metering.image_product_usage_service_pb2 import WriteImageProductUsageRequest from yandex.cloud.marketplace.v1.metering.image_product_usage_service_pb2_grpc import I...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 640, 198, 6738, 334, 27112, 1330, 334, 27112, 19, 198, 198, 11748, 1036, 14751, 198, 11748, 331, 392, 1069, 17721, 198, 6738, ...
2.87214
743
# scaler.py from sklearn.preprocessing import StandardScaler, RobustScaler import pandas as pd from util import Util import glob_conf # class to normalize speech parameters
[ 2, 16578, 263, 13, 9078, 628, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 8997, 3351, 36213, 11, 3851, 436, 3351, 36213, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 7736, 1330, 7273, 346, 198, 11748, 15095, 62, 10414, 198, 220...
3.442308
52
#!/usr/bin/env python import numpy as np import tensorflow as tf #from tensorflow.models.rnn import rnn, rnn_cell from tensorflow.python.ops import functional_ops from tensorflow.python.ops import variable_scope as vs from tensorflow.contrib.rnn.python.ops.rnn_cell import _linear from ..nn import NeuralNetworkModel,...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 2, 6738, 11192, 273, 11125, 13, 27530, 13, 81, 20471, 1330, 374, 20471, 11, 374, 20471, 62, 384...
2.583995
1,762
import sys,os ## Example of test that could be done with python # os.environ["SPARK_HOME"] = '/opt/cloudera/parcels/CDH/lib/spark' # os.environ['PYSPARK_PYTHON'] = '/usr/bin/python3' # sys.path.append('/opt/cloudera/parcels/CDH/lib/spark/python') # sys.path.append('/opt/cloudera/parcels/CDH/lib/spark/python/lib/py4j-...
[ 11748, 25064, 11, 418, 198, 198, 2235, 17934, 286, 1332, 326, 714, 307, 1760, 351, 21015, 198, 198, 2, 28686, 13, 268, 2268, 14692, 4303, 14175, 62, 39069, 8973, 796, 31051, 8738, 14, 565, 280, 1082, 64, 14, 1845, 5276, 82, 14, 8610...
2.445378
238
from rl.agents.agents import Agent from rl.agents.ppo import PPOAgent
[ 198, 6738, 374, 75, 13, 49638, 13, 49638, 1330, 15906, 198, 6738, 374, 75, 13, 49638, 13, 16634, 1330, 350, 16402, 36772, 198 ]
3.086957
23
import copy import itertools import numpy as np from sklearn.preprocessing import normalize from UQpy.Utilities import * import functools import scipy.sparse as sps import scipy.sparse.linalg as spsl import scipy.spatial.distance as sd from scipy.interpolate import LinearNDInterpolator from UQpy.Surrogates import Kr...
[ 11748, 4866, 198, 11748, 340, 861, 10141, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 3487, 1096, 198, 6738, 471, 48, 9078, 13, 18274, 2410, 1330, 1635, 198, 11748, 1257, 310, 10141, 198, 198,...
2.283588
26,267
import unittest from .common import workspace workspace.init(force=True) workspace.reload() if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 764, 11321, 1330, 44573, 198, 198, 5225, 10223, 13, 15003, 7, 3174, 28, 17821, 8, 198, 5225, 10223, 13, 260, 2220, 3419, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, ...
2.716981
53
import os basedir = os.path.abspath(os.path.dirname(__file__)) allowed_extensions = ['png', 'jpg', 'jpeg'] upload_folder = os.path.join(basedir, 'slideshow/static/images/slideshow_images')
[ 11748, 28686, 198, 198, 3106, 343, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 198, 198, 40845, 62, 2302, 5736, 796, 37250, 11134, 3256, 705, 9479, 3256, 705, 73, 22071, 2052...
2.662162
74
import sys import h5py import numpy as np import cv2 J = 16 edges = [[0, 1], [1, 2], [2, 6], [6, 3], [3, 4], [4, 5], [10, 11], [11, 12], [12, 8], [8, 13], [13, 14], [14, 15], [6, 8], [8, 9]] # if __name__ == '__main__': # tmpFile = sys.argv[2] # data = getData(tmpFile) # eval(sys.argv[1] + '(data)')...
[ 11748, 25064, 198, 11748, 289, 20, 9078, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 198, 41, 796, 1467, 198, 276, 3212, 796, 16410, 15, 11, 352, 4357, 685, 16, 11, 362, 4357, 685, 17, 11, 718, 4357, 685, 21,...
1.883041
171
"""Change step fields. Revision ID: 52b9c8f82d15 Revises: 1a27a3453938 Create Date: 2013-07-26 16:28:08.535654 """ # revision identifiers, used by Alembic. revision = '52b9c8f82d15' down_revision = '1a27a3453938' from alembic import op import sqlalchemy as sa
[ 37811, 19400, 2239, 7032, 13, 198, 198, 18009, 1166, 4522, 25, 6740, 65, 24, 66, 23, 69, 6469, 67, 1314, 198, 18009, 2696, 25, 352, 64, 1983, 64, 27712, 2670, 2548, 198, 16447, 7536, 25, 2211, 12, 2998, 12, 2075, 1467, 25, 2078, 2...
2.418182
110
#lifo stack=[] try: #try except so that the program does not crash[optional] while True: op = int(input("Select---> 1 to push, 2 to pop top most element, 3 to display elements in stack,4 to peek,5 to exit ")) if op==1: #to push into stack ele = int(input("enter e...
[ 2, 36195, 78, 628, 198, 25558, 28, 21737, 198, 28311, 25, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 28311, 2845, 523, 326, 262, 1430, 857, 407, 7014, 58, 25968, 60, 198, 197, 4514, 6407, 25, 198, 197, 197, 404, 796, ...
1.934667
750
import plotext as plt data1 = [403401,403496,403151,402894,402916,403069,402988,403035,403187,403027,403059,403134,403276,403149,403149,402927,403019,403205,403240,403512,403584,403645,403646,404402,404986,405327,405627,405757] plt.plot(data1, label='Harris County') plt.plotsize(100,30) plt.title("Harris County") plt.s...
[ 11748, 458, 1258, 742, 355, 458, 83, 198, 7890, 16, 796, 685, 1821, 2682, 486, 11, 1821, 2682, 4846, 11, 31552, 24309, 11, 1821, 2078, 5824, 11, 1821, 1959, 1433, 11, 1821, 1270, 3388, 11, 1821, 1959, 3459, 11, 1821, 1270, 2327, 11,...
2.062893
159
#!/usr/bin/env python # -*- coding: utf-8 -*- # author: donglee # environment:python2.7 # 模拟的为单原子分子所构成的系统 # My unit system: energy-eV; length-Angstrom; mass-atomic mass unit import numpy as np import math import initialize_position as i_p import initialize_velocity as i_i import find_neighbor as f_n impor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 1772, 171, 120, 248, 288, 506, 7197, 220, 201, 198, 2, 2858, 171, 120, 248, 29412, 17, 13, 22, 201, ...
1.544188
2,082
import numpy as np import tensorflow as tf
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198 ]
3.307692
13
""" Batch test code for Gen-LaneNet with new anchor extension. It predicts 3D lanes per image. Author: Yuliang Guo (33yuliangguo@gmail.com) Date: March, 2020 """ import numpy as np import torch import torch.optim import glob from tqdm import tqdm from dataloader.Load_Data_3DLane_ext import * from networks import GeoN...
[ 37811, 198, 33, 963, 1332, 2438, 329, 5215, 12, 43, 1531, 7934, 351, 649, 18021, 7552, 13, 632, 26334, 513, 35, 15296, 583, 2939, 13, 198, 198, 13838, 25, 575, 377, 15483, 1962, 78, 357, 2091, 88, 377, 15483, 5162, 78, 31, 14816, ...
2.439259
1,457
# Lint as: python3 # Copyright 2019 The TensorFlow Authors. 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 ...
[ 2, 406, 600, 355, 25, 21015, 18, 198, 2, 15069, 13130, 383, 309, 22854, 37535, 46665, 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...
3.684982
273
import numpy as np from tensorflow import keras from keras import layers, models, optimizers from keras.applications import mobilenet_v2 from libmot import TFlite num_classes = 10 input_shape = (32, 32, 3) model = get_model() x_train, y_train, x_test, y_test = get_data() batch_size = 128 epochs = 10 model.fit(x_tr...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 11192, 273, 11125, 1330, 41927, 292, 198, 6738, 41927, 292, 1330, 11685, 11, 4981, 11, 6436, 11341, 198, 6738, 41927, 292, 13, 1324, 677, 602, 1330, 17754, 268, 316, 62, 85, 17, 198, 6738, 919...
2.254833
569
#SETTINGS FOR EEL EEL_PORT = 1234 EEL_HOST = 'localhost' EEL_PATH = 'http://%s:%d/' % (EEL_HOST, EEL_PORT) #SETTINGS FOR REACT REACT_DEV_PATH = 'http://localhost:3000/' #OTHER SETTINGS TMP_FOLDER = 'tmp'
[ 198, 2, 28480, 51, 20754, 7473, 412, 3698, 198, 36, 3698, 62, 15490, 796, 1105, 2682, 198, 36, 3698, 62, 39, 10892, 796, 705, 36750, 6, 198, 36, 3698, 62, 34219, 796, 705, 4023, 1378, 4, 82, 25, 4, 67, 14, 6, 4064, 357, 36, 36...
2.090909
99
import unittest import pokershell.config as config
[ 11748, 555, 715, 395, 198, 198, 11748, 279, 18698, 12758, 13, 11250, 355, 4566, 628 ]
3.533333
15
#!/usr/bin/env python import numpy as np from numpy import inf import matplotlib.pyplot as plt locations = [] f = open("berlin52.txt", "r+") u = f for line in u: line = line.split(" ", 1)[1] y = line.split() y[0] = float(y[0]) y[1] = float(y[1]) locations.append(y) print(locations) dist = np.zeros(...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 1330, 1167, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 17946, 602, 796, 17635, 198, 69, 796, 1280, 7203, 5...
1.740976
2,521
import time from cases.base import AndroidBaseTest
[ 11748, 640, 198, 6738, 2663, 13, 8692, 1330, 5565, 14881, 14402 ]
4.545455
11
import random if __name__ == '__main__': assert reverse_string('stressed') == 'desserts' assert concat_odd_chars('パタトクカシーー') == 'パトカー' assert concat_each_char_1by1('パトカー', 'タクシー') == 'パタトクカシーー' text = 'Now I need a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.' ...
[ 11748, 4738, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 6818, 9575, 62, 8841, 10786, 301, 2790, 11537, 6624, 705, 67, 20335, 82, 6, 198, 220, 220, 220, 6818, 1673, 265, 62, 5088, 62, 354,...
2.314103
624
# coding: utf-8 import requests import sqlite3 import datetime #from dbfunctions import * token = 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NDQ0NDczOTQsImlkIjoiYWxpc2EiLCJvcmlnX2lhdCI6MTU0NDM2MDk5NCwidXNlcmlkIjo1MTM1MDcsInVzZXJuYW1lIjoidmxrb290bW5pIn0.bAuaOVEjreH6BL1i6afcano6KE_HEbAEVVZr5SYWMv_wEQ4eWXl_yErRatK...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 11748, 7007, 198, 11748, 44161, 578, 18, 198, 11748, 4818, 8079, 198, 2, 6738, 20613, 12543, 2733, 1330, 1635, 198, 198, 30001, 796, 705, 2959, 41, 71, 65, 38, 979, 46, 72, 41, 12564, 89, 40, ...
1.704762
525
#DDSIV Luis Enrique Lopez Chaidez import json # Abrimos el archivo de prueba json_file = open("ej2.json", "r", encoding='utf-8') dpy = json.load(json_file) # Lo cargamos como diccionario de python print("Introduzca el id de la prueba") opcion = input(">") # preguntamos por el id de la prueba # Iteramos por los ele...
[ 2, 35, 5258, 3824, 20894, 46879, 22593, 20703, 485, 89, 198, 11748, 33918, 198, 198, 2, 317, 1671, 320, 418, 1288, 3934, 23593, 390, 778, 518, 7012, 198, 17752, 62, 7753, 796, 1280, 7203, 68, 73, 17, 13, 17752, 1600, 366, 81, 1600, ...
2.321429
336
from em_utilities import * import sframe as sf from sklearn.feature_extraction.text import TfidfVectorizer , CountVectorizer from sklearn.neighbors import NearestNeighbors import scipy import time # # Section 0: # ## Dataset definition and feature extraction (tf-idf) dataset= sf.SFrame('Dataset/KO_data.csv') data...
[ 6738, 795, 62, 315, 2410, 1330, 1635, 198, 11748, 264, 14535, 355, 264, 69, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 309, 69, 312, 69, 38469, 7509, 837, 2764, 38469, 7509, 198, 6738, 1341, 35720, 13, 710, 3...
2.856189
1,947
from datetime import datetime from github_reporter.data.comment import Comment from github_reporter.data.event import Event from github_reporter.data.issue import Issue from json import JSONEncoder
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 33084, 62, 260, 26634, 13, 7890, 13, 23893, 1330, 18957, 198, 6738, 33084, 62, 260, 26634, 13, 7890, 13, 15596, 1330, 8558, 198, 6738, 33084, 62, 260, 26634, 13, 7890, 13, 21949, 1330, 18...
3.98
50
#!/usr/bin/env python from __future__ import print_function import sys import os import copy import shutil import time import subprocess import argparse import json import gc import cv2 import numpy as np import math as m from Imports.util_video import FileVideoGrab from Imports.util_video import FrameStamps from Impor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 4866, 198, 11748, 4423, 346, 198, 11748, 640, 198, 11748, 850, 14681, 198, 11748, 1822, 2...
3.283333
120
expected_output = { 'services-accounting-information': { 'flow-aggregate-template-detail': { 'flow-aggregate-template-detail-ipv4': { 'detail-entry': { 'byte-count': '180', 'destination-address': '192.168.61.2', 'destination-mask': '0', ...
[ 40319, 62, 22915, 796, 1391, 198, 338, 712, 1063, 12, 23317, 278, 12, 17018, 10354, 1391, 198, 220, 220, 220, 705, 11125, 12, 9460, 49373, 12, 28243, 12, 49170, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 11125, 12, 94...
1.663837
589
from django.shortcuts import render, get_object_or_404 from .models import Blog #function to get objects from blog app""" #Function returning the primary key of all objects in job or displays a 404 error
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 651, 62, 15252, 62, 273, 62, 26429, 198, 6738, 764, 27530, 1330, 14001, 198, 198, 2, 8818, 284, 651, 5563, 422, 4130, 598, 37811, 198, 198, 2, 22203, 8024, 262, 4165, 1994, 286, ...
3.980769
52
from collections.abc import Iterable # 高级特性: 迭代 # 无论有无下标, 都可以迭代 d = {'a': 1, 'b': 2, 'c': 3} # 迭代字典的key for key in d: print(key) # 迭代字典的value for value in d.values(): print(value) # 同时迭代字典的key和value for k, v in d.items(): print(k, ':', v) # 迭代字符串 for ch in 'ABCD': print(ch) # 如何判断一个对象是可迭代对象呢? # 方法...
[ 6738, 17268, 13, 39305, 1330, 40806, 540, 198, 198, 2, 16268, 45865, 163, 118, 100, 31965, 117, 45250, 100, 25, 5525, 123, 255, 47987, 198, 198, 2, 10545, 245, 254, 164, 106, 118, 17312, 231, 33768, 254, 10310, 233, 43718, 229, 11, ...
1.512583
755
# Generated by Django 3.2.5 on 2021-07-18 12:49 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 20, 319, 33448, 12, 2998, 12, 1507, 1105, 25, 2920, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
import os import math import argparse import tensorboardX import torch.optim as optim import horovod.torch as hvd import torch.nn.functional as F import torch.backends.cudnn as cudnn import torch.utils.data.distributed from tqdm import tqdm from dataloaders import * from torchvision.models import alexnet from optimiz...
[ 11748, 28686, 198, 11748, 10688, 198, 11748, 1822, 29572, 198, 11748, 11192, 273, 3526, 55, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 3076, 709, 375, 13, 13165, 354, 355, 289, 20306, 198, 11748, 28034, 13, 20471, 13, 45124, 3...
2.365013
2,378
from typing import List, Dict, Optional import cv2 import numpy as np from albumentations.core.composition import Compose from torch.utils.data import Dataset
[ 6738, 19720, 1330, 7343, 11, 360, 713, 11, 32233, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 435, 65, 1713, 602, 13, 7295, 13, 785, 9150, 1330, 3082, 577, 198, 6738, 28034, 13, 26791, 13, 7890, 1330...
3.425532
47
import pytest import mxnet as mx import numpy as np from gluonnlp.utils.parameter import grad_global_norm, clip_grad_global_norm from mxnet.test_utils import assert_almost_equal mx.npx.set_np() @pytest.mark.parametrize('max_norm,check_isfinite', [(1, True), (1, False...
[ 11748, 12972, 9288, 198, 11748, 285, 87, 3262, 355, 285, 87, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1278, 84, 261, 21283, 79, 13, 26791, 13, 17143, 2357, 1330, 3915, 62, 20541, 62, 27237, 11, 10651, 62, 9744, 62, 20541, 62, ...
1.874419
215
import random import math
[ 11748, 4738, 198, 11748, 10688 ]
5
5
"""This module implements AWSAnnotation, a COVAAnnotate subclass, that annotates a dataset using AWS Sagemaker after uploading images to an S3 bucket.""" import io import logging import os import time import boto3 import cv2 from PIL import Image import numpy as np from edge_autotune.pipeline.pipeline import COVAAn...
[ 37811, 1212, 8265, 23986, 30865, 2025, 38983, 11, 257, 7375, 11731, 2025, 1662, 378, 47611, 11, 326, 24708, 689, 257, 27039, 1262, 30865, 25605, 32174, 706, 33794, 4263, 284, 281, 311, 18, 19236, 526, 15931, 198, 198, 11748, 33245, 198, ...
2.281961
2,284
import inspect import os from sys import getrecursionlimit from threading import Lock from time import time, sleep from typing import List, Dict, Optional import cfscrape import requests from bs4 import BeautifulSoup from requests import Response from sqlalchemy import func from sqlalchemy.orm import Session from def...
[ 11748, 10104, 198, 11748, 28686, 198, 6738, 25064, 1330, 651, 8344, 24197, 32374, 198, 6738, 4704, 278, 1330, 13656, 198, 6738, 640, 1330, 640, 11, 3993, 198, 6738, 19720, 1330, 7343, 11, 360, 713, 11, 32233, 198, 198, 11748, 30218, 141...
2.712676
355
import os from hydroDL.master import basinFull import torch outLst = ['G200Norm', 'G400Norm'] epLst = list(range(100, 1100, 100)) # save for outName in outLst: for ep in epLst: outFolder = basinFull.nameFolder(outName) modelFile = os.path.join(outFolder, 'model_ep{}'.format(ep)) model = t...
[ 198, 11748, 28686, 198, 6738, 17173, 19260, 13, 9866, 1330, 34164, 13295, 198, 11748, 28034, 198, 198, 448, 43, 301, 796, 37250, 38, 2167, 35393, 3256, 705, 38, 7029, 35393, 20520, 198, 538, 43, 301, 796, 1351, 7, 9521, 7, 3064, 11, ...
2.470874
206
from prometheus_client.core import GaugeMetricFamily class ArrayHttpSpecificPerformanceMetrics(): """ Base class for FlashBlade Prometheus array HTTP specific performance metrics """ def _performance(self): """ Create array HTTP specific performance metrics of gauge type. """ ...
[ 6738, 1552, 36916, 62, 16366, 13, 7295, 1330, 35094, 469, 9171, 1173, 24094, 198, 198, 4871, 15690, 43481, 32419, 32273, 9171, 10466, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 7308, 1398, 329, 9973, 47520, 42696, 7177, 14626, ...
1.735195
1,182
from oc_web_scraper.logger import Logger from oc_web_scraper.category import Category class Library: """Library class handles scrapping content collection and storage by instantiating Category objects. Attributes: logger (Logger): Main app logger object. Passed in instantiation arguments. ...
[ 6738, 267, 66, 62, 12384, 62, 1416, 38545, 13, 6404, 1362, 1330, 5972, 1362, 198, 6738, 267, 66, 62, 12384, 62, 1416, 38545, 13, 22872, 1330, 21743, 628, 198, 4871, 10074, 25, 198, 220, 220, 220, 37227, 23377, 1398, 17105, 19320, 2105...
2.722689
357