content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
''' undecorate_for_profiling.py Explore all the python functions in the user-specified directory, and remove decoration @profile from appropriate functions ''' import os if __name__ == '__main__': import argparse parser = argparse.ArgumentParser() parser.add_argument('rootdir') args = parser.parse_ar...
[ 7061, 6, 198, 917, 721, 16262, 62, 1640, 62, 5577, 4386, 13, 9078, 198, 198, 35433, 477, 262, 21015, 5499, 287, 262, 2836, 12, 23599, 8619, 11, 198, 392, 4781, 42050, 2488, 13317, 422, 5035, 5499, 198, 7061, 6, 198, 11748, 28686, 62...
3.135135
111
## classification.py __all__ = ["Lazy",] from .lazy import LazyClassifier from .utils import * from sklearn.model_selection import train_test_split import pandas
[ 2235, 17923, 13, 9078, 198, 198, 834, 439, 834, 796, 14631, 43, 12582, 1600, 60, 198, 198, 6738, 764, 75, 12582, 1330, 406, 12582, 9487, 7483, 220, 198, 6738, 764, 26791, 1330, 1635, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330,...
2.54321
81
# Python import logging from os import path # Abstract from genie.abstract import Lookup # Parser from genie.libs import parser from genie.metaparser.util.exceptions import SchemaEmptyParserError # unicon from unicon.eal.dialogs import Statement, Dialog log = logging.getLogger(__name__) def save_device_informatio...
[ 2, 11361, 198, 11748, 18931, 198, 6738, 28686, 1330, 3108, 198, 198, 2, 27741, 198, 6738, 2429, 494, 13, 397, 8709, 1330, 6803, 929, 198, 198, 2, 23042, 263, 198, 6738, 2429, 494, 13, 8019, 82, 1330, 30751, 198, 6738, 2429, 494, 13,...
2.316143
1,338
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.core.validators
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 7295, 13, 1...
2.978261
46
import unittest from unittest.mock import ( AsyncMock, call, ) from uuid import ( UUID, ) from minos.saga import ( SagaExecution, SagaExecutionRepository, ) from tests.utils import ( ADD_ORDER, SagaTestCase, ) if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 357, 198, 220, 220, 220, 1081, 13361, 44, 735, 11, 198, 220, 220, 220, 869, 11, 198, 8, 198, 6738, 334, 27112, 1330, 357, 198, 220, 220, 220, 471, 27586, 11, 198...
2.301587
126
import numpy as np from scipy.integrate import solve_ivp import matplotlib.pyplot as plt
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 18908, 4873, 1330, 8494, 62, 452, 79, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198 ]
2.966667
30
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function """ sample using "by" keyword """ import click # import matplotlib # matplotlib.use("Agg") # import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.cm as cm import numpy as np import pandas as pd from windrose ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 37811, 198, 39873, 1262, 366, 1525, 1, 21179, 198, 37811,...
2.692552
631
import numpy as np import os, sys sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) import utility from epipolar import EPIPOLAR import cv2 if __name__ == '__main__': from option import args import pickle with open('/home/sap/frcnn_keras/mv_train_two_reid.pickle', 'rb') as f: ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 11, 25064, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 35514, 19...
2.167614
704
__author__ = 'godq' import os import sys from dagflow.flow_operation import send_start_flow_msg as sdk_send_start_flow_msg, \ send_finish_step_msg as sdk_send_finish_step_msg from dagflow.loader import get_DagRepo_Object dag_repo = get_DagRepo_Object()
[ 834, 9800, 834, 796, 705, 25344, 80, 6, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 48924, 11125, 13, 11125, 62, 27184, 1330, 3758, 62, 9688, 62, 11125, 62, 19662, 355, 264, 34388, 62, 21280, 62, 9688, 62, 11125, 62, 19662, ...
2.54717
106
from common import compare_array from prepare_hash import run_binary_hasher import psycopg2 import tempfile from psycopg2 import sql TABLE_NAME='runs' TABLE_TEXT_MATCHES= 'text_matches' COLUMNS=('id', 'content', 'ASTHash') COLUMNS_MATCH=('first_runs_id', 'second_runs_id', 'match_AST_v1') PROBLEM_ID=3 COUNT_LIMIT = 10...
[ 6738, 2219, 1330, 8996, 62, 18747, 198, 6738, 8335, 62, 17831, 1330, 1057, 62, 39491, 62, 10134, 372, 198, 11748, 17331, 22163, 70, 17, 198, 11748, 20218, 7753, 198, 6738, 17331, 22163, 70, 17, 1330, 44161, 628, 198, 38148, 62, 20608, ...
2.596774
124
"""Define a custom static storage class.""" from django.contrib.staticfiles.storage import ManifestStaticFilesStorage class RyrManifestStaticFilesStorage(ManifestStaticFilesStorage): """Define a custom static storage class.""" manifest_strict = False
[ 37811, 7469, 500, 257, 2183, 9037, 6143, 1398, 526, 15931, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 12708, 16624, 13, 35350, 1330, 36757, 45442, 25876, 31425, 628, 198, 4871, 371, 2417, 5124, 8409, 45442, 25876, 31425, 7, 5124, 8409, ...
3.797101
69
# Create your tests here. import json from django.contrib.auth.models import User from django.test import TestCase, Client from .models import Todo from django.utils import timezone import datetime class TestTodosModel(TestCase): """测试数据库model""" class TestTodosViews(TestCase): """测试视图函数""" # TODO tes...
[ 2, 13610, 534, 5254, 994, 13, 198, 11748, 33918, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 11, 20985, 198, 6738, 764, 27530, 1330, 309, 24313, ...
1.741282
889
import bisect from scipy.spatial.distance import euclidean from common import (NO_QUADRANT, NORTH_EAST, NORTH_WEST, SOUTH_EAST, SOUTH_WEST, Boundary, Point, belongs, compute_knn, intersects, quadrants) from node import TreeNode # Constants for tuple access optimization BOUNDAR...
[ 11748, 47457, 478, 198, 198, 6738, 629, 541, 88, 13, 2777, 34961, 13, 30246, 1330, 304, 36616, 485, 272, 198, 198, 6738, 2219, 1330, 357, 15285, 62, 10917, 2885, 32506, 11, 25273, 4221, 62, 36, 11262, 11, 25273, 4221, 62, 54, 6465, ...
2.397163
141
# N, a, b, c, d = list(map(int, input().split())) # # # def jc(x): # r = 1 # for i in range(1, x + 1): # r *= i # return r # # res = int(jc(N * N) / (jc(a) * jc(b) * jc(c) * jc(d))) % # print(res) from collections import defaultdict n = int(input()) edges = defaultdict(list) for _ in range(n - 1): u, v = lis...
[ 2, 399, 11, 257, 11, 275, 11, 269, 11, 288, 796, 1351, 7, 8899, 7, 600, 11, 5128, 22446, 35312, 3419, 4008, 198, 2, 198, 2, 198, 2, 825, 474, 66, 7, 87, 2599, 198, 2, 220, 197, 81, 796, 352, 198, 2, 220, 197, 1640, 1312, 2...
2.046875
192
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright (c) 2002-2015 "Neo Technology," # Network Engine for Objects in Lund AB [http://neotechnology.com] # # This file is part of Neo4j. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Li...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 357, 66, 8, 6244, 12, 4626, 366, 8199, 78, 8987, 553, 198, 2, 7311, 7117, 329, 35832, 287, 33609, 95...
3.395415
349
import tensorflow as tf class Trainer(object): """ Object representing a TensorFlow trainer. """
[ 11748, 11192, 273, 11125, 355, 48700, 628, 198, 4871, 31924, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 9515, 10200, 257, 309, 22854, 37535, 21997, 13, 198, 220, 220, 220, 37227, 198 ]
3.083333
36
from dpconverge.data_set import DataSet import numpy as np import pandas as pd from matplotlib import pyplot from sklearn.datasets.samples_generator import make_blobs n_features = 2 points_per_feature = 100 centers = [[2, 1.35], [2, 2], [2, 3], [2.5, 1.5], [2.5, 2], [2.5, 2.5]] blob1, y1 = make_blobs( n_samples=1...
[ 6738, 288, 79, 1102, 332, 469, 13, 7890, 62, 2617, 1330, 6060, 7248, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 198, 6738, 1341, 35720, 13, 19608, 292, 1...
2.083714
1,971
from vit_pytorch.vit import ViT from vit_pytorch.vit3d import ViT3d from vit_pytorch.dino import Dino
[ 6738, 9090, 62, 9078, 13165, 354, 13, 85, 270, 1330, 16049, 51, 198, 6738, 9090, 62, 9078, 13165, 354, 13, 85, 270, 18, 67, 1330, 16049, 51, 18, 67, 198, 6738, 9090, 62, 9078, 13165, 354, 13, 67, 2879, 1330, 39430, 198 ]
2.428571
42
# Copyright Pincer 2021-Present # Full MIT License can be found in `LICENSE` at the project root. from __future__ import annotations from dataclasses import dataclass from typing import TYPE_CHECKING from ...utils.api_object import APIObject from ...utils.types import MISSING if TYPE_CHECKING: from typing impor...
[ 2, 15069, 350, 1939, 263, 33448, 12, 34695, 198, 2, 6462, 17168, 13789, 460, 307, 1043, 287, 4600, 43, 2149, 24290, 63, 379, 262, 1628, 6808, 13, 198, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 4818, 330, 28958, 1330, ...
2.669189
925
#!/usr/bin/env python # coding=utf-8 """ """ import click import os from collections import defaultdict from hundo.fasta import read_fasta, format_fasta_record @click.group() @click.pass_context def cli(obj): """ """ @cli.command("tax-to-newick") @click.argument("tax", type=click.File("r")) @click.argument(...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 37811, 198, 37811, 198, 11748, 3904, 198, 11748, 28686, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 289, 41204, 13, 7217, 64, 1330, 1100, 62, 7217...
2.331541
558
# -*- coding: utf-8 -*- """Abstract base classes. These are necessary to avoid circular imports between core.py and fields.py. """ import copy class FieldABC(object): """Abstract base class from which all Field classes inherit. """ parent = None name = None class SchemaABC(object): """Abstract...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 23839, 2779, 6097, 13, 198, 198, 4711, 389, 3306, 284, 3368, 18620, 17944, 1022, 4755, 13, 9078, 290, 7032, 13, 9078, 13, 198, 37811, 198, 11748, 4866, 628, 198, ...
3.306306
111
import torch from torchvision import transforms import os import cv2 import time import numpy as np # alphabetfrom .keys import alphabet import params from torch.autograd import Variable from PIL import Image from utils import strLabelConverter,resizeNormalize converter = strLabelConverter(params.alphabet) # converter...
[ 11748, 28034, 198, 6738, 28034, 10178, 1330, 31408, 198, 11748, 28686, 198, 11748, 269, 85, 17, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 2, 24830, 6738, 764, 13083, 1330, 24830, 198, 11748, 42287, 198, 6738, 28034, 13, ...
3.594059
101
peers = { ("54.95.16.98", "hxdabfd26d6c01038acae8081580fcce86c802fd01"), ("54.184.241.211", "hx016401bba6a5474e08c925b6390e1ef1d8e0adc9"), ("35.170.9.187", "hx9fa9d224306b0722099d30471b3c2306421aead7"), ("65.108.47.101", "hx54d6f19c3d16b2ef23c09c885ca1ba776aaa80e2"), ("13.91.36.115", "hxc5e0b88cb909...
[ 431, 364, 796, 1391, 198, 220, 220, 220, 5855, 4051, 13, 3865, 13, 1433, 13, 4089, 1600, 366, 71, 24954, 397, 16344, 2075, 67, 21, 66, 20943, 2548, 330, 3609, 28362, 1314, 1795, 16072, 344, 4521, 66, 30863, 16344, 486, 12340, 198, 2...
1.676198
3,777
import numpy as np import torch import torch.nn.functional as F import torch.nn as nn
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 13, 20471, 355, 299, 77, 628, 628 ]
3.296296
27
"""RealNVP bijector.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np ConditionalBijector = tf.contrib.distributions.bijectors.ConditionalBijector __all__ = [ "RealNVPBijector", ] def checkerboard(shape, p...
[ 37811, 15633, 45, 8859, 3182, 752, 273, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 11192, 273, 111...
2.137894
1,842
# politician/views.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404, render from django.contrib import messages from django.contrib.messages import get_messages from django.core.urlresolvers import reverse from ...
[ 2, 14971, 14, 33571, 13, 9078, 198, 2, 347, 2909, 284, 345, 416, 775, 19175, 13, 1355, 922, 13, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 7738, 106...
2.816822
1,070
import sys sys.path.insert(0, '..') import updates_msbm_vi_iter import updates_msbm_vi import updates_msbm2_vi_iter import updates_msbm2_vi import os import util import init_msbm_vi as im import numpy as np import numpy.random as npr import pdb # ########################################################### # ########...
[ 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 705, 492, 11537, 198, 11748, 5992, 62, 907, 20475, 62, 8903, 62, 2676, 198, 11748, 5992, 62, 907, 20475, 62, 8903, 198, 11748, 5992, 62, 907, 20475, 17, 62, 8903, 62, 2676, ...
2.724206
504
import networkx as nx
[ 11748, 3127, 87, 355, 299, 87, 628 ]
3.285714
7
# -*- coding:utf8 -*- r''' TODO: remove all tensorflow graph construction in `build_op_info` ''' import os import numpy as np import idx2numpy as idx2np import tensorflow as tf from utensor_cgen.ir import OperationInfo, TensorInfo from utensor_cgen.ir.converter import (AttrValueConverter, DataTypeConverter, ...
[ 2, 532, 9, 12, 19617, 25, 40477, 23, 532, 9, 12, 198, 81, 7061, 6, 198, 51, 3727, 46, 25, 4781, 477, 11192, 273, 11125, 4823, 5103, 287, 4600, 11249, 62, 404, 62, 10951, 63, 198, 7061, 6, 198, 11748, 28686, 198, 198, 11748, 299,...
2.966412
655
#!/usr/bin/env python """Unit tests for WSGI HTTP Basic Auth handler NERC DataGrid Project """ __author__ = "P J Kershaw" __date__ = "13/10/09" __copyright__ = "(C) 2009 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ = "Philip.Kershaw@stfc.ac.uk" __...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 26453, 5254, 329, 25290, 18878, 14626, 14392, 26828, 21360, 198, 198, 21479, 34, 6060, 41339, 4935, 198, 37811, 198, 834, 9800, 834, 796, 366, 47, 449, 49521, 26615, 1, 198, 834, ...
2.941748
309
"""methods for liners and domes""" import numpy as np from tankoh2 import pychain from tankoh2.service import log from tankoh2.exception import Tankoh2Error from tankoh2.utilities import updateName, copyAsJson # ######################################################################################### # Create Line...
[ 37811, 24396, 82, 329, 9493, 364, 290, 2401, 274, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 6738, 6873, 1219, 17, 1330, 12972, 7983, 198, 6738, 6873, 1219, 17, 13, 15271, 1330, 2604, 198, 6738, 6873, 1219, 17, 13, 1069...
2.657299
1,281
import syft as sy import torch as th from grid.client import GridClient
[ 11748, 827, 701, 355, 827, 198, 11748, 28034, 355, 294, 198, 198, 6738, 10706, 13, 16366, 1330, 24846, 11792, 628 ]
3.7
20
import unittest import pytest import tensorkit as tk from tensorkit import tensor as T from tensorkit.arg_check import * from tests.helper import *
[ 11748, 555, 715, 395, 198, 198, 11748, 12972, 9288, 198, 198, 11748, 11192, 967, 270, 355, 256, 74, 198, 6738, 11192, 967, 270, 1330, 11192, 273, 355, 309, 198, 6738, 11192, 967, 270, 13, 853, 62, 9122, 1330, 1635, 198, 6738, 5254, ...
3.145833
48
#from stockfighter import Stockfighter import os, time # sf = Stockfighter() # # level = sf.levels['chock_a_block'] # info = level.start() # print(info) # # sf = Stockfighter() # print(sf.heartbeat()) # # venue = sf.venues['PVIEX'] # # stock = venue.stocks['SOF'] # for stock in venue.stocks: # print(stock) # # ORDE...
[ 2, 6738, 4283, 24733, 1330, 10500, 24733, 198, 11748, 28686, 11, 640, 198, 198, 2, 264, 69, 796, 10500, 24733, 3419, 198, 2, 198, 2, 1241, 796, 264, 69, 13, 46170, 17816, 354, 735, 62, 64, 62, 9967, 20520, 198, 2, 7508, 796, 1241,...
2.29563
389
######################################################################## # # License: BSD # Created: October 11, 2013 # Author: Francesc Alted # ######################################################################## """ Implementation of an out of core matrix-matrix multiplication for PyTables. ""...
[ 29113, 29113, 7804, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 13789, 25, 347, 10305, 198, 2, 220, 220, 220, 220, 220, 220, 15622, 25, 3267, 1367, 11, 2211, 198, 2, 220, 220, 220, 220, 220, 220, 6434, 25, 220, 27025, 66, 978,...
2.198227
1,579
## Helper functions to clean up Clubes de Ciencia notebooks ## 5 July 2019 EHU import xarray as xr import pandas as pd import numpy as np from oggm import utils def ice_to_freshwater(icevol, rho_ice=900, rho_water=1000): """Cleanly convert volume of glacial ice (km3) to equivalent volume fresh water (liter). ...
[ 2235, 5053, 525, 5499, 284, 3424, 510, 6289, 274, 390, 327, 2013, 33743, 43935, 198, 2235, 642, 2901, 13130, 220, 412, 39, 52, 198, 11748, 2124, 18747, 355, 2124, 81, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, ...
2.283563
1,527
# -*- coding: utf-8 -*- import re import config import surllib # Map of children => urlPrefix # 'Andrea 0A' => '/parent/1234/Andrea/' _children = None def getChildren(): '''Returns of list of "available" children in the system''' global _children if not _children: _children = dict() se...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 302, 198, 198, 11748, 4566, 198, 11748, 969, 297, 571, 198, 198, 2, 9347, 286, 1751, 5218, 19016, 36698, 844, 198, 2, 705, 1870, 21468, 657, 32, 6, 5218, ...
2.073501
517
""" Decobrir se um numero é impar oou par """ print(25*"-") while True: numero = int(input("Digite um numero: ")) if (numero % 2) == 0: print(f"Numero digitado, {numero} é PAR: ") elif(numero % 2) != 0: print(f"Numero digitado, {numero} é IMPAR: ") print(25*"-")
[ 37811, 198, 10707, 672, 29283, 384, 23781, 997, 3529, 38251, 848, 283, 267, 280, 1582, 198, 37811, 198, 198, 4798, 7, 1495, 9, 26793, 4943, 198, 4514, 6407, 25, 198, 220, 220, 220, 997, 3529, 796, 493, 7, 15414, 7203, 19511, 578, 23...
2.106383
141
import json import numpy as np import xgboost as xgb import testing as tm import pytest try: import matplotlib matplotlib.use('Agg') from matplotlib.axes import Axes from graphviz import Source except ImportError: pass pytestmark = pytest.mark.skipif(**tm.no_multiple(tm.no_matplotlib(), ...
[ 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2124, 70, 39521, 355, 2124, 22296, 198, 11748, 4856, 355, 256, 76, 198, 198, 11748, 12972, 9288, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 2603, 29487, 8019, 198, 220, ...
2.1875
192
# -*- coding: utf-8 -*- import unittest import six import tensorflow as tf from tfsnippet.components import DictMapper, Linear, Dense from tests.helper import TestCase if __name__ == '__main__': unittest.main()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 555, 715, 395, 198, 198, 11748, 2237, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 256, 9501, 77, 3974, 316, 13, 5589, 3906, 1330, 360, 713, 44, 1...
2.650602
83
from flask import Flask from flask_restful import Resource from flask_restful import Api import numpy as np import cv2 import werkzeug from flask_restful import reqparse parser = reqparse.RequestParser() parser.add_argument("file", type = werkzeug.datastructures.FileStorage, location = "files") app = Flask(__nam...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 198, 6738, 42903, 62, 2118, 913, 1330, 5949, 72, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 628, 198, 11748, 266, 9587, 2736, 1018, 198, 67...
2.987097
155
import logging logger = logging.getLogger() logger.setLevel(logging.INFO) import boto3 #Evaluate Risk Level #Return True to raise alert if risk level exceeds threshold #Return False to Archive finding
[ 11748, 18931, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 3419, 198, 6404, 1362, 13, 2617, 4971, 7, 6404, 2667, 13, 10778, 8, 198, 198, 11748, 275, 2069, 18, 198, 198, 2, 36, 2100, 4985, 19602, 5684, 198, 2, 13615, 6407, 284...
3.5
58
#Pluginname="GLS Tracking (Android)" #Type=App import os import json import tempfile
[ 2, 37233, 3672, 2625, 38, 6561, 37169, 357, 25934, 16725, 201, 198, 2, 6030, 28, 4677, 201, 198, 201, 198, 11748, 28686, 201, 198, 11748, 33918, 201, 198, 11748, 20218, 7753, 201, 198, 201 ]
2.735294
34
# Module for UTF-7 encoding from base64 import b64encode from utf16 import utf16_encode, UTF16_MAXIMUM_CODEPOINT DIRECT_CHARACTERS = '\'(),-./:?' UTF7_MAXIMUM_CODEPOINT = UTF16_MAXIMUM_CODEPOINT
[ 2, 19937, 329, 41002, 12, 22, 21004, 198, 198, 6738, 2779, 2414, 1330, 275, 2414, 268, 8189, 198, 198, 6738, 3384, 69, 1433, 1330, 3384, 69, 1433, 62, 268, 8189, 11, 41002, 1433, 62, 22921, 3955, 5883, 62, 34, 3727, 8905, 46, 12394,...
2.313953
86
# -*- coding: utf-8 -*- """Command line execution listener module of ping-me""" from __future__ import print_function from dateutil import parser import argparse import datetime import getpass import hashlib import os import parsedatetime import sys import time import ping_me.authenticate import ping_me.engine home =...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 21575, 1627, 9706, 24783, 8265, 286, 29400, 12, 1326, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 3128, 22602, 1330, 30751, 198, 11748, 18...
2.091951
3,317
"""Test workflow of forecasting model.""" import sys sys.path.append("../Forecasting") import model def test_forecast(): """Optimize an ARIMA model and predict a few data points.""" START = 5 END = 10 print("Forecasting...") f = model.Forecast("../Forecasting/blockchain.csv") f.optimizeARIMA(...
[ 37811, 14402, 30798, 286, 41164, 2746, 526, 15931, 198, 11748, 25064, 198, 198, 17597, 13, 6978, 13, 33295, 7203, 40720, 16351, 19913, 4943, 198, 11748, 2746, 628, 198, 4299, 1332, 62, 754, 2701, 33529, 198, 220, 220, 220, 37227, 27871, ...
2.652695
167
# prototxt_basic # ----------------------------------------------------------------
[ 2, 1237, 313, 742, 62, 35487, 628, 198, 198, 2, 16529, 628, 628, 198 ]
6.5
14
""" Tests for checking gregorian calendar date. Astronomical year contains 365,2425 days: 365 for usual year and 366 for leap Leap years: 0.2425 is 97 / 400 or 1/4 - 1/100 + 1/400 It means: - each 4th year is leap, except 3 of 4 round dates - 2004, 2008, 2012 and etc are leap - 2000, 2400, 2800 and etc. is leap - 21...
[ 37811, 198, 51, 3558, 329, 10627, 308, 2301, 22618, 11845, 3128, 13, 198, 198, 33751, 1313, 22545, 614, 4909, 21268, 11, 1731, 1495, 1528, 25, 198, 24760, 329, 6678, 614, 290, 44856, 329, 16470, 198, 198, 3123, 499, 812, 25, 198, 15, ...
2.484509
1,517
import math a = int(input("a = ")) b = int(input("b = ")) c = a + b d = a - b e = a * b f = a / b g = a % b h = math.log10(a) i = a**b print(c,d,e,f,g,h,i)
[ 11748, 10688, 198, 198, 64, 796, 493, 7, 15414, 7203, 64, 796, 366, 4008, 198, 65, 796, 493, 7, 15414, 7203, 65, 796, 366, 4008, 198, 198, 66, 796, 257, 1343, 275, 198, 67, 796, 257, 532, 275, 198, 68, 796, 257, 1635, 275, 198, ...
1.747253
91
# -*- coding: utf-8 -*- # !/usr/bin/env python3
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 18 ]
1.958333
24
""" This is a helper script meant to generate a working config.py file from the config template. """ from getpass import getpass import json import os.path from random import choice import string import sys from urllib2 import urlopen import argparse el = string.ascii_letters + string.digits rand_str = lambda n: ''...
[ 37811, 198, 1212, 318, 257, 31904, 4226, 4001, 284, 7716, 257, 198, 16090, 4566, 13, 9078, 2393, 422, 262, 4566, 11055, 13, 198, 37811, 198, 198, 6738, 651, 6603, 1330, 651, 6603, 198, 11748, 33918, 198, 11748, 28686, 13, 6978, 198, 6...
3.256
125
import time import aiohttp import traceback import discord import textwrap import io import json from dhooks import Webhook from utils.chat_formatting import pagify from contextlib import redirect_stdout from copy import copy from typing import Union from utils import repo, default, http, dataIO from discord.ext impor...
[ 11748, 640, 198, 11748, 257, 952, 4023, 198, 11748, 12854, 1891, 198, 11748, 36446, 198, 11748, 2420, 37150, 198, 11748, 33245, 198, 11748, 33918, 198, 198, 6738, 288, 25480, 82, 1330, 5313, 25480, 198, 6738, 3384, 4487, 13, 17006, 62, ...
3.872093
86
''' @Authors: Harrison Leece, James Hribal, Max Fung, Nils Heidenreich @Purpose: Explore 6DOF rocket trajectory, esspecially quaternion rotation Learning resources: https://eater.net/quaternions ''' import numpy as np import oyaml as yaml import math class Rotator: ''' https://en.wikipedia.org/wiki/Quaternio...
[ 7061, 6, 198, 31, 30515, 669, 25, 17281, 5741, 344, 11, 3700, 367, 822, 282, 11, 5436, 376, 2150, 11, 399, 4487, 679, 14029, 260, 488, 198, 31, 30026, 3455, 25, 41401, 718, 18227, 37, 10701, 22942, 11, 3209, 2333, 627, 9205, 295, ...
2.90634
1,388
import Framework.Utils as Utils from Framework.Utils import data_utils from Fremework.Utils.testcase_Utils import pNote class MyActions(object): """" Default __init__ field must be used when using classes for keywords """ def full_name(self, student, first_name= 'first', last_name= 'last', full_name= 'fir...
[ 11748, 25161, 13, 18274, 4487, 355, 7273, 4487, 198, 6738, 25161, 13, 18274, 4487, 1330, 1366, 62, 26791, 198, 6738, 38433, 6433, 13, 18274, 4487, 13, 9288, 7442, 62, 18274, 4487, 1330, 279, 6425, 628, 628, 198, 4871, 2011, 32, 2733, ...
2.367174
591
'''显示结果''' import numpy from helpers.drawer import draw_heatmap def main(): '''入口''' lval = 5.20 rpath = 'heatmap8/avsb' uval = numpy.load('{0}/{1:.2f}U.npy'.format(rpath, lval)) draw_heatmap(uval[0, 0, 0, 0, :, :, 0]) draw_heatmap(uval[1, 1, 1, 1, :, :, 0]) draw_heatmap(uval[1, 0, 0, 1, :...
[ 7061, 6, 23626, 122, 163, 97, 118, 163, 119, 241, 162, 252, 250, 7061, 6, 198, 198, 11748, 299, 32152, 198, 6738, 49385, 13, 19334, 263, 1330, 3197, 62, 25080, 8899, 198, 198, 4299, 1388, 33529, 198, 220, 220, 220, 705, 7061, 17739,...
1.780172
232
import unittest import pytest import sys import os from util4tests import enable_test_logging, run_single_test, log from pykg2tbl import KG2TblService, KGFileSource, KG2EndpointSource, J2SparqlBuilder ALL_TRIPLES_SPARQL = "SELECT * WHERE { ?s ?p ?o. } LIMIT 10" BODC_ENDPOINT = "http://vocab.nerc.ac.uk/sparql/sparql"...
[ 11748, 555, 715, 395, 198, 11748, 12972, 9288, 198, 11748, 25064, 198, 11748, 28686, 198, 6738, 7736, 19, 41989, 1330, 7139, 62, 9288, 62, 6404, 2667, 11, 1057, 62, 29762, 62, 9288, 11, 2604, 198, 198, 6738, 12972, 10025, 17, 83, 2436...
2.461039
154
""" .. _tut-erp: EEG processing and Event Related Potentials (ERPs) ================================================== This tutorial shows how to perform standard ERP analyses in MNE-Python. Most of the material here is covered in other tutorials too, but for convenience the functions and methods most useful for ERP ...
[ 37811, 198, 492, 4808, 83, 315, 12, 263, 79, 25, 198, 198, 6500, 38, 7587, 290, 8558, 19809, 6902, 14817, 357, 1137, 12016, 8, 198, 10052, 4770, 855, 198, 198, 1212, 11808, 2523, 703, 284, 1620, 3210, 13793, 47, 13523, 287, 337, 121...
3.431481
5,254
""" * * Author: Juarez Paulino(coderemite) * Email: juarez.paulino@gmail.com * """ n,k=int(input()),0 s,x,t='',1,input() while k<n: s+=t[k];k+=x;x+=1 print(s)
[ 37811, 198, 1635, 198, 1635, 6434, 25, 220, 12585, 19655, 3362, 2879, 7, 19815, 567, 32937, 8, 198, 1635, 9570, 25, 7544, 19655, 13, 79, 2518, 2879, 31, 14816, 13, 785, 198, 1635, 198, 37227, 198, 77, 11, 74, 28, 600, 7, 15414, 34...
2
82
# -*- coding: utf-8 -*- """Command line interface for Axonius API Client.""" from ....tools import json_dump from ...context import CONTEXT_SETTINGS, click from ...options import AUTH, add_options KEY_NAME = click.option( "--key-name", "-kn", "key_name", help="Key name of file object in [bucket_name] t...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 21575, 1627, 7071, 329, 12176, 261, 3754, 7824, 20985, 526, 15931, 198, 6738, 19424, 31391, 1330, 33918, 62, 39455, 198, 6738, 2644, 22866, 1330, 22904, 13918, 62, ...
2.387826
1,150
from algoanim.array import Array from algoanim.sort import Sort SORT_CLASS = YSlowSort
[ 6738, 435, 2188, 11227, 13, 18747, 1330, 15690, 198, 6738, 435, 2188, 11227, 13, 30619, 1330, 33947, 628, 628, 198, 50, 9863, 62, 31631, 796, 575, 36423, 42758, 198 ]
3.137931
29
from contextlib import contextmanager from io import BytesIO import hashlib from numpy import random import pytest from requests_toolbelt import MultipartEncoder from streaming_form_data import ParseFailedException, StreamingFormDataParser from streaming_form_data.targets import ( BaseTarget, FileTarget, ...
[ 6738, 4732, 8019, 1330, 4732, 37153, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 11748, 12234, 8019, 198, 198, 6738, 299, 32152, 1330, 4738, 198, 11748, 12972, 9288, 198, 6738, 7007, 62, 25981, 37976, 1330, 7854, 541, 433, 27195, 12342...
3.248756
201
#!/usr/bin/python import re import sys import os from subprocess import Popen,PIPE if __name__ == '__main__': push_rules()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 28686, 198, 6738, 850, 14681, 1330, 8099, 268, 11, 47, 4061, 36, 628, 197, 197, 197, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, ...
2.491228
57
import operator try: from collections import Counter except ImportError: from ._counter import Counter from .backend import Backend from ..query import Query
[ 11748, 10088, 198, 28311, 25, 198, 220, 220, 220, 422, 17268, 1330, 15034, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 47540, 24588, 1330, 15034, 198, 198, 6738, 764, 1891, 437, 1330, 5157, 437, 198, 6738, 11485, 22766, 1330,...
3.906977
43
from mayavi import mlab n_mer, n_long = 6, 11 dphi = np.pi / 1000.0 phi = np.arange(0.0, 2 * pi + 0.5 * dphi, dphi) mu = phi * n_mer x = np.cos(mu) * (1 + np.cos(n_long * mu / n_mer) * 0.5) y = np.sin(mu) * (1 + np.cos(n_long * mu / n_mer) * 0.5) z = np.sin(n_long * mu / n_mer) * 0.5 t = np.sin(mu) mlab.plot3d(x, y, z...
[ 6738, 743, 15820, 1330, 285, 23912, 198, 77, 62, 647, 11, 299, 62, 6511, 796, 718, 11, 1367, 198, 67, 34846, 796, 45941, 13, 14415, 1220, 8576, 13, 15, 198, 34846, 796, 45941, 13, 283, 858, 7, 15, 13, 15, 11, 362, 1635, 31028, 1...
1.915789
190
#-*- coding: utf-8 -*- from __future__ import unicode_literals try: from urlparse import urljoin except ImportError: from urllib.parse import urljoin from django.contrib.sites.models import get_current_site
[ 2, 12, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 19016, 29572, 1330, 19016, 22179, 198, 16341, 17267, 12331, ...
2.857143
77
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, with_statement from cuisine import group_check as get from cuisine import group_create as create from cuisine import group_ensure as ensure from cuisine import group_user_add as user_add from cuisine import group_user_check as user_check from c...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 351, 62, 26090, 198, 198, 6738, 33072, 1330, 1448, 62, 9122, 355, 651, 198, 6738, 33072, 1330, 1448, ...
3.67
100
''' Definitions 1. consuming service: is a network service that requires the consumption of additional VNF(s) that pertain to a different service, i.e., providing services. 2. CSC engaged VNFs (w.r.t. the consuming service): are exactly two distinct VNFs. One VNF forwards the traffic to the receiver CSC engaged ...
[ 7061, 6, 220, 201, 198, 7469, 50101, 201, 198, 201, 198, 16, 13, 18587, 2139, 25, 318, 257, 3127, 2139, 326, 4433, 262, 7327, 286, 3224, 569, 21870, 7, 82, 8, 326, 583, 3153, 284, 257, 1180, 2139, 11, 1312, 13, 68, 1539, 4955, 2...
2.701717
1,398
from django.db import models from django.contrib.auth.models import User # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 2, 13610, 534, 4981, 994, 13, 628, 628, 198 ]
3.466667
30
#!/usr/bin/env python3 import sys import os import argparse import re import datetime import subprocess class EXIT(): """ Exit codes from: https://docs.icinga.com/latest/en/pluginapi.html """ OK = 0 WARN = 1 CRIT = 2 UNKOWN = 3 def commandline(args): """ Settings for the c...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 628, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 302, 198, 11748, 4818, 8079, 198, 11748, 850, 14681, 628, 198, 4871, 7788, 2043, 33529, 198, 220, 220, 220,...
2.34421
1,563
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 applicab...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 15069, 33160, 1058, 33, 6532, 12, 22405, 12, 12041, 25, 19935, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 4943, 198, 2, 345, 743,...
3.00554
722
import luigi import subprocess from os.path import join, dirname, basename from ..utils.cap_task import CapTask from ..config import PipelineConfig from ..utils.conda import CondaPackage from ..preprocessing.clean_reads import CleanReads from ..databases.amr_db import GrootDB, MegaResDB, CardDB
[ 198, 11748, 300, 84, 25754, 198, 11748, 850, 14681, 198, 6738, 28686, 13, 6978, 1330, 4654, 11, 26672, 3672, 11, 1615, 12453, 198, 198, 6738, 11485, 26791, 13, 11128, 62, 35943, 1330, 4476, 25714, 198, 6738, 11485, 11250, 1330, 37709, 1...
3.420455
88
#coding=utf-8 # # Created on Mar 21, 2014, by Junn # # from django.contrib.auth.models import BaseUserManager from django.utils import timezone from utils import eggs, logs, http from django.core.cache import cache VALID_ATTRS = ('nickname', 'email', 'phone', 'gender', 'avatar')
[ 2, 66, 7656, 28, 40477, 12, 23, 198, 2, 198, 2, 15622, 319, 1526, 2310, 11, 1946, 11, 416, 7653, 77, 198, 2, 220, 198, 2, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 7308, 12982, 13511, 198, 6738, 42...
2.528926
121
import cv2 import numpy as np import mediapipe as mp cap = cv2.VideoCapture(0) ret, frame = cap. read () while (True): ret, frame = cap. read () frame = cv2.flip(frame,1) gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) cv2.imshow('Gray Filter', gray) if cv2.waitKey(10) & 0xFF==ord('q'): brea...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 16957, 499, 3757, 355, 29034, 198, 198, 11128, 796, 269, 85, 17, 13, 10798, 49630, 7, 15, 8, 198, 1186, 11, 5739, 796, 1451, 13, 1100, 7499, 198, 4514, 357, 17821, ...
2.15
200
import datetime import uuid import pytest from docstore.models import Dimensions, Document, File, Thumbnail, from_json, to_json @pytest.mark.parametrize("documents", [[1, 2, 3], {"a", "b", "c"}])
[ 11748, 4818, 8079, 198, 11748, 334, 27112, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 2205, 8095, 13, 27530, 1330, 41265, 11, 16854, 11, 9220, 11, 536, 20566, 11, 422, 62, 17752, 11, 284, 62, 17752, 628, 628, 628, 198, 31, 9078, ...
2.833333
72
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="metalabs_sdk", # Replace with your own username version="0.1.1", author="Jeffrey Annaraj", author_email="jannaraj@baffled.dev", description="SDK for MetaLabs AP...
[ 11748, 900, 37623, 10141, 201, 198, 201, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 1600, 21004, 2625, 40477, 12, 23, 4943, 355, 277, 71, 25, 201, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, ...
2.454259
317
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft and contributors. 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 ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 290, 20420, 13, 220, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, ...
3.794944
356
from __future__ import absolute_import from . import teardrops
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 764, 1330, 573, 446, 305, 862, 198 ]
3.705882
17
import attr from ndk.construct import Construct from ndk.directives import * from ndk.options import contact as options @attr.s
[ 198, 198, 11748, 708, 81, 198, 6738, 299, 34388, 13, 41571, 1330, 28407, 198, 6738, 299, 34388, 13, 12942, 1083, 1330, 1635, 198, 6738, 299, 34388, 13, 25811, 1330, 2800, 355, 3689, 628, 198, 31, 35226, 13, 82, 198 ]
3.384615
39
#! -*- coding: utf-8 -*- # bert做Seq2Seq任务,采用UNILM方案 # 介绍链接:https://kexue.fm/archives/6933 from __future__ import print_function import glob import os import numpy as np import sys from bert4keras.backend import keras, K from bert4keras.layers import Loss from bert4keras.models import build_transformer_model, tf from...
[ 2, 0, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 275, 861, 161, 223, 248, 4653, 80, 17, 4653, 80, 20015, 119, 27950, 94, 171, 120, 234, 34932, 229, 18796, 101, 4944, 4146, 44, 43095, 162, 94, 230, 198, 2, 2...
2.305506
2,252
# check # lowercase letters # count all the letters of T which S contains # save indices of letters in T
[ 2, 2198, 198, 2, 2793, 7442, 7475, 198, 198, 2, 954, 477, 262, 7475, 286, 309, 543, 311, 4909, 198, 2, 3613, 36525, 286, 7475, 287, 309 ]
3.888889
27
__all__ = () from sys import platform as PLATFORM from os.path import join as join_paths from os import listdir as list_directory, environ as ENVIRONMENTAL_VARIABLES from tempfile import gettempdir as get_temporary_directory from scarletio import set_docs from .constants import PAYLOAD_KEY_EVENT, EVENT_ERROR, PAYLOA...
[ 834, 439, 834, 796, 7499, 198, 198, 6738, 25064, 1330, 3859, 355, 9297, 1404, 21389, 198, 6738, 28686, 13, 6978, 1330, 4654, 355, 4654, 62, 6978, 82, 198, 6738, 28686, 1330, 1351, 15908, 355, 1351, 62, 34945, 11, 551, 2268, 355, 12964...
2.212589
842
#!/usr/bin/env python # encoding=utf8 import os import re import sys import struct import pprint import random import argparse import datetime import tiddlywiki as tiddly import cdam_gen_files as gen import importlib import bitarray importlib.reload(sys) # sys.setdefaultencoding('utf8') VERSION = "1.0" BINARY_VER =...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 28, 40477, 23, 198, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 2878, 198, 11748, 279, 4798, 198, 11748, 4738, 198, 11748, 1822, 29572, 198, 11748, 4818,...
2.57265
351
""" Common geometric primitives. Author: Jeff Mahler """ import numpy as np class Box(object): """A 2D box or 3D rectangular prism. Attributes ---------- dims : :obj:`numpy.ndarray` of float Maximal extent in x, y, and (optionally) z. width : float Maximal extent in x. height...
[ 37811, 198, 17227, 38445, 2684, 20288, 13, 198, 13838, 25, 5502, 8882, 1754, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4871, 8315, 7, 15252, 2599, 198, 220, 220, 220, 37227, 32, 362, 35, 3091, 393, 513, 35, 36954, 4647...
2.283156
1,508
import pytest import responses from sparkpost import SparkPost from sparkpost.exceptions import SparkPostAPIException @responses.activate @responses.activate @responses.activate @responses.activate
[ 11748, 12972, 9288, 198, 11748, 9109, 198, 198, 6738, 9009, 7353, 1330, 17732, 6307, 198, 6738, 9009, 7353, 13, 1069, 11755, 1330, 17732, 6307, 17614, 16922, 628, 198, 31, 16733, 274, 13, 39022, 628, 198, 31, 16733, 274, 13, 39022, 628,...
3.763636
55
import sys
[ 11748, 25064, 198 ]
3.666667
3
""" Test that plugins that load commands work correctly. """ import os, time import re import unittest2 import lldb from lldbtest import * import lldbutil if __name__ == '__main__': import atexit lldb.SBDebugger.Initialize() atexit.register(lambda: lldb.SBDebugger.Terminate()) unittest2.main()
[ 37811, 198, 14402, 326, 20652, 326, 3440, 9729, 670, 9380, 13, 198, 37811, 198, 198, 11748, 28686, 11, 640, 198, 11748, 302, 198, 11748, 555, 715, 395, 17, 198, 11748, 32660, 9945, 198, 6738, 32660, 9945, 9288, 1330, 1635, 198, 11748, ...
2.730435
115
import rclpy from rclpy.node import Node from geometry_msgs.msg import PoseStamped from code_map_localization_msgs.msg import Localization from .convert_message import convert_to_ros_msgs from codemap.webcam import WebCamLocalization import ctypes import time libcodemap = ctypes.cdll.LoadLibrary('libcodemap.so') i...
[ 11748, 374, 565, 9078, 198, 6738, 374, 565, 9078, 13, 17440, 1330, 19081, 198, 6738, 22939, 62, 907, 14542, 13, 19662, 1330, 37557, 1273, 13322, 198, 6738, 2438, 62, 8899, 62, 12001, 1634, 62, 907, 14542, 13, 19662, 1330, 10714, 1634, ...
2.975
120
from contextlib import suppress from os import remove from os.path import islink, join from sys import exit from snakypy.helpers import FG, printer from snakypy.dotctrl.config.base import Base from snakypy.dotctrl.utils import check_init, join_two, listing_files, rm_garbage_config
[ 6738, 4732, 8019, 1330, 18175, 198, 6738, 28686, 1330, 4781, 198, 6738, 28686, 13, 6978, 1330, 318, 8726, 11, 4654, 198, 6738, 25064, 1330, 8420, 198, 198, 6738, 3013, 461, 4464, 88, 13, 16794, 364, 1330, 25503, 11, 20632, 198, 198, 6...
3.313953
86
# Copyright (c) 2019 Andres Gomez Ramirez. # All Rights Reserved. import sys import time import subprocess import logging import os.path import time from arhuaco.sensors.source.source import Source
[ 2, 15069, 357, 66, 8, 13130, 843, 411, 33231, 34783, 13, 198, 2, 1439, 6923, 33876, 13, 198, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 850, 14681, 198, 11748, 18931, 198, 11748, 28686, 13, 6978, 198, 11748, 640, 198, 198, 6738, ...
3.571429
56
r""" http://github.com/in4lio/yupp/ __ __ _____ _____ /\ \ /\ \ /\ _ \ _ \ \ \ \_\/ \_\/ \_\ \ \_\ \ \ \__ /\____/\ __/\ __/ \/_/\_\/___/\ \_\/\ \_\/ \/_/ \/_/ \/_/ Python 'yupp' Codec Support """ from __future__ import absolute_import from __future__ import division from __future__ im...
[ 81, 37811, 198, 4023, 1378, 12567, 13, 785, 14, 259, 19, 48590, 14, 88, 7211, 14, 198, 11593, 220, 220, 220, 11593, 220, 220, 220, 220, 29343, 220, 29343, 198, 14, 59, 3467, 220, 1220, 59, 3467, 220, 1220, 59, 220, 4808, 220, 3467...
3.253076
569
import time HANDSHAKE_LENGTH = 1536 class Handshake(object): """ A handshake packet. @ivar first: The first 4 bytes of the packet, represented as an unsigned long. @type first: 32bit unsigned int. @ivar second: The second 4 bytes of the packet, represented as an unsigned long. ...
[ 11748, 640, 628, 198, 39, 1565, 5258, 7801, 7336, 62, 43, 49494, 796, 1315, 2623, 628, 198, 4871, 7157, 32431, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 317, 42231, 19638, 13, 628, 220, 220, 220, 2488, 452, 283,...
2.536232
483
from typing import Dict import sys from mediocre_agent import agent if __name__ == "__main__": def read_input(): """ Reads input from stdin """ try: return input() except EOFError as eof: raise SystemExit(eof) step = 0 observation = Observ...
[ 6738, 19720, 1330, 360, 713, 198, 11748, 25064, 198, 6738, 29956, 62, 25781, 1330, 5797, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 220, 198, 220, 220, 220, 825, 1100, 62, 15414, 33529, 198, 220,...
2.088517
418
class Agent(object): """ represents the agent who takes the calls from the queue """ def __init__(self, id, free, minutes_till_ready=0): """ constructor just sets the id :param name: string """ self.id = id self.free = free self.minutes_till_rea...
[ 4871, 15906, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 6870, 262, 5797, 508, 2753, 262, 3848, 422, 262, 16834, 628, 220, 220, 220, 37227, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 4686, 11, 1479, ...
2.272727
286
from os import environ from pathlib import Path from django.core.wsgi import get_wsgi_application from config import get_project_root_path, import_env_vars import_env_vars(Path(get_project_root_path(), "envdir")) environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.base") application = get_wsgi_applicatio...
[ 6738, 28686, 1330, 551, 2268, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 18504, 12397, 1330, 651, 62, 18504, 12397, 62, 31438, 198, 198, 6738, 4566, 1330, 651, 62, 16302, 62, 15763, 62, 6978, 11, 1...
3
108
print("I'm Sexy")
[ 4798, 7203, 40, 1101, 49131, 4943, 198 ]
2.571429
7
import sys import os, os.path # May need this for the path issue for gpaw-python sys.path.append(os.path.dirname(os.path.abspath(__file__))) from src.structure import get_structure from src.supercell import make_super, add_adatom from src.neb import neb, calc_img import shutil from ase.parallel import paropen, parprint...
[ 11748, 25064, 198, 11748, 28686, 11, 28686, 13, 6978, 198, 2, 1737, 761, 428, 329, 262, 3108, 2071, 329, 27809, 707, 12, 29412, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 7...
2.690355
197
#!/usr/bin/env python # -*- coding: utf-8 -*- import plugins import sys if __name__ == '__main__': Plugin().execute()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 20652, 198, 11748, 25064, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220...
2.530612
49
import tensorflow as tf import sonnet as snt from .build_utils import residual_stack, maybe_set_l2_conv_contractive_regularizer from .AbstractResNetLayer import AbstractResNetLayer class ResEnc(AbstractResNetLayer): """ res enc used in VQ """ #TODO remove biases before batch norm, see if it makes any diffe...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 3367, 3262, 355, 264, 429, 198, 6738, 764, 11249, 62, 26791, 1330, 29598, 62, 25558, 11, 3863, 62, 2617, 62, 75, 17, 62, 42946, 62, 28484, 425, 62, 16338, 7509, 198, 6738, 764, 23839, ...
3.295238
105
""" Represents a PaymentChannelFund transaction on the XRP Ledger. A PaymentChannelFund transaction adds additional XRP to an open payment channel, and optionally updates the expiration time of the channel. Only the source address of the channel can use this transaction. `See PaymentChannelFund <https://xrpl.org/payme...
[ 37811, 198, 6207, 6629, 257, 28784, 29239, 24553, 8611, 319, 262, 1395, 20031, 22964, 1362, 13, 198, 32, 28784, 29239, 24553, 8611, 6673, 3224, 1395, 20031, 284, 281, 1280, 6074, 6518, 11, 198, 392, 42976, 5992, 262, 28385, 640, 286, 26...
3.39801
402
# # * The source code in this file is developed independently by NEC Corporation. # # # NLCPy License # # # Copyright (c) 2020-2021 NEC Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following cond...
[ 2, 198, 2, 1635, 383, 2723, 2438, 287, 428, 2393, 318, 4166, 14799, 416, 41804, 10501, 13, 198, 2, 198, 2, 1303, 399, 5639, 20519, 13789, 1303, 198, 2, 198, 2, 220, 220, 220, 220, 15069, 357, 66, 8, 12131, 12, 1238, 2481, 41804, ...
2.197422
6,362