content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
#!/usr/bin/env python # -*- coding: utf-8 -*- # @copyright © 2010 - 2021, Fraunhofer-Gesellschaft zur Foerderung der # angewandten Forschung e.V. All rights reserved. # # BSD 3-Clause License # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the fol...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 2488, 22163, 4766, 1222, 30073, 26, 3050, 532, 33448, 11, 39313, 403, 71, 30288, 12, 38, 274, 19187, 11693, 7...
2.83027
1,632
# Design an algorithm and write code to find the first common ancestor of two nodes in a binary tree. Avoid storing additional nodes in a data structure. # Note: Not necessarily a binary search tree. from utils import Node # First Binary Search Tree node_i = Node(13) node_h = Node(4) node_g = Node(7) node_f = Node(...
[ 2, 8495, 281, 11862, 290, 3551, 2438, 284, 1064, 262, 717, 2219, 31836, 286, 734, 13760, 287, 257, 13934, 5509, 13, 24390, 23069, 3224, 13760, 287, 257, 1366, 4645, 13, 198, 2, 5740, 25, 1892, 6646, 257, 13934, 2989, 5509, 13, 198, ...
2.484444
450
""" Errors for the :mod:`~multiformats.multihash` module. """ import builtins class MultihashKeyError(builtins.KeyError): # pylint: disable = redefined-builtin """ Class for :mod:`~multiformats.multihash` key errors. """ ... class MultihashValueError(builtins.ValueError): # pylint: disable = redefined-bu...
[ 37811, 198, 220, 220, 220, 44225, 329, 262, 1058, 4666, 25, 63, 93, 16680, 6933, 1381, 13, 16680, 4449, 1077, 63, 8265, 13, 198, 37811, 198, 198, 11748, 3170, 1040, 198, 198, 4871, 7854, 4449, 1077, 9218, 12331, 7, 18780, 1040, 13, ...
2.795775
142
# _*_coding:utf-8_*_ import unittest import os from lib import (HTMLTESTRunnerCN, gl, scripts) from lib.emailstmp import EmailClass if __name__ == "__main__": # scripts.remove_all_files(gl.imgPath) # suite = unittest.TestSuite() # suite.addTest( # unittest.defaultTestLoader.discover(gl.casePath, 't...
[ 2, 4808, 9, 62, 66, 7656, 25, 40477, 12, 23, 62, 9, 62, 198, 11748, 555, 715, 395, 198, 11748, 28686, 198, 6738, 9195, 1330, 357, 28656, 51, 1546, 5446, 403, 1008, 44175, 11, 1278, 11, 14750, 8, 198, 6738, 9195, 13, 12888, 301, ...
1.549654
1,299
""" Copyright 2016 Platform9 Systems Inc.(http://www.platform9.com) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or...
[ 37811, 198, 15269, 1584, 19193, 24, 11998, 3457, 12195, 4023, 1378, 2503, 13, 24254, 24, 13, 785, 8, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393,...
3.7713
223
import numpy as np import pytest import torch from src.lagrange.exact import compute_exact_multipliers from src.lagrange.approximate import compute_approximate_multipliers @pytest.mark.filterwarnings( "ignore:The approximation method for multiplier computation is unstable. It has therefore been deprecated" )
[ 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 11748, 28034, 198, 198, 6738, 12351, 13, 30909, 9521, 13, 1069, 529, 1330, 24061, 62, 1069, 529, 62, 47945, 3183, 198, 6738, 12351, 13, 30909, 9521, 13, 1324, 13907, 1920, 133...
3.686047
86
from setuptools import setup, find_packages with open('README.rst') as f: description = f.read() setup( name='bridson', url='http://github.com/emulbreh/bridson/', version='0.1.0', packages=find_packages(), license=u'MIT License', author=u'Johannes Dollinger', description=u'poisson di...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 4480, 1280, 10786, 15675, 11682, 13, 81, 301, 11537, 355, 277, 25, 198, 220, 220, 220, 6764, 796, 277, 13, 961, 3419, 628, 198, 40406, 7, 198, 220, 220, 220, 1438, ...
2.67623
244
import asyncio import time import unittest from unittest import mock from saq.job import Job, Status from saq.queue import JobError from saq.utils import uuid1 from saq.worker import Worker from tests.helpers import create_queue, cleanup_queue functions = [echo, error]
[ 11748, 30351, 952, 198, 11748, 640, 198, 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 1330, 15290, 198, 198, 6738, 473, 80, 13, 21858, 1330, 15768, 11, 12678, 198, 6738, 473, 80, 13, 36560, 1330, 15768, 12331, 198, 6738, 473, 80, ...
3.365854
82
__all__ = ["UserTuple", "DocValue", "DocDict"] from copy import copy, deepcopy from typing import Sequence, Union, Iterable from wrapt import ObjectProxy from wrapt.wrappers import _ObjectProxyMetaType # noqa class DeviceDataFilter: """`DeviceDataFilter` represents the conditions for reading device data; th...
[ 834, 439, 834, 796, 14631, 12982, 51, 29291, 1600, 366, 23579, 11395, 1600, 366, 23579, 35, 713, 8973, 198, 6738, 4866, 1330, 4866, 11, 2769, 30073, 198, 6738, 19720, 1330, 45835, 11, 4479, 11, 40806, 540, 198, 198, 6738, 7917, 457, 1...
2.591187
817
# Generated by Django 3.2.11 on 2022-01-20 22:49 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 1157, 319, 33160, 12, 486, 12, 1238, 2534, 25, 2920, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # The Universal Permissive License (UPL), Version 1.0 # # Subject to the condition set forth below, permission is hereby granted to any # person obtaining a copy of this softw...
[ 2, 15069, 357, 66, 8, 2864, 11, 13130, 11, 18650, 290, 14, 273, 663, 29116, 13, 1439, 2489, 10395, 13, 198, 2, 8410, 5626, 8355, 5781, 6375, 22657, 46, 6089, 27975, 38162, 9947, 5626, 34444, 6375, 12680, 45811, 39837, 1137, 13, 198, ...
2.726784
2,046
# coding: utf-8 """ Wavefront REST API <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 17084, 8534, 30617, 7824, 628, 220, 220, 220, 1279, 79, 29, 464, 17084, 8534, 30617, 7824, 13536, 345, 284, 9427, 351, 17084, 8534, 9597, 1262, 3210, 30617, 7824, ...
2.90671
611
file1 = open('input.txt', 'r') lines = file1.readlines() startLine = lines[0] transitions: list[Transition] = [] for line in lines[2:]: split = line.split() transitions.append(Transition(Sequence(split[0][0], split[0][1]), split[2])) # execute accumulationMap = ElementCountMap() ecc = ElementCountCache() de...
[ 198, 7753, 16, 796, 1280, 10786, 15414, 13, 14116, 3256, 705, 81, 11537, 198, 6615, 796, 2393, 16, 13, 961, 6615, 3419, 198, 198, 9688, 13949, 796, 3951, 58, 15, 60, 198, 7645, 1756, 25, 1351, 58, 8291, 653, 60, 796, 17635, 198, 1...
2.860465
301
#------------------------------------------------------------------------------- # for memory initialization and to notify the execution cycle count #------------------------------------------------------------------------------- INIT_BRAM_SIZE = 128 #INIT_DRAM_SIZE = 1024 * 1024 * 512 INIT_DRAM_SIZE = 1024 * 1024 * 12...
[ 2, 10097, 24305, 198, 2, 329, 4088, 37588, 290, 284, 19361, 262, 9706, 6772, 954, 198, 2, 10097, 24305, 198, 1268, 2043, 62, 11473, 2390, 62, 33489, 796, 13108, 198, 2, 1268, 2043, 62, 7707, 2390, 62, 33489, 796, 28119, 1635, 28119, ...
3.805825
309
import threading import time from otrs_python_api.exceptions import InvalidInitArgument
[ 11748, 4704, 278, 198, 11748, 640, 198, 198, 6738, 267, 2213, 82, 62, 29412, 62, 15042, 13, 1069, 11755, 1330, 17665, 31768, 28100, 1713, 628 ]
3.6
25
# problem8.py s = "731671765313306249192251196744265747423553491949349698352031277450632623957831801698480186947885184385861560789112949495459501737958331952853208805511125406987471585238630507156932909632952274430435576689664895044524452316173185640309871112172238311362229893423380308135336276614282806444486645238749...
[ 2, 1917, 23, 13, 9078, 198, 198, 82, 796, 366, 4790, 21940, 1558, 2996, 25838, 20548, 21626, 17477, 1495, 16315, 3134, 2598, 2075, 3553, 38652, 1954, 2816, 27371, 1129, 2920, 27371, 39357, 2327, 22416, 1065, 3324, 17885, 5066, 2075, 23516...
2.142857
567
from django.db.models import Count, Min, Sum, F, Max, Avg from day7.models import OrderItem, ProductCost from decimal import ( Decimal, ) def get_average_cost_without_product(product, begin, end): """Возвращает среднюю стоимость заказов без указанного товара за определенный промежуток времени Args: ...
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 2764, 11, 1855, 11, 5060, 11, 376, 11, 5436, 11, 33455, 198, 6738, 1110, 22, 13, 27530, 1330, 8284, 7449, 11, 8721, 13729, 198, 6738, 32465, 1330, 357, 198, 220, 220, 220, 4280, 4402, 1...
1.849862
726
import numpy def g_function(ni, ki, n_back=1.0, k_back=0): """Function defined to summary some calculations. For more information, please consult http://bdigital.unal.edu.co/65682/1/1053830848.2018.pdf, pag. 26. """ ans = (n_back ** 2 - ni ** 2 + k_back ** 2 - ki ** 2) / ( (n_back + ni) **...
[ 11748, 299, 32152, 628, 198, 4299, 308, 62, 8818, 7, 8461, 11, 47748, 11, 299, 62, 1891, 28, 16, 13, 15, 11, 479, 62, 1891, 28, 15, 2599, 198, 220, 220, 220, 37227, 22203, 5447, 284, 10638, 617, 16765, 13, 1114, 517, 1321, 11, 1...
2.212346
810
#!/usr/bin/env python import sys srfile = file(sys.argv[1]) table = {} for line in srfile.xreadlines(): clas, repl = line.split() if repl[-1] not in '-?': table['class' + clas] = repl for line in sys.stdin.xreadlines(): fn, clas = line.split() if table.has_key(clas): print fn, table[cl...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 198, 27891, 7753, 796, 2393, 7, 17597, 13, 853, 85, 58, 16, 12962, 198, 11487, 796, 23884, 198, 1640, 1627, 287, 19677, 7753, 13, 87, 961, 6615, 33529, 198, 220, 2...
2.234483
145
# Generated by Django 2.0.1 on 2018-03-15 23:39 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 16, 319, 2864, 12, 3070, 12, 1314, 2242, 25, 2670, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from distutils.core import setup setup( name='fasterpay-python3', packages=['fasterpay'], version='1.2', license='MIT', description='Integrate FasterPay into your application using fasterpay-python SDK', author='FasterPay Integrations Team', author_email='integration@fasterpay.com', url='https://github....
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 40406, 7, 198, 220, 1438, 11639, 69, 1603, 15577, 12, 29412, 18, 3256, 198, 220, 10392, 28, 17816, 69, 1603, 15577, 6, 4357, 198, 220, 2196, 11639, 16, 13, 17, 3256, 198, 220, 5964, 1163...
3.123016
252
""" ======================================================================== HeuristicTopo.py ======================================================================== Author : Shunning Jiang Date : Dec 26, 2018 """ import ast from queue import PriorityQueue from graphviz import Digraph from pymtl3.passes.BasePass...
[ 37811, 198, 23926, 2559, 198, 1544, 27915, 9126, 78, 13, 9078, 198, 23926, 2559, 198, 198, 13838, 1058, 911, 16596, 32294, 198, 10430, 220, 220, 1058, 4280, 2608, 11, 2864, 198, 37811, 198, 198, 11748, 6468, 198, 6738, 16834, 1330, 3441...
4.204918
122
import re import asyncpraw import asyncio from requests.models import HTTPError import yfinance import simfin as sf from urllib.error import HTTPError from collections import Counter from datetime import datetime sf.set_api_key('free') sf.set_data_dir('~/simfin_data/') df = sf.load_income(variant='annual', market='us'...
[ 11748, 302, 198, 11748, 355, 2047, 13155, 1831, 198, 11748, 30351, 952, 198, 6738, 7007, 13, 27530, 1330, 14626, 12331, 198, 11748, 331, 69, 14149, 198, 11748, 985, 15643, 355, 264, 69, 198, 6738, 2956, 297, 571, 13, 18224, 1330, 14626,...
2.611429
175
# -*- coding: utf-8 -*- # @Time : 2022/2/23 15:55 # @Author : ZhaoXiangPeng # @File : cmdline.py import sys from os.path import dirname, join from . import create_builder def _print_commands(): """ @summery: copy form https://github.com/Boris-code/feapder/blob/master/feapder/commands/cmdline.py ""...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 33160, 14, 17, 14, 1954, 1315, 25, 2816, 198, 2, 2488, 13838, 220, 1058, 29436, 55, 15483, 47, 1516, 198, 2, 2488, 8979, 220, 220...
2.405542
397
# local modules import numpy,dill from . import operators from . import basis from . import tools __version__ = "0.3.4" __all__ = ["basis","operators","tools"]
[ 2, 1957, 13103, 198, 11748, 299, 32152, 11, 67, 359, 198, 6738, 764, 1330, 12879, 198, 6738, 764, 1330, 4308, 198, 6738, 764, 1330, 4899, 198, 198, 834, 9641, 834, 796, 366, 15, 13, 18, 13, 19, 1, 198, 834, 439, 834, 796, 14631, ...
3.037736
53
import base64 import requests from time import sleep import os from flask import Flask, request, redirect, url_for, render_template from werkzeug import secure_filename import cv2 import wikipedia import secret_access_key as secret_access_key img = 'calla_lily.jpg' img = 'gloriosa.jpg' imgName = 'Calla lily' imgName =...
[ 11748, 2779, 2414, 198, 11748, 7007, 198, 6738, 640, 1330, 3993, 198, 11748, 28686, 198, 6738, 42903, 1330, 46947, 11, 2581, 11, 18941, 11, 19016, 62, 1640, 11, 8543, 62, 28243, 198, 6738, 266, 9587, 2736, 1018, 1330, 5713, 62, 34345, ...
2.521978
364
#! /usr/bin/env python ####################################### # A python script to plot the averaged # columns data. # # Email: petebunting@mac.com # Date: 01/02/2012 # Version: 1.0 ####################################### import os.path import sys from datetime import datetime,timedelta from math import * import op...
[ 1303, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 29113, 4242, 21017, 198, 2, 317, 21015, 4226, 284, 7110, 262, 16449, 198, 2, 15180, 1366, 13, 198, 2, 198, 2, 9570, 25, 4273, 1765, 403, 889, 31, 20285, 13, 785, 198, 2, ...
3.191358
162
import parselmouth import glob import sys import numpy as np import matplotlib.pyplot as plt import seaborn as sns import scipy.io.wavfile as wav from python_speech_features import mfcc from python_speech_features import delta from python_speech_features import logfbank sns.set() # Use seaborn's default s...
[ 11748, 1582, 741, 14775, 201, 198, 11748, 15095, 201, 198, 11748, 25064, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 11748, 384, 397, 1211, 355, 3013, 82, 201, ...
2.67
200
# # Copyright (c) 2019 Foundries.io # SPDX-License-Identifier: Apache-2.0
[ 2, 198, 2, 15069, 357, 66, 8, 13130, 4062, 1678, 13, 952, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198 ]
2.642857
28
"""Test cases for looseserver common helper functions.""" import pytest from looseserver.common.utils import ensure_endpoint @pytest.mark.parametrize( argnames="specified_endpoint,expected_endpoint", argvalues=[ ("/valid/", "/valid/"), ("/missed-at-the-end", "/missed-at-the-end/"), (...
[ 37811, 14402, 2663, 329, 2376, 4629, 18497, 2219, 31904, 5499, 526, 15931, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 2376, 4629, 18497, 13, 11321, 13, 26791, 1330, 4155, 62, 437, 4122, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, ...
2.520249
321
from config import get_args import preprocess, models, runner import torch from torchvision import datasets, transforms from dataset import FrameDataset from torch.utils.data import random_split import pdb, os if __name__ == '__main__': main() """ Things to get done: 1. Normalize features before entering into m...
[ 6738, 4566, 1330, 651, 62, 22046, 198, 11748, 662, 14681, 11, 4981, 11, 17490, 198, 11748, 28034, 198, 6738, 28034, 10178, 1330, 40522, 11, 31408, 198, 6738, 27039, 1330, 25184, 27354, 292, 316, 198, 6738, 28034, 13, 26791, 13, 7890, 13...
3.325581
215
# coding: utf8 shortcuts = { "Adobe Illustrator": #https://helpx.adobe.com/illustrator/using/default-keyboard-shortcuts.html { "Undo": "⌘ + Z", "Redo": "⇧ + ⌘ + Z", "Cut": "⌘ + X", "Copy": "⌘ + C", "Paste": "⌘ + V", "Paste in front": "...
[ 2, 19617, 25, 3384, 69, 23, 198, 198, 19509, 23779, 796, 1391, 198, 220, 220, 220, 366, 2782, 5910, 23279, 12392, 1298, 1303, 5450, 1378, 2978, 8416, 13, 36752, 13, 785, 14, 359, 436, 12392, 14, 3500, 14, 12286, 12, 2539, 3526, 12, ...
2.219526
10,714
# coding: utf-8 from datetime import datetime from datetime import timedelta from leancloud import Object from leancloud import ACL from leancloud import Engine from leancloud import LeanEngineError from app import app engine = Engine(app) # Hook 函数 @engine.before_save('Todo') # 定时任务 @engine.define
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 6738, 10904, 17721, 1330, 9515, 198, 6738, 10904, 17721, 1330, 17382, 198, 6738, 10904, 17721, 1330, 7117...
3.039604
101
""" Run length encoding of a binary image (in numpy format) References * https://www.kaggle.com/paulorzp/run-length-encode-and-decode * https://www.kaggle.com/stainsby/fast-tested-rle """ import numpy as np
[ 37811, 198, 10987, 4129, 21004, 286, 257, 13934, 2939, 357, 259, 299, 32152, 5794, 8, 198, 198, 19927, 198, 198, 9, 3740, 1378, 2503, 13, 74, 9460, 293, 13, 785, 14, 79, 2518, 273, 89, 79, 14, 5143, 12, 13664, 12, 268, 8189, 12, ...
2.617284
81
# -*- coding: utf-8 -*- """ Requires Python 3.0 or later """ __author__ = "Jorge Morfinez Mojica (jorge.morfinez.m@gmail.com)" __copyright__ = "Copyright 2020, Jorge Morfinez Mojica" __license__ = "" __history__ = """ """ __version__ = "1.1.A10.5 ($Rev: 25 $)" import json import re import threading import time import...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 39618, 11361, 513, 13, 15, 393, 1568, 198, 37811, 198, 198, 834, 9800, 834, 796, 366, 41, 3643, 3461, 69, 18885, 40120, 3970, 357, 73, 3643, 13, 4491, 69, ...
2.615826
872
import math
[ 11748, 10688, 198 ]
4
3
import os import unittest from contextlib import redirect_stdout from linkml.generators.sparqlgen import SparqlGenerator from tests.test_generators.environment import env SCHEMA = env.input_path('kitchen_sink.yaml') DIR = env.expected_path('kitchen_sink_sparql') SPARQL = env.expected_path('kitchen_sink.rq') if ...
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 6738, 4732, 8019, 1330, 18941, 62, 19282, 448, 628, 198, 6738, 2792, 4029, 13, 8612, 2024, 13, 82, 1845, 13976, 5235, 1330, 1338, 283, 13976, 8645, 1352, 198, 6738, 5254, 13, 9288, 62, 861...
2.757576
132
#Escreva um programa que pergunte a quantidade de Km percorridos por um carro alugado e a quantidade de dias pelos # quais ele foi alugado. #DIARIA R$60 , R$ 0,15 p KM rodado diaria = int(input("Digite a quantidade de dias de uso do veículo : ")) kmr = float(input("Digite o numero de km rodados: ")) usodia = diaria *...
[ 2, 47051, 260, 6862, 23781, 1430, 64, 8358, 583, 70, 6311, 257, 5554, 312, 671, 390, 509, 76, 583, 10215, 6058, 418, 16964, 23781, 1097, 305, 435, 1018, 4533, 304, 257, 5554, 312, 671, 390, 2566, 292, 16176, 418, 198, 2, 627, 15152,...
2.299107
224
from .cnpj import * from .env_parsers import *
[ 6738, 764, 31522, 79, 73, 1330, 1635, 198, 6738, 764, 24330, 62, 79, 945, 364, 1330, 1635, 198 ]
2.611111
18
""" Copyright (C) 2018-2021 Intel 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/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
[ 37811, 198, 15069, 357, 34, 8, 2864, 12, 1238, 2481, 8180, 10501, 628, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 1...
4.059172
169
# ______________________________________________________________________________ # The Wumpus World
[ 2, 220, 27193, 2602, 25947, 198, 2, 383, 370, 931, 385, 2159, 628, 628, 198 ]
6.933333
15
from textwrap import dedent num_dict = { "零": 0, "〇": 0, "一": 1, "二": 2, "两": 2, "三": 3, "四": 4, "五": 5, "六": 6, "七": 7, "八": 8, "九": 9, "十": 10, "廿": 20, "卅": 30, "卌": 40, "百": 100, "千": 1000 } valid_filenames = dict((ord(char), None) for char i...
[ 6738, 2420, 37150, 1330, 4648, 298, 198, 198, 22510, 62, 11600, 796, 1391, 198, 220, 220, 220, 366, 37239, 114, 1298, 657, 11, 198, 220, 220, 220, 366, 5099, 229, 1298, 657, 11, 198, 220, 220, 220, 366, 31660, 1298, 352, 11, 198, ...
1.636
500
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
2.47647
5,461
# encoding: utf-8 import re from importlib import import_module from requests.exceptions import HTTPError from .exceptions import (AuthenticationError, BadRequestError, ItemNotFoundError, ServerError) snake = _snake() new_item = _new_item() class Item: ''' classdocs '''...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 11748, 302, 198, 6738, 1330, 8019, 1330, 1330, 62, 21412, 198, 198, 6738, 7007, 13, 1069, 11755, 1330, 14626, 12331, 198, 198, 6738, 764, 1069, 11755, 1330, 357, 47649, 3299, 12331, 11, 7772, ...
2.502994
167
# flake8: noqa from .linkage import EmpiricalLinkage
[ 2, 781, 539, 23, 25, 645, 20402, 198, 6738, 764, 8726, 496, 1330, 2295, 4063, 605, 11280, 496, 198 ]
2.789474
19
#!/usr/bin/env python3.5 import sys import threading from tornado import gen from myslice.services.workers.authorities import syncAuthorities from myslice.services.workers.projects import syncProjects from myslice.services.workers.users import syncUsers from myslice.services.workers.slices import syncSlices from mysl...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 13, 20, 198, 198, 11748, 25064, 198, 11748, 4704, 278, 198, 6738, 33718, 1330, 2429, 198, 198, 6738, 616, 48369, 13, 30416, 13, 22896, 13, 9800, 871, 1330, 17510, 28705, 198, 6738, 616,...
3.434783
161
import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from ..visualization.plot import PATH from ..metrics import * from .config import * color = ['darkorange', 'cornflowerblue', 'c', 'y'] def distribution_plot(x1, x2=None, x3=None, x4=None, label1='train', ...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 11748, 384, 397, 1211, 355, 3013, 82, 201, 198, 6738, 11485, 41464, 1634, 13, 29487...
2.082915
796
from six.moves.urllib import parse from mod_pywebsocket import common from mod_pywebsocket import msgutil
[ 6738, 2237, 13, 76, 5241, 13, 333, 297, 571, 1330, 21136, 198, 6738, 953, 62, 9078, 732, 1443, 5459, 1330, 2219, 198, 6738, 953, 62, 9078, 732, 1443, 5459, 1330, 31456, 22602, 628, 198 ]
3.176471
34
import cv2 import numpy as np import os import time classFile = 'coco.names' classNames = [] with open (classFile, 'rt') as f: classNames = f.read().rstrip('\n').split('\n') weightsPath = "yolov3.weights" configPath = "yolov3.cfg" net = cv2.dnn.readNetFromDarknet(configPath, weightsPath) net.setPreferableBacken...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 640, 198, 198, 4871, 8979, 796, 705, 66, 25634, 13, 14933, 6, 198, 4871, 36690, 796, 17635, 198, 198, 4480, 1280, 357, 4871, 8979, 11, 705, 17034, ...
2.259091
220
# ------------------------------------------------------------------------------------ # Tutorial: Learn how to use Dictionaries in Python # ------------------------------------------------------------------------------------ # Defining a more advanced dictionary # You can define an empty dictionary by leaving the spa...
[ 2, 16529, 19351, 198, 2, 36361, 25, 14365, 703, 284, 779, 360, 2867, 3166, 287, 11361, 198, 2, 16529, 19351, 198, 198, 2, 2896, 3191, 257, 517, 6190, 22155, 198, 2, 921, 460, 8160, 281, 6565, 22155, 416, 4305, 262, 2272, 1022, 262, ...
3.450549
1,001
import tensorflow as tf import numpy.random as npr import numpy as np if __name__ == '__main__': computeTSNE()
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 13, 25120, 355, 299, 1050, 198, 11748, 299, 32152, 355, 45941, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 24061, 4694, ...
2.727273
44
from __future__ import division import sys import json import numpy as np from numpy.random import randint as rnd import matplotlib as mpl import os mpl.use('TkAgg') import matplotlib.pyplot as plt from matplotlib import cm import matplotlib.animation as animation #----------------------------------------------------...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 13, 25120, 1330, 43720, 600, 355, 374, 358, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198, 11748, ...
2.586721
4,157
from ..data import Data1D data = Data1D(100) data.show()
[ 6738, 11485, 7890, 1330, 6060, 16, 35, 628, 198, 7890, 796, 6060, 16, 35, 7, 3064, 8, 198, 7890, 13, 12860, 3419, 198 ]
2.565217
23
#!/usr/bin/env python # vim: set fileencoding=utf-8 : # Andre Anjos <andre.anjos@idiap.ch> # Thu 20 Mar 2014 12:43:48 CET """Tests for file search utilities """ import os import sys import nose.tools import pkg_resources from nose.plugins.skip import SkipTest from .utils import uniq, egrep, find_file, find_header, fi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 43907, 25, 900, 2393, 12685, 7656, 28, 40477, 12, 23, 1058, 198, 2, 10948, 1052, 73, 418, 1279, 49078, 13, 272, 73, 418, 31, 19830, 499, 13, 354, 29, 198, 2, 26223, 1160, 1526, ...
2.962406
133
"""Main PiShot script. """ from __future__ import print_function import os import subprocess import time import signal import argparse import RPi.GPIO as GPIO INPUT_PIN = 17 # Trigger pin. CLONE_PIN = 23 # Mirror trigger pin. GPIO.setmode(GPIO.BCM) GPIO.setup(INPUT_PIN, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) GPIO.s...
[ 37811, 13383, 13993, 28512, 4226, 13, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 640, 198, 11748, 6737, 198, 11748, 1822, 29572, 198, 11748, 25812, 72, ...
2.345975
1,292
#Imports import math import random import Const ''' NOTE: Relies on numpy. ''' class InvertedIndexCreator: ''' Gives the number of k regions in the coarse quantizer (qc). '''
[ 2, 3546, 3742, 201, 198, 11748, 10688, 201, 198, 11748, 4738, 201, 198, 201, 198, 11748, 4757, 201, 198, 201, 198, 7061, 6, 201, 198, 16580, 25, 220, 201, 198, 6892, 444, 319, 299, 32152, 13, 201, 198, 7061, 6, 201, 198, 4871, 554...
2.356322
87
from __future__ import absolute_import, division, print_function import os import unittest from tempfile import mkstemp import numpy as np np.random.seed(8) if __name__ == '__main__': unittest.main()
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 6738, 20218, 7753, 1330, 33480, 927, 79, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 37659, 1...
2.985507
69
# -*- coding: utf-8 -*- import shutil import tempfile from Crypto.Cipher import AES import mock from twisted.trial import unittest from lbrynet.core import BlobManager from lbrynet.core import Session from lbrynet.core.server import DHTHashAnnouncer from lbrynet.file_manager import EncryptedFileCreator from lbrynet.f...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 198, 6738, 36579, 13, 34, 10803, 1330, 34329, 198, 11748, 15290, 198, 6738, 19074, 13, 45994, 1330, 555, 715, 395, 198, 1...
3.225806
124
# encoding: utf-8 """ Provides the PackURI value type along with some useful known pack URI strings such as PACKAGE_URI. """ import posixpath import re class PackURI(str): """ Provides access to pack URI components such as the baseURI and the filename slice. Behaves as |str| otherwise. """ _file...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 15946, 1460, 262, 6400, 47269, 1988, 2099, 1863, 351, 617, 4465, 1900, 2353, 43975, 13042, 198, 10508, 355, 47035, 11879, 62, 47269, 13, 198, 37811, 198, 198, 11748, 1426, 844, 697...
2.345338
1,555
# This module is part of CARA. Please see the repository at # https://gitlab.cern.ch/cara/cara for details of the license and terms of use. """ This module implements the core CARA models. The CARA model is a flexible, object-oriented numerical model. It is designed to allow the user to swap-out and extend its various...
[ 2, 770, 8265, 318, 636, 286, 17368, 32, 13, 4222, 766, 262, 16099, 379, 198, 2, 3740, 1378, 18300, 23912, 13, 30903, 13, 354, 14, 66, 3301, 14, 66, 3301, 329, 3307, 286, 262, 5964, 290, 2846, 286, 779, 13, 198, 37811, 198, 1212, ...
2.626031
7,760
#!/usr/bin/env python import rospy import os, sys projectDir = os.path.join(os.path.dirname(__file__), '../pysrc/') sys.path.append(projectDir) sys.path.append(projectDir + "kollrobot_controller/") from nodes.MesseDemo import MesseDemo if __name__ == '__main__': try: messeDemo = MesseDemo() mess...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 686, 2777, 88, 198, 11748, 28686, 11, 25064, 198, 16302, 35277, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 705, 40720, 79, 893...
2.331325
166
from flask import Flask, render_template, request from chatterbot import ChatBot from chatterbot.trainers import ListTrainer bot = ChatBot('Test') #create chatbot conv = open('abc.txt', 'r').readlines() bot.set_trainer(ListTrainer) bot.train(conv) while True: request = raw_input('You: ') response = bot.get_res...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 198, 6738, 37303, 13645, 1330, 24101, 20630, 198, 6738, 37303, 13645, 13, 27432, 364, 1330, 7343, 2898, 10613, 198, 198, 13645, 796, 24101, 20630, 10786, 14402, 11537, 1303, 17953, ...
2.968
125
import heapq
[ 11748, 24575, 80, 628, 628, 628 ]
3
6
from os.path import join import sys import numpy as np from seisflows.tools import msg from seisflows.tools import unix from seisflows.tools.array import loadnpy, savenpy from seisflows.tools.code import divides, exists from seisflows.tools.config import SeisflowsParameters, SeisflowsPaths, \ ParameterError PAR ...
[ 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 384, 271, 44041, 13, 31391, 1330, 31456, 198, 6738, 384, 271, 44041, 13, 31391, 1330, 555, 844, 198, 6738, 384, 271, 44041, ...
2.211509
4,605
#!/usr/bin/env python3 # coding: utf-8 from enum import Enum, auto from sys import version_info from typing import Any, Dict, List if version_info.minor < 8: from typing_extensions import TypedDict else: from typing import TypedDict # type: ignore class DefaultWorkflowEngineParameter(TypedDict): """ ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 33829, 1330, 2039, 388, 11, 8295, 198, 6738, 25064, 1330, 2196, 62, 10951, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 198, ...
2.912981
3,459
from pyamf.remoting.client import RemotingService client = RemotingService('https://demo.pyamf.org/gateway/authentication') client.setCredentials('jane', 'doe') service = client.getService('calc') print service.sum(85, 115) # should print 200.0 client.setCredentials('abc', 'def') print service.sum(85, 115).descripti...
[ 6738, 12972, 321, 69, 13, 2787, 10720, 13, 16366, 1330, 3982, 10720, 16177, 198, 198, 16366, 796, 3982, 10720, 16177, 10786, 5450, 1378, 9536, 78, 13, 9078, 321, 69, 13, 2398, 14, 10494, 1014, 14, 41299, 3299, 11537, 198, 16366, 13, 2...
3.234234
111
import torch import numpy as np import math import HumanAug def get_preds(scores): ''' get predictions from score maps in torch Tensor return type: torch.LongTensor ''' assert scores.dim() == 4, 'Score maps should be 4-dim' maxval, idx = torch.max(scores.view(scores.size(0), scores.size(1), -1)...
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, 5524, 12512, 198, 198, 4299, 651, 62, 28764, 82, 7, 1416, 2850, 2599, 198, 220, 220, 220, 705, 7061, 651, 16277, 422, 4776, 8739, 287, 28034, 309, 22854, ...
2.17894
1,358
from typing import List, Tuple # import spacy # import stanza # import trankit from .convert import adjac_to_nested_with_attr from .extract import remove_node_ids from .shingleset import shingleset import json def to_adjac_from_spacy(corpus: str, model #: spacy.lang ) ...
[ 6738, 19720, 1330, 7343, 11, 309, 29291, 198, 2, 1330, 599, 1590, 198, 2, 1330, 336, 35819, 198, 2, 1330, 491, 962, 270, 198, 6738, 764, 1102, 1851, 1330, 9224, 330, 62, 1462, 62, 77, 7287, 62, 4480, 62, 35226, 198, 6738, 764, 230...
2.081377
1,278
import pickle from rasa.nlu.model import UnsupportedModelError
[ 11748, 2298, 293, 198, 198, 6738, 374, 15462, 13, 77, 2290, 13, 19849, 1330, 791, 15999, 17633, 12331, 628 ]
3.421053
19
import pickle import random import time from queue import Queue import numpy as np from ._generate_neighbor import generate_neighbor from ..exception import InfeasibleSolutionException from ..util import get_stop_condition, Heap class TabuSearchAgent: """ Tabu search optimization agent. :type stopping_...
[ 11748, 2298, 293, 198, 11748, 4738, 198, 11748, 640, 198, 6738, 16834, 1330, 4670, 518, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 47540, 8612, 378, 62, 710, 394, 2865, 1330, 7716, 62, 710, 394, 2865, 198, 6738, 11485, 1...
2.34613
4,741
import numpy as np
[ 11748, 299, 32152, 355, 45941 ]
3.6
5
from flask import Flask, render_template,request,redirect,escape,session,copy_current_request_context,jsonify #from vsearch import search4letters #from DBcm import UseDatabase,ConnectionError,CredentialsError,SQLError from checker import check_logged_in from threading import Thread from time import sleep import s...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 25927, 11, 445, 1060, 11, 41915, 11, 29891, 11, 30073, 62, 14421, 62, 25927, 62, 22866, 11, 17752, 1958, 201, 198, 2, 6738, 410, 12947, 1330, 2989, 19, 15653, 201, 198, 2, 6738, 201...
2.341573
445
import sys import os import json from hashlib import md5 import urllib.request from opendrivecli.odloglevel import ODLogLevel from opendrivecli.odaccessperm import ODAccessPerm class OpenDriveAPI: """ OpenDrive API Class """ BASEURL = "https://dev.opendrive.com/api/v1/" ACCESS_PRIVATE = 0 ACCE...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 33918, 198, 6738, 12234, 8019, 1330, 45243, 20, 198, 11748, 2956, 297, 571, 13, 25927, 198, 6738, 1034, 437, 11590, 44506, 13, 375, 75, 2467, 626, 1330, 31245, 11187, 4971, 198, 6738, 1034, 4...
2.14781
5,480
'''Crie um programa que leia a idade e o sexo de várias pessoas. A cada pessoa cadastrada, o programa deverá perguntar se o usuário quer ou não continuar. No final, mostre: A) Quantas pessoas tem mais de 18 anos. B) Quantos homens foram cadastrados. C) Quantas mulheres tem menos de 20 anos.''' homens = 0 adultos = 0 mu...
[ 7061, 6, 34, 5034, 23781, 1430, 64, 8358, 443, 544, 257, 4686, 671, 304, 267, 1714, 78, 390, 410, 6557, 380, 292, 279, 408, 78, 292, 13, 317, 269, 4763, 279, 408, 12162, 20603, 459, 81, 4763, 11, 267, 1430, 64, 390, 332, 6557, 5...
2.074766
535
""" The following describes: A. LOGIC USED IN "dashboard_stats.sql" QUERY TO DETERMINE COVERAGE AND GAPS B. HOW THIS TEST CASE VALIDATES THE ABOVE LOGIC A. LOGIC USED IN "dashboard_stats.sql" QUERY TO DETERMINE COVERAGE AND GAPS Requirement is to calculate *coverage* and *gaps* in a...
[ 37811, 198, 220, 220, 220, 383, 1708, 8477, 25, 628, 220, 220, 220, 220, 220, 220, 220, 317, 13, 41605, 2149, 1294, 1961, 3268, 366, 42460, 3526, 62, 34242, 13, 25410, 1, 19604, 19664, 5390, 38267, 1137, 44, 8881, 47902, 11879, 5357, ...
2.599628
2,153
""" Module for building Data Specs programmatically. Examples: >>> import datacraft >>> builder = datacraft.spec_builder() >>> builder.values('names', ['amy', 'bob', 'cat','dan']) >>> builder.range_spec('ages', data=[22, 33]) {'names': {'type': 'values', 'data': ['amy', 'bob', 'cat', 'dan']}, 'ages...
[ 37811, 198, 26796, 329, 2615, 6060, 2531, 6359, 1430, 49454, 13, 198, 198, 27730, 25, 198, 220, 220, 220, 13163, 1330, 4818, 330, 1617, 198, 220, 220, 220, 13163, 27098, 796, 4818, 330, 1617, 13, 16684, 62, 38272, 3419, 198, 220, 220,...
2.247525
16,362
""" mcpython - a minecraft clone written in python licenced under the MIT-licence (https://github.com/mcpython4-coding/core) Contributors: uuk, xkcdjerry (inactive) Based on the game of fogleman (https://github.com/fogleman/Minecraft), licenced under the MIT-licence Original game "minecraft" by Mojang Studios (www.m...
[ 37811, 198, 76, 13155, 7535, 532, 257, 6164, 3323, 17271, 3194, 287, 21015, 3476, 5864, 739, 262, 17168, 12, 677, 594, 220, 198, 7, 5450, 1378, 12567, 13, 785, 14, 76, 13155, 7535, 19, 12, 66, 7656, 14, 7295, 8, 198, 198, 37146, 6...
2.3782
1,211
# coding: utf-8 """ Attention modules """ import torch from torch import Tensor import torch.nn as nn import torch.nn.functional as F class AttentionMechanism(nn.Module): """ Base attention class """ class BahdanauAttention(AttentionMechanism): """ Implements Bahdanau (MLP) a...
[ 2, 19617, 25, 3384, 69, 12, 23, 201, 198, 37811, 201, 198, 8086, 1463, 13103, 201, 198, 37811, 201, 198, 201, 198, 11748, 28034, 201, 198, 6738, 28034, 1330, 309, 22854, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 117...
2.236797
3,522
__________________________________________________________________________________________________ SELECT Email FROM Person GROUP BY Email HAVING COUNT(*) > 1; __________________________________________________________________________________________________ SELECT DISTINCT p1.Email FROM Person p1 JOIN Person p2 ON p1....
[ 27193, 10221, 834, 198, 46506, 9570, 16034, 7755, 44441, 11050, 9570, 198, 7801, 53, 2751, 327, 28270, 7, 28104, 1875, 352, 26, 198, 27193, 10221, 834, 198, 46506, 360, 8808, 1268, 4177, 279, 16, 13, 15333, 16034, 7755, 279, 16, 198, ...
6.260274
73
from django.db.models import Q from django.contrib.auth import get_user_model from rest_framework.response import Response from rest_framework.status import HTTP_200_OK, HTTP_400_BAD_REQUEST from rest_framework.views import APIView from rest_framework.filters import ( SearchFilter, OrderingFilter, ) from rest_fram...
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 30604, 13, 13376, 13...
3.109929
282
from MultyLayerBackProp import backprop import numpy as np # --- testing perceptron ---# #AND gate i=np.array([[1, 1], [0, 1], [1, 0], [0, 0]]) targets=np.array([[1.], [0.], [0.], [0.]]) # ===================...
[ 6738, 7854, 88, 49925, 7282, 24331, 1330, 736, 22930, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 2, 11420, 4856, 34953, 1313, 11420, 2, 201, 198, 2, 6981, 8946, 220, 220, 220, 220, 220, 220, 220, 220, 201, 198, 72,...
2.244763
907
import os import pytest from lib.codegen.generator import Generator TEMPLATES = os.path.join( (os.path.dirname(os.path.dirname(__file__))), 'codegen_templates', ) SCHEMA = os.path.join( ((os.path.dirname(__file__))), 'testcases', 'contacts1.json' ) @pytest.fixture(params=[ (SCHEMA, 'models', f...
[ 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 9195, 13, 8189, 5235, 13, 8612, 1352, 1330, 35986, 198, 198, 51, 3620, 6489, 29462, 796, 28686, 13, 6978, 13, 22179, 7, 198, 220, 220, 220, 357, 418, 13, 6978, 13, 15908, 3...
2.271277
188
import logging from typing import Any import great_expectations.exceptions as ge_exceptions from great_expectations.core.batch import BatchDefinition from great_expectations.datasource.data_connector.sorter import Sorter from great_expectations.util import is_int, is_numeric logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 6738, 19720, 1330, 4377, 198, 198, 11748, 1049, 62, 1069, 806, 602, 13, 1069, 11755, 355, 4903, 62, 1069, 11755, 198, 6738, 1049, 62, 1069, 806, 602, 13, 7295, 13, 43501, 1330, 347, 963, 36621, 198, 6738, 1049, 62, ...
3.361702
94
#!/usr/bin/env python import csv import sys if __name__ == "__main__": mapper()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 269, 21370, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 285, 11463, 3419 ]
2.428571
35
# -*- coding: utf-8 -*- from __future__ import print_function import os import sys import codecs import unittest from StringIO import StringIO # We include <pkg_root>/src, <pkg_root>/lib/python extend_path = lambda root_path, folder: sys.path.insert( 0, os.path.join(root_path, folder)) ROOT = os.path.dirname(os.pat...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 40481, 82, 198, 11748, 555, 715, 395, 198, 6738, 10903, 9399, 1330, 10903,...
2.490909
220
# Bayesian ratio distribution analysis # including systematic prior scale parameter uncertainties # # # m.mieskolainen@imperial.ac.uk, 2020 import numpy as np import matplotlib.pyplot as plt import numba import sys import os from scipy.integrate import simps sys.path.append('./analysis') sys.path.append('./covidge...
[ 2, 4696, 35610, 8064, 6082, 3781, 198, 2, 1390, 17895, 3161, 5046, 11507, 36553, 198, 2, 220, 198, 2, 198, 2, 285, 13, 76, 444, 74, 349, 391, 268, 31, 320, 7629, 13, 330, 13, 2724, 11, 12131, 628, 198, 11748, 299, 32152, 355, 45...
2.251479
2,366
from animation.arb import Arb from animation.arb_element import distribute_arb_element from animation.posture_manifest import MATCH_NONE from event_testing.resolver import SingleObjectResolver, SingleSimResolver from event_testing.results import TestResult from interactions import ParticipantType from interactions.util...
[ 6738, 11034, 13, 38039, 1330, 943, 65, 198, 6738, 11034, 13, 38039, 62, 30854, 1330, 14983, 62, 38039, 62, 30854, 198, 6738, 11034, 13, 7353, 495, 62, 805, 8409, 1330, 337, 11417, 62, 45, 11651, 198, 6738, 1785, 62, 33407, 13, 411, ...
3.779412
204
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
[ 2, 15069, 357, 66, 8, 2321, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 1...
3.772727
44
import base64 import json import os import sys import re from logging import getLogger, StreamHandler, INFO from google.cloud import storage age = os.environ.get('LIFECYCLE_EXPIRE') ignorePatterns = os.environ.get('IGNORE_PATTERNS') logger = getLogger(__name__) handler = StreamHandler() handler.setLevel(INFO) logger....
[ 11748, 2779, 2414, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 302, 198, 6738, 18931, 1330, 651, 11187, 1362, 11, 13860, 25060, 11, 24890, 198, 6738, 23645, 13, 17721, 1330, 6143, 198, 198, 496, 796, 28686, 13, ...
2.761905
252
#!/usr/bin/env python # -*- coding: utf-8 -*- """Load data task""" from trading_bot.utils import make_logger LOGGER = make_logger(__name__) def remove_outdated_symbols(): """Remove outdated symbols""" LOGGER.info("I've removed the symbols info which is outdated")
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 8912, 1366, 4876, 37811, 628, 198, 6738, 7313, 62, 13645, 13, 26791, 1330, 787, 62, 6404, 1362, 198, 198, 25294,...
2.895833
96
# %% # %reload_ext autoreload # %autoreload 2 # %matplotlib inline NOTEBOOK = 0 # %% from omegaconf import OmegaConf cfg = OmegaConf.load(r'/home/michael/dev/phoenix/PytorchLightningTools/notebooks/imagenette/config.yaml') # %% import numpy as np from skimage.transform import resize SIZE = (3, 128, 128) # %% impo...
[ 2, 43313, 198, 2, 4064, 260, 2220, 62, 2302, 1960, 382, 2220, 198, 2, 4064, 2306, 382, 2220, 362, 198, 2, 4064, 6759, 29487, 8019, 26098, 198, 16580, 39453, 796, 657, 198, 198, 2, 43313, 198, 6738, 267, 28917, 7807, 69, 1330, 19839,...
2.37781
1,379
# -*- coding: utf-8 -*- """ report.schema ~~~~~~~~~~~~~~~~~~~~ Custom schema validator for biovis config. :copyright: © 2019 by the BioVis team. :license: AGPL, see LICENSE.md for more details. """ from jsonschema.exceptions import ValidationError from jsonschema import validators, Draft7Validato...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 989, 13, 15952, 2611, 198, 220, 220, 220, 220, 27156, 8728, 628, 220, 220, 220, 8562, 32815, 4938, 1352, 329, 3182, 709, 271, 4566, 13, 628,...
2.836257
171
# Code generated by lark_sdk_gen. DO NOT EDIT. from pylark.lark_request import RawRequestReq, _new_method_option from pylark import lark_type, lark_type_sheet, lark_type_approval import attr import typing import io @attr.s @attr.s @attr.s
[ 2, 6127, 7560, 416, 300, 668, 62, 21282, 74, 62, 5235, 13, 8410, 5626, 48483, 13, 198, 198, 6738, 279, 2645, 668, 13, 75, 668, 62, 25927, 1330, 16089, 18453, 3041, 80, 11, 4808, 3605, 62, 24396, 62, 18076, 198, 6738, 279, 2645, 66...
2.655914
93
import csv import json import os import sys import argparse import pandas as pd def get_count_to_submit(counts, n_total, dataset, method, subsampling=None, data_format=None): """ Function that takes info about job and checks in counts dictionary how many runs are still missing (= less than n_total) ...
[ 11748, 269, 21370, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 4299, 651, 62, 9127, 62, 1462, 62, 46002, 7, 9127, 82, 11, 299, 62, 23350, 11, 27039,...
1.933643
6,028
"""The loaders are used to load the data from a particular format to :class:`numpy.ndarray` or :class:`List[numpy.ndarray]` """ import os from typing import List, Union import nibabel as nib import numpy as np import torch from PIL import Image HANDLED_TYPES = [".pt", ".nii", "nii.gz", "bmp", "jpg", "jpeg", "png"] ...
[ 37811, 464, 3440, 364, 389, 973, 284, 3440, 262, 1366, 422, 257, 1948, 5794, 284, 1058, 4871, 25, 63, 77, 32152, 13, 358, 18747, 63, 393, 198, 25, 4871, 25, 63, 8053, 58, 77, 32152, 13, 358, 18747, 60, 63, 198, 37811, 628, 198, ...
2.160671
1,251
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
[ 2, 15069, 357, 66, 8, 13130, 11, 15127, 23929, 44680, 6234, 13, 1439, 2489, 10395, 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, 284...
2.915584
462
import copy import pprint import numpy as np from shapely import geometry from .dedup import Dedup from ..ops import is_ccw from ..utils import serialize_as_svg from ..utils import serialize_as_json class Hashmap(Dedup): """ hash arcs based on their type """ def to_dict(self): """ Con...
[ 11748, 4866, 198, 11748, 279, 4798, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 5485, 306, 1330, 22939, 198, 6738, 764, 9395, 929, 1330, 35023, 929, 198, 6738, 11485, 2840, 1330, 318, 62, 535, 86, 198, 6738, 11485, 26791, 1330, 11389...
2.012662
7,029
__author__ = 'Sushant' from graph import Graph import threading from prioritydict import PriorityDict """ G = Dijkstra(10, 1) G.add_edge(1, 2, 0.1) G.add_edge(1, 3, 0.3) G.add_edge(2, 3, 0.1) G.add_edge(3, 4, 0.1) G.add_edge(2, 4, 0.5) print "Calculating all possible shortest paths" G.calculate_all_shortest_paths...
[ 834, 9800, 834, 796, 705, 50, 1530, 415, 6, 198, 198, 6738, 4823, 1330, 29681, 198, 11748, 4704, 278, 198, 6738, 8475, 11600, 1330, 34416, 35, 713, 628, 198, 198, 37811, 198, 38, 796, 360, 45961, 12044, 7, 940, 11, 352, 8, 198, 19...
2.340314
191
from distutils.core import setup import requests.certs import py2exe setup( name='hogge', version='1.0.1', url='https://github.com/igortg/ir_clubchamps', license='LGPL v3.0', author='Igor T. Ghisi', description='', console=[{ "dest_base": "ir_clubchamps", "script": "main.py...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 11748, 7007, 13, 22583, 82, 198, 11748, 12972, 17, 13499, 628, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 31897, 469, 3256, 198, 220, 220, 220, 2196, 11639, 16, 13, 15, 13, 16, 3256...
1.981538
325
# Copyright (c) 2019-2020, NVIDIA 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/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
[ 2, 15069, 357, 66, 8, 13130, 12, 42334, 11, 15127, 23929, 44680, 6234, 13, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, ...
2.421905
1,050