content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
""" :: MailException :: InvalidAttachmentException :: FilePathNotAttachmentException :: SMTPException """ class MailieException(Exception): """Generic Mailie exception, everything will stem from this""" class InvalidAttachmentException(MailieException): """Raised when an email is provided an...
[ 37811, 198, 3712, 11099, 16922, 198, 220, 220, 220, 7904, 17665, 8086, 15520, 16922, 198, 220, 220, 220, 220, 220, 220, 220, 7904, 9220, 15235, 3673, 8086, 15520, 16922, 198, 220, 220, 220, 7904, 9447, 7250, 16922, 198, 37811, 628, 198,...
4.012097
248
# Time: O(t * (logt + m * n)), t is the number of trees # Space: O(t + m * n) import collections import heapq
[ 2, 3862, 25, 220, 440, 7, 83, 1635, 357, 6404, 83, 1343, 285, 1635, 299, 36911, 256, 318, 262, 1271, 286, 7150, 198, 2, 4687, 25, 440, 7, 83, 1343, 285, 1635, 299, 8, 198, 198, 11748, 17268, 198, 11748, 24575, 80, 628 ]
2.627907
43
# -*- coding: utf-8 -*- import os class JsonStore(DataStore): """ """ FILEEXT = "json" def snapshot(self, fname): """ Chainable wrapper for FuncFlow "closure":) """ fpath = self._fmt_path(datakey) return wrapper class XmlOut(DataStore): """ Write-onl...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 628, 198, 4871, 449, 1559, 22658, 7, 6601, 22658, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 45811, 13918, 796, ...
2.283898
236
from selenium import webdriver import os import time if __name__ == "__main__": ig_bot = Not_a_IG_bot(os.environ.get('BOT_USER'), os.environ.get('BOT_PASS')) ig_bot.get_text('medialunes') ig_bot.get_img('medialunes')
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 201, 198, 11748, 28686, 201, 198, 11748, 640, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 220, 220, 220, 45329, 62, 13645, 796, ...
1.935714
140
import os import sys import numpy as np import keras import cv2 from scipy.stats import logistic
[ 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 299, 32152, 355, 45941, 220, 198, 11748, 41927, 292, 198, 11748, 269, 85, 17, 198, 6738, 629, 541, 88, 13, 34242, 1330, 2604, 2569, 628 ]
3.030303
33
#!/usr/bin/env python # -*- encoding: utf-8 -*- ''' @File : 3_8_http2.py @Time : 2021-03-02 @Author : EvilRecluse @Contact : https://github.com/RecluseXU @Desc : HTTP/2支持 ''' # here put the import lib import httpx import asyncio asyncio.run(http2_support())
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 31, 8979, 220, 220, 220, 1058, 220, 220, 513, 62, 23, 62, 4023, 17, 13, 9078, 198, 31, 7575, 220, 2...
2.066176
136
#coding:utf-8 # # id: bugs.core_5887_trusted_role # title: Allow the use of management statements in PSQL blocks: check only TRUSTED ROLE # decription: # Role can be set as TRUSTED when following conditions are true: # * BOTH AuthServer and AuthClient parameters from...
[ 2, 66, 7656, 25, 40477, 12, 23, 198, 2, 198, 2, 4686, 25, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11316, 13, 7295, 62, 3365, 5774, 62, 2213, 8459, 62, 18090, 198, 2, 3670, 25, 220, 220, 220, 220, 220, 220, 220, 22507...
2.284981
2,923
""" Script to build TFRecord files python bin/script_tfrecotd.py --data mnist """ import argparse import os import deep_da PATH_TO_REPO = '/'.join(os.path.dirname(os.path.abspath(__file__)).split('/')[0:-1]) CONFIG = { "mnist": { "train": { "image": os.path.join(PATH_TO_REPO, "dataset/mnist/train-...
[ 37811, 12327, 284, 1382, 24958, 23739, 3696, 198, 198, 29412, 9874, 14, 12048, 62, 27110, 8344, 313, 67, 13, 9078, 1377, 7890, 285, 77, 396, 198, 37811, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 2769, 62, 6814, 628, ...
2.048822
594
import unittest import os from oeqa.oetest import oeRuntimeTest, skipModule from oeqa.utils.decorators import *
[ 11748, 555, 715, 395, 198, 11748, 28686, 198, 6738, 267, 68, 20402, 13, 78, 316, 395, 1330, 267, 68, 41006, 14402, 11, 14267, 26796, 198, 6738, 267, 68, 20402, 13, 26791, 13, 12501, 273, 2024, 1330, 1635, 628 ]
2.973684
38
import logging from .enum import Mode from .base_command import BaseCommand class AFP(BaseCommand): """ Gateway AFP APIs """ def is_disabled(self): """ Check if the AFP server is disabled """ return self._gateway.get('/config/fileservices/afp/mode') == Mode.Disabled def disable(self): ...
[ 11748, 18931, 198, 198, 6738, 764, 44709, 1330, 10363, 198, 6738, 764, 8692, 62, 21812, 1330, 7308, 21575, 628, 198, 4871, 8916, 7, 14881, 21575, 2599, 198, 220, 220, 220, 37227, 29916, 8916, 23113, 37227, 628, 220, 220, 220, 825, 318, ...
2.650718
209
#!/usr/bin/python # -*- coding: utf-8 -*- ################################################################################################## # module for the eigenvalue problem # Copyright 2013 Timo Hartmann (thartmann15 at gmail.com) # # todo: # - implement balancing # - agressive early deflation # ######...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 29113, 29113, 29113, 2235, 198, 2, 220, 220, 220, 220, 8265, 329, 262, 304, 9324, 8367, 1917, 198, 2, 220, 220, 220, ...
1.919482
12,730
import requests as rq from bs4 import BeautifulSoup import pandas as pd import numpy as np import scraper page_html = rq.get( "https://www.goodreads.com//book/show/1582996.City_of_Ashes") i = BeautifulSoup(page_html.content, 'html.parser') print(i) i = "https://www.goodreads.com//book/show/618177.Legend" getlin...
[ 11748, 7007, 355, 374, 80, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19320, 525, 198, 198, 7700, 62, 6494, 796, 374, 80, 13, 1136, 7, 198, ...
2.6
125
from django.db import models import django.utils.timezone as timezone from django.core.exceptions import ValidationError # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 11748, 42625, 14208, 13, 26791, 13, 2435, 11340, 355, 640, 11340, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 198, 2, 13610, 534, 4981, 994, 13, 198 ]
3.634146
41
# This file is part of python-bidi # # python-bidi is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distribut...
[ 2, 770, 2393, 318, 636, 286, 21015, 12, 14065, 72, 198, 2, 198, 2, 21015, 12, 14065, 72, 318, 1479, 3788, 25, 345, 460, 17678, 4163, 340, 290, 14, 273, 13096, 198, 2, 340, 739, 262, 2846, 286, 262, 22961, 12892, 263, 3611, 5094, ...
1.890632
11,923
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jun 15 16:15:30 2021 @author: Siro Moreno """ import pytest import numpy as np import casadi as cas from optibot import schemes as sch @pytest.mark.parametrize( "maybe_iterable, expected", [ ([1, 2], True), ((1, 2), True), ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 7653, 1315, 1467, 25, 1314, 25, 1270, 33448, 198, 198, 31, 9800, 25, 311, 7058, 43...
1.836538
2,496
import pytest import numpy as np @pytest.fixture(scope="function")
[ 198, 11748, 12972, 9288, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 31, 9078, 9288, 13, 69, 9602, 7, 29982, 2625, 8818, 4943 ]
2.875
24
import torch import numpy as np from pyannote.audio.features import RawAudio from pyannote.core import SlidingWindowFeature from graphs.models.base import BaseModel
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 12972, 1236, 1258, 13, 24051, 13, 40890, 1330, 16089, 21206, 198, 6738, 12972, 1236, 1258, 13, 7295, 1330, 3454, 2530, 27703, 38816, 198, 198, 6738, 28770, 13, 27530, 13, 8692, ...
3.795455
44
fib_num_1 = lambda n: fib_num_1(n-1) + fib_num_1(n-2) if n > 2 else 1
[ 69, 571, 62, 22510, 62, 16, 796, 37456, 299, 25, 12900, 62, 22510, 62, 16, 7, 77, 12, 16, 8, 1343, 12900, 62, 22510, 62, 16, 7, 77, 12, 17, 8, 611, 299, 1875, 362, 2073, 352 ]
1.864865
37
# DEG2RAD = 0.0174532925199432957692369076849 # PI = 3.14159265358979323846264338328 import sfm import sfmUtils import sfmApp from PySide import QtGui import gc import struct import math # <remarks>Slow as fuck!</remarks> # # def __hash__(self): # return hash((self.handle, self.modelName)) # # def...
[ 201, 198, 2, 5550, 38, 17, 49, 2885, 796, 657, 13, 29326, 36625, 1959, 1495, 19104, 3559, 1959, 3553, 3388, 1954, 3388, 2998, 3104, 2920, 201, 198, 2, 30434, 796, 513, 13, 1415, 19707, 22980, 2327, 4531, 44750, 23721, 3510, 18897, 209...
2.317708
192
from area import area import datetime import geopandas import os import subprocess import zipfile def main(): """ Main - program execute """ print (str(datetime.datetime.now()) + ' Starting ...') datadir = 'C:/DEV/ABS/' processZip(datadir) # Call tippecanoe (Mapbox utili...
[ 6738, 1989, 1330, 1989, 201, 198, 11748, 4818, 8079, 201, 198, 11748, 30324, 392, 292, 201, 198, 11748, 28686, 201, 198, 11748, 850, 14681, 201, 198, 11748, 19974, 7753, 201, 198, 201, 198, 4299, 1388, 33529, 201, 198, 220, 220, 220, ...
2.228175
504
from Default.exec import ExecCommand # type: ignore from glob import iglob from os import makedirs from os.path import dirname from os.path import isfile from os.path import join from os.path import realpath from tabulate import tabulate # dependencies.json import json import os import shlex import sublime # type: i...
[ 6738, 15161, 13, 18558, 1330, 8393, 21575, 220, 1303, 2099, 25, 8856, 198, 6738, 15095, 1330, 220, 38686, 672, 198, 6738, 28686, 1330, 285, 4335, 17062, 198, 6738, 28686, 13, 6978, 1330, 26672, 3672, 198, 6738, 28686, 13, 6978, 1330, 31...
3.050847
472
# # PySNMP MIB module NETSCREEN-VPN-IKE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NETSCREEN-VPN-IKE-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:10:47 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (def...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 30502, 6173, 2200, 1677, 12, 33883, 12, 40, 7336, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14...
2.489547
2,296
import pytest import os import sys sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) from functions import plus, minus, multiply, divide
[ 11748, 12972, 9288, 198, 11748, 28686, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 35514, 198, ...
3.075472
53
from Source.IO.Sync import * from Source.Plot.PlotSignal import * sync = createSyncSignal() plotSignal(sync, 44100)
[ 6738, 8090, 13, 9399, 13, 28985, 1330, 1635, 198, 6738, 8090, 13, 43328, 13, 43328, 11712, 282, 1330, 1635, 198, 198, 27261, 796, 2251, 28985, 11712, 282, 3419, 198, 198, 29487, 11712, 282, 7, 27261, 11, 5846, 3064, 8, 628, 198 ]
2.926829
41
#!/usr/bin/python import sys if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.3
30
# encoding: utf-8 # module apt_pkg # from /usr/lib/python3/dist-packages/apt_pkg.cpython-35m-x86_64-linux-gnu.so # by generator 1.145 """ Classes and functions wrapping the apt-pkg library. The apt_pkg module provides several classes and functions for accessing the functionality provided by the apt-pkg library. Typica...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 2, 8265, 15409, 62, 35339, 198, 2, 422, 1220, 14629, 14, 8019, 14, 29412, 18, 14, 17080, 12, 43789, 14, 2373, 62, 35339, 13, 13155, 7535, 12, 2327, 76, 12, 87, 4521, 62, 2414, 12, 23289, 12, ...
2.668388
968
from google.appengine.api import users from . import forms from . import models from . import utils
[ 6738, 23645, 13, 1324, 18392, 13, 15042, 1330, 2985, 198, 198, 6738, 764, 1330, 5107, 198, 6738, 764, 1330, 4981, 198, 6738, 764, 1330, 3384, 4487, 628 ]
3.777778
27
# Generated by Django 3.1.3 on 2021-06-15 02:42 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 18, 319, 33448, 12, 3312, 12, 1314, 7816, 25, 3682, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from tests.core.helpers import authenticated_response from trakt import Trakt import responses @responses.activate @responses.activate @responses.activate @responses.activate @responses.activate @responses.activate
[ 6738, 5254, 13, 7295, 13, 16794, 364, 1330, 44529, 62, 26209, 198, 198, 6738, 1291, 21841, 1330, 4759, 21841, 198, 11748, 9109, 628, 198, 31, 16733, 274, 13, 39022, 628, 198, 31, 16733, 274, 13, 39022, 628, 198, 31, 16733, 274, 13, ...
3.546875
64
from datetime import date import boundaries boundaries.register('', singular='', domain='', last_updated=date(), name_func=boundaries.attr(''), id_func=boundaries.attr(''), authority='', source_url='', licence_url='', data_url='', notes='', encoding='iso-8859-1', )
[ 6738, 4818, 8079, 1330, 3128, 198, 198, 11748, 13215, 198, 198, 7784, 3166, 13, 30238, 10786, 3256, 198, 220, 220, 220, 18032, 11639, 3256, 198, 220, 220, 220, 7386, 11639, 3256, 198, 220, 220, 220, 938, 62, 43162, 28, 4475, 22784, 19...
2.4375
128
from setuptools import setup setup(name='dmerge', version='0.1', description='Deep Dict Merge - Recursively merge two dictionaries and return the result', url='http://github.com/edward2a/deep_merge.py', author='Eduardo A. Paris Penas - Real ReadMe Limited', author_email='edward2a@gmail.com, epp@rea...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 3672, 11639, 67, 647, 469, 3256, 198, 220, 220, 220, 2196, 11639, 15, 13, 16, 3256, 198, 220, 220, 220, 6764, 11639, 29744, 360, 713, 39407, 532, 3311, 1834, 2280, 20121, 734, ...
2.668831
154
class Message(): """Message class, this is what would be sended """ def __init__(self, data=None, callback=None, kargs=None, status="OK", time=None): """Constructor of message class Args: data (Obj): Object to be sended callback (bool, optional): True if data stores a...
[ 4871, 16000, 33529, 198, 220, 220, 220, 37227, 12837, 1398, 11, 428, 318, 644, 561, 307, 264, 1631, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 1366, 28, 14202, 11, 23838, 28, 14202, 11, 479, ...
2.406593
637
#!/usr/sbin/python #-*- encoding:utf-8 -*- import operator with open('user_prefs.txt') as f: prefs_str = ''.join(f.readlines()) # {'andy': {'霍乱时期的爱情': 1},...} prefs = read_prefs(prefs_str) # 找出与 user1 兴趣最相近的用户 user1 -> [(1.0, user3), (0.8, user4), ...] # prefs -> "用户 xx 根据 xx 推荐 xx 书籍 xxx" print('\n基于用户的协同过滤...
[ 2, 48443, 14629, 14, 82, 8800, 14, 29412, 198, 2, 12, 9, 12, 21004, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 11748, 10088, 198, 198, 4480, 1280, 10786, 7220, 62, 3866, 9501, 13, 14116, 11537, 355, 277, 25, 198, 220, 220, 220, 76...
1.685637
369
from abc import ABC, abstractmethod
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 628 ]
4.111111
9
from mmag.exchange.exchange_terms import Exchange import numpy as np import pytest # TODO: implement vortex exchange energy computation # TODO: block wall and Neel wall # x from 0 to 1. m_neel = lambda x: np.array( [np.sin(x * (np.pi)), np.cos(x * (np.pi)), 0.0], dtype=np.float64 ) m_bloch = lambda x: np.array( ...
[ 6738, 8085, 363, 13, 1069, 3803, 13, 1069, 3803, 62, 38707, 1330, 12516, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 198, 2, 16926, 46, 25, 3494, 42726, 5163, 2568, 29964, 198, 2, 16926, 46, 25, 2512, 3355, ...
2.14841
283
import logging logger = logging.getLogger() handler = logging.StreamHandler() formatter = logging.Formatter('[%(asctime)s] [%(levelname)-2s] %(message)s') handler.setFormatter(formatter) logger.addHandler(handler) logger.setLevel(logging.INFO)
[ 11748, 18931, 628, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 3419, 198, 198, 30281, 796, 18931, 13, 12124, 25060, 3419, 198, 198, 687, 1436, 796, 18931, 13, 8479, 1436, 10786, 58, 4, 7, 292, 310, 524, 8, 82, 60, 685, 4, ...
2.758242
91
import os, sys import traceback import subprocess as sp ffmpeg_path = 'ffmpeg_minimal_ts_2_mp4' # SO/questions/404744/determining-application-path-in-a-python-exe-generated-by-pyinstaller #if getattr(sys, 'frozen', False): # #print('sys exe: ' + repr(sys.executable)) # application_path = os.path.dirname(os.path....
[ 11748, 28686, 11, 25064, 198, 11748, 12854, 1891, 198, 11748, 850, 14681, 355, 599, 198, 487, 43913, 62, 6978, 796, 705, 487, 43913, 62, 1084, 4402, 62, 912, 62, 17, 62, 3149, 19, 6, 198, 198, 2, 12809, 14, 6138, 507, 14, 1821, 28...
2.572997
911
import pandas as pd from sklearn.model_selection import train_test_split from sklearn.feature_extraction.text import TfidfVectorizer from sklearn import linear_model from sklearn.metrics import accuracy_score from fuzzywuzzy import fuzz
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 309, 69, 312, 69, 38469, 7509, 198, 6738, 1341, 35720, ...
3.590909
66
#!/usr/bin/python import subprocess import json import sys if __name__ == "__main__": print("oueouiiaoo.github.io/onesubwiper/") print("- enter the code from the website to authorize onesubwiper") print(" copying and pasting really helps if you can") print("- a list of the subreddits you have comment...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 850, 14681, 198, 11748, 33918, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3601, 7203, 280, 68, 280, 72, 544, 2238, ...
2.196262
1,712
# # @author Kevin Jesse # @email kevin.r.jesse@gmail.com # import numpy as np import random import candidates import database_connect import movieCtrl cur = database_connect.db_connect() # def tieBreaker(movieWithScore): # temp = ['tt0475290', 'tt2005151', 'tt0160127', 'tt0117665', 'tt0109254', 'tt0363589', 'tt...
[ 2, 198, 2, 2488, 9800, 7939, 18033, 198, 2, 2488, 12888, 885, 7114, 13, 81, 13, 73, 35270, 31, 14816, 13, 785, 198, 2, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 198, 11748, 5871, 198, 11748, 6831, 62, 8443, 1...
2.159416
16,573
import logging from tests.mocks import EngineEmul from bzt.modules.jmeter import JMeter, JMeterExecutor from bzt.utils import get_full_path, HTTPClient
[ 11748, 18931, 198, 198, 6738, 5254, 13, 76, 3320, 1330, 7117, 10161, 377, 198, 6738, 275, 89, 83, 13, 18170, 13, 73, 27231, 1330, 47726, 2357, 11, 47726, 2357, 23002, 38409, 198, 6738, 275, 89, 83, 13, 26791, 1330, 651, 62, 12853, 6...
3.14
50
# -*- coding: utf-8 -*- # Copyright 2018 The Blueoil 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 # # Unles...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 2864, 383, 4518, 9437, 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,...
2.842294
558
# # DeepRacer Guru # # Version 3.0 onwards # # Copyright (c) 2021 dmh23 # from src.tracks.track import Track import src.personalize.configuration.personal_track_annotations as config
[ 2, 198, 2, 10766, 49, 11736, 38749, 198, 2, 198, 2, 10628, 513, 13, 15, 31719, 198, 2, 198, 2, 15069, 357, 66, 8, 33448, 288, 76, 71, 1954, 198, 2, 198, 198, 6738, 12351, 13, 46074, 13, 11659, 1330, 17762, 198, 11748, 12351, 13,...
3.083333
60
# coding:utf-8 import discord import configparser import os from discord.ext import commands import asyncio
[ 2, 19617, 25, 40477, 12, 23, 198, 11748, 36446, 198, 11748, 4566, 48610, 198, 11748, 28686, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 30351, 952, 628, 198 ]
3.793103
29
rgb_colors = [(202, 164, 110), (149, 75, 50), (222, 201, 136), (53, 93, 123), (170, 154, 41), (138, 31, 20), (134, 163, 184), (197, 92, 73), (47, 121, 86), (73, 43, 35), (145, 178, 149), (14, 98, 70), (232, 176, 165), (160, 142, 158), (54, 45, 50), (101, 75, 77), (183, 205, 171), (36, 60, 74), (19, 86, 89), (82, 148, 1...
[ 81, 22296, 62, 4033, 669, 796, 47527, 19004, 11, 25307, 11, 9796, 828, 357, 19442, 11, 5441, 11, 2026, 828, 357, 23148, 11, 580, 11, 21056, 828, 357, 4310, 11, 10261, 11, 17031, 828, 357, 17279, 11, 24235, 11, 6073, 828, 357, 20107,...
2.216931
189
# stdlib from typing import List from typing import Optional from typing import Type # third party from nacl.signing import VerifyKey # relative from ......util import traceback_and_raise from ....abstract.node import AbstractNode from ..auth import service_auth from ..node_service import ImmediateNodeServiceWithRepl...
[ 2, 14367, 8019, 198, 6738, 19720, 1330, 7343, 198, 6738, 19720, 1330, 32233, 198, 6738, 19720, 1330, 5994, 198, 198, 2, 2368, 2151, 198, 6738, 299, 37779, 13, 12683, 278, 1330, 49899, 9218, 198, 198, 2, 3585, 198, 6738, 47082, 22602, ...
3.915966
119
import re import datetime from billy.utils.fulltext import pdfdata_to_text from .bills import TNBillScraper from .legislators import TNLegislatorScraper from .committees import TNCommitteeScraper from .events import TNEventScraper settings = dict(SCRAPELIB_TIMEOUT=600) #start date of each session is the first tuesday...
[ 11748, 302, 198, 11748, 4818, 8079, 198, 6738, 2855, 88, 13, 26791, 13, 12853, 5239, 1330, 37124, 7890, 62, 1462, 62, 5239, 198, 6738, 764, 65, 2171, 1330, 29025, 17798, 3351, 38545, 198, 6738, 764, 1455, 3044, 2024, 1330, 29025, 11484,...
2.30911
977
import pika import time import json from random import randint from random_words import RandomWords #Fake_indexer pretends to index WARCs. #Fake_indexer consumers warc_created messages. #It submits job result messages. connection = pika.BlockingConnection(pika.ConnectionParameters("rabbit")) channel = connection.chan...
[ 11748, 279, 9232, 198, 11748, 640, 198, 11748, 33918, 198, 6738, 4738, 1330, 43720, 600, 198, 6738, 4738, 62, 10879, 1330, 14534, 37117, 198, 198, 2, 49233, 62, 9630, 263, 2181, 2412, 284, 6376, 11837, 32274, 13, 198, 2, 49233, 62, 96...
2.941176
187
from django.urls import path from . import views app_name = "filter" urlpatterns = [ path('', views.index, name='index'), path('apply/', views.apply, name='apply'), path('apply/grayscale/', views.grayscale, name='grayscale'), path('apply/sepia/', views.sepia, name='sepia'), path('apply/inversion/'...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 1330, 5009, 198, 198, 1324, 62, 3672, 796, 366, 24455, 1, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 5009, 13, 9630, 11, 1438, 11639, 963...
2.670241
373
# generates a static report page # TODO # what should the report contain? A description of all the cell types... # 1. scatterplot, both pre and post-processed, generated using plotly (this should include the js files directly) # 2. list of top 50 genes per cluster using 1-vs-rest ratio # 3. list of top 10 cell types pe...
[ 2, 18616, 257, 9037, 989, 2443, 198, 2, 16926, 46, 198, 2, 644, 815, 262, 989, 3994, 30, 317, 6764, 286, 477, 262, 2685, 3858, 986, 198, 2, 352, 13, 41058, 29487, 11, 1111, 662, 290, 1281, 12, 14681, 276, 11, 7560, 1262, 7110, 3...
2.531489
1,048
#!/usr/bin/env python3 ## ## Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved. ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the Licen...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2235, 198, 2235, 220, 15069, 7, 66, 8, 13130, 12, 1238, 2481, 32903, 27724, 3337, 11, 3457, 13, 1439, 6923, 33876, 13, 198, 2235, 198, 2235, 220, 770, 1430, 318, 1479, 3788,...
2.665306
490
import os.path import torchvision.transforms as transforms import torch import cv2 import numpy as np import glob from data.base_dataset import BaseDataset from models.sne_model import SNE class GMRPDdataset (BaseDataset): """dataloader for kitti dataset""" @staticmethod
[ 11748, 28686, 13, 6978, 201, 198, 11748, 28034, 10178, 13, 7645, 23914, 355, 31408, 201, 198, 11748, 28034, 201, 198, 11748, 269, 85, 17, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 15095, 201, 198, 6738, 1366, 13, 8692, ...
2.773585
106
from os import path, makedirs, remove from auth_data_generator import AuthDataGenerator from json_auth_data import JsonAuthData from sql_auth_data import SqlAuthData if __name__ == "__main__": main()
[ 6738, 28686, 1330, 3108, 11, 285, 4335, 17062, 11, 4781, 198, 198, 6738, 6284, 62, 7890, 62, 8612, 1352, 1330, 26828, 6601, 8645, 1352, 198, 6738, 33918, 62, 18439, 62, 7890, 1330, 449, 1559, 30515, 6601, 198, 6738, 44161, 62, 18439, ...
3.073529
68
import json import logging import os import re from typing import Dict, List, Optional, TypeVar, Union from aiogram import Bot from aiogram.types import InlineKeyboardMarkup, ReplyKeyboardMarkup from requests import Session as requests_session from sqlalchemy.orm import Session from .database.conf import session from...
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 302, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 32233, 11, 5994, 19852, 11, 4479, 198, 198, 6738, 257, 72, 21857, 1330, 18579, 198, 6738, 257, 72, 21857, 13, 19199, ...
3.541353
133
#!/usr/bin/python3 # -*- coding: utf-8 -*- # ============================================================================= # # FILE: tree.py # AUTHOR: Tan Duc Mai # EMAIL: tan.duc.work@gmail.com # CREATED: 26-Apr-2022 # DESCRIPTION: Demonstrates how to display a tree of files / directories. ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 38093, 25609, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 220, 45811, 25, 220, 5509, 13, 9078, 198, 2, 220...
2.682143
840
import requests from requests.auth import _basic_auth_str import json
[ 198, 11748, 7007, 198, 6738, 7007, 13, 18439, 1330, 4808, 35487, 62, 18439, 62, 2536, 198, 11748, 33918, 198 ]
3.736842
19
# Title: Construct Binary Tree from Preorder and Inorder Traversal # Link: https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/ from typing import List import os import sys sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) from libs.leet_code_utils import ...
[ 2, 11851, 25, 28407, 45755, 12200, 422, 3771, 2875, 290, 554, 2875, 4759, 690, 282, 198, 2, 7502, 25, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 41571, 12, 39491, 12, 21048, 12, 6738, 12, 3866, 2875, 12, 392, 12, 25...
3.021898
137
""" Copyright 2018 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/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
[ 37811, 198, 15269, 2864, 37927, 13200, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 1639, 743, 7...
2.972028
715
from __future__ import annotations __all__ = ["signal_masses_from_filenames"] from typing import Iterable import numpy as np
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 834, 439, 834, 796, 14631, 12683, 282, 62, 76, 13978, 62, 6738, 62, 10379, 268, 1047, 8973, 198, 198, 6738, 19720, 1330, 40806, 540, 198, 198, 11748, 299, 32152, 355, 45941, 628 ]
3.225
40
import numpy as np image_bbox = np.load("imagebbox.npy") print(image_bbox)
[ 11748, 299, 32152, 355, 45941, 198, 9060, 62, 65, 3524, 796, 45941, 13, 2220, 7203, 9060, 65, 3524, 13, 77, 9078, 4943, 198, 4798, 7, 9060, 62, 65, 3524, 8, 198 ]
2.419355
31
import os import sys import functools from qtpy.QtCore import QPoint from qtpy.QtGui import QPainter, QFont, QColor from PyQt5.uic import loadUi def load_ui(obj, filename=None, path=None, with_ui="ui"): """ Loads a QtDesigner .ui file into the given widget. If no filename is given, it tries to load fro...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 1257, 310, 10141, 198, 198, 6738, 10662, 83, 9078, 13, 48, 83, 14055, 1330, 1195, 12727, 198, 6738, 10662, 83, 9078, 13, 48, 83, 8205, 72, 1330, 1195, 38490, 353, 11, 1195, 23252, 11, 1195,...
2.419085
1,792
for c in range(0, 50+1, 2): print(c, end=' ') print('Fim!')
[ 1640, 269, 287, 2837, 7, 15, 11, 2026, 10, 16, 11, 362, 2599, 198, 220, 220, 220, 3601, 7, 66, 11, 886, 11639, 705, 8, 198, 4798, 10786, 37, 320, 0, 11537, 198 ]
1.939394
33
"""Nonadiabatic coupling implementation.""" from .nonAdiabaticCoupling import (calculate_couplings_3points, calculate_couplings_levine, compute_overlaps_for_coupling, correct_phases) __all__ = ['calculate_couplings...
[ 37811, 15419, 9189, 397, 1512, 40204, 7822, 526, 15931, 198, 6738, 764, 13159, 2782, 72, 397, 1512, 34, 280, 11347, 1330, 357, 9948, 3129, 378, 62, 66, 280, 47093, 62, 18, 13033, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
1.863454
249
from django.shortcuts import render import pyrebase from django.contrib import auth import datetime from datetime import timezone import time import uuid from django.template.defaulttags import register @register.filter #ADD FIREBASE CONFIG HERE config={ } firebase=pyrebase.initialize_app(config) authh=firebase.aut...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 11748, 12972, 260, 8692, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6284, 220, 198, 11748, 4818, 8079, 198, 6738, 4818, 8079, 1330, 640, 11340, 198, 11748, 640, 198, 11748, 334, ...
3.352381
105
"""Simple Graph Class""" from collections import defaultdict from pprint import pprint class Graph(object): """Simple Graph""" def __add_node(self, node): """Add new node to Graph""" self.nodes.add(node) def add_edge(self, from_node, to_node, distance): """Add new edge to node"""...
[ 37811, 26437, 29681, 5016, 37811, 198, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 4871, 29681, 7, 15252, 2599, 198, 220, 220, 220, 37227, 26437, 29681, 37811, 628, 220, 220, 220, 825, 11593, 28...
2.340836
311
from descriptors.haralick import get_haralicks from descriptors.lbp import get_lbp from descriptors.hog import get_hog
[ 6738, 12145, 669, 13, 9869, 282, 624, 1330, 651, 62, 9869, 282, 3378, 198, 6738, 12145, 669, 13, 23160, 79, 1330, 651, 62, 23160, 79, 198, 6738, 12145, 669, 13, 31897, 1330, 651, 62, 31897 ]
3.371429
35
import boto3 from botocore.exceptions import NoCredentialsError, ClientError
[ 11748, 275, 2069, 18, 198, 6738, 10214, 420, 382, 13, 1069, 11755, 1330, 1400, 34, 445, 14817, 12331, 11, 20985, 12331, 628 ]
3.545455
22
import networkx as nx __all__ = ["average_neighbor_degree"] def average_neighbor_degree(G, source="out", target="out", nodes=None, weight=None): r"""Returns the average degree of the neighborhood of each node. In an undirected graph, the neighborhood `N(i)` of node `i` contains the nodes that are connec...
[ 11748, 3127, 87, 355, 299, 87, 198, 198, 834, 439, 834, 796, 14631, 23913, 62, 710, 394, 2865, 62, 16863, 8973, 628, 198, 4299, 2811, 62, 710, 394, 2865, 62, 16863, 7, 38, 11, 2723, 2625, 448, 1600, 2496, 2625, 448, 1600, 13760, 2...
2.233589
2,346
import json import dateutil.parser import pytz from datetime import datetime import re from .utils import get_stream_from_s3body try: JSONParseException = json.decoder.JSONDecodeError except AttributeError: # Python 2 JSONParseException = ValueError
[ 11748, 33918, 198, 11748, 3128, 22602, 13, 48610, 198, 11748, 12972, 22877, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 302, 198, 6738, 764, 26791, 1330, 651, 62, 5532, 62, 6738, 62, 82, 18, 2618, 628, 198, 28311, 25, 198, 22...
3.275
80
r""" ====================== Audio sample rate test ====================== This example tests the TDT sample rate, which we expect to be ``24414.0625``. To test this: 1. Connect the TDT audio output to the sound card input. This can be on the same machine that the TDT is connected to, or a different one. In most...
[ 81, 37811, 198, 4770, 50155, 198, 21206, 6291, 2494, 1332, 198, 4770, 50155, 198, 198, 1212, 1672, 5254, 262, 13320, 51, 6291, 2494, 11, 543, 356, 1607, 284, 307, 7559, 25707, 1415, 13, 3312, 1495, 15506, 13, 198, 2514, 1332, 428, 25,...
2.876084
807
import re import json import scrapy import pandas as pd
[ 11748, 302, 198, 11748, 33918, 198, 11748, 15881, 88, 198, 11748, 19798, 292, 355, 279, 67, 628 ]
3.352941
17
from django.contrib import admin from .models import TicketStatus, Ticket, TicketComment, Category admin.site.register(TicketStatus) admin.site.register(Ticket) admin.site.register(TicketComment) admin.site.register(Category)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 27530, 1330, 24014, 19580, 11, 24014, 11, 24014, 21357, 11, 21743, 198, 198, 28482, 13, 15654, 13, 30238, 7, 51, 9715, 19580, 8, 198, 28482, 13, 15654, 13, 30238, 7,...
3.469697
66
# ___________________________________________________________________________ # # EGRET: Electrical Grid Research and Engineering Tools # Copyright 2019 National Technology & Engineering Solutions of Sandia, LLC # (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. # Government retains certain r...
[ 2, 220, 220, 27193, 2602, 17569, 198, 2, 198, 2, 220, 41513, 26087, 25, 40224, 24846, 4992, 290, 14044, 20003, 198, 2, 220, 15069, 13130, 2351, 8987, 1222, 14044, 23555, 286, 3837, 544, 11, 11419, 198, 2, 220, 357, 11251, 7597, 737, ...
2.649573
1,521
#!/usr/bin/env python # Copyright 2021 Venky Raju # # 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, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 33448, 9932, 2584, 13308, 84, 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, 2...
2.813609
338
from datafiles import datafile, auto, Missing @datafile("./notebooks/files/items/{self.name}.yml") class InventoryItem: """Class for keeping track of an item in inventory.""" name: str unit_price: float quantity_on_hand: int = 0 item = InventoryItem("foobar", Missing) sample = auto("./notebooks/fil...
[ 6738, 1366, 16624, 1330, 1366, 7753, 11, 8295, 11, 25639, 628, 198, 31, 7890, 7753, 7, 1911, 14, 11295, 12106, 14, 16624, 14, 23814, 14, 90, 944, 13, 3672, 27422, 88, 4029, 4943, 198, 4871, 35772, 7449, 25, 198, 220, 220, 220, 37227...
2.973451
113
# -*- coding: utf-8 -*- import pyspark from pyspark.sql import SparkSession from pyspark.sql.types import DataType from pyspark.sql.types import StructType, StructField, StringType, ArrayType, IntegerType spark = SparkSession.builder.appName('types').getOrCreate() arrayType = ArrayType(IntegerType(),False) print(arr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 279, 893, 20928, 198, 6738, 279, 893, 20928, 13, 25410, 1330, 17732, 36044, 198, 6738, 279, 893, 20928, 13, 25410, 13, 19199, 1330, 6060, 6030, 198, 6738, 27...
3.093023
129
# -*- coding: utf-8 -*- import jwt from django.conf.urls import include, url from django.contrib.auth import get_user_model from django.test.utils import override_settings from django.utils.encoding import force_text from rest_framework import response, routers, serializers, status, views, viewsets from rest_framework....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 474, 46569, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, ...
3.012579
318
# DOC: # http://www.zillow.com/howto/api/GetDemographics.htm # # EXAMPLES: # http://www.zillow.com/webservice/GetDemographics.htm?zws-id=X1-ZWz1e1hgxwby17_81d4x&state=WA&city=Seattle&neighborhood=Ballard # http://www.zillow.com/webservice/GetDemographics.htm?zws-id=X1-ZWz1e1hgxwby17_81d4x&state=CA&city=SF&neighborhood=...
[ 2, 37760, 25, 198, 2, 2638, 1378, 2503, 13, 89, 359, 322, 13, 785, 14, 4919, 1462, 14, 15042, 14, 3855, 11522, 24188, 13, 19211, 198, 2, 198, 2, 7788, 2390, 6489, 1546, 25, 198, 2, 2638, 1378, 2503, 13, 89, 359, 322, 13, 785, ...
2.092457
822
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # ============================================================================ # Erfr - One-time pad encryption tool # Obfuscator script # Copyright (C) 2018 by Ralf Kilian # Distributed under the MIT License (https://opensource.org/licenses/MIT) # # Website: http://www.u...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 38093, 2559, 18604, 198, 2, 5256, 8310, 532, 1881, 12, 2435, 14841, 15835, 2891, 198, 2, 1835, 37695, 135...
3.616438
146
import rospy from yaw_controller import YawController from pid import PID from lowpass import LowPassFilter GAS_DENSITY = 2.858 MIN_SPEED = 0.1 # m/s ONE_MPH = 0.44704
[ 198, 11748, 686, 2777, 88, 198, 198, 6738, 331, 707, 62, 36500, 1330, 575, 707, 22130, 198, 6738, 46514, 1330, 37022, 198, 6738, 1877, 6603, 1330, 7754, 14478, 22417, 198, 198, 38, 1921, 62, 35, 16938, 9050, 796, 362, 13, 23, 3365, ...
2.432432
74
class FitOutput: """ Output object of a Trainer fit method. Contains metric accumulators for training and validation and additional information such as exception that was thrown during training. """
[ 4871, 25048, 26410, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 25235, 2134, 286, 257, 31924, 4197, 2446, 13, 49850, 18663, 10507, 24325, 329, 3047, 290, 21201, 290, 3224, 1321, 884, 355, 6631, 198, 220, 220, 220, 326, 373, 875...
4.215686
51
from collections import Iterable from django.contrib.postgres.fields import ArrayField as _ArrayField, JSONField as _JSONField from rest_framework.exceptions import ValidationError ARRAY_FIELD_ERROR = 'Поле должно быть масссивом' JSONField = _JSONField
[ 6738, 17268, 1330, 40806, 540, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 7353, 34239, 13, 25747, 1330, 15690, 15878, 355, 4808, 19182, 15878, 11, 19449, 15878, 355, 4808, 40386, 15878, 198, 6738, 1334, 62, 30604, 13, 1069, 11755, ...
2.774194
93
import sys import pandas as pd import numpy as np import bokeh from bokeh.plotting import figure from bokeh.layouts import row, column from bokeh.models import HoverTool from bokeh.io import show, output_file from bokeh.models.widgets import Panel, Tabs sys.path.append("./core/containers/") sys.path.append("./core/mo...
[ 11748, 25064, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 1489, 365, 71, 198, 6738, 1489, 365, 71, 13, 29487, 889, 1330, 3785, 198, 6738, 1489, 365, 71, 13, 10724, 5269, 1330, 5752, 11, ...
2.20244
3,033
""" A package for comparing climate station time series data to gridded datasets, with tools for downloading `gridMET <http://www.climatologylab.org/gridmet.html>`_ data. Major functionality includes tools to: pair station locations with overlapping gridcells; download gridMET data from OpenDap or Google EarthEngine se...
[ 37811, 198, 32, 5301, 329, 14176, 4258, 4429, 640, 2168, 1366, 284, 1036, 1638, 276, 40522, 11, 351, 4899, 329, 22023, 4600, 25928, 47123, 1279, 4023, 1378, 2503, 13, 565, 320, 265, 1435, 23912, 13, 2398, 14, 25928, 4164, 13, 6494, 29...
4.112022
366
from graphene import ObjectType,Field from database.models import CovidInfoByCountry from database.models import CovidInfo import graphene from database.models import NphoIntensiveCareCases, NphoTotalTests, NphoAgeData, NphoGenderAge, NphoTotalForAgeGroups, NphoAgeGroups, NphoGenderAge
[ 6738, 42463, 1330, 9515, 6030, 11, 15878, 198, 6738, 6831, 13, 27530, 1330, 39751, 312, 12360, 3886, 33921, 198, 6738, 6831, 13, 27530, 1330, 39751, 312, 12360, 198, 11748, 42463, 198, 6738, 6831, 13, 27530, 1330, 399, 746, 78, 5317, 20...
3.337209
86
# -*- coding: utf-8 -*- # Generated by Django 1.11.18 on 2019-07-10 22:34 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1507, 319, 13130, 12, 2998, 12, 940, 2534, 25, 2682, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198,...
2.709091
55
import random import string import hashlib from Crypto.Cipher import DES from Crypto import Random import codecs import base64
[ 11748, 4738, 198, 11748, 4731, 198, 11748, 12234, 8019, 198, 6738, 36579, 13, 34, 10803, 1330, 22196, 198, 6738, 36579, 1330, 14534, 198, 11748, 40481, 82, 198, 11748, 2779, 2414, 628 ]
4.129032
31
# -*- coding: utf-8 -*- """ pip_services3_commons.data.IdGenerator ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ID generator implementation. :copyright: Conceptual Vision Consulting LLC 2018-2019, see AUTHORS for more details. :license: MIT, see LICENSE for more details. """ import random import...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 7347, 62, 30416, 18, 62, 9503, 684, 13, 7890, 13, 7390, 8645, 1352, 198, 220, 220, 220, 220, 27156, 27156, 8728, 93, 198, 220, 220, 220, 2...
2.667925
530
from dataclasses import dataclass from typing import TypeVar import cairo import math @dataclass @dataclass @dataclass @dataclass @dataclass @dataclass @dataclass @dataclass TTrans = TypeVar("TTrans", bound="Transformable")
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 5994, 19852, 198, 198, 11748, 1275, 7058, 198, 11748, 10688, 628, 198, 31, 19608, 330, 31172, 628, 198, 31, 19608, 330, 31172, 628, 198, 31, 19608, 330, 31172, 628,...
2.804598
87
'''Crie um programa que leia idade e sexo de varias pessoas e pergunte se o usuario quer conrinuar no final mostre quantas pessoas tem mais de 18 anos quantos homens foram cadastrados e quantas mulheres tem menos de 20 anos''' pessoas_18 = mulher_20 = homen = 0 while True: idade = int(input('Digite a Idade: ')) ...
[ 7061, 6, 34, 5034, 23781, 1430, 64, 8358, 443, 544, 4686, 671, 304, 1714, 78, 390, 1401, 4448, 279, 408, 78, 292, 198, 68, 583, 70, 6311, 384, 267, 514, 84, 4982, 42517, 369, 12769, 84, 283, 198, 3919, 2457, 749, 260, 198, 40972, ...
2.092457
411
"""how to transpose a table in Python, called pivoting a table in Excel.""" from pprint import pprint as pp print("*** Almiryda hourly temperatures from 28/07/2019 to 31/07/2019") sun = [20, 20, 19, 19, 19, 20, 20, 22, 23, 24, 27, 30, 33, 35, 38, 41, 40, 38, 35, 30, 28, 25, 23, 22] mon = [21, 19, 18, 18, 19, 20, 21, 2...
[ 37811, 4919, 284, 1007, 3455, 257, 3084, 287, 11361, 11, 198, 7174, 16767, 10720, 257, 3084, 287, 24134, 526, 15931, 198, 6738, 279, 4798, 1330, 279, 4798, 355, 9788, 198, 198, 4798, 7203, 8162, 978, 10793, 5173, 64, 30160, 10101, 422, ...
2.776515
528
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6369, generator: {generator}) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # ---------------------------------------...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 6127, 7560, 416, 5413, 357, 49, 8, 11160, 19452, 6127, 35986, 357, 2306, 26522, 25, 513, 13, 15, 13, 21, 30803, 11, 17301, 25, 1391, 8612, 1352, 30072, 198, 2, 19179, 743,...
3.042245
1,728
"""Tests for helpers module.""" import datetime import errno from datetime import date from unittest import mock from unittest.mock import call, mock_open, patch import pytest from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN from pytest_homeassistant_custom_component.common import MockConfigEntry f...
[ 37811, 51, 3558, 329, 49385, 8265, 526, 15931, 198, 11748, 4818, 8079, 198, 11748, 11454, 3919, 198, 6738, 4818, 8079, 1330, 3128, 198, 6738, 555, 715, 395, 1330, 15290, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 869, 11, 15290, 62,...
2.295013
1,183
# -*- coding: utf-8 -*- """ @file unittest_utils.py @author Marek Heinrich @date 2015-02-24 @version $Id$ Test module for utils functions. SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ Copyright (C) 2014-2017 DLR (http://www.dlr.de/) and contributors This file is part of SUMO. SUMO is free softw...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 7753, 220, 220, 220, 555, 715, 395, 62, 26791, 13, 9078, 198, 31, 9800, 220, 36989, 74, 26431, 7527, 198, 31, 4475, 220, 220, 220, 1853, 12, 2999, 12...
3.032086
187
import re url_alura = ExtratorUrl("https://alura.com.br/search?query=python&theme=dark") url_alura2 = ExtratorUrl("https://alura.com.br/search?query=python&theme=dark") print(url_alura, end="\n\n") print(f'Parametros da URL: {url_alura.parametros}') print(f'Valor do parametro "query" na URL: {url_alura.buscar_parame...
[ 11748, 302, 628, 198, 198, 6371, 62, 282, 5330, 796, 5683, 12392, 28165, 7203, 5450, 1378, 282, 5330, 13, 785, 13, 1671, 14, 12947, 30, 22766, 28, 29412, 5, 43810, 28, 21953, 4943, 198, 6371, 62, 282, 5330, 17, 796, 5683, 12392, 281...
2.461078
167
from __future__ import annotations import csv import io import os from enum import Enum, auto from logging import Logger import torch from torch.utils.data import Dataset from .config import TrainerConfig
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 269, 21370, 198, 11748, 33245, 198, 11748, 28686, 198, 6738, 33829, 1330, 2039, 388, 11, 8295, 198, 6738, 18931, 1330, 5972, 1362, 198, 198, 11748, 28034, 198, 6738, 28034, 13, 26791,...
3.736842
57
from django.contrib import admin from .models import Todo admin.site.register(Todo, TodoAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 27530, 1330, 309, 24313, 628, 198, 198, 28482, 13, 15654, 13, 30238, 7, 51, 24313, 11, 309, 24313, 46787, 8, 198 ]
3
33
import re
[ 11748, 302, 198, 220, 220, 220, 220, 198 ]
1.875
8
import unittest from fibmodule import fib from numpy.testing import assert_allclose if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 12900, 21412, 1330, 12900, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 439, 19836, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198,...
2.72549
51
"""Scenarios benchmark tests""" import os import pathlib import yaml import pytest import pandas as pd import numpy as np import gmhazard_calc as sc @pytest.fixture(scope="module")
[ 37811, 3351, 268, 13010, 18335, 5254, 37811, 198, 11748, 28686, 198, 11748, 3108, 8019, 198, 198, 11748, 331, 43695, 198, 11748, 12972, 9288, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 308, ...
3.04918
61