content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import csv import requests from requests.auth import HTTPBasicAuth
[ 11748, 269, 21370, 198, 11748, 7007, 198, 6738, 7007, 13, 18439, 1330, 14626, 26416, 30515, 628, 628, 628, 628, 628, 198 ]
3.666667
21
import json from datetime import datetime import os import logging import traceback import uuid import sys sys.path.insert(0, '/opt') import boto3 from botocore.exceptions import ClientError from utils import retry logger = get_logger() @retry(ExceptionToCheck=(Exception,), max_retries=1, multiplier=2, log...
[ 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 12854, 1891, 198, 11748, 334, 27112, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 31051, 8738, 11537, 198, 11748, ...
3.141509
106
"""smh URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based vie...
[ 37811, 5796, 71, 10289, 28373, 198, 198, 464, 4600, 6371, 33279, 82, 63, 1351, 11926, 32336, 284, 5009, 13, 1114, 517, 1321, 3387, 766, 25, 198, 220, 220, 220, 3740, 1378, 31628, 13, 28241, 648, 404, 305, 752, 13, 785, 14, 268, 14, ...
2.684303
567
from django import forms
[ 6738, 42625, 14208, 1330, 5107 ]
4.8
5
# pylint: disable=missing-function-docstring, missing-module-docstring/ # coding: utf-8 from pyccel.parser.syntax.himi import parse ###################### if __name__ == '__main__': test_himi_declare()
[ 2, 279, 2645, 600, 25, 15560, 28, 45688, 12, 8818, 12, 15390, 8841, 11, 4814, 12, 21412, 12, 15390, 8841, 14, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 12972, 66, 5276, 13, 48610, 13, 1837, 41641, 13, 71, 25236, 1330, ...
2.824324
74
from django.db import models from django.core.files.base import ContentFile import random
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 7295, 13, 16624, 13, 8692, 1330, 14041, 8979, 198, 11748, 4738, 628 ]
3.791667
24
from unittest.mock import MagicMock import pytest import ujson from kaori.adapters.slack import SlackAdapter from .support import CardHelpCommand, CardPriceCommand @pytest.mark.asyncio
[ 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 198, 198, 11748, 12972, 9288, 198, 11748, 334, 17752, 198, 6738, 38387, 10145, 13, 324, 12126, 13, 6649, 441, 1330, 36256, 47307, 198, 198, 6738, 764, 11284, 1330, 5172, 22087, 21...
3.258621
58
# # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ The exos vlans fact class It is in this file the configuration is collected from the device for a given resource, parsed, and the facts tree is populated based on the con...
[ 2, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 13130, 2297, 10983, 198, 2, 22961, 3611, 5094, 13789, 410, 18, 13, 15, 10, 198, 2, 357, 3826, 27975, 45761, 393, 3740, 1378, 2503, 13, 41791, 13, 2...
2.457529
1,036
import torch import numpy as np from torch.nn import Module, Conv2d, Parameter from torch.nn import functional as F from torch.nn.modules.utils import _pair import math #from torch.nn.parameter import Parameter
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 28034, 13, 20471, 1330, 19937, 11, 34872, 17, 67, 11, 25139, 2357, 198, 6738, 28034, 13, 20471, 1330, 10345, 355, 376, 198, 6738, 28034, 13, 20471, 13, 18170, 13, 26791, 1330,...
3.125
72
import pytest import psycopg2 from tanker import Pool @pytest.yield_fixture(scope='session', autouse=True)
[ 11748, 12972, 9288, 198, 11748, 17331, 22163, 70, 17, 198, 198, 6738, 46335, 1330, 19850, 628, 198, 31, 9078, 9288, 13, 88, 1164, 62, 69, 9602, 7, 29982, 11639, 29891, 3256, 1960, 1076, 28, 17821, 8, 198 ]
2.972973
37
""" Dispatcher responds with station numbers not calculated yet until no such remain. It is for calculation of the reference table. """ import pandas as pd import socket import json import logging from datetime import datetime import utils import constants logging.basicConfig( level=logging.INFO, format=...
[ 37811, 198, 7279, 8071, 2044, 20067, 351, 4429, 3146, 407, 10488, 1865, 1566, 645, 884, 3520, 13, 198, 198, 1026, 318, 329, 17952, 286, 262, 4941, 3084, 13, 198, 37811, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 17802, 198, 117...
2.266385
946
from django.db import models class AsyncImportLog(models.Model): """Used to log and follow the asyncronous import of data""" IMPORT_ADI = 1 IMPORT_GL = 2 IMPORT_CHOICE = ( (IMPORT_ADI, "ADI file from Admin Tool"), (IMPORT_GL, "GL Report from Oracle"), ) STATUS_STARTED = 1 ...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 198, 4871, 1081, 13361, 20939, 11187, 7, 27530, 13, 17633, 2599, 198, 220, 220, 220, 37227, 38052, 284, 2604, 290, 1061, 262, 30351, 1313, 516, 1330, 286, 1366, 37811, 628, 220, 220, 220, ...
2.445355
366
from HelperFunctions import find_author import datetime class Message: """Class for individual message: date, time, mood, author, etc. """ @property
[ 6738, 5053, 525, 24629, 2733, 1330, 1064, 62, 9800, 198, 11748, 4818, 8079, 198, 198, 4871, 16000, 25, 198, 220, 37227, 9487, 329, 1981, 3275, 25, 3128, 11, 640, 11, 10038, 11, 1772, 11, 3503, 13, 37227, 198, 220, 220, 198, 220, 248...
3.488889
45
#!/usr/bin/env python # SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 """ Check files for copyright headers: - file not on ignore list: - old Espressif copyright -> replace with SPDX - SPDX with invalid year or old company name -> replace with valid SPDX ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 30628, 55, 12, 8979, 15269, 8206, 25, 33448, 20386, 601, 361, 11998, 357, 2484, 272, 20380, 8, 7375, 42513, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, ...
2.47486
5,907
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 198, 6738, 435, 541, 323, 13, 64, 404, 13, 15042, 13, 26209, 13, 2348, 541, 323, 31077, 1330, 978,...
2.571429
49
#!/usr/bin/env python """ matplotlib with datetime64 testing """ import xarray from datetime import datetime from matplotlib.pyplot import figure, show import matplotlib.dates as mdates import numpy as np def test_imshow_datetime(): """ keogram using matplotlib imshow """ Ny = 500 # arbitrary ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 6759, 29487, 8019, 351, 4818, 8079, 2414, 4856, 198, 37811, 198, 11748, 2124, 18747, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 2603, 29487, 8019, 13, 9078, 29487, 1...
2.37859
383
a="nikhil" b=4.5 c=5 d=True print(type(a)) print(type(b)) print(type(c)) print(type(d))
[ 64, 2625, 77, 13848, 346, 1, 198, 65, 28, 19, 13, 20, 198, 66, 28, 20, 198, 67, 28, 17821, 198, 4798, 7, 4906, 7, 64, 4008, 198, 4798, 7, 4906, 7, 65, 4008, 198, 4798, 7, 4906, 7, 66, 4008, 198, 4798, 7, 4906, 7, 67, 4008 ...
1.8125
48
#!/usr/bin/env python3 # -*- coding : utf-8 -*- # Author: Witek Bobrowski import json import argparse from humblecritic import goodreads as gr from humblecritic import __version__
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 1058, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 6434, 25, 370, 578, 74, 5811, 8516, 4106, 198, 198, 11748, 33918, 198, 11748, 1822, 29572, 198, 6738, 19695, ...
2.936508
63
def collinear(coordinates): """ Passing thru one pt with some fixed slope \implies must exist only one such line Rmk. If we are to use slope, we must deal separately with one particular case: Vertical line. """ A, B, C = coordinates if A[0] == B[0] == C[0]: return True prin...
[ 4299, 2927, 259, 451, 7, 37652, 17540, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 46389, 33834, 530, 42975, 351, 617, 5969, 22638, 3467, 23928, 444, 198, 220, 220, 220, 1276, 2152, 691, 530, 884, 1627, 628, 220, 220, 220, ...
2.012422
483
version https://git-lfs.github.com/spec/v1 oid sha256:74abe5c1d0b842b6a73d801d81afbf1969753536c70c77b34a1cfce907080a53 size 391
[ 9641, 3740, 1378, 18300, 12, 1652, 82, 13, 12567, 13, 785, 14, 16684, 14, 85, 16, 198, 1868, 427, 64, 11645, 25, 4524, 11231, 20, 66, 16, 67, 15, 65, 23, 3682, 65, 21, 64, 4790, 67, 41531, 67, 6659, 1878, 19881, 38391, 2425, 232...
1.939394
66
""" CARPI REDIS DATA BUS (C) 2018, Raphael "rGunti" Guntersweiler Licensed under MIT """ from logging import Logger from threading import Thread from time import sleep, time from typing import Any from carpicommons.log import logger from redis import StrictRedis from redis.client import PubSub if __name__ == "__m...
[ 37811, 198, 20034, 11901, 23848, 1797, 42865, 43949, 198, 7, 34, 8, 2864, 11, 37464, 366, 81, 38, 2797, 72, 1, 6748, 1010, 732, 5329, 198, 26656, 15385, 739, 17168, 198, 37811, 198, 6738, 18931, 1330, 5972, 1362, 198, 6738, 4704, 278,...
3.34188
117
# @lc app=leetcode id=468 lang=python3 # # [468] Validate IP Address # # https://leetcode.com/problems/validate-ip-address/description/ # # algorithms # Medium (25.61%) # Likes: 557 # Dislikes: 2155 # Total Accepted: 109.5K # Total Submissions: 426.8K # Testcase Example: '"172.16.254.1"' # # Given a string IP, r...
[ 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 38472, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 38472, 60, 3254, 20540, 6101, 17917, 198, 2, 198, 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 12102, 378, 12, ...
2.203185
1,570
import os import logging from time import sleep from threading import Thread from datetime import datetime, timedelta
[ 11748, 28686, 198, 11748, 18931, 198, 6738, 640, 1330, 3993, 198, 6738, 4704, 278, 1330, 14122, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 628 ]
4.407407
27
import json import os qutewal_dynamic_loading = False home = os.getenv('HOME') daemon_relative = '.config/qutebrowser/qutewald.py' daemon_absolute = os.path.join(home, daemon_relative) with open(os.path.join(home, '.cache', '.bg')) as bgfile: bg = bgfile.read().strip() hue_1 = '{color6}' hue_2 = '{color4}' hue...
[ 11748, 33918, 198, 11748, 28686, 198, 198, 80, 315, 413, 282, 62, 67, 28995, 62, 25138, 796, 10352, 198, 198, 11195, 796, 28686, 13, 1136, 24330, 10786, 39069, 11537, 198, 6814, 7966, 62, 43762, 796, 45302, 11250, 14, 80, 1133, 40259, ...
2.749455
4,127
#!/usr/bin/env python # -*- coding:utf-8 -*- ''' Created on 25.07.2013 @author: rombr Deploy: setup.py sdist upload ''' try: from setuptools import setup except ImportError: from distutils.core import setup from distutils.command.install import INSTALL_SCHEMES import os def fullsplit(path, result=None): ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 41972, 319, 1679, 13, 2998, 13, 6390, 198, 198, 31, 9800, 25, 9267, 1671, 198, 198, 49322, 25, 198, 40406,...
2.343575
1,074
import os from setuptools import setup VERSION = "1.0.4" NAMESPACE = "newstore" NAME = "{}.json_encoder".format(NAMESPACE) setup( name=NAME, version=VERSION, description="JSONEncoder", long_description=local_text_file("README.md"), long_description_content_type="text/markdown", author="NewS...
[ 11748, 28686, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 43717, 796, 366, 16, 13, 15, 13, 19, 1, 198, 45, 29559, 47, 11598, 796, 366, 3605, 8095, 1, 198, 20608, 796, 45144, 27422, 17752, 62, 12685, 12342, 1911, 18982, ...
2.5125
240
# MIT licensed # Copyright (c) 2013-2020 lilydjwg <lilydjwg@gmail.com>, et al. API_URL = 'https://crates.io/api/v1/crates/%s'
[ 2, 17168, 11971, 198, 2, 15069, 357, 66, 8, 2211, 12, 42334, 300, 813, 28241, 86, 70, 1279, 75, 813, 28241, 86, 70, 31, 14816, 13, 785, 22330, 2123, 435, 13, 198, 198, 17614, 62, 21886, 796, 705, 5450, 1378, 6098, 689, 13, 952, ...
2.22807
57
# -*- coding: utf-8 -*- from typing import Optional, Union, Any, Callable from recc.mime.mime_type import MimeType MimeEncoder = Callable[[Any], bytes] MimeDecoder = Callable[[bytes], Any]
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 19720, 1330, 32233, 11, 4479, 11, 4377, 11, 4889, 540, 198, 6738, 302, 535, 13, 76, 524, 13, 76, 524, 62, 4906, 1330, 337, 524, 6030, 198, 198, 44, 524, ...
2.742857
70
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import datetime import collections import logging from django.conf import settings from ralph.util import plugin from ralph_pricing.models imp...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443,...
2.402062
776
# -*- encoding: utf-8 -*- # if __name__ == "__main__": import sys, keras, tensorflow, sklearn print("Python %s" % sys.version) print("Keras %s" % keras.__version__) print("TesnforFlow %s" % tensorflow.__version__) print("scikit-learn %s" % sklearn.__version__) import argparse parser = argparse.ArgumentP...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 1330, 25064, 11, 41927, 292, 11, 11192, 273, 11125, 11, 1341, 35720, 198, 220, 3601, 72...
2.866667
300
"""This submodule implements the `OptimadeQuery` class, which enables filtering on any crystal structure database that implements an [OPTIMADE API](https://optimade.org). """ import logging import os from pathlib import Path from typing import List, Union import requests from Xerus.settings.settings import REQUESTS_T...
[ 37811, 1212, 850, 21412, 23986, 262, 4600, 27871, 320, 671, 20746, 63, 1398, 11, 543, 13536, 25431, 198, 261, 597, 15121, 4645, 6831, 326, 23986, 281, 685, 3185, 51, 3955, 19266, 7824, 16151, 5450, 1378, 40085, 671, 13, 2398, 737, 198, ...
3.821782
101
#!/usr/bin/python from Bio import SeqIO from Bio.SeqRecord import SeqRecord from Bio.SeqFeature import SeqFeature import sys import os outdir = sys.argv[2] handle = open(sys.argv[1], 'rt') handle_name = os.path.basename(sys.argv[1]).split('.')[0] outfile = open(os.path.join(outdir,f"{handle_name}.ffn"), 'w') seque...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 628, 198, 6738, 16024, 1330, 1001, 80, 9399, 198, 6738, 16024, 13, 4653, 80, 23739, 1330, 1001, 80, 23739, 198, 6738, 16024, 13, 4653, 80, 38816, 1330, 1001, 80, 38816, 198, 11748, 25064, 198, 117...
2.256993
572
import smoothing_convolution import numpy as np print(smoothing_convolution.apply_convolution(np.array([[1,1,1],[1,1,1],[1,1,1]]), np.array([[1,1,1],[1,1,1],[1,1,1]])))
[ 11748, 32746, 722, 62, 42946, 2122, 198, 11748, 299, 32152, 355, 45941, 198, 4798, 7, 5796, 1025, 722, 62, 42946, 2122, 13, 39014, 62, 42946, 2122, 7, 37659, 13, 18747, 26933, 58, 16, 11, 16, 11, 16, 38430, 16, 11, 16, 11, 16, 384...
2.236842
76
# Copyright (c) OpenMMLab. All rights reserved. from .mswin_head import MultiSwinHead from .fpn_transformer_head import FpnTransformerHead __all__ = [ 'MultiSwinHead', 'FpnTransformerHead' ]
[ 2, 15069, 357, 66, 8, 4946, 44, 5805, 397, 13, 1439, 2489, 10395, 13, 198, 6738, 764, 907, 5404, 62, 2256, 1330, 15237, 50, 5404, 13847, 198, 6738, 764, 69, 21999, 62, 7645, 16354, 62, 2256, 1330, 376, 21999, 8291, 16354, 13847, 198...
2.84058
69
import logging import yaml import gateway_to_cookies from pathlib import Path from pandas import read_csv from joblib import dump from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import accuracy_score logger = logging.getLogger(__name__) def main(): """ Runs RandomForestClassifier on trai...
[ 11748, 18931, 198, 11748, 331, 43695, 198, 11748, 24308, 62, 1462, 62, 27916, 444, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19798, 292, 1330, 1100, 62, 40664, 198, 6738, 1693, 8019, 1330, 10285, 198, 6738, 1341, 35720, 13, 1072, 1...
2.605217
575
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Graphviz wrapper to visualize SEM models.""" from .model import Model import logging try: import graphviz __GRAPHVIZ = True except ModuleNotFoundError: logging.info("No graphviz package found, visualization method is " "unavailable") _...
[ 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, 37065, 85, 528, 29908, 284, 38350, 48603, 4981, 526, 15931, 198, 6738, 764, 19849, 1330, 9104, 198, 11748, 1...
2.230179
1,955
from precise_bbcode.bbcode import get_parser from precise_bbcode.test import gen_bbcode_tag_klass
[ 6738, 7141, 62, 11848, 8189, 13, 11848, 8189, 1330, 651, 62, 48610, 198, 6738, 7141, 62, 11848, 8189, 13, 9288, 1330, 2429, 62, 11848, 8189, 62, 12985, 62, 74, 31172, 628 ]
3.193548
31
from typing import Union, Iterable import numpy as np from .static_shape import StaticShape from .tensor import Tensor, Shape from ..utils import validate NCHW = ConvFormat((0, 1, 2, 3), (0, 1, 2, 3)) CHWN = ConvFormat((3, 0, 1, 2), (0, 1, 2, 3)) TensorFlowNHWC = ConvFormat((0, 3, 1, 2), (3, 2, 0, 1)) def im2col...
[ 6738, 19720, 1330, 4479, 11, 40806, 540, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 764, 12708, 62, 43358, 1330, 36125, 33383, 198, 6738, 764, 83, 22854, 1330, 309, 22854, 11, 25959, 198, 6738, 11485, 26791, 1330, 26571, 6...
2.440101
1,586
import matplotlib.pyplot as plt import pandas as pd import numpy as np import streamlit as st from statsmodels.tsa.stattools import adfuller from transformation_function import timeSeriesTransformer def test_stationary(timeseries, plot_results=False, data_frequency=None, force_transformation_technique=None, custom_tr...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4269, 18250, 355, 336, 198, 198, 6738, 9756, 27530, 13, 912, 64, 13, 301, 1078, 10141, 1330...
2.948963
2,410
"""This registry can read data from LAN devices and send commands to them. For non DIY devices data will be encrypted with devicekey. The registry cannot decode such messages by itself because it does not manage the list of known devices and their devicekey. """ import asyncio import base64 import ipaddress import json...
[ 37811, 1212, 20478, 460, 1100, 1366, 422, 24192, 4410, 290, 3758, 9729, 284, 606, 13, 198, 1890, 1729, 25134, 4410, 1366, 481, 307, 19365, 351, 3335, 2539, 13, 383, 20478, 2314, 198, 12501, 1098, 884, 6218, 416, 2346, 780, 340, 857, 4...
3.571906
299
""" GRPC server connection. """ import atexit import logging import socket import threading import time from contextlib import closing import grpc from .proto import (xenon_pb2_grpc) from .compat import (start_xenon_server, kill_process) def check_socket(host, port): """Checks if port is open on host. This is...
[ 37811, 198, 10761, 5662, 4382, 4637, 13, 198, 37811, 198, 198, 11748, 379, 37023, 198, 11748, 18931, 198, 11748, 17802, 198, 11748, 4704, 278, 198, 11748, 640, 198, 198, 6738, 4732, 8019, 1330, 9605, 198, 198, 11748, 1036, 14751, 198, 1...
2.73855
1,048
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import json import pandas as pd def get_data_in_format(original_data: json) -> pd.DataFrame: """Convert the json data into dataframe. Args: original_data (json): Json data requested from database directly. Returns: ...
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 198, 2, 49962, 739, 262, 17168, 5964, 13, 198, 198, 11748, 33918, 198, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 4299, 651, 62, 7890, 62, 259, 62, 18982, 7, 14986, 62, 7890, 25, 33918, ...
2.468303
489
from z3 import * from antlr4.InputStream import InputStream from antlr4.CommonTokenStream import CommonTokenStream from anyHR.constraint.ConstraintQuantitativeEvaluator import ConstraintQuantitativeEvaluator from anyHR.constraint.ConstrainttoZ3Equality import ConstrainttoZ3Equality from anyHR.constraint.parser.Constra...
[ 6738, 1976, 18, 1330, 1635, 198, 6738, 1885, 14050, 19, 13, 20560, 12124, 1330, 23412, 12124, 198, 6738, 1885, 14050, 19, 13, 17227, 30642, 12124, 1330, 8070, 30642, 12124, 198, 198, 6738, 597, 17184, 13, 1102, 2536, 2913, 13, 3103, 253...
2.52572
972
''' Write a function that accepts an array of 10 integers (between 0 and 9), that returns a string of those numbers in the form of a phone number. Example: create_phone_number([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]) # => returns "(123) 456-7890" The returned format must be correct in order to complete this challenge. Don't f...
[ 7061, 6, 198, 16594, 257, 2163, 326, 18178, 281, 7177, 286, 838, 37014, 357, 23395, 657, 290, 860, 828, 326, 5860, 257, 4731, 286, 883, 3146, 287, 262, 1296, 286, 257, 3072, 1271, 13, 198, 198, 16281, 25, 198, 17953, 62, 4862, 62, ...
3.490566
106
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 33160, 383, 3012, 4992, 46665, 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, ...
2.352232
5,309
pop = pd.read_csv("../data/IHME_GBD_2016_POPULATION_ESTIMATES_1990_2016_Y2017M09D14.CSV") pop
[ 12924, 796, 279, 67, 13, 961, 62, 40664, 7203, 40720, 7890, 14, 40, 39, 11682, 62, 4579, 35, 62, 5304, 62, 47, 3185, 6239, 6234, 62, 6465, 3955, 29462, 62, 19891, 62, 5304, 62, 56, 5539, 44, 2931, 35, 1415, 13, 7902, 53, 4943, 1...
2
47
# encoding = utf-8 __author__ = "Ang Li" c = Cat() c.shout()
[ 2, 21004, 796, 3384, 69, 12, 23, 198, 834, 9800, 834, 796, 366, 13450, 7455, 1, 198, 198, 66, 796, 5181, 3419, 198, 198, 66, 13, 1477, 448, 3419, 198 ]
2.1
30
# coding=utf-8 # Copyright 2020 The TF-Agents Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 12131, 383, 24958, 12, 10262, 658, 46665, 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, ...
3.322222
360
import warnings warnings.simplefilter('ignore', Warning) from content_gfk.tests.fields import * from content_gfk.tests.resources import *
[ 11748, 14601, 198, 40539, 654, 13, 36439, 24455, 10786, 46430, 3256, 15932, 8, 198, 198, 6738, 2695, 62, 70, 69, 74, 13, 41989, 13, 25747, 1330, 1635, 198, 6738, 2695, 62, 70, 69, 74, 13, 41989, 13, 37540, 1330, 1635, 198 ]
3.390244
41
from common import * ''' destroy mitrals, granules, MGRS, and clear internal gid maps. '''
[ 6738, 2219, 1330, 1635, 198, 198, 7061, 6, 4117, 10255, 30691, 11, 19468, 5028, 11, 34809, 6998, 11, 290, 1598, 5387, 308, 312, 8739, 13, 705, 7061, 198 ]
3.285714
28
from django.contrib.auth.mixins import LoginRequiredMixin from django.urls import reverse_lazy from django.views.generic import ListView, DetailView from django.views.generic.edit import CreateView, UpdateView, DeleteView from recipe.models import Recipe recipe_list_view = RecipeListView.as_view() recipe_detail...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 19816, 1040, 1330, 23093, 37374, 35608, 259, 198, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 62, 75, 12582, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 7343, 7680, 11, ...
3.135802
162
"""Unit tests for cutty.repositories.adapters.fetchers.file.""" from pathlib import Path import pytest from yarl import URL from cutty.errors import CuttyError from cutty.repositories.adapters.fetchers.file import filefetcher from cutty.repositories.domain.locations import asurl from cutty.repositories.domain.stores ...
[ 37811, 26453, 5254, 329, 2005, 774, 13, 260, 1930, 270, 1749, 13, 324, 12126, 13, 34045, 3533, 13, 7753, 526, 15931, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 12972, 9288, 198, 6738, 331, 7063, 1330, 10289, 198, 198, 6738, ...
2.788767
819
import pytest import requests_mock from apitist.constructor import converter from tests.data import _list, _status_true, _test_case from qaseio.client.models import ( Severity, TestCaseFilters, TestCaseInfo, TestCaseList, ) @pytest.mark.parametrize( "params, query", [ ((10, 30), "?li...
[ 11748, 12972, 9288, 198, 198, 11748, 7007, 62, 76, 735, 198, 6738, 2471, 270, 396, 13, 41571, 273, 1330, 38394, 198, 6738, 5254, 13, 7890, 1330, 4808, 4868, 11, 4808, 13376, 62, 7942, 11, 4808, 9288, 62, 7442, 198, 198, 6738, 10662, ...
1.88172
372
# standard library import hashlib import datetime import random import logging # Django from django.shortcuts import render, redirect from django.core.mail import send_mail from django.contrib import messages from django.views.generic import FormView # Local Django from user.models import (User, ...
[ 2, 3210, 5888, 198, 11748, 12234, 8019, 198, 11748, 4818, 8079, 198, 11748, 4738, 198, 11748, 18931, 198, 198, 2, 37770, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 7295, 13, 4529, 1330...
2.971429
280
from __future__ import division from builtins import object import pytest try: import cupy as cp try: cp.cuda.Device(0).compute_capability except cp.cuda.runtime.CUDARuntimeError: pytest.skip("GPU device inaccessible", allow_module_level=True) except ImportError: pytest.skip("cupy not i...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 3170, 1040, 1330, 2134, 198, 198, 11748, 12972, 9288, 198, 28311, 25, 198, 220, 220, 220, 1330, 6508, 88, 355, 31396, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 2...
2.712644
174
from rest_framework.viewsets import ModelViewSet from rest_framework import permissions from .models import List, Card from .serializers import ListSerializer, CardSerializer
[ 6738, 1334, 62, 30604, 13, 1177, 28709, 1330, 9104, 7680, 7248, 201, 198, 6738, 1334, 62, 30604, 1330, 21627, 201, 198, 201, 198, 6738, 764, 27530, 1330, 7343, 11, 5172, 201, 198, 6738, 764, 46911, 11341, 1330, 7343, 32634, 7509, 11, ...
3.7
50
#! /usr/bin/env python from __future__ import print_function from ldpop import LookupTable, rhos_from_string import argparse import logging if __name__ == '__main__': parser = argparse.ArgumentParser( description='Print a lookup table, as expected by ldhat or ldhelmet.') parser.add_argument('-n', type=...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 300, 67, 12924, 1330, 6803, 929, 10962, 11, 9529, 418, 62, 6738, 62, 8841, 198, 11748, 1822, 29572, 198, 11748, 18931, 198, ...
1.970067
1,637
import codecademylib3_seaborn import pandas as pd from matplotlib import pyplot as plt import seaborn as sns df = pd.read_csv("survey.csv") sns.barplot(data=df, x="Age Range", y="Response", hue="Gender") plt.show()
[ 11748, 40481, 36920, 2645, 571, 18, 62, 325, 397, 1211, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 198, 7568, 796, 279, 67, 1...
2.108333
120
# Write a message and create a dictionary to assign keys and values message = 'It was a bright cold day in April, and the clocks were striking thirteen.' count = {} # Loop to add the values to the keys for character in message: count.setdefault(character, 0) count[character] = count[character] + 1 print(count)
[ 2, 19430, 257, 3275, 290, 2251, 257, 22155, 284, 8333, 8251, 290, 3815, 198, 20500, 796, 705, 1026, 373, 257, 6016, 4692, 1110, 287, 3035, 11, 290, 262, 29906, 547, 8871, 28306, 2637, 198, 9127, 796, 23884, 198, 198, 2, 26304, 284, ...
3.678161
87
#!/usr/bin/env python import os import sys import argparse import requests import json import csv from collections import defaultdict parser = argparse.ArgumentParser(description='Count occurences of something in a tab-separated file') parser.add_argument('-programDir', type=str, help='the component progra...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 11748, 7007, 198, 11748, 33918, 198, 11748, 269, 21370, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 48610, 796, 1822, 2957...
2.641026
897
from django.shortcuts import render from django.http import JsonResponse, HttpResponse from .models import Movie, User from .serializers import MovieSerializer from django.views.decorators.csrf import csrf_exempt import requests import json API_KEY = 'e641ca82ca344df21e96b915c57029c1' # Create your views here. @csrf...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 11, 367, 29281, 31077, 198, 6738, 764, 27530, 1330, 15875, 11, 11787, 198, 6738, 764, 46911, 11341, 1330, 15875, 32634, 7509, 198...
2.607121
1,629
from datetime import datetime from decimal import Decimal from pytest import fixture, raises from sqlalchemy.orm.exc import NoResultFound from app.core.models import Record from app.core.repositories import RecordsRepository @fixture(scope="function") new_record = { "title": "title", "description": "descr...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 32465, 1330, 4280, 4402, 198, 198, 6738, 12972, 9288, 1330, 29220, 11, 12073, 198, 6738, 44161, 282, 26599, 13, 579, 13, 41194, 1330, 1400, 23004, 21077, 198, 198, 6738, 598, 13, 7295, 13, ...
3.044776
134
import os import yaml from logbook import Logger log = Logger(__name__) settings = LazySettings()
[ 11748, 28686, 198, 11748, 331, 43695, 198, 6738, 2604, 2070, 1330, 5972, 1362, 198, 198, 6404, 796, 5972, 1362, 7, 834, 3672, 834, 8, 628, 198, 198, 33692, 796, 406, 12582, 26232, 3419, 198 ]
3
34
# Generated by Django 3.2.9 on 2022-01-07 16:03 from django.db import migrations PATH_REMAP_PREFIX = { "ingame_python": "evennia.contrib.base_systems", "building_menu": "evennia.contrib.base_systems", "color_markups": "evennia.contrib.base_systems", "custom_gametime": "evennia.contrib.base_systems", ...
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 24, 319, 33160, 12, 486, 12, 2998, 1467, 25, 3070, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 198, 198, 34219, 62, 2200, 33767, 62, 47, 31688, 10426, 796, 1391, 198, 220, 2...
2.351025
829
# ----------------------------------------------------------------------------- # Copyright (c) 2019-2022, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License (version 2 # or later) with exception for distributing the bootloader. # # The full license is in the file COPYING.tx...
[ 2, 16529, 32501, 198, 2, 15069, 357, 66, 8, 13130, 12, 1238, 1828, 11, 9485, 15798, 263, 7712, 4816, 13, 198, 2, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 22961, 3611, 5094, 13789, 357, 9641, 362, 198, 2, 393, 1568, 8, 351, ...
4.441989
181
#!/usr/bin/env python """ Tests for homesweetpi's data_retrieval module. """ import os import logging from datetime import datetime from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from homesweetpi.retrieve_data import fetch_recent_data LOG = logging.getLogger("homesweetpi.test_sql_tables...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 51, 3558, 329, 5682, 7277, 14415, 338, 1366, 62, 1186, 380, 18206, 8265, 13, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 18931, 198, 6738, 4818, 8079, 1330, 4818, ...
2.723077
390
import os root_path = os.path.dirname(os.path.abspath('__file__')) # root_path = os.path.abspath(os.path.join(root_path,os.path.pardir)) # def rename_dict(dir_path,spliter=None,replace=None): # print(dir_path) # # print(os.listdir(dir_path)) # for x in os.listdir(dir_path): # if x.__contains__("_one...
[ 11748, 28686, 198, 15763, 62, 6978, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 10786, 834, 7753, 834, 6, 4008, 198, 2, 6808, 62, 6978, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, ...
1.767031
1,189
import aicsimage.io as io import os import pdb
[ 11748, 257, 873, 9060, 13, 952, 355, 33245, 198, 11748, 28686, 198, 11748, 279, 9945, 628, 198 ]
2.882353
17
#This one is like ur sxripts argv #ok #take one argument #no argument print_two("Zed","Shaw") print_two_again("Zed","Shaw") print_one("First!") print_none()
[ 2, 1212, 530, 318, 588, 2956, 264, 87, 1968, 82, 1822, 85, 628, 198, 2, 482, 628, 198, 2, 20657, 530, 4578, 628, 198, 2, 3919, 4578, 628, 198, 4798, 62, 11545, 7203, 57, 276, 2430, 2484, 707, 4943, 198, 4798, 62, 11545, 62, 1777...
2.515152
66
"""Prometheus exporter.""" import logging from typing import Callable, Optional from prometheus_client.core import GaugeMetricFamily, Metric, CounterMetricFamily from .datatypes import WemoResponse LOGGER = logging.getLogger(__name__) class CustomWemoExporter: # pylint: disable=too-few-public-methods """Prome...
[ 37811, 24129, 36916, 1033, 4337, 526, 15931, 198, 11748, 18931, 198, 6738, 19720, 1330, 4889, 540, 11, 32233, 198, 198, 6738, 1552, 36916, 62, 16366, 13, 7295, 1330, 35094, 469, 9171, 1173, 24094, 11, 3395, 1173, 11, 15034, 9171, 1173, ...
2.590083
605
import pytinydiffsim_ad as dp import autogen as ag import numpy as np import math TIME_STEPS = 20 f = ag.trace(func, [1.0] * TIME_STEPS) gen = ag.GeneratedCppAD(f) x = [2.0] * TIME_STEPS y = f.forward(x) print("y = ", y) J = f.jacobian(x) print("j = ", J)
[ 11748, 12972, 44152, 67, 10203, 320, 62, 324, 355, 288, 79, 198, 11748, 1960, 6644, 355, 556, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 198, 34694, 62, 30516, 3705, 796, 1160, 198, 198, 69, 796, 556, 13, 40546, 7, ...
2.186441
118
# pacman imports from pacman.model.constraints.abstract_constraints.\ abstract_placer_constraint import \ AbstractPlacerConstraint from pacman.model.constraints.placer_constraints.\ placer_chip_and_core_constraint \ import PlacerChipAndCoreConstraint from pacman.model.constraints.placer_constraints.\ ...
[ 198, 2, 23503, 805, 17944, 198, 6738, 23503, 805, 13, 19849, 13, 1102, 2536, 6003, 13, 397, 8709, 62, 1102, 2536, 6003, 13, 59, 198, 220, 220, 220, 12531, 62, 489, 11736, 62, 1102, 2536, 2913, 1330, 3467, 198, 220, 220, 220, 27741, ...
2.107268
2,862
#!/usr/bin/env python3 import pathlib import subprocess import unittest from types import SimpleNamespace from unittest import mock from muse_tool import multi_muse as MOD # __END__
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 3108, 8019, 198, 11748, 850, 14681, 198, 11748, 555, 715, 395, 198, 6738, 3858, 1330, 17427, 36690, 10223, 198, 6738, 555, 715, 395, 1330, 15290, 198, 198, 6738, 26817, ...
3.20339
59
import boto3 import json def get_robots(event) -> list: ''' Return all robots in the table. ''' ddbc = boto3.client('dynamodb') response = ddbc.scan( TableName='Robots' ) return response def lambda_handler(event, context): ''' Standard lambda handler. ''' result = get_robots(event)...
[ 11748, 275, 2069, 18, 198, 11748, 33918, 198, 198, 4299, 651, 62, 22609, 1747, 7, 15596, 8, 4613, 1351, 25, 198, 220, 220, 220, 705, 7061, 8229, 477, 14193, 287, 262, 3084, 13, 705, 7061, 198, 220, 220, 220, 288, 9945, 66, 796, 27...
2.365079
189
from django import forms from django.forms import ModelForm, TextInput, Textarea, SelectMultiple #Importamos los modelos, por ahora solo Libro from apps.modelo.models import Libro
[ 6738, 42625, 14208, 1330, 5107, 220, 198, 6738, 42625, 14208, 13, 23914, 1330, 9104, 8479, 11, 8255, 20560, 11, 8255, 20337, 11, 9683, 31217, 198, 198, 2, 20939, 321, 418, 22346, 2746, 418, 11, 16964, 29042, 5799, 12199, 7980, 305, 198,...
3.54902
51
# -*- coding: utf-8 -*- import chainer.functions as F import chainer.links as L import chainer from chainer import Chain import numpy as np import six
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 6333, 263, 13, 12543, 2733, 355, 376, 198, 11748, 6333, 263, 13, 28751, 355, 406, 198, 11748, 6333, 263, 198, 6738, 6333, 263, 1330, 21853, 198, 11748, 299, ...
2.803571
56
# # Copyright (c) 2021, Vladislav Yaroshchuk <yaroshchuk2000@gmail.com> # # SPDX-License-Identifier: BSD-2-Clause # from .wavefront_parse_exception import WavefrontParseException
[ 2, 198, 2, 220, 15069, 357, 66, 8, 33448, 11, 13080, 3044, 615, 45184, 3768, 46019, 1279, 88, 283, 3768, 46019, 11024, 31, 14816, 13, 785, 29, 198, 2, 198, 2, 220, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, 17, 1...
2.757576
66
# Copyright (c) Facebook, Inc. and its affiliates. from minihack import MiniHackNavigation from minihack.envs import register from nle import nethack MOVE_ACTIONS = tuple(nethack.CompassDirection) NAVIGATE_ACTIONS = MOVE_ACTIONS + ( nethack.Command.OPEN, nethack.Command.KICK, nethack.Command.SEARCH, ) cl...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 6738, 949, 4449, 441, 1330, 12558, 32833, 30575, 7065, 198, 6738, 949, 4449, 441, 13, 268, 14259, 1330, 7881, 198, 6738, 299, 293, 1330, 2010, 31153, 198, 198, 1177...
2.701258
318
from .test import TestCase VERSION = (1, 0, 4)
[ 6738, 764, 9288, 1330, 6208, 20448, 198, 198, 43717, 796, 357, 16, 11, 657, 11, 604, 8, 198 ]
2.666667
18
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
[ 37811, 198, 15269, 357, 34, 8, 5472, 12, 4626, 350, 452, 4997, 10442, 11, 3457, 13, 1439, 2489, 10395, 13, 198, 198, 1212, 1430, 290, 262, 19249, 5696, 389, 925, 1695, 739, 198, 1169, 2846, 286, 262, 739, 262, 24843, 13789, 11, 1062...
2.971739
460
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # Copyright (c) Megvii, Inc. and its affiliates. from .box_intersection_2d import * from .min_enclosing_box import * from .oriented_iou_loss import * from .test_box_intersection_2d import * from .utiles import *
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 8336, 85, 4178, 11, 3457, 13, 290, 663, 29116, 13, 198, 198, 6738, 764, 3524, 62, 3849, 5458...
2.697917
96
""" Filename: plotting.py Author: Stephan Rasp, s.rasp@lmu.de This script contains functions to read pre-processed NetCDF files, do some final analysis and plot the results. """ # Import modules from helpers import read_netcdf_dataset, get_config, save_fig_and_log, \ make_datelist, get_and_crop_radar_f...
[ 37811, 198, 35063, 25, 220, 220, 220, 220, 29353, 13, 9078, 198, 13838, 25, 220, 220, 220, 220, 220, 220, 20800, 371, 5126, 11, 264, 13, 81, 5126, 31, 75, 30300, 13, 2934, 198, 198, 1212, 4226, 4909, 5499, 284, 1100, 662, 12, 1468...
1.869042
6,819
import math import os import random import re import sys # Complete the solve function below. if __name__ == '__main__': meal_cost = float(input()) tip_percent = int(input()) tax_percent = int(input()) solve(meal_cost, tip_percent, tax_percent)
[ 11748, 10688, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 302, 198, 11748, 25064, 198, 198, 2, 13248, 262, 8494, 2163, 2174, 13, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 9799, 62, 15...
2.977528
89
from typing import Type from uuid import UUID from sqlalchemy import select from api.db.errors import DoesNotExist from api.db.models.tenant_webhook import ( TenantWebhookCreate, TenantWebhookUpdate, TenantWebhookRead, TenantWebhook, ) from api.db.repositories.base import BaseRepository
[ 6738, 19720, 1330, 5994, 198, 6738, 334, 27112, 1330, 471, 27586, 198, 6738, 44161, 282, 26599, 1330, 2922, 198, 198, 6738, 40391, 13, 9945, 13, 48277, 1330, 8314, 3673, 3109, 396, 198, 6738, 40391, 13, 9945, 13, 27530, 13, 1452, 415, ...
2.942308
104
""" Description. Example ------- asdf Attributes ---------- asdf Todo ---- asdf """ from typing import List # , TextIO, Optional, Set, Union, Dict, Tuple import collections as coll import math import random auction_settings = coll.namedtuple('auction_settings', ['q', 't', 'p']) environment_settings = coll.namedtu...
[ 37811, 198, 11828, 13, 198, 198, 16281, 198, 26866, 198, 292, 7568, 198, 198, 29021, 198, 35937, 198, 292, 7568, 198, 198, 51, 24313, 198, 650, 198, 292, 7568, 198, 198, 37811, 198, 6738, 19720, 1330, 7343, 220, 1303, 837, 8255, 9399,...
2.179291
2,086
#learnSQL.py from datetime import datetime from sqlalchemy import create_engine from sqlalchemy import MetaData, Table, Column, Integer, Numeric, String, ForeignKey # local_postgresql_engine = create_engine( # 'postgresql+psycopg2://username:password@localhost:5432/mydb') #remote_mysql_db_ # engine = create_engin...
[ 2, 35720, 17861, 13, 9078, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 220, 1330, 30277, 6601, 11, 8655, 11, 29201, 11, 34142, 11, 399, 39223, 11, 10903, ...
2.434185
509
from datetime import datetime from pathlib import Path import pandas as pd import helpers as hlp """ Filenames in DATADIR test.csv item_categories.csv shops.csv items.csv sample_submission.csv sales_train.csv sales_train_dn.csv ['date', 'date_block_num', 'shop_id', 'item_id', 'item_price', 'item_cnt_day', 'dn'] ...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 11748, 49385, 355, 289, 34431, 198, 198, 37811, 198, 11928, 268, 1047, 287, 360, 1404, 2885, 4663, 198, 198, ...
2.39819
221
'''Partial class to handle Vultr Snapshot API calls''' from .utils import VultrBase, update_params class VultrSnapshot(VultrBase): '''Handles Vultr Snapshot API calls''' def create(self, subid, params=None): ''' /v1/snapshot/create POST - account Create a snapshot from an existing vir...
[ 7061, 6, 7841, 498, 1398, 284, 5412, 569, 586, 81, 16026, 9442, 7824, 3848, 7061, 6, 198, 6738, 764, 26791, 1330, 569, 586, 81, 14881, 11, 4296, 62, 37266, 628, 198, 4871, 569, 586, 81, 43826, 9442, 7, 53, 586, 81, 14881, 2599, 19...
2.435514
535
from dataclasses import dataclass from bindings.gmd.vertical_csproperty_type import VerticalCspropertyType __NAMESPACE__ = "http://www.opengis.net/gml" @dataclass class VerticalCs2(VerticalCspropertyType): """ gml:verticalCS is an association role to the vertical coordinate system used by this CRS. "...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 34111, 13, 70, 9132, 13, 1851, 605, 62, 6359, 26745, 62, 4906, 1330, 38937, 32274, 26745, 6030, 198, 198, 834, 45, 29559, 47, 11598, 834, 796, 366, 4023, 1378, 2503, 13, 404, ...
2.990741
108
# Generated by Django 3.0.14 on 2021-07-28 08:27 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 1415, 319, 33448, 12, 2998, 12, 2078, 8487, 25, 1983, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32
import unittest import math import torch import os import tempfile import uuid import shutil import pyprob from pyprob import util, Model, LearningRateScheduler, Optimizer from pyprob.distributions import Normal, Uniform if __name__ == '__main__': pyprob.set_random_seed(123) pyprob.set_verbosity(1) uni...
[ 11748, 555, 715, 395, 198, 11748, 10688, 198, 11748, 28034, 198, 11748, 28686, 198, 11748, 20218, 7753, 198, 11748, 334, 27112, 198, 11748, 4423, 346, 198, 198, 11748, 12972, 1676, 65, 198, 6738, 12972, 1676, 65, 1330, 7736, 11, 9104, 1...
2.819672
122
""" The ``random_word`` module houses all classes and functions relating to the generation of single random words. """ import random import re import enum from typing import Optional, List from . import assets try: import importlib.resources as pkg_resources except ImportError: # Try backported to PY<37 `imp...
[ 37811, 198, 464, 7559, 25120, 62, 4775, 15506, 8265, 7777, 477, 6097, 290, 5499, 11270, 284, 262, 198, 20158, 286, 2060, 4738, 2456, 13, 198, 37811, 198, 198, 11748, 4738, 198, 11748, 302, 198, 11748, 33829, 198, 6738, 19720, 1330, 3223...
2.395731
6,090
import numpy as np from describe.descriptors import Descriptor class CoulombMatrix(Descriptor): """Calculates the zero padded Coulomb matrix for different systems. The Coulomb matrix is defined as: C_ij = 0.5 Zi**exponent | i = j = (Zi*Zj)/(Ri-Rj) | i != j The matrix is p...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 6901, 13, 20147, 1968, 669, 1330, 2935, 6519, 273, 628, 198, 4871, 27854, 2381, 46912, 7, 24564, 1968, 273, 2599, 198, 220, 220, 220, 37227, 9771, 3129, 689, 262, 6632, 44582, 27854, 2381, 17593...
2.217811
932
#!/usr/bin/env python """Orb Status Packet Interface""" import time from datetime import datetime from calendar import timegm from twisted.python import log from antelope import stock from antelope import brttpkt from antelope.orb import ORBNEWEST from antelope.brttpkt import NoData from kudu.twisted.orbreapthread ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 5574, 65, 12678, 6400, 316, 26491, 37811, 198, 198, 11748, 640, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 11845, 1330, 640, 39870, 198, 198, 6738, 19074, 13, 29412, 1330...
1.981316
2,462
import json import websocket from kafka import KafkaProducer from settings import INFURA_SUBSCRIPTION, INFURA_WEBSOCKET, KAFKA_SERVER, KAFKA_TOPIC from utils import retry_with_exponential_backoff def pipe_infura_websocket_to_kafka(subscription_type): """ Given a subscription type (https://infura.io/docs/ethe...
[ 11748, 33918, 198, 198, 11748, 2639, 5459, 198, 6738, 479, 1878, 4914, 1330, 46906, 11547, 2189, 198, 6738, 6460, 1330, 3268, 38989, 3861, 62, 12564, 4462, 40165, 11, 3268, 38989, 3861, 62, 8845, 4462, 11290, 2767, 11, 509, 8579, 25123, ...
2.386449
797
import Synthesis.post as post from Synthesis.post.metric import distance from Synthesis.units import * from tqdm import tqdm from os.path import join POP = post.population('SynthesisRuns/combined',242) POP.switch_plot_config('paper') print(POP) # Limits for Terrestrial Planets m_low_lim = 1 * M_ME / M_E a_up_lim = 2...
[ 11748, 26375, 8497, 13, 7353, 355, 1281, 198, 6738, 26375, 8497, 13, 7353, 13, 4164, 1173, 1330, 5253, 198, 6738, 26375, 8497, 13, 41667, 1330, 1635, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 28686, 13, 6978, 1330, 4...
2.307692
195
# -*- coding: utf-8 -*- ''' File name: code\amazing_mazes\sol_380.py Author: Vaidic Joshi Date created: Oct 20, 2018 Python Version: 3.x ''' # Solution to Project Euler Problem #380 :: Amazing Mazes! # # For more information see: # https://projecteuler.net/problem=380 # Problem Statement ''' An m×n...
[ 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 220, 220, 220, 9220, 1438, 25, 2438, 59, 321, 4070, 62, 76, 36096, 59, 34453, 62, 23734, 13, 9078, 198, 220, 220, 220, 6434, 25, 569, 1698, 291, ...
3.130556
360
# To add a new cell, type '# %%' # To add a new markdown cell, type '# %% [markdown]' # %% import numpy as np import cv2 as cv from matplotlib import pyplot as plt # %% img = cv.imread(cv.samples.findFile("./assets/bolhas.png"),0) # get picture grayscale = 0 if img is None: #checks picture has been apened sys...
[ 2, 1675, 751, 257, 649, 2685, 11, 2099, 705, 2, 43313, 6, 198, 2, 1675, 751, 257, 649, 1317, 2902, 2685, 11, 2099, 705, 2, 43313, 685, 4102, 2902, 49946, 198, 2, 43313, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, ...
2.37246
443
# @param {string[]} strs # @return {string}
[ 220, 220, 220, 1303, 2488, 17143, 1391, 8841, 21737, 92, 965, 82, 198, 220, 220, 220, 1303, 2488, 7783, 1391, 8841, 92, 198 ]
2.26087
23
from .decoders import get_decoder
[ 6738, 764, 12501, 375, 364, 1330, 651, 62, 12501, 12342, 198 ]
3.090909
11