content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from .exceptions import ConsumerUnhealthyException from .exceptions import HandlerTaskCancelled from .exceptions import StopConsumer from .exceptions import UnhandledMessage from .metrics import CONSUMED_MESSAGE_TIME from .metrics import CONSUMED_MESSAGES from .metrics import CONSUMED_MESSAGES_BATCH_SIZE from .metrics ...
[ 6738, 764, 1069, 11755, 1330, 18110, 3118, 22796, 16922, 198, 6738, 764, 1069, 11755, 1330, 32412, 25714, 34, 590, 3353, 198, 6738, 764, 1069, 11755, 1330, 13707, 49106, 198, 6738, 764, 1069, 11755, 1330, 791, 38788, 12837, 198, 6738, 764...
2.660147
818
# Generated by Django 3.2.5 on 2021-09-26 23:32 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 20, 319, 33448, 12, 2931, 12, 2075, 2242, 25, 2624, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import os, shutil from unittest import mock import swiftclient from django.test import TestCase, tag from django.contrib.auth.models import User from django.conf import settings from feeds.models import Feed, FeedFile from plugins.models import Plugin, PluginParameter, PluginInstance from plugins.models import Comp...
[ 198, 11748, 28686, 11, 4423, 346, 198, 6738, 555, 715, 395, 1330, 15290, 198, 198, 11748, 14622, 16366, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 11, 7621, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, ...
3.638298
94
#!/usr/bin/python3 # -*- conding:utf-8 -*- from . import config from .thread_manager import ThreadManager from .db import Db from .db import BookInfo import os import re import typer import time import requests import logging import rich from urllib.parse import quote from tomd import Tomd from bs4 import BeautifulSo...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 1779, 278, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 6738, 764, 1330, 4566, 198, 6738, 764, 16663, 62, 37153, 1330, 14122, 13511, 198, 6738, 764, 9945, 1330, 360, 65, ...
3.23
100
from abc import ABC
[ 6738, 450, 66, 1330, 9738, 628 ]
3.5
6
""" py_proj ~~~~~~~ Пустой проект на питоне. """ __version__ = '0.0.0'
[ 37811, 628, 220, 220, 220, 12972, 62, 1676, 73, 198, 220, 220, 220, 220, 8728, 4907, 93, 628, 220, 220, 220, 12466, 253, 35072, 21727, 20375, 25443, 117, 12466, 123, 21169, 15166, 16843, 31583, 20375, 12466, 121, 16142, 12466, 123, 1884...
1.380952
63
import os #import unittest import pybbcsig import binascii def _is_windows(): """ """ return os.name == "nt" sig = pybbcsig.PyBBcSigSecp256k1() in_privkey = b'\xd6Y\xbc#I\xfe\xed\x00\xe1x\xaa\xb4V\xd0\x9c\x01\xe2\x9a\xfd\xd2a\xabf\xcb\x14\xacM\x8e\xca2=\xbb' in_pubkey = b'\x04\x0fd(\xdd\x8fR\xf7@\x86\x...
[ 11748, 28686, 198, 2, 11748, 555, 715, 395, 198, 11748, 12972, 11848, 6359, 328, 198, 11748, 9874, 292, 979, 72, 628, 198, 4299, 4808, 271, 62, 28457, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 37227, 198, 220, 220, 220, ...
1.793129
3,988
__author__ = 'pruthvi kumar'
[ 834, 9800, 834, 796, 705, 1050, 1071, 8903, 479, 44844, 6 ]
2.545455
11
#!/usr/bin/env python3 # # MIT License # # (C) Copyright 2022 Hewlett Packard Enterprise Development LP # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including withou...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 17168, 13789, 198, 2, 198, 2, 357, 34, 8, 15069, 33160, 30446, 15503, 6400, 446, 14973, 7712, 18470, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 387...
2.695679
1,643
from lingrex.copar import CoPaR, density assert CoPaR and density __version__ = "1.1.2.dev0"
[ 6738, 18459, 21510, 13, 22163, 283, 1330, 1766, 28875, 49, 11, 12109, 198, 198, 30493, 1766, 28875, 49, 290, 12109, 198, 834, 9641, 834, 796, 366, 16, 13, 16, 13, 17, 13, 7959, 15, 1, 198 ]
2.611111
36
import os import numpy as np from spherecluster import VonMisesFisherMixture, sample_vMF np.random.seed(1234)
[ 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 16558, 565, 5819, 1330, 26985, 44, 2696, 37, 4828, 44, 9602, 11, 6291, 62, 85, 49800, 198, 198, 37659, 13, 25120, 13, 28826, 7, 1065, 2682, 8, 628, 628, 198 ]
2.829268
41
import shutil import tempfile import unittest import queuelib from scrapy.squeues import ( PickleFifoDiskQueue, PickleLifoDiskQueue, MarshalFifoDiskQueue, MarshalLifoDiskQueue, FifoMemoryQueue, LifoMemoryQueue, ) from scrapy.http import Request from scrapy.spiders import Spider from scrapy.uti...
[ 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 11748, 555, 715, 395, 198, 198, 11748, 8358, 2731, 571, 198, 198, 6738, 15881, 88, 13, 82, 4188, 947, 1330, 357, 198, 220, 220, 220, 12346, 293, 44403, 78, 40961, 34991, 11, 198, 220, ...
2.821429
140
# -*- coding: utf-8 -*- __author__ = 'Ramiro Gómez' __email__ = 'code@ramiro.org' __version__ = '5.0.0'
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 834, 9800, 834, 796, 705, 49, 6277, 305, 402, 10205, 1326, 89, 6, 198, 834, 12888, 834, 796, 705, 8189, 31, 859, 7058, 13, 2398, 6, 198, 834, 9641, 834, 796, 705, ...
1.962264
53
import bteve as eve gd = eve.Gameduino() gd.init() import pong import fruit import temperature demos = (pong, fruit, temperature) # demos[0].run(gd) sel = 0 prev_touch = False while True: gd.finish() c = gd.controllers()[0] if not prev_touch: if c['bdu']: sel = (sel - 1) if c[...
[ 11748, 275, 660, 303, 355, 28001, 198, 198, 21287, 796, 28001, 13, 38, 2434, 84, 2879, 3419, 198, 21287, 13, 15003, 3419, 198, 198, 11748, 279, 506, 198, 11748, 8234, 198, 11748, 5951, 198, 198, 9536, 418, 796, 357, 79, 506, 11, 823...
1.894118
510
#!/usr/bin/env python import pyDNase, pyDNase.footprinting import numpy as np from clint.textui import progress import multiprocessing as mp import argparse __version__ = "0.1.0" parser = argparse.ArgumentParser(description='Scores Differential Footprints using Wellington-Bootstrap.') parser.add_argument("-fp", ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 12972, 35504, 589, 11, 12972, 35504, 589, 13, 5898, 4798, 278, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 537, 600, 13, 5239, 9019, 1330, 4371, 198, 11748, 18540, 305, 919, ...
2.623377
1,463
ms1 = MyShow() ms1.showName()
[ 201, 198, 201, 198, 201, 198, 201, 198, 907, 16, 796, 2011, 15307, 3419, 201, 198, 907, 16, 13, 12860, 5376, 3419 ]
1.727273
22
import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import BoundaryNorm from matplotlib.ticker import MaxNLocator from matplotlib import ticker, cm from playground.laiZhaoGui.goa.get_lai_manual_fitting_res import read_lai_manual_fitting_res, read_lai_test_coordinate, pack_lai_manual_fitting_res, ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 13, 4033, 669, 1330, 30149, 560, 35393, 198, 6738, 2603, 29487, 8019, 13, 83, 15799, 1330, 5436, 32572, 420, 1352...
1.745546
3,985
@SingleTon test1 = TestClass() test2 = TestClass() print test1.a, test2.a test1.a = 2 print test1.a, test2.a print id(test1), id(test2)
[ 198, 198, 31, 28008, 35416, 198, 198, 9288, 16, 796, 6208, 9487, 3419, 198, 9288, 17, 796, 6208, 9487, 3419, 198, 4798, 1332, 16, 13, 64, 11, 1332, 17, 13, 64, 198, 198, 9288, 16, 13, 64, 796, 362, 198, 4798, 1332, 16, 13, 64, ...
2.241935
62
#!/usr/bin/env python3 """Ransom note""" import argparse import os import random # -------------------------------------------------- def get_args(): """Get command-line arguments""" parser = argparse.ArgumentParser( description='Ransom Note', formatter_class=argparse.ArgumentDefaultsHelpFor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 49, 22011, 3465, 37811, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 4738, 628, 198, 2, 20368, 1783, 438, 198, 4299, 651, 62, 22046, 33529, 198, 220, 220, 22...
2.656301
611
import pytest from yourcar import YourCarAPIClient, Place LAT_ROSTOCK = 54.0833 LON_ROSTOCK = 12.1333 @pytest.fixture @pytest.fixture @pytest.fixture(scope="module", autouse=True) @pytest.mark.vcr() def test_places_successful(client): """Tests an API call to get places near a location in a given range""" ...
[ 11748, 12972, 9288, 198, 198, 6738, 534, 7718, 1330, 3406, 9914, 2969, 2149, 75, 1153, 11, 8474, 198, 198, 43, 1404, 62, 49, 10892, 11290, 796, 7175, 13, 2919, 2091, 198, 43, 1340, 62, 49, 10892, 11290, 796, 1105, 13, 1485, 2091, 62...
2.601399
286
from typing import Optional from pydantic import Field from pystratis.api import Model # noinspection PyUnresolvedReferences class ExtPubKeyRequest(Model): """A request model for the wallet/extpubkey endpoint. Args: wallet_name (str): The wallet name. account_name (str, optional): The account...
[ 6738, 19720, 1330, 32233, 198, 6738, 279, 5173, 5109, 1330, 7663, 198, 6738, 12972, 2536, 37749, 13, 15042, 1330, 9104, 628, 198, 2, 645, 1040, 14978, 9485, 3118, 411, 5634, 19927, 198, 4871, 5683, 14876, 9218, 18453, 7, 17633, 2599, 19...
3.141935
155
import pandas, hashlib, base64 from Crypto import Random from Crypto.Cipher import AES from util import DataSetting DataFrame = pandas.DataFrame class AES256(DataSetting): """ | 암호화 기술 중 양방향 암호화(AES-256)를 구현한 클래스 | 모든 메소드는 생성자에 원본 데이터를 인자 값으로 넣으면 원본 데이터를 수정한다. Args: datas (pandas.DataFrame)...
[ 11748, 19798, 292, 11, 12234, 8019, 11, 2779, 2414, 198, 6738, 36579, 1330, 14534, 198, 6738, 36579, 13, 34, 10803, 1330, 34329, 198, 198, 6738, 7736, 1330, 6060, 34149, 198, 198, 6601, 19778, 796, 19798, 292, 13, 6601, 19778, 628, 198,...
1.442211
1,194
#!/usr/bin/python import sys import testmodule config = int(sys.argv[1]) if config == 0: not_debug() not_windows() elif config == 1: not_debug() windows() elif config == 2: debug() not_windows() elif config == 3: debug() windows() else: sys.exit('Invalid argument') print 'check...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 25064, 198, 11748, 1332, 21412, 628, 628, 628, 198, 11250, 796, 493, 7, 17597, 13, 853, 85, 58, 16, 12962, 198, 361, 4566, 6624, 657, 25, 198, 220, 220, 220, 407, 62, 24442, 3419, ...
2.496241
133
# Copyright 2017-2021 Lawrence Livermore National Security, LLC and other # Hatchet Project Developers. See the top-level LICENSE file for details. # # SPDX-License-Identifier: MIT import pytest from hatchet.node import Node, MultiplePathError from hatchet.frame import Frame from hatchet.graph import Graph
[ 2, 15069, 2177, 12, 1238, 2481, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 10983, 20043, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 38559, 24290, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 3323...
3.72093
86
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 from KratosMultiphysics import * from KratosMultiphysics.mpi import * from KratosMultiphysics.MetisApplication import * from KratosMultiphysics.IncompressibleFluidApplication import * f...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 4112, 62, 11748, 11, 7297, 1303, 49123, 509, 10366, 418, 15205, 13323, 23154, 19528, 11670, 351, 21015, 362, 13, 21, 290, 362, 13, 22, 198, 6738, 509, 10366, 418, 15205, 13323, 23154, ...
3.134228
149
"""A test that is run only by Github Actions This test makes real network requests, so environment variables should be specified in Github Actions. """ import os import pytest from asyncpraw import Reddit from asyncpraw.models import Submission @pytest.mark.skipif( not os.getenv("NETWORK_TEST_CLIENT_ID"), ...
[ 37811, 32, 1332, 326, 318, 1057, 691, 416, 38994, 24439, 198, 198, 1212, 1332, 1838, 1103, 3127, 7007, 11, 523, 2858, 9633, 198, 21754, 307, 7368, 287, 38994, 24439, 13, 198, 37811, 198, 11748, 28686, 198, 198, 11748, 12972, 9288, 198, ...
3.245902
122
from pathlib import Path DEFAULT_SEED = None DEFAULT_REPETITIONS = 1 DEFAULT_MAX_DECODER_STEPS = 3000 DEFAULT_SAVE_MEL_INFO_COPY_PATH = Path("/tmp/mel_out.json") # from paper DEFAULT_MCD_NO_OF_COEFFS_PER_FRAME = 16
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 7206, 38865, 62, 5188, 1961, 796, 6045, 198, 7206, 38865, 62, 35316, 2767, 2043, 11053, 796, 352, 198, 7206, 38865, 62, 22921, 62, 41374, 3727, 1137, 62, 30516, 3705, 796, 20343, 198, 7206, 38865...
2.322581
93
# coding:utf-8 import numpy as np import json import pandas as pd pred_file = 'sort_hypo_glge_xsum_ck20_bsz1.txt.dedup' sub_example = 'test_submission_example.jsonl' save_file = 'submit.jsonl' features = [] pred = [] example = [] with open(pred_file, 'r', encoding='utf-8') as infle: for line in infle.readlines():...
[ 2, 19617, 25, 40477, 12, 23, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 33918, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 28764, 62, 7753, 796, 705, 30619, 62, 36362, 78, 62, 4743, 469, 62, 87, 16345, 62, 694, 1238, 62, ...
2.401316
304
import itertools import operator import random import string from fplib.ident import Id from fplib.list import List from fplib.maybe import (Just, Nothing) from fplib.reader import Reader from fplib.state import State
[ 11748, 340, 861, 10141, 198, 11748, 10088, 198, 11748, 4738, 198, 11748, 4731, 198, 198, 6738, 277, 489, 571, 13, 738, 1330, 5121, 198, 6738, 277, 489, 571, 13, 4868, 1330, 7343, 198, 6738, 277, 489, 571, 13, 25991, 1330, 357, 5703, ...
3.295775
71
"""Test cases for some parts of the settings.py file.""" from predicators.src import utils from predicators.src.settings import get_allowed_query_type_names def test_get_allowed_query_type_names(): """Test the get_allowed_query_type_names method.""" utils.reset_config() assert get_allowed_query_type_name...
[ 37811, 14402, 2663, 329, 617, 3354, 286, 262, 6460, 13, 9078, 2393, 526, 15931, 198, 198, 6738, 41219, 2024, 13, 10677, 1330, 3384, 4487, 198, 6738, 41219, 2024, 13, 10677, 13, 33692, 1330, 651, 62, 40845, 62, 22766, 62, 4906, 62, 149...
2.579545
352
import numpy as np import os from PIL import Image import torch from torch.utils.data import Dataset from data.base_dataset import get_posenet_transform
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 198, 6738, 1366, 13, 8692, 62, 19608, 292, 316, 1330, 651, ...
3.25
48
from enum import Enum import datetime import base64 if __name__ == "__main__": print("Welcome to imagebusutil module")
[ 6738, 33829, 1330, 2039, 388, 198, 11748, 4818, 8079, 198, 11748, 2779, 2414, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3601, 7203, 14618, 284, 2939, 10885, 22602, 8265, 4943, 198 ]
3.175
40
# ----------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ----------------------------------------------------------------------------- fr...
[ 2, 16529, 32501, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321, 13, 198, 2, 16529, 32501, 198, 1...
5.390244
82
# Процесс делегирования в Python file = File() instance = Upcase(file) instance.write('test') instance.open() print(instance._outfile) #print(instance.hello()) #print(instance.hello()) #print(instance.write('test')) #print(instance._outfile) #print(instance.write('asd')) #print(instance._outfile) #print(instance._ou...
[ 2, 12466, 253, 21169, 15166, 141, 228, 16843, 21727, 21727, 12466, 112, 16843, 30143, 16843, 140, 111, 18849, 21169, 25443, 110, 16142, 22177, 18849, 40623, 12466, 110, 11361, 628, 198, 198, 7753, 796, 9220, 3419, 198, 39098, 796, 3205, 7...
2.527132
129
import sys from yamlSupport.YamlConfigurationSupport import YamlConfigurationSupport from googleSheetSupport.GoogleSheetSupport import GoogleSheetSupport from iosSupport.iOSLocalizationSettings import iOSLocalizationSettings if __name__ == '__main__': args = sys.argv if len(args) < 2: log_menu() ...
[ 11748, 25064, 198, 6738, 331, 43695, 15514, 13, 56, 43695, 38149, 15514, 1330, 14063, 75, 38149, 15514, 198, 6738, 23645, 3347, 316, 15514, 13, 11708, 3347, 316, 15514, 1330, 3012, 3347, 316, 15514, 198, 6738, 1312, 418, 15514, 13, 35742,...
2.859729
221
data={'State': ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana',...
[ 7890, 34758, 6, 9012, 10354, 37250, 49177, 3256, 705, 2348, 8480, 3256, 705, 40732, 3256, 705, 42007, 6618, 3256, 705, 25284, 3256, 705, 41330, 3256, 705, 13313, 13554, 3256, 705, 13856, 9685, 3256, 705, 31135, 3256, 705, 41072, 3256, 705...
2.343994
1,282
""" swearWords Class Author : Sorosh Safari @coci created date : 7 October, 2021 updated date : 11 October, 2021 """ # return string # return boolean # return nothing # return nothing # return boolean # return boolean # return string
[ 37811, 198, 2032, 451, 37117, 5016, 198, 13838, 1058, 15423, 3768, 23298, 2488, 66, 1733, 198, 25598, 3128, 1058, 767, 3267, 11, 33448, 198, 43162, 3128, 1058, 1367, 3267, 11, 33448, 198, 37811, 628, 197, 2, 1441, 4731, 628, 197, 2, 1...
3.632353
68
#!/usr/bin/python # -*- coding: utf-8 -*- """ CentralReport - Test script Launchs CentralReport in debug mode, without installation. Please verify CR is not installed on your host before launch this script. https://github.com/miniche/CentralReport/ """ import centralreport import sys import o...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 220, 220, 220, 5694, 19100, 532, 6208, 4226, 198, 220, 220, 220, 220, 220, 220, 220, 21225, 82, 5694, 19100...
3.605042
238
from __future__ import unicode_literals import imaplib import logging import poplib from django.core.exceptions import ValidationError from django.core.files.base import ContentFile from django.db import models from django.utils.encoding import force_bytes from django.utils.translation import ugettext_lazy as _ from...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 545, 64, 489, 571, 198, 11748, 18931, 198, 11748, 1461, 8019, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 6738, 426...
2.776316
1,216
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from torch import nn from torch.nn import functional as F import torch from ..box_head.roi_box_feature_extractors import ResNet50Conv5ROIFeatureExtractor from maskrcnn_benchmark.modeling.poolers import Pooler from maskrcnn_benchmark.layers import C...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 13, 20471, 1330, 10345, 355, 376, 198, 11748, 28034, 198, 6738, 11485, 3524, 62, 2256, 13, 305,...
2.359684
1,012
from auditing.db.Models import Packet import datetime, json import dateutil.parser as dp
[ 6738, 2709, 1780, 13, 9945, 13, 5841, 1424, 1330, 6400, 316, 198, 11748, 4818, 8079, 11, 33918, 198, 11748, 3128, 22602, 13, 48610, 355, 288, 79, 628, 628 ]
3.285714
28
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"instance_sort": "02_explore.ipynb", "instance_dcmread": "02_explore.ipynb", "instance_show": "02_explore.ipynb", "get_dicom_image": "02_explore.ipynb"} modules = ["one.py", ...
[ 2, 47044, 7730, 1677, 1137, 11617, 11050, 41354, 39345, 0, 8410, 5626, 48483, 0, 198, 198, 834, 439, 834, 796, 14631, 9630, 1600, 366, 18170, 1600, 366, 23144, 62, 15390, 62, 28751, 1600, 366, 18300, 62, 6371, 8973, 198, 198, 9630, 79...
2.142857
210
f = open("Q3/inputs.txt","r") z = f.readlines() f.close() a = "" b = "" for i in zip(*z): lst = list(i) if lst.count("1") > len(lst)//2: a += "1" b += "0" else: a += "0" b += "1" print(int(a,2)*int(b,2)) f = open("Q3/inputs.txt","r") z = f.readlines() f.close() current_ind...
[ 69, 796, 1280, 7203, 48, 18, 14, 15414, 82, 13, 14116, 2430, 81, 4943, 198, 89, 796, 277, 13, 961, 6615, 3419, 198, 69, 13, 19836, 3419, 198, 198, 64, 796, 13538, 198, 65, 796, 13538, 198, 1640, 1312, 287, 19974, 46491, 89, 2599, ...
1.923469
588
#!/usr/bin/env python3 import librosa import sys import numpy as np from os import path, listdir import json print('Content-Type: application/json\n\n') print(wav2json('./test.wav'))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 9195, 4951, 64, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 28686, 1330, 3108, 11, 1351, 15908, 198, 11748, 33918, 198, 4798, 10786, 19746, 12, 6030, 25,...
2.859375
64
import os from mfactcheck.utils.log_helper import LogHelper from mfactcheck.multi_retriever.sentences.data import SentProcessor from .mbert import MBert LogHelper.setup() logger = LogHelper.get_logger(os.path.splitext(os.path.basename(__file__))[0])
[ 11748, 28686, 198, 198, 6738, 285, 22584, 9122, 13, 26791, 13, 6404, 62, 2978, 525, 1330, 5972, 47429, 198, 6738, 285, 22584, 9122, 13, 41684, 62, 1186, 380, 964, 13, 34086, 3007, 13, 7890, 1330, 11352, 18709, 273, 198, 6738, 764, 191...
2.875
88
import contextlib import datetime import os import logging import re import time from enum import Enum import gmpy2 import sqlite3 class EcmServer: """ECM Server Responsible for recording what curves have been run. """ SCHEMA_FILE = "schema.sql"
[ 11748, 4732, 8019, 198, 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 302, 198, 11748, 640, 198, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 11748, 308, 3149, 88, 17, 198, 11748, 44161, 578, 18, 198, 198, 4871, ...
3
91
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from CommonMark import DocParser from CommonMark import HTMLRenderer from django.template import TemplateDoesNotExist from django.template.loader import render_to_string from django.utils.encoding import python_2_unicode_compatible from djan...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 18931, 198, 6738, 8070, 9704, 1330, 14432, 46677, 198, 6738, 8070, 9704, 1330, 11532, 49, 437, 1188...
3.454545
176
from jmetal.core.problem import FloatProblem from jmetal.core.solution import FloatSolution import numpy as np import math import datameclpps260421v1
[ 6738, 474, 28469, 13, 7295, 13, 45573, 1330, 48436, 40781, 201, 198, 6738, 474, 28469, 13, 7295, 13, 82, 2122, 1330, 48436, 46344, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 10688, 201, 198, 11748, 4818, 480, 565, 41799, ...
2.588235
68
from .core import API
[ 6738, 764, 7295, 1330, 7824 ]
4.2
5
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.p...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 1853, 41689, 1628, 20420, 357, 3826, 27342, 9865, 3843, 20673, 13, 9132, 737, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 3826, 38559, 24290, 737, 198, 198, 6738, 1...
3.150327
153
import urllib.request from pprint import pprint from html_table_parser.parser import HTMLTableParser import pandas as pd import os from parse import parse_taskmaster_csv if __name__ == "__main__": dir_path_to_temp_csvs="temp_csvs" dir_path_final_csvs="final_season_csvs" create_final_raw_csv(dir_path_to_...
[ 198, 11748, 2956, 297, 571, 13, 25927, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 6738, 27711, 62, 11487, 62, 48610, 13, 48610, 1330, 11532, 10962, 46677, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 6738, 21136, 1330,...
2.591463
164
import math import numpy as np import cv2 import sys # # Implement the functions below. def extract_red(image): """ Returns the red channel of the input image. It is highly recommended to make a copy of the input image in order to avoid modifying the original array. You can do this by calling: temp_image...
[ 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 25064, 198, 198, 2, 1303, 48282, 262, 5499, 2174, 13, 628, 198, 4299, 7925, 62, 445, 7, 9060, 2599, 198, 220, 220, 220, 37227, 16409, 262, 2266, ...
2.812681
3,454
from collections import defaultdict import re from utils import open_file from random import random, seed class FixedProbCounter(): '''Reads file in chunks counts the letters and stores the event gets the dictionary with the number of occurrences of each letter using a fixed probability of...
[ 6738, 17268, 1330, 4277, 11600, 198, 11748, 302, 198, 6738, 3384, 4487, 1330, 1280, 62, 7753, 198, 6738, 4738, 1330, 4738, 11, 9403, 628, 198, 4871, 10832, 2964, 65, 31694, 33529, 628, 628, 220, 220, 220, 705, 7061, 5569, 82, 2393, 28...
3.463918
97
#!/usr/bin/python import sys import numpy as np import matplotlib.pyplot as plt from easypyplot import pdf, color from easypyplot import format as fmt if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2562, 9078, 29487, 1330, 37124, 11, 3124, 198, 6738, 2562, 9078, ...
2.924242
66
# Generated by Django 2.2.6 on 2019-11-05 16:16 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 21, 319, 13130, 12, 1157, 12, 2713, 1467, 25, 1433, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
# # Copyright (c) 2014-2015 Sylvain Peyrefitte # # This file is part of rdpy. # # rdpy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. ...
[ 2, 198, 2, 15069, 357, 66, 8, 1946, 12, 4626, 24286, 391, 2631, 88, 5420, 2654, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 374, 67, 9078, 13, 198, 2, 198, 2, 374, 67, 9078, 318, 1479, 3788, 25, 345, 460, 17678, 4163, 340, 290, ...
2.260582
11,033
import pymongo from django.conf import settings from sqlalchemy import create_engine, inspect from sqlalchemy import MetaData from pymongo_schema.extract import extract_pymongo_client_schema from pymongo_schema.tosql import mongo_schema_to_mapping from apps.schema.models import Database, Table, Column, Index if ...
[ 11748, 279, 4948, 25162, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 11, 10104, 198, 6738, 44161, 282, 26599, 1330, 30277, 6601, 198, 6738, 279, 4948, 25162, 62, 15952, 2611, 13, ...
3.105263
114
#!/usr/bin/python3 import sys sys.path.append('../ry') from libry import * K = Config() D = K.view() K.addFile('../test/kitchen.g') K.addFile('../rai-robotModels/pr2/pr2.g') K.addFrame('item1', 'sink1', 'type:ssBox Q:<t(-.1 -.1 .52)> size:[.1 .1 .25 .02] color:[1. 0. 0.], contact' ) K.addFrame('item2', 'sink1', 'typ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 563, 11537, 198, 6738, 9195, 563, 1330, 1635, 198, 198, 42, 796, 17056, 3419, 198, 35, 796, 509, 13, 1177, 3419, 198, 4...
2.090234
942
import pytest @pytest.fixture
[ 11748, 12972, 9288, 628, 198, 31, 9078, 9288, 13, 69, 9602, 198 ]
2.666667
12
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ------------------------------------------------- @ Author : pengj @ date : 2019/11/25 21:07 @ IDE : PyCharm @ GitHub : https://github.com/JackyPJB @ Contact : pengjianbiao@hotmail.com ---------------...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 47232, 12, 628, 220, 220, 220, 2488, 220, 220, 6434, 220, 1058, 220, 220, 220, 220, 220, 220, 279, 1516, ...
2.796813
251
import invoke #import minchin.releaser try: from minchin.releaser import make_release, vendorize except ImportError: print("[WARN] minchin.releaser not installed")
[ 11748, 26342, 198, 198, 2, 11748, 949, 24658, 13, 260, 293, 6005, 198, 28311, 25, 198, 220, 220, 220, 422, 949, 24658, 13, 260, 293, 6005, 1330, 787, 62, 20979, 11, 18371, 1096, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 3601...
3.035088
57
#-*- coding: utf-8 -*- from __future__ import unicode_literals import Image import ImageDraw import time import ImageFont from rgbmatrix import Adafruit_RGBmatrix # Rows and chain length are both required parameters: matrix = Adafruit_RGBmatrix(32, 4) font=ImageFont.load_default() font=ImageFont.truetype("DejaVuSerif....
[ 2, 12, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 7412, 198, 11748, 7412, 25302, 198, 11748, 640, 198, 11748, 7412, 23252, 198, 6738, 46140, 6759, 860...
2.146526
662
# coding: utf-8 # In[17]: import datetime from kafka import KafkaConsumer import boto3 import json import base64 # Fire up the Kafka Consumer topic = "testpico" brokers = ["35.189.130.4:9092"] # Initialising Kafka consumer(Lambda) with topic consumer = KafkaConsumer( topic, bootstrap_servers=brokers, ...
[ 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 1558, 5974, 628, 198, 11748, 4818, 8079, 198, 6738, 479, 1878, 4914, 1330, 46906, 49106, 198, 11748, 275, 2069, 18, 198, 11748, 33918, 198, 11748, 2779, 2414, 220, 198, 198,...
2.548276
580
import json import pathlib from substratools import algo, exceptions from substratools.workspace import CompositeAlgoWorkspace import pytest @pytest.fixture(autouse=True) @pytest.fixture @pytest.fixture @pytest.fixture @pytest.mark.parametrize("fake_data,n_fake_samples,expected_pred", [ (False,...
[ 11748, 33918, 198, 11748, 3108, 8019, 198, 198, 6738, 47294, 265, 10141, 1330, 435, 2188, 11, 13269, 198, 6738, 47294, 265, 10141, 13, 5225, 10223, 1330, 49355, 2348, 2188, 23044, 10223, 198, 198, 11748, 12972, 9288, 628, 198, 31, 9078, ...
2.568075
213
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incor...
[ 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321, 13, 198, 2, 198, 2, 6127, 7560, ...
4.618705
139
""" Defining Class of custom environment for V-Rep @author: hussein """ import vrep_env from vrep_env import vrep import os vrep_scenes_path = os.environ['/home/hussein/Desktop/Multi-agent-path-planning/Reinforcement Learning/examples/scenes'] import rclpy from rclpy.node import Node from tf2_msgs.msg import TFMes...
[ 37811, 198, 198, 7469, 3191, 5016, 286, 2183, 2858, 329, 569, 12, 6207, 198, 198, 31, 9800, 25, 4791, 20719, 198, 37811, 198, 198, 11748, 410, 7856, 62, 24330, 198, 6738, 410, 7856, 62, 24330, 1330, 410, 7856, 198, 198, 11748, 28686, ...
2.207719
881
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: mixer/v1/config/client/service.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message f...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 33938, 14, 85, 16, 14, 11250, 14, 16366, 14, 15271, 13, 1676, 1462, 198,...
2.33271
2,675
from typing import List from src.types.header_block import HeaderBlock def verify_weight( tip: HeaderBlock, proof_blocks: List[HeaderBlock], fork_point: HeaderBlock ) -> bool: """ Verifies whether the weight of the tip is valid or not. Naively, looks at every block from genesis, verifying proof of sp...
[ 6738, 19720, 1330, 7343, 198, 198, 6738, 12351, 13, 19199, 13, 25677, 62, 9967, 1330, 48900, 12235, 628, 198, 4299, 11767, 62, 6551, 7, 198, 220, 220, 220, 8171, 25, 48900, 12235, 11, 6617, 62, 27372, 25, 7343, 58, 39681, 12235, 4357,...
3.078652
178
""" __author__: Jamin Becker (jamin@packettotal.com) """ import os import sys import time import socket import logging import pathlib import warnings from hashlib import md5 import psutil import pyshark import progressbar from magic import from_buffer from terminaltables import AsciiTable from packettotal_sdk.packet...
[ 37811, 198, 834, 9800, 834, 25, 449, 5669, 40765, 357, 13337, 31, 8002, 3087, 4997, 13, 785, 8, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 17802, 198, 11748, 18931, 198, 11748, 3108, 8019, 198, ...
2.187232
3,728
import unittest from shexer.shaper import Shaper from test.const import G1, BASE_FILES, default_namespaces from shexer.consts import JSON, FIXED_SHAPE_MAP from test.t_utils import file_vs_str_tunned_comparison import os.path as pth from shexer.consts import TURTLE _BASE_DIR = BASE_FILES + "shape_map" + pth.sep
[ 11748, 555, 715, 395, 198, 6738, 673, 87, 263, 13, 1477, 2136, 1330, 911, 2136, 198, 6738, 1332, 13, 9979, 1330, 402, 16, 11, 49688, 62, 46700, 1546, 11, 4277, 62, 14933, 43076, 198, 6738, 673, 87, 263, 13, 1102, 6448, 1330, 19449, ...
2.683761
117
from django.contrib import admin from .models import * admin.site.register(Product) admin.site.register(Category) admin.site.register(Review)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 1635, 198, 198, 28482, 13, 15654, 13, 30238, 7, 15667, 8, 198, 28482, 13, 15654, 13, 30238, 7, 27313, 8, 198, 28482, 13, 15654, 13, 30238, 7, 14832, 8, 198...
3.325581
43
# -*- coding: utf-8 -*- import logging from collections import namedtuple import aesara_theano_fallback.tensor as tt import numpy as np import pymc3 as pm import pytest from pymc3.tests.test_distributions import R, Unit, Vector from pymc3.tests.test_transforms import check_transform, get_values from scipy.stats impor...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 18931, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 11748, 257, 274, 3301, 62, 1169, 5733, 62, 7207, 1891, 13, 83, 22854, 355, 256, 83, 198, 11748, 2...
3.111111
180
from django import forms from django.core.validators import URLValidator from django.core.exceptions import ValidationError from bambu_webhooks.models import Receiver from bambu_webhooks import site
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 7295, 13, 12102, 2024, 1330, 10289, 47139, 1352, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 6738, 275, 4131, 84, 62, 12384, 25480, 82, ...
3.6
55
""" Ansible module for determining if an installed version of Open vSwitch is incompatible with the currently installed version of OpenShift. """ from openshift_checks import OpenShiftCheck, OpenShiftCheckException, get_var from openshift_checks.mixins import NotContainerizedMixin class OvsVersion(NotContainerizedMi...
[ 37811, 198, 2025, 82, 856, 8265, 329, 13213, 611, 281, 6589, 2196, 286, 4946, 410, 38978, 318, 27294, 351, 262, 198, 41745, 6589, 2196, 286, 4946, 33377, 13, 198, 37811, 198, 198, 6738, 9808, 29323, 62, 42116, 1330, 4946, 33377, 9787, ...
2.717095
661
from .filealchemy import FileAlchemy, LoadError # NOQA from .common import ColumnMapping
[ 6738, 764, 7753, 282, 26599, 1330, 9220, 2348, 26599, 11, 8778, 12331, 220, 1303, 8005, 48, 32, 198, 6738, 764, 11321, 1330, 29201, 44, 5912, 198 ]
3.461538
26
from punting.twodim.twodimensions import to_flat_exacta,from_flat_exacta,to_flat_quinella, from_flat_quinella from punting.onedim.onenormalization import to_normalized_dividends, to_normalized_probabilities def to_normalized_quinella_probabilities(q,scr=-1): """ :param q: 2-d representation :param scr: ...
[ 6738, 4000, 889, 13, 4246, 375, 320, 13, 4246, 375, 320, 5736, 1330, 284, 62, 38568, 62, 1069, 529, 64, 11, 6738, 62, 38568, 62, 1069, 529, 64, 11, 1462, 62, 38568, 62, 421, 500, 8466, 11, 422, 62, 38568, 62, 421, 500, 8466, 198...
2.359489
548
#!/usr/bin/env python from ctypes import * from dwfconstants import * import time,sys
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 269, 19199, 1330, 1635, 198, 6738, 43756, 69, 9979, 1187, 1330, 1635, 198, 198, 11748, 640, 11, 17597, 628 ]
2.966667
30
MINUTE_TIME_UNIT_MULTIPLIER = { "hours": 60, "minutes": 1 }
[ 23678, 37780, 62, 34694, 62, 4944, 2043, 62, 44, 16724, 4061, 31271, 1137, 796, 1391, 198, 220, 220, 220, 366, 24425, 1298, 3126, 11, 198, 220, 220, 220, 366, 1084, 1769, 1298, 352, 198, 92 ]
1.914286
35
import math import torch import torch.nn as nn from torch.nn import init from torch.nn import functional as F from torch.nn import Parameter import numpy as np import cv2 from models.resnet import resnet50 from utils.calc_acc import calc_acc from layers import TripletLoss from layers import CenterTripletLoss from la...
[ 11748, 10688, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 20471, 1330, 2315, 198, 6738, 28034, 13, 20471, 1330, 10345, 355, 376, 198, 6738, 28034, 13, 20471, 1330, 25139, 2357, 198, 11748, 299, 3...
3.526316
114
#!/usr/bin/env python # coding: utf-8 if __name__ == '__main__': sol = Solution() print(sol.findErrorNums([1, 2, 2, 4])) print(sol.findErrorNums([2, 2]))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1540, 796, 28186, 3419, 198, 220, 220, 220, 3601, 7, 34...
2.166667
78
# Copyright 2010 New Relic, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ 2, 15069, 3050, 968, 43437, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, ...
2.313511
2,472
from django.db import models from django.contrib.postgres.fields import JSONField from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ from templatestore import app_settings as ts_settings import re
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 7353, 34239, 13, 25747, 1330, 19449, 15878, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 6738, 42625, 14208, 13, ...
3.555556
72
import argparse import json import copy import torch import razdel from tqdm import tqdm from transformers import AutoTokenizer, AutoModelForSeq2SeqLM from rudetox.util.io import read_jsonl, write_jsonl from rudetox.util.dl import gen_batch, set_random_seed from rudetox.ranker import Ranker if __name__ == "__main_...
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 4866, 198, 198, 11748, 28034, 198, 11748, 374, 1031, 12381, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 6121, 364, 1330, 11160, 30642, 7509, 11, 11160, 17633, 1890, 4653, ...
2.766667
570
from bamboo.core.parser import Parser from bamboo.core.calculator import calculate_columns from bamboo.lib.datetools import now, recognize_dates from bamboo.models.calculation import Calculation from bamboo.models.dataset import Dataset from bamboo.tests.test_base import TestBase
[ 6738, 37252, 13, 7295, 13, 48610, 1330, 23042, 263, 198, 6738, 37252, 13, 7295, 13, 9948, 3129, 1352, 1330, 15284, 62, 28665, 82, 198, 6738, 37252, 13, 8019, 13, 19608, 316, 10141, 1330, 783, 11, 7564, 62, 19581, 198, 6738, 37252, 13,...
3.76
75
from django.urls import path from . import views urlpatterns = [ path("registration/", views.registration, name="registration"), path("login/", views.login, name="login"), path("valid_registry", views.valid_registry, name="valid_registry"), path("valid_login", views.valid_login, name="valid_login"), ...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 7203, 2301, 33397, 14, 1600, 5009, 13, 2301, 33397, 11, 1438, 2625, 2301, 33397, 12340, 198, 220,...
2.92126
127
from hashlib import sha3_256 from typing import Union, BinaryIO from pathlib import Path from importlib_metadata import pathlib def ensure_path( path: Union[str, Path], must_exist: bool = False ) -> Path: """ ensures that given path is of type Path and that HOME directory is resolved """ path...
[ 6738, 12234, 8019, 1330, 427, 64, 18, 62, 11645, 198, 6738, 19720, 1330, 4479, 11, 45755, 9399, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 1330, 8019, 62, 38993, 1330, 3108, 8019, 628, 198, 4299, 4155, 62, 6978, 7, 198, 220, ...
2.546781
1,165
""" Utilities for setting up PyTorch memory usage experiments. """ import csv from itertools import product as iter_product import os import subprocess import time import numpy as np from common import (check_file_exists, prepare_out_file, read_json, render_exception, write_json) MEASURED_KEYS = ...
[ 37811, 198, 18274, 2410, 329, 4634, 510, 9485, 15884, 354, 4088, 8748, 10256, 13, 198, 37811, 198, 11748, 269, 21370, 198, 6738, 340, 861, 10141, 1330, 1720, 355, 11629, 62, 11167, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, ...
2.299335
6,765
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import seaborn as sns import argparse import numpy as np import joblib import tensorflow as tf import os from sac.misc import utils from sac.policies.hierarchical_policy import FixedOptionPolicy from sac.misc.sampler import rollouts if __name__ =...
[ 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 3...
1.920027
1,488
# # Copyright (c) 2015-2019 Thierry Florac <tflorac AT ulthar.net> # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRAN...
[ 2, 198, 2, 15069, 357, 66, 8, 1853, 12, 23344, 536, 959, 563, 4432, 330, 1279, 83, 2704, 273, 330, 5161, 14856, 400, 283, 13, 3262, 29, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 770, 3788, 318, 2426, 284, 262, 8617, 286, ...
2.530978
1,840
from ..handler_request import get_resource_url
[ 6738, 11485, 30281, 62, 25927, 1330, 651, 62, 31092, 62, 6371, 628, 628, 198 ]
3.642857
14
from random import randint itens = ('Pedra', 'Papel', 'Tesoura') pc = randint(0, 2) print('''Suas opções: [ 0 ] PEDRA [ 1 ] PAPEL [ 2 ] TESOURA ''') op = int(input('Qual é a sua jogada: ')) print('-=' * 11) print('Computador jogou {}'.format(itens[pc])) print('jogador jogou {}'.format(itens[op])) print('-=' * 11) if ...
[ 6738, 4738, 1330, 43720, 600, 198, 270, 641, 796, 19203, 43468, 430, 3256, 705, 47, 499, 417, 3256, 705, 36504, 280, 430, 11537, 198, 14751, 796, 43720, 600, 7, 15, 11, 362, 8, 198, 4798, 7, 7061, 6, 5606, 292, 1034, 16175, 127, 1...
1.888112
572
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 5366, 13, 26791, 1330, 4818, 8079, 62, 26791, 355, 4818, 8079, 198, 6738, 5366, 13, 9945, 1330, 20613, 198, 6738, 5366, 13, 85, 17, 1330, 10011, 2611, 44, 4254, ...
3.113208
53
import os from dagster_examples.pyspark_pagerank.original import ( computeContribs, execute_pagerank, parseNeighbors, ) from .util import checks_for_helper_functions
[ 11748, 28686, 198, 198, 6738, 48924, 1706, 62, 1069, 12629, 13, 79, 893, 20928, 62, 79, 3536, 962, 13, 14986, 1330, 357, 198, 220, 220, 220, 24061, 4264, 822, 82, 11, 198, 220, 220, 220, 12260, 62, 79, 3536, 962, 11, 198, 220, 220...
2.676471
68
from __future__ import (division, absolute_import, print_function, unicode_literals) import sqlalchemy import sqlalchemy.orm from .gtfs_entities import gtfs_all, Feed, Base class Schedule: """Represents the full database. The schedule is the most important object in pygtfs. It repre...
[ 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28000, 1098, 62, 17201...
2.663694
785
# Generated by Django 3.2.7 on 2021-10-11 12:43 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 22, 319, 33448, 12, 940, 12, 1157, 1105, 25, 3559, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
################################################################################ # Copyright (C) 2019 drinfernoo # # # # This Program is free software; you can redistribute it and/or modify ...
[ 29113, 29113, 14468, 198, 2, 220, 220, 220, 220, 220, 15069, 357, 34, 8, 13130, 1553, 10745, 1142, 2238, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.046308
799
#!/usr/bin/python3 # Example line: Step A must be finished before step L can begin. edges = [(ord(x[1]) - ord('A'), ord(x[7]) - ord('A')) for x in map(lambda x: x.split(), open('input.in').readlines())] workers = 5 for e in edges: print('{} → {}'.format(chr(ord('A') + e[0]),chr(ord('A') + e[1]))) graph = {} # for ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 17934, 1627, 25, 5012, 317, 1276, 307, 5201, 878, 2239, 406, 460, 2221, 13, 198, 276, 3212, 796, 47527, 585, 7, 87, 58, 16, 12962, 532, 2760, 10786, 32, 33809, 2760, 7, 87, 58, 2...
2.00416
1,202
# Generated by Django 3.0.2 on 2020-06-20 12:35 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 17, 319, 12131, 12, 3312, 12, 1238, 1105, 25, 2327, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/env python3 import sys import argparse from collections import Counter my_description = ''' Prune empty (or infrequent) slices from a tensor. With default options, this script scans a tensor file and removes empty slices. Those slices are then specified with "mode-X-gaps.map" files which map the old dime...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 198, 11748, 1822, 29572, 198, 6738, 17268, 1330, 15034, 628, 198, 1820, 62, 11213, 796, 705, 7061, 198, 6836, 1726, 6565, 357, 273, 1167, 46018, 8, 24314, 4...
2.638062
1,445
"""Clean Code in Python - Chater 4, The SOLID Principles > Liskov's Substitution Principle (LSP) Detecting violatinos os LSP through tools (mypy, pylint, etc.) """
[ 37811, 32657, 6127, 287, 11361, 532, 609, 729, 604, 11, 383, 36817, 2389, 34200, 198, 198, 29, 406, 1984, 709, 338, 24944, 2738, 40921, 357, 43, 4303, 8, 198, 198, 47504, 278, 1935, 10680, 418, 28686, 406, 4303, 832, 4899, 357, 1820, ...
3.12963
54