content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import sys from PyQt5.QtWidgets import QDialog, QApplication from demoMousetrack import * if __name__=="__main__": app = QApplication(sys.argv) w = MyForm() w.show() sys.exit(app.exec_())
[ 11748, 25064, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 44204, 11, 1195, 23416, 198, 6738, 13605, 44, 516, 21879, 441, 1330, 1635, 198, 198, 361, 11593, 3672, 834, 855, 1, 834, 12417, 834, 1298, 220, 220, ...
2.322222
90
fibo = [1, 2] fibo_2 = [] i = 0 while True: a = fibo[-2] + fibo[-1] fibo.append(a) i += 1 if a > 4000000: del fibo[-1] break print(fibo) for c in fibo: print(c) if c % 2 == 0: fibo_2.append(c) print(sum(fibo_2))
[ 69, 26762, 796, 685, 16, 11, 362, 60, 201, 198, 69, 26762, 62, 17, 796, 17635, 201, 198, 201, 198, 72, 796, 657, 201, 198, 201, 198, 4514, 6407, 25, 201, 198, 220, 220, 220, 257, 796, 12900, 78, 58, 12, 17, 60, 1343, 12900, 78...
1.595506
178
import sys import logging from flask import Flask, render_template from flask.ext.babel import Babel from flask.ext.bcrypt import Bcrypt from flask.ext.login import LoginManager from flask.ext.security import Security, SQLAlchemyUserDatastore from flask.ext.sqlalchemy import SQLAlchemy from flask_mail import Mail from ...
[ 11748, 25064, 198, 11748, 18931, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 198, 6738, 42903, 13, 2302, 13, 65, 9608, 1330, 50175, 198, 6738, 42903, 13, 2302, 13, 15630, 6012, 1330, 347, 29609, 198, 6738, 42903, 13, 2302, 13, ...
3.4
145
Cocodrilo1 = Cocodrilo(1) Cocodrilo1.desplazar()
[ 628, 220, 197, 197, 220, 628, 628, 198, 34, 420, 375, 81, 18526, 16, 796, 18490, 375, 81, 18526, 7, 16, 8, 198, 34, 420, 375, 81, 18526, 16, 13, 8906, 489, 29413, 3419 ]
1.735294
34
""" Compute Strongly Connected Components Given a graph, calculate number of strongest connected components In a subgraph, if we can reach from every vertex to every other vertex, then it is called SCC. Example: >> graph1 = {0: [1], 1: [2], 2: [0, 3], 3: [4], 4: [5, 7], 5: [6], 6: [4, 7]} ...
[ 37811, 198, 7293, 1133, 13535, 306, 8113, 276, 36109, 198, 198, 15056, 257, 4823, 11, 15284, 1271, 286, 12841, 5884, 6805, 198, 198, 818, 257, 850, 34960, 11, 611, 356, 460, 3151, 422, 790, 37423, 284, 790, 584, 37423, 11, 198, 8524, ...
2.318667
1,500
def running_threads(): """ Currently running threads :returns: list of running thread information :rtype: list of str """ import threading threads = [] main_thread = threading.current_thread() for t in threading.enumerate(): if t is main_thread: continue th...
[ 4299, 2491, 62, 16663, 82, 33529, 198, 220, 220, 220, 37227, 16888, 2491, 14390, 628, 220, 220, 220, 1058, 7783, 82, 25, 1351, 286, 2491, 4704, 1321, 198, 220, 220, 220, 1058, 81, 4906, 25, 1351, 286, 965, 628, 220, 220, 220, 37227,...
2.729412
255
__version__ = "0.5.1" default_app_config = 'rest_registration.apps.RestRegistrationConfig'
[ 834, 9641, 834, 796, 366, 15, 13, 20, 13, 16, 1, 198, 12286, 62, 1324, 62, 11250, 796, 705, 2118, 62, 2301, 33397, 13, 18211, 13, 19452, 47133, 16934, 6, 198 ]
2.935484
31
#! -*- coding: utf-8 -*- # 测试代码可用性: 结合MLM的Gibbs采样 from tqdm import tqdm import numpy as np from bert4keras.models import build_transformer_model from bert4keras.tokenizers import Tokenizer from bert4keras.snippets import to_array config_path = '/root/kg/bert/chinese_L-12_H-768_A-12/bert_config.json' checkpoint_path =...
[ 2, 0, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 10545, 113, 233, 46237, 243, 47987, 163, 254, 223, 20998, 107, 18796, 101, 45250, 100, 25, 13328, 119, 241, 28938, 230, 5805, 44, 21410, 38, 571, 1443, 34932, 22...
1.988579
788
# coding: utf-8 ### # @file condense.py # @author Sébastien Rouault <sebastien.rouault@alumni.epfl.ch> # # @section LICENSE # # Copyright © 2020 École Polytechnique Fédérale de Lausanne (EPFL). # All rights reserved. # # @section DESCRIPTION # # Condense parameter vector aggregation random function. ### i...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 21017, 198, 1303, 2488, 7753, 220, 220, 1779, 1072, 13, 9078, 198, 1303, 2488, 9800, 311, 2634, 65, 459, 2013, 13876, 1721, 1279, 325, 65, 459, 2013, 13, 472, 1721, 31, 282, 25402, 13, 538, 270...
3.666667
204
import numpy import tiledb def mbes_domain(tri=False): """Set array domain.""" index_filters = tiledb.FilterList([tiledb.ZstdFilter(level=16)]) xdim = tiledb.Dim( "longitude", domain=(None, None), tile=1000, dtype=numpy.float64, filters=index_filters, ) ydi...
[ 11748, 299, 32152, 198, 11748, 256, 3902, 65, 628, 198, 4299, 285, 12636, 62, 27830, 7, 28461, 28, 25101, 2599, 198, 220, 220, 220, 37227, 7248, 7177, 7386, 526, 15931, 198, 220, 220, 220, 6376, 62, 10379, 1010, 796, 256, 3902, 65, ...
1.859993
2,807
import os import logging import logging.config from pyrogram import Client from config import API_ID, API_HASH, BOT_TOKEN logging.config.fileConfig('logging.conf') logging.getLogger().setLevel(logging.INFO) logging.getLogger("pyrogram").setLevel(logging.ERROR) FORCE_SUB = os.environ.get("FORCE_SUB", None) b...
[ 11748, 28686, 198, 11748, 18931, 220, 198, 11748, 18931, 13, 11250, 198, 6738, 12972, 39529, 1330, 20985, 198, 6738, 4566, 1330, 7824, 62, 2389, 11, 7824, 62, 39, 11211, 11, 347, 2394, 62, 10468, 43959, 198, 198, 6404, 2667, 13, 11250, ...
2.641221
131
from os import path import setuptools import pathlib HERE = pathlib.Path(__file__).parent SRC_CLANG = HERE / 'src/clang' SRC_CLANG_BASE_URL = 'https://raw.githubusercontent.com/llvm/llvm-project/llvmorg-13.0.0/clang/bindings/python/clang/' if not SRC_CLANG.exists(): SRC_CLANG.mkdir(parents=True) htt...
[ 6738, 28686, 1330, 3108, 201, 198, 11748, 900, 37623, 10141, 201, 198, 11748, 3108, 8019, 201, 198, 201, 198, 39, 9338, 796, 3108, 8019, 13, 15235, 7, 834, 7753, 834, 737, 8000, 201, 198, 50, 7397, 62, 5097, 15567, 796, 15698, 1220, ...
2.118852
244
#%% Change working directory from the workspace root to the ipynb file location. Turn this addition off with the DataScience.changeDirOnImportExport setting import os try: os.chdir(os.path.join(os.getcwd(), 'examples')) print(os.getcwd()) except: pass #%% [markdown] # ## Advanced Lane Finding Project # # The goals ...
[ 2, 16626, 9794, 1762, 8619, 422, 262, 44573, 6808, 284, 262, 20966, 2047, 65, 2393, 4067, 13, 6756, 428, 3090, 572, 351, 262, 6060, 26959, 13, 3803, 35277, 2202, 20939, 43834, 4634, 198, 11748, 28686, 198, 28311, 25, 198, 197, 418, 13...
3
709
if __name__ == "__main__": go_deep()
[ 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 467, 62, 22089, 3419 ]
2.294118
17
# RevKit: A Toolkit for Reversible Circuit Design (www.revkit.org) # Copyright (C) 2009-2011 The RevKit Developers <revkit@informatik.uni-bremen.de> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Founda...
[ 2, 5416, 20827, 25, 317, 16984, 15813, 329, 797, 37393, 13588, 8495, 357, 2503, 13, 18218, 15813, 13, 2398, 8, 198, 2, 15069, 357, 34, 8, 3717, 12, 9804, 220, 383, 5416, 20827, 34152, 1279, 18218, 15813, 31, 259, 18982, 1134, 13, 35...
3.455939
261
# -*- encoding: utf-8 -*- # # Copyright © 2016-2018 Red Hat, Inc. # Copyright © 2014-2015 eNovance # # 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/LICE...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 10673, 1584, 12, 7908, 2297, 10983, 11, 3457, 13, 198, 2, 15069, 10673, 1946, 12, 4626, 304, 20795, 590, 198, 2, 198, 2, 49962, 739, 262, 24843, 13...
3.207031
512
# SPDX-License-Identifier: BSD-3-Clause # # Copyright 2020 Raritan Inc. All rights reserved. # # This is an auto-generated file. # # Section generated by IdlC from "LuaService.idl" # import raritan.rpc from raritan.rpc import Interface, Structure, ValueObject, Enumeration, typecheck, DecodeException import raritan.rp...
[ 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, 18, 12, 2601, 682, 198, 2, 198, 2, 15069, 12131, 371, 283, 18642, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 318, 281, 8295, 12, 27568, 2393, 13, 198, 198,...
2.992248
129
from helper.CommonHelper import CommonHelper from flask_restful import Resource, reqparse from model.Product import Product from service.ProductService import ProductService get_parser = reqparse.RequestParser() get_parser.add_argument('product_id', type=str, required=False) get_parser.add_argument('category_id', type...
[ 6738, 31904, 13, 17227, 47429, 1330, 8070, 47429, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 11, 43089, 29572, 198, 6738, 2746, 13, 15667, 1330, 8721, 198, 6738, 2139, 13, 15667, 16177, 1330, 8721, 16177, 198, 198, 1136, 62, 48610, 7...
2.333333
534
# -*- coding: utf-8 -*- # Copyright 2022 The Luoxi Team. # All rights reserved. # This source code is licensed under the Apache 2.0 license # found in the LICENSE file in the root directory. import torch # trunk model init # lite plugin model init # naive plugin model init if __name__ == '__main__': # model.ap...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 33160, 383, 6026, 1140, 72, 4816, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 24843, 362, 13, 15, 5964, 198, 2, 1043,...
2.734694
441
from overrides.enforce import EnforceOverrides from overrides.final import final from overrides.overrides import __VERSION__, overrides __all__ = [ "__VERSION__", "overrides", "final", "EnforceOverrides", ]
[ 6738, 23170, 1460, 13, 268, 3174, 1330, 2039, 3174, 5886, 81, 1460, 198, 6738, 23170, 1460, 13, 20311, 1330, 2457, 198, 6738, 23170, 1460, 13, 2502, 81, 1460, 1330, 11593, 43717, 834, 11, 23170, 1460, 198, 198, 834, 439, 834, 796, 685...
2.765432
81
from typing import Optional, List import numpy from pyrr import Matrix44, Vector3 from vistas.core.bounds import BoundingBox from vistas.core.graphics.object import Object3D, Intersection class Ray: """ Representation of a ray in 3D space. Rays emit from an origin along a direction. Implementation inspired ...
[ 6738, 19720, 1330, 32233, 11, 7343, 198, 198, 11748, 299, 32152, 198, 6738, 279, 2417, 81, 1330, 24936, 2598, 11, 20650, 18, 198, 198, 6738, 410, 37503, 13, 7295, 13, 65, 3733, 1330, 347, 9969, 14253, 198, 6738, 410, 37503, 13, 7295, ...
2.402861
1,328
import io import asyncio import hashlib import logging import unittest.mock as mock import aiohttp.client_exceptions as a_exc import synapse.exc as s_exc import synapse.axon as s_axon import synapse.common as s_common import synapse.telepath as s_telepath import synapse.lib.httpapi as s_httpapi import synapse.lib.ms...
[ 11748, 33245, 198, 11748, 30351, 952, 198, 11748, 12234, 8019, 198, 11748, 18931, 198, 11748, 555, 715, 395, 13, 76, 735, 355, 15290, 198, 198, 11748, 257, 952, 4023, 13, 16366, 62, 1069, 11755, 355, 257, 62, 41194, 198, 198, 11748, 6...
2.583333
360
# Copyright (c) 2018 Mengye Ren, Eleni Triantafillou, Sachin Ravi, Jake Snell, # Kevin Swersky, Joshua B. Tenenbaum, Hugo Larochelle, Richars S. Zemel. # # 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 th...
[ 2, 15069, 357, 66, 8, 2864, 6065, 1360, 68, 7152, 11, 2574, 43850, 7563, 415, 1878, 359, 280, 11, 20678, 259, 371, 15820, 11, 14757, 5489, 695, 11, 198, 2, 7939, 2451, 364, 2584, 11, 20700, 347, 13, 9368, 268, 24738, 11, 25930, 25...
2.504098
1,708
import math import random from typing import Union, Optional import discord from discord.ext import commands from .utils import db from .utils import checks
[ 11748, 10688, 198, 11748, 4738, 198, 6738, 19720, 1330, 4479, 11, 32233, 198, 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 764, 26791, 1330, 20613, 198, 6738, 764, 26791, 1330, 8794, 628 ]
4.514286
35
from __future__ import annotations import procrunner
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 13834, 16737, 628 ]
4.583333
12
# coding: utf-8 from PIL import Image from pymlgame.surface import Surface NONBLOCKING = 0 BLOCKING = 1 DESTROYABLE = 2
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 12972, 4029, 6057, 13, 42029, 1330, 20321, 198, 198, 45, 1340, 9148, 11290, 2751, 796, 657, 198, 9148, 11290, 2751, 796, 352, 198, 30910, 5446, 21414, ...
2.673913
46
from typing import List if __name__ == "__main__": solution = Solution() root = buildTree(None, 0, [0,1,0,0,1,0,None,None,1,0,0]) result = solution.isValidSequence(root, [0,1,0,1]) print (result)
[ 6738, 19720, 1330, 7343, 628, 198, 220, 220, 220, 220, 220, 220, 220, 220, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 4610, 796, 28186, 3419, 198, 220, 220, 220, 6808, 796, 1382, 27660, 7,...
2.196078
102
import math import os import sys import numpy import scipy import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib as mpl import matplotlib.cm as cm import csv from mpl_toolkits.mplot3d import Axes3D from numpy import log10 prefix = 'data/ArrayOfDotProducts_' suffix = '_clearCache_sha...
[ 11748, 10688, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 299, 32152, 198, 11748, 629, 541, 88, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 35...
2.656637
7,112
"""Collection serializers.""" from typing import Any, Dict from dj_rest_auth.registration.serializers import RegisterSerializer from django.contrib.auth.password_validation import validate_password from rest_framework import exceptions, serializers from .models import CustomUser from .validators import ( validate...
[ 37811, 36307, 11389, 11341, 526, 15931, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 198, 198, 6738, 42625, 62, 2118, 62, 18439, 13, 2301, 33397, 13, 46911, 11341, 1330, 17296, 32634, 7509, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 184...
2.676806
1,052
import numpy as np from PIL import Image import matplotlib, os #print "importing visual module" if not('DISPLAY' in os.environ): matplotlib.use("Agg") import matplotlib.pyplot as plt import matplotlib.ticker as ticker import matplotlib.backends.backend_pdf import copy # customization: http://matplotlib.org/use...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 2603, 29487, 8019, 11, 28686, 198, 198, 2, 4798, 366, 11748, 278, 5874, 8265, 1, 198, 198, 361, 407, 10786, 26288, 31519, 6, 287, 28686, 13, 268, 2268, 2599,...
2.081403
3,108
# coding=utf-8 # Storage Management Providers # # Copyright (C) 2014 Red Hat, Inc. 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 copyrig...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 20514, 8549, 7518, 4157, 198, 2, 198, 2, 15069, 357, 34, 8, 1946, 2297, 10983, 11, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11,...
2.796218
1,904
################################################################################ # CODE TO CONVERT COLAB NOTEBOOK TO PDF # #This code converts an .ipynb file to a Tex based PDF and saves it in the Colab# #Notebook folder with the same filename.pdf ...
[ 29113, 29113, 14468, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42714, 5390, 7102, 15858, 20444, 6242, 24550, 39453, 5390, 12960, 220, 220, 220, 220, 220, 220, 220, 220, 22...
3.558282
163
from selenium import webdriver from Cart import cart from Main_page import main_page from Duck_Page import duck_page
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 13690, 1330, 6383, 198, 6738, 8774, 62, 7700, 1330, 1388, 62, 7700, 198, 6738, 21867, 62, 9876, 1330, 22045, 62, 7700, 628 ]
3.806452
31
from unittest.mock import patch import pytest from rotkehlchen.assets.resolver import AssetResolver from rotkehlchen.tests.utils.mock import MockResponse @pytest.fixture() @pytest.fixture() @pytest.fixture() def query_github_for_assets() -> bool: """If True, the default behavior of querying github for lates...
[ 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 5724, 365, 18519, 6607, 13, 19668, 13, 411, 14375, 1330, 31433, 4965, 14375, 198, 6738, 5724, 365, 18519, 6607, 13, 41989, 13, 26791, 13, 76, ...
2.931313
495
# -*- coding: utf-8 -*- # # Copyright (c) 2020~2999 - Cologler <skyoflw@gmail.com> # ---------- # # ---------- from typing import TypedDict, Optional from logging import Logger import zipfile import xml.etree.ElementTree as et from .androidManifestDecompress import read def read_package_info(path: str, logger: Logge...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 12131, 93, 1959, 2079, 532, 327, 928, 1754, 1279, 15688, 1659, 75, 86, 31, 14816, 13, 785, 29, 198, 2, 24200, 438, 198, 2, 198, 2, ...
2.127937
383
from ape import plugins from ape.api.config import ConfigDict @plugins.register(plugins.Config)
[ 6738, 43835, 1330, 20652, 198, 6738, 43835, 13, 15042, 13, 11250, 1330, 17056, 35, 713, 628, 198, 31, 37390, 13, 30238, 7, 37390, 13, 16934, 8, 198 ]
3.62963
27
import redis # redis_instance = redis.StrictRedis(host='aerios-ec-dqu.3mvwix.0001.use1.cache.amazonaws.com', port=9000, db=0) redis_instance = redis.StrictRedis() pub_sub = redis_instance.pubsub() # print(subscriber("otp_channel")) # print(publisher("otp_channel", "Your otp is 12345")) # print(listen_message())...
[ 11748, 2266, 271, 198, 198, 2, 2266, 271, 62, 39098, 796, 2266, 271, 13, 1273, 2012, 7738, 271, 7, 4774, 11639, 25534, 4267, 12, 721, 12, 67, 421, 13, 18, 76, 85, 86, 844, 13, 18005, 13, 1904, 16, 13, 23870, 13, 33103, 8356, 13,...
2.489362
141
__version__ = "0.5.6" if __name__ == "__main__": # The build script uses this to extract the current version print(__version__)
[ 834, 9641, 834, 796, 366, 15, 13, 20, 13, 21, 1, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1303, 383, 1382, 4226, 3544, 428, 284, 7925, 262, 1459, 2196, 198, 220, 220, 220, 3601, 7, 8...
2.795918
49
# before running the qc, need to rename various output files # <data format="html" name="html_file" /> # <data format="txt" name="log_file" parent="html_file" /> # <data format="tabular" name="marker_file" parent="html_file" /> # <data format="tabular" name="subject_file" parent="html_file" /> ...
[ 2, 878, 2491, 262, 10662, 66, 11, 761, 284, 36265, 2972, 5072, 3696, 198, 2, 220, 220, 220, 220, 220, 220, 1279, 7890, 5794, 2625, 6494, 1, 1438, 2625, 6494, 62, 7753, 1, 11037, 198, 2, 220, 220, 220, 220, 220, 220, 1279, 7890, ...
2.783582
134
import operator
[ 11748, 10088, 201 ]
5.333333
3
import torch, sys import torch.nn as nn import torch.nn.functional as F from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence sys.path.append('..') from utils import * from seq2seq_attn.model import EncoderRNN as PrevUtterancesEncoder from seq2seq_world_state.model import NextActionsEncoder, BlockCo...
[ 11748, 28034, 11, 25064, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 20471, 13, 26791, 13, 81, 20471, 1330, 2353, 62, 79, 29373, 62, 43167, 11, 14841, 62, 34860,...
3.475285
263
PI = float(3.14159) raio = float(input()) print("A=%0.4f" %(PI * (raio * raio)))
[ 11901, 796, 12178, 7, 18, 13, 1415, 19707, 8, 198, 198, 430, 952, 796, 12178, 7, 15414, 28955, 198, 198, 4798, 7203, 32, 28, 4, 15, 13, 19, 69, 1, 4064, 7, 11901, 1635, 357, 430, 952, 1635, 2179, 952, 22305, 198 ]
1.97619
42
#modules for GUI interface import tkinter from tkinter import * from tkinter import ttk # User interface setup # this sets up the characteristics of the window root = Tk() root.title("Disney Checker") mainframe = ttk.Frame(root, padding="3 3 12 12") mainframe.grid(column=0, row=0, sticky=(N, W, E, S)) mainframe.colum...
[ 2, 18170, 329, 25757, 7071, 198, 11748, 256, 74, 3849, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 6738, 256, 74, 3849, 1330, 256, 30488, 198, 198, 2, 11787, 7071, 9058, 198, 198, 2, 428, 5621, 510, 262, 9695, 286, 262, 4324, 198, ...
3.277612
335
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
2.833489
1,069
# input n = int(input()) k = int(input()) sensor = map(int, input().split()) # process ''' 센서들의 좌표를 정렬 각 센서마다 본인 다음 센서와의 거리를 계산 거리들 정렬 가장 긴 거리 제거 >> 처음에는 하나였던 센서들이 두 개의 묶음으로 쪼개짐 >> 두 개의 집중국 다시 가장 긴 거리 제거 >> 두 묶음이었던 센서 중 하나가 쪼개지면서 총 세 개의 묶음이 됨 >> 세 개의 집중국 이런 식으로 k개의 집중국이 될 때까지 최대 거리를 제거 남은 거리들의 합 계산 ''' sensor = sor...
[ 2, 5128, 198, 77, 796, 493, 7, 15414, 28955, 198, 74, 796, 493, 7, 15414, 28955, 198, 82, 22854, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 2, 1429, 198, 7061, 6, 198, 168, 226, 120, 168, 226, 250, 167, 241, 97, 3597...
0.848659
522
import random print(experiment(1_000_000))
[ 11748, 4738, 628, 198, 4798, 7, 23100, 3681, 7, 16, 62, 830, 62, 830, 4008, 198 ]
2.8125
16
import argparse import sys import seqlib parser = argparse.ArgumentParser( description='Calculate statistics for genome') parser.add_argument('--fasta', required = True, type = str, metavar = '<path>', help='path to a fasta file, may be compressed') arg = parser.parse_args() contig_size = [] nt_count = {} for name...
[ 11748, 1822, 29572, 198, 11748, 25064, 198, 198, 11748, 33756, 8019, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 198, 197, 11213, 11639, 9771, 3129, 378, 7869, 329, 19270, 11537, 198, 48610, 13, 2860, 62, 49140, 10786, ...
2.366716
679
"""Optimal hard threshold for matrix denoising.""" import logging import numpy as np from scipy import integrate # Create logger log = logging.getLogger(__name__) def optht(beta, sv, sigma=None): """Compute optimal hard threshold for singular values. Off-the-shelf method for determining the optimal singul...
[ 37811, 27871, 4402, 1327, 11387, 329, 17593, 2853, 78, 1710, 526, 15931, 198, 198, 11748, 18931, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 19386, 198, 198, 2, 13610, 49706, 198, 6404, 796, 18931, 13, 1136, ...
2.169822
1,849
''' Asynchronous generator without any data loss in case that handling one message costs too much time. ''' import asyncio from ensureTaskCanceled.ensureTaskCanceled import ensureTaskCanceled # def NoLossAsyncGenerator(raw_async_iterater): # async def no_data_loss_async_generator_wrapper(raw_async_iterater): # ...
[ 7061, 6, 198, 1722, 31301, 17301, 1231, 597, 1366, 2994, 287, 1339, 326, 9041, 530, 3275, 3484, 1165, 881, 640, 13, 198, 7061, 6, 198, 11748, 30351, 952, 198, 6738, 4155, 25714, 34, 590, 992, 13, 641, 495, 25714, 34, 590, 992, 1330,...
2.237981
416
from django.urls import path from .import views from blog.views import like_view app_name='products' urlpatterns = [ path('amazon', views.amazon, name='amazon'), path('ebay', views.ebay, name='ebay'), path('<int:id>/', views.product_detail, name="product_detail"), path('product_comparison/<int:id>/',...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 11748, 5009, 220, 198, 6738, 4130, 13, 33571, 1330, 588, 62, 1177, 198, 1324, 62, 3672, 11639, 29498, 6, 198, 198, 6371, 33279, 82, 796, 685, 628, 220, 220, 220, 3108, 10...
2.777778
135
from .Rafa import Rafa
[ 6738, 764, 49, 28485, 1330, 20824, 64 ]
3.142857
7
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" import os from . import BaseEncoder from ..devices import OnnxDevice, PaddleDevice, TorchDevice, TFDevice, MindsporeDevice from ...excepts import ModelCheckpointNotExist from ...helper import is_url, cached_property ...
[ 834, 22163, 4766, 834, 796, 366, 15269, 357, 66, 8, 12131, 449, 1437, 9552, 15302, 13, 1439, 2489, 10395, 526, 198, 834, 43085, 834, 796, 366, 25189, 4891, 12, 17, 13, 15, 1, 198, 198, 11748, 28686, 198, 198, 6738, 764, 1330, 7308, ...
2.465645
2,023
#!/usr/bin/env python import os import json import collections pwd = os.path.dirname(os.path.abspath(__file__)) root = os.path.dirname(pwd) try: f = open(os.path.join(root, 'Rules.1blockpkg')) obj = json.load(f, object_pairs_hook=collections.OrderedDict) try: json_file = open(os.path.join(root, 'Ru...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 17268, 198, 198, 79, 16993, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834, 7753, 834, 4008, 198, 15...
2.25
212
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Source file for d2sec exploit information # # Software is free software released under the "Modified BSD license" # # Copyright (c) 2016 Pieter-Jan Moreels - pieterjan.moreels@gmail.com # Sources SOURCE_NAME = 'd2sec' SOURCE_FILE = "https://www.d2sec.com/exploits/e...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 8090, 2393, 329, 288, 17, 2363, 14561, 1321, 198, 2, 198, 2, 10442, 318, 1479, 3788, 2716, 739, 262,...
2.850242
207
# parameters_t.py #-*- coding: utf-8 -*- from __future__ import absolute_import from decimal import Decimal from hypothesis import given from hypothesis.strategies import text import pytest from loris import img_info from loris.loris_exception import RequestException, SyntaxException from loris.parameters import ( ...
[ 2, 10007, 62, 83, 13, 9078, 198, 2, 12, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 32465, 1330, 4280, 4402, 198, 198, 6738, 14078, 1330, 1813, 198, 6...
3.118483
211
from typing import List, cast from fastapi import Depends, HTTPException from rx import operators as rxops from api_server.dependencies import sio_user from api_server.fast_io import FastIORouter, SubscriptionRequest from api_server.gateway import rmf_gateway from api_server.models import Lift, LiftHealth, LiftReques...
[ 6738, 19720, 1330, 7343, 11, 3350, 198, 198, 6738, 3049, 15042, 1330, 2129, 2412, 11, 14626, 16922, 198, 6738, 374, 87, 1330, 12879, 355, 374, 87, 2840, 198, 198, 6738, 40391, 62, 15388, 13, 45841, 3976, 1330, 264, 952, 62, 7220, 198,...
2.630394
533
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import TYPE_CHECKING, Any, Iterable, Optional from ax.core.base import Base from ax.core.data import Data ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, ...
2.389932
1,331
""" Tests the PageWatcher class to ensure that requests are being made and compared properly """ import unittest import time from http_page_monitor.tests.logging_http_server\ import setup_logging_server from .. import watchers class TestPageWatcher(unittest.TestCase): """ Tests the PageWatcher class """ ...
[ 37811, 30307, 262, 7873, 54, 34734, 1398, 284, 4155, 326, 198, 220, 220, 220, 7007, 389, 852, 925, 290, 3688, 6105, 37227, 198, 11748, 555, 715, 395, 198, 11748, 640, 198, 198, 6738, 2638, 62, 7700, 62, 41143, 13, 41989, 13, 6404, 2...
2.301112
2,069
import os import sys import datetime from .filesystem import ( remove_dir_if_exists, remove_file_if_exists, normpath, ) from .chains import ( get_base_blockchain_storage_dir, ) @normpath CHAINDATA_DIR = './chaindata' @normpath DAPP_DIR = './dapp' @normpath NODEKEY_FILENAME = 'nodekey' @no...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 4818, 8079, 198, 198, 6738, 764, 16624, 6781, 1330, 357, 198, 220, 220, 220, 4781, 62, 15908, 62, 361, 62, 1069, 1023, 11, 198, 220, 220, 220, 4781, 62, 7753, 62, 361, 62, 1069, 1023, 11,...
2.362573
171
############################################################################# # # Author: Michel F. SANNER # # Copyright: M. Sanner TSRI 2000 # # revision: Guillaume Vareille # ######################################################################### # # $Header: /opt/cvs/python/packages/share1.5/ViewerFramework/VF.py,...
[ 29113, 29113, 7804, 4242, 2, 198, 2, 198, 2, 6434, 25, 12386, 376, 13, 37376, 21479, 198, 2, 198, 2, 15069, 25, 337, 13, 2986, 1008, 26136, 7112, 4751, 198, 2, 198, 2, 18440, 25, 1962, 5049, 2454, 569, 533, 8270, 198, 2, 198, 29...
2.112968
27,167
"""Parsing HTML with BeautifulSoup""" from datetime import datetime from bs4 import BeautifulSoup def parse_html(html): """Parse FX html, return date and dict of {symbol -> rate}""" soup = BeautifulSoup(html, 'html.parser') # <h4>Date: <i class="date">2019-11-11</i></h4> i = soup('i', {'class': 'dat...
[ 37811, 47, 945, 278, 11532, 351, 23762, 50, 10486, 37811, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 628, 198, 4299, 21136, 62, 6494, 7, 6494, 2599, 198, 220, 220, 220, 37227, 10044, ...
2.161088
478
# четна / нечетна сума # Да се напише програма, която въвежда n цели числа и проверява дали сумата на числата на четни позиции е равна на сумата # на числата на нечетни позиции. При равенство печата "Yes" + сумата, иначе печата "No" + разликата. # Разликата се изчислява по абсолютна стойност. Форматът на изхода трябва ...
[ 2, 220, 141, 229, 16843, 20375, 22177, 16142, 1220, 12466, 121, 16843, 141, 229, 16843, 20375, 22177, 16142, 220, 21727, 35072, 43108, 16142, 198, 2, 12466, 242, 16142, 220, 21727, 16843, 12466, 121, 16142, 140, 123, 18849, 141, 230, 1684...
1.314711
537
# terrascript/softlayer/d.py
[ 2, 8812, 15961, 14, 4215, 29289, 14, 67, 13, 9078, 198 ]
2.636364
11
import os from setuptools import find_packages from numpy.distutils.core import setup base_dir = os.path.dirname(__file__) src_dir = os.path.join(base_dir, "pymaxpro_lite") about = {} with open(os.path.join(src_dir, "__about__.py")) as f: exec(f.read(), about) pkgs = find_packages() if __name__ == "__main__": ...
[ 11748, 28686, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 198, 6738, 299, 32152, 13, 17080, 26791, 13, 7295, 1330, 9058, 198, 198, 8692, 62, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 8, 198, 10677, 62, ...
2.230539
334
# Copyright (c) 2015 Rackspace, 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 wr...
[ 2, 15069, 357, 66, 8, 1853, 37927, 13200, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789,...
3.121739
460
from rpi_ws281x import Color, PixelStrip, ws import time from threading import Thread import random from PIL import Image import numpy as np #import cv2 from skimage import io, transform #from skimage.transform import resize, rescale # LED strip configuration: LED_COUNT = 2304 # Number of LED pixels. LED_PIN = ...
[ 6738, 374, 14415, 62, 18504, 30368, 87, 1330, 5315, 11, 11349, 1273, 5528, 11, 266, 82, 198, 11748, 640, 198, 6738, 4704, 278, 1330, 14122, 198, 11748, 4738, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 299, 32152, 355, 45941, 198, 2...
2.258662
1,674
from django.utils import timezone from employees.models import Employee
[ 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 198, 6738, 4409, 13, 27530, 1330, 36824, 628, 198 ]
4.166667
18
# ---------------------------------------------------------------------------------------------------------------- # Channel Component # ---------------------------------------------------------------------------------------------------------------- # This component lets you register channels with a keyword to be ...
[ 201, 198, 2, 16529, 47232, 201, 198, 2, 11102, 35100, 201, 198, 2, 16529, 47232, 201, 198, 2, 770, 7515, 8781, 345, 7881, 9619, 351, 257, 21179, 284, 307, 1568, 973, 416, 262, 3758, 3419, 2163, 286, 262, 10214, 201, 198, 2, 16529, ...
3.563518
307
from flask import Blueprint, redirect, render_template, request, session, url_for # from asset_tracker_restapi import asset_tracker_restapi bp = Blueprint("main", __name__) @bp.route("/", methods=['GET', 'POST']) @bp.route("/action", methods=['GET', 'POST']) @bp.route("/search", methods=['GET','POST'])
[ 6738, 42903, 1330, 39932, 11, 18941, 11, 8543, 62, 28243, 11, 2581, 11, 6246, 11, 19016, 62, 1640, 198, 2, 422, 11171, 62, 2213, 10735, 62, 2118, 15042, 1330, 11171, 62, 2213, 10735, 62, 2118, 15042, 628, 198, 46583, 796, 39932, 7203,...
3
104
# tests.py # # Copyright 2016 Christian Diener <mail[at]cdiener.com> # # MIT license. See LICENSE for more information. import pytest from corda import reaction_confidence, test_model from cobra import Model, Reaction, Metabolite from cobra.manipulation import convert_to_irreversible, revert_to_reversible if __...
[ 2, 220, 5254, 13, 9078, 198, 2, 198, 2, 220, 15069, 1584, 4302, 6031, 877, 1279, 4529, 58, 265, 60, 10210, 72, 877, 13, 785, 29, 198, 2, 198, 2, 220, 17168, 5964, 13, 4091, 38559, 24290, 329, 517, 1321, 13, 198, 198, 11748, 1297...
3.103448
116
""" This module knows how to serialize general object, objects specialized with a ``__json__()`` method, Django QuerySets, and ``ttcal`` objects. """ __version__ = '3.0.4'
[ 37811, 198, 1212, 8265, 4206, 703, 284, 11389, 1096, 2276, 2134, 11, 5563, 16976, 198, 4480, 257, 7559, 834, 17752, 834, 3419, 15506, 2446, 11, 37770, 43301, 50, 1039, 11, 290, 7559, 926, 9948, 15506, 5563, 13, 198, 37811, 198, 834, 9...
3.307692
52
""" SSSD_Config - file ``/etc/sssd/sssd.config`` ============================================ """ from insights.core import IniConfigFile from insights.core.plugins import parser from insights.specs import Specs @parser(Specs.sssd_config) class SSSD_Config(IniConfigFile): """ Parse the content of the ``/etc/s...
[ 37811, 198, 5432, 10305, 62, 16934, 532, 2393, 7559, 14, 14784, 14, 824, 21282, 14, 824, 21282, 13, 11250, 15506, 198, 10052, 25609, 198, 37811, 198, 6738, 17218, 13, 7295, 1330, 554, 72, 16934, 8979, 198, 6738, 17218, 13, 7295, 13, 3...
2.515797
1,456
""" check if main line of each SGF is legal. """ __author__ = "ICHIKAWA, Yuji <ichikawa.yuji@gmail.com>" import sys import os from multiprocessing import Pool import psutil import sgf from board import Board, move2ev from utilities import file_pathes_under def check_and_arg(e: any): """ is defined explicitly ...
[ 37811, 198, 9122, 611, 1388, 1627, 286, 1123, 311, 21713, 318, 2742, 13, 198, 37811, 198, 834, 9800, 834, 796, 366, 20739, 18694, 12298, 32, 11, 10605, 7285, 1279, 488, 40398, 13, 24767, 7285, 31, 14816, 13, 785, 24618, 198, 198, 1174...
2.528662
314
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Mar 10 12:20:03 2021 @author: prowe By Penny Rowe 2021/03/10 AI with Prof. America Chambers, Spring 2021 Based on Variable.java """ class Variable: """ A variable in a Sudoku CSP with domain {1, 2, 3, ..., 9} The value of the variable m...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 1526, 838, 1105, 25, 1238, 25, 3070, 33448, 198, 198, 31, 9800, 25, 386, 732, 628, ...
2.325264
1,611
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: resource_requirements.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from googl...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 8271, 62, 8897, 18883, 13, 1676, 1462, 198, 198, 11748, 25064, 198, 62, ...
2.767442
1,204
from django.shortcuts import render from . import models import requests # Create your views here.
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 764, 1330, 4981, 198, 11748, 7007, 198, 198, 2, 13610, 534, 5009, 994, 13 ]
4.125
24
# When I made this, I was not comletely sure how to make functions, so when it # doesn't understand the input, it just spits out a line saying it didn't # understand then moves on. author = 'Zed A. Shaw' book = 'Learn Python the Hard Way by %s' % author print """ Hi dad! This is a little program I wrote to show you s...
[ 2, 1649, 314, 925, 428, 11, 314, 373, 407, 401, 5807, 306, 1654, 703, 284, 787, 5499, 11, 523, 618, 340, 198, 2, 1595, 470, 1833, 262, 5128, 11, 340, 655, 599, 896, 503, 257, 1627, 2282, 340, 1422, 470, 220, 198, 2, 1833, 788, ...
2.840937
811
"""Change some model user and pay_type to use helper function that strip unique field Revision ID: b986a61de65c Revises: 29128332c534 Create Date: 2021-12-08 19:10:55.573019 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'b986a61de65c' down_revision = '2912833...
[ 37811, 19400, 617, 2746, 2836, 290, 1414, 62, 4906, 284, 779, 31904, 2163, 326, 10283, 3748, 2214, 198, 198, 18009, 1166, 4522, 25, 275, 49087, 64, 5333, 2934, 2996, 66, 198, 18009, 2696, 25, 2808, 12762, 32148, 66, 20, 2682, 198, 164...
2.80916
131
import argparse import os import sys assert sys.version_info[0] == 3 and sys.version_info[1] >= 5, "Requires Python 3.5 or newer" sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../"))) if sys.platform not in ["linux", "linux2", "darwin"]: print("stnm supports only macos and linux") ...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 30493, 25064, 13, 9641, 62, 10951, 58, 15, 60, 6624, 513, 290, 25064, 13, 9641, 62, 10951, 58, 16, 60, 18189, 642, 11, 366, 39618, 11361, 513, 13, 20, 393, 15064, 1...
2.572414
145
from functools import partial from typing import Any, Dict, Optional, Type, Union import graphene from django.db.models import QuerySet from graphene.types.mountedtype import MountedType from graphene.types.unmountedtype import UnmountedType from graphene_django.filter import DjangoFilterConnectionField from simple_g...
[ 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 32233, 11, 5994, 11, 4479, 198, 198, 11748, 42463, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 43301, 7248, 198, 6738, 42463, 13, 19199, 13, ...
3.84
150
import numpy as np import pandas as pd import datetime import json from ..util.utility import * from ..metrics.fairness_metrics import FairnessMetrics from ..metrics.performance_metrics import PerformanceMetrics from ..metrics.newmetric import * from ..metrics.tradeoff import TradeoffRate import ipywidgets as widgets i...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 6738, 11485, 22602, 13, 315, 879, 1330, 1635, 198, 6738, 11485, 4164, 10466, 13, 22043, 1108, 62, 4164, 10466, 1330, 70...
2.027979
43,569
from django.forms import ModelForm from apps.event.models import Event
[ 6738, 42625, 14208, 13, 23914, 1330, 9104, 8479, 198, 198, 6738, 6725, 13, 15596, 13, 27530, 1330, 8558 ]
3.944444
18
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 24118, 687, 10290, 357, 27110, 5235, 8, 16984, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760...
3.519685
127
#!/usr/bin/env python # -*- coding: UTF-8 -*- import re from typing import Optional from base import BaseObject from base import FileIO class DBpediaTaxonomyExtractor(BaseObject): """ Extract latent 'is-a' hierarchy from unstructured text """ __isa_patterns = None __clause_patterns = None def __i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 628, 198, 11748, 302, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 2779, 1330, 7308, 10267, 198, 6738, 2779, 1330, 9220, 9399, ...
2.041854
1,338
''' Trade classifications''' VALID_TRADE_CLASSIFICATIONS = [ "Ag", "Na", "In", "Ni", "Ri", "Po", "Wa", "De", "As", "Ic" ] class TradeClassification(): ''' Planetary trade classification''' @property def trade_classification(self): ''' Return own value''' ...
[ 7061, 6, 9601, 1398, 6637, 7061, 6, 198, 198, 23428, 2389, 62, 5446, 19266, 62, 31631, 30643, 18421, 796, 685, 198, 220, 220, 220, 366, 10262, 1600, 198, 220, 220, 220, 366, 26705, 1600, 198, 220, 220, 220, 366, 818, 1600, 198, 220,...
2.220859
163
import pandas as pd import numpy as np from common.libs.neo2cos import find_songs INT_BITS = 32 MAX_INT = (1 << (INT_BITS - 1)) - 1 # Maximum Integer for INT_BITS def main(mode, input_cus=''): # df1 = pd.read_excel(Song_addr); """读取歌曲库""" # df2 = pd.read_excel(Cus_addr); """读取用户库""" # print...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2219, 13, 8019, 82, 13, 710, 78, 17, 6966, 1330, 1064, 62, 82, 28079, 198, 198, 12394, 62, 26094, 50, 796, 3933, 198, 22921, 62, 12394, 796, 357, 16, ...
1.691377
661
#!/usr/bin/env python3 import secrets import re def len_pass(): """ function generate randomly the length of password, from 10 to 16 caracters """ while True: len_pass = secrets.randbelow(17) if len_pass >= 10: break return len_pass def get_password(len_password): ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 13141, 198, 11748, 302, 198, 198, 4299, 18896, 62, 6603, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2163, 7716, 15456, 262, 4129, 286, 9206, 11, 198, 220, 220, ...
2.440124
643
# Copyright 2017 AT&T Corporation. # 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 require...
[ 2, 15069, 2177, 5161, 5, 51, 10501, 13, 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...
3.350554
271
from datetime import date import boundaries boundaries.register('Brock wards', domain='Brock, ON', last_updated=date(2018, 11, 2), name_func=lambda f: 'Ward %s' % f.get('WARD'), id_func=boundaries.attr('WARD'), authority='Township of Brock', source_url='https://city-oshawa.opendata.arcgis.com/...
[ 6738, 4818, 8079, 1330, 3128, 198, 198, 11748, 13215, 198, 198, 7784, 3166, 13, 30238, 10786, 33, 10823, 32710, 3256, 198, 220, 220, 220, 7386, 11639, 33, 10823, 11, 6177, 3256, 198, 220, 220, 220, 938, 62, 43162, 28, 4475, 7, 7908, ...
2.501873
267
from flask import Flask, render_template from flask_sqlalchemy import SQLAlchemy from time import sleep from cpu_load_generator import load_single_core import requests import urllib3 import json import logging import config import re import os REQUESTS_LIMIT = 20 DELAY_IN_SECONDS = 0.1 app = Flask(__name__) user = os...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 640, 1330, 3993, 198, 6738, 42804, 62, 2220, 62, 8612, 1352, 1330, 3440, 62, 29762, 62, 7295, 198, 11748, 7007,...
2.494845
388
""" Basic script to take in insert size csv from shiver, where each row is 3 comma-separated values (insert size, number of that size, fraction). Returns the insert size at 0.05, 0.5, 0.95 percentiles, as well as the number of inserts >350 and the fraction of inserts that are >350bp. tanya.golubchik@bdi.ox.ac.uk Oct...
[ 37811, 198, 198, 26416, 4226, 284, 1011, 287, 7550, 2546, 269, 21370, 422, 427, 1428, 11, 810, 1123, 5752, 198, 271, 513, 39650, 12, 25512, 515, 3815, 357, 28463, 2546, 11, 1271, 286, 326, 2546, 11, 13390, 737, 198, 198, 35561, 262, ...
2.078507
777
''' Launch a RevitLookup "Snoop Objects" dialog for elements from the RPS shell = Introduction = You _do_ have `RevitLookup` installed, don't you? This is _the_ tool for introspecting model elements. You can find it in the Revit SDK folder, along with the source code. The plugin does many things, among which I...
[ 7061, 6, 201, 198, 38296, 257, 5416, 270, 8567, 929, 366, 50, 3919, 404, 35832, 1, 17310, 329, 4847, 422, 262, 371, 3705, 7582, 201, 198, 201, 198, 28, 22395, 796, 201, 198, 201, 198, 1639, 4808, 4598, 62, 423, 4600, 18009, 270, 8...
3.206349
378
# Copyright 2016 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, 1584, 19507, 605, 12052, 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, 743...
3.825
200
# meds/kernel.py # # """ central piece of code that loads the plugins and starts services. """ from meds.utils.cli import hello, set_completer, enable_history, termsetup from meds.utils.misc import include, locked from meds.utils.trace import get_exception from meds.utils.name import name, sname, mname from meds.uti...
[ 2, 1117, 82, 14, 33885, 13, 9078, 198, 2, 198, 2, 198, 198, 37811, 4318, 3704, 286, 2438, 326, 15989, 262, 20652, 290, 4940, 2594, 13, 37227, 628, 198, 6738, 1117, 82, 13, 26791, 13, 44506, 1330, 23748, 11, 900, 62, 785, 1154, 353...
3.328042
189
import re import shutil from pathlib import Path from typing import Optional from functools import wraps from time import time import boto3 from botocore.client import Config from sm.browser.mz_search import S3File
[ 11748, 302, 198, 11748, 4423, 346, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 32233, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 640, 1330, 640, 198, 198, 11748, 275, 2069, 18, 198, 6738, 10214, 420, 382, 13, ...
3.539683
63
# -*- coding: utf-8 -*- # # Unless explicitly stated otherwise all files in this repository are licensed # under the Apache 2 License. # # This product includes software developed at Datadog # (https://www.datadoghq.com/). # # Copyright 2018 Datadog, Inc. # """create_pull_request_card.py Creates a trello card based ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 198, 2, 17486, 11777, 5081, 4306, 477, 3696, 287, 428, 16099, 389, 11971, 198, 2, 739, 262, 24843, 362, 13789, 13, 198, 2, 198, 2, 770, 1720, 3407, 3788, 416...
2.313817
854
#!/usr/bin/env python3 from setuptools import setup, find_packages requirements = ['lz4tools==1.3.1.2', 'numpy', 'py==1.4.31', 'pytest==3.0.3'] setup(name='slisonner', version='0.7.9', description='Habidatum Chronotope Slison encode/decode utility', long_description='', author='Nikita Pestro...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 8897, 18883, 796, 37250, 75, 89, 19, 31391, 855, 16, 13, 18, 13, 16, 13, 17, 3256, 198, 6, 77, 32152, ...
2.404669
257
#!/usr/bin/python3 from tools import * from sys import argv from os.path import join import h5py import matplotlib.pylab as plt import numpy as np from time import sleep if len(argv) > 1: pathToSimFolder = argv[1] else: pathToSimFolder = "../data/" parameters, electrodes = readParameters(pathToSimFolder) f...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 6738, 4899, 1330, 1635, 198, 6738, 25064, 1330, 1822, 85, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 198, 11748, 289, 20, 9078, 198, 11748, 2603, 29487, 8019, 13, 79, 2645, 397, 355, ...
1.928868
6,973
from abc import ABC, abstractmethod from planteye_vision.data_chunks.data_chunk_data import DataChunkData from planteye_vision.data_chunks.metadata_chunk import MetadataChunk, MetadataChunkData from planteye_vision.data_chunks.data_chunk_status import DataChunkStatus
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 4618, 25379, 62, 10178, 13, 7890, 62, 354, 14125, 13, 7890, 62, 354, 2954, 62, 7890, 1330, 6060, 1925, 2954, 6601, 198, 6738, 4618, 25379, 62, 10178, 13, 7890, 62, 354, 14125, ...
3.253012
83
# Name: authserver.py # # Description: Validates a one-time-passocde that is included in the header. # Cases: # [1] Valid OTP - belongs to a known application, not used # [2] Valid OTP - belongs to a known application, but already used # ...
[ 2, 6530, 25, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6284, 15388, 13, 9078, 198, 2, 198, 2, 12489, 25, 220, 220, 220, 220, 220, 3254, 37051, 257, 530, 12, 2435, 12, 6603, 420, 2934, 326, 318, 3017, 287, 262, ...
2.447115
416