content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from django.shortcuts import redirect from django.http import HttpResponse from django.http import HttpResponseBadRequest from django.http import Http404 import datetime as dt from shared.Monte import Monte def simulate(request): """ Generates the Monte object from the user input parameters in the request and...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 22069, 18453, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, ...
2.321078
816
from .core import Variable, Model # Hodgkin-Huxley Model V = Variable(name='V', init_value=-60, unit='mV', ddt='(1/Cm)*(-gk*n**4*(V-Vk)-gna*m**3*h*(V-Vna)-gl*(V-Vl)+Iapp)') n = Variable(name='n', ddt='alpha_n*(1-n)-beta_n*n', init_value=1/3) m = Variable(name='m', ddt='alpha_m*(1-m)-beta_m*m', init_...
[ 6738, 764, 7295, 1330, 35748, 11, 9104, 201, 198, 201, 198, 2, 37480, 5116, 12, 39, 2821, 1636, 9104, 201, 198, 53, 796, 35748, 7, 3672, 11639, 53, 3256, 2315, 62, 8367, 10779, 1899, 11, 4326, 11639, 76, 53, 3256, 201, 198, 220, 2...
1.688933
1,003
import pandas as pd import numpy as np from .utils import calculate_ao, calculate_sma, calculate_smma, mad __version__ = '1.9.0' class Indicators: """ Add technical indicators data to a pandas data frame Example: ~~~~~~~~ >>> import pandas as pd >>> from tapy import Indicators ...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 764, 26791, 1330, 15284, 62, 5488, 11, 15284, 62, 82, 2611, 11, 15284, 62, 5796, 2611, 11, 8805, 198, 198, 834, 9641, 834, 796, 705, 16, 13, 24, ...
2.07911
15,017
default_app_config = 'info_transportation.apps.InfoTransportationConfig'
[ 12286, 62, 1324, 62, 11250, 796, 705, 10951, 62, 7645, 10189, 13, 18211, 13, 12360, 8291, 10189, 16934, 6, 198 ]
3.65
20
# Copyright 2019 Jeremy Schulman, nwkautomaniac@gmail.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 appli...
[ 2, 220, 15069, 13130, 11753, 3059, 377, 805, 11, 299, 43021, 2306, 296, 3216, 330, 31, 14816, 13, 785, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743...
3.097222
1,008
# Copyright (c) 2021, Moritz E. Beber. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ 2, 15069, 357, 66, 8, 33448, 11, 3461, 4224, 412, 13, 1355, 527, 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, 3...
3.161725
371
import sys input_path = './partial_lihkg.txt' output_path = './partial_lihkg_no_dup.txt' seen = set() with open(input_path,encoding='utf-8',mode='r') as fin, open(output_path,mode='w',encoding='utf-8') as fout: while True: line = str(fin.readline()) if len(line) == 0: break lin...
[ 11748, 25064, 198, 198, 15414, 62, 6978, 796, 705, 19571, 47172, 62, 75, 4449, 10025, 13, 14116, 6, 198, 22915, 62, 6978, 796, 705, 19571, 47172, 62, 75, 4449, 10025, 62, 3919, 62, 646, 79, 13, 14116, 6, 198, 198, 15898, 796, 900, ...
2.066964
224
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ###Author #Nathaniel Watson #2017-09-18 #nathankw@stanford.edu ### """ Clones the specified CrisprModification onto the desired biosamples. """ import argparse import pdb import pulsarpy.models as models import pulsarpy.utils if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 21017, 13838, 198, 2, 45, 776, 6321, 14959, 198, 2, 5539, 12, 2931, 12, 1507, 198, 2, 77, 776, 962, 86, ...
2.700855
117
import json from os import path from django.conf import settings from web3 import Web3 from web3.middleware import geth_poa_middleware from fluctua_nft_backend.nfts import models # load abi abi_path = path.join( path.dirname(__file__), "..", "..", "contracts", "RumiaNFT.json" ) with open(abi_path) as f: abi ...
[ 11748, 33918, 198, 6738, 28686, 1330, 3108, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 3992, 18, 1330, 5313, 18, 198, 6738, 3992, 18, 13, 27171, 1574, 1330, 651, 71, 62, 7501, 64, 62, 27171, 1574, 198, 198, 6738, ...
2.686528
386
import gi gi.require_version('Gst', '1.0') from gi.repository import GObject, Gst, Gtk # Initializing threads used by the Gst various elements GObject.threads_init() #Initializes the GStreamer library, setting up internal path lists, registering built-in elements, and loading standard plugins. Gst.init(None) ...
[ 11748, 308, 72, 198, 12397, 13, 46115, 62, 9641, 10786, 38, 301, 3256, 705, 16, 13, 15, 11537, 198, 6738, 308, 72, 13, 260, 1930, 37765, 1330, 402, 10267, 11, 402, 301, 11, 402, 30488, 198, 198, 2, 20768, 2890, 14390, 973, 416, 26...
3.038961
154
from decimal import Decimal import pytest import dask.dataframe as dd from dask.dataframe.utils import assert_eq, PANDAS_VERSION pd = pytest.importorskip("pandas", minversion="0.23.4") from pandas.tests.extension.decimal.array import DecimalArray, DecimalDtype from dask.dataframe.extensions import make_array_nonempt...
[ 6738, 32465, 1330, 4280, 4402, 198, 11748, 12972, 9288, 198, 198, 11748, 288, 2093, 13, 7890, 14535, 355, 49427, 198, 6738, 288, 2093, 13, 7890, 14535, 13, 26791, 1330, 6818, 62, 27363, 11, 350, 6981, 1921, 62, 43717, 198, 198, 30094, ...
2.916084
143
from setuptools import setup, find_packages setup( name="phyllo", version="0.1", description="PHilologicallY Linguistic LegwOrk.", author="Jordan Nguyen, Christan Grant", author_email="Jordan.Nguyen-1@ou.edu, cgrant@ou.edu", url="https://github.com/oudalab/phyllo", download_url="https://gi...
[ 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 6883, 18798, 1600, 198, 220, 220, 220, 2196, 2625, 15, 13, 16, 1600, 198, 220, 220, 220, 6764, 2625, 11909, 346, 2078...
2.416201
358
import pygame as pg import random from settings import * from main import * import os vec = pg.math.Vector2 Game = Game() Game.show_start_screen() while Game.running: Game.level1() Game.show_go_screen() pg.quit()
[ 11748, 12972, 6057, 355, 23241, 198, 11748, 4738, 198, 6738, 6460, 1330, 1635, 198, 6738, 1388, 1330, 1635, 198, 11748, 28686, 198, 35138, 796, 23241, 13, 11018, 13, 38469, 17, 628, 198, 8777, 796, 3776, 3419, 198, 8777, 13, 12860, 62, ...
2.848101
79
# -*- coding: utf-8 -*- from .database import * from .lessons import * from .news import * from .organization import * from .topics import * from .users import *
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 764, 48806, 1330, 1635, 198, 6738, 764, 1203, 684, 1330, 1635, 198, 6738, 764, 10827, 1330, 1635, 198, 6738, 764, 9971, 1634, 1330, 1635, 198, 6738, 764, 4852...
3.056604
53
from unittest import TestCase from fireant import ( Dimension, Metric, ) from fireant.slicer.dimensions import DisplayDimension from .mocks import slicer
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 2046, 415, 1330, 357, 198, 220, 220, 220, 34024, 11, 198, 220, 220, 220, 3395, 1173, 11, 198, 8, 198, 6738, 2046, 415, 13, 82, 677, 263, 13, 27740, 5736, 1330, 16531, 29271, ...
3.09434
53
# Divide and Conquer Algorithm for finding the maximum sub array sum arr = [-2,-5,6,-2,-3,1,5,-6] print("Maximum Sub Array Sum") print(maxSubArraySum(arr,0,len(arr)-1)) print() # Similar problem: Given a sum find the pair of numbers which add upto the sum arr = [6,8,2,3,10,11] print("Two sum problem") print(twoSumPr...
[ 2, 46894, 290, 40963, 978, 42289, 329, 4917, 262, 5415, 850, 7177, 2160, 198, 198, 3258, 796, 25915, 17, 12095, 20, 11, 21, 12095, 17, 12095, 18, 11, 16, 11, 20, 12095, 21, 60, 198, 4798, 7203, 40541, 3834, 15690, 5060, 4943, 198, ...
2.898374
246
from threeML.plugins.OGIPLike import OGIPLike __instrument_name = "Swift XRT" # At the moment this is just another name for the GenericOGIPLike spectrum
[ 6738, 1115, 5805, 13, 37390, 13, 7730, 4061, 7594, 1330, 34498, 4061, 7594, 198, 198, 834, 259, 43872, 62, 3672, 796, 366, 10462, 2135, 1395, 14181, 1, 628, 198, 2, 1629, 262, 2589, 428, 318, 655, 1194, 1438, 329, 262, 42044, 7730, ...
3.391304
46
import unittest from pyalink.alink import * import numpy as np import pandas as pd
[ 11748, 555, 715, 395, 198, 6738, 12972, 282, 676, 13, 282, 676, 1330, 1635, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67 ]
3.037037
27
#!/usr/bin/env python ''' TLE propagation with SGP4 ============================ This shows that TLEs really should be propagated as TLEs, not as states. ''' import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from sorts.propagator import SGP4 from sgp4.api import Satrec #...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 7061, 6, 198, 51, 2538, 43594, 351, 311, 16960, 19, 198, 4770, 25609, 198, 198, 1212, 2523, 326, 309, 2538, 82, 1107, 815, 307, 8928, 515, 355, 309, 2538, 82, 11, 407, 355, 25...
2.236271
783
#!/usr/bin/env python3 import database import http import subprocess db = database.Database() # Delete old tokens and qr images from the server # Command for testing: # SELECT token, UNIX_TIMESTAMP(CURRENT_TIMESTAMP) - UNIX_TIMESTAMP(creation_time) FROM join_token WHERE(UNIX_TIMESTAMP(CURRENT_TIMESTAMP) - UNIX_TIMES...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 6831, 198, 11748, 2638, 198, 11748, 850, 14681, 198, 198, 9945, 796, 6831, 13, 38105, 3419, 198, 198, 2, 23520, 1468, 16326, 290, 10662, 81, 4263, 422, 262, 4382, 198, ...
2.883978
362
# 题意:剪绳子,给你一根长度为 n 的绳子,请把绳子剪成整数长度的 m 段(m、n都是整数,n>1并且m>1),每段绳子的长度记为 k[0],k[1]...k[m-1] 。请问 k[0]*k[1]*...*k[m-1] 可能的最大乘积是多少? # 例如,当绳子的长度是8时,我们把它剪成长度分别为2、3、3的三段,此时得到的最大乘积是18。 # 题解1: 动态规划。注意到我们所求的乘积可以当作动态规划中的状态。设置1-n的状态数组dp[n]在存,动态归化的状态方程是:dp[i] = max(dp[i-j]*j, (i-j)*j)即对于一段长度i的绳子,其最大乘积dp[i] # 可以分为对这一段进行裁剪和不裁剪两种情形,对...
[ 2, 16268, 95, 246, 35707, 237, 171, 120, 248, 30298, 103, 163, 119, 111, 36310, 171, 120, 234, 163, 119, 247, 19526, 254, 31660, 43718, 117, 165, 243, 123, 41753, 99, 10310, 118, 299, 13328, 248, 226, 163, 119, 111, 36310, 171, 120,...
0.588308
804
# Copyright 2018-2020 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicabl...
[ 2, 15069, 2864, 12, 42334, 47482, 324, 84, 29082, 21852, 3457, 13, 201, 198, 201, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 201, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, ...
1.974771
14,626
# -*- coding: utf-8 -*- """ Created by Pierluigi on 2020-02-01 project: elasticizefiles """ import logging import os import re from datetime import datetime from hashlib import sha256 from multiprocessing import cpu_count from time import time from joblib import Parallel from joblib import delayed from elasticizefile...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 416, 13762, 2290, 25754, 319, 12131, 12, 2999, 12, 486, 198, 16302, 25, 27468, 528, 891, 2915, 198, 37811, 198, 11748, 18931, 198, 11748, 28686, 198, ...
2.222476
1,753
""" TODO: 問題ごとに階層クラスタリングをlinkage()で実行。 fcluster()でクたスター番号の索引付けを行う。 """ import os import mysql.connector as cn from pyquery import PyQuery as pq from enum import Enum import re import subprocess import sys import csv import pandas as pd import copy import matplotlib.pyplot as plt import sys from pand...
[ 37811, 201, 198, 51, 3727, 46, 25, 201, 198, 161, 243, 237, 165, 94, 234, 2515, 242, 30201, 28618, 49694, 236, 161, 109, 97, 14099, 9263, 8943, 23376, 12675, 6527, 26095, 31758, 8726, 496, 3419, 30640, 22522, 253, 26193, 234, 16764, 2...
2.063953
516
# Define a function that helps to calculate the area of circle with different radius and print the area only when the area is divisible by 4 # 23.48, 56.78, 45.67, 78.28 Please consider the unit of these values as cm # Define a function using Python that helps to find the first five character of string in all the...
[ 2, 2896, 500, 257, 2163, 326, 5419, 284, 15284, 262, 1989, 286, 9197, 351, 1180, 16874, 290, 3601, 262, 1989, 691, 618, 262, 1989, 318, 2659, 12843, 416, 604, 198, 198, 2, 2242, 13, 2780, 11, 7265, 13, 3695, 11, 4153, 13, 3134, 11...
3.276316
228
#!/usr/bin/env python # coding: utf-8 # # This script converts xrdb (X11) color scheme format to PuTTY registry # file which creates a new session with proper colors. # # Usage: # xrdb2putty.py path/to/xrdb/files -d path/to/putty/files # # Author: Caesar Kabalan <caesar.kabalan@gmail.com> # Adapted from xrdb2konsole b...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 770, 4226, 26161, 2124, 4372, 65, 357, 55, 1157, 8, 3124, 7791, 5794, 284, 11634, 51, 9936, 20478, 220, 198, 2, 2393, 543, 8075, 2...
2.798799
333
from django.apps import AppConfig from django.conf import settings from prometheus_client import start_http_server import django_prometheus_metrics
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 1552, 36916, 62, 16366, 1330, 923, 62, 4023, 62, 15388, 198, 11748, 42625, 14208, 62, 16963, 36916, 62, 4164, 10466, 198 ]
3.794872
39
# Copyright 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 3717, 3012, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, ...
3.675105
237
try: from matplotlib import pyplot as plt import matplotlib except: import matplotlib matplotlib.rcParams['backend'] = 'TkAgg' from matplotlib import pyplot as plt import numpy as np import pdb class DataPlt(): ''' Dynamic plot context, intended for displaying geometries. like removing ...
[ 28311, 25, 198, 220, 220, 220, 422, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 220, 220, 220, 1330, 2603, 29487, 8019, 198, 16341, 25, 198, 220, 220, 220, 1330, 2603, 29487, 8019, 198, 220, 220, 220, 2603, 29487, 8019, ...
2.471885
907
from unittest.mock import patch import pytest from pinga.config import BadConfigException, get_kafka_config, get_pg_uri, get_sites_list @pytest.mark.parametrize( "sites_file, error_msg", [ ("", "Configured sites_list file '' does not exist"), ("notexists.json", "Configured sites_list file 'notexi...
[ 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 11748, 12972, 9288, 198, 6738, 29400, 64, 13, 11250, 1330, 7772, 16934, 16922, 11, 651, 62, 74, 1878, 4914, 62, 11250, 11, 651, 62, 6024, 62, 9900, 11, 651, 62, 49315, 62, 48...
2.618677
257
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.TuitionISVAgentInfoDTO import TuitionISVAgentInfoDTO
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 198, 6738, 435, 541, 323, 13, 64, 404, 13, 15042, 13, 9979, 415, 13, 22973, 34184, 1187, 1330, 163...
2.532468
77
# Encoding: UTF-8 import argparse import numpy as np import torch import cv2 import os from src.model import SketchKeras import src.image_cutter as img_ctr import src.image_stitcher as img_str import random from tqdm import tqdm # import copy # import glob # import time device = "cuda" if torch.cuda.is_available() el...
[ 2, 14711, 7656, 25, 41002, 12, 23, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 269, 85, 17, 198, 11748, 28686, 198, 6738, 12351, 13, 19849, 1330, 17001, 42, 263, 292, 198, 11748, 12351, ...
1.43768
5,207
from __future__ import absolute_import, print_function, with_statement import Crypto.Hash.MD5
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 3601, 62, 8818, 11, 351, 62, 26090, 198, 198, 11748, 36579, 13, 26257, 13, 12740, 20, 198 ]
3.653846
26
#!/usr/bin/env python import sys if(sys.stdin.isatty()): print("Usage: cat <annotation file> | ./countannots.py") quit() ids_to_counts = dict() # Parse input for line in sys.stdin: line_list = line.strip().split("\t") seqid = line_list[0] if ids_to_counts.has_key(seqid): ids_to_counts[seq...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 25064, 198, 198, 361, 7, 17597, 13, 19282, 259, 13, 271, 265, 774, 3419, 2599, 198, 220, 220, 220, 3601, 7203, 28350, 25, 3797, 1279, 1236, 14221, 2393, 29, 930, 24457, 9127, ...
2.116732
257
from __future__ import absolute_import import unittest from main.maincontroller import MainController from tests.xroad_local_group import xroad_local_group class XroadRemoveLocalGroupMembers(unittest.TestCase): """ UC SERVICE_27 Remove Members from a Local Group RIA URL: https://jira.ria.ee/browse/XT-28...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 555, 715, 395, 198, 198, 6738, 1388, 13, 12417, 36500, 1330, 8774, 22130, 198, 6738, 5254, 13, 87, 6344, 62, 12001, 62, 8094, 1330, 2124, 6344, 62, 12001, 62, 8094, 628,...
2.951456
206
import os import json import datetime import logging import pathlib import jinja2 import networkx import importlib.resources as pkg_resources from collections import Counter from . import templates, format_logger from .objects import force_partial_parse from .parsers import fullprogram class sasPro...
[ 11748, 28686, 201, 198, 11748, 33918, 201, 198, 11748, 4818, 8079, 220, 201, 198, 11748, 18931, 201, 198, 11748, 3108, 8019, 201, 198, 11748, 474, 259, 6592, 17, 201, 198, 11748, 3127, 87, 201, 198, 11748, 1330, 8019, 13, 37540, 355, ...
2.201299
4,158
import unittest from collections import Counter from libs.TfidfModel import TFIDFModel from libs.nlp_length_functions import NLPLengths from libs.review_db import ReviewDB
[ 11748, 555, 715, 395, 198, 6738, 17268, 1330, 15034, 198, 6738, 9195, 82, 13, 51, 69, 312, 69, 17633, 1330, 24958, 2389, 37, 17633, 198, 6738, 9195, 82, 13, 21283, 79, 62, 13664, 62, 12543, 2733, 1330, 22879, 6489, 3286, 82, 198, 67...
3.222222
54
from Player import Player from ClassicCardGame import ClassicCardGame
[ 6738, 7853, 1330, 7853, 198, 6738, 13449, 16962, 8777, 1330, 13449, 16962, 8777, 198 ]
5
14
from django.urls import path, include #importamos de la primer app lo relacionado #a las vistas from pagina1app import views from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.contrib.auth import views as auth_views #Password reset urlpatterns = [ ...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 2, 11748, 321, 418, 390, 8591, 33270, 598, 2376, 823, 49443, 4533, 198, 2, 64, 39990, 410, 37503, 198, 6738, 42208, 1437, 16, 1324, 1330, 5009, 198, 6738, 42625, 14208, 13, ...
2.592784
970
from microbit import * from ultrasonic import * rf = Rangefinder(pin1) display.show(Image.YES) while True: dist = rf.distance_cm() print((dist,)) sleep(10)
[ 6738, 4580, 2545, 1330, 1635, 198, 6738, 23212, 30189, 1330, 1635, 198, 198, 41871, 796, 13667, 22805, 7, 11635, 16, 8, 198, 198, 13812, 13, 12860, 7, 5159, 13, 43335, 8, 198, 198, 4514, 6407, 25, 198, 220, 220, 220, 1233, 796, 374,...
2.552239
67
# Copyright 2022 MosaicML Composer authors # SPDX-License-Identifier: Apache-2.0 """Functional API for applying algorithms in your own training loop. .. code-block:: python from composer import functional as cf from torchvision import models model = models.resnet50() # replace some layers with blur...
[ 2, 15069, 33160, 5826, 18452, 5805, 29936, 263, 7035, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 37811, 22203, 282, 7824, 329, 11524, 16113, 287, 534, 898, 3047, 9052, 13, 198, 198, 492, 2438...
3.001305
766
""" Скрипт, отправляющий хэш-сумму файла для проверки на VirusTotal. Для работы необходим ключ доступа к API сервиса VirusTotal. Ключ можно получить после регистрации на VirusTotal. Для корректной работы скрипта ключ необходимо прописать в переменную среды VT_API_KEY. В качестве параметра скрипту передается md5,...
[ 37811, 201, 198, 140, 94, 31583, 21169, 18849, 140, 123, 20375, 11, 12466, 122, 20375, 140, 123, 21169, 16142, 38857, 30143, 40623, 141, 236, 141, 231, 18849, 140, 117, 220, 141, 227, 141, 235, 141, 230, 12, 21727, 35072, 43108, 43108, ...
1.465339
1,255
#!/usr/bin/python from functools import total_ordering @total_ordering class Event: """The class defining an event.""" LEFT = 0 # BentleyOttmann, ShamosHoey CROSSING = 1 # BentleyOttmann RIGHT = 2 # BentleyOttmann, ShamosHoey HORIZONTAL = 3 # HorizontalVertical VERTICAL = 4 # Horiz...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 6738, 1257, 310, 10141, 1330, 2472, 62, 34555, 198, 198, 31, 23350, 62, 34555, 198, 4871, 8558, 25, 198, 220, 220, 220, 37227, 464, 1398, 16215, 281, 1785, 526, 15931, 198, 220, 220, 2...
2.469231
390
# Containing API to load the count matrix data import anndata import numpy as np import pandas as pd from scipy.sparse import csc_matrix from anndata import read_h5ad from .gtf_utils import load_genes as read_gff def convert_to_annData(Rmat_dict, effLen_tensor, cell_note, gene_note, fill_missing=True): """...
[ 2, 2345, 1397, 7824, 284, 3440, 262, 954, 17593, 1366, 198, 198, 11748, 281, 358, 1045, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 629, 541, 88, 13, 82, 29572, 1330, 269, 1416, 62, 6759, 860...
1.93959
2,632
import argparse import os import time import sqlite3 from tqdm.auto import tqdm import funcx from coffea.processor.funcx.detail import MappedFuncXFuture funcx.set_file_logger('funcx.log') client = funcx.sdk.client.FuncXClient(funcx_service_address='https://dev.funcx.org/api/v1') parser = argparse.ArgumentParser() pa...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 44161, 578, 18, 198, 6738, 256, 80, 36020, 13, 23736, 1330, 256, 80, 36020, 198, 198, 11748, 25439, 87, 198, 6738, 763, 16658, 64, 13, 41341, 13, 20786, 87, 13, 49170...
2.328275
1,252
[ { 'date': '2017-01-01', 'description': 'Nieuwjaarsdag', 'locale': 'nl-NL', 'notes': '', 'region': '', 'type': 'NF' }, { 'date': '2017-04-14', 'description': 'Goede Vrijdag', 'locale': 'nl-NL', 'notes': '', 'region': ''...
[ 58, 198, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 4475, 10354, 705, 5539, 12, 486, 12, 486, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 11213, 10354, 705, 45, 22304, 86, 6592, 945, 67, 363, 3256, ...
1.67074
1,473
# Faça um programa que leia três números e mostre qual é o maior e qual é o menor. a = int(input('Digite primeiro valor: ')) b = int(input('Digite segundo valor: ')) c = int(input('Digite terceiro valor: ')) #Verificar quem é o menor número menor = a if b < a and b < c: menor = b if c < a and c < b: menor = c ...
[ 2, 18350, 50041, 23781, 1430, 64, 8358, 443, 544, 491, 25792, 82, 299, 21356, 647, 418, 304, 749, 260, 4140, 38251, 267, 17266, 1504, 304, 4140, 38251, 267, 1450, 273, 13, 198, 198, 64, 796, 493, 7, 15414, 10786, 19511, 578, 6994, 7...
2.343478
230
from random import randint from time import sleep jogo = dict() print('-=' * 25) print(f'{"Jogo de dados":^50}') print('-=' * 25) n = input('\nJogador 1 aperte [Q] e [ENTER] para jogar o dado: ') jogo['jogador1'] = randint(1, 6) rolar_dados() print(f'O dado caiu no {jogo["jogador1"]}') print('-' * 50) n = input('\...
[ 6738, 4738, 1330, 43720, 600, 198, 6738, 640, 1330, 3993, 198, 198, 73, 24076, 796, 8633, 3419, 198, 198, 4798, 10786, 12, 11639, 1635, 1679, 8, 198, 4798, 7, 69, 6, 4895, 41, 24076, 390, 9955, 418, 1298, 61, 1120, 92, 11537, 198, ...
2.145492
488
""" Script for aggregation of IDEA events. Aggregates are marked in json IDEA message and send to output kafka topic. Example of marking: {..., '_aida’:{'Duplicate’: 'true’, 'Continuing’: <first_idea_id>}, ...} """ import os import sys import argparse import ujson as json from idea import Idea from kafka...
[ 37811, 201, 198, 12327, 329, 46500, 286, 4522, 16412, 2995, 13, 19015, 2301, 689, 389, 7498, 287, 33918, 4522, 16412, 3275, 290, 3758, 284, 5072, 479, 1878, 4914, 7243, 13, 201, 198, 17934, 286, 18730, 25, 1391, 986, 11, 705, 62, 3054...
2.422985
4,168
import os import os.path as op import shutil import tempfile from bento.compat.api.moves \ import \ unittest from bento.core.node \ import \ create_root_with_source_tree from bento.core.testing \ import \ create_fake_package_from_bento_infos from bento.commands.command_contexts \ ...
[ 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 1034, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 198, 6738, 17157, 78, 13, 5589, 265, 13, 15042, 13, 76, 5241, 3467, 198, 220, 220, 220, 1330, 3467, 198, 220, 220, 220, 220, ...
2.38565
223
""" Test `sinethesizer.effects` package. Author: Nikolay Lysenko """
[ 37811, 198, 14402, 4600, 31369, 316, 956, 7509, 13, 34435, 63, 5301, 13, 198, 198, 13838, 25, 48127, 323, 46749, 32720, 198, 37811, 198 ]
2.916667
24
import textwrap import tokenize import ast import io import unittest import flake8_intsights from . import texts
[ 11748, 2420, 37150, 198, 11748, 11241, 1096, 198, 11748, 6468, 198, 11748, 33245, 198, 11748, 555, 715, 395, 198, 198, 11748, 781, 539, 23, 62, 29503, 2337, 198, 198, 6738, 764, 1330, 13399, 628 ]
3.411765
34
# usando generator, ele comsome menos memoria generator = (i ** 2 for i in range(10) if i % 2 == 0) #aqui diferente das vercoes anteriores ele faz o sistema de stremer. #ele vai carregando sobre a nessecidade! for numero in generator: print(numero)
[ 2, 514, 25440, 17301, 11, 9766, 401, 11246, 1450, 418, 1066, 7661, 198, 8612, 1352, 796, 357, 72, 12429, 362, 329, 1312, 287, 2837, 7, 940, 8, 611, 1312, 4064, 362, 6624, 657, 8, 198, 198, 2, 36129, 72, 288, 361, 9100, 68, 288, ...
2.635417
96
import typing from dataclasses import dataclass import yaml import attr @attr.s(slots=True) @attr.s(slots=True) @attr.s(slots=True) param_location_choices = ('query', 'header', 'path', 'cookie') @attr.s(slots=True) @attr.s(slots=True) if __name__ == '__main__': info = InfoObject(title='SLAP API',...
[ 11748, 19720, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 11748, 331, 43695, 198, 11748, 708, 81, 628, 198, 198, 31, 35226, 13, 82, 7, 6649, 1747, 28, 17821, 8, 628, 198, 31, 35226, 13, 82, 7, 6649, 1747, 28, 17...
2.414286
140
import networkx as nx from phylo._core.phylogenytree import SASCPhylogeny import pytest as pt
[ 11748, 3127, 87, 355, 299, 87, 198, 6738, 37763, 78, 13557, 7295, 13, 746, 2645, 6644, 20760, 631, 1330, 35516, 34, 2725, 2645, 6644, 88, 198, 11748, 12972, 9288, 355, 42975, 628, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198 ]
2.5
42
import hyppo.discrim import hyppo.independence import hyppo.ksample import hyppo.time_series import hyppo.kgof import hyppo.tools import hyppo.d_variate import hyppo.conditional_independence __version__ = "0.3.2"
[ 11748, 2537, 16634, 13, 15410, 3036, 198, 11748, 2537, 16634, 13, 39894, 198, 11748, 2537, 16634, 13, 591, 1403, 198, 11748, 2537, 16634, 13, 2435, 62, 25076, 198, 11748, 2537, 16634, 13, 10025, 1659, 198, 11748, 2537, 16634, 13, 31391, ...
2.972222
72
import math import logging import numpy as np import torch from torch.optim import Optimizer from torch.nn.utils import clip_grad_norm_ logger = logging.getLogger(__name__) def lr_schedule(step, total_steps, lr, lr_warmup, lr_cooldown): """Calculate a scheduled learning rate value.""" if lr_warmup is None:...
[ 11748, 10688, 198, 11748, 18931, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 28034, 198, 6738, 28034, 13, 40085, 1330, 30011, 7509, 198, 6738, 28034, 13, 20471, 13, 26791, 1330, 10651, 62, 9744, 62, 27237, 62, 628, 198, 6404, 1...
2.111724
3,446
import tensorflow as tf import numpy as np import matplotlib.pyplot as plt from keras.datasets import mnist import time (x_train,y_train),(x_test,y_test)= tf.keras.datasets.mnist.load_data() x_train = tf.keras.utils.normalize(x_train, axis=1) x_test = tf.keras.utils.normalize(x_test, axis=1) x_train = x_train.r...
[ 11748, 11192, 273, 11125, 355, 48700, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 6738, 41927, 292, 13, 19608, 292, 1039, 1330, 285, 77, 396, 201, 198, 11748, 6...
2.132986
767
import atexit import functools from time import clock line = "="*40 start = clock() atexit.register(endlog)
[ 11748, 379, 37023, 198, 11748, 1257, 310, 10141, 198, 6738, 640, 1330, 8801, 198, 198, 1370, 796, 366, 2625, 9, 1821, 198, 198, 9688, 796, 8801, 3419, 198, 378, 10198, 13, 30238, 7, 437, 6404, 8, 628, 220, 220, 220, 220, 220, 220, ...
2.644444
45
import pytest import torch import inspect import itertools from block.models.networks.fusions import fusions bsize = 2 x_arg = [ [torch.randn(bsize, 10), torch.randn(bsize, 20)], [torch.randn(bsize, 20), torch.randn(bsize, 10)], [torch.randn(bsize, 10), torch.randn(bsize, 10)] ] F_arg = [F for k, F in fusi...
[ 11748, 12972, 9288, 198, 11748, 28034, 198, 11748, 10104, 198, 11748, 340, 861, 10141, 198, 6738, 2512, 13, 27530, 13, 3262, 5225, 13, 69, 15880, 1330, 277, 15880, 198, 198, 1443, 1096, 796, 362, 198, 87, 62, 853, 796, 685, 198, 220, ...
2.228782
271
import sqlite3
[ 11748, 44161, 578, 18, 628 ]
3.2
5
# -*- coding: utf-8 -*- import itertools from typing import Iterable, Union import numpy as np def get_neighborhood_vectors_axes(radius: Union[float, Iterable[float]]): """This neighborhood definition lies on a sphere. Returns a list of 6 positions (up, down, left, right, behind, in front) at exactly `radius...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 340, 861, 10141, 198, 6738, 19720, 1330, 40806, 540, 11, 4479, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 651, 62, 710, 394, 2865, 2894, 62, 303, ...
2.704857
1,606
# proxy module from pyface.ui.qt4.python_editor import *
[ 2, 15741, 8265, 198, 6738, 12972, 2550, 13, 9019, 13, 39568, 19, 13, 29412, 62, 35352, 1330, 1635, 198 ]
3
19
#!/usr/bin/env python2.7 ''' Android Activity Most Used Android Apps ''' import re from wrcsv import * #--activity in HTML format-- a=gethtmldata() #--Regex Expression-- androidapp=re.findall(r'\">([\w\s]+)</a><br>([\w\s\,\:]+)</div>',a) #--write data to csv file-- writecsv("Android_Application_Activity",['APPLICA...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 220, 197, 29412, 17, 13, 22, 198, 7061, 6, 198, 25934, 24641, 198, 6943, 16718, 5565, 27710, 198, 7061, 6, 198, 11748, 302, 198, 6738, 1319, 40664, 1330, 1635, 198, 198, 2, 438, 21797, 287, 1153...
2.713415
164
# Generated by Django 3.2 on 2021-08-11 08:54 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 319, 33448, 12, 2919, 12, 1157, 8487, 25, 4051, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.966667
30
from django.conf.urls import url from . import views from django.contrib.auth.decorators import login_required urlpatterns = [ url('', views.MapTemplate, name="default"), url('template2/', views.MapTemplate2, name="default"), url('template3/', views.MapTemplate3, name="default"), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 764, 1330, 5009, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220,...
3.041237
97
# Crichton, Admirable Source Configuration Management # Copyright 2012 British Broadcasting Corporation # # 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/licens...
[ 2, 3864, 488, 1122, 11, 21177, 540, 8090, 28373, 8549, 198, 2, 15069, 2321, 3517, 32250, 10501, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743, 407, 779, ...
3.581481
270
from .solution import minimumDeletions from ..utils import io, printer print('Enter string only consisting of "a"s and "b"s:', end=' ') s = io.get(str).lower() violating_characters = set(s) - set('ab') assert len(violating_characters) == 0, f'Violating characters: {", ".join(violating_characters)}' deletions = minim...
[ 6738, 764, 82, 2122, 1330, 5288, 5005, 1616, 507, 198, 6738, 11485, 26791, 1330, 33245, 11, 20632, 198, 198, 4798, 10786, 17469, 4731, 691, 17747, 286, 366, 64, 1, 82, 290, 366, 65, 1, 82, 25, 3256, 886, 11639, 705, 8, 198, 82, 79...
2.910345
145
from flask import Flask, session from automlk.print import * from automlk.folders import has_subfolders app = Flask(__name__) SESSION_TYPE = 'redis' app.config.from_object('config') app.jinja_env.globals.update(print_summary=print_summary) app.jinja_env.globals.update(print_summary=print_summary) app.jinja_env.globals...
[ 6738, 42903, 1330, 46947, 11, 6246, 198, 6738, 3557, 75, 74, 13, 4798, 1330, 1635, 198, 6738, 3557, 75, 74, 13, 11379, 364, 1330, 468, 62, 7266, 11379, 364, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 50, 47621, 62, 252...
2.605187
347
# Generated by Django 2.1.1 on 2018-10-05 12:39 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 16, 319, 2864, 12, 940, 12, 2713, 1105, 25, 2670, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2016 Daniel Estevez <daniel@destevez.net>. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including witho...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 220, 198, 2, 15069, 1584, 7806, 412, 4169, 33425, 1279, 67, 6321, 31, 16520, 68, 33425, 13, 3262, 28401, 198, 2, ...
3.494792
384
import six from nefertari.utils.dictset import dictset from nefertari.utils.utils import issequence class FieldData(object): """ Keeps field data in a generic format. Is passed to field processors. """ def __init__(self, name, new_value, params=None): """ :param name: Name of ...
[ 11748, 2237, 198, 6738, 497, 69, 861, 2743, 13, 26791, 13, 11600, 2617, 1330, 8633, 2617, 198, 6738, 497, 69, 861, 2743, 13, 26791, 13, 26791, 1330, 318, 43167, 628, 628, 628, 628, 628, 198, 4871, 7663, 6601, 7, 15252, 2599, 198, 22...
2.256318
554
import numpy as np from ._skyproj import _Skyproj __all__ = ['Skyproj', 'McBrydeSkyproj', 'LaeaSkyproj', 'MollweideSkyproj', 'HammerSkyproj', 'EqualEarthSkyproj', 'GnomonicSkyproj', 'ObliqueMollweideSkyproj'] class _Stadium: """Extension class to create a stadium-shaped projection boundary...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 47540, 15688, 1676, 73, 1330, 4808, 22308, 1676, 73, 198, 198, 834, 439, 834, 796, 37250, 22308, 1676, 73, 3256, 705, 9742, 33, 563, 2934, 22308, 1676, 73, 3256, 705, 43, 44705, 22308, 16...
2.80354
565
import sys import logging import argparse from logging.config import fileConfig from calculator import ExpressionCalculator def main(): """ Driver function that collects user inputs and passes it to the underlying engine :returns integer indicating success or failure """ logger = logging.getLogg...
[ 11748, 25064, 198, 11748, 18931, 198, 11748, 1822, 29572, 198, 198, 6738, 18931, 13, 11250, 1330, 2393, 16934, 198, 198, 6738, 28260, 1330, 41986, 9771, 3129, 1352, 628, 198, 4299, 1388, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, ...
3.448387
310
# Generated by Django 3.2.11 on 2022-01-16 01:51 import datetime from django.conf import settings import django.contrib.auth.validators import django.contrib.postgres.fields import django.core.validators from django.db import migrations, models from django.utils.timezone import utc import django.utils.timezone import ...
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 1157, 319, 33160, 12, 486, 12, 1433, 5534, 25, 4349, 198, 198, 11748, 4818, 8079, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 121...
1.525104
71,245
'''Test service module ''' # Copyright 2019 mickybart # 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...
[ 7061, 6, 14402, 2139, 8265, 198, 7061, 6, 198, 198, 2, 15069, 13130, 285, 17479, 16575, 198, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, ...
3.277612
335
import re from sensors.sensor import Sensor, SensorSchema from marshmallow import fields
[ 11748, 302, 198, 6738, 15736, 13, 82, 22854, 1330, 35367, 11, 35367, 27054, 2611, 198, 6738, 22397, 42725, 1330, 7032, 628 ]
4.285714
21
# -*- coding: utf-8 -*- """Rule definitions Rules are the core of the system. They express specifically what we want to happen as data is processed. The RuleEngine runs in a slightly modified version of the OPS5 model, but Rules generally follow. """ from weakref import proxy from .memory import WorkingMemory class...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 31929, 17336, 198, 198, 37766, 389, 262, 4755, 286, 262, 1080, 13, 1119, 4911, 5734, 644, 356, 765, 198, 1462, 1645, 355, 1366, 318, 13686, 13, 220, 383, 14330, ...
2.901294
618
from .raw_update_handler import RawUpdateHandler from .stream_ended_handler import StreamEndedHandler
[ 6738, 764, 1831, 62, 19119, 62, 30281, 1330, 16089, 10260, 25060, 198, 6738, 764, 5532, 62, 1631, 62, 30281, 1330, 13860, 12915, 276, 25060, 628 ]
4.12
25
# Copyright 2015 Tesora Inc. # 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 a...
[ 2, 15069, 1853, 10696, 5799, 3457, 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.493243
296
#!/usr/bin/env python import os from os import path from django.conf import settings from django.conf import settings from django.http import HttpResponse from PIL import Image, ImageFilter, ImageDraw, ImageFont, ImageOps from localground.apps.lib.helpers.units import Units from django.contrib.gis.geos import Point, Li...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 6738, 28686, 1330, 3108, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, ...
2.49537
648
# Copyright (c) 2010 by Cisco Systems, Inc. """ Report duplicate actions: same action in same workding dir. """ import getopt import sys from instmakelib import instmake_log as LOG def make_key(dir, cmdline): """Make a single string, combining multiple fields.""" return dir + "|" + cmdline def report_duplica...
[ 2, 15069, 357, 66, 8, 3050, 416, 28289, 11998, 11, 3457, 13, 198, 37811, 198, 19100, 23418, 4028, 25, 976, 2223, 287, 976, 670, 12083, 26672, 13, 198, 37811, 198, 198, 11748, 651, 8738, 198, 11748, 25064, 198, 6738, 916, 15883, 8019, ...
2.367742
465
""" Port of jUnitPerf to Python ************************************** * Ported to Python by Grig Gheorghiu * ************************************** """ from threading import Thread
[ 37811, 198, 13924, 286, 474, 26453, 5990, 69, 284, 11361, 198, 41906, 2466, 1174, 198, 1635, 4347, 276, 284, 11361, 416, 1902, 328, 402, 258, 273, 456, 16115, 1635, 198, 41906, 2466, 1174, 198, 37811, 198, 198, 6738, 4704, 278, 1330, ...
4.108696
46
# initial based on FreeCAD 0.17dev #last edit: 2019-08 SourceFolder=[ ("Base","Foundamental classes for FreeCAD", """import as FreeCAD in Python, see detailed description in later section"""), ("App","nonGUI code: Document, Property and DocumentObject", """import as FreeCAD in Python, see detailed description in late...
[ 2, 4238, 1912, 319, 3232, 34, 2885, 657, 13, 1558, 7959, 198, 2, 12957, 4370, 25, 13130, 12, 2919, 198, 7416, 41092, 41888, 198, 198, 7203, 14881, 2430, 21077, 6860, 6097, 329, 3232, 34, 2885, 1600, 198, 37811, 11748, 355, 3232, 34, ...
3.607945
579
# This file defines messages used by the Astron "Client Protocol" # See https://astron.github.io/astron/en/master/10-client.html. CLIENT_HELLO = 1 # Sent to handshake the protocol CLIENT_HELLO_RESP = 2 # CLIENT_DISCONNECT = 3 # Sent when client is leaving. CLIENT_EJECT = 4 # Received when server is booting ...
[ 2, 770, 2393, 15738, 6218, 973, 416, 262, 25398, 366, 11792, 20497, 1, 198, 2, 4091, 3740, 1378, 459, 1313, 13, 12567, 13, 952, 14, 459, 1313, 14, 268, 14, 9866, 14, 940, 12, 16366, 13, 6494, 13, 198, 198, 5097, 28495, 62, 13909, ...
3.021956
501
from django.shortcuts import render from django.http import HttpResponse,HttpResponseRedirect from django.views.generic import View from .forms import LoginForm,RegisterForm from .models import List from django.views.decorators.csrf import csrf_exempt from django.contrib.auth import login,logout,authenticate from djang...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 43481, 31077, 7738, 1060, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 3582, 198, 6738, 764, 23914, 1330, 23093, 847...
3.420168
119
from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout from PyQt5.QtGui import QColor, QPainter from PyQt5.QtCore import Qt if __name__ == '__main__': import sys app = QApplication(sys.argv) w = MyWidget() w.show() sys.exit(app.exec_())
[ 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 23416, 11, 1195, 38300, 11, 1195, 53, 14253, 32517, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 8205, 72, 1330, 1195, 10258, 11, 1195, 38490, 353, 198, 6738, 9485, ...
2.318966
116
# coding: utf8 import pydot from .base import Graph class Pipeline(Graph): """Represents a pipeline diagram. `nodes` is a dictionary of nodes `name` -> `shape`. `edges` is a list of edges, tuples of the form `(name, name, label)`. `**kwargs` is a list of args passed to `pydot` directly. >>> Pi...
[ 2, 19617, 25, 3384, 69, 23, 198, 198, 11748, 279, 5173, 313, 198, 198, 6738, 764, 8692, 1330, 29681, 628, 198, 4871, 37709, 7, 37065, 2599, 198, 220, 220, 220, 37227, 6207, 6629, 257, 11523, 16362, 13, 628, 220, 220, 220, 4600, 77, ...
2.258929
224
# Generated by Django 3.0.9 on 2020-09-03 10:45 from django.db import migrations, models from eth_abi.exceptions import DecodingError from web3.exceptions import BadFunctionCallOutput from gnosis.eth import EthereumClientProvider
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 24, 319, 12131, 12, 2931, 12, 3070, 838, 25, 2231, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 198, 6738, 4555, 62, 17914, 13, 1069, 11755, 1330, 4280, 7656, ...
3.405797
69
from Server.utils.enums import MSG_FROM_MIRROR_KEYS from Server.utils.enums import MSG_FROM_KINECT_KEYS from Server.utils.enums import MSG_TO_MIRROR_KEYS from amqpstorm import Connection import configparser import queue import json from datetime import datetime # The format in which messages are shared accross the ...
[ 6738, 9652, 13, 26791, 13, 268, 5700, 1330, 49064, 62, 10913, 2662, 62, 44, 4663, 16411, 62, 7336, 16309, 198, 6738, 9652, 13, 26791, 13, 268, 5700, 1330, 49064, 62, 10913, 2662, 62, 42, 1268, 9782, 62, 7336, 16309, 198, 6738, 9652, ...
3.421384
159
r""" Symmetric Functions - :class:`Introduction to Symmetric Functions <sage.combinat.sf.sf.SymmetricFunctions>` - :ref:`sage.combinat.sf.sfa` - :ref:`sage.combinat.sf.sf` - :ref:`sage.combinat.sf.classical` - :ref:`sage.combinat.sf.schur` - :ref:`sage.combinat.sf.monomial` - :ref:`sage.combinat.sf.multiplicative` - ...
[ 81, 37811, 198, 13940, 3020, 19482, 40480, 198, 198, 12, 1058, 4871, 25, 63, 21906, 284, 1632, 3020, 19482, 40480, 1279, 82, 496, 13, 785, 8800, 265, 13, 28202, 13, 28202, 13, 13940, 3020, 19482, 24629, 2733, 29, 63, 198, 198, 12, 1...
2.101167
771
#!/usr/bin/python """ ADE Web API Copyright (C) 2011-2015 "Sébastien Celles" <s.celles@gmail.com> 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 Foundation, either version 3 of the License...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 37811, 198, 220, 220, 220, 5984, 36, 5313, 7824, 628, 220, 220, 220, 15069, 357, 34, 8, 2813, 12, 4626, 366, 50, 2634, 65, 459, 2013, 12440, 274, 1, 1279, 82, 13, 3846, 274, 31, 14...
2.527102
4,151
# automatically generated by the FlatBuffers compiler, do not modify # namespace: FBOutput import tdw.flatbuffers
[ 2, 6338, 7560, 416, 262, 21939, 36474, 364, 17050, 11, 466, 407, 13096, 201, 198, 201, 198, 2, 25745, 25, 13186, 26410, 201, 198, 201, 198, 11748, 41560, 86, 13, 38568, 36873, 364, 201, 198 ]
3.457143
35
__version__ = 0.2 import sys if sys.argv[0] != 'setup.py': from ec2_helper import * from cloudwatch_helper import * from elb_helper import * from model import * from metric_queue import * from executor import * try: from sockets import * except Exception: pass
[ 834, 9641, 834, 796, 657, 13, 17, 198, 198, 11748, 25064, 198, 198, 361, 25064, 13, 853, 85, 58, 15, 60, 14512, 705, 40406, 13, 9078, 10354, 628, 220, 220, 220, 422, 9940, 17, 62, 2978, 525, 1330, 1635, 198, 220, 220, 220, 422, ...
2.504
125
# -*- coding: utf-8 -*- """ Created on Mon Apr 22 09:45:25 2019 @author: Guo """ import socket import sys import os import numpy as np import math expected_frame = 0 ##创建 socket 对象 server_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) server_sock.bind(("127.0.0.1", 8888)) file_s...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 2892, 2758, 2534, 7769, 25, 2231, 25, 1495, 13130, 201, 198, 201, 198, 31, 9800, 25, 1962, 78, 201, 198, 37811, 201, 198, 201, 198, ...
2.055556
378
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..utils import ( js_to_json, remove_end, )
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 33918, 198, 11748, 302, 198, 6738, 764, 11321, 1330, 14151, 11627, 40450, 198, 6738, 11485, 26...
2.69697
66
import numpy as np from scipy.stats import rankdata import itertools from PyEMD import EMD import nolds """Complete package for calculating any kind of multiscale entropy features """ """Coarse graining methods - Normal - Moving average (X) - Volatility series (X) - Moving average volatility series (X) - EMD- Coarse...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 34242, 1330, 4279, 7890, 198, 11748, 340, 861, 10141, 198, 6738, 9485, 3620, 35, 1330, 412, 12740, 198, 11748, 645, 335, 82, 198, 198, 37811, 20988, 5301, 329, 26019, 597, 16...
2.213065
3,980
''' Map PDBe residue to SIFTS residue ''' #PDBDIR = "pdbtest" #XMLDIR = "xmltest" PDBDIR = "pdb" #PDBDIR = "../ligandNet/2013_biounits" XMLDIR = "xml" PAIRFILE = "pair.txt" SAMPLESIZE = 3000
[ 7061, 6, 198, 220, 220, 220, 9347, 14340, 3856, 35186, 284, 311, 5064, 4694, 35186, 198, 7061, 6, 198, 198, 2, 5760, 14529, 4663, 796, 366, 79, 9945, 9288, 1, 198, 2, 55, 5805, 34720, 796, 366, 87, 76, 2528, 395, 1, 198, 5760, 1...
2.0625
96
from .backbone import Backbone from .box_generator import SCRLBoxGenerator from .heads import SingleLayerLinearHead, TwoLayerLinearHead
[ 6738, 764, 1891, 15992, 1330, 5157, 15992, 198, 6738, 764, 3524, 62, 8612, 1352, 1330, 6374, 7836, 14253, 8645, 1352, 198, 6738, 764, 16600, 1330, 14206, 49925, 14993, 451, 13847, 11, 4930, 49925, 14993, 451, 13847, 198 ]
3.675676
37
#!/usr/bin/env python u""" test_font_files.py """ import os import pytest import warnings import matplotlib.font_manager import matplotlib.pyplot as plt
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 84, 37811, 198, 9288, 62, 10331, 62, 16624, 13, 9078, 198, 37811, 198, 11748, 28686, 198, 11748, 12972, 9288, 198, 11748, 14601, 198, 11748, 2603, 29487, 8019, 13, 10331, 62, 37153, 198,...
2.942308
52