content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import json import os from contextlib import contextmanager from datetime import date, datetime, timedelta from unittest.mock import Mock import pytest from bs4 import BeautifulSoup from flask import Flask, url_for from notifications_python_client.errors import HTTPError from notifications_utils.url_safe_token import ...
[ 11748, 33918, 198, 11748, 28686, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 6738, 4818, 8079, 1330, 3128, 11, 4818, 8079, 11, 28805, 12514, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 198, 198, 11748, 12972, 9288, 198, 6738,...
2.730745
3,142
# For plotting the images from matplotlib import pyplot as plt import numpy as np from som import SOM #source https://codesachin.wordpress.com/2015/11/28/self-organizing-maps-with-googles-tensorflow/ # Training inputs for RGBcolors colors = np.array( [[0., 0., 0.], [0., 0., 1.], [0., 0., 0.5], [0.1...
[ 2, 1114, 29353, 262, 4263, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 3870, 1330, 42121, 198, 198, 2, 10459, 3740, 1378, 40148, 620, 259, 13, 40346, 13, 785, 14, 4626...
2.095915
563
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 26144, 35986, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760, 644, 345, 389, 1804, 0, 17202, ...
2.443598
656
# encoding: utf-8 __author__ = "Dimitrios Karkalousos" # Taken and adapted from: https://github.com/NVIDIA/NeMo/blob/main/nemo/core/classes/module.py from abc import ABC from contextlib import contextmanager from torch.nn import Module __all__ = ["NeuralModule"] from mridc.core.classes.common import FileIO, Seriali...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 834, 9800, 834, 796, 366, 29271, 49510, 418, 509, 668, 282, 516, 418, 1, 198, 198, 2, 30222, 290, 16573, 422, 25, 3740, 1378, 12567, 13, 785, 14, 38021, 14, 8199, 16632, 14, 2436, 672, 14, 12...
2.613354
644
# -*- encoding: utf-8 -*- """ @File : urls @Date : 2019/11/15 @Author : Regulus @Contact : yusheng831143@gmail.com @Desc : 所有首页相关url映射。 """ from django.urls import path from apps.index import views app_name = 'app_index' urlpatterns = [ path('', views.index, name='index'), path('home', views.home,...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 8979, 220, 220, 220, 1058, 2956, 7278, 198, 31, 10430, 220, 220, 220, 1058, 13130, 14, 1157, 14, 1314, 198, 31, 13838, 220, 1058, 3310, 23515, 198, 31,...
2.349057
212
import numpy as np from .._tier0 import Image def touching_labels_to_networkx(label_image:Image): """ Takes a label image, determines which labels are touching each other and returns an networkx graph representing labels in range. Parameters ---------- label_image : Image Returns ----...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 11485, 62, 24948, 15, 1330, 7412, 198, 198, 4299, 15241, 62, 23912, 1424, 62, 1462, 62, 27349, 87, 7, 18242, 62, 9060, 25, 5159, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 33687, 2...
2.90411
219
# Copyright 2019-2020 Xanadu Quantum Technologies 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...
[ 2, 15069, 13130, 12, 42334, 47482, 324, 84, 29082, 21852, 3457, 13, 198, 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,...
2.657751
6,057
""" 更加简洁的WeightDefiner版本 用于实现bug report转vec 2021.4.14 crx """ from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer from file_reader import FileReader from file_writer import JSONWriter from constants import data_pool_path import os if __name__ == '__main__': wd = VectorBuilder('report',...
[ 37811, 198, 162, 249, 112, 27950, 254, 163, 106, 222, 162, 112, 223, 21410, 25844, 7469, 7274, 48304, 17312, 105, 198, 18796, 101, 12859, 236, 22522, 252, 163, 236, 108, 25456, 989, 164, 121, 105, 35138, 198, 1238, 2481, 13, 19, 13, ...
2.528571
140
# @file cli.py # @brief cli of whole tool # README: Command line interface # MODULE_ARCH: # CLASS_ARCH: # GLOBAL USAGE: #standard import cmd #extend #library import lib.globalclasses as gc from lib.const import * ##### Code section ##### #Spec: local variable maintain, about, user commands, test commands #How/Need...
[ 2, 2488, 7753, 537, 72, 13, 9078, 198, 2, 2488, 65, 3796, 537, 72, 286, 2187, 2891, 198, 2, 20832, 11682, 25, 9455, 1627, 7071, 198, 2, 33893, 62, 31315, 25, 220, 220, 198, 2, 42715, 62, 31315, 25, 198, 2, 10188, 9864, 1847, 129...
2.018905
2,063
#!/usr/bin/env python import boto3 rds = boto3.client('rds') try: # get all of the db instances dbs = rds.describe_db_instances() for db in dbs['DBInstances']: print ("{}".format(db['Endpoint']['Address'])) except Exception as error: print (error)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 275, 2069, 18, 198, 4372, 82, 796, 275, 2069, 18, 13, 16366, 10786, 4372, 82, 11537, 198, 28311, 25, 198, 220, 220, 220, 1303, 651, 477, 286, 262, 20613, 10245, 198, 220, 220,...
2.419643
112
#!/usr/bin/env python # # ovf.py - Class for OVF/OVA handling # # August 2013, Glenn F. Matthews # Copyright (c) 2013-2017, 2019 the COT project developers. # See the COPYRIGHT.txt file at the top-level directory of this distribution # and at https://github.com/glennmatthews/cot/blob/master/COPYRIGHT.txt. # # This file...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 19643, 69, 13, 9078, 532, 5016, 329, 440, 53, 37, 14, 41576, 9041, 198, 2, 198, 2, 2932, 2211, 11, 17551, 376, 13, 22233, 198, 2, 15069, 357, 66, 8, 2211, 12, 5539, ...
2.062425
59,159
# 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 not u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
3.306584
486
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from .twitch import Messages, Channel from .subtitles import SubtitleWriter from .settings import argparser, settings if __name__ == "__main__": main()
[ 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, 33918, 198, 198, 6738, 764, 31844, 1330, 43534, 11, 11102, 198, 6738, 764, 7266, 83, 30540, 1330, 3834, 783...
2.96
75
import numpy as np from cereal import car from selfdrive.config import Conversions as CV from selfdrive.car.interfaces import CarStateBase from opendbc.can.parser import CANParser from opendbc.can.can_define import CANDefine from selfdrive.car.volkswagen.values import DBC, CANBUS, NWL, TRANS, GEAR, BUTTON_STATES, CarCo...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 33158, 1330, 1097, 198, 6738, 2116, 19472, 13, 11250, 1330, 32200, 507, 355, 26196, 198, 6738, 2116, 19472, 13, 7718, 13, 3849, 32186, 1330, 1879, 9012, 14881, 198, 6738, 1034, 437, 15630, 13, 5...
3.383838
99
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-06-03 06:27 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 319, 2864, 12, 3312, 12, 3070, 9130, 25, 1983, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738...
2.933333
75
import debug import random main(5) print("-" * 50) main(10) print("-" * 50) main(15) print("-" * 50) main(20) print("-" * 50) main(30) print("-" * 50)
[ 198, 11748, 14257, 198, 11748, 4738, 198, 198, 12417, 7, 20, 8, 198, 4798, 7203, 21215, 1635, 2026, 8, 198, 198, 12417, 7, 940, 8, 198, 4798, 7203, 21215, 1635, 2026, 8, 198, 198, 12417, 7, 1314, 8, 198, 4798, 7203, 21215, 1635, 2...
2.197183
71
# # Valuation of Zero-Coupon Bonds # in Cox-Ingersoll-Ross (1985) Model # 09_gmm/CIR_zcb_valuation_gen.py # # (c) Dr. Yves J. Hilpisch # Derivatives Analytics with Python # import math import numpy as np # # Example Parameters CIR85 Model # r0, kappa_r, theta_r, sigma_r, t, T = 0.04, 0.3, 0.04, 0.1, 0.5, 5.0 # # Zero...
[ 2, 198, 2, 3254, 2288, 286, 12169, 12, 34, 10486, 261, 39161, 198, 2, 287, 18014, 12, 27682, 364, 692, 12, 38328, 357, 29110, 8, 9104, 198, 2, 7769, 62, 70, 3020, 14, 34, 4663, 62, 89, 21101, 62, 2100, 2288, 62, 5235, 13, 9078, ...
2.01153
954
THIS.CODE.IS.UNDER.CONSTRUCTION import tcp_helper as helper import gen_rulemanager #import protocol helper_config = { "mode": "client", "address": None, # or IPv4/IPv6 address "port": None, # TCP port, "compression": False, "fragmentation": False } rule_manager = XXX rule_manager.Add({ rule_set }...
[ 43559, 13, 34, 16820, 13, 1797, 13, 4944, 14418, 13, 10943, 46126, 2849, 198, 198, 11748, 48265, 62, 2978, 525, 355, 31904, 198, 11748, 2429, 62, 25135, 37153, 198, 2, 11748, 8435, 198, 198, 2978, 525, 62, 11250, 796, 1391, 198, 220, ...
2.617073
410
# # --------------------------------------------------------- # Copyright 2018-present (c) Automatos Studios. All Rights Reserved. # --------------------------------------------------------- # # @file data_provider.py # @author cosmoplankton@automatos.studio # """ DataProvider Implementation: Imports the ...
[ 2, 198, 2, 20368, 22369, 12, 198, 2, 15069, 2864, 12, 25579, 357, 66, 8, 17406, 35492, 13799, 13, 1439, 6923, 33876, 13, 198, 2, 20368, 22369, 12, 198, 2, 220, 198, 2, 2488, 7753, 220, 220, 220, 220, 220, 220, 1366, 62, 15234, 1...
2.766055
436
import re import os import sys from datetime import datetime import numpy as np import scipy.io as sio import datajoint as dj import tqdm from . import (reference, utilities, acquisition, analysis) schema = dj.schema(dj.config['custom'].get('database.prefix', '') + 'extracellular') @schema @schema @schema @s...
[ 11748, 302, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 952, 355, 264, 952, 198, 11748, 1366, 73, 1563, 355, 42625, 198, 11748, ...
2.963964
111
#!/usr/bin/env python from datetime import datetime import json from fabric.api import local, require, settings, task from fabric.state import env from termcolor import colored import app_config # Other fabfiles import ap import assets import daemons import data import instagram import issues import liveblog import ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 33918, 198, 198, 6738, 9664, 13, 15042, 1330, 1957, 11, 2421, 11, 6460, 11, 4876, 198, 6738, 9664, 13, 5219, 1330, 17365, 198, 6738, 338...
2.558388
2,432
from __future__ import absolute_import, division, print_function, unicode_literals from echomesh.color import GammaTable from echomesh.util.thread import Lock # See http://dev.moorescloud.com/2012/10/18/about-lpd8806-based-rgb-led-strips/ # # Inspired by: # https://github.com/adammhaile/RPi-LPD8806/blob/master/LPD880...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 304, 354, 2586, 71, 13, 8043, 1330, 43595, 10962, 198, 6738, 304, 354, 2586, 71, 13, 22602, 13, 16663, 13...
2.66129
124
# Import import sys sys.path.append("../") # Import from apm import * # Select server server = 'http://byu.apmonitor.com' # Application name app = 'nlc' # Clear previous application apm(server,app,'clear all') # Load model file apm_load(server,app,'tank.apm') # Load time points for future predictions csv_load(se...
[ 2, 17267, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7203, 40720, 4943, 198, 198, 2, 17267, 198, 6738, 2471, 76, 1330, 1635, 198, 197, 198, 2, 9683, 4382, 198, 15388, 796, 705, 4023, 1378, 1525, 84, 13, 499, 41143, 13, 785,...
2.471847
1,776
# Copyright 2020 - Nokia Software. # # 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 a...
[ 2, 15069, 12131, 532, 26182, 10442, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 35...
3.011472
523
# Copyright (c) Microsoft Corporation # All rights reserved. # # MIT License # # Permission is hereby granted, free of charge, # to any person obtaining a copy of this software and associated # documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights...
[ 2, 15069, 357, 66, 8, 5413, 10501, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 17168, 13789, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 198, 2, 284, 597, 1048, 16727, 257, 4866, 286, 428, 3788, 290...
2.51988
2,339
# coding=utf-8 import os import caffe import yaml import numpy as np import numpy.random as npr from utils.cython_bbox import bbox_overlaps import json DEBUG = False import time import sys print sys.path class LossTargetLayer(caffe.Layer): """ Assign anchors to ground-truth targets. Produces anchor classific...
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 11748, 28686, 198, 11748, 21121, 198, 11748, 331, 43695, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 13, 25120, 355, 299, 1050, 198, 6738, 3384, 4487, 13, 948, 400, 261, 62, 65, ...
2.135036
822
import pytest import numpy as np from h5py import Group, Dataset, SoftLink, ExternalLink from h5preserve import RegistryContainer, HardLink, new_registry_list def is_matching_hdf5_object(new, old): """ Check if two objects have the same hdf5 representation """ if type(new) != type(old): retur...
[ 11748, 12972, 9288, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 289, 20, 9078, 1330, 4912, 11, 16092, 292, 316, 11, 8297, 11280, 11, 34579, 11280, 198, 198, 6738, 289, 20, 18302, 3760, 1330, 33432, 29869, 11, 6912, 11280, 11, ...
2.227642
369
from microbench import MicroBench, MBNvidiaSmi import subprocess import unittest import pandas try: subprocess.call(['nvidia-smi']) nvidia_smi_available = True except FileNotFoundError: nvidia_smi_available = False @unittest.skipIf(not nvidia_smi_available, 'nvidia-smi command not found')
[ 6738, 4580, 26968, 1330, 4527, 44199, 11, 10771, 45, 21744, 7556, 72, 198, 11748, 850, 14681, 198, 11748, 555, 715, 395, 198, 11748, 19798, 292, 198, 198, 28311, 25, 198, 220, 220, 220, 850, 14681, 13, 13345, 7, 17816, 77, 21744, 12, ...
2.798165
109
''' Extract results from the log files of Stanford sieve and put into a CSV file Usage: extract_results_stanford_sieve.py --out=<fn> <log_paths>... ''' from utils import match_with_line_no, grouper import re from docopt import docopt import pandas as pd import os if __name__ == '__main__': args = docopt...
[ 7061, 6, 198, 11627, 974, 2482, 422, 262, 2604, 3696, 286, 13863, 264, 12311, 290, 1234, 656, 257, 44189, 2393, 198, 198, 28350, 25, 198, 220, 7925, 62, 43420, 62, 14192, 3841, 62, 82, 12311, 13, 9078, 1377, 448, 28, 27, 22184, 29, ...
2.622378
143
import gevent import gevent.monkey import socket from time import sleep, time import requests import logging from typing import List import sys import os
[ 11748, 4903, 1151, 198, 11748, 4903, 1151, 13, 49572, 198, 11748, 17802, 198, 198, 6738, 640, 1330, 3993, 11, 640, 198, 11748, 7007, 198, 11748, 18931, 198, 6738, 19720, 1330, 7343, 198, 11748, 25064, 198, 11748, 28686, 628, 198 ]
4.025641
39
import scrapy from scrapy.loader import ItemLoader from scrapy.exceptions import CloseSpider from fbcrawl.spiders.fbcrawl import FacebookSpider from fbcrawl.items import EventsItem, parse_date, parse_date2 from datetime import datetime class EventsSpider(FacebookSpider): """ Parse FB events, given a page (ne...
[ 11748, 15881, 88, 198, 198, 6738, 15881, 88, 13, 29356, 1330, 9097, 17401, 198, 6738, 15881, 88, 13, 1069, 11755, 1330, 13872, 41294, 198, 6738, 277, 15630, 13132, 13, 2777, 4157, 13, 69, 15630, 13132, 1330, 3203, 41294, 198, 6738, 277,...
2.546185
249
import codecs import os.path from setuptools import find_packages, setup with open("README.rst", "r") as fh: long_description = fh.read() setup( name="massgenotyping", version=get_version("massgenotyping/__init__.py"), description=( "Python package for microsatellite genotyping from amplic...
[ 11748, 40481, 82, 198, 11748, 28686, 13, 6978, 198, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 628, 628, 198, 4480, 1280, 7203, 15675, 11682, 13, 81, 301, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220...
2.258904
730
from .redis_tools import RedisInteraction __all__ = ["RedisInteraction"]
[ 6738, 764, 445, 271, 62, 31391, 1330, 2297, 271, 9492, 2673, 198, 198, 834, 439, 834, 796, 14631, 7738, 271, 9492, 2673, 8973, 198 ]
3.083333
24
from setuptools import setup, find_packages setup( name='typogrify', version='2.0.0', packages=find_packages(), author='Christian Metts', author_email='xian@mintchaos.com', license='BSD', description='Typography related template filters for Django & Jinja2 applications', url='https://g...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 28004, 519, 81, 1958, 3256, 198, 220, 220, 220, 2196, 11639, 17, 13, 15, 13, 15, 3256, 198, 220, 220, 220, 10392, 28, 1...
2.701068
281
#!/bin/python3 # Author: Igor Andruskiewitsch # Notes: Custom commands for the Ranger terminal file manager # -- IMPORTS import os import subprocess import ranger # -- COMMON CONSTANTS NULL_ERR="2> /dev/null" MATCH="\( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \)" FIND="find -L {} {} -prune -o {} -print" FZF...
[ 2, 48443, 8800, 14, 29412, 18, 198, 2, 6434, 25, 46157, 843, 14932, 74, 769, 48279, 198, 2, 11822, 25, 8562, 9729, 329, 262, 21888, 12094, 2393, 4706, 198, 198, 2, 1377, 30023, 33002, 198, 198, 11748, 28686, 198, 11748, 850, 14681, ...
2.421918
365
from fizz_buzz_tree.fizz_buzz_tree import fizz_buzz_tree from tree.tree import Binary_Tree, TNode import pytest @pytest.fixture @pytest.fixture
[ 6738, 277, 6457, 62, 65, 4715, 62, 21048, 13, 69, 6457, 62, 65, 4715, 62, 21048, 1330, 277, 6457, 62, 65, 4715, 62, 21048, 198, 6738, 5509, 13, 21048, 1330, 45755, 62, 27660, 11, 309, 19667, 198, 11748, 12972, 9288, 198, 198, 31, ...
2.551724
58
F = '' L = '' S = input() N = len(S) M = [S[k+1] for k in range(N-2)] F = S[0] L = S[-1] for k in range(3): S = input() for w in range(N-2): M[w] += S[w+1] F += S[0] L += S[-1] res = '' for w in range(N-2): res += chr((int(F)*int(M[w])+int(L))%257) print(res)
[ 37, 796, 10148, 198, 43, 796, 10148, 198, 50, 796, 5128, 3419, 198, 45, 796, 18896, 7, 50, 8, 198, 44, 796, 685, 50, 58, 74, 10, 16, 60, 329, 479, 287, 2837, 7, 45, 12, 17, 15437, 198, 37, 796, 311, 58, 15, 60, 198, 43, 79...
1.7
170
""" Compute priorbox coordinates in center-offset(2D) form for each source feature map. Attempt to modify SSD anchor to 3D(scale:w,h,d). Create two kind of cube(small,large) in every feature map cell. Reference: https://github.com/amdegroot/ssd.pytorch/blob/master/layers/functions/prior_box.py """ from typing import L...
[ 37811, 198, 7293, 1133, 3161, 3524, 22715, 287, 3641, 12, 28968, 7, 17, 35, 8, 1296, 329, 1123, 2723, 3895, 3975, 13, 198, 37177, 284, 13096, 21252, 18021, 284, 513, 35, 7, 9888, 25, 86, 11, 71, 11, 67, 737, 13610, 734, 1611, 286,...
3.25463
216
import logging import machine import utime from m5stack import lcd # global variables logger = None # decoretor # date time function if __name__ == '__main__': id = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' password = 'xxxxxxxxxxxx' contract_amperage = "50" collect_date = "22" bp35a1 = BP...
[ 11748, 18931, 198, 11748, 4572, 198, 11748, 3384, 524, 198, 6738, 285, 20, 25558, 1330, 300, 10210, 198, 198, 2, 3298, 9633, 198, 198, 6404, 1362, 796, 6045, 198, 198, 2, 875, 9997, 273, 628, 628, 198, 198, 2, 3128, 640, 2163, 628, ...
2.605809
241
import logging import pandas as pd import spatialHeterogeneity as sh from spatialHeterogeneity.neighborhood.utils import get_node_interactions from networkx import Graph import numpy as np import spatialHeterogeneity as sh from spatialHeterogeneity.graph_builder.constants import GRAPH_BUILDER_DEFAULT_PARAMS import ma...
[ 11748, 18931, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 11748, 21739, 39, 2357, 37477, 355, 427, 198, 6738, 21739, 39, 2357, 37477, 13, 710, 394, 2865, 2894, 13, 26791, 1330, 651, 62, 17440, 62, 3849, 4658, 198, 6738, 3127,...
2.371429
2,310
import os import sys import argparse import cv2 from tqdm import tqdm from ssds.ssds import SSDDetector COLORS = [(255, 0, 0), (0, 255, 0), (0, 0, 255)] FONT = cv2.FONT_HERSHEY_SIMPLEX if __name__ == '__main__': parser = argparse.ArgumentParser(description='Demo a ssds.pytorch network') parser.add_argument(...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 198, 11748, 269, 85, 17, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 37786, 9310, 13, 824, 9310, 1330, 21252, 11242, 9250, 198, 198, 25154, 20673, 796, 47527...
2.46
450
__author__ = 'fthiele' data = { 'level 1-1': { 'level 1-1-1': { 'a': 1, 'b': 2, 'c': 3, }, 'level 1-1-2': { 'd': 4, 'e': 5, ...
[ 834, 9800, 834, 796, 705, 69, 400, 494, 293, 6, 198, 198, 7890, 796, 1391, 198, 220, 220, 220, 705, 5715, 352, 12, 16, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.217518
685
from .connected_components import find_dense_subgraphs
[ 6738, 764, 15236, 62, 5589, 3906, 1330, 1064, 62, 67, 1072, 62, 7266, 34960, 82, 198 ]
3.4375
16
import torch class PSNR: """Peak Signal to Noise Ratio img1 and img2 have range [0, 255]""" @staticmethod if __name__ == '__main__': i = torch.randn(1, 3, 20, 20) j = i / 1.000001 p = PSNR() print(p(i, j).item())
[ 11748, 28034, 628, 198, 198, 4871, 6599, 24723, 25, 198, 220, 220, 220, 37227, 6435, 461, 26484, 284, 30964, 33956, 198, 220, 220, 220, 33705, 16, 290, 33705, 17, 423, 2837, 685, 15, 11, 14280, 60, 37811, 628, 220, 220, 220, 2488, 1...
2.225225
111
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import filer.fields.image import django.db.models.deletion
[ 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, 1226, 263, 13, 25747, 13, 906...
2.912281
57
import pandas as pd from wind_power_forecasting import TIME_LABEL, NWP_PREFIX from wind_power_forecasting.utils.dataframe import extract_columns
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 2344, 62, 6477, 62, 754, 19913, 1330, 20460, 62, 48780, 3698, 11, 21966, 47, 62, 47, 31688, 10426, 198, 6738, 2344, 62, 6477, 62, 754, 19913, 13, 26791, 13, 7890, 14535, 1330, 7925, 6...
3.125
48
from settings.globalsettings import GlobalSettings globalsettings = GlobalSettings() AWS_ACCOUNT_ID = globalsettings.AWS_ACCOUNT_ID AWS_REGION = globalsettings.AWS_REGION def code_build_batch_policy_in_json(project_ids): """ Define an IAM policy statement for CodeBuild batch operation. :param project_id...
[ 6738, 6460, 13, 4743, 672, 874, 12374, 1330, 8060, 26232, 198, 198, 4743, 672, 874, 12374, 796, 8060, 26232, 3419, 198, 198, 12298, 50, 62, 26861, 28270, 62, 2389, 796, 15095, 874, 12374, 13, 12298, 50, 62, 26861, 28270, 62, 2389, 198...
1.91472
2,568
import asyncio import random import typing from abc import ABC, abstractmethod from datetime import datetime, timedelta from enum import Enum, auto import discord from redbot.core import Config from redbot.core.bot import Red from redbot.core.config import Group from . import constants, utils from .recipe_provider im...
[ 11748, 30351, 952, 198, 11748, 4738, 198, 11748, 19720, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 33829, 1330, 2039, 388, 11, 8295, 198, 198, 11748, 36446, 19...
3.612245
98
# testExplorer - import string import sys import os import win32com.client.dynamic import win32api import glob import pythoncom import time from util import CheckClean bVisibleEventFired = 0 if __name__=='__main__': TestAll() CheckClean()
[ 2, 1332, 18438, 11934, 532, 201, 198, 201, 198, 11748, 4731, 201, 198, 11748, 25064, 201, 198, 11748, 28686, 201, 198, 11748, 1592, 2624, 785, 13, 16366, 13, 67, 28995, 201, 198, 11748, 1592, 2624, 15042, 201, 198, 11748, 15095, 201, ...
2.637255
102
""" Find diffusion coefficients """ import numpy as np import apl104lib as apl104 from scipy.optimize import minimize import copy exec(open('refsample.py').read()) exec(open('expsample.py').read()) # Define problem # Optimization routine guess=np.array([7.04998003e-03, 8.69586536e-03, 4.61830549e-0...
[ 37811, 201, 198, 9938, 44258, 44036, 201, 198, 37811, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 257, 489, 13464, 8019, 355, 257, 489, 13464, 201, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 17775, 201, 19...
2.165517
290
from entrypoint import entrypoint, is_main from tests.track import track MAIN = "__main__" TEST = "__test__" entrypoint_call = entrypoint(MAIN) entrypoint_no_call = entrypoint(TEST)
[ 6738, 5726, 4122, 1330, 5726, 4122, 11, 318, 62, 12417, 198, 6738, 5254, 13, 11659, 1330, 2610, 198, 198, 5673, 1268, 796, 366, 834, 12417, 834, 1, 198, 51, 6465, 796, 366, 834, 9288, 834, 1, 628, 198, 198, 13000, 4122, 62, 13345, ...
2.863636
66
import configparser
[ 11748, 4566, 48610, 198 ]
5
4
from discord.ext import ipc from quart import (Quart, Response, abort, redirect, render_template, request, url_for) from quart_auth import AuthManager, AuthUser, Unauthorized from quart_auth import login_required as auth_required from quart_auth import login_user, logout_user from quart_discord impor...
[ 6738, 36446, 13, 2302, 1330, 20966, 66, 198, 6738, 28176, 1330, 357, 4507, 433, 11, 18261, 11, 15614, 11, 18941, 11, 8543, 62, 28243, 11, 2581, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.563055
563
import controllers.base
[ 11748, 20624, 13, 8692, 198 ]
4.8
5
import aiohttp from .exception import InvalidAPIKeyError, APIError, NotRegistered, BadRequest from .objects.leaderboards import Leaderboards from .objects.ranking import Ranking from .objects.player import Player, Formatted from .objects.api import Stats, Key from .utils import DEFAULT ##########################...
[ 11748, 257, 952, 4023, 198, 198, 6738, 764, 1069, 4516, 1330, 17665, 17614, 9218, 12331, 11, 7824, 12331, 11, 1892, 47473, 11, 7772, 18453, 198, 6738, 764, 48205, 13, 27940, 12821, 1330, 10540, 12821, 198, 6738, 764, 48205, 13, 28405, 1...
2.094851
369
from django.db import models # ---------- ---------- ---------- # ---------- ---------- ---------- # ---------- ---------- ---------- # ---------- ---------- ----------
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 24200, 438, 24200, 438, 24200, 438, 198, 2, 24200, 438, 24200, 438, 24200, 438, 198, 198, 2, 24200, 438, 24200, 438, 24200, 438, 198, 2, 24200, 438, 24200, 438, 24200, 438, 628, ...
3.765957
47
#The MIT License (MIT) # #Copyright (c) 2015 Geoffroy Givry # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, m...
[ 2, 464, 17168, 13789, 357, 36393, 8, 201, 198, 2, 201, 198, 2, 15269, 357, 66, 8, 1853, 24688, 3287, 402, 452, 563, 201, 198, 2, 201, 198, 2, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 486...
3.422156
334
import sys import time import telepot from telepot.loop import MessageLoop import pyrebase subbed = [] TOKEN = "" config = { "apiKey": "", "authDomain": "clusterscanner.firebaseio.com", "databaseURL": "https://clusterscanner.firebaseio.com", "storageBucket": "clusterscanner.appspot.com" } firebase =...
[ 11748, 25064, 198, 11748, 640, 198, 11748, 5735, 13059, 198, 6738, 5735, 13059, 13, 26268, 1330, 16000, 39516, 198, 11748, 12972, 260, 8692, 198, 198, 7266, 3077, 796, 17635, 198, 198, 10468, 43959, 796, 13538, 198, 198, 11250, 796, 1391,...
2.791667
264
# # Copyright (c) 2019. JetBrains s.r.o. # Use of this source code is governed by the MIT license that can be found in the LICENSE file. # from typing import Dict, Tuple from ._frontend_ctx import FrontendContext from ._mime_types import LETS_PLOT_JSON from .._type_utils import standardize_dict
[ 2, 198, 2, 15069, 357, 66, 8, 13130, 13, 19013, 9414, 1299, 264, 13, 81, 13, 78, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 262, 17168, 5964, 326, 460, 307, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 2, 198, 198,...
3.191489
94
# -*- coding:utf-8 -*- citys = { 'kunming': { 'country': 'China', 'population': 14000000, 'fact': 'elephint in kunming', }, 'beijing': { 'country': 'China', 'population': 2400000, 'fact': 'changcheng in beijing', }, 'shanghai': { 'country': 'C...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 19205, 82, 796, 1391, 198, 220, 220, 220, 705, 28374, 2229, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 19315, 10354, 705, 14581, 3256, 198, 220, 220, ...
2.185567
291
import algorithms import bounds #Nodes should be a dictionary of key value pairing : node num to xy coordinates #Edges are implied in the adjacency matrix #Adjacency matrix will be n x n; where n is the number of nodes
[ 11748, 16113, 198, 11748, 22303, 198, 197, 2, 45, 4147, 815, 307, 257, 22155, 286, 1994, 1988, 27356, 1058, 10139, 997, 284, 2124, 88, 22715, 198, 197, 2, 7407, 3212, 389, 17142, 287, 262, 9224, 330, 1387, 17593, 220, 198, 197, 2, 2...
3.733333
60
# -*- coding:utf8 import itertools import time import sys alphabet = u' !"#$%&\'()*+,-./:;<=>?@[\]^_`{£}~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzϕϴΩβε' alphabet_length = len(alphabet) example_key = {alphabet[i]: alphabet[(i + 32) % alphabet_length] for i in xrange(alphabet_length)} if __name__ ...
[ 2, 532, 9, 12, 19617, 25, 40477, 23, 198, 11748, 340, 861, 10141, 198, 11748, 640, 198, 11748, 25064, 198, 198, 17307, 8380, 796, 334, 6, 220, 2474, 29953, 4, 5, 43054, 3419, 9, 10, 12095, 19571, 25, 26, 27, 14804, 30, 31, 58, 5...
2.142857
161
import os
[ 11748, 28686, 628, 198 ]
3
4
############################ # Module: ICT1002 # # Language: Python2 # # Lab Exercise 1-1 # # Done By: bitxer # ############################ if __name__ == '__main__': main()
[ 14468, 7804, 4242, 198, 2, 19937, 25, 314, 4177, 3064, 17, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 15417, 25, 11361, 17, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 3498, 32900, 352, 12, 16, 220, 220, 220...
2.315217
92
#!/usr/bin/env python # encoding: utf-8 """ @version: v1.0 @author: Shijie Qin @license: Apache Licence @contact: qsj4work@gmail.com @site: https://shijieqin.github.io @software: PyCharm @file: xmlrpc.py @time: 2018/11/8 3:16 PM """ import xmlrpc.client
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 220, 220, 198, 2, 21004, 25, 3384, 69, 12, 23, 220, 198, 198, 37811, 220, 198, 31, 9641, 25, 410, 16, 13, 15, 220, 198, 31, 9800, 25, 911, 2926, 494, 31482, 220, 198, 31, 43085, 25, ...
2.214876
121
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from datetime import timedelta try: from urllib.parse import urlparse except ImportError: # python2 from urlparse import urlparse import requests from django.conf import settings from django.db import models, transaction from d...
[ 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, 11748, 18931, 198, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 28311, 25, 198, 220, 220, 2...
3.252941
170
import logging logger = logging.getLogger(__name__)
[ 11748, 18931, 628, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 628 ]
3
19
import numpy as np from scipy import stats from copy import copy import csv import math import pandas as pd """ Get the unique values for each column in a dataset. - value_dic = {col_num:{row_value:index}} """ """ Takes a dataset of strings and returns the integer mapping of the string values. - return_dic: True - ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 9756, 198, 6738, 4866, 1330, 4866, 198, 11748, 269, 21370, 198, 11748, 10688, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 37811, 198, 3855, 262, 3748, 3815, 329, 1123, ...
3.3
190
from pycsp3.problems.data.parsing import * next_line() data["height"] = next_int() data["width"] = next_int() next_line() nBugTypes = next_int() next_line() bugTypesLength = [next_int() for i in range(nBugTypes)]; next_line() nBugs = next_int() next_line() data["bugs"] = [] data["bugTypes"] = [] lst = [False] * nB...
[ 6738, 12972, 66, 2777, 18, 13, 1676, 22143, 13, 7890, 13, 79, 945, 278, 1330, 1635, 198, 198, 19545, 62, 1370, 3419, 198, 7890, 14692, 17015, 8973, 796, 1306, 62, 600, 3419, 198, 7890, 14692, 10394, 8973, 796, 1306, 62, 600, 3419, 1...
2.492424
264
# 使用注册的方法来实现虚拟子类有两种方法:一个是使用修饰器,一个是使用register函数 import sys sys.path.extend(r'/Users/liuzhongkai/Documents/Git/PythonScript/FluentPython/chapter11_Tombola/') from random import randrange from tombola import Tombola # 使用第一种方法 @Tombola.register # 使用基类的register修饰器来创建虚拟子类
[ 2, 220, 45635, 18796, 101, 37345, 101, 37863, 234, 21410, 43095, 37345, 243, 30266, 98, 22522, 252, 163, 236, 108, 164, 247, 248, 162, 233, 253, 36310, 163, 109, 119, 17312, 231, 10310, 97, 163, 100, 235, 43095, 37345, 243, 171, 120, ...
1.40625
192
# coding: utf-8 #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #----------------------------------------------------------------------...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 10097, 45537, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, ...
3.535849
265
from django.urls import path from django.views.decorators.csrf import csrf_exempt from graphene_django.views import GraphQLView from api.schema import schema urlpatterns = [ path( "graphql", csrf_exempt( GraphQLView.as_view(graphiql=True, schema=schema)) ), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 42625, 14208, 13, 33571, 13, 12501, 273, 2024, 13, 6359, 41871, 1330, 269, 27891, 69, 62, 42679, 198, 6738, 42463, 62, 28241, 14208, 13, 33571, 1330, 29681, 9711, 7680, 198, 198, ...
2.365079
126
#!/usr/bin/env python """ Parse novoalign log, write out qc and post to database usage: author: chase.mateusiak@gmail.com output: {'librarySize': 35003, 'uniqueAlignment': 22737, 'multiMap': 1986, 'noMap': 10233, 'homopolymerFilter': 47, 'readLengthFilter': 0} output: parsed novoalign log as csv ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 220, 220, 220, 2547, 325, 645, 13038, 31494, 2604, 11, 3551, 503, 10662, 66, 290, 1281, 284, 6831, 198, 220, 220, 220, 8748, 25, 198, 220, 220, 220, 1772, 25, 15505,...
2.500454
1,101
#!/usr/bin/env python """ Parsing GO Accession from a table file produced by InterProScan and mapping to GOSlim. (c) Chien-Yueh Lee 2018 / MIT Licence kinomoto[AT]sakura[DOT]idv[DOT]tw """ from __future__ import print_function from os import path import sys import pandas as pd from goatools.obo_parser import GODag fro...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 47, 945, 278, 10351, 8798, 295, 422, 257, 3084, 2393, 4635, 416, 4225, 2964, 33351, 290, 16855, 284, 402, 2640, 2475, 13, 198, 7, 66, 8, 609, 2013, 12, 56, 518, 71, 574...
2.645743
1,386
import socket from core.redis import rds from core.triage import Triage from core.parser import ScanParser from db.db_ports import database_ports
[ 11748, 17802, 198, 198, 6738, 4755, 13, 445, 271, 220, 220, 1330, 374, 9310, 198, 6738, 4755, 13, 83, 4087, 220, 1330, 309, 4087, 198, 6738, 4755, 13, 48610, 220, 1330, 20937, 46677, 198, 6738, 20613, 13, 9945, 62, 3742, 220, 1330, ...
3.183673
49
# from functools import reduce wordlen = [2,3,4,2] sum = reduce(lambda x,y : x+y ,wordlen ) print(sum) print(sum/len(wordlen))
[ 2, 422, 1257, 310, 10141, 1330, 4646, 198, 4775, 11925, 796, 685, 17, 11, 18, 11, 19, 11, 17, 60, 198, 16345, 796, 4646, 7, 50033, 2124, 11, 88, 1058, 2124, 10, 88, 837, 4775, 11925, 1267, 198, 4798, 7, 16345, 8, 197, 198, 4798,...
2.37037
54
import sys import requests import urllib.request as urllib2 import json from json import JSONDecodeError HOST = 'localhost' IP=HOST # temporary PORT = 1234 VERSION = 'v1' BASE_URL = 'http://' + HOST + ':' + str(PORT) + '/' + VERSION + '/' HEADERS = {'Content-Type': 'application/json'} VERBOSE=False SUID_LIST = '...
[ 11748, 25064, 198, 11748, 7007, 198, 11748, 2956, 297, 571, 13, 25927, 355, 2956, 297, 571, 17, 197, 197, 198, 11748, 33918, 628, 198, 6738, 33918, 1330, 19449, 10707, 1098, 12331, 198, 198, 39, 10892, 796, 705, 36750, 6, 198, 4061, 2...
2.074314
2,005
# python3 # Copyright 2021 InstaDeep Ltd. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
[ 2, 21015, 18, 198, 2, 15069, 33448, 2262, 64, 29744, 12052, 13, 1439, 2489, 10395, 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, 284...
2.142239
6,932
from SteeringModule.Steering import Steering import time steer=Steering(14,0,180,15,90,180,36,160) steer.setup() time.sleep(2) for i in range(0,900): steer.Up() for i in range(0,900): steer.Down() for i in range(0,900): steer.Left() for i in range(0,900): steer.Right() steer.specify(80,120) steer.specify(20,100...
[ 6738, 2441, 1586, 26796, 13, 7447, 1586, 1330, 2441, 1586, 198, 11748, 640, 198, 4169, 263, 28, 7447, 1586, 7, 1415, 11, 15, 11, 15259, 11, 1314, 11, 3829, 11, 15259, 11, 2623, 11, 14198, 8, 198, 4169, 263, 13, 40406, 3419, 198, 2...
2.220859
163
# coding=utf-8 import struct import datetime from abc import ABCMeta, abstractmethod from weakref import WeakKeyDictionary class DWORDValue(object): """A descriptor for DWORD values""" class WORDValue(object): """A descriptor for WORD values""" class BYTEValue(object): """A descriptor for ...
[ 2, 19617, 28, 40477, 12, 23, 201, 198, 11748, 2878, 201, 198, 11748, 4818, 8079, 201, 198, 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 201, 198, 6738, 4939, 5420, 1330, 28788, 9218, 35, 14188, 201, 198, 201, 198, 4871, 29652, ...
2.080852
3,661
import json from oic import rndstr from oic.utils.keyio import build_keyjar from otest.check import ERROR from otest.test_setup import setup_conv from oidctest.op.func import check_support from oidctest.op.func import claims_locales from oidctest.op.func import login_hint from oidctest.op.func import store_sector_red...
[ 11748, 33918, 198, 198, 6738, 267, 291, 1330, 374, 358, 2536, 198, 6738, 267, 291, 13, 26791, 13, 2539, 952, 1330, 1382, 62, 2539, 9491, 198, 6738, 267, 9288, 13, 9122, 1330, 33854, 198, 6738, 267, 9288, 13, 9288, 62, 40406, 1330, 9...
2.648469
751
# Import In-Built Modules import logging import asyncio import aiopg.sa from motor.motor_asyncio import AsyncIOMotorClient from pymongo import MongoClient from aiohttp import web log = logging.getLogger(__name__) async def init_pg(app: web.Application) -> None: """ A function that, when the server is started,...
[ 2, 17267, 554, 12, 39582, 3401, 5028, 198, 11748, 18931, 198, 11748, 30351, 952, 198, 11748, 257, 14922, 70, 13, 11400, 198, 6738, 5584, 13, 76, 20965, 62, 292, 13361, 952, 1330, 1081, 13361, 40, 2662, 20965, 11792, 198, 6738, 279, 49...
2.394252
1,357
import maya.cmds as mc import glTools.utils.attribute import types class Remap(object): ''' Object wrapper for remapValue node in Maya. ''' # CONSTANTS _REMAPSUFFIX = 'remap' def __init__( self, remapName, inputValue = None, inputMin = None, inputMax = None, outputMin = None, ...
[ 11748, 743, 64, 13, 28758, 82, 355, 36650, 198, 198, 11748, 1278, 33637, 13, 26791, 13, 42348, 198, 198, 11748, 3858, 198, 198, 4871, 3982, 499, 7, 15252, 2599, 198, 197, 7061, 6, 198, 197, 10267, 29908, 329, 816, 499, 11395, 10139, ...
2.716359
3,032
import spacy nlp = spacy.load('en_core_web_sm') path = './GMVbQ1UsMp8.txt' with open(path, 'r') as file_to_read: subtitle = file_to_read.read() doc = nlp(subtitle) candidate_captions = [] for np in doc.noun_chunks: print(np.text) candidate_captions.append(np.text) import clip import torch from torchvis...
[ 11748, 599, 1590, 198, 21283, 79, 796, 599, 1590, 13, 2220, 10786, 268, 62, 7295, 62, 12384, 62, 5796, 11537, 198, 6978, 796, 705, 19571, 15548, 53, 65, 48, 16, 5842, 28861, 23, 13, 14116, 6, 198, 4480, 1280, 7, 6978, 11, 705, 81,...
2.738617
593
# Generated by Django 3.1.2 on 2020-10-27 20:31 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 17, 319, 12131, 12, 940, 12, 1983, 1160, 25, 3132, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
from abc import ABC from wai.common.decorator import ensure_error_type from ..error import JSONSerialisationError from ._JSONSerialisable import JSONSerialisable from ._JSONDeserialisable import JSONDeserialisable, SelfType class JSONBiserialisable(JSONSerialisable, JSONDeserialisable[SelfType], ABC): """ I...
[ 6738, 450, 66, 1330, 9738, 198, 198, 6738, 266, 1872, 13, 11321, 13, 12501, 273, 1352, 1330, 4155, 62, 18224, 62, 4906, 198, 198, 6738, 11485, 18224, 1330, 19449, 32634, 5612, 12331, 198, 6738, 47540, 40386, 32634, 43942, 1330, 19449, 3...
2.968254
315
""" Core USB packet sniffer packet backend for OpenVizsla. """ import crcmod from enum import IntFlag from .protocol import OVPacketHandler class USBEventFlags(IntFlag): """ Enum representing the various flags an OV device can attach to a packet. """ # Physical layer error ERROR = 0x01 # RX Path...
[ 37811, 198, 14055, 8450, 19638, 26300, 263, 19638, 30203, 329, 4946, 53, 528, 82, 5031, 13, 198, 37811, 198, 198, 11748, 1067, 66, 4666, 198, 198, 6738, 33829, 1330, 2558, 34227, 198, 6738, 764, 11235, 4668, 1330, 440, 8859, 8317, 25060...
2.428675
1,374
from ..losses.cross_entropy import CrossEntropyLoss from ..losses.euclidean import EuclideanLoss from ..losses.angular import AngularLoss from ..losses.mse import MSELoss from ..losses.l1 import L1Loss __all__ = ('CrossEntropyLoss', 'EuclideanLoss', 'AngularLoss', 'MSELoss', 'L1Loss')
[ 6738, 11485, 22462, 274, 13, 19692, 62, 298, 28338, 1330, 6372, 14539, 28338, 43, 793, 198, 6738, 11485, 22462, 274, 13, 12496, 565, 485, 272, 1330, 48862, 485, 272, 43, 793, 198, 6738, 11485, 22462, 274, 13, 21413, 1330, 28147, 43, 7...
2.72381
105
# # Copyright 2014-2018 Neueda Ltd. # import Config props = Config.properties () print props.getKeys () try: print props['invalid-key'] except Exception as e: print e props['test'] = '1234' print props['test']
[ 2, 198, 2, 15069, 1946, 12, 7908, 3169, 1739, 64, 12052, 13, 198, 2, 198, 11748, 17056, 628, 198, 1676, 862, 796, 17056, 13, 48310, 7499, 198, 4798, 25744, 13, 1136, 40729, 7499, 198, 198, 28311, 25, 198, 220, 220, 220, 3601, 25744,...
2.7875
80
import frappe # @frappe.whitelist() # # def get_wallet(): # # s = frappe.db.get_list('Wallet Transaction', filters={ # # 'docstatus': 1}, fields=['name', 'date', 'customer_name', 'product_price']) # # return s
[ 11748, 5306, 27768, 201, 198, 201, 198, 201, 198, 2, 2488, 69, 430, 27768, 13, 1929, 270, 46331, 3419, 201, 198, 2, 1303, 825, 651, 62, 44623, 33529, 201, 198, 2, 1303, 220, 220, 220, 220, 264, 796, 5306, 27768, 13, 9945, 13, 1136...
2.313725
102
############################################################################## # Compute rank statistics # WARNING: will download about 28 Go of data # Authored by Ammar Mian, 10/01/2019 # e-mail: ammar.mian@centralesupelec.fr # Modified by Antoine Collas, 10/2019 # e-mail: antoine.collas@centralesupelec.fr ###########...
[ 29113, 29113, 7804, 4242, 2235, 198, 2, 3082, 1133, 4279, 7869, 198, 2, 39410, 25, 481, 4321, 546, 2579, 1514, 286, 1366, 198, 2, 26828, 1850, 416, 1703, 3876, 337, 666, 11, 838, 14, 486, 14, 23344, 198, 2, 304, 12, 4529, 25, 716,...
2.696327
1,225
# The following comments couldn't be translated into the new config version: #cms_conditions_data/CMS_COND_20X_RPC" import FWCore.ParameterSet.Config as cms # #RPC calibrations #For now, no t0 corrections are applied in the reconstruction if fake calibration is used #(the replace should be moved to main cfg in order ...
[ 2, 383, 1708, 3651, 3521, 470, 307, 14251, 656, 262, 649, 4566, 2196, 25, 198, 198, 2, 46406, 62, 17561, 1756, 62, 7890, 14, 34, 5653, 62, 10943, 35, 62, 1238, 55, 62, 49, 5662, 1, 198, 11748, 48849, 14055, 13, 36301, 7248, 13, ...
3.116883
154
from django.db import models from django.contrib.auth.models import User # Location class, used to determine from wich actual pos location the cashier # is working (ex. Bar, restaurant, ...) # Category class, used as a container for different type of items, related by # area (ex. Kitchen, beverages, ...) # Item cla...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 628, 198, 2, 13397, 1398, 11, 973, 284, 5004, 422, 266, 488, 4036, 1426, 4067, 262, 5003, 959, 198, 2, 318, 1762, 3...
3.736486
148
#!/usr/bin/env python3 #coding=utf-8 import numpy as np import time from math import cos, sin, sqrt, pi, atan, asin, atan, atan2 from scipy.optimize import least_squares from scipy.spatial.transform import Rotation from angles import normalize_angle import rospy from origarm_ros.srv import ik from origarm_ros.msg impo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 66, 7656, 28, 40477, 12, 23, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 6738, 10688, 1330, 8615, 11, 7813, 11, 19862, 17034, 11, 31028, 11, 379, 272, 11, ...
2.568627
204
import sys import time from pandalogger.PandaLogger import PandaLogger from config import panda_config import re from re import error as ReError # logger _logger = PandaLogger().getLogger('RetrialModule') NO_RETRY = 'no_retry' INCREASE_MEM = 'increase_memory' LIMIT_RETRY = 'limit_retry' INCREASE_CPU = 'increase_cputim...
[ 11748, 25064, 198, 11748, 640, 198, 6738, 279, 7642, 519, 1362, 13, 47, 5282, 11187, 1362, 1330, 41112, 11187, 1362, 198, 6738, 4566, 1330, 279, 5282, 62, 11250, 198, 11748, 302, 198, 6738, 302, 1330, 4049, 355, 797, 12331, 198, 2, 49...
2.076221
6,022
''' Implementation of Compositional Pattern Producing Networks in Tensorflow https://en.wikipedia.org/wiki/Compositional_pattern-producing_network @hardmaru, 2016 Sampler Class This file is meant to be run inside an IPython session, as it is meant to be used interacively for experimentation. It shouldn't be that h...
[ 7061, 6, 198, 3546, 32851, 286, 29936, 1859, 23939, 21522, 2259, 27862, 287, 309, 22854, 11125, 198, 198, 5450, 1378, 268, 13, 31266, 13, 2398, 14, 15466, 14, 5377, 1930, 1859, 62, 33279, 12, 36866, 62, 27349, 198, 198, 31, 10424, 387...
3.123636
275
from flask import Flask, request, jsonify from gevent.pywsgi import WSGIServer import traceback import uuid import os from logger import logger from boundingRect import detect import cv2 app = Flask(__name__) @app.route('/identifyDirection', methods=['POST']) def get_direction(): """ 图片方向识别 :return: ...
[ 6738, 42903, 1330, 46947, 11, 2581, 11, 33918, 1958, 198, 6738, 4903, 1151, 13, 9078, 18504, 12397, 1330, 25290, 38, 1797, 18497, 198, 11748, 12854, 1891, 198, 11748, 334, 27112, 198, 11748, 28686, 198, 6738, 49706, 1330, 49706, 198, 6738...
1.992832
837
"""CHAPTER 29 WIND LOADS ON BUILDING APPURTENANCES AND OTHER STRUCTURES: MAIN WIND FORCE RESISTING SYSTEM (DIRECTIONAL PROCEDURE) • Basic wind speed, V (Section 26.5); • Wind directionality factor, Kd (Section 26.6); • Exposure category (Section 26.7); • Topographic factor, Kzt (Section 26.8); • Ground elevation facto...
[ 37811, 41481, 2808, 198, 28929, 17579, 47149, 6177, 20571, 26761, 2751, 43504, 4261, 51, 1677, 20940, 1546, 5357, 25401, 19269, 18415, 29514, 25, 198, 5673, 1268, 370, 12115, 7473, 5222, 15731, 8808, 2751, 36230, 357, 17931, 23988, 2849, 18...
1.896047
3,415
#!/usr/bin/env python # Copyright (c) 2019-2021 Gabriel Sanhueza. # # Distributed under the MIT License. # See LICENSE for more info. import numpy as np from colour import Color
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 220, 15069, 357, 66, 8, 13130, 12, 1238, 2481, 17371, 2986, 71, 518, 4496, 13, 198, 2, 198, 2, 220, 4307, 6169, 739, 262, 17168, 13789, 13, 198, 2, 220, 4091, 38559, 24290,...
2.882353
68
# # This file is part of pyasn1-modules software. # # Created by Russ Housley # Copyright (c) 2019, Vigil Security, LLC # License: http://snmplabs.com/pyasn1/license.html # import sys import unittest from pyasn1.codec.der.decoder import decode as der_decoder from pyasn1.codec.der.encoder import encode as der_encoder f...
[ 2, 198, 2, 770, 2393, 318, 636, 286, 12972, 292, 77, 16, 12, 18170, 3788, 13, 198, 2, 198, 2, 15622, 416, 1887, 367, 516, 1636, 198, 2, 15069, 357, 66, 8, 13130, 11, 39840, 4765, 11, 11419, 198, 2, 13789, 25, 2638, 1378, 16184, ...
2.733333
240