content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import logging import sys from functools import partial import numpy as np import tqdm from sklearn.base import ( BaseEstimator, ClusterMixin, TransformerMixin, clone, ) from sklearn.utils.validation import check_is_fitted from divik.cluster._kmeans._core import KMeans from divik.core import configura...
[ 11748, 18931, 198, 11748, 25064, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 256, 80, 36020, 198, 6738, 1341, 35720, 13, 8692, 1330, 357, 198, 220, 220, 220, 7308, 22362, 320, 1352, 11,...
2.366637
2,272
import sys from pylint.reporters.text import TextReporter class GithubReporter(TextReporter): """Report messages and layouts.""" SEVERITY_MAPPING = { "I": "info", "C": "info", "R": "info", "W": "warning", "E": "error", "F": "error", } def register(linter...
[ 11748, 25064, 198, 198, 6738, 279, 2645, 600, 13, 260, 1819, 1010, 13, 5239, 1330, 8255, 6207, 4337, 628, 198, 4871, 38994, 6207, 4337, 7, 8206, 6207, 4337, 2599, 198, 220, 220, 220, 37227, 19100, 6218, 290, 38489, 526, 15931, 628, 22...
2.322404
183
from challenge.agoda_cancellation_estimator import AgodaCancellationEstimator from IMLearn.utils import split_train_test from sklearn.model_selection import train_test_split import numpy as np import pandas as pd LABEL = "cancellation_datetime" DATES = ["booking_datetime", "checkin_date", "checkout_date"] DUMMIES = [...
[ 6738, 4427, 13, 363, 11329, 62, 66, 590, 297, 341, 62, 395, 320, 1352, 1330, 2449, 11329, 34, 590, 297, 341, 22362, 320, 1352, 198, 6738, 314, 5805, 451, 77, 13, 26791, 1330, 6626, 62, 27432, 62, 9288, 198, 6738, 1341, 35720, 13, ...
2.680976
1,188
#!/usr/bin/env python3 # This scripts attempts to extract relevant data from a completed flow design # and save it into a "metadata.json". It achieves this by looking for specific # information in specific files using regular expressions #------------------------------------------------------------------------------- ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 770, 14750, 6370, 284, 7925, 5981, 1366, 422, 257, 5668, 5202, 1486, 198, 2, 290, 3613, 340, 656, 257, 366, 38993, 13, 17752, 1911, 632, 41885, 428, 416, 2045, 329, 2176,...
2.704071
1,007
import datetime import string import re from fixyourstreet_data.models.location import Location from fixyourstreet_data.models.generic import ( GenericObject, GenericObjects, )
[ 11748, 4818, 8079, 198, 11748, 4731, 198, 11748, 302, 198, 198, 6738, 4259, 14108, 25662, 62, 7890, 13, 27530, 13, 24886, 1330, 13397, 198, 6738, 4259, 14108, 25662, 62, 7890, 13, 27530, 13, 41357, 1330, 357, 198, 220, 220, 220, 42044, ...
3.418182
55
#!/usr/bin/snimpy """ Get serial number of a given equipment using ENTITY-MIB """ from __future__ import print_function import sys load("ENTITY-MIB") host=sys.argv[1] s = M(host=host, community=sys.argv[2]) # Locate parent of all other elements print("[-] %s: Search for parent element" % host) parent = None for i...
[ 2, 48443, 14629, 14, 8800, 14, 16184, 320, 9078, 198, 198, 37811, 198, 3855, 11389, 1271, 286, 257, 1813, 5112, 1262, 47353, 9050, 12, 8895, 33, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 250...
2.053571
448
from flask import Flask, request, send_from_directory from pystache import Renderer from os import makedirs from shutil import rmtree from pathlib import Path class StockMidiCvException(Exception): """ExceptionClass""" class FlaskException(StockMidiCvException): """This is what happens when flask fails""" ...
[ 6738, 42903, 1330, 46947, 11, 2581, 11, 3758, 62, 6738, 62, 34945, 198, 6738, 12972, 301, 4891, 1330, 28703, 11882, 198, 6738, 28686, 1330, 285, 4335, 17062, 198, 6738, 4423, 346, 1330, 374, 16762, 631, 198, 6738, 3108, 8019, 1330, 1064...
2.64105
1,067
#!/usr/bin/env python #-*- coding:utf-8 -*- ''' @file tocb.py @brief copy text from stdin to system clipboard. @author hulei @version 1.0 @date 2012-09-05 @copyright 2012 Hulei. All rights reserved. ''' import sys import hlutils if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 31, 7753, 284, 21101, 13, 9078, 198, 31, 65, 3796, 4866, 2420, 422, 14367, 259, 284, 1080, 47999, 13, 198, ...
2.490741
108
from unittest import TestCase from surfactant_example.simulation.simulation_utilities import ( calculate_n_mols )
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 9053, 529, 415, 62, 20688, 13, 14323, 1741, 13, 14323, 1741, 62, 315, 2410, 1330, 357, 198, 220, 220, 220, 15284, 62, 77, 62, 76, 10220, 198, 8, 628 ]
3.076923
39
import unittest from querio.ml.prediction import Prediction
[ 11748, 555, 715, 395, 198, 198, 6738, 42517, 952, 13, 4029, 13, 28764, 2867, 1330, 46690, 628 ]
3.647059
17
from templeplus.pymod import PythonModifier from toee import * import tpdp from utilities import * import spell_utils print "Registering sp-Ironguts" irongutsSpell = PythonModifier("sp-Ironguts", 2) # spell_id, duration irongutsSpell.AddHook(ET_OnSaveThrowLevel, EK_SAVE_FORTITUDE, irongutsSpellBonusToPoisonSaves,()) #...
[ 6738, 12505, 9541, 13, 9078, 4666, 1330, 11361, 5841, 7483, 198, 6738, 284, 1453, 1330, 1635, 198, 11748, 256, 79, 26059, 198, 6738, 20081, 1330, 1635, 198, 11748, 4822, 62, 26791, 198, 4798, 366, 38804, 278, 599, 12, 23820, 506, 5500, ...
2.830028
353
import time # GAME INTRODUCTION print('Welcome to the Black Jack Game!\n') print() play_again = True # GAME STARTS rounds = 0 player_wins = 0 dealer_wins = 0 draws = 0 while play_again: time.sleep(1) rounds += 1 deck = Deck() deck.shuffle() player_hand = Hand() computer...
[ 201, 198, 201, 198, 11748, 640, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 2, 30517, 3268, 5446, 28644, 2849, 201, 198, 4798, 10786, 14618, 284, 262, 2619, 3619, 3776, 0, 59...
2.241181
1,219
from __future__ import print_function, division from sympy import * a, s, t, u, v, w, x, y, z = symbols("a, s, t, u, v, w, x, y, z") k, m, n = symbols("k, m, n", integer=True) f, g, h = symbols("f, g, h", cls=Function) init_printing()
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 198, 6738, 10558, 88, 1330, 1635, 198, 64, 11, 264, 11, 256, 11, 334, 11, 410, 11, 266, 11, 2124, 11, 331, 11, 1976, 796, 14354, 7203, 64, 11, 264, 11, 256, 11, 334, 11, ...
2.34
100
''' MODULE DS ''' import unittest import django-eveonline-appraisal class TestDjango-Eveonline-Appraisal(unittest.TestCase): ''' CLASS DS ''' def setUp(self): ''' DS ''' pass def test_placeholder(self): ''' DS ''' self.assertEqual(...
[ 7061, 6, 198, 33365, 24212, 17400, 198, 7061, 6, 198, 198, 11748, 555, 715, 395, 198, 11748, 42625, 14208, 12, 44655, 25119, 12, 1324, 430, 28456, 628, 198, 4871, 6208, 35, 73, 14208, 12, 36, 303, 25119, 12, 4677, 430, 28456, 7, 403...
1.903553
197
"""zabbix_protocol """ __version__ = "0.0.1"
[ 37811, 89, 6485, 844, 62, 11235, 4668, 201, 198, 201, 198, 37811, 201, 198, 834, 9641, 834, 796, 366, 15, 13, 15, 13, 16, 1 ]
1.92
25
# coding: utf-8 """ 测试包含: 1. 列表页wzws_cid(列表页wzws_cid可绕过(截止至2019.04.30),headers中加入 X-Requested-With: XMLHttpRequest 即可) 2. 详情页wzws_cid(详情页wzws_cid也是可以绕过的(截止至2019.04.30),请求method改为POST 即可) """ import unittest import requests from wenshu_utils.vl5x.args import Vl5x, Number, Guid from wenshu_utils.wzws.decrypt import wzw...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 37811, 198, 38184, 233, 46237, 243, 44293, 227, 28938, 104, 25, 198, 16, 13, 10263, 230, 245, 26193, 101, 165, 94, 113, 86, 89, 18504, 62, 66, 312, 7, 26344, 245, 26193, 101, 165, 94, 113, 86...
1.496063
254
#!/usr/bin/env python # automatic execution of HPC exercises import shutil, sys, os, re, glob counter = 0 def edit(from_to, filename='F77WAVE.fcp'): """ substitute (from,to) in from_to list, e.g. edit((r'from',r'to')) """ shutil.copy(filename + ".orig", filename) f = open(filename, 'r') f...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 11353, 9706, 286, 367, 5662, 13565, 198, 198, 11748, 4423, 346, 11, 25064, 11, 28686, 11, 302, 11, 15095, 198, 198, 24588, 796, 657, 198, 198, 4299, 4370, 7, 6738, 62, 1462, 11, ...
2.388889
630
# Generated by Django 4.0 on 2021-12-24 13:30 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 604, 13, 15, 319, 33448, 12, 1065, 12, 1731, 1511, 25, 1270, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.892857
28
from django.contrib.postgres import fields as psql_fields from django.db import migrations from django.db import models
[ 6738, 42625, 14208, 13, 3642, 822, 13, 7353, 34239, 1330, 7032, 355, 279, 25410, 62, 25747, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 628 ]
3.558824
34
from django import template register=template.Library() @register.filter(name='dict_value')
[ 6738, 42625, 14208, 1330, 11055, 628, 198, 30238, 28, 28243, 13, 23377, 3419, 198, 198, 31, 30238, 13, 24455, 7, 3672, 11639, 11600, 62, 8367, 11537 ]
3.615385
26
import datetime import os from rlpyt.envs.atari.atari_env import AtariEnv, AtariTrajInfo from rlpyt.runners.minibatch_rl import MinibatchRlEval, MinibatchRl from rlpyt.samplers.serial.sampler import SerialSampler from rlpyt.utils.logging.context import logger_context from dreamer.agents.atari_dreamer_agent import Ata...
[ 11748, 4818, 8079, 198, 11748, 28686, 198, 198, 6738, 374, 75, 9078, 83, 13, 268, 14259, 13, 35554, 13, 35554, 62, 24330, 1330, 35884, 4834, 85, 11, 35884, 15721, 73, 12360, 198, 6738, 374, 75, 9078, 83, 13, 36740, 13, 1084, 571, 96...
2.348485
594
#!/usr/bin/env python """\ Logging Statement Modifier - replace logging calls with pass (or vice versa) Author: David Underhill <dgu@cs.stanford.edu> Version: 1.00 (06-Feb-2010) This script parses a Python file and comments out logging statements, replacing them with a pass statement (or vice versa). The purpose of ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 59, 198, 11187, 2667, 21983, 3401, 7483, 532, 6330, 18931, 3848, 351, 1208, 357, 273, 7927, 25470, 8, 198, 13838, 25, 3271, 4698, 12639, 1279, 67, 5162, 31, 6359, 13, 14192...
2.683825
5,731
from corehq.apps.users.models import CommCareCase
[ 6738, 4755, 71, 80, 13, 18211, 13, 18417, 13, 27530, 1330, 1520, 17784, 20448, 628, 198 ]
3.25
16
from django.conf.urls import url from user import views urlpatterns = [ url('^register/$', views.register, name='register'), url('^register_handler/$', views.register_handler, name='register_handler'), url('^login/$', views.login, name='login'), url('^login_handler/$', views.login_handler, name='login_...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 2836, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 10786, 61, 30238, 32624, 3256, 5009, 13, 30238, 11, 1438, 11639, 30238, 33809, 198, ...
2.953846
130
""" Structure for parsed as dict request or response syntax values. """ from typing import Any, Dict, List, Optional from mypy_boto3_builder.import_helpers.import_string import ImportString from mypy_boto3_builder.logger import get_logger from mypy_boto3_builder.service_name import ServiceName from mypy_boto3_builder....
[ 37811, 198, 1273, 5620, 329, 44267, 355, 8633, 2581, 393, 2882, 15582, 3815, 13, 198, 37811, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 32233, 198, 198, 6738, 616, 9078, 62, 65, 2069, 18, 62, 38272, 13, 11748, 62, 167...
3.114286
350
# -*- coding: utf-8 -*- """ flask_security.script ~~~~~~~~~~~~~~~~~~~~~ Flask-Security script module :copyright: (c) 2012 by Matt Wright. :license: MIT, see LICENSE for more details. """ from __future__ import print_function import re import warnings from flask import current_app from flask_scri...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 42903, 62, 12961, 13, 12048, 198, 220, 220, 220, 220, 27156, 8728, 93, 628, 220, 220, 220, 46947, 12, 24074, 4226, 8265, 628, 220, 220, 220,...
2.913201
553
import os import pdb log_dir='logs' sub_dir_list = os.listdir(log_dir) sub_dir_list = sorted(sub_dir_list) for sub_dir in sub_dir_list: full_dir = os.path.join(log_dir, sub_dir) fn_list = os.listdir(full_dir) valid_flag = False for fn in fn_list: if '.pt' in fn: valid_flag = True ...
[ 11748, 28686, 198, 11748, 279, 9945, 198, 198, 6404, 62, 15908, 11639, 6404, 82, 6, 198, 7266, 62, 15908, 62, 4868, 796, 28686, 13, 4868, 15908, 7, 6404, 62, 15908, 8, 198, 7266, 62, 15908, 62, 4868, 796, 23243, 7, 7266, 62, 15908, ...
1.995475
221
from django.db import models from core.metamodels import ( ArchivedModel, IsActiveModel, ) # Account codes from Treasury # the following table could be normalised more, but I don't think it matters
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 4755, 13, 4164, 321, 375, 1424, 1330, 357, 198, 220, 220, 220, 5579, 1572, 17633, 11, 198, 220, 220, 220, 1148, 13739, 17633, 11, 198, 8, 628, 198, 2, 10781, 12416, 422, 1341...
3.307692
65
from collections import Counter from bs4 import BeautifulSoup from markdown import markdown import re def get_fonts_ids(file, page_number): """Gives all fonts of a file (page_number = 0) or by page if specified""" fonts_ids = [] for page in file['pages']: if len(page['elements']) > 0 and (page_num...
[ 6738, 17268, 1330, 15034, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 1317, 2902, 1330, 1317, 2902, 198, 11748, 302, 628, 198, 4299, 651, 62, 10331, 82, 62, 2340, 7, 7753, 11, 2443, 62, 17618, 2599, 198, 220, 220, 220...
2.578717
686
######################### ## ## ## Irving Gomez Mendez ## ## October 17, 2021 ## ## ## ######################### import numpy as np import readline import matplotlib.animation as anim import matplotlib.pyplot as plt if __name__ == "__main__": main() ###
[ 14468, 7804, 2, 198, 2235, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22492, 198, 2235, 26101, 33231, 20442, 8471, 22492, 198, 2235, 220, 3267, 1596, 11, 33448, 220, 220, 2249...
2.428571
126
import os from discord import opus from utils.logger import log OPUS_LIBS = ["libopus-0.x86.dll", "libopus-0.x64.dll", "libopus-0.dll", "libopus.so.0", "libopus.0.dylib"]
[ 11748, 28686, 198, 198, 6738, 36446, 1330, 1034, 385, 198, 6738, 3384, 4487, 13, 6404, 1362, 1330, 2604, 198, 198, 3185, 2937, 62, 31271, 4462, 796, 14631, 8019, 25790, 12, 15, 13, 87, 4521, 13, 12736, 1600, 366, 8019, 25790, 12, 15, ...
2.369863
73
from distutils.core import setup, Extension from Cython.Build import cythonize compile_args = ['-g', '-std=c++11'] ext = Extension( name="playlist_wrapper", sources=["playlist_wrapper.pyx", "cpp/Playlist.cpp"], language="c++", include_dirs=["cpp"], extra_compile_args=compile_args ) setup(ext...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 11, 27995, 198, 6738, 327, 7535, 13, 15580, 1330, 3075, 400, 261, 1096, 198, 198, 5589, 576, 62, 22046, 796, 685, 29001, 70, 3256, 705, 12, 19282, 28, 66, 4880, 1157, 20520, 198, 198, 2302, 7...
2.529412
136
"""data utils of this language model: corpus reader and noise data generator""" import os import torch from torch.utils.data.dataset import Dataset from torch.utils.data.dataloader import DataLoader from torch.nn.utils.rnn import pad_sequence from tqdm import tqdm from vocab import get_vocab, BOS, EOS class LMData...
[ 37811, 7890, 3384, 4487, 286, 428, 3303, 2746, 25, 35789, 9173, 290, 7838, 1366, 17301, 37811, 198, 198, 11748, 28686, 198, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 13, 19608, 292, 316, 1330, 16092, 292, 316, 198, 6738,...
2.599265
816
import unittest from rdflib import Graph, Namespace from linkml.generators.jsonldgen import JSONLDGenerator from linkml.generators.rdfgen import RDFGenerator from linkml_runtime.linkml_model.meta import LINKML from tests.utils.test_environment import TestEnvironmentTestCase from tests.test_issues.environment import e...
[ 11748, 555, 715, 395, 198, 198, 6738, 374, 67, 2704, 571, 1330, 29681, 11, 28531, 10223, 198, 198, 6738, 2792, 4029, 13, 8612, 2024, 13, 17752, 335, 5235, 1330, 19449, 11163, 8645, 1352, 198, 6738, 2792, 4029, 13, 8612, 2024, 13, 4372...
2.971154
208
from typing import List from libs.base import BasePage from libs.base import Locator from selenium.webdriver.common.by import By from selenium.webdriver.remote.webelement import WebElement as RemoteWebElement from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_condi...
[ 6738, 19720, 1330, 7343, 198, 198, 6738, 9195, 82, 13, 8692, 1330, 7308, 9876, 198, 6738, 9195, 82, 13, 8692, 1330, 15181, 1352, 198, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 1525, 1330, 2750, 198, 6738, 384, 1192...
3.580645
93
try: from setuptools import setup, Extension use_setuptools = True print('setuptools is used') except ImportError: from distutils.core import setup, Extension use_setuptools = False print('distutils is used') import numpy include_dirs_numpy = [numpy.get_include()] if check_compiler() == 'c...
[ 28311, 25, 198, 220, 220, 220, 422, 900, 37623, 10141, 1330, 9058, 11, 27995, 198, 220, 220, 220, 779, 62, 2617, 37623, 10141, 796, 6407, 198, 220, 220, 220, 3601, 10786, 2617, 37623, 10141, 318, 973, 11537, 198, 16341, 17267, 12331, ...
1.877631
1,283
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- from ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 6127, 7560, 416, 5413, 357, 49, 8, 11160, 19452, 6127, 35986, 13, 198, 2, 19179, 743, 2728, 11491, 4069, 290, 481, 307, 2626, 611, 262, 2438, 318, 198, 2, 16935, 515, 13, ...
2.557824
21,358
from unittest import mock import unittest import datetime from mlctl.plugins.sagemaker.SagemakerHosting import SagemakerHosting import boto3 from botocore.stub import Stubber import botocore.session import json import botocore
[ 6738, 555, 715, 395, 1330, 15290, 198, 11748, 555, 715, 395, 198, 11748, 4818, 8079, 198, 6738, 25962, 34168, 13, 37390, 13, 82, 363, 32174, 13, 50, 363, 32174, 17932, 278, 1330, 25605, 32174, 17932, 278, 198, 11748, 275, 2069, 18, 19...
3.352941
68
import numpy as np import torch from torch import nn, optim from torch.utils.data import Dataset, DataLoader from torch.distributions import Categorical, Normal, Beta from tqdm import tqdm from time import time import pdb from datetime import datetime from ViperEnvironment import ViperEnvironment device = 'cuda' # i...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 11, 6436, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 11, 6060, 17401, 198, 6738, 28034, 13, 17080, 2455, 507, 1330, 327, 2397, 12409, ...
3.404908
163
from py42 import settings from py42.exceptions import Py42BadRequestError from py42.exceptions import Py42CaseNameExistsError from py42.exceptions import Py42DescriptionLimitExceededError from py42.exceptions import Py42InvalidCaseUserError from py42.exceptions import Py42UpdateClosedCaseError from py42.services import...
[ 6738, 12972, 3682, 1330, 6460, 198, 6738, 12972, 3682, 13, 1069, 11755, 1330, 9485, 3682, 22069, 18453, 12331, 198, 6738, 12972, 3682, 13, 1069, 11755, 1330, 9485, 3682, 20448, 5376, 3109, 1023, 12331, 198, 6738, 12972, 3682, 13, 1069, 11...
3.68932
103
from husky_ur5 import * from copy import deepcopy import json import time import random start = time.time() # goal_file = "jsons/home_goals/goal3.json" goal_file = args.goal # world_id = 0 ## FINAL TESTING: # AFP: Done, ABP: Done, FP: Done, BP: Done state = getCurrentState() # state = getWorldState(world_id) print('...
[ 6738, 4791, 2584, 62, 333, 20, 1330, 1635, 198, 6738, 4866, 1330, 2769, 30073, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 4738, 198, 198, 9688, 796, 640, 13, 2435, 3419, 198, 2, 3061, 62, 7753, 796, 366, 8457, 684, 14, 11195, 6...
3.339506
324
""" File Name: test_get_torch_optimizer.py Project: dl-project-template File Description: """ import inspect import unittest from typing import Tuple, Iterable, List, Dict, Any import torch from src.optimization import \ Optimizer, is_torch_optimizer_class, get_torch_optimizer _PARAMETER_T...
[ 37811, 198, 8979, 6530, 25, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1332, 62, 1136, 62, 13165, 354, 62, 40085, 7509, 13, 9078, 198, 16775, 25, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 75, 12, 16302, 12, 2...
2.036723
708
# Copyright 2019-2020 by Wenfeng Gao, MGLAND animation studio. All rights reserved. # This file is part of IUTest, and is released under the "MIT License Agreement". # Please see the LICENSE file that should have been included as part of this package. from iutest.core import importutils def runUi(modulePathOrDir=Non...
[ 2, 15069, 13130, 12, 42334, 416, 31164, 69, 1516, 402, 5488, 11, 337, 8763, 6981, 11034, 8034, 13, 1439, 2489, 10395, 13, 198, 2, 770, 2393, 318, 636, 286, 314, 3843, 395, 11, 290, 318, 2716, 739, 262, 366, 36393, 13789, 12729, 1911...
2.94898
490
import collections import heapq nums = [1,2,3,3,4,5] res = Solution().isPossible(nums) print(res)
[ 198, 11748, 17268, 198, 11748, 24575, 80, 628, 198, 198, 77, 5700, 796, 685, 16, 11, 17, 11, 18, 11, 18, 11, 19, 11, 20, 60, 198, 411, 796, 28186, 22446, 271, 47, 4733, 7, 77, 5700, 8, 198, 4798, 7, 411, 8 ]
2.348837
43
from random import randint if __name__ == '__main__': main()
[ 6738, 4738, 1330, 43720, 600, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.666667
27
import os, sys from collections import defaultdict, Counter sys.path.insert(0, str(os.path.dirname(os.path.realpath(__file__))) + "/../") from synonymes.mirnaID import miRNA, miRNAPART from textmining.MirGeneRelCheck import SentenceRelationChecker from utils.tmutils import normalize_gene_names scaiBase = "/mnt/d/...
[ 198, 11748, 28686, 11, 25064, 198, 6738, 17268, 1330, 4277, 11600, 11, 15034, 198, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 965, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 22305, 134...
1.882285
2,608
from setuptools import find_packages from distutils.core import setup packages = find_packages(exclude=('tests', 'doc')) provides = ['taurex_example_plugin', ] requires = [] install_requires = ['taurex', ] entry_points = {'taurex.plugins': 'example = taurex_example_plugin'} setup(name='taurex_example_plugin', ...
[ 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 198, 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 198, 43789, 796, 1064, 62, 43789, 7, 1069, 9152, 28, 10786, 41989, 3256, 705, 15390, 6, 4008, 198, 15234, 1460, 796, 37250, 8326, 495, ...
2.638298
235
"""Small example OSC server anbd client combined This program listens to serveral addresses and print if there is an input. It also transmits on a different port at the same time random values to different addresses. This can be used to demonstrate concurrent send and recieve over OSC """ import argparse import rando...
[ 37811, 18712, 1672, 440, 6173, 4382, 281, 17457, 5456, 5929, 198, 1212, 1430, 35019, 284, 4382, 282, 9405, 290, 3601, 611, 612, 318, 281, 5128, 13, 220, 198, 1026, 635, 21595, 896, 319, 257, 1180, 2493, 379, 262, 976, 640, 4738, 3815,...
3.190065
463
import requests
[ 11748, 7007, 628, 628 ]
4.75
4
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations
[ 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, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 628 ]
2.891892
37
from __future__ import annotations import os import logging import logging.config as logging_config import json from src.version_manager import AspiredModel # TODO test such that main file is used def setup_logging(path='data/config/logging.json'): """Setup logging configuration """ # value = os.getenv...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 18931, 13, 11250, 355, 18931, 62, 11250, 198, 198, 11748, 33918, 198, 6738, 12351, 13, 9641, 62, 37153, 1330, 1081, 6474, 17633, 628, 198, 198, ...
2.775
240
""" Tests the ci_testing add functionality """ import ci_testing as ct import pytest _add_tests = [(4, 3, 7), (5.3, 6.7, 12), ] @pytest.mark.parametrize("x,y,result", _add_tests)
[ 37811, 198, 51, 3558, 262, 269, 72, 62, 33407, 751, 11244, 198, 37811, 198, 198, 11748, 269, 72, 62, 33407, 355, 269, 83, 198, 11748, 12972, 9288, 198, 198, 62, 2860, 62, 41989, 796, 47527, 19, 11, 513, 11, 767, 828, 198, 220, 220...
1.981132
106
from typing import List import unrealsdk from .. import bl2tools # only for auto complete WeaponTypeDefinition = "WeaponTypeDefinition" BalanceDefinition = "BalanceDefinition" ManufacturerDefinition = "ManufacturerDefinition" ManufacturerGradeIndex = "ManufacturerGradeIndex" BodyPartDefinition = "BodyPartDefinition"...
[ 6738, 19720, 1330, 7343, 198, 198, 11748, 14880, 874, 34388, 198, 198, 6738, 11485, 1330, 698, 17, 31391, 198, 198, 2, 691, 329, 8295, 1844, 198, 27632, 6030, 36621, 796, 366, 27632, 6030, 36621, 1, 198, 45866, 36621, 796, 366, 45866, ...
3.055085
472
from django.db import models from django.conf import settings from src.apps.core.models.module_models import Module #from accounts.models import User # not sure this is needed User = settings.AUTH_USER_MODEL
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 6738, 12351, 13, 18211, 13, 7295, 13, 27530, 13, 21412, 62, 27530, 1330, 19937, 628, 198, 2, 6738, 5504, 13, 27530, 1330, 11787, 220, ...
3.55
60
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
2.965763
701
""" Structural CSP decomposition methods """ import itertools from collections import defaultdict from ..errors import TarskiError from ..syntax import CompoundFormula, Atom, Connective, Variable, Constant def compute_schema_constraint_hypergraph(action): """ Compute the constraint hypergraph corresponding to ...
[ 37811, 198, 32112, 1523, 327, 4303, 26969, 9150, 5050, 198, 37811, 198, 11748, 340, 861, 10141, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 6738, 11485, 48277, 1330, 309, 945, 4106, 12331, 198, 6738, 11485, 1837, 41641, 1330, 3082, 633...
2.848554
1,314
########################### # # #285 Pythagorean odds - Project Euler # https://projecteuler.net/problem=285 # # Code by Kevin Marciniak # ###########################
[ 14468, 7804, 21017, 198, 2, 198, 2, 1303, 26279, 48657, 363, 29456, 10402, 532, 4935, 412, 18173, 198, 2, 3740, 1378, 16302, 68, 18173, 13, 3262, 14, 45573, 28, 26279, 198, 2, 198, 2, 6127, 416, 7939, 13067, 5362, 461, 198, 2, 198, ...
3.553191
47
#Pacotes from rede.ips import * import os import sys from tkinter import * #Comandos
[ 2, 18844, 6421, 198, 6738, 21459, 13, 2419, 1330, 1635, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 198, 2, 5377, 392, 418, 628 ]
2.9
30
import numpy as np import tensorflow as tf # class E_encoder(tf.keras.Model):
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 11192, 273, 11125, 355, 48700, 201, 198, 201, 198, 2, 1398, 412, 62, 12685, 12342, 7, 27110, 13, 6122, 292, 13, 17633, 2599, 201, 198, 201, 198, 201, 198 ]
2.351351
37
# Copyright 2012-2016 Eric Ptak - trouch.com # Partly Copyright 2016 Andreas Riegg - t-h-i-n-x.net # # 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/li...
[ 2, 220, 220, 15069, 2321, 12, 5304, 7651, 34352, 461, 532, 4057, 354, 13, 785, 198, 2, 220, 220, 2142, 306, 15069, 1584, 33728, 371, 494, 1130, 532, 256, 12, 71, 12, 72, 12, 77, 12, 87, 13, 3262, 198, 2, 198, 2, 220, 220, 4996...
3.05291
378
""" Simple script to run a forward pass employing the Refiner on a SIXD dataset sample with a trained model. Usage: test_refinement.py [options] test_refinement.py -h | --help Options: -d --dataset=<string> Path to SIXD dataset -o --object=<string> Object to be evaluated [default: 02] -...
[ 37811, 198, 26437, 4226, 284, 1057, 257, 2651, 1208, 26490, 262, 6524, 7274, 319, 257, 311, 10426, 35, 27039, 6291, 351, 257, 8776, 2746, 13, 198, 198, 28350, 25, 198, 220, 1332, 62, 5420, 21828, 13, 9078, 685, 25811, 60, 198, 220, ...
2.310068
1,619
import torch import numpy as np from xgboost import XGBClassifier,XGBRegressor from collections import OrderedDict from XBNet.Seq import Seq class XBNETClassifier(torch.nn.Module): ''' XBNetClassifier is a model for classification tasks that tries to combine tree-based models with neural networks to create...
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2124, 70, 39521, 1330, 1395, 4579, 9487, 7483, 11, 55, 4579, 8081, 44292, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 1395, 33, 7934, 13, 4653, 80, 1330, 1001, ...
2.258371
2,628
""" Django settings for bigpandamon project running in a virtualenv on top of Django-1.6.1. only the directories for mod_wsgi configuration... """ ### VIRTUALENV VIRTUALENV_PATH = '/data/virtualenv/django1.6.1__python2.6.6__core' ### WSGI WSGI_PATH = VIRTUALENV_PATH + '/pythonpath'
[ 37811, 198, 35, 73, 14208, 6460, 329, 1263, 79, 392, 16487, 1628, 2491, 287, 257, 7166, 24330, 319, 1353, 286, 37770, 12, 16, 13, 21, 13, 16, 13, 198, 198, 8807, 262, 29196, 329, 953, 62, 18504, 12397, 8398, 986, 198, 198, 37811, ...
2.691589
107
import urllib.request import requests import re main()
[ 11748, 2956, 297, 571, 13, 25927, 201, 198, 11748, 7007, 201, 198, 11748, 302, 201, 198, 201, 198, 12417, 3419, 201, 198 ]
2.772727
22
n = int(input()) c = [] for i in range(n): c.append(int(input())) k = int(input()) for index, e in enumerate(c): for i in c[index:]: if e + i == k: print(str(e)+" "+str(i)) break
[ 77, 796, 493, 7, 15414, 28955, 201, 198, 66, 796, 17635, 201, 198, 1640, 1312, 287, 2837, 7, 77, 2599, 201, 198, 197, 66, 13, 33295, 7, 600, 7, 15414, 3419, 4008, 201, 198, 74, 796, 493, 7, 15414, 28955, 201, 198, 1640, 6376, 11...
2.010101
99
n = int(input()) hash = dict() for t in range(n): arr = input().split() x = arr[0] y = arr[1:] hash[x] = y name = input() val = hash[name] sum = 0.0 for x in val: sum += float(x) print("{0:.2f}".format(sum/3))
[ 77, 796, 493, 7, 15414, 28955, 198, 17831, 796, 8633, 3419, 198, 1640, 256, 287, 2837, 7, 77, 2599, 198, 220, 220, 220, 5240, 796, 5128, 22446, 35312, 3419, 198, 220, 220, 220, 2124, 796, 5240, 58, 15, 60, 198, 220, 220, 220, 331,...
2.052632
114
# coding=UTF-8 from cloudify import ctx from cloudify.exceptions import NonRecoverableError from subprocess import check_output, CalledProcessError ctx.logger.info("[fix_fqdn] FQDN") ctx.download_resource_and_render('templates/hosts', '/tmp/hosts') sudo('mv', '/tmp/hosts', '/etc/hosts')
[ 2, 19617, 28, 48504, 12, 23, 198, 198, 6738, 6279, 1958, 1330, 269, 17602, 198, 6738, 6279, 1958, 13, 1069, 11755, 1330, 8504, 6690, 2502, 540, 12331, 198, 6738, 850, 14681, 1330, 2198, 62, 22915, 11, 34099, 18709, 12331, 628, 628, 19...
2.854369
103
# Python Program To Convert The Elements Of Two Lists Into Key-Value Pairs Of A Dictionary ''' Function Name : Convert Elements Of 2 Lists Into Key-Value Pairs. Function Date : 13 Sep 2020 Function Author : Prasad Dangare Input : String Output : String ''' countries = ["USA"...
[ 2, 11361, 6118, 1675, 38240, 383, 26632, 3226, 4930, 44968, 20008, 7383, 12, 11395, 350, 3468, 3226, 317, 28261, 201, 198, 201, 198, 7061, 6, 201, 198, 22203, 6530, 220, 220, 220, 1058, 220, 38240, 26632, 3226, 362, 44968, 20008, 7383, ...
2.433824
272
#!/usr/bin/env python3 import socket from _thread import * import re import copy from encrypt import * serverSocket: socket if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 17802, 198, 6738, 4808, 16663, 1330, 1635, 198, 11748, 302, 198, 11748, 4866, 198, 6738, 34117, 1330, 1635, 198, 198, 15388, 39105, 25, 17802, 628, 628, 198, 361, 11593, ...
3
56
# Sample Test passing with nose and pytest import unittest from mbar_pmf.calc_pmf import ReturnButt
[ 2, 27565, 6208, 6427, 351, 9686, 290, 12972, 9288, 198, 11748, 555, 715, 395, 198, 6738, 285, 5657, 62, 4426, 69, 13, 9948, 66, 62, 4426, 69, 1330, 8229, 1537, 83, 628, 198 ]
3.090909
33
from decorator import *
[ 6738, 11705, 1352, 1330, 1635, 198 ]
4
6
from __future__ import annotations from collections.abc import Iterator from typing import Any from datalabs import aggregating from explainaboard import feature, TaskType from explainaboard.info import SysOutputInfo from explainaboard.metric import AccuracyConfig, MetricConfig from explainaboard.processors.processo...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 17268, 13, 39305, 1330, 40806, 1352, 198, 6738, 19720, 1330, 4377, 198, 198, 6738, 4818, 282, 8937, 1330, 13262, 803, 198, 198, 6738, 4727, 397, 11953, 1330, 3895, 11, 15941, 6030, 1...
3.986928
153
from abc import ABC, abstractmethod
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396 ]
4.375
8
kENVIRONMENT_LOOKUP = { 'ACTION': 'String', 'ADDITIONAL_SDKS': 'String', 'ALTERNATE_GROUP': 'String', 'ALTERNATE_MODE': 'String', 'ALTERNATE_OWNER': 'String', 'ALTERNATE_PERMISSIONS_FILES': 'StringList', 'ALWAYS_SEARCH_USER_PATHS': 'Boolean', 'APPLE_INTERNAL_DEVELOPER_DIR': 'Path', ...
[ 74, 1677, 53, 4663, 1340, 10979, 62, 43, 15308, 8577, 796, 220, 1391, 198, 220, 220, 220, 705, 44710, 10354, 705, 10100, 3256, 198, 220, 220, 220, 705, 29266, 17941, 1847, 62, 10305, 27015, 10354, 705, 10100, 3256, 198, 220, 220, 220,...
2.042324
9,947
from django.urls import path from .views import * urlpatterns = [ path('login_api', LoginApi.as_view(), name="login_api"), path('gender_create_api', GenderCreateApi.as_view(), name='gender_create_api'), path('user_create_api', UserCreateApi.as_view(), name="user_create_api"), path('user_profile_api'...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 33571, 1330, 1635, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 38235, 62, 15042, 3256, 23093, 32, 14415, 13, 292, 62, 1177, 22784, 1438, 2625...
2.59736
303
import unittest from numpy import float32 from interpreter.classes import Declaration, Label from interpreter.exceptions import InvalidImmediate from interpreter.interpreter import Interpreter from interpreter.utility import align_address from settings import settings
[ 11748, 555, 715, 395, 198, 198, 6738, 299, 32152, 1330, 12178, 2624, 198, 198, 6738, 28846, 13, 37724, 1330, 24720, 11, 36052, 198, 6738, 28846, 13, 1069, 11755, 1330, 17665, 3546, 13857, 198, 6738, 28846, 13, 3849, 3866, 353, 1330, 422...
4.365079
63
#!/usr/bin/python3 # -*- encoding: utf-8 -*- ''' @File : trajectory.py @Time : 2019/12/15 @Author : Iydon Liang @Contact : liangiydon AT gmail.com @Docstring : Draw the picture of trajectories. @Require : Python==3.7.6; matplotlib==3.1.2;numpy==1.17.4 @Result : <pictures> ''' import numpy as np impo...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 31, 8979, 220, 220, 220, 220, 220, 1058, 22942, 13, 9078, 198, 31, 7575, 220, 220, 220, 220, 220, 1058, ...
1.871636
483
import tkinter from tkinter import * a=tkinter.Tk() a.title("Frame") b=Frame(width=200,height=200,highlightbackground="black",highlightthickness=3,bg="pink") b.grid(row=0,column=0,padx=10,pady=10,ipadx=20,ipady=20) b1=tkinter.Label(b,text="User Name :",pady=10,bg="pink",padx=13) b1.grid(row=0,column=0) c=tkinte...
[ 11748, 256, 74, 3849, 201, 198, 6738, 256, 74, 3849, 1330, 1635, 201, 198, 64, 28, 30488, 3849, 13, 51, 74, 3419, 201, 198, 64, 13, 7839, 7203, 19778, 4943, 201, 198, 65, 28, 19778, 7, 10394, 28, 2167, 11, 17015, 28, 2167, 11, 8...
2.014374
487
""" *Border-Width* """ from enum import Enum # [TODO] float is a placeholder, replace with measure
[ 37811, 628, 220, 220, 220, 1635, 34189, 12, 30916, 9, 198, 198, 37811, 198, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 2, 685, 51, 3727, 46, 60, 12178, 318, 257, 46076, 11, 6330, 351, 3953, 628 ]
2.918919
37
from thirdweb.constants.currency import ZERO_ADDRESS from thirdweb.types.nft import NFTMetadataInput from thirdweb.contracts import NFTCollection from thirdweb.core.sdk import ThirdwebSDK from brownie import accounts import pytest from thirdweb.types.settings.metadata import NFTCollectionContractMetadata @pytest.mar...
[ 6738, 2368, 12384, 13, 9979, 1187, 13, 34415, 1330, 1168, 34812, 62, 2885, 7707, 7597, 198, 6738, 2368, 12384, 13, 19199, 13, 77, 701, 1330, 399, 9792, 9171, 14706, 20560, 198, 6738, 2368, 12384, 13, 28484, 82, 1330, 41288, 4825, 349, ...
3.264706
136
from flask_wtf import FlaskForm from wtforms import StringField,SubmitField,PasswordField,BooleanField,TextAreaField,IntegerField from flask_wtf.file import FileField,FileAllowed from wtforms.validators import DataRequired,ValidationError,Length,Email,EqualTo,Regexp,Required from counselling.model import User from...
[ 6738, 42903, 62, 86, 27110, 1330, 46947, 8479, 201, 198, 6738, 266, 83, 23914, 1330, 10903, 15878, 11, 45135, 15878, 11, 35215, 15878, 11, 46120, 13087, 15878, 11, 8206, 30547, 15878, 11, 46541, 15878, 201, 198, 6738, 42903, 62, 86, 271...
3.206612
121
#coding=utf-8 import pandas as pd import numpy as np from keras.models import Sequential from keras.layers.core import Dense, Dropout, Activation from keras.optimizers import SGD, Adam, RMSprop from keras.utils import np_utils from sklearn.cross_validation import train_test_split from sklearn.grid_search import...
[ 2, 66, 7656, 28, 40477, 12, 23, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 41927, 292, 13, 27530, 1330, 24604, 1843, 201, 198, 6738, 41927, 292, 13, 75, 6962, 13, 7295, 1330, ...
2.237826
883
from django.urls import path from django.conf.urls import url from rest_framework.routers import DefaultRouter from .views import (BankView, BankCustomerJoinView, ApproveRetrieveCustomerView, PaymentView) router = DefaultRouter() router.register(r'banks', BankView, basename='banks') urlpatterns =...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 1334, 62, 30604, 13, 472, 1010, 1330, 15161, 49, 39605, 198, 6738, 764, 33571, 1330, 357, 28650, 7680, 11, 5018, 4...
2.650442
226
def hamming(n): """Returns the nth hamming number""" hamming = [1] x = 1 while len(hamming) <= n * 3.5: new_hamming = [] print(len(hamming)) length = len(hamming) s = hamming if length >= 1000: s = hamming[int(length / 2) : length] for i in s...
[ 4299, 8891, 2229, 7, 77, 2599, 198, 220, 220, 220, 37227, 35561, 262, 299, 400, 8891, 2229, 1271, 37811, 198, 220, 220, 220, 8891, 2229, 796, 685, 16, 60, 198, 220, 220, 220, 2124, 796, 352, 198, 220, 220, 220, 981, 18896, 7, 2763...
2.041783
359
import argparse import json import os.path import re from retry import retry from pyinstapaper import instapaper instapaper.REQUEST_DELAY_SECS = 0 from pyinstapaper.instapaper import Instapaper @retry(delay=1, backoff=2, tries=3)
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 28686, 13, 6978, 198, 11748, 302, 198, 198, 6738, 1005, 563, 1330, 1005, 563, 198, 6738, 12972, 8625, 499, 2136, 1330, 916, 499, 2136, 198, 8625, 499, 2136, 13, 2200, 35780, 62, 35, 3...
2.829268
82
################################################################################ # # vBrainDynaAvoid.py # """ Circling Dynamic Avoidance Virtual Brain Module. The objective of the DynaAvoidBrain is to travel in a circle of a specified radius (the target, albeit moving) while avoiding any obstacles. The robot under ...
[ 29113, 29113, 14468, 198, 2, 198, 2, 410, 44687, 35, 46434, 38618, 13, 9078, 198, 2, 198, 198, 37811, 21239, 8493, 26977, 24390, 590, 15595, 14842, 19937, 13, 198, 198, 464, 9432, 286, 262, 39530, 64, 38618, 44687, 318, 284, 3067, 287...
2.254299
18,899
""" Indication callback function for testing pywbemlistener, that fails to import with an ImportError. """ raise ImportError("ImportError")
[ 37811, 198, 5497, 3299, 23838, 2163, 329, 4856, 12972, 39346, 368, 4868, 877, 11, 326, 10143, 284, 1330, 198, 4480, 281, 17267, 12331, 13, 198, 37811, 198, 198, 40225, 17267, 12331, 7203, 20939, 12331, 4943, 198 ]
3.916667
36
#!/usr/bin/env python3 import os from orangeshare.__main__ import main if __name__ == '__main__': os.chdir(os.path.join(os.path.abspath(os.path.dirname(__file__)), "orangeshare")) main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 28686, 198, 198, 6738, 393, 648, 5069, 533, 13, 834, 12417, 834, 1330, 1388, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 28686, ...
2.357143
84
import pickle import sys filename = sys.argv[1] infile = open(filename,'rb') new_dict = pickle.load(infile) infile.close() print(new_dict)
[ 11748, 2298, 293, 198, 11748, 25064, 628, 198, 34345, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 198, 259, 7753, 796, 1280, 7, 34345, 4032, 26145, 11537, 198, 3605, 62, 11600, 796, 2298, 293, 13, 2220, 7, 259, 7753, 8, 198, 259, 77...
2.571429
56
import clr import os from fisher_py.net_wrapping.net_wrapper_base import NetWrapperBase # access .net standard dlls dll_path = os.path.join(os.path.split(__file__)[0], '..', 'dll') clr.AddReference('System') clr.AddReference('System.Core') clr.AddReference('System.Data') clr.AddReference('System.Configuration') clr.A...
[ 11748, 537, 81, 198, 11748, 28686, 198, 6738, 17685, 62, 9078, 13, 3262, 62, 29988, 2105, 13, 3262, 62, 48553, 62, 8692, 1330, 3433, 36918, 2848, 14881, 628, 198, 2, 1895, 764, 3262, 3210, 288, 297, 82, 198, 12736, 62, 6978, 796, 28...
2.938976
508
import sys C = int(input()) nml = [0, 0, 0] for _ in range(C): tmp = list(map(int, input().split())) tmp.sort() nml[0] = max(nml[0], tmp[0]) nml[1] = max(nml[1], tmp[1]) nml[2] = max(nml[2], tmp[2]) print(nml[0]*nml[1]*nml[2])
[ 11748, 25064, 628, 198, 198, 34, 796, 493, 7, 15414, 28955, 198, 77, 4029, 796, 685, 15, 11, 657, 11, 657, 60, 198, 1640, 4808, 287, 2837, 7, 34, 2599, 198, 220, 220, 220, 45218, 796, 1351, 7, 8899, 7, 600, 11, 5128, 22446, 3531...
1.8
140
""" This module contains the illiterate CLI application. The CLI application is basically a [Typer](https://typer.tiangolo.com) application with three commands, that manage the whole process. """ # The illiterate CLI app is a very simple [Typer](https://typer.tiangolo.com) # application with three commands. # Typer i...
[ 37811, 198, 1212, 8265, 4909, 262, 45029, 378, 43749, 3586, 13, 198, 198, 464, 43749, 3586, 318, 6209, 257, 685, 25492, 525, 16151, 5450, 1378, 774, 525, 13, 83, 15483, 14057, 13, 785, 8, 3586, 198, 4480, 1115, 9729, 11, 326, 6687, ...
3.713699
730
""" Gregory Way 2017 Variational Autoencoder - Pan Cancer scripts/adage_pancancer.py Comparing a VAE learned features to ADAGE features. Use this script within the context of a parameter sweep to compare performance across a grid of hyper parameters. Usage: Run in command line with required command arguments: ...
[ 37811, 198, 25025, 652, 6378, 2177, 198, 23907, 864, 5231, 6571, 66, 12342, 532, 5961, 15523, 198, 46521, 14, 324, 496, 62, 79, 1192, 8250, 13, 9078, 198, 198, 7293, 1723, 257, 13753, 36, 4499, 3033, 284, 5984, 11879, 3033, 13, 5765, ...
2.309623
1,673
# Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. import sys from unittest import TestCase class TestImports(TestCase): """Test Imports - the quickest test to ensure that we haven't introduced version-incompatible syntax errors.""" def test_toplevel(self): ...
[ 2, 15069, 357, 34, 8, 9485, 57, 49215, 34152, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 40499, 347, 10305, 13789, 13, 198, 198, 11748, 25064, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 4871, 6208, 3546, 3742, 7, 1440...
2.344241
764
import numpy as np import matplotlib.pyplot as plt import scipy.optimize # Metodo con fit # Dati Rj, dRj = np.genfromtxt("digitalizzate.txt", skip_header=0, unpack=True) Ij, dIj = np.genfromtxt("ddp.txt", skip_header=0, unpack=True) # Fit ndof = 10 dI_eff = dIj popt, pcov = scipy.optimize.curve_fit(funzione, Rj, Ij...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 629, 541, 88, 13, 40085, 1096, 198, 198, 2, 3395, 24313, 369, 4197, 628, 198, 2, 360, 7246, 198, 49, 73, 11, 288, 49, 73, 796...
2.012431
724
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
[ 2, 46424, 347, 43312, 38644, 38559, 24290, 9878, 11290, 46424, 198, 2, 198, 2, 220, 770, 1430, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273, 198, 2, 220, 13096, 340, 739, 262, 2846, 286, 262, 22961, 3611, 5094, 1378...
2.676983
1,551
import json from django.http import HttpResponse from .forms import NicEditImageForm
[ 11748, 33918, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 198, 6738, 764, 23914, 1330, 8377, 18378, 5159, 8479, 628 ]
3.782609
23
from setuptools import setup, find_packages setup(name='dhis', version='0.1.2', description='Utilities for working with DHIS2', url='https://github.com/dhis2/dhis2-python', author='DHIS2 Development Team', author_email='post@dhis2.org', license='BSD', packages=find_packages(),...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 40406, 7, 3672, 11639, 67, 14363, 3256, 198, 220, 220, 220, 220, 220, 2196, 11639, 15, 13, 16, 13, 17, 3256, 198, 220, 220, 220, 220, 220, 6764, 11639, 18274, 2410,...
2.45122
164
# # visionstatistics.py # # Author(s): # Matteo Spallanzani <spmatteo@iis.ee.ethz.ch> # # Copyright (c) 2020-2021 ETH Zurich. # # 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://w...
[ 2, 220, 198, 2, 5761, 14269, 3969, 13, 9078, 198, 2, 220, 198, 2, 6434, 7, 82, 2599, 198, 2, 38789, 78, 1338, 439, 35410, 3216, 1279, 2777, 6759, 660, 78, 31, 72, 271, 13, 1453, 13, 2788, 89, 13, 354, 29, 198, 2, 220, 198, 2...
3.409962
261
# -*- coding: utf-8 -*- """grad_cam.ipynb ** * This file is part of Hybrid CNN-LSTM for COVID-19 Severity Score Prediction paper. * * Written by Ankan Ghosh Dastider and Farhan Sadik. * * Copyright (c) by the authors under Apache-2.0 License. Some rights reserved, see LICENSE. */ """ import tensorf...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 9744, 62, 20991, 13, 541, 2047, 65, 201, 198, 201, 198, 1174, 201, 198, 1635, 770, 2393, 318, 636, 286, 29481, 8100, 12, 43, 2257, 44, 329, 7375, 11008, ...
2.346287
1,158