content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
""" eve_travel_helper -- EVE Online travel planning helper tool package This tool is intended to provide assistance to EVE Online players with planning travel routes. Modules: * routing * server Sub-packages: * dbclient """
[ 37811, 28001, 62, 35927, 62, 2978, 525, 1377, 32356, 7467, 3067, 5410, 31904, 2891, 5301, 198, 198, 1212, 2891, 318, 5292, 284, 2148, 6829, 284, 32356, 7467, 1938, 351, 198, 11578, 768, 3067, 11926, 13, 198, 198, 5841, 5028, 25, 198, ...
3.492754
69
from urllib.parse import urljoin import pytest import respx from httpx import Client as HTTPXClient from httpx import Response from healthchecks_io import CheckCreate from healthchecks_io import CheckTrap from healthchecks_io import CheckUpdate from healthchecks_io import PingFailedError from healthchecks_io import W...
[ 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 22179, 198, 198, 11748, 12972, 9288, 198, 11748, 1217, 87, 198, 6738, 2638, 87, 1330, 20985, 355, 14626, 55, 11792, 198, 6738, 2638, 87, 1330, 18261, 198, 198, 6738, 1535, 42116, 62, 952, ...
2.951613
186
""" Distributions and Probability Tools """ import math import numpy as np import matplotlib.pyplot as plt from matplotlib.patches import Ellipse from scipy.stats import multivariate_normal #plt.style.use('seaborn') # 第一簇的数据 num1, mu1, var1 = 400, [0.5, 0.5], [1, 3] X1 = np.random.multivariate_normal(mu1...
[ 37811, 201, 198, 20344, 2455, 507, 290, 30873, 1799, 20003, 201, 198, 37811, 201, 198, 11748, 10688, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 6738, 2603, 29487...
1.87963
324
import unittest from loop import WrapBuffer from utils import make_sin_sound, SD_RATE sound_len = 500_000 # samples sound = make_sin_sound(440, sound_len / SD_RATE) if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 9052, 1330, 41028, 28632, 198, 6738, 3384, 4487, 1330, 787, 62, 31369, 62, 23661, 11, 9834, 62, 49, 6158, 198, 198, 23661, 62, 11925, 796, 5323, 62, 830, 220, 1303, 8405, 198, 23661, 796, 787, 6...
2.658537
82
#!/usr/bin/env python # -*- coding: utf-8 -*- """Python Team Awareness Kit (PyTAK) Module Tests.""" import asyncio import csv import io import urllib import xml.etree.ElementTree import pytest import adsbxcot.functions __author__ = 'Greg Albrecht W2GMD <oss@undef.net>' __copyright__ = 'Copyright 2021 Orion Labs, I...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 37906, 4816, 36735, 10897, 357, 20519, 5603, 42, 8, 19937, 30307, 526, 15931, 198, 198, 11748, 30351, 952, ...
2.715232
151
# Exercise 4.3 from matplotlib import pyplot as plt from RSE.impedance import Impedance Z_1 = Impedance(3, 5) Z_2 = Impedance(5, -6) Z_0 = Impedance(2, 3) Z_12 = Z_1.parallel(Z_2) Z_tot = Z_0 + Z_12 E = complex(100, 0) # Compute currents. I = E/Z_tot.Z V_12 = Z_0.Z * I V_23 = Z_12.Z * I I_Z1 = V_12 / Z_1.Z I_Z2 ...
[ 2, 32900, 604, 13, 18, 198, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 6738, 371, 5188, 13, 320, 9124, 590, 1330, 1846, 9124, 590, 628, 198, 198, 57, 62, 16, 796, 1846, 9124, 590, 7, 18, 11, 642, 8, 198...
1.889535
516
__version__ = '0.0.1' def flatten_list(input_list): """ Flattens list with many nested lists. >>> flatten_list([1, [2, [3], [4]]]) [1, 2, 3, 4] """ result = [] for item in input_list: if isinstance(item, list): result.extend(flatten_list(item)) # yield from...
[ 834, 9641, 834, 796, 705, 15, 13, 15, 13, 16, 6, 628, 198, 4299, 27172, 268, 62, 4868, 7, 15414, 62, 4868, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1610, 1078, 641, 1351, 351, 867, 28376, 8341, 13, 628, 220, 220, 220...
2.037915
211
from sys import stdout from tqdm import tqdm from composeml.data_slice import DataSliceGenerator from composeml.label_search import ExampleSearch, LabelSearch from composeml.label_times import LabelTimes class LabelMaker: """Automatically makes labels for prediction problems.""" def __init__(self, target_e...
[ 6738, 25064, 1330, 14367, 448, 198, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 6738, 36664, 4029, 13, 7890, 62, 48369, 1330, 6060, 11122, 501, 8645, 1352, 198, 6738, 36664, 4029, 13, 18242, 62, 12947, 1330, 17934, 18243,...
2.347452
4,297
# 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.71668
5,072
import dlib import pickle import numpy as np import os import argparse from utils import path_utils from utils import identity_profile_utils def main(path=None): """ Creates an IdentityProfile :param path: (str) absolute path to a directory containing training images - the end of the path...
[ 11748, 288, 8019, 198, 11748, 2298, 293, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 6738, 3384, 4487, 1330, 3108, 62, 26791, 198, 6738, 3384, 4487, 1330, 5369, 62, 13317, 62, 26791, 628, 198, 42...
2.512948
1,004
# https://practice.geeksforgeeks.org/problems/red-or-green5711/1/?category[]=Strings&category[]=Strings&page=1&query=category[]Stringspage1category[]Strings# #User function Template for python3 #{ # Driver Code Starts #Initial Template for Python 3 if __name__=='__main__': t=int(input()) for _ in range(t): ...
[ 2, 3740, 1378, 39541, 13, 469, 2573, 30293, 2573, 13, 2398, 14, 1676, 22143, 14, 445, 12, 273, 12, 14809, 3553, 1157, 14, 16, 20924, 22872, 21737, 28, 13290, 654, 5, 22872, 21737, 28, 13290, 654, 5, 7700, 28, 16, 5, 22766, 28, 228...
2.397849
186
""" Copyright 2015 INTEL RESEARCH AND INNOVATION IRELAND LIMITED 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, 1853, 17828, 3698, 15731, 17133, 3398, 5357, 3268, 45, 8874, 6234, 314, 16448, 6981, 40880, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 77...
3.782946
258
import logging import pickle import time try: import redis except ImportError: redis = None from .pubsub_manager import PubSubManager logger = logging.getLogger('socketio') class RedisManager(PubSubManager): # pragma: no cover """Redis based client manager. This class implements a Redis backend f...
[ 11748, 18931, 198, 11748, 2298, 293, 198, 11748, 640, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 2266, 271, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 2266, 271, 796, 6045, 198, 198, 6738, 764, 12984, 7266, 62, 37153, 1330,...
2.786693
511
import logging from django import forms from django.contrib.admin.forms import AdminAuthenticationForm from django.contrib.auth.forms import ( AdminPasswordChangeForm, PasswordChangeForm, UserCreationForm) from django.utils.translation import ugettext_lazy as _ from contenteditor import models class LoggingAuth...
[ 11748, 18931, 198, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 28482, 13, 23914, 1330, 32053, 47649, 3299, 8479, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 357, 198, 220, 220...
2.853958
897
import numpy as np import torch from sklearn import metrics import pickle
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 1341, 35720, 1330, 20731, 198, 11748, 2298, 293, 198 ]
3.894737
19
import logging from datetime import datetime from unittest import TestCase from unittest.mock import MagicMock, patch, ANY from uuid import uuid1 from log_decorator import log # noinspection DuplicatedCode # noinspection DuplicatedCode
[ 11748, 18931, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 11, 8529, 11, 15529, 198, 6738, 334, 27112, 1330, 334, 27112, 16, 198, 1...
3.306667
75
#!/usr/bin/env python # -*- encoding: utf-8 -*- """ @File : 1728.py @Contact : huanghoward@foxmail.com @Modify Time : 2022/5/10 22:30 ------------ """ import collections from typing import List if __name__ == '__main__': s = Solution() print(s.canMouseWin(["####F","#C...","M...."], catJ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 8979, 220, 220, 220, 1058, 220, 220, 1596, 2078, 13, 9078, 220, 220, 220, 220, 198, 31, 17829, 1058, ...
2.331081
148
# asynctest.py Demo of asynchronous code scheduling tasks with cron # Copyright (c) 2020 Peter Hinch # Released under the MIT License (MIT) - see LICENSE file import uasyncio as asyncio from sched.sched import schedule from time import localtime try: asyncio.run(main()) finally: _ = asyncio.new_event_loop()
[ 2, 355, 2047, 310, 395, 13, 9078, 34588, 286, 39354, 2438, 26925, 8861, 351, 1067, 261, 198, 198, 2, 15069, 357, 66, 8, 12131, 5613, 367, 8589, 198, 2, 28728, 739, 262, 17168, 13789, 357, 36393, 8, 532, 766, 38559, 24290, 2393, 198,...
3.168317
101
#!/usr/bin/env python3 # -*- coding=utf-8 -*- import cv2 as cv import numpy as np """ 视频的读写与处理 FPS即每秒多少帧的处理能力,一般情况下(人类对300毫秒以下的变动是无法察觉的)每秒大于5帧的处理可以认为是视屏处理 """ if "__main__" == __name__: main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 2, 532, 9, 12, 19617, 28, 40477, 12, 23, 532, 9, 12, 201, 198, 201, 198, 11748, 269, 85, 17, 355, 269, 85, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, ...
1.040541
222
# todo: 后续需要重新规划major code和mirror code,前期先这样写 class AlgorithmOperatorException(CustomException): """ 算子异常基类 """ MAJOR_CODE = 1 class AlgorithmInputParameterException(AlgorithmOperatorException): """ 算子入参异常 """ MIRROR_CODE = 11 class InputParameterAbnormalException(AlgorithmInputPar...
[ 2, 284, 4598, 25, 10263, 238, 236, 163, 119, 255, 165, 250, 222, 17358, 223, 34932, 235, 23877, 108, 164, 100, 226, 161, 7134, 22478, 2438, 161, 240, 234, 10793, 1472, 2438, 171, 120, 234, 30298, 235, 17312, 253, 17739, 230, 32573, ...
1.866732
2,026
from pyspark.sql import SparkSession import os
[ 6738, 279, 893, 20928, 13, 25410, 1330, 17732, 36044, 198, 198, 11748, 28686, 628 ]
3.5
14
import logging import os import tempfile from contextlib import contextmanager from ctypes import Structure, c_int, c_uint32, c_char_p, c_void_p, pointer, CDLL, RTLD_GLOBAL from dataclasses import dataclass from typing import ByteString from erica.config import get_settings, Settings from erica.pyeric.eric_errors impo...
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 20218, 7753, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 6738, 269, 19199, 1330, 32522, 11, 269, 62, 600, 11, 269, 62, 28611, 2624, 11, 269, 62, 10641, 62, 79, 11, 269, 62, 19382, 62, ...
2.255188
3,903
import numpy as np from abstractclasses import solver, solver_model """ Matrix multiplcation solves for the distance between two points in 2 or 3 dimensional space. """ # ———————————————————————————————————————————————— # MATRIX MULTIPLICATION SOLVER CLASS # ———————————————————————————————————————————————...
[ 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 6738, 12531, 37724, 1330, 1540, 332, 11, 1540, 332, 62, 19849, 201, 198, 201, 198, 37811, 201, 198, 46912, 15082, 30907, 39107, 329, 262, 5253, 1022, 734, 2173, 287, 362, 393, 513, 20...
3.603053
131
import os import pickle from gensim.models.phrases import Phraser, Phrases from gensim.utils import SaveLoad as gensimSaveLoad from typing import List, Text, Any PathType = str # TODO: Search truth typing of phraser PhraserType = Any # %% # %% # %% # %% # %% # print("Saving done") # %% # %% # %% if ...
[ 11748, 28686, 198, 11748, 2298, 293, 198, 198, 6738, 308, 641, 320, 13, 27530, 13, 746, 81, 1386, 1330, 1380, 81, 6005, 11, 1380, 81, 1386, 198, 6738, 308, 641, 320, 13, 26791, 1330, 12793, 8912, 355, 308, 641, 320, 16928, 8912, 198...
2.578571
140
from .helper_class import AIBC
[ 6738, 764, 2978, 525, 62, 4871, 1330, 9552, 2749, 628 ]
3.2
10
"""Problem 113 10 February 2006 Working from left-to-right if no digit is exceeded by the digit to its left it is called an increasing number; for example, 134468. Similarly if no digit is exceeded by the digit to its right it is called a decreasing number; for example, 66420. We shall call a positive integer that i...
[ 37811, 40781, 17318, 198, 940, 3945, 4793, 198, 198, 28516, 422, 1364, 12, 1462, 12, 3506, 611, 645, 16839, 318, 20672, 416, 262, 16839, 284, 663, 198, 9464, 340, 318, 1444, 281, 3649, 1271, 26, 329, 1672, 11, 1511, 2598, 3104, 13, ...
2.906542
321
totalGasto = 0 maisdeMil = 0 maisBarato = ['', 1000000.00] while True: nome = str(input('nome do produto: ')) preço = float(input('preço do produto: ')) totalGasto += preço if preço > 1000: maisdeMil += 1 if preço < maisBarato[1]: maisBarato[0] = nome maisBarato[1] = preço ...
[ 23350, 38, 459, 78, 796, 657, 198, 2611, 271, 2934, 24857, 796, 657, 198, 2611, 271, 10374, 5549, 796, 37250, 3256, 1802, 2388, 13, 405, 60, 198, 4514, 6407, 25, 198, 220, 220, 220, 299, 462, 796, 965, 7, 15414, 10786, 77, 462, 46...
2.168285
309
__author__ = 'Simon Birrer' """ this file contains standard routines """ import numpy as np import mpmath import itertools from lenstronomy.Util.numba_util import jit from lenstronomy.Util.package_util import exporter export, __all__ = exporter() @export def merge_dicts(*dict_args): """ Given any number of...
[ 834, 9800, 834, 796, 705, 35475, 12817, 11751, 6, 198, 198, 37811, 198, 5661, 2393, 4909, 3210, 31878, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 285, 4426, 776, 198, 11748, 340, 861, 10141, 198, 6738, 18896, 301, ...
2.188349
9,201
""" This code is based on code from voila, copied under the following license: BSD License Copyright (c) 2018 Voila contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: a. Redistributions o...
[ 37811, 198, 1212, 2438, 318, 1912, 319, 2438, 422, 7608, 10102, 11, 18984, 739, 262, 1708, 5964, 25, 198, 198, 21800, 13789, 198, 198, 15269, 357, 66, 8, 2864, 569, 9437, 64, 20420, 13, 198, 3237, 2489, 10395, 13, 198, 198, 7738, 39...
3.444915
708
import numpy as np import matplotlib.pyplot as plt plt.rcParams["figure.figsize"] = (20,10) from distributionLib import Dist np.random.seed(404) N = 1000000 data = np.random.choice([0, 1], size=(N,1), p=[0.57, 0.43]) for sample in range(100,10000,500): ind = np.random.randint(0,N,[sample,1]) Dist.MOE(data[ind...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 489, 83, 13, 6015, 10044, 4105, 14692, 26875, 13, 5647, 7857, 8973, 796, 357, 1238, 11, 940, 8, 198, 6738, 6082, 25835, 1330, 4307, 198,...
2.349315
146
from django import forms from django.forms import ModelForm from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User # from cities_light.models import Country, Region, City from .models import (ServiceProvider, CustomerProfile, RatingAndReview) class Serv...
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 23914, 1330, 9104, 8479, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 11787, 12443, 341, 8479, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27...
3
345
import logging from ibmsecurity.utilities import tools logger = logging.getLogger(__name__) def get_network(isamAppliance, application_interface, statistics_duration, check_mode=False, force=False): """ Retrieving the Application Interface Statistics """ return isamAppliance.invoke_get("Retrieving th...
[ 11748, 18931, 198, 6738, 24283, 76, 12961, 13, 315, 2410, 1330, 4899, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 4299, 651, 62, 27349, 7, 271, 321, 4677, 75, 3610, 11, 3586, 62, 39994, ...
1.929767
4,300
#!/usr/bin/env python import setuptools from setuptools import setup import tarfile import os, sys from setupbase import ( UpdateSubmodules, check_submodule_status, update_submodules, require_clean_submodules ) #------------------------------------------------------------------------------- # Make ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 900, 37623, 10141, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 11748, 13422, 7753, 198, 11748, 28686, 11, 25064, 198, 198, 6738, 9058, 8692, 1330, 357, 198, 220, 220,...
2.675147
511
import urllib2 from bs4 import BeautifulSoup from datetime import datetime import pandas as pd import argparse """Fetch all daringfireball articles since 2002 count the article character length """ if __name__ == "__main__": parser = argparse.ArgumentParser( description='Fetch all daringfireball art...
[ 11748, 2956, 297, 571, 17, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 1822, 29572, 198, 198, 37811, 37, 7569, 477, 27939, 6495, 1894, 6685...
1.902755
1,234
# -*- coding: utf-8 -*- """Top-level package for cycle-arbitrage.""" __author__ = """drinksober""" __email__ = 'me@mum5.cn' __version__ = '0.1.0'
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 9126, 12, 5715, 5301, 329, 6772, 12, 283, 2545, 8394, 526, 15931, 198, 198, 834, 9800, 834, 796, 37227, 7109, 676, 568, 527, 37811, 198, 834, 12888, 834, 7...
2.208955
67
# -*- coding: utf-8 -*- """BDA_Assignment_04_v2.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1gfYg_0pK4fVIOxYRi9ybLD3ySsqR2cg2 # Streaming Twitter Data Using Kafka Importing the libraries: """ !pip install kafka-python !pip install python-tw...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 33, 5631, 62, 8021, 16747, 62, 3023, 62, 85, 17, 13, 541, 2047, 65, 198, 198, 38062, 4142, 7560, 416, 1623, 4820, 2870, 13, 198, 198, 20556, 2393, 318, 5140, ...
2.994083
676
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import io import collections import functools as ft import pytest import pyzpl import pyzpl2 FIXTURE_1_DATA = b""" 1. ZPL configuration file ex...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834,...
2.13981
3,891
# -*- coding: utf-8 -*- import collections from expects import * from booby import Model, fields, errors from tests.unit._helpers import MyDict
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 17268, 198, 198, 6738, 13423, 1330, 1635, 198, 198, 6738, 1489, 26730, 1330, 9104, 11, 7032, 11, 8563, 198, 6738, 5254, 13, 20850, 13557, 16794, 364, 1330, 2...
3.08
50
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628 ]
3.75
8
import os, subprocess import requests url_search = 'http://127.0.0.1:8000/search' url_image = 'http://127.0.0.1:8000/image' proxies = {} while True: query = input('Query: ') if not query: break results = get_search(query) if len(results) == 0: print('No results') ...
[ 11748, 28686, 11, 850, 14681, 201, 198, 11748, 7007, 201, 198, 201, 198, 6371, 62, 12947, 796, 705, 4023, 1378, 16799, 13, 15, 13, 15, 13, 16, 25, 33942, 14, 12947, 6, 201, 198, 6371, 62, 9060, 796, 705, 4023, 1378, 16799, 13, 15,...
2.408377
382
# -*- coding: utf-8 -*- # Copyright 2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 1584, 44628, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428...
3.439689
257
''' Manage Azure API Management API's. ''' from ... pyaz_utils import _call_az from . import operation, release, revision, versionset def import_(path, resource_group, service_name, specification_format, api_id=None, api_revision=None, api_type=None, api_version=None, api_version_set_id=None, description=None, displa...
[ 7061, 6, 198, 5124, 496, 22134, 7824, 8549, 7824, 338, 13, 198, 7061, 6, 198, 6738, 2644, 12972, 1031, 62, 26791, 1330, 4808, 13345, 62, 1031, 198, 6738, 764, 1330, 4905, 11, 2650, 11, 18440, 11, 6300, 316, 628, 198, 4299, 1330, 410...
3.615538
3,012
""" ================================== Fourier ring correlation of images ================================== Estimation of the image resolution ---------------------------------- In electron microscopy the Fourier Ring Correlation (FRC) is widely used as a measure for the resolution of an image. This very practical ap...
[ 37811, 198, 10052, 855, 198, 37, 280, 5277, 5858, 16096, 286, 4263, 198, 10052, 855, 198, 198, 22362, 18991, 286, 262, 2939, 6323, 198, 3880, 438, 198, 818, 11538, 21145, 11081, 262, 34296, 5277, 12569, 2744, 49501, 357, 37, 7397, 8, ...
2.360419
1,526
import ctypes import os import struct import numpy as np from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GL.shaders import * from OpenGL.arrays.arraydatatype import * from OpenGL.raw.GL.EXT.texture_compression_s3tc import * from PyEngine3D.Common import logger dxgi_pixel_or_block_size = [ 0, 16, 16, ...
[ 11748, 269, 19199, 198, 11748, 28686, 198, 11748, 2878, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 30672, 13, 8763, 1330, 1635, 198, 6738, 30672, 13, 8763, 52, 1330, 1635, 198, 6738, 30672, 13, 8763, 13, 1477, 9972, 1330, 1635,...
2.750413
1,210
"""This module provides EIGENVAL.""" from __future__ import division, print_function import csv import sys from pathlib import Path from logging import DEBUG, INFO, Formatter, StreamHandler, getLogger import numpy as np from typing import Dict, Optional, Sequence, Tuple, List, IO, Union from vaspy.tools import open_...
[ 37811, 1212, 8265, 3769, 412, 3528, 1677, 23428, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 269, 21370, 198, 11748, 25064, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 18931, 1330, ...
2.057358
5,056
streamInput = data.get('stream_name').lower() chromecastInput = data.get('media_player') chromecast = chromecastInput streams = { "overwatchleague": "overwatchleague", "overwatch league": "overwatchleague", "owl": "overwatchleague", "lcs": "riotgames", "ninja": "ninja", "lupo": "drlupo", "d...
[ 5532, 20560, 796, 1366, 13, 1136, 10786, 5532, 62, 3672, 27691, 21037, 3419, 198, 28663, 43299, 20560, 796, 1366, 13, 1136, 10786, 11431, 62, 7829, 11537, 198, 28663, 43299, 796, 15358, 43299, 20560, 198, 198, 5532, 82, 796, 1391, 198, ...
2.59375
576
""" Utilities used across the project. """ # Core from . import core from .core import * # noqa # Stats from . import stats from .stats import * # noqa __all__ = [] __all__.extend(core.__all__) __all__.extend(stats.__all__)
[ 37811, 198, 18274, 2410, 973, 1973, 262, 1628, 13, 198, 37811, 198, 198, 2, 7231, 198, 6738, 764, 1330, 4755, 198, 6738, 764, 7295, 1330, 1635, 220, 1303, 645, 20402, 198, 198, 2, 20595, 198, 6738, 764, 1330, 9756, 198, 6738, 764, 3...
2.705882
85
from src.data.models.election_event import ElectionEvent from src.services.election_history_service import ElectionHistoryService
[ 6738, 12351, 13, 7890, 13, 27530, 13, 14300, 62, 15596, 1330, 14219, 9237, 198, 6738, 12351, 13, 30416, 13, 14300, 62, 23569, 62, 15271, 1330, 14219, 18122, 16177, 628 ]
4.517241
29
import yaml from getpass import getpass from concurrent.futures import ThreadPoolExecutor, wait from netmiko import ConnectHandler MAX_WORKERS = 3 if __name__ == "__main__": main()
[ 11748, 331, 43695, 198, 6738, 651, 6603, 1330, 651, 6603, 198, 6738, 24580, 13, 69, 315, 942, 1330, 14122, 27201, 23002, 38409, 11, 4043, 198, 6738, 2010, 76, 12125, 1330, 8113, 25060, 628, 198, 22921, 62, 33249, 4877, 796, 513, 628, ...
3.147541
61
""" A question to discover the text of an element or many elements. Questions must be asked with an expected resolution, like so: the_actor.should_see_the( (Text.of_the(WELCOME_BANNER), ReadsExactly("Welcome!")), ) """ from typing import List, Union from ..actor import Actor from ..pacing import bea...
[ 37811, 198, 32, 1808, 284, 7073, 262, 2420, 286, 281, 5002, 393, 867, 4847, 13, 20396, 198, 27238, 307, 1965, 351, 281, 2938, 6323, 11, 588, 523, 25, 628, 220, 220, 220, 262, 62, 11218, 13, 21754, 62, 3826, 62, 1169, 7, 198, 220, ...
2.540541
925
import itertools print(look_and_say(8))
[ 11748, 340, 861, 10141, 198, 198, 4798, 7, 5460, 62, 392, 62, 16706, 7, 23, 4008 ]
2.5
16
# coding: utf-8 import datetime import unittest import fastobo
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 4818, 8079, 198, 11748, 555, 715, 395, 198, 198, 11748, 3049, 20391, 628, 198 ]
2.791667
24
'''Crie um programa que tenha uma tupla única com nomes de produtos e seus respectivos preços, na sequência. No final, mostre uma listagem de preços, organizando os dados em forma tabular.''' lista = ('Lápis', 1.5, 'Borracha', 1.75, 'Caneta', 2.5, 'Corretivo', 3.5, 'estojo', 15.50, ...
[ 7061, 6, 34, 5034, 23781, 1430, 64, 8358, 3478, 3099, 334, 2611, 12777, 489, 64, 6184, 118, 77, 3970, 401, 299, 2586, 390, 40426, 315, 418, 304, 384, 385, 2461, 452, 418, 662, 16175, 418, 11, 198, 2616, 4726, 25792, 10782, 544, 13, ...
1.920886
316
#!/usr/bin/env python3 """ Run the command to compile cyfolds, optionally removing unneeded files. Note this command also works (but doesn't set compiler options): cythonize -a -i cyfolds.pyx """ import sys, os python_executable = sys.executable compile_command = python_executable + " setup.py build_ext --inpla...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 198, 10987, 262, 3141, 284, 17632, 3075, 69, 10119, 11, 42976, 10829, 555, 27938, 3696, 13, 198, 198, 6425, 428, 3141, 635, 2499, 357, 4360, 1595, 470, 900, 17050, 3689...
2.640496
242
from django.contrib.auth.models import BaseUserManager
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 7308, 12982, 13511, 628 ]
3.733333
15
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Cal3d(AutotoolsPackage): """Skeletal 3D character animation library written in C++""" ...
[ 2, 15069, 2211, 12, 1238, 2481, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, ...
2.424242
627
# This script is responsible for changing the older metadata format # (files resources.json and captures.json stored in the resources/ # directory) to the newer format (a properties.json file stored with # every artifact archive). import json, os, subprocess, argparse res = {} cap = {} # Read old resources and captu...
[ 2, 770, 4226, 318, 4497, 329, 5609, 262, 4697, 20150, 5794, 198, 2, 357, 16624, 4133, 13, 17752, 290, 23007, 13, 17752, 8574, 287, 262, 4133, 14, 198, 2, 8619, 8, 284, 262, 15064, 5794, 357, 64, 6608, 13, 17752, 2393, 8574, 351, 1...
3.389571
326
# Script to perform comparison with CMIP6 models # On NERSC """ source /global/common/software/e3sm/anaconda_envs/load_latest_e3sm_unified_cori-haswell.sh """ import glob import matplotlib.pyplot as plt import matplotlib.cbook as cbook import matplotlib.transforms as mtransforms import numpy as np import numpy.ma as ...
[ 2, 12327, 284, 1620, 7208, 351, 16477, 4061, 21, 4981, 198, 198, 2, 1550, 399, 4877, 34, 198, 37811, 198, 10459, 1220, 20541, 14, 11321, 14, 43776, 14, 68, 18, 5796, 14, 272, 330, 13533, 62, 268, 14259, 14, 2220, 62, 42861, 62, 68...
2.223555
3,167
import numpy as np def herding_selection(x, m, mean_=None): """ Source: https://github.com/PatrickZH/End-to-End-Incremental-Learning/blob/39d6f4e594e805a713aa7a1deedbcb03d1f2c9cc/utils.py#L176 Parameters ---------- x: the features, n * dimension m: the number of selected exe...
[ 11748, 299, 32152, 355, 45941, 198, 198, 4299, 607, 12083, 62, 49283, 7, 87, 11, 285, 11, 1612, 62, 28, 14202, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 8090, 25, 3740, 1378, 12567, 13, 785, 14, 3271...
1.945534
459
import sqlalchemy
[ 11748, 44161, 282, 26599, 628, 198 ]
3.333333
6
# coding: utf-8 from __future__ import unicode_literals import re from .commonwebdriver import SeleniumInfoExtractor from ..utils import ( ExtractorError, sanitize_filename, ) import hashlib import sys import traceback from selenium.webdriver.support import expected_conditions as ec from selenium.webdriver...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 302, 198, 198, 6738, 764, 11321, 12384, 26230, 1330, 15300, 47477, 12360, 11627, 40450, 198, 6738, 11485, 26791, 1330, 357...
2.868263
167
# Definition of a class with some basic behaviour class Person: """ An example class to hold a persons name and age""" p3 = Person('Adam', 21) print(p3) p3.birthday() print(p3)
[ 2, 30396, 286, 257, 1398, 351, 617, 4096, 9172, 198, 198, 4871, 7755, 25, 198, 197, 37811, 1052, 1672, 1398, 284, 1745, 257, 6506, 1438, 290, 2479, 37811, 628, 198, 79, 18, 796, 7755, 10786, 23159, 3256, 2310, 8, 198, 4798, 7, 79, ...
3.067797
59
import copy, json, random import numpy as np from corerl.core import ScheduledParameter from corerl.function import KernelRepresentation import pdb import pickle import csv import matplotlib.pyplot as plt from enum import Enum try: from configparser import ConfigParser except ImportError: from ConfigParser imp...
[ 11748, 4866, 11, 33918, 11, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 4755, 45895, 13, 7295, 1330, 27774, 6309, 36301, 198, 6738, 4755, 45895, 13, 8818, 1330, 32169, 40171, 341, 198, 11748, 279, 9945, 198, 11748, 2298, 293, 1...
3.51
100
""""@package config Contains all config files necessary for simulator Rignumber body configuration data """ import copy import time import inspect from config.protobuf import * import math IS_ACCURATE_TIMER = False U_X = np.array([1, 0, 0]) U_Y = np.array([0, 1, 0]) U_Z = np.array([0, 0, 1])
[ 15931, 15931, 31, 26495, 4566, 198, 4264, 1299, 477, 4566, 3696, 3306, 329, 35375, 198, 49, 570, 4494, 1767, 8398, 1366, 198, 198, 37811, 198, 11748, 4866, 198, 11748, 640, 198, 11748, 10104, 198, 6738, 4566, 13, 11235, 672, 3046, 1330,...
2.816514
109
from django.utils.translation import gettext_lazy as _ CHECK_REJECTION_CATEGORY_TEXT_MAPPING = { 'fiu_investigation_id': _('Associated FIU investigation'), 'intelligence_report_id': _('Associated intelligence report (IR)'), 'other_reason': _('Other reason'), } CHECK_REJECTION_CATEGORY_BOOLEAN_MAPPING = { ...
[ 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 5239, 62, 75, 12582, 355, 4808, 628, 198, 50084, 62, 2200, 23680, 2849, 62, 34, 6158, 38, 15513, 62, 32541, 62, 44, 24805, 2751, 796, 1391, 198, 220, 220, 220, 705, 12463, 84, 62,...
2.903636
550
""" --- Day 19: A Series of Tubes --- Somehow, a network packet got lost and ended up here. It's trying to follow a routing diagram (your puzzle input), but it's confused about where to go. Its starting point is just off the top of the diagram. Lines (drawn with |, -, and +) show the path it needs to take, starting b...
[ 37811, 198, 6329, 3596, 678, 25, 317, 7171, 286, 309, 29080, 11420, 198, 198, 4366, 4919, 11, 257, 3127, 19638, 1392, 2626, 290, 4444, 510, 994, 13, 632, 338, 2111, 284, 1061, 257, 28166, 16362, 357, 14108, 15027, 5128, 828, 475, 198,...
3.219927
823
import os import tsl.global_scope from tsl.global_scope import * data = LazyLoader('data', globals(), 'tsl.data') datasets = LazyLoader('datasets', globals(), 'tsl.datasets') nn = LazyLoader('nn', globals(), 'tsl.nn') predictors = LazyLoader('predictors', globals(), 'tsl.predictors') imputers = LazyLoader('imputers',...
[ 11748, 28686, 198, 198, 11748, 256, 6649, 13, 20541, 62, 29982, 198, 6738, 256, 6649, 13, 20541, 62, 29982, 1330, 1635, 198, 198, 7890, 796, 406, 12582, 17401, 10786, 7890, 3256, 15095, 874, 22784, 705, 912, 75, 13, 7890, 11537, 198, ...
2.313531
303
from .generated.common_model_pb2 import ( CustomerNumber, MediaType, ) from .generated.messaging_model_pb2 import ( OutboundMessage, VoiceCallAction, RecordSessionCallAction, RejectCallAction, PromptMessageReplyAction, PromptMessageMenuItemBody, TextToSpeechVoice, MessagingChanne...
[ 6738, 764, 27568, 13, 11321, 62, 19849, 62, 40842, 17, 1330, 357, 198, 220, 220, 220, 22092, 15057, 11, 198, 220, 220, 220, 6343, 6030, 11, 198, 8, 198, 6738, 764, 27568, 13, 37348, 3039, 62, 19849, 62, 40842, 17, 1330, 357, 198, ...
2.715663
415
# Copyright 2022 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ 2, 15069, 33160, 43208, 21852, 1766, 1539, 12052, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198...
2.267774
4,515
import copy from random import randint, seed from typing import Any, Dict, Iterable, List from adagio.instances import WorkflowContext, WorkflowResultCache from fugue.collections.partition import PartitionSpec from fugue.dataframe import DataFrame from fugue.dataframe.array_dataframe import ArrayDataFrame from fugue.d...
[ 11748, 4866, 198, 6738, 4738, 1330, 43720, 600, 11, 9403, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 40806, 540, 11, 7343, 198, 198, 6738, 512, 363, 952, 13, 8625, 1817, 1330, 5521, 11125, 21947, 11, 5521, 11125, 23004, 30562, 19...
3.14433
291
# Copyright (c) 2021 NVIDIA Corporation. All rights reserved. # This work is licensed under the NVIDIA Source Code License - Non-commercial. # Full text can be found in LICENSE.md from __future__ import absolute_import from __future__ import division from __future__ import print_function import cv2 import copy import...
[ 2, 15069, 357, 66, 8, 33448, 15127, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 770, 670, 318, 11971, 739, 262, 15127, 8090, 6127, 13789, 532, 8504, 12, 36313, 13, 198, 2, 6462, 2420, 460, 307, 1043, 287, 38559, 24290, 13, 9132, 198, ...
3.559322
236
# # Progression of infection within individuals # import random import numpy as np from collections import defaultdict import pyEpiabm as pe from pyEpiabm.core import Parameters, Person from pyEpiabm.property import InfectionStatus from pyEpiabm.utility import StateTransitionMatrix, TransitionTimeMatrix from .abstra...
[ 2, 198, 2, 1041, 32383, 286, 10280, 1626, 3925, 198, 2, 198, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 11748, 12972, 13807, 72, 397, 76, 355, 613, 198, 6738, 12972, 13807, 72,...
2.419487
5,614
length = int(input("Do")) width = int(input("Doer")) area = length*width perimeter = 2* (length+width) print "Area: " + str(area) print "Perimeter:" + str(perimeter)
[ 13664, 796, 493, 7, 15414, 7203, 5211, 48774, 201, 198, 10394, 796, 493, 7, 15414, 7203, 5211, 263, 48774, 201, 198, 20337, 796, 4129, 9, 10394, 201, 198, 525, 16912, 796, 362, 9, 357, 13664, 10, 10394, 8, 201, 198, 4798, 366, 30547...
2.646154
65
# Copyright 2013 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. """Parses the command line, discovers the appropriate benchmarks, and runs them. Handles benchmark configuration, but all the logic for actually running the ...
[ 2, 15069, 2211, 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, 198, 37811, 47,...
3.915493
142
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 2177, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
2.239447
1,374
import asyncio import math import time from statistics import mean import aiohttp from mcsniperpy.util import request_manager from mcsniperpy.util import utils as util from mcsniperpy.util.logs_manager import Color as color from mcsniperpy.util.logs_manager import Logger as log
[ 11748, 30351, 952, 198, 11748, 10688, 198, 11748, 640, 198, 6738, 7869, 1330, 1612, 198, 198, 11748, 257, 952, 4023, 198, 6738, 285, 6359, 45554, 9078, 13, 22602, 1330, 2581, 62, 37153, 198, 6738, 285, 6359, 45554, 9078, 13, 22602, 1330...
3.469136
81
# Generated by Django 1.11.1 on 2017-10-16 15:16 import django.core.validators import django.db.models.deletion from django.conf import settings from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 16, 319, 2177, 12, 940, 12, 1433, 1315, 25, 1433, 198, 11748, 42625, 14208, 13, 7295, 13, 12102, 2024, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 198, 6738, 42625...
3.116667
60
import os
[ 11748, 28686, 198 ]
3.333333
3
from flask import Blueprint auth = Blueprint('auth', __name__, url_prefix='/auth') from . import rest-api
[ 6738, 42903, 1330, 39932, 198, 18439, 796, 39932, 10786, 18439, 3256, 11593, 3672, 834, 11, 19016, 62, 40290, 11639, 14, 18439, 11537, 198, 198, 6738, 764, 1330, 1334, 12, 15042, 198 ]
3.451613
31
from openpyxl import Workbook from openpyxl import load_workbook # Import necessary style classes from openpyxl.styles import Font, Color, Alignment, Border, Side, colors wb = Workbook() # grab the active worksheet ws = wb.active # Data can be assigned directly to cells ws['A1'] = 42 # Rows can also...
[ 6738, 1280, 9078, 87, 75, 1330, 5521, 2070, 201, 198, 6738, 1280, 9078, 87, 75, 1330, 3440, 62, 1818, 2070, 201, 198, 2, 17267, 3306, 3918, 6097, 201, 198, 6738, 1280, 9078, 87, 75, 13, 47720, 1330, 24060, 11, 5315, 11, 978, 16747, ...
2.637024
551
# Benchmarking Suite # Copyright 2014-2017 Engineering Ingegneria Informatica S.p.A. # # 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 ...
[ 2, 25187, 4102, 278, 26264, 198, 2, 15069, 1946, 12, 5539, 14044, 554, 469, 70, 1008, 544, 45255, 1512, 64, 311, 13, 79, 13, 32, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 1...
3.836431
269
''' In dieser Datei werden Waffen und Rüstungen definiert. '''
[ 7061, 6, 198, 818, 10564, 263, 7536, 72, 266, 263, 6559, 370, 2001, 268, 3318, 371, 9116, 301, 2150, 268, 2730, 72, 861, 13, 198, 7061, 6 ]
2.296296
27
# Copyright 2013 OpenStack Foundation. All rights reserved # Copyright 2015 Rackspace # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICE...
[ 2, 15069, 2211, 4946, 25896, 5693, 13, 220, 1439, 2489, 10395, 198, 2, 15069, 1853, 37927, 13200, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, ...
3.010373
482
import ccxt import pandas as pd from itertools import combinations from twilio.rest import Client from api import * avg_pairs = list(combinations(averages, 2)) message = '' for coin in coins: ticker, data = fetch_data(coin) df = pd.DataFrame( columns=['timestamp','open', 'high', 'low', 'close', 'vol...
[ 11748, 36624, 742, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 340, 861, 10141, 1330, 17790, 198, 6738, 665, 346, 952, 13, 2118, 1330, 20985, 198, 6738, 40391, 1330, 1635, 628, 198, 615, 70, 62, 79, 3468, 796, 1351, 7, 24011, 7...
2.25
608
import hail PRIMATE_AI_VDS_PATHS = { '37': 'gs://seqr-reference-data/GRCh37/primate_ai/PrimateAI_scores_v0.2.vds', '38': 'gs://seqr-reference-data/GRCh38/primate_ai/PrimateAI_scores_v0.2.liftover_grch38.vds', }
[ 11748, 32405, 198, 198, 4805, 3955, 6158, 62, 20185, 62, 53, 5258, 62, 47, 1404, 7998, 796, 1391, 198, 220, 220, 220, 705, 2718, 10354, 705, 14542, 1378, 41068, 81, 12, 35790, 12, 7890, 14, 10761, 1925, 2718, 14, 1050, 1920, 62, 187...
1.982143
112
# Reference: https://github.com/open-mmlab/mmclassification/tree/master/mmcls/models/backbone/vision_transformer.py import math from typing import Sequence from functools import reduce from operator import mul import numpy as np import torch import torch.nn as nn from mmcv.cnn import build_norm_layer from mmcv.cnn.bri...
[ 2, 20984, 25, 3740, 1378, 12567, 13, 785, 14, 9654, 12, 3020, 23912, 14, 3020, 4871, 2649, 14, 21048, 14, 9866, 14, 3020, 565, 82, 14, 27530, 14, 1891, 15992, 14, 10178, 62, 7645, 16354, 13, 9078, 198, 11748, 10688, 198, 6738, 19720...
2.203106
3,348
#! /usr/bin/env jython # - # Copyright (C) 2011 Sun Ning<classicning@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 474, 7535, 198, 2, 532, 198, 2, 15069, 357, 34, 8, 2813, 3825, 37400, 27, 49421, 768, 31, 14816, 13, 785, 29, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, ...
3.743516
347
from check50 import * import os
[ 6738, 2198, 1120, 1330, 1635, 198, 11748, 28686, 198 ]
3.555556
9
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Handle the naming conventions for DM pipeline analysis """ from __future__ import absolute_import, division, print_function import sys import yaml from fermipy.jobs.utils import is_null, is_not_null class NameFactory(object): """ Helper class to...
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 37811, 198, 37508, 262, 19264, 21396, 329, 14848, 11523, 3781, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 1...
2.505453
2,659
import threading import json import re import time import slacker import websocket import six from six.moves import _thread, range class Driver(object): """Functional tests driver. It handles the communication with slack api, so that the tests code can concentrate on higher level logic. """ def _webs...
[ 11748, 4704, 278, 198, 11748, 33918, 198, 11748, 302, 198, 11748, 640, 198, 11748, 1017, 10735, 198, 11748, 2639, 5459, 198, 11748, 2237, 198, 6738, 2237, 13, 76, 5241, 1330, 4808, 16663, 11, 2837, 628, 198, 4871, 12434, 7, 15252, 2599,...
2.680511
313
from django.http import HttpResponseRedirect from django.shortcuts import render, render_to_response from django.contrib.auth.models import User from django.forms.formsets import formset_factory from django.template import RequestContext from vote.models import * from vote.forms import * from live.models import * im...
[ 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 7738, 1060, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 8543, 62, 1462, 62, 26209, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 673...
2.272975
1,099
# -*- coding: utf-8 -*- """ © Michael Widrich, Markus Hofmarcher, 2017 """ import time
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 16224, 3899, 24801, 7527, 11, 46013, 37745, 3876, 2044, 11, 2177, 198, 198, 37811, 198, 11748, 640, 628 ]
2.617647
34
__all__ = ["JONSWAP_gamma", "gaussian_gamma", "JONSWAP_gamma", "shape_models"] #import stormrecon as stormrecon #import tools as tools #import io as io #import plotters as plotters
[ 834, 439, 834, 796, 14631, 41, 1340, 17887, 2969, 62, 28483, 2611, 1600, 366, 4908, 31562, 62, 28483, 2611, 1600, 220, 366, 41, 1340, 17887, 2969, 62, 28483, 2611, 1600, 366, 43358, 62, 27530, 8973, 198, 198, 2, 11748, 6388, 260, 1102...
2.731343
67
#!/usr/bin/env python3 from collections import defaultdict, deque if __name__ == '__main__': print(part_1()) print(part_2())
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 17268, 1330, 4277, 11600, 11, 390, 4188, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3601, 7, 3911, 62, 16, 28955, 198, 220...
2.615385
52
""" This will prompt a user to enter a command for a Tello drone. Tello SDK v1.0.0 commands = "https://dl-cdn.ryzerobotics.com/downloads/tello/0228/Tello+SDK+Readme.pdf" Tello SDK v1.3.0 commands = "https://terra-1-g.djicdn.com/2d4dce68897a46b19fc717f3576b7c6a/Tello%20编程相关/For%20Tello/Tello%20SDK%20Documentation%20EN_...
[ 37811, 198, 1212, 481, 6152, 257, 2836, 284, 3802, 257, 3141, 329, 257, 309, 11109, 12170, 13, 198, 198, 51, 11109, 26144, 410, 16, 13, 15, 13, 15, 9729, 796, 366, 5450, 1378, 25404, 12, 32341, 13, 563, 9107, 672, 23891, 13, 785, ...
2.069288
534
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 12131, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 733...
3.389439
303
# coding=utf-8 from . import livechat_channel from . import reply_about_models from . import menu_about_models from . import wx_user from . import wx_corpuser from . import wx_autoreply_model from . import wx_config_model from . import res_partner from . import wxuser_uuid from . import corpuser_uuid from . import wx_...
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 764, 1330, 2107, 17006, 62, 17620, 198, 6738, 764, 1330, 10971, 62, 10755, 62, 27530, 198, 6738, 764, 1330, 6859, 62, 10755, 62, 27530, 198, 6738, 764, 1330, 266, 87, 62, 7220, 198, 6738, 764,...
2.978723
141
"""Config flow for SenseME.""" import ipaddress import voluptuous as vol from aiosenseme import async_get_device_by_ip_address, discover_all from homeassistant import config_entries from homeassistant.const import CONF_HOST from .const import CONF_HOST_MANUAL, CONF_INFO, DOMAIN DISCOVER_TIMEOUT = 5 class SensemeFl...
[ 37811, 16934, 5202, 329, 24956, 11682, 526, 15931, 198, 11748, 20966, 21975, 198, 198, 11748, 2322, 37623, 5623, 355, 2322, 198, 6738, 257, 4267, 1072, 1326, 1330, 30351, 62, 1136, 62, 25202, 62, 1525, 62, 541, 62, 21975, 11, 7073, 62, ...
2.115113
1,416
import cv2 import sys print("Hello") target_path = '/Users/Leonardo/Desktop/logo-coritiba.jpg' reduce_by = 11 img = cv2.imread(target_path) shape = img.shape new0 = int(shape[0]/reduce_by) new1 = int(shape[1]/reduce_by) print(f"Orginal Shape = {shape}; New Shape ({new0}, {new1}, {shape[2]})") try: redu = cv2.re...
[ 11748, 269, 85, 17, 198, 11748, 25064, 198, 198, 4798, 7203, 15496, 4943, 198, 16793, 62, 6978, 796, 31051, 14490, 14, 36185, 13109, 14, 36881, 14, 6404, 78, 12, 10215, 270, 23718, 13, 9479, 6, 198, 445, 7234, 62, 1525, 796, 1367, 2...
2.34593
344
import numpy as np from lenstronomy.PointSource.Types.base_ps import PSBase, _expand_to_array __all__ = ['LensedPositions'] class LensedPositions(PSBase): """ class of a a lensed point source parameterized as the (multiple) observed image positions Name within the PointSource module: 'LENSED_POSITION' ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 18896, 301, 1313, 9145, 13, 12727, 7416, 13, 31431, 13, 8692, 62, 862, 1330, 6599, 14881, 11, 4808, 11201, 392, 62, 1462, 62, 18747, 198, 198, 834, 439, 834, 796, 37250, 43, 15385, 21604, 1756...
2.29175
2,509