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 pathlib import Path from . import COMPLETION_CACHE_FILE
[ 11748, 33918, 198, 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 764, 1330, 49269, 24131, 62, 34, 2246, 13909, 62, 25664, 628, 198 ]
3.307692
26
# -*- coding: utf-8 -*- """ gaefy.jinja2.module_loaders ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Loads a pre-compiled template, stored as Python code in a template module. This loader requires a modification in Jinja2 code (see jinja2.diff). The change doesn't affect other loaders, only allows templates to be ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 31986, 891, 88, 13, 18594, 6592, 17, 13, 21412, 62, 2220, 364, 198, 220, 220, 220, 220, 27156, 15116, 4907, 93, 628, 220, 220, 220, 8778, ...
3.032086
187
# coding: utf-8 from flask import jsonify
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 42903, 1330, 33918, 1958, 628, 628, 198 ]
2.875
16
#-*- coding:utf-8 -*- import os import sys reload(sys) sys.setdefaultencoding('utf-8') # load app path into sys.path app_path_load()
[ 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 260, 2220, 7, 17597, 8, 198, 17597, 13, 2617, 12286, 12685, 7656, 10786, 40477, 12, 23, 11537, 198, 198, 2, 3440, 598, 3108, 656, ...
2.446429
56
# Copyright 2021 Canonical Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
[ 2, 15069, 33448, 19507, 605, 12052, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921...
2.234148
2,413
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Jan-Piet Mens <jpmens()gmail.com>' __copyright__ = 'Copyright 2014 Jan-Piet Mens' __license__ = """Eclipse Public License - v 1.0 (http://www.eclipse.org/legal/epl-v10.html)""" HAVE_TWILIO=True try: from twilio.rest import TwilioRestClient except Im...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 220, 220, 220, 796, 705, 12128, 12, 47, 1155, 43103, 1279, 73, 4426, 641, 3419, 14816, 13, 785, ...
2.206093
558
# concepto de closure en python: es una funcion que define a otra y ademas la puede regresar # la funcion anidada puede acceder a las variables locales definidas en la funcion principal o externa # funcion principal o externa mi_funcion_closure = operacion(10,20) print(mi_funcion_closure()) # llamando la funcion al ...
[ 2, 3721, 78, 390, 16512, 551, 21015, 25, 1658, 555, 64, 25439, 295, 8358, 8160, 257, 267, 9535, 331, 512, 368, 292, 8591, 279, 1739, 68, 842, 411, 283, 198, 2, 8591, 25439, 295, 281, 312, 4763, 279, 1739, 68, 697, 5702, 257, 39990...
2.891892
148
# -*- coding: utf-8 -*- """ @version: @time: 2018/9/12 @author: lvxiaoxin @software: PyCharm @file: models """ from sqlalchemy import Column, Integer, String, ForeignKey from sqlalchemy.orm import relationship, backref from databases import Base __author__ = 'lvxin'
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 9641, 25, 220, 198, 31, 2435, 25, 2864, 14, 24, 14, 1065, 198, 31, 9800, 25, 300, 85, 36072, 39366, 198, 31, 43776, 25, 9485, 1925, 1670, 198, 31, ...
2.833333
96
# coding: utf-8 """ Created on 2016-09-28 @author: naoey """ import os import config from PIL import Image from errors import *
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 41972, 319, 1584, 12, 2931, 12, 2078, 198, 31, 9800, 25, 12385, 2577, 88, 198, 37811, 198, 198, 11748, 28686, 198, 198, 11748, 4566, 198, 198, 6738, 350, 4146, 1330, 7412, 198, ...
2.787234
47
# Importando librerias necesarias. import os import sys import time import numbers import subprocess # Importando desde la libreria de Telegram from telegram.ext import Updater, CommandHandler # A establecer por el usuario (consultar mediante @BotFather) TOKEN = "1713890847:AAFMyn7tUKocgypCZRYiLRUvUzZSgaFsTrw" ID = ...
[ 2, 17267, 25440, 9195, 260, 380, 292, 497, 728, 2743, 292, 13, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 3146, 198, 11748, 850, 14681, 628, 198, 2, 17267, 25440, 748, 2934, 8591, 9195, 260, 7496, 390, 50203, 1...
2.638037
163
# @license # Copyright 2018 Google 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, 2488, 43085, 198, 2, 15069, 2864, 3012, 3457, 13, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2...
3.59292
226
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-10-25 10:21 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 24, 13, 21, 319, 1584, 12, 940, 12, 1495, 838, 25, 2481, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198...
2.719298
57
"""Online one vs. rest SVM -- an online version of the OvA SVM. This version is built on top of sklearn and numpy, and therefore does not support graph mode. Just linear SVM for now. Maybe adapt to others later. Author: Mengye Ren (mren@cs.toronto.edu) """ from __future__ import (absolute_import, division, print_fun...
[ 37811, 14439, 530, 3691, 13, 1334, 311, 15996, 1377, 281, 2691, 2196, 286, 262, 46941, 32, 311, 15996, 13, 198, 198, 1212, 2196, 318, 3170, 319, 1353, 286, 1341, 35720, 290, 299, 32152, 11, 290, 4361, 857, 407, 198, 11284, 4823, 4235,...
3.09375
224
from .FindPDSFiles import FindPDSFiles from .ConvertToBinary import ConvertToBinary
[ 6738, 764, 16742, 47, 5258, 25876, 1330, 9938, 47, 5258, 25876, 198, 6738, 764, 3103, 1851, 2514, 33, 3219, 1330, 38240, 2514, 33, 3219, 198 ]
3.36
25
## Color Converter - HSSP World, 2021 [Friday, March 26] """ Thus program was created to solve the problem of having to browse the internet to convert color, we hope everyone loves this program :) """ HexDict = {"0": 0, "1": 1, "2": 2, "3": 3, "4": 4, "5": 5, ...
[ 2235, 5315, 35602, 353, 532, 18070, 4303, 2159, 11, 33448, 685, 20610, 11, 2805, 2608, 60, 201, 198, 37811, 201, 198, 19093, 1430, 373, 2727, 284, 8494, 262, 1917, 286, 201, 198, 40965, 284, 25675, 262, 5230, 284, 10385, 3124, 11, 201...
1.636076
1,264
import pytest from picorss.src.domain import entities @pytest.fixture()
[ 11748, 12972, 9288, 198, 198, 6738, 8301, 669, 82, 13, 10677, 13, 27830, 1330, 12066, 628, 198, 31, 9078, 9288, 13, 69, 9602, 3419, 628 ]
3.04
25
# Copyright 2017-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
[ 2, 15069, 2177, 12, 42334, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 11074, 921, 198, 2, 743, 407, 779, ...
3.021825
504
import typing import gettext import numpy from nion.data import Core from nion.data import DataAndMetadata from nion.swift.model import Symbolic from nion.typeshed import API_1_0 _ = gettext.gettext Symbolic.register_computation_type("nion.align_multi_d_sequence", AlignMultiDimensionalSequence)
[ 11748, 19720, 198, 11748, 651, 5239, 198, 11748, 299, 32152, 198, 198, 6738, 299, 295, 13, 7890, 1330, 7231, 198, 6738, 299, 295, 13, 7890, 1330, 6060, 1870, 9171, 14706, 198, 6738, 299, 295, 13, 2032, 2135, 13, 19849, 1330, 41327, 41...
3.03
100
import os, sys import imp from authorizenet import apicontractsv1 from authorizenet.apicontrollers import * constants = imp.load_source('modulename', 'constants.py') if(os.path.basename(__file__) == os.path.basename(sys.argv[0])): create_customer_profile_from_transaction(constants.transactionId)
[ 11748, 28686, 11, 25064, 198, 11748, 848, 198, 198, 6738, 1772, 33977, 316, 1330, 2471, 291, 756, 974, 21370, 16, 198, 6738, 1772, 33977, 316, 13, 499, 291, 756, 36667, 1330, 1635, 198, 9979, 1187, 796, 848, 13, 2220, 62, 10459, 10786...
2.831776
107
# coding=utf-8 from django.db import models from django.utils.translation import gettext as _ # from .constants import TYPE_VEHICLE from accounts import constants from accounts.models import Base
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 5239, 355, 4808, 198, 198, 2, 422, 764, 9979, 1187, 1330, 41876, 62, 6089, 39, 31419, 198, 6738, 5...
3.642857
56
""" This module is meant to be used outside of pvpython in python 2 or 3. This has functionality that might be useful for transfering data from a python working space to a ParaView working space. """ from .cmaps import * from .file_sinks import * #from .ipython import * __author__ = 'Bane Sullivan' __license__ = 'BSD-...
[ 37811, 198, 1212, 8265, 318, 4001, 284, 307, 973, 2354, 286, 279, 85, 29412, 287, 21015, 362, 393, 513, 13, 770, 468, 11244, 326, 1244, 307, 4465, 329, 13501, 1586, 1366, 422, 257, 21015, 1762, 2272, 284, 257, 2547, 64, 7680, 1762, ...
3.439252
107
import os import pickle import enroll_method as em if __name__ == "__main__": enroll()
[ 11748, 28686, 198, 11748, 2298, 293, 198, 11748, 14627, 62, 24396, 355, 795, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 628, 220, 220, 220, 14627, 3419 ]
2.9375
32
import logging from typing import TYPE_CHECKING, Any, Dict, List, Optional, cast from rotkehlchen.accounting.structures import Balance from rotkehlchen.assets.asset import Asset, EthereumToken from rotkehlchen.chain.ethereum.structures import AaveSimpleEvent from rotkehlchen.constants.ethereum import ( AAVE_LENDIN...
[ 11748, 18931, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 11, 4377, 11, 360, 713, 11, 7343, 11, 32233, 11, 3350, 198, 198, 6738, 5724, 365, 18519, 6607, 13, 23317, 278, 13, 7249, 942, 1330, 22924, 198, 6738, 5724, 365, 18519, 6607...
1.981832
6,495
__author__ = "Mustafa Guler<mguler@ucsd.edu>"
[ 834, 9800, 834, 796, 366, 34320, 28485, 402, 18173, 27, 11296, 18173, 31, 1229, 21282, 13, 15532, 24618, 198 ]
2.421053
19
import numpy as np from pystruct.models import StructuredModel from pystruct.models import CRF from IPython import embed # X_train = np.array([[[.85,.15],[.85,.15],[.85,.15],[.15,.85]], # [[.85,.15],[.85,.15],[.15,.85],[.15,.85]], # [[.85,.15],[.15,.85],[.15,.85],[.15,.85]], # [[.15,.85],[.15,.85],...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 12972, 7249, 13, 27530, 1330, 32112, 1522, 17633, 198, 6738, 12972, 7249, 13, 27530, 1330, 8740, 37, 198, 6738, 6101, 7535, 1330, 11525, 628, 628, 628, 198, 2, 1395, 62, 27432, 796, 45941, 13, ...
1.752179
1,606
#!/usr/bin/python # # Created by Albert Zhang on 1/1/15. # Copyright (c) 2015 Albert Zhang. All rights reserved. # import os import sys import errno import string import subprocess import re import shutil import random import codecs isShowHelp = False dirIndex = -1 outIndex = -1 for index, value in enumerate(sys.a...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 198, 2, 15622, 416, 9966, 19439, 319, 352, 14, 16, 14, 1314, 13, 198, 2, 15069, 357, 66, 8, 1853, 9966, 19439, 13, 1439, 2489, 10395, 13, 198, 2, 198, 198, 11748, 28686, 198, 11...
2.935967
734
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2016 Alex Forencich 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...
[ 37811, 198, 198, 37906, 4225, 3803, 540, 15595, 42410, 10074, 198, 198, 15269, 357, 66, 8, 2321, 12, 5304, 4422, 4558, 10782, 488, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198,...
2.572937
1,042
import requests import time, datetime import pandas as pd from bs4 import BeautifulSoup # Global variables data = [] https = 'https:' base_url = 'https://www.reddit.com' # it seems the most important is in fact to avoid sending too many requests from the same IP address headers = {'User-Agent': 'Mozilla/5.0 (Macinto...
[ 11748, 7007, 198, 11748, 640, 11, 4818, 8079, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 198, 2, 8060, 9633, 198, 7890, 796, 17635, 198, 5450, 796, 705, 5450, 32105, 198, 8692, 62, 637...
2.747331
562
from features import create_feature_extractor, create_film_adapter from set_encoder import SetEncoder """ Creates the set encoder, feature extractor, feature adaptation networks. """
[ 6738, 3033, 1330, 2251, 62, 30053, 62, 2302, 40450, 11, 2251, 62, 26240, 62, 324, 3429, 198, 6738, 900, 62, 12685, 12342, 1330, 5345, 27195, 12342, 198, 198, 37811, 7921, 274, 262, 900, 2207, 12342, 11, 3895, 7925, 273, 11, 3895, 1671...
3.93617
47
import re import pandas as pd import numpy as np term_pat = re.compile('(.+?):(.+)') pat = re.compile( '(.+)_([a-z][a-z]\.)?((?:wikipedia\.org)|(?:commons\.wikimedia\.org)|(?:www\.mediawiki\.org))_([a-z_-]+?)$') # Debug output to ensure pattern still works # print(pat.fullmatch('BLEACH_zh.wikipedia.org_a...
[ 11748, 302, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 4354, 62, 8071, 796, 302, 13, 5589, 576, 10786, 7, 13, 10, 30, 2599, 7, 13, 28988, 11537, 201, 198, 8071, 796, 302...
2.118372
811
from .saltpay import SaltpayClient from .errors import *
[ 6738, 764, 82, 2501, 15577, 1330, 13754, 15577, 11792, 198, 6738, 764, 48277, 1330, 1635 ]
3.733333
15
import numpy as np import os import os.path as op from scipy.io import loadmat rois = ['V1', 'V2', 'V3', 'hV4', 'IOG', 'pFus', 'mFus'] HERE = op.dirname(op.abspath(__file__)) OUTDIR = op.join(op.dirname(HERE), 'output') params = dict() for hemi in ['L', 'R']: for roi in rois: ok_voxs = [] for s i...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 1034, 198, 6738, 629, 541, 88, 13, 952, 1330, 3440, 6759, 198, 198, 305, 271, 796, 37250, 53, 16, 3256, 705, 53, 17, 3256, 705, 53, 18, 3256, 705, ...
2.028103
427
#!/usr/bin/env python # -*- encoding: utf-8 -*- # flake8: noqa from __future__ import print_function import io import os from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) about = {} exec(read('src', 'pytest', '__version__.py'), about) long_description = read('README.md') setup( n...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 781, 539, 23, 25, 645, 20402, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 33245, 198, 117...
2.66537
514
''' @Author: Kingtous @Date: 2019-11-01 18:40:29 @LastEditors: Kingtous @LastEditTime: 2019-11-06 19:47:42 @Description: Kingtous' Code ''' """ Author: Kingtous Date : 2019/09/24 """ import nfa2dfa as DFATool import reg2nfa as REGTool import sys,os,networkx as nx import tools,constDef # 因为字符中(,),*跟词法里面的(,),*有冲突,我们需要先将...
[ 7061, 6, 198, 31, 13838, 25, 2677, 83, 516, 198, 31, 10430, 25, 13130, 12, 1157, 12, 486, 1248, 25, 1821, 25, 1959, 198, 31, 5956, 18378, 669, 25, 2677, 83, 516, 198, 31, 5956, 18378, 7575, 25, 13130, 12, 1157, 12, 3312, 678, 25...
1.446018
1,130
from django.contrib import admin from mainApp.models import Faculty admin.site.register(Faculty) # Register your models here.
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 1388, 4677, 13, 27530, 1330, 35262, 198, 198, 28482, 13, 15654, 13, 30238, 7, 47522, 10672, 8, 198, 198, 2, 17296, 534, 4981, 994, 13, 198 ]
3.555556
36
import firebase_admin from firebase_admin import credentials from google.cloud import firestore import os set_env("dev") db = firestore.Client() # pages_data = get_data_by_ref("ece20001\pages") # set_data_by_ref("ece20001_pages", pages_data) # print(pages_data) # # practice_data = get_data_by_ref("ece20001\pract...
[ 11748, 2046, 8692, 62, 28482, 198, 6738, 2046, 8692, 62, 28482, 1330, 18031, 198, 6738, 23645, 13, 17721, 1330, 2046, 8095, 198, 11748, 28686, 628, 198, 198, 2617, 62, 24330, 7203, 7959, 4943, 198, 9945, 796, 2046, 8095, 13, 11792, 3419...
2.475285
263
""" Overview of cases dataset: - number of samples """ import time import contextlib from argparse import ArgumentParser import collections import flowcat @contextlib.contextmanager @contextlib.contextmanager def deduplicate_cases_by_sureness(cases): """Remove duplicates by taking the one with the higher su...
[ 37811, 198, 29064, 286, 2663, 27039, 25, 198, 198, 12, 1271, 286, 8405, 198, 37811, 198, 11748, 640, 198, 11748, 4732, 8019, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 11748, 17268, 198, 198, 11748, 5202, 9246, 628, 198, 31, 22866...
2.451679
1,459
GMUSIC_EMAIL = 'g_email' GMUSIC_PASSWORD = 'g_password' SPOTIFY_CLIENT_ID = 'id' SPOTIFY_CLIENT_SECRET = 'secret' SPOTIFY_REDIRECT_URI = 'redirect' SPOTIFY_USER = 's_user'
[ 15548, 2937, 2149, 62, 27630, 4146, 796, 705, 70, 62, 12888, 6, 198, 15548, 2937, 2149, 62, 47924, 54, 12532, 796, 705, 70, 62, 28712, 6, 198, 4303, 2394, 5064, 56, 62, 5097, 28495, 62, 2389, 796, 705, 312, 6, 198, 4303, 2394, 506...
2.035714
84
print("Good job! You installed a pip module.\n\nNow get back to work!")
[ 4798, 7203, 10248, 1693, 0, 220, 921, 6589, 257, 7347, 8265, 13, 59, 77, 59, 77, 3844, 651, 736, 284, 670, 2474, 8, 198 ]
3.041667
24
""" ATMInterface This is an example of a client which uses the ATMInterface of the atm. The requirements of each method provided by the xmlrpc server are described in the class docstring. THIS FILE SHOULD NOT BE CHANGED """ import cmd import xmlrpclib import socket import traceback """ The host and port of atm xmlr...
[ 37811, 30939, 39317, 198, 1212, 318, 281, 1672, 286, 257, 5456, 543, 3544, 262, 30939, 39317, 286, 262, 379, 76, 13, 198, 464, 5359, 286, 1123, 2446, 2810, 416, 262, 35555, 81, 14751, 4382, 389, 3417, 287, 198, 1169, 1398, 2205, 8841,...
2.234884
2,150
''' ENCODE file classes https://www.encodeproject.org/profiles/file.json ''' import requests.compat from .metadata import Entry __author__ = 'Xiao-Ou Zhang <kepbod@gmail.com>' __all__ = ['RawFile', 'ProcessedFile'] class SeqFile(Entry): ''' Meta class of ENCODE file entry ''' class RawFile(SeqFile): ...
[ 7061, 6, 198, 24181, 16820, 2393, 6097, 198, 5450, 1378, 2503, 13, 12685, 375, 538, 305, 752, 13, 2398, 14, 5577, 2915, 14, 7753, 13, 17752, 198, 7061, 6, 198, 198, 11748, 7007, 13, 5589, 265, 198, 6738, 764, 38993, 1330, 21617, 198...
2.477528
178
import pandas as pd from sklearn.multiclass import OneVsRestClassifier from xgboost import XGBClassifier from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score, mean_squared_error from sklearn.metrics import classification_report, confusion_matrix from sklearn.linear_model impor...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 16680, 291, 31172, 1330, 1881, 23266, 19452, 9487, 7483, 198, 6738, 2124, 70, 39521, 1330, 1395, 4579, 9487, 7483, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62...
2.766382
351
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import *
[ 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, 9979, 415, 13, 22973, 3418...
2.58
50
import sqlalchemy import sqlalchemy.orm from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() Student.grades = sqlalchemy.orm.relationship('Grade', order_by=Grade.assignment_id, back_populates='st...
[ 11748, 44161, 282, 26599, 198, 11748, 44161, 282, 26599, 13, 579, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 32446, 283, 876, 1330, 2377, 283, 876, 62, 8692, 198, 198, 14881, 796, 2377, 283, 876, 62, 8692, 3419, 628, 628, 198, 198, ...
1.867742
310
# # Copyright 2022 Logical Clocks AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ 2, 198, 2, 220, 220, 15069, 33160, 5972, 605, 1012, 3320, 9564, 198, 2, 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, ...
3.453202
203
import numpy as np import wave as wave import pyroomacoustics as pa pa.datasets.CMUArcticCorpus(basedir=".CMU_ARCTIC", download=True, speaker=["aew","axb"]) sample_wave_file = ".CMU_ARCTIC/cmu_us_aew_arctic/wav/arctic_a0001.wav" wav = wave.open(sample_wave_file) print("サンプリング周波数[Hz]: ", wav.getframerate()) print("サン...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 6769, 355, 6769, 198, 11748, 12972, 3823, 330, 23968, 873, 355, 14187, 198, 198, 8957, 13, 19608, 292, 1039, 13, 24187, 52, 3163, 11048, 45680, 385, 7, 3106, 343, 28, 1911, 24187, 52, 62, 150...
2.228814
236
from spiffs import * with file("workspace/back.bin", "r+wb") as bf: s = SpiffsFileBack(bf) fd = s.fopen("workspace/back.bin", SPIFFS_CREAT | SPIFFS_WRONLY) print(fd)
[ 6738, 599, 10203, 1330, 1635, 628, 198, 4480, 2393, 7203, 5225, 10223, 14, 1891, 13, 8800, 1600, 366, 81, 10, 39346, 4943, 355, 275, 69, 25, 198, 197, 82, 796, 1338, 10203, 8979, 7282, 7, 19881, 8, 198, 197, 16344, 796, 264, 13, 6...
2.28
75
"""Apply the default configuration to use the INM7 data infrastructure NOTE: While this procedure should still work, they way it's implemented is not up-to-date and should change to make use of new datalad-create-sibling-ria and "ria+scheme://..." URLs instead of configurations for host and basepath. Specifically th...
[ 37811, 44836, 262, 4277, 8398, 284, 779, 262, 3268, 44, 22, 1366, 6884, 198, 198, 16580, 25, 2893, 428, 8771, 815, 991, 670, 11, 484, 835, 340, 338, 9177, 318, 407, 198, 929, 12, 1462, 12, 4475, 290, 815, 1487, 284, 787, 779, 286,...
2.868319
2,058
#!/usr/bin/env python __author__ = 'Bill French' __license__ = 'Apache 2.0' from mi.core.log import get_logger ; log = get_logger() from nose.plugins.attrib import attr from mi.core.unit_test import MiUnitTest from mi.core.sequencer import Sequencer @attr('UNIT', group='mi')
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 834, 9800, 834, 796, 705, 17798, 4141, 6, 198, 834, 43085, 834, 796, 705, 25189, 4891, 362, 13, 15, 6, 198, 198, 6738, 21504, 13, 7295, 13, 6404, 1330, 651, 62, 6404, 1362, 21...
2.81
100
import math a=0 b=0 print("Enter Value of a: ") a = float(input()) print("Enter Value of b: ") b = float(input()) print("i\t\ta\t\tb\t\tf(a)\t\tf(b)\t\tc\t\tf(c)\n") pre = 1 d = 0 i=0 while (abs(pre-d)) > 0.001: if i != 0: pre = d c = (a+b)/2 y = fun(a) z = fun(b) d = fun(c) ...
[ 11748, 10688, 201, 198, 201, 198, 64, 28, 15, 201, 198, 65, 28, 15, 201, 198, 201, 198, 4798, 7203, 17469, 11052, 286, 257, 25, 366, 8, 201, 198, 64, 796, 12178, 7, 15414, 28955, 201, 198, 201, 198, 4798, 7203, 17469, 11052, 286, ...
1.601942
309
from bson.objectid import ObjectId from fastapi import APIRouter, File, UploadFile import os import uuid import shutil import hashlib import cv2 import time from .src.lp_recognition import E2E from .model import InsertSchema from config.utils import ( ResponseModel , ResponseCreateModel, ErrorResponseMode...
[ 6738, 275, 1559, 13, 15252, 312, 1330, 9515, 7390, 198, 6738, 3049, 15042, 1330, 3486, 4663, 39605, 11, 9220, 11, 36803, 8979, 198, 11748, 28686, 198, 11748, 334, 27112, 198, 11748, 4423, 346, 198, 11748, 12234, 8019, 198, 11748, 269, 8...
2.728324
346
import numpy as np import pandas as pd import matplotlib.pyplot as plt import cv2 from pathlib import Path
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 269, 85, 17, 198, 198, 6738, 3108, 8019, 1330, 10644 ]
3
36
# Generated by Django 3.2.6 on 2021-08-25 05:53 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 21, 319, 33448, 12, 2919, 12, 1495, 8870, 25, 4310, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
from bokeh.charts import Donut from bokeh.embed import components import pandas as pd
[ 6738, 1489, 365, 71, 13, 354, 5889, 1330, 2094, 315, 198, 6738, 1489, 365, 71, 13, 20521, 1330, 6805, 198, 11748, 19798, 292, 355, 279, 67, 198 ]
3.185185
27
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-03 19:16 from __future__ import unicode_literals 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, 13, 18, 319, 2177, 12, 2919, 12, 3070, 678, 25, 1433, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.73913
69
import sys import time from collections import defaultdict import numpy as np import psutil import ray import scipy.signal import tensorflow as tf config = tf.compat.v1.ConfigProto() config.gpu_options.allow_growth = True session = tf.compat.v1.Session(config=config) num_trials = 5 # Count the number of physical CP...
[ 11748, 25064, 198, 11748, 640, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 26692, 22602, 198, 11748, 26842, 198, 11748, 629, 541, 88, 13, 12683, 282, 198, 11748, 11192, 273, 11125, 355, 48700,...
2.943096
1,195
from PhotoClasserBuilder import PhotoClasserBuilder from PhotoClasser import PhotoClasser
[ 6738, 5555, 9487, 263, 32875, 1330, 5555, 9487, 263, 32875, 198, 6738, 5555, 9487, 263, 1330, 5555, 9487, 263 ]
4.684211
19
import traceback import datetime import pytest from multirunnable import set_mode from ....test_config import ( Under_Test_RunningModes, Under_Test_RunningModes_Without_Greenlet, Database_Config, Database_Pool_Config, Table_Columns, TEST_DATA_ROWS, SELECT_TEST_DATA_SQL_WITH_OPTION, INSERT_TEST_DATA_SQL_WITH_O...
[ 11748, 12854, 1891, 198, 11748, 4818, 8079, 198, 11748, 12972, 9288, 198, 198, 6738, 1963, 343, 20935, 540, 1330, 900, 62, 14171, 198, 198, 6738, 19424, 9288, 62, 11250, 1330, 357, 198, 220, 220, 220, 4698, 62, 14402, 62, 28768, 44, 4...
2.821293
263
import os.path orig_dataset_path = os.path.expanduser('~/datasets/rossmann-store-sales/') preprocessed_dataset_path = os.path.expanduser('~/datasets/rossmann-store-sales-preprocessed/') training_output_path = os.path.expanduser('~/training_output/rossmann-store-sales/')
[ 11748, 28686, 13, 6978, 198, 198, 11612, 62, 19608, 292, 316, 62, 6978, 796, 28686, 13, 6978, 13, 11201, 392, 7220, 10786, 93, 14, 19608, 292, 1039, 14, 1214, 9038, 12, 8095, 12, 82, 2040, 14, 11537, 198, 3866, 14681, 276, 62, 19608...
2.551402
107
# %% #!/usr/bin/env python3 from pathlib import Path import qrcode # 書き出し from pyzbar import pyzbar from PIL import Image import numpy as np # Examples synth = list(Path("examples/synth").glob("*.png")) for s in synth: i = int(s.stem.replace('seed', '')) bg = Image.open(s) fg = qrcode.make(i) fg = fg.r...
[ 2, 43313, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 10662, 6015, 1098, 1303, 10545, 249, 116, 33778, 49035, 118, 22180, 198, 6738, 12972, 89, 5657, 1330, 12972, 89, 5657, 198, ...
2.179245
212
#generates a random number in the given range import random num = int(input('Enter a max number: ')) print('Here is a random number: ' + str(random.randint(0,num)))
[ 2, 8612, 689, 257, 4738, 1271, 287, 262, 1813, 2837, 198, 11748, 4738, 220, 198, 22510, 796, 493, 7, 15414, 10786, 17469, 257, 3509, 1271, 25, 705, 4008, 198, 4798, 10786, 4342, 318, 257, 4738, 1271, 25, 705, 1343, 965, 7, 25120, 13...
3.254902
51
doubleClick("password_field.png") doubleClick("login_button.png") doubleClick("email_field.png") click("login_button_green.png") click("search_field.png") click("charlie_puth_icon.png") click("pause_button.png") click("play_button.png") click("search_cancel_icon.png") click("coldplay_icon.png") click("add_new_playlist_...
[ 23352, 8164, 7203, 28712, 62, 3245, 13, 11134, 4943, 198, 23352, 8164, 7203, 38235, 62, 16539, 13, 11134, 4943, 198, 23352, 8164, 7203, 12888, 62, 3245, 13, 11134, 4943, 198, 12976, 7203, 38235, 62, 16539, 62, 14809, 13, 11134, 4943, 19...
2.862745
153
from .dataset import MultiResolutionPoseDataset import torch.utils.data
[ 198, 198, 6738, 764, 19608, 292, 316, 1330, 15237, 4965, 2122, 47, 577, 27354, 292, 316, 198, 11748, 28034, 13, 26791, 13, 7890, 628, 628 ]
3.08
25
import cv2 import numpy as np import os import PIL.Image as Image import pylot.perception.detection.utils import pylot.utils
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 350, 4146, 13, 5159, 355, 7412, 198, 198, 11748, 279, 2645, 313, 13, 525, 4516, 13, 15255, 3213, 13, 26791, 198, 11748, 279, 2645, 313, 13, 26791, ...
2.953488
43
""" Control pixel ring on ReSpeaker V2 sudo apt install python-mraa libmraa1 pip install pixel-ring """ import time from pixel_ring import pixel_ring import mraa import os #Inicializa uso del bus para el anillo de leds en = mraa.Gpio(12) if os.geteuid() != 0 : time.sleep(1) en.dir(mraa.DIR_OUT) en.write(0) ...
[ 37811, 198, 15988, 17465, 5858, 319, 797, 5248, 3110, 569, 17, 198, 198, 24032, 15409, 2721, 21015, 12, 76, 430, 64, 9195, 76, 430, 64, 16, 198, 79, 541, 2721, 17465, 12, 1806, 198, 198, 37811, 198, 198, 11748, 640, 198, 198, 6738, ...
1.922
500
# # PySNMP MIB module AH-SMI-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/AH-SMI-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:00:22 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 28159, 12, 50, 8895, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490, 14, 67, 615, 47562, ...
2.495525
1,229
import numpy as np # Simple library of functions for computing x-ray background flux # # All energies should be passed in keV!!! # # Everything in this library is based on the following paper: # # The Spectrum of Diffuse Cosmic Hard X-Rays Measured with HEAO 1 # # D.E. Gruber, J.L. Matteson, L.E. Peterson # P...
[ 11748, 299, 32152, 355, 45941, 198, 198, 2, 17427, 5888, 286, 5499, 329, 14492, 2124, 12, 2433, 4469, 28462, 198, 2, 198, 2, 1439, 27598, 815, 307, 3804, 287, 885, 53, 10185, 198, 2, 198, 2, 11391, 287, 428, 5888, 318, 1912, 319, ...
3.424242
132
"""Django DDP models.""" import collections import os from django.db import models from django.db.models.fields import NOT_PROVIDED from django.conf import settings from django.contrib.contenttypes.fields import ( GenericRelation, GenericForeignKey, ) from django.contrib.contenttypes.models import ContentType fr...
[ 37811, 35, 73, 14208, 360, 6322, 4981, 526, 15931, 628, 198, 11748, 17268, 198, 11748, 28686, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 25747, 1330, 5626, 62, 41283, 2389, 1961...
2.360769
5,200
# Copyright 2017-present Open Networking Foundation # # 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 agr...
[ 2, 15069, 2177, 12, 25579, 4946, 7311, 278, 5693, 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, 1...
3.44
300
message = "hello world!" print(message)
[ 20500, 796, 366, 31373, 995, 2474, 198, 4798, 7, 20500, 8 ]
3.545455
11
# DO NOT EDIT THIS FILE. This file will be overwritten when re-running go-raml. from enum import Enum
[ 2, 8410, 5626, 48483, 12680, 45811, 13, 770, 2393, 481, 307, 6993, 9108, 618, 302, 12, 20270, 467, 12, 859, 75, 13, 198, 198, 6738, 33829, 1330, 2039, 388, 628 ]
3.466667
30
import datetime import hashlib import random import uuid import dateutil import jwt import icalendar import pytz from ed_platform import app, db, ma, RestException, discourse from marshmallow import fields, post_load, post_dump from flask import g class User(): '''Used exclusively to manage the SSO/Shibboleth in...
[ 11748, 4818, 8079, 198, 11748, 12234, 8019, 198, 11748, 4738, 198, 11748, 334, 27112, 198, 198, 11748, 3128, 22602, 198, 11748, 474, 46569, 198, 11748, 220, 605, 9239, 198, 11748, 12972, 22877, 198, 198, 6738, 1225, 62, 24254, 1330, 598, ...
2.82131
901
from pyecharts import options as opts from pyecharts.charts import Map3D from pyecharts.globals import ChartType from pyecharts.commons.utils import JsCode example_data = [ ("黑龙江", [127.9688, 45.368, 100]), ("内蒙古", [110.3467, 41.4899, 100]), ("吉林", [125.8154, 44.2584, 100]), ("辽宁", [123.1238, 42.1216, ...
[ 6738, 12972, 3055, 5889, 1330, 3689, 355, 2172, 82, 198, 6738, 12972, 3055, 5889, 13, 354, 5889, 1330, 9347, 18, 35, 198, 6738, 12972, 3055, 5889, 13, 4743, 672, 874, 1330, 22086, 6030, 198, 6738, 12972, 3055, 5889, 13, 9503, 684, 13,...
1.727586
1,450
import urllib.request import re if __name__ == "__main__": main()
[ 11748, 2956, 297, 571, 13, 25927, 198, 11748, 302, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 220, 220, 220, 220, 198, 220, 220, 220, 1388, 3419, 220, 220, 198 ]
2.02381
42
# <<BEGIN-copyright>> # Copyright 2019, Lawrence Livermore National Security, LLC. # See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: MIT # <<END-copyright>> from __future__ import print_function import os from numericalFunctions import pointwiseXY_C if( 'CHECKOPTIONS' in os.environ ) : ...
[ 2, 9959, 33, 43312, 12, 22163, 4766, 4211, 198, 2, 15069, 13130, 11, 13914, 45036, 3549, 2351, 4765, 11, 11419, 13, 198, 2, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 220, 198, 2, 30628, 55, 12, 34...
2.28934
591
import numpy as np from collections import Counter
[ 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 15034, 628 ]
4.727273
11
#-*- coding:utf-8 -*- #''' # Created on 19-7-5 # # @Author: Greg Gao(laygin) #''' '''adapted from advanced east''' from keras import Model from keras.applications.vgg16 import VGG16 from keras.layers import Input,Concatenate, Conv2D,UpSampling2D, BatchNormalization, Deconv2D # 19-6-15 sat, new head, there is no conv ...
[ 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 7061, 6, 198, 2, 15622, 319, 678, 12, 22, 12, 20, 198, 2, 198, 2, 2488, 13838, 25, 8547, 402, 5488, 7, 10724, 1655, 8, 198, 2, 7061, 6, 198, 7061, 6, 42552, 276, ...
2.589286
168
from ..libs.view_helpers import * from ..libs.reference import * from .base_command import TypeScriptBaseTextCommand class TypescriptGoToTypeCommand(TypeScriptBaseTextCommand): """Go to type command"""
[ 6738, 11485, 8019, 82, 13, 1177, 62, 16794, 364, 1330, 1635, 198, 6738, 11485, 8019, 82, 13, 35790, 1330, 1635, 198, 6738, 764, 8692, 62, 21812, 1330, 5994, 7391, 14881, 8206, 21575, 628, 198, 4871, 17134, 3798, 1968, 5247, 2514, 6030, ...
3.466667
60
import pybullet as p import time #p.connect(p.DIRECT) #p.connect(p.DART) p.connect(p.MuJoCo) #p.connect(p.GUI) bodies = p.loadMJCF("mjcf/capsule.xml") print("bodies=",bodies) numBodies = p.getNumBodies() print("numBodies=",numBodies) for i in range (numBodies): print("bodyInfo[",i,"]=",p.getBodyInfo(i)) p.setGrav...
[ 11748, 12972, 15065, 1616, 355, 279, 198, 11748, 640, 198, 198, 2, 79, 13, 8443, 7, 79, 13, 17931, 23988, 8, 198, 2, 79, 13, 8443, 7, 79, 13, 35, 7227, 8, 198, 79, 13, 8443, 7, 79, 13, 33239, 9908, 7222, 8, 198, 198, 2, 79, ...
2.247649
319
from django.urls import path from .import views urlpatterns = [ path('', views.index, name = 'blog-index'), path('blog-create/', views.blogCreate, name = 'blog-create'), path('blog-detail/<str:pk>', views.blog, name = 'blog-detail'), path('blog-delete/<str:pk>', views.blogDelete, name = 'blog-delete')...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 11748, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 5009, 13, 9630, 11, 1438, 796, 705, 14036, 12, 9630, 33809, 198, 220, 220, 2...
2.672222
180
#!/usr/bin/env python3 import math if __name__ == "__main__": # execute only if run as a script main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 10688, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1303, 12260, 691, 611, 1057, 355, 257, 4226, 198, 220, 220, 220, 1388, 3419 ]
2.642857
42
HIRAGANA = 'hiragana' KATAKANA = 'katakana' # Specify the path to the processed files PROCESSED_DATA_PATH = 'KanaRecognizer/trainer/processed_data' MANUAL_HANDWRITING_DATA_PATH = 'hand_writing_data' PROBLEMS_CACHE_PATH = 'problems_cache/problems_cache.p' # Path templates of trained model HIRAGANA_MODEL_PATH_TEMP = 'K...
[ 25374, 33202, 31574, 796, 705, 71, 343, 363, 2271, 6, 198, 42, 1404, 10206, 31574, 796, 705, 41826, 461, 2271, 6, 198, 198, 2, 18291, 1958, 262, 3108, 284, 262, 13686, 3696, 198, 4805, 4503, 7597, 1961, 62, 26947, 62, 34219, 796, 70...
1.621403
2,224
""" Django settings for userstuff project. Generated by 'django-admin startproject' using Django 2.1.3. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ # Build pat...
[ 37811, 198, 35, 73, 14208, 6460, 329, 2836, 41094, 1628, 13, 198, 198, 8645, 515, 416, 705, 28241, 14208, 12, 28482, 923, 16302, 6, 1262, 37770, 362, 13, 16, 13, 18, 13, 198, 198, 1890, 517, 1321, 319, 428, 2393, 11, 766, 198, 545...
2.346722
2,913
from typing import Any, List, Tuple from onnxmltools.convert.xgboost.operator_converters.XGBoost import ( # noqa convert_xgboost, ) from skl2onnx import convert_sklearn, update_registered_converter from skl2onnx.common.data_types import ( BooleanTensorType, DoubleTensorType, FloatTensorType, Int32...
[ 6738, 19720, 1330, 4377, 11, 7343, 11, 309, 29291, 198, 198, 6738, 319, 77, 87, 76, 2528, 10141, 13, 1102, 1851, 13, 87, 70, 39521, 13, 46616, 62, 1102, 332, 1010, 13, 55, 4579, 78, 455, 1330, 357, 220, 1303, 645, 20402, 198, 220,...
2.446036
1,047
print(roman_to_integer('XXXVI'))
[ 198, 4798, 7, 47119, 62, 1462, 62, 41433, 10786, 43145, 12861, 6, 4008 ]
2.538462
13
from django.contrib.auth.models import User from django.contrib import messages from django.views.generic import ListView from django.views.generic.edit import FormView from django.shortcuts import redirect from .form import GenerateRandomUserForm from .task import create_random_user_accounts
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 7343, 7680, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 13...
3.7125
80
import os import s3fs config = {} config["S3_BUCKET"] = os.getenv("S3_BUCKET") config["S3_SECRET_KEY"] = os.getenv("S3_SECRET_KEY") config["S3_ACCESS_KEY"] = os.getenv("S3_ACCESS_KEY") config["S3_REGION"] = os.getenv("S3_REGION") config["S3_ENDPOINT"] = os.getenv("S3_ENDPOINT")
[ 11748, 28686, 198, 198, 11748, 264, 18, 9501, 198, 198, 11250, 796, 23884, 198, 11250, 14692, 50, 18, 62, 33, 16696, 2767, 8973, 796, 28686, 13, 1136, 24330, 7203, 50, 18, 62, 33, 16696, 2767, 4943, 198, 11250, 14692, 50, 18, 62, 23...
2.120301
133
import pathlib import random import os import shutil if __name__ == '__main__': src = '/data/att_faces' dst = '/data/att_faces_new' rs = TrainValidTestSplit(src_path=src, val_size=0.3, test_size=0.1) rs.execute(dst, mode='cp')
[ 11748, 3108, 8019, 198, 11748, 4738, 198, 11748, 28686, 198, 11748, 4423, 346, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 12351, 796, 31051, 7890, 14, 1078, 62, 32186, 6, 198, 220...
2.384615
104
from asyncio import get_event_loop from logging.config import dictConfig from aiohttp import web from .db import redis from .router import router from . import settings dictConfig(settings.LOGGING) app = web.Application(router=router) loop = get_event_loop() loop.run_until_complete(redis.init()) if __name__ == '__mai...
[ 6738, 30351, 952, 1330, 651, 62, 15596, 62, 26268, 198, 6738, 18931, 13, 11250, 1330, 8633, 16934, 198, 6738, 257, 952, 4023, 1330, 3992, 198, 6738, 764, 9945, 1330, 2266, 271, 198, 6738, 764, 472, 353, 1330, 20264, 198, 6738, 764, 13...
3.017391
115
import numpy as np import matplotlib import matplotlib.pyplot as plt if __name__ == '__main__': matplotlib.rc('font', **{'family': 'sans-serif', 'sans-serif': ['Helvetica'], 'size': 12}) matplotlib.rc('text', usetex=True) # Plotting the different regions for a system with denominator z**2 + a1*z + a2 ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 2603, 29487, 8019, 13, ...
2.185606
528
#!/usr/bin/env python3 from pyparsing import Word, Literal, alphas, alphanums, nums, ParseException from pyparsing import Suppress, QuotedString, oneOf, stringEnd # A subset of the C primitive types: tyype = Literal("float")|Literal("double")|Literal("int")|Literal("unsigned") # We could also write this as: tyype = o...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 279, 4464, 945, 278, 1330, 9678, 11, 25659, 1691, 11, 435, 5902, 11, 435, 19080, 5700, 11, 997, 82, 11, 2547, 325, 16922, 198, 6738, 279, 4464, 945, 278, 1330, 8105, ...
2.908582
1,608
import re import logging from time import sleep from contextlib import closing import progressbar import pandas as pd import muttlib.utils as utils from muttlib.dbconn.base import BaseClient logger = logging.getLogger(__name__) try: from pyhive import hive from TCLIService.ttypes import TOperationState # no...
[ 11748, 302, 198, 11748, 18931, 198, 6738, 640, 1330, 3993, 198, 6738, 4732, 8019, 1330, 9605, 198, 198, 11748, 4371, 5657, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 11748, 4517, 83, 8019, 13, 26791, 355, 3384, 4487, 198, 6738, 4...
2.20464
1,207
import time from ..rfc6749 import ( TokenEndpoint, OAuth2Error, InvalidRequestError, UnsupportedTokenTypeError, ) class IntrospectionEndpoint(TokenEndpoint): """Implementation of introspection endpoint which is described in `RFC7662`_. .. _RFC7662: https://tools.ietf.org/html/rfc7662 ...
[ 11748, 640, 198, 6738, 11485, 81, 16072, 3134, 2920, 1330, 357, 198, 220, 220, 220, 29130, 12915, 4122, 11, 198, 220, 220, 220, 440, 30515, 17, 12331, 11, 198, 220, 220, 220, 17665, 18453, 12331, 11, 198, 220, 220, 220, 791, 15999, ...
2.279105
1,967
""" by PENG Zhenghao """ import datetime import distutils.spawn import distutils.version import os import subprocess import time import cv2 import numpy as np from gym import logger, error
[ 37811, 198, 1525, 350, 26808, 1168, 831, 456, 5488, 198, 37811, 198, 11748, 4818, 8079, 198, 11748, 1233, 26791, 13, 48183, 198, 11748, 1233, 26791, 13, 9641, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 640, 198, 198, 11748, ...
3.288136
59
# -*- coding: utf-8 -*- import unittest #from pprint import pprint as pp from media.metadata.process import global_reader from media.monitor.metadata import Metadata import media.metadata.definitions as defs defs.load_definitions() if __name__ == '__main__': unittest.main()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 555, 715, 395, 198, 2, 6738, 279, 4798, 1330, 279, 4798, 355, 9788, 198, 198, 6738, 2056, 13, 38993, 13, 14681, 1330, 3298, 62, 46862, 198, 6738, 2056, 13, 4114...
3.088889
90
import cv2 import numpy as np image_name = '20200706140414.jpg' image = cv2.imread(image_name) print(image) con = np.array(([[308, 588], [745, 601], [740, 733], [303, 720]])) tmp = cv2.drawContours(image, [con], 0, (0, 0, 255), 3) cv2.imshow('tmp', tmp) cv2.waitKey(0) cv2.destroyAllWindows()
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 198, 9060, 62, 3672, 796, 705, 1238, 2167, 35402, 1415, 3023, 1415, 13, 9479, 6, 198, 9060, 796, 269, 85, 17, 13, 320, 961, 7, 9060, 62, 3672, 8, 198, 4798, 7, 9060, 8...
2.225564
133
import collections import sys import enum from typing import Dict, NamedTuple, Optional, TextIO, List, Tuple import logging from haoda import util __all__ = ( 'parse_hierarchical_utilization_report', 'HierarchicalUtilization', ) _logger = logging.getLogger().getChild(__name__) class HierarchicalUtilizatio...
[ 11748, 17268, 198, 198, 11748, 25064, 198, 11748, 33829, 198, 6738, 19720, 1330, 360, 713, 11, 34441, 51, 29291, 11, 32233, 11, 8255, 9399, 11, 7343, 11, 309, 29291, 198, 11748, 18931, 198, 198, 6738, 387, 11329, 1330, 7736, 198, 198, ...
2.678571
868
""" File: my_drawing.py Name:Hsu chunlin ---------------------- 此程式將創造一個長度為700,寬度為600的window。 並且利用非常多的GOval, GRect,GPolygon,GLine來組合出TOTORO(龍貓)在海邊黃昏的場景。 """ from campy.graphics.gobjects import GOval, GRect,GLabel,GPolygon,GLine from campy.graphics.gwindow import GWindow from campy.gui.events.timer import pause def ...
[ 37811, 198, 8979, 25, 616, 62, 19334, 278, 13, 9078, 198, 5376, 25, 39, 2385, 442, 403, 2815, 198, 19351, 438, 198, 29826, 97, 163, 101, 233, 28156, 237, 22887, 229, 30298, 113, 34460, 254, 31660, 161, 222, 233, 165, 243, 115, 41753...
1.824935
4,227
import unittest import numpy as np from ecopy import load_data, wt_mean, wt_var, wt_scale, diversity, rarefy if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 9940, 11081, 1330, 3440, 62, 7890, 11, 266, 83, 62, 32604, 11, 266, 83, 62, 7785, 11, 266, 83, 62, 9888, 11, 9573, 11, 4071, 24928, 198, 198, 361, 11593, 3672, 8...
2.57377
61
"""15. 3Sum https://leetcode.com/problems/3sum/ Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: The solution set must not contain duplicate triplets. Example: Given array nums = [-1, 0, 1, 2, -1,...
[ 37811, 1314, 13, 513, 13065, 198, 5450, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 18, 16345, 14, 198, 198, 15056, 281, 7177, 997, 82, 286, 299, 37014, 11, 389, 612, 4847, 257, 11, 275, 11, 269, 287, 997, 82, 198, 10508, ...
2.731544
149