content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
################################################################################ # 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...
[ 29113, 29113, 14468, 198, 2, 220, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 220, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 220, 9387, 351, 428, 670, 329, 3224, 1321, 198, ...
3.374841
787
from django.db import models from django.db.models.signals import post_save post_save.connect(address_save, sender=UserAddress)
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281, 62, 21928, 628, 628, 198, 198, 7353, 62, 21928, 13, 8443, 7, 21975, 62, 21928, 11, 29788, 28, 12982, 20231, 8, 198 ]
3.166667
42
# -*- coding: utf-8 -*- from __future__ import division, print_function import numpy as np from .red_blue import RedBlueMove __all__ = ["DESnookerMove"] class DESnookerMove(RedBlueMove): """A snooker proposal using differential evolution. Based on `Ter Braak & Vrugt (2008) <http://link.springer.com/ar...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 764, 445, 62, 17585, 1330, 2297, 14573, 21774, 198, 198...
2.69084
262
import time import numpy as np import torch import torch.nn as nn import torchvision.transforms as transforms import torchvision.datasets as dsets if __name__ == '__main__': training_accuracy, val_accuracy, test_accuracy = logistic_regression_training([-8., -8., 3., -2.]) print(training_accuracy, val_accuracy, ...
[ 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 10178, 13, 7645, 23914, 355, 31408, 198, 11748, 28034, 10178, 13, 19608, 292, 1039, 355, 288, 28709, 628, ...
3.073394
109
""" Elements of Finite Algebras """ #***************************************************************************** # Copyright (C) 2011 Johan Bosman <johan.g.bosman@gmail.com> # Copyright (C) 2011, 2013 Peter Bruin <peter.bruin@math.uzh.ch> # Copyright (C) 2011 Michiel Kosters <kosters@gmail.com> # # Distributed u...
[ 37811, 198, 36, 3639, 286, 4463, 578, 978, 469, 1671, 292, 198, 37811, 198, 198, 2, 17174, 17174, 4557, 35625, 198, 2, 220, 15069, 357, 34, 8, 2813, 16053, 272, 14548, 805, 1279, 73, 22436, 13, 70, 13, 39565, 805, 31, 14816, 13, 7...
1.954017
9,373
"""Module containing class `ClassifyCommand`.""" import logging import time from vesper.command.command import Command from vesper.django.app.models import AnnotationInfo, Job, Processor from vesper.singleton.extension_manager import extension_manager import vesper.command.command_utils as command_utils import vespe...
[ 37811, 26796, 7268, 1398, 4600, 9487, 1958, 21575, 63, 526, 15931, 628, 198, 11748, 18931, 198, 11748, 640, 198, 198, 6738, 410, 274, 525, 13, 21812, 13, 21812, 1330, 9455, 198, 6738, 410, 274, 525, 13, 28241, 14208, 13, 1324, 13, 275...
3.481366
322
from abc import ABC from enum import Enum, EnumMeta from typing import Iterable, List, Optional, Set, Tuple import warnings import numpy as np from paranormal.units import convert_to_si_units __all__ = ['BaseDescriptor', 'BoolParam', 'FloatParam', 'IntParam', 'StringParam', 'ListParam', 'SetParam', 'Aran...
[ 6738, 450, 66, 1330, 9738, 198, 6738, 33829, 1330, 2039, 388, 11, 2039, 388, 48526, 198, 6738, 19720, 1330, 40806, 540, 11, 7343, 11, 32233, 11, 5345, 11, 309, 29291, 198, 11748, 14601, 198, 198, 11748, 299, 32152, 355, 45941, 198, 19...
2.610508
5,900
from datalad.tests.utils import assert_status
[ 6738, 4818, 282, 324, 13, 41989, 13, 26791, 1330, 6818, 62, 13376, 628 ]
3.615385
13
# AUTOGENERATED! DO NOT EDIT! File to edit: 01_printing.ipynb (unless otherwise specified). __all__ = ['printme'] # Cell def printme( a:any # Print something ): "prints a" print(a)
[ 2, 47044, 7730, 1677, 1137, 11617, 0, 8410, 5626, 48483, 0, 9220, 284, 4370, 25, 5534, 62, 4798, 278, 13, 541, 2047, 65, 357, 25252, 4306, 7368, 737, 198, 198, 834, 439, 834, 796, 37250, 4798, 1326, 20520, 198, 198, 2, 12440, 198, ...
2.586667
75
age = int(input('Input your age: ')) if age < 18: print('Ждем тебя в школе') elif age >= 18 and age <= 30: print('Иди в универ') elif age > 30 and age < 40: print('Иди работай!') job = input('Что ты делаешь? ') if job == 'Бездельник': print('Так найди работу!') else: print('Ну т...
[ 496, 796, 493, 7, 15414, 10786, 20560, 534, 2479, 25, 705, 4008, 198, 198, 361, 2479, 1279, 1248, 25, 198, 220, 220, 220, 3601, 10786, 140, 244, 43666, 16843, 43108, 220, 20375, 16843, 140, 109, 40623, 12466, 110, 220, 141, 230, 31583...
1.485507
276
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: core/api/grpc/services.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_databa...
[ 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, 4755, 14, 15042, 14, 2164, 14751, 14, 30416, 13, 1676, 1462, 198, 198, 6...
2.507891
20,593
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables __al...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 26144, 35986, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760, 644, 345, 389, 1804, 0, 17202, ...
2.759428
769
# Copyright (c) nexB Inc. and others. All rights reserved. # ScanCode is a trademark of nexB Inc. # SPDX-License-Identifier: Apache-2.0 # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. # See https://github.com/nexB/scancode-toolkit for support or download. # See https://aboutcode.org for more inf...
[ 198, 2, 15069, 357, 66, 8, 497, 87, 33, 3457, 13, 290, 1854, 13, 1439, 2489, 10395, 13, 198, 2, 20937, 10669, 318, 257, 16028, 286, 497, 87, 33, 3457, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 1...
2.393223
1,269
import os import sys import argparse import wandb import numpy as np import pandas as pd import torch import models.am3 as am3 import models.maml as maml import models.fumi as fumi import models.clip as clip from dataset.data import get_dataset import utils if __name__ == "__main__": # read cmd line argument...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 11748, 11569, 65, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 11748, 28034, 198, 198, 11748, 4981, 13, 321, 18, 355, 716, 18, ...
2.96124
129
from pwn import * # stack offset to overwrite rip stack_offset = 56 buffer = "A"*stack_offset + p64(0x00400640) print buffer exit() # run target p = process("./bof-level1") # wait for debugger pid = util.proc.pidof(p)[0] print "The pid is: "+str(pid) util.proc.wait_for_debugger(pid) buffer = "A"*stack_offset + p6...
[ 6738, 279, 675, 1330, 197, 9, 198, 198, 2, 8931, 11677, 284, 49312, 18344, 198, 25558, 62, 28968, 796, 7265, 198, 198, 22252, 796, 366, 32, 1, 9, 25558, 62, 28968, 1343, 279, 2414, 7, 15, 87, 405, 7029, 31102, 8, 198, 198, 4798, ...
2.653631
179
from django.conf import settings
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 220, 628 ]
3.6
10
import FWCore.ParameterSet.Config as cms pfJetResDQMAnalyzer = cms.EDAnalyzer("PFJetDQMAnalyzer", InputCollection = cms.InputTag('pfAllElectrons'), MatchCollection = cms.InputTag('gensource'), BenchmarkLabel = cms.string('PFJetResValidation/PFElecVsGenElec'), deltaRMax = cms.double(0.1), onlyTwoJe...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 79, 69, 42273, 4965, 35, 48, 44, 37702, 9107, 796, 269, 907, 13, 1961, 37702, 9107, 7203, 42668, 42273, 35, 48, 44, 37702, 9107, 1600, 198, 220, 220, 220, 234...
1.94791
1,555
import os, sys, shutil, json import urllib.request as req URLS = 1 << 0 LOCAL_FILES = 1 << 1 LOCAL_DIRS = 1 << 2 ALL = URLS | LOCAL_FILES | LOCAL_DIRS DEFAULT_JSON_URL = "https://bitbucket.org/Josef21296/various-resources/raw/55ac88d9f8d97a4649b67cf70596f8bcd16af066/Templates/templates_source.json" DEFAULT_JSON_NAME ...
[ 11748, 28686, 11, 25064, 11, 4423, 346, 11, 33918, 198, 11748, 2956, 297, 571, 13, 25927, 355, 43089, 198, 198, 4261, 6561, 796, 352, 9959, 657, 198, 29701, 1847, 62, 46700, 1546, 796, 352, 9959, 352, 198, 29701, 1847, 62, 34720, 50, ...
3.275568
352
from ..cw_model import CWModel
[ 6738, 11485, 66, 86, 62, 19849, 1330, 24006, 17633, 201, 198, 201, 198 ]
2.615385
13
from io import StringIO import tempfile xml_stream_header = StringIO( """ <rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/" xmlns:wp="http://wordpress.org/export/1.2/" version="2.0"> <channel> ...
[ 6738, 33245, 1330, 10903, 9399, 198, 11748, 20218, 7753, 198, 198, 19875, 62, 5532, 62, 25677, 796, 10903, 9399, 7, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1279, 42216, 35555, 5907, 25, 11299, 2625, 4023, 1378, 79, 6371, 13, 23...
2.323789
454
# -*- coding: utf-8 -*- # Generated by Django 1.9.8 on 2016-08-17 23:19 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 24, 13, 23, 319, 1584, 12, 2919, 12, 1558, 2242, 25, 1129, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.672727
55
from __future__ import absolute_import import json import platform import re import ssl import asyncio import requests from .error import RequestError, RequestSetupError from .resources.chargebacks import Chargebacks from .resources.customer_mandates import CustomerMandates from .resources.customer_payments import Cu...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 11748, 33918, 198, 11748, 3859, 198, 11748, 302, 198, 11748, 264, 6649, 198, 11748, 30351, 952, 198, 198, 11748, 7007, 198, 198, 6738, 764, 18224, 1330, 19390, 12331, 11, 19390, 40786, ...
3.151667
600
"""mcpython - a minecraft clone written in python licenced under MIT-licence authors: uuk, xkcdjerry original game by forgleman licenced under MIT-licence minecraft by Mojang blocks based on 1.14.4.jar of minecraft, downloaded on 20th of July, 2019""" import globals as G import PIL.Image
[ 37811, 76, 13155, 7535, 532, 257, 6164, 3323, 17271, 3194, 287, 21015, 3476, 5864, 739, 17168, 12, 677, 594, 198, 41617, 25, 334, 2724, 11, 2124, 74, 10210, 73, 6996, 198, 198, 14986, 983, 416, 5784, 293, 805, 3476, 5864, 739, 17168, ...
3.292135
89
# Generated by Django 3.1 on 2020-10-17 14:18 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 319, 12131, 12, 940, 12, 1558, 1478, 25, 1507, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.966667
30
from __future__ import print_function import os import torch import torch.nn as nn from torch.autograd import Variable import torch.optim as optim import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import argparse parser = argparse.ArgumentParser(description='Pytorch Time Sequen...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 28686, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 29...
2.677596
732
# -*- coding: utf-8 -*- """ Locomotion features Contains Processing code for: ----------------------------- locomotion.velocity locomotion.motion_events """ import numpy as np from .. import utils from . import events from . import feature_comparisons as fc # To avoid conflicting with variables named 'velocity', w...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 33711, 296, 9650, 3033, 198, 198, 4264, 1299, 28403, 2438, 329, 25, 198, 1783, 32501, 198, 17946, 296, 9650, 13, 626, 11683, 198, 17946, 296, 9650, 13, 38714...
2.206419
4,549
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 33160, 383, 3012, 4992, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, ...
2.272631
1,889
from html.parser import HTMLParser import urllib3 # create a subclass and override the handler methods if __name__ == '__main__': worker = Downloader() progsPerDay = worker.download("tmp") progsPerDay = worker.get_offline("tmp") schedule = Schedule() for day in range(0, len(progsPerDay)): ...
[ 6738, 27711, 13, 48610, 1330, 11532, 46677, 198, 11748, 2956, 297, 571, 18, 198, 198, 2, 2251, 257, 47611, 290, 20957, 262, 21360, 5050, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 8383, 796...
2.450928
377
import FWCore.ParameterSet.Config as cms from RecoParticleFlow.PFClusterProducer.particleFlowClusterTimeAssignerDefault_cfi import * particleFlowTimeAssignerECAL = particleFlowClusterTimeAssignerDefault.clone() particleFlowTimeAssignerECAL.timeSrc = cms.InputTag('ecalBarrelClusterFastTimer:PerfectResolutionModel') pa...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 6738, 3311, 78, 7841, 1548, 37535, 13, 42668, 2601, 5819, 11547, 2189, 13, 3911, 1548, 37535, 2601, 5819, 7575, 8021, 570, 263, 19463, 62, 66, 12463, 1330, 1635, ...
3.135714
140
# class TestBaseLogic(): # def fields_generated_when_vals_not_available(self): # pass # # def percents_inferred_from_absolutes(self): # pass # # def absolutes_inferred_from_percents(self): # pass # # def override_total_with_sum_of_male_and_female(self: # self.sex_table['a...
[ 2, 1398, 6208, 14881, 11187, 291, 33529, 198, 2, 220, 220, 220, 220, 825, 7032, 62, 27568, 62, 12518, 62, 12786, 62, 1662, 62, 15182, 7, 944, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 1208, 198, 2, 198, 2, 220, 220, ...
2.143396
265
#!/usr/bin/env python3 # wf_kernel_lib.py # # Copyright (c) 2010-2018 Wave Computing, Inc. and its applicable licensors. # All rights reserved; provided, that any files identified as open source shall # be governed by the specific open source license(s) applicable to such files. # # For any files associated with...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 266, 69, 62, 33885, 62, 8019, 13, 9078, 220, 198, 2, 220, 198, 2, 15069, 357, 66, 8, 3050, 12, 7908, 17084, 38589, 11, 3457, 13, 290, 663, 9723, 8240, 669, 13, 220, ...
2.645784
3,831
import torch
[ 11748, 28034 ]
6
2
from typing import Optional from gripcontrol import GripPubControl, WebSocketMessageFormat from pubcontrol import Item from restapi.connectors import Connector, ExceptionsList from restapi.utilities.logs import log instance = PushpinExt()
[ 6738, 19720, 1330, 32233, 198, 198, 6738, 11762, 13716, 1330, 40298, 14876, 15988, 11, 5313, 39105, 12837, 26227, 198, 6738, 2240, 13716, 1330, 9097, 198, 198, 6738, 1334, 15042, 13, 8443, 669, 1330, 8113, 273, 11, 1475, 11755, 8053, 198,...
4.032787
61
""" GitHub methods that are functionally separate from anything Sublime-related. """ import re from collections import namedtuple from webbrowser import open as open_in_browser from functools import partial from ..common import interwebs, util from ..core.exceptions import FailedGithubRequest from ..core.settings imp...
[ 37811, 198, 38, 270, 16066, 5050, 326, 389, 48410, 4553, 422, 1997, 3834, 27299, 12, 5363, 13, 198, 37811, 198, 198, 11748, 302, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 3992, 40259, 1330, 1280, 355, 1280, 62, 259, 62, 4025...
2.515482
2,842
import logging from pathlib import Path from unittest.mock import patch, MagicMock from typing import Iterator import pytest from py._path.local import LocalPath import tensorflow as tf LOGGER = logging.getLogger(__name__) @pytest.fixture(scope='session', autouse=True) @pytest.fixture(scope='session', autouse=...
[ 11748, 18931, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 11, 6139, 44, 735, 198, 6738, 19720, 1330, 40806, 1352, 198, 198, 11748, 12972, 9288, 198, 6738, 12972, 13557, 6978, 13, 12001, 1330, ...
2.978261
138
from rest_framework import serializers from .models import Account from django.contrib.auth.models import User
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 764, 27530, 1330, 10781, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787 ]
4.230769
26
input = [x for x in open('input.txt', 'r').read().splitlines()] print(fix_loop(parse_instructions(input)))
[ 15414, 796, 685, 87, 329, 2124, 287, 1280, 10786, 15414, 13, 14116, 3256, 705, 81, 27691, 961, 22446, 35312, 6615, 3419, 60, 628, 628, 198, 198, 4798, 7, 13049, 62, 26268, 7, 29572, 62, 259, 7249, 507, 7, 15414, 22305, 198 ]
2.731707
41
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from openpyxl import load_workbook from openpyxl.utils.exceptions import InvalidFileException from xlpo.readers import TranslationsReader from xlpo import Translation from zipfile import BadZipfile import os import six class XLSXTransla...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 1280, 9078, 87, 75, 1330, 3440, 62, 1818, 2070, 198, 6738, 1280, 9078, ...
3.23622
127
#!/usr/bin/env python3 # jsonVal01 # Invoke by: jsonVal01 <JSONFilename> # Checks validity of JSON file by JSON Decoder. # Original Creation: 10MAR21 # Released under Apache 2.0 License import json import sys with open(sys.argv[1]) as file: try: json.load(file) # Attempt to assign JSON-data to a var ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 33918, 7762, 486, 198, 2, 10001, 2088, 416, 25, 33918, 7762, 486, 1279, 40386, 35063, 29, 198, 2, 47719, 19648, 286, 19449, 2393, 416, 19449, 34580, 13, 198, 2, 13745, 21...
2.776042
192
# Generated by Django 2.1.13 on 2021-06-17 12:29 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 1485, 319, 33448, 12, 3312, 12, 1558, 1105, 25, 1959, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32
from tqdm import tqdm from fastapi import FastAPI from itertools import product from nlu_flow.utils import meta_db_client import os, sys import random import re app = FastAPI() is_ready = False patterns = {} ## collect single pattern single_patterns = meta_db_client.get("regexes") for pattern in single_patterns: ...
[ 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 3049, 15042, 1330, 12549, 17614, 198, 6738, 340, 861, 10141, 1330, 1720, 198, 198, 6738, 299, 2290, 62, 11125, 13, 26791, 1330, 13634, 62, 9945, 62, 16366, 198, 198, 11748, 28686, ...
2.754054
370
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 2177, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
2.895122
1,640
import numpy as np from PIL import Image def show(image): """ 画像データを表示 # 引数 image : Numpy array, 画像データ """ image = image[0] * 255 image = image.astype(np.uint8) image = Image.fromarray(image) image.show() def get_input(): """ 標準入力から文字列を取得 # 戻り値 value : Str...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 628, 198, 4299, 905, 7, 9060, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 13328, 242, 119, 161, 225, 237, 21959, 6312, 23376, 31758, 26193, 101, 163, 97, 118, ...
1.743083
253
dataset_type = 'ReIDDataset' img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) train_pipeline = [ dict(type='LoadMultiImagesFromFile', to_float32=True), dict( type='SeqResize', img_scale=(128, 256), share_params=False, keep_ratio=F...
[ 19608, 292, 316, 62, 4906, 796, 705, 3041, 2389, 27354, 292, 316, 6, 198, 9600, 62, 27237, 62, 37581, 796, 8633, 7, 198, 220, 220, 220, 1612, 41888, 10163, 13, 42444, 11, 18693, 13, 2078, 11, 15349, 13, 4310, 4357, 14367, 41888, 336...
2.05375
800
import requests from .backend import CloudberryApi, CloudberryConfig from .data import Data from .model.metadata import * COMPUTATION_IDS_HEX = 'computationIdsHex' CONFIGURATION_IDS_HEX = 'configurationIdsHex' EXPERIMENT_IDS_HEX = 'experimentIdsHex'
[ 11748, 7007, 198, 198, 6738, 764, 1891, 437, 1330, 10130, 8396, 32, 14415, 11, 10130, 8396, 16934, 198, 6738, 764, 7890, 1330, 6060, 198, 6738, 764, 19849, 13, 38993, 1330, 1635, 198, 198, 9858, 30076, 6234, 62, 14255, 62, 39, 6369, 7...
2.811111
90
############################################################################# # Copyright 2016 Mass KonFuzion Games # # 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...
[ 29113, 29113, 7804, 4242, 2, 198, 2, 15069, 1584, 5674, 17431, 37, 10277, 295, 5776, 198, 2, 220, 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, ...
4.21883
393
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 10442, 13789, 12729, 357, 21800, 13789, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 3648, 11, 33021, 45502, 11, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3...
3.425094
534
from itertools import islice, count from tqdm import tqdm def transform(sequence, method="squiggle", bar=False): """Transforms a DNA sequence into a series of coordinates for 2D visualization. Args: sequence (str): The DNA sequence to transform. method (str): The method by which to transfor...
[ 6738, 340, 861, 10141, 1330, 318, 75, 501, 11, 954, 198, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 628, 198, 198, 4299, 6121, 7, 43167, 11, 2446, 2625, 16485, 24082, 1600, 2318, 28, 25101, 2599, 198, 220, 220, 220, 37227, 829...
1.804042
3,414
from __future__ import absolute_import, division, print_function import os import numpy as np #from .due import due, Doi # # ## Use duecredit (duecredit.org) to provide a citation to relevant work to ## be cited. This does nothing, unless the user has duecredit installed, ## And calls this with duecredit (as in `pytho...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 6738, 764, 23301, 1330, 2233, 11, 2141, 72, 198, 2, 198, 2, 198, 2235, 5765, 2233, 430...
2.401515
2,112
# LOSS = 'GraphWaveNetLoss' ADJTYPE = 'doubletransition'
[ 2, 406, 18420, 796, 705, 37065, 39709, 7934, 43, 793, 6, 198, 2885, 41, 25216, 796, 705, 23352, 7645, 653, 6 ]
2.666667
21
from dataclasses import dataclass @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 628, 198, 31, 19608, 330, 31172 ]
3.285714
14
# Copyright 2018-2019 The glTF-Blender-IO authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ 2, 15069, 2864, 12, 23344, 383, 1278, 10234, 12, 3629, 2194, 12, 9399, 7035, 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...
1.988059
5,276
import sys import pygame as pg import pygame_widgets from pygame_widgets.button import Button import random import textwrap from pygame.math import Vector2 from ports import ports ROWS = 11 pg.init() screen = pg.display.set_mode((420, 768)) pg.display.set_caption('CEHv11 Service Port Training') fon...
[ 11748, 25064, 198, 11748, 12972, 6057, 355, 23241, 198, 11748, 12972, 6057, 62, 28029, 11407, 198, 6738, 12972, 6057, 62, 28029, 11407, 13, 16539, 1330, 20969, 198, 11748, 4738, 198, 11748, 2420, 37150, 198, 6738, 12972, 6057, 13, 11018, ...
2.085456
1,217
"""Abstract handle for standard training and testing of pytorch models.""" # Copyright (c) 2020 Continental Automotive GmbH # pylint: enable=no-name-in-module import abc import copy import logging from typing import Optional, Dict, Any, Callable, Union, Iterable, Tuple, \ List, Sequence import numpy as np impo...
[ 37811, 23839, 5412, 329, 3210, 3047, 290, 4856, 286, 12972, 13165, 354, 4981, 526, 15931, 198, 198, 2, 220, 15069, 357, 66, 8, 12131, 30462, 17406, 19138, 402, 2022, 39, 198, 198, 2, 279, 2645, 600, 25, 7139, 28, 3919, 12, 3672, 12,...
2.130602
19,035
import hgvseval from .interface import HGVSTestService import hgvs.dataproviders.uta import hgvs.parser import hgvs.variantmapper import hgvs.normalizer
[ 11748, 289, 70, 85, 325, 2100, 198, 6738, 764, 39994, 1330, 367, 37094, 2257, 395, 16177, 198, 198, 11748, 289, 70, 14259, 13, 19608, 499, 18657, 4157, 13, 29822, 198, 11748, 289, 70, 14259, 13, 48610, 198, 11748, 289, 70, 14259, 13, ...
2.818182
55
import xml.etree.ElementTree as ElementTree
[ 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 11703, 27660, 198 ]
3.666667
12
import requests import sys res = requests.put("http://challenges.clusterfights.com/challenge/" + sys.argv[1], json={ "solution": { "secret": sys.argv[2] } }) print(res.json()['runtime'])
[ 11748, 7007, 198, 11748, 25064, 198, 198, 411, 796, 7007, 13, 1996, 7203, 4023, 1378, 36747, 34120, 13, 565, 5819, 50121, 13, 785, 14, 36747, 3540, 30487, 1343, 25064, 13, 853, 85, 58, 16, 4357, 33918, 34758, 198, 197, 197, 1, 82, 2...
2.475
80
import time import numpy as np import plots import itertools from multiprocessing import Process, Lock from pathlib import Path import seaborn as sns # from matplotlib import pyplot as plt plots.folder_root = "../results/" plots.LEGEND = True # Set this to False to remove legends for plots subdir_prefix = Path('figs_...
[ 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 21528, 198, 11748, 340, 861, 10141, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 11, 13656, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198,...
1.838778
7,133
from .Const import Const import requests from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.chrome.service import Service from selenium.webdriver.support import expected_conditions as ec from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By...
[ 6738, 764, 34184, 1330, 4757, 198, 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 46659, 13, 15271, 1330, 4809, 198, 6738, ...
3.76
100
import inspect from unittest.mock import MagicMock, patch from pydantic import BaseModel from rest_framework.exceptions import ValidationError from rest_framework.request import Request from rest_framework.test import APITestCase from rest_typed.views import Body, CurrentUser, ParamSettings, Path, Query from rest_type...
[ 11748, 10104, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 11, 8529, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 198, 6738, 1334, 62, 30604, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 6738, 1334, 62, 30604,...
3.313333
150
# -*- coding: utf-8 -*- from fixture.variables import UserLogin from group_lib import Group def test_create_group(app): """Validation of correct create test group (All field fill up)""" app.session.login(UserLogin.name, UserLogin.password) app.create_group(Group(group_name='test', group_header='test', gr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 29220, 13, 25641, 2977, 1330, 11787, 47790, 198, 6738, 1448, 62, 8019, 1330, 4912, 628, 198, 4299, 1332, 62, 17953, 62, 8094, 7, 1324, 2599, 198, 220, 220, ...
2.841727
278
import unittest import pinocchio as pin import os @unittest.skipUnless(pin.WITH_URDFDOM_SUPPORT(),"Needs URDFDOM") if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 6757, 420, 40900, 355, 6757, 198, 11748, 28686, 198, 198, 31, 403, 715, 395, 13, 48267, 28042, 7, 11635, 13, 54, 10554, 62, 4261, 8068, 39170, 62, 40331, 15490, 3419, 553, 23037, 82, 37902, 8068, 3917...
2.484848
66
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import numpy as np import time import os import json import datetime from joblib import Parallel, delayed from parlai.co...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287,...
2.466853
1,071
import os from cryptojwt.key_jar import init_key_jar import pytest from idpyoidc.client.entity import Entity from idpyoidc.message import Message from idpyoidc.message.oauth2 import AccessTokenResponse from idpyoidc.message.oauth2 import AuthorizationResponse from idpyoidc.message.oidc import IdToken from tests.test_...
[ 11748, 28686, 198, 198, 6738, 8194, 13210, 46569, 13, 2539, 62, 9491, 1330, 2315, 62, 2539, 62, 9491, 198, 11748, 12972, 9288, 198, 198, 6738, 4686, 9078, 1868, 66, 13, 16366, 13, 26858, 1330, 20885, 198, 6738, 4686, 9078, 1868, 66, 1...
2.502976
336
# To add a new cell, type '# %%' # To add a new markdown cell, type '# %% [markdown]' # %% import itertools # %% import numpy as np import datetime import pandas as pd # %% import pandas as pd OrdinalCols = {} # %% # import pandas as pd # df = pd.read_csv("datasets/CarSales.csv") # measures = ['Sales'] # dataCube...
[ 2, 1675, 751, 257, 649, 2685, 11, 2099, 705, 2, 43313, 6, 198, 2, 1675, 751, 257, 649, 1317, 2902, 2685, 11, 2099, 705, 2, 43313, 685, 4102, 2902, 49946, 198, 2, 43313, 198, 11748, 340, 861, 10141, 628, 198, 2, 43313, 198, 11748, ...
2.415902
327
import numpy as np from gym_collision_avoidance.envs.sensors.Sensor import Sensor from gym_collision_avoidance.envs.sensors.LaserScanSensor import LaserScanSensor from gym_collision_avoidance.envs.config import Config import math import pylab as pl import matplotlib.pyplot as plt import matplotlib.patches as patches im...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 11550, 62, 26000, 1166, 62, 27080, 590, 13, 268, 14259, 13, 82, 641, 669, 13, 47864, 1330, 35367, 198, 6738, 11550, 62, 26000, 1166, 62, 27080, 590, 13, 268, 14259, 13, 82, 641, 669, 13, 43,...
2.590659
364
__all__ = ['TokenCache'] from msal import SerializableTokenCache
[ 834, 439, 834, 796, 37250, 30642, 30562, 20520, 198, 198, 6738, 13845, 282, 1330, 23283, 13821, 30642, 30562, 628 ]
3.526316
19
from gui_view import GuiView gui = GuiView() window = gui.window window.mainloop()
[ 198, 6738, 11774, 62, 1177, 1330, 1962, 72, 7680, 628, 628, 198, 198, 48317, 796, 1962, 72, 7680, 3419, 198, 17497, 796, 11774, 13, 17497, 628, 198, 198, 17497, 13, 12417, 26268, 3419 ]
2.757576
33
from datetime import date ano = int(input('Digite o ano do seu nascimento: ')) ano_atual = date.today().year idade = ano_atual - ano if idade < 18: alistamento = 18 - idade print('Você ainda vai se alistar. \nFalta {} anos'.format(alistamento)) elif idade == 18: print('Está na hora de você se alis...
[ 6738, 4818, 8079, 1330, 3128, 201, 198, 201, 198, 5733, 796, 493, 7, 15414, 10786, 19511, 578, 267, 281, 78, 466, 384, 84, 299, 3372, 3681, 78, 25, 705, 4008, 201, 198, 5733, 62, 265, 723, 796, 3128, 13, 40838, 22446, 1941, 201, 1...
2.385027
187
#!/usr/bin/python3 import RPi.GPIO as GPIO import time import socket import requests import json outPin = 16 GPIO.setmode(GPIO.BCM) GPIO.setup(outPin, GPIO.OUT) time.sleep(2) GPIO.output(outPin, GPIO.LOW) GPIO.cleanup() GPIO.setmode(GPIO.BCM) GPIO.setup(outPin, GPIO.OUT) while True: time.sleep(1) try: ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, 11748, 640, 198, 11748, 17802, 198, 11748, 7007, 198, 11748, 33918, 198, 198, 448, 28348, 796, 1467, 198, 198, 16960, 9399, 13, 2617, 1...
2.103365
416
# Copyright 2021 wngfra. # SPDX-License-Identifier: Apache-2.0 import glob import os import re import numpy as np from bidict import bidict from numpy.lib.stride_tricks import sliding_window_view from torch.utils.data import Dataset class Texture: """ Create a bidict from a texture name list.""" """ Custom tra...
[ 2, 15069, 33448, 266, 782, 69, 430, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 11748, 15095, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 8406, 713, ...
3.098684
152
from distutils.core import setup setup(name='pyLucidIo', version='', description='', author='', url='', #py_modules=['lucidIo'], packages=['PbSignal'])
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 40406, 7, 3672, 11639, 9078, 22946, 312, 40, 78, 3256, 198, 220, 220, 220, 220, 220, 2196, 11639, 3256, 198, 220, 220, 220, 220, 220, 6764, 11639, 3256, 198, 220, 220, 220, 220, 220, 177...
2.123596
89
# Generated by Django 2.2.6 on 2022-01-14 03:53 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 21, 319, 33160, 12, 486, 12, 1415, 7643, 25, 4310, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from .fastLA import dist_both_comp from .fastLA import dist_one_comp_one_full from .fastLA import pairwise_l2_distances_with_self from .fastLA import pairwise_l2_distances_with_full from .fastLA import mahalanobis_distance_spherical from .fastLA import mahalanobis_distance_diagonal from .fastLA import pairwise_mahalano...
[ 6738, 764, 7217, 13534, 1330, 1233, 62, 16885, 62, 5589, 198, 6738, 764, 7217, 13534, 1330, 1233, 62, 505, 62, 5589, 62, 505, 62, 12853, 198, 6738, 764, 7217, 13534, 1330, 5166, 3083, 62, 75, 17, 62, 17080, 1817, 62, 4480, 62, 944, ...
3.080586
273
# Copyright 2017 Amazon.com, Inc. or its affiliates. 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. A copy of the License # is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file ac...
[ 2, 15069, 2177, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 11074, 921, 743, 407, 198, 2, 779, 428, 2393, ...
2.773632
402
from pathlib import Path import os import subprocess import sys # test sources SRC_DIR = Path(os.environ["SRC_DIR"]) TESTS = SRC_DIR / "src/tests" COV_THRESHOLD = 90 os.environ.update( # see https://github.com/CycloneDX/cyclonedx-python-lib/issues/202 PYTHONHASHSEED="0", # expects importable paths PYT...
[ 6738, 3108, 8019, 1330, 10644, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 198, 2, 1332, 4237, 198, 50, 7397, 62, 34720, 796, 10644, 7, 418, 13, 268, 2268, 14692, 50, 7397, 62, 34720, 8973, 8, 198, 51, 1546, 4...
2.138408
289
# Generated by Django 3.2.9 on 2021-11-02 23:14 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 24, 319, 33448, 12, 1157, 12, 2999, 2242, 25, 1415, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
sql_session = None connection_string = None db_schema = None
[ 25410, 62, 29891, 796, 6045, 198, 38659, 62, 8841, 796, 6045, 198, 9945, 62, 15952, 2611, 796, 6045, 198 ]
3.210526
19
import numpy as np import emcee import scipy.optimize as op import matplotlib.pyplot as plt import corner import os import scipy.stats as sstats # local imports import beer def lnlike(theta, model, x, y, yerr): """ The log likelihood function. """ return -np.nansum(0.5 * np.log([2 * np.pi] * len(y)))\ ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 795, 344, 68, 198, 11748, 629, 541, 88, 13, 40085, 1096, 355, 1034, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 5228, 198, 11748, 28686, 198, 11748, 629, 541, 88...
2.119869
1,218
import os import random import cv2 import numpy as np import torch from Experiments.all import load_models, embedd_data, save_batch from GenerativeModels.utils.data_utils import get_dataset device = torch.device("cuda") def sample_latent_neighbors(outputs_dir, models_dir): """Find nearest latent neighbors of d...
[ 11748, 28686, 198, 11748, 4738, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 198, 6738, 8170, 6800, 13, 439, 1330, 3440, 62, 27530, 11, 11525, 67, 62, 7890, 11, 3613, 62, 43501, 198, 6738, ...
2.571924
577
from inference import InferenceSystem from inference.utils import get_consequent_variable_names, flatten, get_root_variables
[ 6738, 32278, 1330, 554, 4288, 11964, 198, 6738, 32278, 13, 26791, 1330, 651, 62, 1102, 44399, 62, 45286, 62, 14933, 11, 27172, 268, 11, 651, 62, 15763, 62, 25641, 2977, 198 ]
4.032258
31
# coding=utf-8 from monitorrent.plugins.trackers import TrackerSettings from monitorrent.plugins.trackers.rutor import RutorOrgTracker from unittest import TestCase from tests import use_vcr
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 5671, 1156, 13, 37390, 13, 11659, 364, 1330, 26885, 26232, 198, 6738, 5671, 1156, 13, 37390, 13, 11659, 364, 13, 81, 38409, 1330, 21214, 273, 46808, 35694, 198, 6738, 555, 715, 395, 1330, 6208, ...
3.692308
52
from mxnet.gluon.data.vision import datasets from mxnet import image, nd m40_weights = {'laptop': 1.8137266353744221, 'airplane': 1.1240245821485455, 'bathtub': 2.031726749766898, 'bed': 1.1995863371024584, 'bench': 1.725646702694707, 'bookshelf': 1.158337840451145, 'bottle': 1.3844767003...
[ 6738, 285, 87, 3262, 13, 70, 2290, 261, 13, 7890, 13, 10178, 1330, 40522, 198, 6738, 285, 87, 3262, 1330, 2939, 11, 299, 67, 198, 198, 76, 1821, 62, 43775, 796, 1391, 6, 75, 45007, 10354, 352, 13, 23, 19708, 25540, 2327, 2718, 259...
1.912148
922
from collections import defaultdict class Cacheable(object): """ Use it as a Base class (inherit from it) to cache result of specific methods. """ @staticmethod if __name__ == '__main__': # Example of usage
[ 6738, 17268, 1330, 4277, 11600, 628, 198, 4871, 34088, 540, 7, 15252, 2599, 198, 220, 220, 220, 37227, 5765, 340, 355, 257, 7308, 1398, 357, 259, 372, 270, 422, 340, 8, 284, 12940, 1255, 286, 2176, 5050, 13, 37227, 628, 220, 220, 22...
3.343284
67
#!/usr/bin/env python3 # encoding: utf-8 import sys x = () y = () for _ in range(sys.getrecursionlimit()): x = (x,) y = (y,) if __name__ == '__main__': x == y
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 11748, 25064, 198, 198, 87, 796, 7499, 198, 88, 796, 7499, 198, 1640, 4808, 287, 2837, 7, 17597, 13, 1136, 8344, 24197, 32374, 3419, 2...
2.171053
76
""" By specifying the 'proxy' Meta attribute, model subclasses can specify that they will take data directly from the table of their base class table rather than using a new table of their own. This allows them to act as simple proxies, providing a modified interface to the data from the base class. """ from django.db ...
[ 37811, 198, 3886, 31577, 262, 705, 36436, 6, 30277, 11688, 11, 2746, 850, 37724, 460, 11986, 326, 198, 9930, 481, 1011, 1366, 3264, 422, 262, 3084, 286, 511, 2779, 1398, 3084, 2138, 198, 14813, 1262, 257, 649, 3084, 286, 511, 898, 13,...
3.298188
607
"""Queue microservice Revision ID: 3ec95baef9a7 Revises: 7dd63c947072 Create Date: 2022-05-18 19:09:22.564772 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '3ec95baef9a7' down_revision = '7dd63c947072' branch_labels =...
[ 37811, 34991, 4580, 15271, 198, 198, 18009, 1166, 4522, 25, 513, 721, 3865, 7012, 891, 24, 64, 22, 198, 18009, 2696, 25, 767, 1860, 5066, 66, 5824, 2154, 4761, 198, 16447, 7536, 25, 33160, 12, 2713, 12, 1507, 678, 25, 2931, 25, 1828...
2.562963
135
import functools import importlib if __name__ == "__main__": b = BaseObject() b.metadata['name'] = 'BaseObject' assert b.foo_plugin()['name'] == 'BaseObject'
[ 11748, 1257, 310, 10141, 198, 11748, 1330, 8019, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 275, 796, 7308, 10267, 3419, 198, 220, 275, 13, 38993, 17816, 3672, 20520, 796, 705, 14881, 10267, 6, 198, 2...
2.862069
58
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 13130, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846,...
3.456155
6,044
r""" Rewriting Aperghis Recitación 9. .. raw:: html <iframe width="560" height="315" src="https://www.youtube.com/embed/85CloE5kQLg" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> >>>...
[ 81, 37811, 198, 30003, 799, 278, 317, 525, 456, 271, 3311, 270, 32009, 18840, 860, 13, 628, 220, 220, 220, 11485, 8246, 3712, 27711, 628, 220, 220, 220, 220, 220, 220, 1279, 39621, 9647, 2625, 34135, 1, 6001, 2625, 27936, 1, 12351, ...
2.315885
12,150
import unittest from unittest.mock import MagicMock, patch, mock_open import bilby if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 11, 8529, 11, 15290, 62, 9654, 198, 198, 11748, 47027, 1525, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, ...
2.627451
51
import datetime import os import database from texttable import Texttable from datetime import date from datetime import datetime from datetime import timedelta
[ 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 6831, 198, 6738, 2420, 11487, 1330, 8255, 11487, 198, 6738, 4818, 8079, 1330, 3128, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 4818, 8079, 1330, 28805, 12514, 628, 628, 628, 198 ]
4.175
40
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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 # # U...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 1946, 12, 7908, 383, 9485, 6173, 37, 34152, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, ...
3.471311
244
from django.contrib import admin from django.contrib.gis.admin import OSMGeoAdmin from .models import Location @admin.register(Location)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 70, 271, 13, 28482, 1330, 7294, 44, 10082, 78, 46787, 198, 6738, 764, 27530, 1330, 13397, 628, 198, 31, 28482, 13, 30238, 7, 14749, 8, 628 ]
3.333333
42
import os import unittest import subprocess import yaml from . import helpers
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 11748, 850, 14681, 198, 198, 11748, 331, 43695, 198, 198, 6738, 764, 1330, 49385, 628 ]
3.521739
23
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Download CONLL2003 data""" import os import requests from tqdm import tqdm from appdirs import user_cache_dir URLS = [ [ 'conll2003_eng_train.txt', 'https://raw.githubusercontent.com/deepdialog/NER-datasets/master/CONLL2003/train.txt' ], [ ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 10002, 7102, 3069, 16088, 1366, 37811, 198, 198, 11748, 28686, 198, 11748, 7007, 198, 6738, 256, 80, 36020, ...
1.822593
1,257
import json from typing import Type, Any def version_1_to_2(old_version: dict) -> dict: """ Upgrades a version 1 config object to version 2 :param old_version: :return: """ # Late import to avoid circular references from modules.combat import Loadout old_version["version"] = 2 ...
[ 11748, 33918, 198, 6738, 19720, 1330, 5994, 11, 4377, 628, 628, 198, 198, 4299, 2196, 62, 16, 62, 1462, 62, 17, 7, 727, 62, 9641, 25, 8633, 8, 4613, 8633, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3205, 31177, 257, 2196, ...
2.378819
491
import pandas as pd import numpy as np import datetime as dt import nltk import sklearn.preprocessing import sklearn.model_selection import re
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4818, 8079, 355, 288, 83, 198, 11748, 299, 2528, 74, 198, 11748, 1341, 35720, 13, 3866, 36948, 198, 11748, 1341, 35720, 13, 19849, 62, 49283, 198, 11748, ...
3.104167
48
""" FactSet Estimates Gain access to 20+ years of comprehensive estimates and statistics of over 250+ estimated metrics, including financial statement items, product segments, geosegments, and industry metrics. FactSet's consensus estimates are aggregated from a wide base of over 800+ contributors and cover ov...
[ 37811, 198, 220, 220, 220, 19020, 7248, 47052, 628, 220, 220, 220, 21686, 1895, 284, 1160, 10, 812, 286, 9815, 7746, 290, 7869, 286, 625, 8646, 10, 6108, 20731, 11, 1390, 3176, 2643, 3709, 11, 1720, 17894, 11, 4903, 577, 11726, 11, ...
2.614389
10,897
import os import tempfile import gtts from naomi import plugin class GoogleTTSPlugin(plugin.TTSPlugin): """ Uses the Google TTS online translator Requires pymad and gTTS to be available """
[ 11748, 28686, 198, 11748, 20218, 7753, 198, 11748, 308, 83, 912, 198, 6738, 12385, 12753, 1330, 13877, 628, 198, 4871, 3012, 51, 4694, 37233, 7, 33803, 13, 51, 4694, 37233, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 36965, 2...
3.058824
68