content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# -*- coding: utf-8 -*- from __future__ import annotations from dataclasses import dataclass @dataclass
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 628, 198, 31, 19608, 330, 31172, 198 ]
2.842105
38
""" Flow ==== Time-related operations for a realizing world. """ from ..realizing import Realizing
[ 37811, 198, 37535, 198, 1421, 198, 198, 7575, 12, 5363, 4560, 329, 257, 20060, 995, 13, 198, 198, 37811, 198, 198, 6738, 11485, 5305, 2890, 1330, 6416, 2890, 628 ]
3.551724
29
# -*- coding: utf-8 -*- from __future__ import (division, absolute_import, print_function, unicode_literals) from clidoc_option_binding import * from utils import generate_key_checker, CLIDOC_TEST_MODE key_checker = generate_key_checker( { "-c", "--long-4", "comman...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 357, 21426, 11, 4112, 62, 11748, 11, 3601, 62, 8818, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
1.798561
278
"""Python URI Handling""" from pkg_resources import get_distribution, DistributionNotFound from .uri import URI __all__ = ['URI'] try: __version__ = get_distribution(__name__).version except DistributionNotFound: __version__ = '0.0.0-dev'
[ 37811, 37906, 43975, 49500, 37811, 198, 198, 6738, 279, 10025, 62, 37540, 1330, 651, 62, 17080, 3890, 11, 27484, 3673, 21077, 198, 198, 6738, 764, 9900, 1330, 43975, 198, 198, 834, 439, 834, 796, 37250, 47269, 20520, 198, 198, 28311, 25...
3.036145
83
# Copyright (c) 2015 Aptira Pty Ltd. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ 2, 15069, 357, 66, 8, 1853, 317, 457, 8704, 350, 774, 12052, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2...
2.802676
598
from collections import namedtuple from model_map import get_dataset_name_by_model_name BaseConfigByEpoch = namedtuple('BaseConfigByEpoch', ['network_type', 'dataset_name', 'dataset_subset', 'global_batch_size', 'num_node', 'device', 'weight_decay', 'weight_decay_bias', 'opti...
[ 6738, 17268, 1330, 3706, 83, 29291, 201, 198, 6738, 2746, 62, 8899, 1330, 651, 62, 19608, 292, 316, 62, 3672, 62, 1525, 62, 19849, 62, 3672, 201, 198, 201, 198, 14881, 16934, 3886, 13807, 5374, 796, 3706, 83, 29291, 10786, 14881, 1693...
1.609873
628
#Create a list using [] a = [1,2,3,7,66] #print the list using print() function print(a) #Access using index using a[0], a[1], .... print(a[2]) #Changing the value of the list a[0] = 777 print(a) #We can create a list with items of different type b = [77,"Root",False,6.9] print(b) #List Slicing friends = ["Root","...
[ 2, 16447, 257, 1351, 1262, 17635, 198, 64, 796, 685, 16, 11, 17, 11, 18, 11, 22, 11, 2791, 60, 198, 198, 2, 4798, 262, 1351, 1262, 3601, 3419, 2163, 198, 4798, 7, 64, 8, 198, 198, 2, 15457, 1262, 6376, 1262, 257, 58, 15, 4357,...
2.532895
152
with open('fun_file.txt') as close_this_file: setup = close_this_file.readline() punchline = close_this_file.readline() print(setup)
[ 4480, 1280, 10786, 12543, 62, 7753, 13, 14116, 11537, 355, 1969, 62, 5661, 62, 7753, 25, 198, 220, 9058, 796, 1969, 62, 5661, 62, 7753, 13, 961, 1370, 3419, 198, 220, 10862, 1370, 796, 1969, 62, 5661, 62, 7753, 13, 961, 1370, 3419, ...
2.76
50
#!/usr/bin/python3 # used to encrypt a byte string # used as a tool for testing # AES encryption from Crypto.Cipher import AES import base64 import os import sys import binascii if __name__ == "__main__": e_key = None plain = None allz = False AES_mode = AES.MODE_CBC #input parsing if(len(sys.argv) < 3): ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 2, 973, 284, 34117, 257, 18022, 4731, 198, 2, 973, 355, 257, 2891, 329, 4856, 198, 2, 34329, 15835, 198, 198, 6738, 36579, 13, 34, 10803, 1330, 34329, 198, 11748, 2779, 2414, 198, ...
2.497566
1,027
from utils import get_input_lines n = 20874512 sums = [] ints = [] solved = False for line in get_input_lines(__file__): i = int(line) sums.append(0) ints.append(i) for idx in range(len(sums)): sums[idx] = sums[idx] + i if sums[idx] == n: subset = ints[idx:] pri...
[ 6738, 3384, 4487, 1330, 651, 62, 15414, 62, 6615, 198, 198, 77, 796, 1160, 5774, 2231, 1065, 198, 82, 5700, 796, 17635, 198, 29503, 796, 17635, 198, 82, 5634, 796, 10352, 198, 198, 1640, 1627, 287, 651, 62, 15414, 62, 6615, 7, 834, ...
1.918552
221
if __name__ == "__main__": main()
[ 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419 ]
2.222222
18
#!/usr/bin/env python3 import asyncio import websockets import requests import json import sys import os import yaml import urllib import time if __name__ == "__main__": sys.exit(main())
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 30351, 952, 198, 11748, 2639, 11603, 198, 11748, 7007, 198, 11748, 33918, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 331, 43695, 198, 11748, 2956, 297, 571, 198, 1...
2.926471
68
import argparse from pychecker.check import check_project, check_pkgver, print_results parser = argparse.ArgumentParser( description="PyChecker: check whether your project's Require-Python is correct" ) package_group = parser.add_argument_group("package") package_group.add_argument("-p", "--package", help="Packa...
[ 11748, 1822, 29572, 198, 6738, 12972, 9122, 263, 13, 9122, 1330, 2198, 62, 16302, 11, 2198, 62, 35339, 332, 11, 3601, 62, 43420, 628, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 198, 220, 220, 220, 6764, 2625, 20519, 9787...
3.407609
184
from setuptools import setup with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setup(name='oqmscore', version='0.1', description='Objective quality measure score for speech', long_description=long_description, long_description_content_type="text/markdown", ...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 1600, 21004, 2625, 40477, 12, 23, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, ...
2.25283
265
# ---------------------------------------------------------------------- # ServiceModel # ---------------------------------------------------------------------- # Copyright (C) 2007-2020 The NOC Project # See LICENSE for details # ---------------------------------------------------------------------- # Python modules ...
[ 2, 16529, 23031, 198, 2, 4809, 17633, 198, 2, 16529, 23031, 198, 2, 15069, 357, 34, 8, 4343, 12, 42334, 383, 399, 4503, 4935, 198, 2, 4091, 38559, 24290, 329, 3307, 198, 2, 16529, 23031, 198, 198, 2, 11361, 13103, 198, 6738, 19720, ...
5.656863
102
#!/usr/bin/env python from samplebase import SampleBase # Main function if __name__ == "__main__": simple_square = SimpleSquare() if (not simple_square.process()): simple_square.print_help()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 6291, 8692, 1330, 27565, 14881, 628, 198, 198, 2, 8774, 2163, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 2829, 62, 23415, 796, 17427, 48011...
2.837838
74
from functools import reduce from patsy import dmatrices from scipy.optimize import curve_fit, fmin from scipy.stats import chi2 from sklearn.metrics import roc_curve from statsmodels.stats.outliers_influence import variance_inflation_factor import matplotlib.pyplot as plt import numpy as np import pandas as pd import...
[ 198, 6738, 1257, 310, 10141, 1330, 4646, 198, 6738, 279, 1381, 88, 1330, 288, 6759, 45977, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 12133, 62, 11147, 11, 277, 1084, 198, 6738, 629, 541, 88, 13, 34242, 1330, 33166, 17, 198, 67...
2.147075
29,468
import asyncio import os import secrets import weakref import aiohttp.web from aiohttp import web import aioredis from aiohttp import WSCloseCode import json from detector_inference import detector_inference import logging LOGGING_FORMAT = '%(asctime)s %(levelname)s: %(message)s' DATE_FORMAT = '%Y%m%d %H:%M:%S' loggi...
[ 11748, 30351, 952, 198, 11748, 28686, 198, 11748, 13141, 198, 11748, 4939, 5420, 198, 198, 11748, 257, 952, 4023, 13, 12384, 198, 6738, 257, 952, 4023, 1330, 3992, 198, 11748, 257, 72, 1850, 271, 198, 6738, 257, 952, 4023, 1330, 25290, ...
2.355392
408
from typing import List, Dict, Iterable, Optional, Type, Union import logging from allennlp.common.util import JsonDict, sanitize from allennlp.data import Instance from allennlp.interpret.saliency_interpreters.saliency_interpreter import SaliencyInterpreter from xai_court.config import Config from xai_court.models....
[ 6738, 19720, 1330, 7343, 11, 360, 713, 11, 40806, 540, 11, 32233, 11, 5994, 11, 4479, 198, 198, 11748, 18931, 198, 198, 6738, 477, 1697, 34431, 13, 11321, 13, 22602, 1330, 449, 1559, 35, 713, 11, 5336, 270, 1096, 198, 6738, 477, 169...
3.018018
444
#!/usr/bin/env python3 from server import Server import argparse parser = argparse.ArgumentParser(prog='capidaptor') parser.add_argument('--interface', help='Specifies the interface and port to listen on') parser.add_argument('--debug', help='Enables debugging mode', action='store_true') parser.add_argument('--igno...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 4382, 1330, 9652, 198, 198, 11748, 1822, 29572, 628, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 1676, 70, 11639, 11128, 312, 2373, 273, 11537, 198, 48610, ...
2.974178
426
# coding: utf-8 from datetime import datetime from decimal import Decimal from unittest import TestCase import httpretty from pyqiwi import QiwiError, Qiwi @httpretty.activate
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 32465, 1330, 4280, 4402, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 11748, 2638, 16100, 198, 198, 6738, 12972, 80, 14246, 72, 1330, 1195, ...
3.12069
58
import re import yaml
[ 11748, 302, 198, 11748, 331, 43695, 198 ]
3.142857
7
import logging from typing import Optional, List, Union, Tuple, Callable import torch from torch.utils.data import DataLoader, Dataset from torchvision.transforms import ConvertImageDtype from PIL import Image, ImageDraw from PIL import ImageFont import numpy as np from fastnn.utils.cv import ImageDataset from f...
[ 11748, 18931, 198, 6738, 19720, 1330, 32233, 11, 7343, 11, 4479, 11, 309, 29291, 11, 4889, 540, 198, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 11, 16092, 292, 316, 198, 198, 6738, 28034, 10178, 13, 7...
2.338266
3,311
linked_list = LinkedList() print(linked_list.size_of() == 0) linked_list.insert_at_start(10) linked_list.insert_at_start(13) linked_list.insert_at_end(15) linked_list.insert_at_end(27) print(linked_list.head.data == 13) print(linked_list.size_of() == 4) linked_list.remove(100) print(linked_list.size_of() == 4) li...
[ 628, 198, 25614, 62, 4868, 796, 7502, 276, 8053, 3419, 198, 4798, 7, 25614, 62, 4868, 13, 7857, 62, 1659, 3419, 6624, 657, 8, 198, 198, 25614, 62, 4868, 13, 28463, 62, 265, 62, 9688, 7, 940, 8, 198, 25614, 62, 4868, 13, 28463, 6...
2.494545
275
from __future__ import annotations import operator from functools import wraps from typing import Hashable, FrozenSet, Callable, Optional, Sequence import attr import funcy as fn State = Hashable Letter = Hashable Alphabet = FrozenSet[Letter] @attr.frozen(auto_detect=True)
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 10088, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 19720, 1330, 21059, 540, 11, 23673, 7248, 11, 4889, 540, 11, 32233, 11, 45835, 198, 198, 11748, 708, 81, 198, 11748, 1257...
3.469136
81
import hashlib import logging from bot.bot import Bot from bot.constants import Colours from discord import Embed from discord.ext.commands import BadArgument, Cog, Context, group logger = logging.getLogger(__name__) class Ciphers(Cog): """Commands for working with ciphers, hashes and encryptions.""" @grou...
[ 11748, 12234, 8019, 198, 11748, 18931, 198, 198, 6738, 10214, 13, 13645, 1330, 18579, 198, 6738, 10214, 13, 9979, 1187, 1330, 1623, 4662, 198, 6738, 36446, 1330, 13302, 276, 198, 6738, 36446, 13, 2302, 13, 9503, 1746, 1330, 7772, 28100, ...
2.281709
749
from __future__ import print_function __author__ = 'ragomez' number = int(raw_input('Enter a number:')) for num in f(number): print(num, end=',')
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 834, 9800, 834, 796, 705, 22562, 30010, 6, 628, 198, 17618, 796, 493, 7, 1831, 62, 15414, 10786, 17469, 257, 1271, 32105, 4008, 198, 198, 1640, 997, 287, 277, 7, 17618, 2599, 198, ...
2.867925
53
#------------------------------------------------------------------------------ # # Copyright (c) Microsoft Corporation. # All rights reserved. # # This code is licensed under the MIT License. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated document...
[ 171, 119, 123, 2, 10097, 26171, 198, 2, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 220, 198, 2, 1439, 2489, 10395, 13, 198, 2, 220, 198, 2, 770, 2438, 318, 11971, 739, 262, 17168, 13789, 13, 198, 2, 220, 198, 2, 2448, 3411, 3...
3.909953
422
from .service import Service from . import utils
[ 6738, 764, 15271, 1330, 4809, 198, 6738, 764, 1330, 3384, 4487, 198 ]
4.083333
12
import os import json import boto3 from aws import S3Data
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 275, 2069, 18, 198, 6738, 3253, 82, 1330, 311, 18, 6601, 628, 628, 628, 628, 628 ]
2.913043
23
import torch import torch.nn as nn import numpy as np from scipy.interpolate import interp1d import os import sys import random import config
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 3849, 16104, 378, 1330, 987, 79, 16, 67, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 4738, 198, 11748, 45...
3.1875
48
#!/usr/local/sci/bin/python # PYTHON3 # # Author: Kate Willett # Created: 16 October 2015 # Last update: 20 July 2020 # Location: /data/local/hadkw/HADCRUH2/UPDATE2014/PROGS/PYTHON/ # GitHub: https://github.com/Kate-Willett/Climate_Explorer/tree/master/PYTHON/ # ----------------------- # CODE PURPOSE AND OUTPUT # ---...
[ 2, 48443, 14629, 14, 12001, 14, 36216, 14, 8800, 14, 29412, 198, 2, 350, 56, 4221, 1340, 18, 198, 2, 220, 198, 2, 6434, 25, 16693, 5187, 15503, 198, 2, 15622, 25, 1467, 3267, 1853, 198, 2, 4586, 4296, 25, 1160, 2901, 12131, 198, ...
2.526364
4,362
import cv2 import pytesseract from picamera.array import PiRGBArray from picamera import PiCamera import time import re camera = PiCamera() rawCapture = PiRGBArray(camera) time.sleep(1.2) camera.capture(rawCapture, format="bgr") image = cv2.cvtColor(rawCapture.array, cv2.COLOR_BGR2GRAY) print("Lendo...") opt = "-c...
[ 11748, 269, 85, 17, 198, 11748, 12972, 83, 408, 263, 529, 198, 6738, 8301, 18144, 13, 18747, 1330, 13993, 36982, 19182, 198, 6738, 8301, 18144, 1330, 13993, 35632, 198, 11748, 640, 198, 11748, 302, 198, 198, 25695, 796, 13993, 35632, 34...
2.404651
215
from __future__ import print_function import subprocess # path to submit_to_isis cmd = "/usr/local/common/meeg-cfin/configurations/bin/submit_to_isis" subjects = ["0008", "0009", "0010", "0011", "0012", "0013", "0014", "0015", "0016", "0017", "0018", "0019", "0020", "0021", "0022"] for subj...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 850, 14681, 198, 198, 2, 3108, 284, 9199, 62, 1462, 62, 271, 271, 198, 28758, 796, 12813, 14629, 14, 12001, 14, 11321, 14, 1326, 1533, 12, 12993, 259, 14, 11250, 20074, 14, ...
1.948998
549
""" Streaming Linear Regression Example. """ from __future__ import print_function import sys from pyspark import SparkContext from pyspark.streaming import StreamingContext from pyspark.mllib.linalg import Vectors from pyspark.mllib.regression import LabeledPoint from pyspark.mllib.regression import StreamingLinearR...
[ 37811, 198, 12124, 278, 44800, 3310, 2234, 17934, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 25064, 198, 198, 6738, 279, 893, 20928, 1330, 17732, 21947, 198, 6738, 279, 893, 20928, 13, 5532, 278...
2.641791
402
import tensorflow as tf import numpy as np n = [5, 6] print(id(n)) # 140312184155336 updateList(n) print(n) # [5, 6, 10] print(id(n)) # 140312184155336
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 77, 796, 685, 20, 11, 718, 60, 198, 4798, 7, 312, 7, 77, 4008, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1...
1.682927
123
''' Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. Example: Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9, return [0...
[ 7061, 6, 198, 15056, 281, 7177, 286, 37014, 11, 1441, 36525, 286, 262, 734, 3146, 884, 326, 484, 751, 510, 284, 257, 2176, 2496, 13, 198, 198, 1639, 743, 7048, 326, 1123, 5128, 561, 423, 3446, 530, 4610, 11, 290, 345, 743, 407, 77...
2.978873
142
import random, requests from datetime import * from faker import Faker from random import randrange, randint units = [ "Neonatal intensive care", "Pediatric intensive care", "Coronary care and cardiothoracic", "Surgical intensive care", "Medical intensive care", "Long term intensive care" ] event_types = [ ["en...
[ 11748, 4738, 11, 7007, 198, 6738, 4818, 8079, 1330, 1635, 198, 6738, 277, 3110, 1330, 376, 3110, 198, 6738, 4738, 1330, 43720, 9521, 11, 43720, 600, 628, 198, 41667, 796, 685, 198, 197, 1, 8199, 261, 10254, 18590, 1337, 1600, 366, 434...
2.757637
491
# -*- coding: utf-8 -*- """ Created on Tue Jan 5 23:01:33 2021 @author: batho """ import numpy as np
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 2365, 220, 642, 2242, 25, 486, 25, 2091, 33448, 198, 198, 31, 9800, 25, 7837, 78, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 1...
1.536364
110
""" @author: michael.haussmann retake by le TD gang A simple logger shortcut / wrapper. Uses https://logzero.readthedocs.io/ """ import logging import os import sys import logzero from logzero import logger # Formatting of the output log to look like __LOG_FORMAT__ = "[SILEX]\ [%(asctime)s] %(color)s%(levelna...
[ 37811, 198, 31, 9800, 25, 285, 40302, 13, 3099, 1046, 9038, 198, 1186, 539, 416, 443, 13320, 7706, 198, 198, 32, 2829, 49706, 29401, 1220, 29908, 13, 198, 198, 5842, 274, 198, 5450, 1378, 6404, 22570, 13, 961, 83, 704, 420, 82, 13, ...
2.623656
372
#!/usr/bin/python # # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 15069, 2177, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, ...
3.941581
291
# Copyright 2016-2022 Swiss National Supercomputing Centre (CSCS/ETH Zurich) # ReFrame Project Developers. See the top-level LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause import reframe as rfm import reframe.utility.sanity as sn @rfm.simple_test
[ 2, 15069, 1584, 12, 1238, 1828, 14780, 2351, 3115, 785, 48074, 9072, 357, 34, 6173, 50, 14, 20702, 43412, 8, 198, 2, 797, 19778, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 38559, 24290, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, ...
3.114943
87
# -*- coding: utf-8 -*- import json from time import strftime from os import path, remove from glob import glob from uuid import uuid4 STORAGE = 'ojm.data' _models = {} def register(model): """ Register a class to allow object loading from JSON. """ _models[model.__name__] = model def storable(o...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 33918, 198, 6738, 640, 1330, 965, 31387, 198, 6738, 28686, 1330, 3108, 11, 4781, 198, 6738, 15095, 1330, 15095, 198, 6738, 334, 27112, 1330, 334, 27112, 19, ...
2.188192
271
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from io import BytesIO from flask import jsonify, request, session from werkzeug.exceptions import Forbid...
[ 2, 770, 2393, 318, 636, 286, 1423, 3713, 13, 198, 2, 15069, 357, 34, 8, 6244, 532, 33160, 327, 28778, 198, 2, 198, 2, 1423, 3713, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273, 198, 2, 13096, 340, 739, 262, 2846,...
3.133929
448
import inspect import typing from typing import get_type_hints, TypeVar, Any, AnyStr, Generic, Union from sphinx.util import logging from sphinx.util.inspect import Signature try: from inspect import unwrap except ImportError: def unwrap(func, *, stop=None): """This is the inspect.unwrap() method copi...
[ 11748, 10104, 198, 11748, 19720, 198, 6738, 19720, 1330, 651, 62, 4906, 62, 71, 29503, 11, 5994, 19852, 11, 4377, 11, 4377, 13290, 11, 42044, 11, 4479, 198, 198, 6738, 599, 20079, 87, 13, 22602, 1330, 18931, 198, 6738, 599, 20079, 87,...
2.480938
341
from typing import List from Abstract.ActionResolver import ActionResolver from Abstract.GameAction import GameAction from Abstract.EngineGameInfo import EngineGameInfo from DungeonCrawl.DungeonCrawlEngineGameInfo import DungeonCrawlEngineGameInfo from DungeonCrawl.DungeonCrawlUtils import count_dungeoneer_weapons, ge...
[ 6738, 19720, 1330, 7343, 198, 198, 6738, 27741, 13, 12502, 4965, 14375, 1330, 7561, 4965, 14375, 198, 6738, 27741, 13, 8777, 12502, 1330, 3776, 12502, 198, 6738, 27741, 13, 13798, 8777, 12360, 1330, 7117, 8777, 12360, 198, 6738, 11995, 34...
3.739535
215
import pytest from hamcrest import assert_that, contains_inanyorder from tests.testing_utils import param_wrapper, run_flake8, run_pylint params = [ # code, flake8 rules, pylint rules param_wrapper(( 'values = []', 'for i in range(10):', ' values.append(10)', ), {'B007'}, set(),...
[ 11748, 12972, 9288, 198, 6738, 8891, 66, 2118, 1330, 6818, 62, 5562, 11, 4909, 62, 259, 1092, 2875, 198, 198, 6738, 5254, 13, 33407, 62, 26791, 1330, 5772, 62, 48553, 11, 1057, 62, 47597, 23, 11, 1057, 62, 79, 2645, 600, 198, 198, ...
1.941075
577
import scrapy
[ 11748, 15881, 88, 198 ]
3.5
4
from coordio.utils import radec2wokxy, wokxy2radec import time import matplotlib.pyplot as plt import numpy import coordio.fitData as fitData import os from astropy.coordinates import SkyCoord from astropy import units as u filedir = os.path.dirname(os.path.abspath(__file__)) # apo plate 15017 apo = {} apo["utcJD"]...
[ 6738, 6349, 952, 13, 26791, 1330, 374, 671, 66, 17, 86, 482, 5431, 11, 266, 482, 5431, 17, 27585, 66, 198, 11748, 640, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 198, 11748, 6349, 952, 13, ...
2.395954
346
from django import template from django import forms import datetime import sys from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from pirate_reputation.models import Reputation, ReputationDimension, ReputationEvent, AbuseTicket, FeedbackTicket from pirate_consensus....
[ 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 1330, 5107, 198, 11748, 4818, 8079, 198, 11748, 25064, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299,...
2.493871
3,345
from .waddle import Waddle
[ 6738, 764, 86, 37382, 1330, 370, 37382, 198 ]
3.375
8
from .query_streamlines import StreamlineDownloader
[ 6738, 764, 22766, 62, 5532, 6615, 1330, 13860, 1370, 10002, 263, 198 ]
4.333333
12
import os import time import json import datetime import logging from logging.handlers import RotatingFileHandler import pprint from gaea.config import CONFIG # class ContextFilter(logging.Filter): # def filter(self, record): # if flask.has_request_context(): # # when logging out, the user_id...
[ 11748, 28686, 198, 11748, 640, 198, 11748, 33918, 198, 11748, 4818, 8079, 198, 11748, 18931, 198, 6738, 18931, 13, 4993, 8116, 1330, 18481, 803, 8979, 25060, 198, 11748, 279, 4798, 198, 198, 6738, 308, 44705, 13, 11250, 1330, 25626, 628, ...
2.366055
1,090
import pydot # Create the graph # include the "bgcolor" argument with a string value. graph = pydot.Dot("my_graph", graph_type="graph", bgcolor="yellow") # I have added a node so we can better see that our graph creation has worked. This is naturally a trivial # graph as it has no edges, but as a minimum working exam...
[ 11748, 279, 5173, 313, 198, 198, 2, 13610, 262, 4823, 198, 2, 2291, 262, 366, 35904, 8043, 1, 4578, 351, 257, 4731, 1988, 13, 198, 34960, 796, 279, 5173, 313, 13, 35, 313, 7203, 1820, 62, 34960, 1600, 4823, 62, 4906, 2625, 34960, ...
3.470199
151
import string import time from ...app_context import AppContext from ...middleware.interface import MiddlewareBase from ...session.interfaces import ISessionProvider from ...util import md5, b64 """ session id 算法: 其中包含 useragent 和 remote_addr 用于标识一个远程客户端 其值组合成 remote_addr#useragent,计算得到 md5 (length=3...
[ 11748, 4731, 201, 198, 11748, 640, 201, 198, 201, 198, 6738, 2644, 1324, 62, 22866, 1330, 2034, 21947, 201, 198, 6738, 2644, 27171, 1574, 13, 39994, 1330, 6046, 1574, 14881, 201, 198, 6738, 2644, 29891, 13, 3849, 32186, 1330, 3180, 2521...
1.692982
342
# -*- coding: utf-8 -*- """ Created on Tue Oct 13 13:55:28 2020 @author: bouvaran """ import mykeys import pika AMQP_URL = mykeys.cloudamplink connection = pika.BlockingConnection(pika.URLParameters(AMQP_URL)) channel = connection.channel() channel.queue_declare(queue='presentation’') channel.basic_publish(exchang...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 2556, 1511, 1511, 25, 2816, 25, 2078, 12131, 198, 198, 31, 9800, 25, 35833, 7785, 272, 198, 37811, 198, 198, 11748, 616, 13083, 198, 11748...
2.395
200
"""Type pattern.""" import re import decimal import operator import itertools import functools from csv2sql.core.error import InterpretationError, TypeInferenceError _COMPATIBLE_PREDICATES = { 'int': functools.partial(_compatible, int), 'float': functools.partial(_compatible, float), } _DEFAULT_NULL_VALUE ...
[ 37811, 6030, 3912, 526, 15931, 198, 198, 11748, 302, 198, 11748, 32465, 198, 11748, 10088, 198, 11748, 340, 861, 10141, 198, 11748, 1257, 310, 10141, 198, 198, 6738, 269, 21370, 17, 25410, 13, 7295, 13, 18224, 1330, 48907, 341, 12331, 1...
2.563418
1,498
from flask import Blueprint from scout.server.extensions import store from scout.server.utils import templated, public_endpoint from . import controllers omim_bp = Blueprint("diagnoses", __name__, template_folder="templates") @omim_bp.route("/diagnoses/<omim_nr>", methods=["GET"]) @templated("diagnoses/omim_term.ht...
[ 6738, 42903, 1330, 39932, 198, 198, 6738, 24490, 13, 15388, 13, 2302, 5736, 1330, 3650, 198, 6738, 24490, 13, 15388, 13, 26791, 1330, 2169, 489, 515, 11, 1171, 62, 437, 4122, 198, 6738, 764, 1330, 20624, 198, 198, 296, 320, 62, 46583,...
2.991597
238
import asyncio import logging import threading import time from datetime import datetime from concurrent.futures import ThreadPoolExecutor from typing import List import slack import sqlalchemy from sqlalchemy.orm import sessionmaker, scoped_session import settings from .models import Base, Contest, Subscriber, Conte...
[ 11748, 30351, 952, 198, 11748, 18931, 198, 11748, 4704, 278, 198, 11748, 640, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 24580, 13, 69, 315, 942, 1330, 14122, 27201, 23002, 38409, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, ...
3.605405
185
import unittest from enum import Enum from hypothesis import settings, note from hypothesis.stateful import RuleBasedStateMachine, rule, invariant, precondition if __name__ == "__main__": RiverCrossing.TestCase.settings = settings(max_examples=100, stateful_step_count=50) RiverCrossingTest = RiverCrossing.Tes...
[ 11748, 555, 715, 395, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 14078, 1330, 6460, 11, 3465, 198, 6738, 14078, 13, 5219, 913, 1330, 14330, 15001, 9012, 37573, 11, 3896, 11, 25275, 415, 11, 3718, 623, 653, 628, 198, 361, 11593, 367...
3.285714
105
from django.conf.urls import url from . import views urlpatterns = [ url(r'^signup/$', views.SignupUserView.as_view(), name='signup'), url(r'^login/$', views.LoginUserView.as_view(), name='login'), url(r'^logout/$', views.logout_user, name='logout'), url(r'^follow/(?P<pk>[0-9]+)/$', v...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 198, 6738, 764, 1330, 5009, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 220, 220, 220, 220, 19016, 7, 81, 6, 61, 12683, 929, 32624, 3256, 5009, 13, 11712, ...
2.216783
286
# standard libraries import datetime import logging import multiprocessing import timeit import traceback from ccbb_pyutils.bio_seq_utilities import pair_hiseq_read_files from ccbb_pyutils.files_and_paths import get_basename_fps_tuples, get_file_name_pieces, \ get_filepaths_from_wildcard __author__ = 'Amanda Bir...
[ 2, 3210, 12782, 198, 11748, 4818, 8079, 198, 11748, 18931, 198, 11748, 18540, 305, 919, 278, 198, 11748, 640, 270, 198, 11748, 12854, 1891, 198, 198, 6738, 36624, 11848, 62, 9078, 26791, 13, 65, 952, 62, 41068, 62, 315, 2410, 1330, 51...
2.899329
149
"""""" import os import nbformat import pkg_resources import pytest import tempfile from copy import deepcopy from functools import lru_cache from textwrap import dedent from unittest import mock from pybryt import ( check, generate_student_impls, ReferenceImplementation, ReferenceResult, StudentImplementation) ...
[ 15931, 15931, 15931, 198, 198, 11748, 28686, 198, 11748, 299, 65, 18982, 198, 11748, 279, 10025, 62, 37540, 198, 11748, 12972, 9288, 198, 11748, 20218, 7753, 198, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 1257, 310, 10141, 1330, 300,...
2.246648
3,953
# Author: GC from typing import List import torch import torch.nn as nn from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence from torchcrf import CRF class BiLSTM_CRF(nn.Module): """ Args: vocab_size: size of word vocabulary num_tags: total tags embed_dim: word em...
[ 2, 6434, 25, 20145, 198, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 20471, 13, 26791, 13, 81, 20471, 1330, 2353, 62, 79, 29373, 62, 43167, 11, 14841, 62, 3...
2.310127
1,106
# -*- coding: utf-8 -*- import conf import errors import logbook import bottle import posixpath from urllib.parse import urljoin from memdb.token import UserToken from model import User, autocommit, MessageTemplate from model import display from memdb.token import PasswordResetToken from api import get, post, put, del...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 1013, 198, 11748, 8563, 198, 11748, 2604, 2070, 198, 11748, 9294, 198, 11748, 1426, 844, 6978, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 22179, 198, ...
3.334532
278
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #trコマンド """ python3 12.py 置換前 置換後 """ import sys if __name__=='__main__': print (tra(sys.argv[1],sys.argv[2],sys.argv[3]))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2213, 24679, 20115, 6527, 13765, 198, 37811, 198, 197, 29412, 18, 1105, 13, 9078, 13328, 121, 106, 162, 237, 2...
1.728155
103
"""Mapping from core types/classes to stand-in DataTypeDefinitions""" REGISTRY = { } def registerDT(base, DT): """Register a DataTypeDefinition for a given base-class""" REGISTRY[base] = DT def getDT(base): """Return the appropriate DT for the given base-class This looks up the base in the registry...
[ 37811, 44, 5912, 422, 4755, 3858, 14, 37724, 284, 1302, 12, 259, 6060, 6030, 7469, 50101, 37811, 198, 31553, 1797, 40405, 796, 1391, 198, 92, 628, 198, 4299, 7881, 24544, 7, 8692, 11, 24311, 2599, 198, 220, 220, 220, 37227, 38804, 257...
3.130137
146
import functools import logging import configparser import os from .base_loader import BaseLoader logger = logging.getLogger(__name__)
[ 11748, 1257, 310, 10141, 201, 198, 11748, 18931, 201, 198, 11748, 4566, 48610, 201, 198, 11748, 28686, 201, 198, 6738, 764, 8692, 62, 29356, 1330, 7308, 17401, 201, 198, 201, 198, 201, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362,...
2.865385
52
import os import pickle import tkinter as tk from tkinter import * from tkinter import filedialog # to open songs file from pygame import mixer # to control music play,pause root = tk.Tk() root.config(bg='#C35817') root.geometry( '600x400' ) root.title( "MP3 MUSIC PLAYER 🔊 🎧" ) img = PhotoImage( file=r'images/m...
[ 11748, 28686, 198, 11748, 2298, 293, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 6738, 256, 74, 3849, 1330, 5717, 498, 519, 220, 1303, 284, 1280, 7259, 2393, 198, 6738, 12972, 6057, 1330, 33938,...
2.600791
253
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
[ 2, 770, 2438, 318, 636, 286, 1195, 1984, 270, 13, 198, 2, 198, 2, 357, 34, 8, 15069, 19764, 2177, 11, 33448, 13, 198, 2, 198, 2, 770, 2438, 318, 11971, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 13, 921, 743, 198, 2, 7330...
2.56158
1,494
import pytest from airflow.models import DagBag @pytest.fixture(scope="session")
[ 11748, 12972, 9288, 198, 6738, 45771, 13, 27530, 1330, 32167, 33, 363, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 29982, 2625, 29891, 4943, 198 ]
3.192308
26
# -*- coding: utf-8 -*- import os, sys import numpy as np import argparse, time import torch from pydaily import filesystem from pyimg import combine import openslide import matplotlib.pyplot as plt from skimage import io, transform import deepdish as dd import utils, patch_util if __name__ == '__main__': arg...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 11, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1822, 29572, 11, 640, 198, 11748, 28034, 198, 6738, 279, 5173, 3079, 1330, 29905, 198, 6738, ...
2.669903
309
""" Test gdal plugin functionality. """ import pytest import imageio pytest.importorskip("osgeo", reason="gdal is not installed") def test_gdal_reading(test_images): """Test reading gdal""" filename = test_images / "geotiff.tif" im = imageio.imread(filename, "gdal") assert im.shape == (929, 699) ...
[ 37811, 6208, 308, 31748, 13877, 11244, 13, 198, 37811, 198, 11748, 12972, 9288, 198, 11748, 2939, 952, 198, 198, 9078, 9288, 13, 11748, 669, 74, 541, 7203, 418, 469, 78, 1600, 1738, 2625, 21287, 282, 318, 407, 6589, 4943, 628, 198, 42...
2.417671
249
import unittest from unittest import mock import os import subprocess from testfixtures import TempDirectory from simplegallery.upload.uploader_factory import get_uploader if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 1330, 15290, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 6738, 1332, 69, 25506, 1330, 24189, 43055, 198, 6738, 2829, 24460, 13, 25850, 13, 25850, 263, 62, 69, 9548, 1330, 651, 62, 25...
3.313433
67
happiness_dictionary={'laughter':8.5, 'happiness':8.44, 'love':8.42, 'happy':8.3, 'laughed':8.26, 'laugh':8.22, 'laughing':8.2, 'excellent':8.18, 'laughs':8.18, 'joy':8.16, 'successful':8.16, 'win':8.12, 'rainbow':8.1, 'smile':8.1, 'won':8.1, 'pleasure':8.08, 'smiled':8.08, 'rainbows':8.06, 'winning':8.04, 'celebratio...
[ 198, 71, 42661, 62, 67, 14188, 34758, 6, 27815, 10354, 23, 13, 20, 11, 198, 6, 71, 42661, 10354, 23, 13, 2598, 11, 198, 6, 23205, 10354, 23, 13, 3682, 11, 198, 6, 34191, 10354, 23, 13, 18, 11, 198, 6, 75, 13726, 10354, 23, 13,...
1.721061
89,532
# See transform.py for more info import transform import ascii # M(message in numbers) ** e(key[0]) mod n(key[1]) = C(output)
[ 2, 4091, 6121, 13, 9078, 329, 517, 7508, 198, 11748, 6121, 198, 11748, 355, 979, 72, 198, 198, 2, 337, 7, 20500, 287, 3146, 8, 12429, 304, 7, 2539, 58, 15, 12962, 953, 299, 7, 2539, 58, 16, 12962, 796, 327, 7, 22915, 8, 198 ]
2.822222
45
import site import sys from setuptools import setup site.ENABLE_USER_SITE = "--user" in sys.argv[1:] setup()
[ 11748, 2524, 198, 11748, 25064, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 15654, 13, 1677, 17534, 62, 29904, 62, 50, 12709, 796, 366, 438, 7220, 1, 287, 25064, 13, 853, 85, 58, 16, 47715, 198, 40406, 3419, 198 ]
2.707317
41
#!/usr/bin/env python3 import os import json import socket import threading from selectors import DefaultSelector, EVENT_READ # Proxy开放的端口号 LOCAL_PORT = 7088 # 连接的远程服务器与端口,修改成你的远程服务器地址 REMOTE_ADDR = "hachinasp.duckdns.org" REMOTE_PORT = 7088 def xor_encode( bstring ): """一个简单编码:两次编码后与原值相同""" MASK = 0x55 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 17802, 198, 11748, 4704, 278, 198, 6738, 2922, 669, 1330, 15161, 17563, 273, 11, 49261, 62, 15675, 198, 198, 2, 38027, 28156, 222, ...
1.65948
1,345
# https://www.kaggle.com/skeftical/chicago-crimes-eda-spatio-temporal # Crime over time (by type) # This is very resource intensive to run crimes_count_date = crimes.pivot_table('P_INCID_NO', aggfunc=np.size, columns='IBR_TYPE', index=crimes.index, fill_value=0) crimes_count_date.index = pd.DatetimeIndex(crimes_count...
[ 2, 3740, 1378, 2503, 13, 74, 9460, 293, 13, 785, 14, 82, 365, 701, 605, 14, 354, 4549, 12, 6098, 999, 12, 18082, 12, 2777, 39485, 12, 11498, 35738, 198, 198, 2, 10003, 625, 640, 357, 1525, 2099, 8, 198, 198, 2, 770, 318, 845, ...
2.646825
252
from rest_framework import routers from apps.categories.views import CategoryViewSet router = routers.SimpleRouter() router.register(r"", CategoryViewSet, "categories") urlpatterns = router.urls
[ 6738, 1334, 62, 30604, 1330, 41144, 198, 198, 6738, 6725, 13, 66, 26129, 13, 33571, 1330, 21743, 7680, 7248, 198, 198, 472, 353, 796, 41144, 13, 26437, 49, 39605, 3419, 198, 198, 472, 353, 13, 30238, 7, 81, 1, 1600, 21743, 7680, 724...
3.372881
59
import unittest from unittest import mock import asyncio import aiohttp from aiorest import RESTServer, Request import json
[ 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 1330, 15290, 198, 198, 11748, 30351, 952, 198, 11748, 257, 952, 4023, 198, 6738, 257, 72, 26522, 1330, 15731, 4694, 18497, 11, 19390, 198, 11748, 33918, 628 ]
3.5
36
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
3.894737
209
from http.server import BaseHTTPRequestHandler from http.server import HTTPServer import os with HTTPServer(('', 8000), handler) as server: server.serve_forever()
[ 6738, 2638, 13, 15388, 1330, 7308, 40717, 18453, 25060, 198, 6738, 2638, 13, 15388, 1330, 38288, 18497, 198, 11748, 28686, 198, 198, 4480, 38288, 18497, 7, 10786, 3256, 38055, 828, 21360, 8, 355, 4382, 25, 198, 220, 220, 220, 4382, 13, ...
3.553191
47
#implement caesar's cipher #it is well simple to implement and it uses the idea of ASCII character codes #Note that in Python,characters are encoded in UNICODE by default #The idea behind this encryption is to shift indvidual x-ters in a string(message) by a certain number(the key) #White spaces are not encrypted fr...
[ 2, 320, 26908, 1275, 18964, 338, 38012, 198, 2, 270, 318, 880, 2829, 284, 3494, 290, 340, 3544, 262, 2126, 286, 37101, 2095, 12416, 198, 2, 6425, 326, 287, 11361, 11, 10641, 19858, 389, 30240, 287, 4725, 2149, 16820, 416, 4277, 198, ...
3.488889
135
import datetime import time import os from markdown import markdown import dominate import sass from dominate.tags import * from dominate.util import raw from prettify import html_prettify import ingest def gen_tags(project): "display tags over picture when card is hovered" tag_list = project.get("technologi...
[ 11748, 4818, 8079, 198, 11748, 640, 198, 11748, 28686, 198, 6738, 1317, 2902, 1330, 1317, 2902, 198, 11748, 17863, 198, 11748, 264, 562, 198, 6738, 17863, 13, 31499, 1330, 1635, 198, 6738, 17863, 13, 22602, 1330, 8246, 198, 6738, 46442, ...
2.278041
1,266
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ 2, 15069, 383, 9485, 15884, 354, 12469, 1074, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 1...
1.968288
1,419
MyPyStubsInfo = provider( fields = { "srcs": ".pyi stub files", }, ) mypy_stubs = rule( implementation = _mypy_stubs_impl, attrs = { "srcs": attr.label_list( allow_empty = False, mandatory = True, doc = "TODO(Jonathon)", allow_files = [".p...
[ 3666, 20519, 1273, 23161, 12360, 796, 10131, 7, 198, 220, 220, 220, 7032, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 10677, 82, 1298, 27071, 9078, 72, 17071, 3696, 1600, 198, 220, 220, 220, 8964, 198, 8, 198, 198, 1820,...
1.860215
186
import sqlparse from sqlparse.sql import Function, Identifier from sqlparse.sql import Token as SQLToken from sqlparse.sql import TokenList from sqlparse.tokens import Keyword, Token, Whitespace
[ 11748, 44161, 29572, 198, 6738, 44161, 29572, 13, 25410, 1330, 15553, 11, 11440, 7483, 198, 6738, 44161, 29572, 13, 25410, 1330, 29130, 355, 16363, 30642, 198, 6738, 44161, 29572, 13, 25410, 1330, 29130, 8053, 198, 6738, 44161, 29572, 13, ...
3.843137
51
import asyncio from collections import defaultdict from datetime import datetime, timedelta from functools import reduce from logging import getLogger from typing import List, Optional, Tuple from operator import sub import discord from discord import colour from discord.channel import TextChannel from discord.errors ...
[ 11748, 30351, 952, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 1257, 310, 10141, 1330, 4646, 198, 6738, 18931, 1330, 651, 11187, 1362, 198, 6738, 19720, 1330, 7343, 11, 32233,...
2.675159
628
# # PySNMP MIB module Juniper-IP-PROFILE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Juniper-IP-PROFILE-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:03:04 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (d...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 7653, 9346, 12, 4061, 12, 31190, 25664, 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, 14490, 1...
2.911787
10,384
# -*- coding: utf-8 -*- import inspect import functools import weakref from contextlib import contextmanager import six import tensorflow as tf from .scope import reopen_variable_scope, root_variable_scope __all__ = [ 'auto_reuse_variables', 'local_reuse', 'global_reuse', 'instance_reuse', ] @contextmanager de...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 10104, 198, 11748, 1257, 310, 10141, 198, 11748, 4939, 5420, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 198, 11748, 2237, 198, 11748, 11192, 273, 11125, 355, 48...
2.509133
3,887
#!/usr/bin/env python # -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Train a Fast R-CNN network on a region of int...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 20368, 22369, 198, 2, 12549, 371, 12, 18474, 198, 2, 15069, 357, 66, 8, 1853, 5413, 198, 2, 49962, 739, 383, 17168, 13789, 685, 3826, 38559, 24290, 329, 3307, 60, 198, 2, 2...
2.122966
5,839
# coding=utf-8 # Copyright (c) 2015 EMC Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 357, 66, 8, 1853, 412, 9655, 10501, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 1534...
3.171429
280
from datetime import datetime from airflow.models import DAG from airflow.providers.apache.spark.operators.spark_jdbc import SparkJDBCOperator from airflow.providers.apache.spark.operators.spark_sql import SparkSqlOperator from airflow.providers.apache.spark.operators.spark_submit import SparkSubmitOperator im...
[ 6738, 4818, 8079, 1330, 4818, 8079, 201, 198, 201, 198, 6738, 45771, 13, 27530, 1330, 360, 4760, 201, 198, 6738, 45771, 13, 15234, 4157, 13, 43073, 13, 2777, 668, 13, 3575, 2024, 13, 2777, 668, 62, 73, 9945, 66, 1330, 17732, 37882, ...
2.407059
425
import logging from friendlyshell.base_shell import BaseShell from friendlyshell.shell_help_mixin import ShellHelpMixin from friendlyshell.basic_logger_mixin import BasicLoggerMixin from mock import patch import pytest if __name__ == "__main__": pytest.main([__file__, "-v", "-s"])
[ 11748, 18931, 198, 6738, 8030, 29149, 13, 8692, 62, 29149, 1330, 7308, 23248, 198, 6738, 8030, 29149, 13, 29149, 62, 16794, 62, 19816, 259, 1330, 17537, 22087, 35608, 259, 198, 6738, 8030, 29149, 13, 35487, 62, 6404, 1362, 62, 19816, 25...
3.184783
92
import re import io import struct import numpy as np import httpx import logging from . import log # FITS standard specifies that header and data units # shall be a multiple of 2880 bytes long. FITS_BLOCK_SIZE = 2880 # bytes # TESS FFI dimensions FFI_COLUMNS = 2136 # i.e. NAXIS1 FFI_ROWS = 2078 # i.e. NAXIS2 BY...
[ 11748, 302, 198, 11748, 33245, 198, 11748, 2878, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2638, 87, 198, 11748, 18931, 198, 198, 6738, 764, 1330, 2604, 198, 198, 2, 376, 29722, 3210, 26052, 326, 13639, 290, 1366, 4991, 198, ...
2.220039
509
# Copyright 2019 AUI, Inc. Washington DC, USA # # 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 ...
[ 2, 220, 220, 15069, 13130, 317, 10080, 11, 3457, 13, 2669, 6257, 11, 4916, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 345, 743, 407, 779, 428, ...
3.063866
595
import unittest import mock import requests import httpretty import settings from bitfinex.client import Client, TradeClient API_KEY = settings.API_KEY API_SECRET = settings.API_SECRET
[ 11748, 555, 715, 395, 198, 11748, 15290, 198, 11748, 7007, 198, 11748, 2638, 16100, 198, 11748, 6460, 198, 198, 6738, 1643, 38125, 87, 13, 16366, 1330, 20985, 11, 9601, 11792, 198, 198, 17614, 62, 20373, 796, 6460, 13, 17614, 62, 20373,...
3.481481
54
""" Mask R-CNN Configurations and data loading code for MS COCO. Copyright (c) 2017 Matterport, Inc. Licensed under the MIT License (see LICENSE for details) Written by Waleed Abdulla ------------------------------------------------------------ Usage: import the module (see Jupyter notebooks for examples), or run fr...
[ 37811, 198, 45195, 371, 12, 18474, 198, 16934, 20074, 290, 1366, 11046, 2438, 329, 6579, 327, 4503, 46, 13, 198, 198, 15269, 357, 66, 8, 2177, 16900, 634, 11, 3457, 13, 198, 26656, 15385, 739, 262, 17168, 13789, 357, 3826, 38559, 2429...
2.422816
4,269
# from .vision import VisionDataset from PIL import Image import os import os.path from torch.utils.data import Dataset from torchvision import transforms import utils.utils as utils import torch import numpy as np from pycocotools import mask import matplotlib.pyplot as plt import random class CocoDetection(Dataset)...
[ 2, 422, 764, 10178, 1330, 19009, 27354, 292, 316, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 6738, 28034, 10178, 1330, 31408, 198,...
2.417722
948