content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# 「テキストエディター」エリア → ヘッダー import bpy from . import common from . import compat # メニュー等に項目追加 @compat.BlRegister() @compat.BlRegister() @compat.BlRegister() @compat.BlRegister()
[ 2, 40283, 24336, 25084, 43302, 23544, 40629, 23376, 6312, 13700, 23544, 12675, 11839, 15168, 14524, 246, 14777, 27852, 6312, 198, 11748, 275, 9078, 198, 6738, 764, 1330, 2219, 198, 6738, 764, 1330, 8330, 628, 198, 2, 14524, 94, 30165, 244...
2.021978
91
from loader import Loader from metadataloader import WrongHeaderException from metadataloader import MetaDataLoader
[ 6738, 40213, 1330, 8778, 263, 198, 6738, 1138, 324, 10254, 1170, 263, 1330, 28843, 39681, 16922, 198, 6738, 1138, 324, 10254, 1170, 263, 1330, 30277, 6601, 17401, 198 ]
4.142857
28
""" Support for interacting with and controlling the cmus music player. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.cmus/ """ import logging import voluptuous as vol from homeassistant.components.media_player import ( MEDIA_TYPE_MU...
[ 37811, 198, 15514, 329, 24986, 351, 290, 12755, 262, 12067, 385, 2647, 2137, 13, 198, 198, 1890, 517, 3307, 546, 428, 3859, 11, 3387, 3522, 284, 262, 10314, 379, 198, 5450, 1378, 11195, 12, 562, 10167, 13, 952, 14, 5589, 3906, 14, 1...
2.392292
2,906
from rest_framework import serializers from rest_framework.exceptions import ValidationError from core.models.template import HelpLink
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 1334, 62, 30604, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 198, 6738, 4755, 13, 27530, 13, 28243, 1330, 10478, 11280, 628 ]
4.419355
31
from __future__ import absolute_import, division, print_function, unicode_literals from .config import * from .data import * from .display import * from .helper import * from .methods import * from .misc import * from .whiten import *
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 764, 11250, 1330, 1635, 198, 6738, 764, 7890, 1330, 1635, 198, 6738, 764, 13812, 1330, 1635, 198, 6738, 764...
3.449275
69
#!/usr/bin/env python3 import os.path import textwrap # List of tuples ('idVendor', 'idProduct'), as four hexadecimal digits. DEVICES = [ # Microsoft Microsoft Wireless Optical Desktop® 2.10 # Microsoft Wireless Desktop - Comfort Edition ('045e', '009d'), # Microsoft Microsoft® Digital Media Pro Keyb...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 13, 6978, 198, 11748, 2420, 37150, 198, 198, 2, 7343, 286, 12777, 2374, 19203, 312, 53, 18738, 3256, 705, 312, 15667, 33809, 355, 1440, 17910, 671, 66, 4402, 195...
2.474214
1,590
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from autor...
[ 2, 16529, 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, 5964, 1321, 13, 198, 2, 16529, 35937, 198, 6...
6.186441
59
import os from setuptools import setup # The text of the README file f=open(os.path.join(os.path.dirname(os.path.abspath(__file__)),'README.md')) README=f.read() f.close() setup(name='pvder', version=open("pvder/_version.py").readlines()[-1].split()[-1].strip("\"'"), packages=['pvder',], include_pac...
[ 11748, 28686, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 2, 383, 2420, 286, 262, 20832, 11682, 2393, 198, 69, 28, 9654, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776,...
2.320537
521
# test zonal stats import os import pytest from osgeo import ogr from rasterstats import raster_stats, stats_to_csv, RasterStatsError from rasterstats.main import VALID_STATS from rasterstats.utils import shapely_to_ogr_type, parse_geo, get_ogr_ds, \ OGRError, feature_to_geojson, bbox_to_p...
[ 2, 1332, 1976, 20996, 9756, 198, 11748, 28686, 198, 11748, 12972, 9288, 198, 6738, 28686, 469, 78, 1330, 267, 2164, 198, 6738, 374, 1603, 34242, 1330, 374, 1603, 62, 34242, 11, 9756, 62, 1462, 62, 40664, 11, 371, 1603, 29668, 12331, 1...
2.595745
235
from tkinter import * import tkinter as tk import tkinter.messagebox import tkinter.font as tkFont from PIL import Image,ImageTk import os import sqlite3 import datetime from civilian_home import civ_home from acp_home import acp_home from constable_home import const_home from sys_home import system_home ...
[ 6738, 256, 74, 3849, 1330, 1635, 201, 198, 11748, 256, 74, 3849, 355, 256, 74, 201, 198, 11748, 256, 74, 3849, 13, 20500, 3524, 201, 198, 11748, 256, 74, 3849, 13, 10331, 355, 256, 74, 23252, 201, 198, 6738, 350, 4146, 1330, 7412, ...
2.474851
3,519
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os from clastic import Application, StaticApplication, StaticFileRoute _CUR_DIR = os.path.dirname(os.path.abspath(__file__))
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 28686, 198, 198, 6738, 537, 3477, 1330, 15678, 11, 36125, 23416, 11, 36125, 8979, 43401, 198, ...
2.830986
71
from .rival300csgofadeedition import rival300csgofadeedition rival300csgofadeeditionstm32 = { "name": "SteelSeries Rival 300 CS:GO Fade Edition (stm32)", "vendor_id": 0x1038, "product_id": 0x1716, "interface_number": 0, "commands": rival300csgofadeedition["commands"], }
[ 6738, 764, 43171, 6200, 6359, 70, 1659, 671, 28736, 1330, 8976, 6200, 6359, 70, 1659, 671, 28736, 628, 198, 43171, 6200, 6359, 70, 1659, 671, 28736, 301, 76, 2624, 796, 1391, 198, 220, 220, 220, 366, 3672, 1298, 366, 39807, 27996, 371...
2.508475
118
""" Basic building blocks for generic class based views. We don't bind behaviour to http method handlers yet, which allows mixin classes to be composed in interesting ways. """ from rest_framework import status from rest_framework.response import Response from rest_framework.settings import api_settings class Create...
[ 37811, 198, 26416, 2615, 7021, 329, 14276, 1398, 1912, 5009, 13, 198, 198, 1135, 836, 470, 11007, 9172, 284, 2638, 2446, 32847, 1865, 11, 198, 4758, 3578, 5022, 259, 6097, 284, 307, 13160, 287, 3499, 2842, 13, 198, 37811, 198, 6738, 1...
3.204878
205
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # 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 ...
[ 2, 19617, 28, 40477, 23, 198, 198, 2, 15069, 2864, 28591, 5097, 2606, 35, 13, 9858, 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, ...
3.73743
179
from actions.security import Security from command_abc import AbsCommand
[ 6738, 4028, 13, 12961, 1330, 4765, 201, 198, 6738, 3141, 62, 39305, 1330, 13051, 21575, 201, 198, 201, 198, 201 ]
3.9
20
if __name__ == '__main__': import random j = 1 while j <= 1000: x = [random.randint(0,999999999999) for i in range(0,j)] y = [a for a in x] z = [a for a in x] y.sort() quick_sort(x, 0, len(x) - 1) if y != x: print("Sorting failed for {}".format(z)...
[ 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1330, 4738, 198, 220, 220, 220, 474, 796, 352, 198, 220, 220, 220, 981, 474, 19841, 8576, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 68...
1.898148
216
# -*- coding: utf-8 -*- from enum import Enum from qqbot.core.network.ws.ws_event import WsEvent from qqbot.core.network.ws.ws_handler import DefaultHandler def register_handlers(handlers): """ RegisterHandlers 注册事件回调,并返回 intent 用于 websocket 的鉴权 """ intent = 0 for handler in handlers: ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 6738, 10662, 80, 13645, 13, 7295, 13, 27349, 13, 18504, 13, 18504, 62, 15596, 1330, 370, 82, 9237, 198, 6738, 10662, 80, 1...
2.4967
606
# SPDX-FileCopyrightText: (c) 2021 Artёm IG <github.com/rtmigo> # SPDX-License-Identifier: MIT from ._20_encdec_part import DecryptedIO from ._30_encdec_multipart import MultipartEncryptor, decrypt_from_dios
[ 2, 30628, 55, 12, 8979, 15269, 8206, 25, 357, 66, 8, 33448, 3683, 141, 239, 76, 35336, 1279, 12567, 13, 785, 14, 17034, 76, 14031, 29, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 628, 198, 6738, 47540, 1238, 62, 268,...
2.658228
79
"""Automatically run post mortem debugging""" from .mort import main, run __version__ = "0.9.1"
[ 37811, 38062, 4142, 1057, 1281, 5596, 368, 28769, 37811, 198, 6738, 764, 30171, 1330, 1388, 11, 1057, 198, 198, 834, 9641, 834, 796, 366, 15, 13, 24, 13, 16, 1, 198 ]
3.129032
31
import argparse import random import numpy as np import torch import spacy import scispacy import json import os import pandas as pd from spacy.training import Example from tqdm import tqdm from datasets import Dataset from functools import partial from custom_trainer import CustomTrainer import ipdb from collections ...
[ 11748, 1822, 29572, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 599, 1590, 198, 11748, 629, 8802, 1590, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, ...
2.263693
9,841
from typing import List from investing_algorithm_framework import SQLLitePortfolioManager, Position, \ Order from investing_algorithm_framework.core.exceptions import OperationalException from investing_algorithm_framework.core.models import AssetPrice from tests.resources import TestBase
[ 6738, 19720, 1330, 7343, 198, 198, 6738, 14771, 62, 282, 42289, 62, 30604, 1330, 49747, 3069, 578, 13924, 13652, 13511, 11, 23158, 11, 3467, 198, 220, 220, 220, 8284, 198, 6738, 14771, 62, 282, 42289, 62, 30604, 13, 7295, 13, 1069, 11...
4.183099
71
from auror_core.v2.params import Params class {{cookiecutter.project_name}}(Params): pass
[ 6738, 45714, 273, 62, 7295, 13, 85, 17, 13, 37266, 1330, 2547, 4105, 198, 198, 4871, 22935, 44453, 8968, 353, 13, 16302, 62, 3672, 11709, 7, 10044, 4105, 2599, 198, 220, 220, 220, 1208 ]
2.764706
34
import sys, getopt from os import path import time from configure import Configure from scanner import FoundFile, Scanner from checker import Checker from taker import Taker print("** Welcome to MyWayback! **") args = sys.argv[1:] if len(args) == 0: print("ERROR: Missing command-line argument!") exit(0) targetba...
[ 11748, 25064, 11, 651, 8738, 198, 6738, 28686, 1330, 3108, 198, 11748, 640, 198, 6738, 17425, 1330, 17056, 495, 198, 6738, 27474, 1330, 4062, 8979, 11, 20937, 1008, 198, 6738, 2198, 263, 1330, 6822, 263, 198, 6738, 256, 3110, 1330, 309,...
2.721311
427
"""This module contains file carving scenario related classes and functions.""" from multimethod import multimethod import woodblock.fragments class Scenario(list): """This class represents a file carving scenario. A scenario contains fragments in a certain order. Args: name: The name of the s...
[ 37811, 1212, 8265, 4909, 2393, 39510, 8883, 3519, 6097, 290, 5499, 526, 15931, 198, 198, 6738, 1963, 38813, 2065, 1330, 1963, 38813, 2065, 198, 198, 11748, 4898, 9967, 13, 8310, 363, 902, 628, 198, 4871, 1446, 39055, 7, 4868, 2599, 198,...
2.414545
825
from django.urls import path from . import views from django.contrib.auth import views as auth_views urlpatterns = [ path('registro/', views.registro, name='registro'), path('login/', auth_views.LoginView.as_view(template_name='users/login.html'), name='login'), path('logout/', auth_views.LogoutView.as_vie...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 5009, 355, 6284, 62, 33571, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 2301,...
2.648649
185
from setuptools import setup import re APP_NAME = 'ptlearn' VERSION = '0.1' if __name__ == '__main__': check_version() setup( name=APP_NAME, version=VERSION, description='A Python machine learing library, based on PyTorch', long_description=readme(), classifiers=[ ...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 11748, 302, 628, 198, 24805, 62, 20608, 796, 705, 457, 35720, 6, 198, 43717, 796, 705, 15, 13, 16, 6, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, ...
2.197628
506
#!/usr/bin/python # Task to maintain system RTC aligned with GPS time, coming from a # Teltonka RUT955 terminal. import socket import sys import time import os import logging import logging.handlers if __name__ == "__main__": logger = logging.getLogger('GPS_Task') logger.setLevel(logging.DEBUG) hand...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 15941, 284, 5529, 1080, 371, 4825, 19874, 351, 15472, 640, 11, 2406, 422, 257, 198, 2, 12088, 1122, 4914, 371, 3843, 24, 2816, 12094, 13, 198, 198, 11748, 17802, 198, 11748, 25064, ...
2.192037
1,281
import discord from discord.ext import commands, tasks import asyncio import time import datetime import json import aiohttp import os from discord import Webhook, AsyncWebhookAdapter client = commands.AutoShardedBot(command_prefix=".") Client = discord.Client() client.remove_command('help') with open("adat.json") as...
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 11, 8861, 198, 11748, 30351, 952, 198, 11748, 640, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 11748, 257, 952, 4023, 198, 11748, 28686, 198, 6738, 36446, 1330, 5313, 25480, 11, ...
3.054795
146
# coding: utf-8 # Manticore Search Client # Copyright (c) 2020-2021, Manticore Software LTD (https://manticoresearch.com) # # All rights reserved # from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from six.moves.urllib.parse import quote fro...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 337, 5109, 382, 11140, 20985, 198, 2, 15069, 357, 66, 8, 12131, 12, 1238, 2481, 11, 337, 5109, 382, 10442, 42513, 357, 5450, 1378, 76, 5109, 382, 12947, 13, 785, 8, 198, 2, 220, 198, ...
2.269055
7,203
import logging from typing import AnyStr, Callable, Iterable, List, Optional, Tuple LOGGER = logging.getLogger(__name__) T_IsJunkFunction = Callable[[AnyStr, int], bool] EMPTY_MATCHING_BLOCKS = MatchingBlocks([])
[ 11748, 18931, 198, 198, 6738, 19720, 1330, 4377, 13290, 11, 4889, 540, 11, 40806, 540, 11, 7343, 11, 32233, 11, 309, 29291, 628, 198, 25294, 30373, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 51, 62, 3792, 41,...
2.8625
80
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import sys from distutils.ccompiler import new_compiler from distutils.di...
[ 2, 770, 2393, 318, 10668, 11971, 739, 262, 2846, 286, 262, 24843, 13789, 11, 10628, 198, 2, 362, 13, 15, 11, 290, 262, 347, 10305, 13789, 13, 4091, 262, 38559, 24290, 2393, 287, 262, 6808, 286, 428, 16099, 198, 2, 329, 1844, 3307, ...
2.792487
1,118
# -*- coding: utf-8 -*- # """ TODO. """ from __future__ import print_function, division import logging from ..integrator import Base from ..lib import extensions from ..lib.utils.timing import decallmethods, timings __all__ = ["Sakura"] logger = logging.getLogger(__name__) def sakura_step(ps, tau): """ ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 198, 37811, 198, 51, 3727, 46, 13, 198, 37811, 628, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 198, 11748, 18931, 198, 6738, 11485, 18908, 1...
1.756716
2,010
from serif.model.event_mention_model import EventMentionModel # Modified from DummyEventMentionModel
[ 6738, 1055, 361, 13, 19849, 13, 15596, 62, 434, 295, 62, 19849, 1330, 8558, 44, 1463, 17633, 628, 198, 2, 40499, 422, 360, 13513, 9237, 44, 1463, 17633, 198 ]
3.551724
29
#!/usr/bin/env python # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Performs some static analysis checks on Chrome debian packages using lintian. """ import argparse import os import subprocess SUP...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 2177, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043,...
3.092715
453
""" Multilayer Perceptron model for binary classification. The model has 10 inputs, 3 hidden layers with 10, 20, and 10 neurons,and an output layer with 1 output. Rectified linear activation functions are used in each hidden layer and a sigmoid activation function is used in the output layer,for binary classificatio...
[ 37811, 198, 15205, 346, 2794, 2448, 984, 1313, 2746, 329, 13934, 17923, 13, 220, 198, 198, 464, 2746, 468, 838, 17311, 11, 513, 7104, 11685, 351, 838, 11, 1160, 11, 290, 838, 16890, 11, 392, 281, 5072, 7679, 351, 352, 5072, 13, 198,...
3.241877
277
#%% # 画像・バウンディングボックス・ラベルのセットを準備する import torch import torch.nn as nn image = torch.zeros((1, 3, 800, 800)).float() bbox = torch.FloatTensor([[20, 30, 400, 500], [300, 400, 500, 600]]) # [y1, x1, y2, x2] format labels = torch.LongTensor([6, 8]) # 0 represents background sub_sample = 16 #%% # VGG16を、バックボーンに使用する # VG...
[ 2, 16626, 198, 198, 2, 13328, 242, 119, 161, 225, 237, 4707, 29659, 16165, 6527, 40629, 6527, 26095, 1209, 250, 35702, 8943, 4707, 9263, 35604, 9202, 5641, 47271, 35799, 31758, 162, 118, 244, 43636, 247, 33623, 25748, 198, 198, 11748, 2...
1.934177
395
import csv
[ 11748, 269, 21370, 628 ]
3
4
#@title datasets_tutorials(cifar-10) { display-mode: "both" } # conding: utf-8 import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data # from functools import reduce import tensorflow_datasets as tfds import numpy as np import time # tf.logging.set_verbosity(tf.logging.ERROR) if __name__ =...
[ 2, 31, 7839, 40522, 62, 83, 44917, 82, 7, 66, 361, 283, 12, 940, 8, 1391, 3359, 12, 14171, 25, 366, 16885, 1, 1782, 198, 2, 1779, 278, 25, 3384, 69, 12, 23, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125...
1.891842
3,236
#Declaring vars goes like this: # #in the file, all ya gotta do is specify # #<monster>_<info> = "value" # #info can be: # #size #hitpoints #speed #strength #dexterity #constitution #intelligence #wisdom #charisma #senses #language #challenge #dice #initiative #armor #baseattack #attack #fullattack #reach #specialatta...
[ 2, 37835, 1723, 410, 945, 2925, 588, 428, 25, 198, 2, 198, 2, 259, 262, 2393, 11, 477, 21349, 17753, 466, 318, 11986, 220, 198, 2, 198, 2, 27, 39050, 29, 62, 27, 10951, 29, 796, 366, 8367, 1, 198, 2, 198, 2, 10951, 460, 307, ...
2.953659
410
# ================================================================================================== # Copyright 2011 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
[ 2, 38093, 10052, 28, 198, 2, 15069, 2813, 3009, 11, 3457, 13, 198, 2, 16529, 3880, 438, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 670, 2845, 287, ...
2.725045
1,673
from pathlib import Path
[ 6738, 3108, 8019, 1330, 10644, 628 ]
4.333333
6
from Crypto.Cipher import AES from pkcs7 import PKCS7Encoder import base64 key = 'your key 16bytes' # 16 byte initialization vector iv = '1234567812345678' aes = AES.new(key, AES.MODE_CBC, iv) encoder = PKCS7Encoder() text = 'This is my plain text' # pad the plain text according to PKCS7 pad_text = encoder.encode(t...
[ 6738, 36579, 13, 34, 10803, 1330, 34329, 198, 6738, 279, 74, 6359, 22, 1330, 29673, 7902, 22, 27195, 12342, 198, 11748, 2779, 2414, 198, 198, 2539, 796, 705, 14108, 1994, 1467, 33661, 6, 198, 2, 1467, 18022, 37588, 15879, 198, 452, 79...
2.858824
170
from __future__ import print_function minimum_required = '1.0.0' # Ensure Pytorch is importable and its version is sufficiently recent. This # needs to happen before anything else, since the imports below will try to # import Pytorch, too. def _ensure_pt_install(): # pylint: disable=g-statement-before-imports "...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 39504, 62, 35827, 796, 705, 16, 13, 15, 13, 15, 6, 628, 198, 2, 48987, 9485, 13165, 354, 318, 1330, 540, 290, 663, 2196, 318, 17338, 2274, 13, 770, 198, 2, 2476, 284, 1645, ...
2.899254
536
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from .input import write_input def main(): """ Command-line utility to generate an input for chemiscope — the interactive structure-property explorer. Parses an input file containing atomic structures using the ASE I/O module, and converts it into a JSON ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 764, 15414, 1330, 3551, 62, 15414, 628, 198, 4299, 1388, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 2...
2.543886
1,333
import pandas as pd import numpy as np import argparse, sys, re orf_names = ['ORF_ID', 'Contig', 'COG', 'KO'] #, 'product'] def merge_orf_and_funtax( orf_file, funtax_file ): """ Takes an orf file and a funtaxa file and returns the merge """ orf_df = pd.read_table(orf_file, header=None, names=orf_name...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1822, 29572, 11, 25064, 11, 302, 198, 198, 24263, 62, 14933, 796, 37250, 1581, 37, 62, 2389, 3256, 705, 4264, 328, 3256, 705, 34, 7730, 3256, 705, 22328,...
2.210052
776
from .utils.env import make_env, GridWorldParallelEnv
[ 6738, 764, 26791, 13, 24330, 1330, 787, 62, 24330, 11, 24846, 10603, 10044, 29363, 4834, 85, 628, 198 ]
3.111111
18
from typing import Iterable from eth2spec.gen_helpers.gen_base import gen_runner, gen_typing import ssz_basic_vector import ssz_bitlist import ssz_bitvector import ssz_boolean import ssz_uints import ssz_container from eth2spec.test.helpers.constants import PHASE0 if __name__ == "__main__": gen_runner.run_genera...
[ 6738, 19720, 1330, 40806, 540, 198, 6738, 4555, 17, 16684, 13, 5235, 62, 16794, 364, 13, 5235, 62, 8692, 1330, 2429, 62, 16737, 11, 2429, 62, 774, 13886, 198, 11748, 37786, 89, 62, 35487, 62, 31364, 198, 11748, 37786, 89, 62, 2545, ...
2.550308
487
#!/usr/local/bin/python3.4 import os, sys, logging, json, argparse, time, datetime, requests, uuid from config_files import settings #### NETWORK SLICE MANAGER/NFVO URL JSON_CONTENT_HEADER = {'Content-Type':'application/json'} #### REQUESTS # returns all the slice-subnets templates in the NSM # returns a specific...
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 18, 13, 19, 198, 198, 11748, 28686, 11, 25064, 11, 18931, 11, 33918, 11, 1822, 29572, 11, 640, 11, 4818, 8079, 11, 7007, 11, 334, 27112, 198, 198, 6738, 4566, 62, 16624, 1330, 6460, ...
3.282178
202
import io import os import subprocess from datetime import datetime from urllib.parse import urlparse from rastervision.filesystem import (FileSystem, NotReadableError, NotWritableError) # Code from https://alexwlchan.net/2017/07/listing-s3-keys/ def get_matching_s3_objects(bucke...
[ 11748, 33245, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 198, 198, 6738, 374, 1603, 10178, 13, 16624, 6781, 1330, 357, 8979, 11964, 11, 1...
2.550995
804
# # Copyright Soramitsu Co., Ltd. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 # import can_receive # Please see example for can_receive permission. # By design can_receive and can_transfer permissions # can be tested only together.
[ 2, 198, 2, 15069, 15423, 321, 19831, 1766, 1539, 12052, 13, 1439, 6923, 33876, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 198, 198, 11748, 460, 62, 260, 15164, 198, 198, 2, 4222, 766, 1...
3.364865
74
#! /usr/bin/env python import rospy import fetch_api def wait_for_time(): """Wait for simulated time to begin. """ while rospy.Time().now().to_sec() == 0: pass if __name__ == '__main__': main()
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 686, 2777, 88, 198, 11748, 21207, 62, 15042, 628, 198, 198, 4299, 4043, 62, 1640, 62, 2435, 33529, 198, 220, 220, 220, 37227, 21321, 329, 28590, 640, 284, 2221, 13, 198...
2.34375
96
def create_new_connection(parent_node, child_node, action, prior_probability): """ Returns the edge connecting parent and child """ edge = Edge(parent_node, child_node, action, prior_probability) parent_node.add_outgoing_edge(edge) child_node.add_incoming_edge(edge) return edge
[ 628, 198, 4299, 2251, 62, 3605, 62, 38659, 7, 8000, 62, 17440, 11, 1200, 62, 17440, 11, 2223, 11, 3161, 62, 1676, 65, 1799, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 16409, 262, 5743, 14320, 2560, 290, 1200, 198, 220, 2...
2.792793
111
"""skedding.py weightless thread scheduling """ #print( "module {0}".format(__name__)) import sys import os import time from collections import deque from ..aid.consoling import getConsole console = getConsole() from ..aid.sixing import * from ..aid import odict, oset from .globaling import * from ..aid import t...
[ 37811, 8135, 6048, 278, 13, 9078, 3463, 1203, 4704, 26925, 628, 198, 37811, 198, 2, 4798, 7, 366, 21412, 1391, 15, 92, 1911, 18982, 7, 834, 3672, 834, 4008, 198, 198, 11748, 25064, 198, 198, 11748, 28686, 198, 11748, 640, 198, 6738, ...
2.159844
7,451
# Copyright 2015 Mirantis, 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, 220, 220, 220, 15069, 1853, 7381, 20836, 11, 3457, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, ...
3.276596
282
""" 技术要点:1、创建基于声谱图的卷积神经网络模型(十分类),本文件为第五版本 2、三种功能选择:训练并保存模型、评估模型、类别预测 3、三种训练方法:2d卷积、沿时间卷积、沿频率卷积 4、添加了绘制准确率和损失值变化曲线的代码; 5、注释掉早停法代码行; 6、模型训练回调函数改为logs_loss。 改进方面:音频预处理后再训练 运行结果:300轮训练后,准确率可达到84% 准确率和损失值曲线效果较好,其他曲线效果不佳 """ import numpy as np from scipy import signal import sc...
[ 37811, 198, 162, 232, 222, 17312, 107, 17358, 223, 163, 224, 117, 171, 120, 248, 16, 23513, 26344, 249, 161, 119, 118, 161, 253, 118, 12859, 236, 18004, 108, 164, 108, 109, 32368, 122, 21410, 39355, 115, 163, 100, 107, 15351, 163, 1...
1.828922
3,589
import pytest import torch DEVICES = ["cpu"] if torch.cuda.is_available(): DEVICES.append("cuda") @pytest.fixture(params=DEVICES) def device(request): """parametrized device function, that returns string names of the devices that ``torch`` considers "available". causes any test using ``device`` ...
[ 11748, 12972, 9288, 198, 11748, 28034, 198, 198, 39345, 34444, 796, 14631, 36166, 8973, 198, 361, 28034, 13, 66, 15339, 13, 271, 62, 15182, 33529, 198, 220, 220, 220, 5550, 53, 34444, 13, 33295, 7203, 66, 15339, 4943, 628, 198, 31, 90...
3.032258
155
# Copyright 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" file accompanyin...
[ 2, 15069, 6186, 13, 785, 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, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, ...
3.262873
369
import glob import cv2 import regex as re from .deep_optical_flow import deep_optical_flow from .interpolations import warp_flow from .parameters import * def sphere_interpolation(model_path="./flownet2/pretrained_models/FlowNet2_checkpoint.pth.tar"): """ Sphere dataset interpolation of Frame N+1 from Frame N...
[ 11748, 15095, 198, 11748, 269, 85, 17, 198, 11748, 40364, 355, 302, 198, 6738, 764, 22089, 62, 8738, 605, 62, 11125, 1330, 2769, 62, 8738, 605, 62, 11125, 198, 6738, 764, 3849, 16104, 602, 1330, 25825, 62, 11125, 198, 6738, 764, 17143...
2.611111
378
import json import logging from typing import Tuple, Dict, Optional, Union, NamedTuple, IO from lxml import objectify from kloppy.domain import ( TrackingDataset, DatasetFlag, AttackingDirection, Frame, Point, Point3D, Team, BallState, Period, Provider, Orientation, att...
[ 11748, 33918, 198, 11748, 18931, 198, 6738, 19720, 1330, 309, 29291, 11, 360, 713, 11, 32233, 11, 4479, 11, 34441, 51, 29291, 11, 24418, 198, 198, 6738, 300, 19875, 1330, 2134, 1958, 198, 198, 6738, 479, 5439, 14097, 13, 27830, 1330, ...
2.65368
231
"""Config flow to configure the Meteo-Swiss integration.""" import logging import re import voluptuous as vol from homeassistant.const import CONF_NAME, CONF_LATITUDE, CONF_LONGITUDE from homeassistant import config_entries from homeassistant.core import callback from .const import DOMAIN,CONF_POSTCODE,CONF_STATION,CO...
[ 37811, 16934, 5202, 284, 17425, 262, 3395, 68, 78, 12, 10462, 747, 11812, 526, 15931, 198, 11748, 18931, 198, 198, 11748, 302, 198, 11748, 2322, 37623, 5623, 355, 2322, 198, 6738, 1363, 562, 10167, 13, 9979, 1330, 7102, 37, 62, 20608, ...
3.080882
136
from graphviz import Digraph if __name__ == "__main__": from chips.api.api import * from chips.components.components import * c = Chip("my_chip") a = Input(c, "a") b = Input(c, "b") d = Input(c, "d") e = Input(c, "e") x, y = tee(c, add(c, add(c, a, b), add(c, d, e))) discard(c, x)...
[ 6738, 4823, 85, 528, 1330, 7367, 1470, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 422, 12014, 13, 15042, 13, 15042, 1330, 1635, 198, 220, 220, 220, 422, 12014, 13, 5589, 3906, 13, 558...
2.054645
183
import smart_imports smart_imports.all()
[ 198, 11748, 4451, 62, 320, 3742, 198, 198, 27004, 62, 320, 3742, 13, 439, 3419, 628 ]
2.75
16
import cuid, sys, os from dotenv import load_dotenv from notifications_python_client.notifications import NotificationsAPIClient # Load .env load_dotenv() # Set up a new Notify client notifications_client = NotificationsAPIClient(os.getenv("NOTIFY_KEY")) # Generate a unique reference id_gen = cuid.CuidGenerator() ...
[ 11748, 18912, 312, 11, 25064, 11, 28686, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 6738, 19605, 62, 29412, 62, 16366, 13, 1662, 6637, 1330, 1892, 6637, 2969, 2149, 75, 1153, 198, 198, 2, 8778, 764, 24330, 198, 2220, ...
2.893082
318
''' リストモジュール ''' def split_list(elements: list, num_of_elements: int) -> list[list]: ''' リスト分割 Args: elements (list) : 要素リスト num_of_elements (int) : 分割単位の要素数 Returns: list[list]: 分割結果リスト ''' items_list: list[list] = \ [...
[ 7061, 6, 201, 198, 12675, 43302, 40361, 21091, 24440, 43353, 201, 198, 7061, 6, 201, 198, 201, 198, 201, 198, 4299, 6626, 62, 4868, 7, 68, 3639, 25, 1351, 11, 997, 62, 1659, 62, 68, 3639, 25, 493, 8, 4613, 1351, 58, 4868, 5974, ...
1.614035
285
#!/usr/bin/env python3 def object_adder(a, b): """Adds two object together""" if type(a) is not int or type(b) is not int: raise TypeError("Object is not of type int") return a + b import sys print(sys.argv)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 4299, 2134, 62, 26676, 7, 64, 11, 275, 2599, 198, 220, 220, 220, 37227, 46245, 734, 2134, 1978, 37811, 198, 220, 220, 220, 611, 2099, 7, 64, 8, 318, 407, 493, 393, 2099, ...
2.527473
91
from django.contrib.auth import get_user_model from django.test import TestCase, Client from django.core.cache import cache from posts.models import Post, Group User = get_user_model() index = '/' group = 'group' test_slug = 'test_slug' fake_slug = 'fake_slug' new_post = 'new' post_edit = 'edit' post_delete = 'delet...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 11, 20985, 198, 6738, 42625, 14208, 13, 7295, 13, 23870, 1330, 12940, 198, 198, 6738, 6851, 13, 27530, ...
2.838889
180
from typing import AbstractSet from django.db import models from django.contrib.auth.models import AbstractUser from django.conf import settings from django.urls import reverse from django.utils.translation import gettext_lazy as _
[ 6738, 19720, 1330, 27741, 7248, 201, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 201, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 27741, 12982, 201, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 201, 198, 67...
3.28
75
from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.rtyper.lltypesystem import lltype, rffi from rpython.rtyper.tool import rffi_platform from rpython.translator.platform import CompilationError eci = ExternalCompilationInfo( post_include_bits=[""" // we need to disable optimizations so...
[ 6738, 374, 29412, 13, 7645, 41880, 13, 25981, 13, 66, 11249, 1330, 34579, 7293, 10520, 12360, 198, 6738, 374, 29412, 13, 81, 774, 525, 13, 297, 19199, 6781, 1330, 32660, 4906, 11, 374, 487, 72, 198, 6738, 374, 29412, 13, 81, 774, 52...
2.989051
274
from helios.chains.ropsten import ( RopstenFullChain, RopstenLightDispatchChain, ) from helios.nodes.light import LightNode from helios.nodes.full import FullNode
[ 6738, 932, 4267, 13, 38861, 13, 1773, 26400, 1330, 357, 198, 220, 220, 220, 371, 404, 26400, 13295, 35491, 11, 198, 220, 220, 220, 371, 404, 26400, 15047, 49354, 35491, 11, 198, 8, 198, 6738, 932, 4267, 13, 77, 4147, 13, 2971, 1330,...
2.932203
59
import icedata from icevision.all import *
[ 11748, 220, 3711, 1045, 198, 6738, 4771, 10178, 13, 439, 1330, 1635, 628 ]
3.384615
13
#!/usr/bin/python # Written by Stjepan Horvat # ( zvanstefan@gmail.com ) # by the exercises from David Lucal Burge - Perfect Pitch Ear Traning Supercourse # Thanks to Wojciech M. Zabolotny ( wzab@ise.pw.edu.pl ) for snd-virmidi example # ( wzab@ise.pw.edu.pl ) import random import time import sys import re fname="/de...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 22503, 416, 520, 73, 538, 272, 6075, 85, 265, 198, 2, 357, 1976, 10438, 301, 891, 272, 31, 14816, 13, 785, 1267, 198, 2, 416, 262, 13565, 422, 3271, 7598, 282, 5481, 469, 532, 16374, ...
2.180899
890
import functools import requests from sinks.base_source import BaseSource
[ 11748, 1257, 310, 10141, 198, 11748, 7007, 198, 198, 6738, 38614, 13, 8692, 62, 10459, 1330, 7308, 7416, 628 ]
4
19
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_accmip6 ---------------------------------- Tests for `accmip6` module. """ import pytest from pathlib import Path from acccmip6.utilities.c6db import SearchDB from acccmip6.utilities.util import _dir_path, _Construct_urls
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 37811, 201, 198, 9288, 62, 4134, 76, 541, 21, 201, 198, 3880, 438, 201, 198, 201, 198, 51, 3558...
2.5
120
#!/usr/bin/python3 ''' # Exploit Title: OpenNetAdmin 18.1.1 - Remote Code Execution # Date: 2020-01-18 # Exploit Author: @amriunix (https://amriunix.com) # Vendor Homepage: http://opennetadmin.com/ # Software Link: https://github.com/opennetadmin/ona # Version: v18.1.1 # Tested on: Linux ''' import requests import sy...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 7061, 6, 198, 2, 5905, 30711, 11851, 25, 4946, 7934, 46787, 1248, 13, 16, 13, 16, 532, 21520, 6127, 37497, 198, 2, 7536, 25, 12131, 12, 486, 12, 1507, 198, 2, 5905, 30711, 6434, ...
2.209375
640
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
[ 37811, 198, 15269, 12131, 383, 1881, 37535, 46665, 13, 1439, 2489, 10395, 13, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
2.151306
8,268
""" #################################################################################################### # Copyright Info : Copyright (c) Davar Lab @ Hikvision Research Institute. All rights reserved. # Filename : mango_r50_ete_pretrain.py # Abstract : Model settings for mask rcnn spotter end-to-en...
[ 37811, 198, 29113, 29113, 29113, 4242, 198, 2, 15069, 14151, 1058, 220, 220, 220, 15069, 357, 66, 8, 2544, 283, 3498, 2488, 39790, 10178, 4992, 5136, 13, 1439, 2489, 10395, 13, 198, 2, 7066, 12453, 220, 220, 220, 220, 220, 220, 1058, ...
2.389474
570
# -*- coding: utf-8 -*- import os import numpy as np import pandas as pd import rdkit from rdkit import Chem, DataStructs from rdkit.Chem import AllChem, Descriptors DATA_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "./train/data/pKaInWater.csv")
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 374, 67, 15813, 198, 6738, 374, 67, 15813, 1330, 12870, 11, 6060...
2.54717
106
from typing import Tuple from hypothesis import given from gon.base import (Multipolygon, Point) from tests.utils import equivalence from . import strategies @given(strategies.multipolygons) @given(strategies.multipolygons_with_points)
[ 6738, 19720, 1330, 309, 29291, 198, 198, 6738, 14078, 1330, 1813, 198, 198, 6738, 35140, 13, 8692, 1330, 357, 15205, 541, 3366, 14520, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220...
2.75
96
from default_data import default_data values={1:str(default_data.sample_id),2:default_data.sample_type,3:default_data.report_type,4:default_data.doc_type } set_options = {1:"id", 2:"type", 3:"report", 4:"doc"} get_options = {1: "name", 2: "intro", 3: "gene", 4: "stem-loop", 5: "peptide", 6: "cds", 7: "source", 8: "comm...
[ 6738, 4277, 62, 7890, 1330, 4277, 62, 7890, 198, 27160, 34758, 16, 25, 2536, 7, 12286, 62, 7890, 13, 39873, 62, 312, 828, 17, 25, 12286, 62, 7890, 13, 39873, 62, 4906, 11, 18, 25, 12286, 62, 7890, 13, 13116, 62, 4906, 11, 19, 25...
2.492958
213
from ast import FunctionDef from os import path from munch import munchify from pyfakefs.pytest_plugin import fs import pytest from pytestgen.load import PyTestGenInputFile from pytestgen.parse import PyTestGenParsedSet, PyTestGenParsedFile, get_existing_test_functions import pytestgen.output from fixtures import mo...
[ 6738, 6468, 1330, 15553, 7469, 198, 6738, 28686, 1330, 3108, 198, 198, 6738, 285, 3316, 1330, 285, 3316, 1958, 198, 6738, 12972, 30706, 9501, 13, 9078, 9288, 62, 33803, 1330, 43458, 198, 11748, 12972, 9288, 198, 198, 6738, 12972, 9288, ...
3.186047
129
# Copyright 2017. Allen Institute. All rights reserved # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the # following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the follow...
[ 2, 15069, 2177, 13, 9659, 5136, 13, 1439, 2489, 10395, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 17613, 11, 389, 10431, 2810, 326, 262, 198, 2, 1708, 3403, 389, 1138, 25, 198, 2, ...
2.930128
1,331
import os from setuptools import setup from setuptools import find_packages NAME = 'CMFCore' here = os.path.abspath(os.path.dirname(__file__)) package = os.path.join(here, 'Products', NAME) _boundary = '\n' + ('-' * 60) + '\n\n' README = _boundary.join([ _package_doc('README.txt'), _package_doc('CHANGES.tx...
[ 11748, 28686, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 198, 198, 20608, 796, 705, 24187, 4851, 382, 6, 198, 198, 1456, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, ...
2.257806
1,121
# Copyright 2015 OpenStack Foundation # 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 requ...
[ 2, 15069, 1853, 4946, 25896, 5693, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, ...
3.047974
938
"""Summary """ import numpy as np import LinearPnP as LPnP import random from tqdm import tqdm def proj3Dto2D(x3D, K, C, R): """Summary Args: x3D (TYPE): Description K (TYPE): Description C (TYPE): Description R (TYPE): Description Returns: TYPE: Description "...
[ 37811, 22093, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 44800, 47, 77, 47, 355, 18470, 77, 47, 198, 11748, 4738, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 628, 198, 4299, 386, 73, 18, 35, 1462, 17, 35, 7, ...
1.814815
999
#!/usr/bin/env python from setuptools import setup from setuptools.command.develop import develop from setuptools.command.install import install def friendly(command_subclass): """ A decorator for classes subclassing one of the setuptools commands. It modifies the run() method so that it prints a friendly gre...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 6738, 900, 37623, 10141, 13, 21812, 13, 16244, 1330, 1205, 198, 6738, 900, 37623, 10141, 13, 21812, 13, 17350, 1330, 2721, 628, 198, 4299, ...
2.79322
295
import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, 'staticsql'))
[ 11748, 25064, 198, 11748, 28686, 198, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 28686, 13, 26037, 343, 11, 705, 14269, 873, 13976, 6, 4008 ]
2.487805
41
if __name__ == '__main__': import sys import os.path if len(sys.argv) != 2: sys.exit("usage fasta_object fasta_path") fasta_path = sys.argv[1] if not os.path.exists(fasta_path): sys.exit("No such file: {}".format(fasta_path)) fasta_parser = FastaParser(fasta_path) for seq...
[ 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1330, 25064, 198, 220, 220, 220, 1330, 28686, 13, 6978, 628, 220, 220, 220, 611, 18896, 7, 17597, 13, 853, 85, 8, 14512, 362, 25, 198, 220, 22...
2.065306
245
""" Escreva um programa que pergunte o salário de um funcionário e calcule o valor do seu aumento. Para salários superiores a R$1.250,00, calcule um aumento de 10%. Para os inferiores ou iguais, o aumento é de 15%.""" salario = float(input('Qual valor do seu salario R$ ')) if salario <= 1249.99: aumento = (salario...
[ 37811, 16319, 260, 6862, 23781, 1430, 64, 8358, 583, 70, 6311, 267, 3664, 6557, 27250, 390, 23781, 25439, 295, 6557, 27250, 304, 2386, 23172, 267, 1188, 273, 466, 384, 84, 257, 1713, 78, 13, 198, 47, 3301, 3664, 6557, 380, 418, 2208, ...
2.396624
237
from .base_identity import BaseIdentity from ...driver.support.driver_support import DriverSupport class OneDriveVercelIndex(BaseIdentity): """OneDriveVercelIndex object to identify said OD""" @staticmethod @staticmethod def _footer(driver) -> bool: """Check for the 'powered by onedrive-verc...
[ 6738, 764, 8692, 62, 738, 414, 1330, 7308, 7390, 26858, 198, 6738, 2644, 26230, 13, 11284, 13, 26230, 62, 11284, 1330, 12434, 15514, 628, 198, 4871, 1881, 24825, 13414, 5276, 15732, 7, 14881, 7390, 26858, 2599, 198, 220, 220, 220, 37227...
2.45509
501
import copy import re import json import logging import requests import datetime import shutil import os import tarfile import uuid import pandas as pd from django.conf import settings from api.utilities.basic_utils import get_with_retry, \ make_local_directory from .gdc import GDCDataSource, GDCRnaSeqDataSourc...
[ 11748, 4866, 198, 11748, 302, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 7007, 198, 11748, 4818, 8079, 198, 11748, 4423, 346, 198, 11748, 28686, 198, 11748, 13422, 7753, 198, 11748, 334, 27112, 198, 220, 198, 11748, 19798, 292, 355...
2.607356
1,006
# -*- coding: utf-8 -*- """ Test the ssh_auth states """ # Import python libs from __future__ import absolute_import, print_function, unicode_literals import os # Import salt libs import salt.utils.files # Import Salt Testing libs from tests.support.case import ModuleCase from tests.support.helpers import destructi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 14402, 262, 26678, 62, 18439, 2585, 198, 37811, 198, 198, 2, 17267, 21015, 9195, 82, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 3601, 62, 8818,...
3.30719
153
""" service_user.py """ from flask import Flask, jsonify app = Flask(__name__) @app.route("/user", methods=['GET']) if __name__ == "__main__": app.run(port=3002, debug=True)
[ 37811, 2139, 62, 7220, 13, 9078, 37227, 198, 198, 6738, 42903, 1330, 46947, 11, 33918, 1958, 628, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 628, 198, 31, 1324, 13, 38629, 7203, 14, 7220, 1600, 5050, 28, 17816, 18851, 6, 12962, 62...
2.569444
72
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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 appl...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 12131, 3469, 6916, 15664, 23973, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, ...
3.110526
760
# Ke Chen # knutchen@ucsd.edu # Zero-shot Audio Source Separation via Query-based Learning from Weakly-labeled Data # The configuration file # for model training exp_name = "exp_zs_asp_full" # the saved ckpt prefix name of the model workspace = "/home/Research/ZS_ASP/" # the folder of your code dataset_path = "/home/...
[ 2, 3873, 12555, 198, 2, 638, 315, 6607, 31, 1229, 21282, 13, 15532, 198, 2, 12169, 12, 9442, 13491, 8090, 8621, 10186, 2884, 43301, 12, 3106, 18252, 422, 28788, 306, 12, 18242, 276, 6060, 198, 2, 383, 8398, 2393, 198, 198, 2, 329, ...
2.955479
876
import json from PIL import Image import numpy as np import shutil import os import random dataset = { "info": {}, "licenses": [], "images": [], "annotations": [], "annotations2": [], "categories": [], "categories2": [] } dataset['categories'].append({ 'id': 1, 'name': "short_sleev...
[ 11748, 33918, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4423, 346, 198, 11748, 28686, 198, 11748, 4738, 198, 198, 19608, 292, 316, 796, 1391, 198, 220, 220, 220, 366, 10951, 1298, 1391, 5512, 198,...
2.046066
17,779
# coding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from typing import TYPE_CHECKING from feishu.dt_drive import DriveDocFileMeta from feishu.dt_help import make_datatype if TYPE_CHECKING: from feishu.api import OpenLark
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 198, 198, 6738, 730, 680, ...
3.043956
91
from typing import List import numpy as np EMPTY_SYMBOL = "_" #Validators
[ 6738, 19720, 1330, 7343, 198, 11748, 299, 32152, 355, 45941, 628, 198, 39494, 9936, 62, 23060, 10744, 3535, 796, 45434, 1, 628, 220, 220, 220, 1303, 47139, 2024, 628, 628, 220, 220, 220, 220, 220, 220, 220, 220, 628, 220, 220, 220, ...
2.057692
52
import datetime print(datetime.datetime.now().timetz())
[ 11748, 4818, 8079, 198, 4798, 7, 19608, 8079, 13, 19608, 8079, 13, 2197, 22446, 16514, 23773, 28955, 198 ]
3.111111
18
#!/usr/bin/env python3 ''' This AudioType only prints some info onto the console ''' import logging from audiotype.IAudioType import IAudioType
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 7061, 6, 198, 1212, 13491, 6030, 691, 20842, 617, 7508, 4291, 262, 8624, 198, 7061, 6, 198, 198, 11748, 18931, 198, 6738, 2709, 5151, 2981, 13, 3539, 463, 952, 6030, 1330, 3...
3.222222
45
# Generated by Django 3.0.6 on 2020-06-06 13:25 import backend.storage_backends from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 21, 319, 12131, 12, 3312, 12, 3312, 1511, 25, 1495, 198, 198, 11748, 30203, 13, 35350, 62, 1891, 2412, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
3.075
40