content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import datetime import logging import os import signal import time from xmlrpc.client import ServerProxy import pytricia import redis import ujson as json from kombu import Connection from kombu import Consumer from kombu import Exchange from kombu import Queue from kombu import uuid from kombu.mixins import ConsumerP...
[ 11748, 4818, 8079, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 6737, 198, 11748, 640, 198, 6738, 35555, 81, 14751, 13, 16366, 1330, 9652, 44148, 198, 198, 11748, 12972, 83, 26654, 198, 11748, 2266, 271, 198, 11748, 334, 17752, 355, ...
2.943103
580
# Generated by Django 2.1.5 on 2020-01-04 14:05 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 20, 319, 12131, 12, 486, 12, 3023, 1478, 25, 2713, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
print(2+3)
[ 4798, 7, 17, 10, 18, 8, 201, 198 ]
1.5
8
# -*- coding: utf-8 -*- import numpy as np from arpym.statistics.multi_r2 import multi_r2 def objective_r2(s_k, s2_xz, n_, sigma2=None): """For details, see here. Parameters ---------- s_k : array, shape(i_,) s2_xz : array, shape(n_+k_, n_+k_) n_ : int sigma2 : array, sh...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 610, 79, 4948, 13, 14269, 3969, 13, 41684, 62, 81, 17, 1330, 5021, 62, 81, 17, 628, 198, 4299, 9432, 62, 81, 17, ...
1.696658
389
# -*- coding: utf-8 -*- from .lib import *
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 764, 8019, 1330, 1635, 628 ]
2.2
20
# Example server with Flask demonstrating use of Jira OAuth 2.0. # Server needs to be deployed. Example code is requesting access token from # Jira. User has to grant access rights. After authorization the # token and Using access token, Jira cloud ID is identified and # the available projects are returned. from reque...
[ 2, 17934, 4382, 351, 46947, 21135, 779, 286, 449, 8704, 440, 30515, 362, 13, 15, 13, 198, 2, 9652, 2476, 284, 307, 12380, 13, 17934, 2438, 318, 20623, 1895, 11241, 422, 198, 2, 449, 8704, 13, 11787, 468, 284, 7264, 1895, 2489, 13, ...
3.542074
511
# coding=utf-8 # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 33448, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262...
2.488682
2,253
#!/usr/bin/python """ A script that selects two random lines from Del Tha Funkee Homosapien's first album, I Wish My Brother George Was Here, and posts them to the @mistadoblina Twitter account. http://twitter.com/mistadobalina Lyrics data provied by LyricWiki. Their API is documented here: * http://lyricwiki.org/Ly...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 37811, 198, 32, 4226, 326, 40573, 734, 4738, 3951, 422, 4216, 536, 64, 11138, 11035, 8074, 418, 499, 2013, 338, 717, 5062, 11, 198, 40, 23447, 2011, 8402, 4502, 8920, 3423, 11, 290, 6851, 6...
2.684783
1,472
"""本模块定义插件对象。 FrontMatter: sidebar_position: 3 description: nonebot.plugin.plugin 模块 """ from types import ModuleType from dataclasses import field, dataclass from typing import TYPE_CHECKING, Any, Set, Dict, Type, Optional from pydantic import BaseModel from nonebot.matcher import Matcher from .export impo...
[ 37811, 17312, 105, 162, 101, 94, 161, 251, 245, 22522, 248, 20046, 231, 162, 237, 240, 20015, 114, 43380, 117, 164, 109, 94, 16764, 198, 198, 25886, 44, 1436, 25, 198, 220, 220, 220, 40217, 62, 9150, 25, 513, 198, 220, 220, 220, 6...
1.840878
729
import numpy as np import pandas as pd import os from ogindia.constants import VAR_LABELS, ToGDP_LABELS, GROUP_LABELS from ogindia.utils import save_return_table cur_path = os.path.split(os.path.abspath(__file__))[0] def macro_table(base_tpi, base_params, reform_tpi=None, reform_params=None, ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 6738, 267, 70, 521, 544, 13, 9979, 1187, 1330, 569, 1503, 62, 48780, 37142, 11, 1675, 38, 6322, 62, 48780, 37142, 11, 44441, 62, 48780, 37142...
1.997298
2,961
import pandas as pd """ @author : Shrikanth N C (nc.shrikanth@gmail.com) Sampling Policy that `Wins' on most measures. """ if __name__ == '__main__': print("Generating") run('TableIV', './output/table4/scratch_table4_')
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 37811, 198, 31, 9800, 1058, 911, 12602, 29313, 399, 327, 357, 10782, 13, 1477, 12602, 29313, 31, 14816, 13, 785, 8, 198, 16305, 11347, 7820, 326, 4600, 54, 1040, 6, 319, 749, 5260, 13, 198,...
2.55914
93
from whoahqa.views.auth import oauth_authorize, oauth_callback # noqa from whoahqa.views.clinics import ClinicViews # noqa from whoahqa.views.default_views import default # noqa from whoahqa.views.default_views import set_locale # noqa from whoahqa.views.request_methods import get_request_user, can_list_clinics # ...
[ 6738, 508, 993, 20402, 13, 33571, 13, 18439, 1330, 267, 18439, 62, 9800, 1096, 11, 267, 18439, 62, 47423, 220, 1303, 645, 20402, 198, 6738, 508, 993, 20402, 13, 33571, 13, 565, 259, 873, 1330, 26690, 7680, 82, 220, 1303, 645, 20402, ...
3
342
#! /usr/bin/env python """Download and replicate the Win32+Win64 glut into our DLLs directory... Visual Studio keeps eating my 64-bit configurations, so we'll use the binary distribution for now... """ import sys, os, subprocess, requests, logging, platform, shutil, glob log = logging.getLogger( 'buildgle' ) ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 37811, 10002, 290, 24340, 262, 7178, 2624, 10, 16643, 2414, 25276, 656, 674, 360, 3069, 82, 8619, 986, 201, 198, 201, 198, 36259, 11733, 7622, 6600, 616, 5598, 12, 2545, 25412, ...
2.522449
245
kHieroField_defaultProjectParent = "defaultProjectParent" kHieroField_defaultShotParent = "defaultShotParent" kHieroField_defaultClipParent = "defaultClipParent" kHieroField_exportNukeScriptRef = "exportNukeScriptEntityRef" kHieroExportRole_Comp = "comp" kHieroExportScope_Project = "project" kHieroExportScope_Sequen...
[ 198, 74, 39, 959, 78, 15878, 62, 12286, 16775, 24546, 796, 366, 12286, 16775, 24546, 1, 198, 74, 39, 959, 78, 15878, 62, 12286, 28512, 24546, 796, 366, 12286, 28512, 24546, 1, 198, 74, 39, 959, 78, 15878, 62, 12286, 2601, 541, 24546...
2.834395
157
"""Http.""" import time from typing import Any, Callable, Dict, List, Text, Tuple import aiohttp from asyncio_requests.helpers.internal import header_filter_mapping from asyncio_requests.helpers.internal import header_response_mapping from asyncio_requests.helpers.internal.circuit_breaker_helper import \ CircuitB...
[ 37811, 43481, 526, 15931, 198, 198, 11748, 640, 198, 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 360, 713, 11, 7343, 11, 8255, 11, 309, 29291, 198, 198, 11748, 257, 952, 4023, 198, 6738, 30351, 952, 62, 8897, 3558, 13, 16794, 364, 1...
2.181771
1,909
#required encoding for scraping, otherwise defaults to unicode and screws things up from bs4 import BeautifulSoup import requests import sys import re import pandas as pd import pprint import numpy as np import csv, sys import base64 import datefinder import datetime import pymongo from pymongo import MongoClient ur...
[ 2, 35827, 21004, 329, 46743, 11, 4306, 26235, 284, 28000, 1098, 290, 23742, 1243, 510, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 7007, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 19798, 292, 355, 279, 67, 198, 11...
2.350384
1,955
""" Copyright 2022 RICHARD TJÖRNHAMMAR Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
[ 37811, 198, 15269, 33160, 371, 20739, 9795, 41852, 127, 244, 42336, 33363, 40569, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 1184...
1.971522
2,142
# -*- coding: utf-8 -*- """The Mac OS X application usage event formatter.""" from plaso.formatters import interface from plaso.formatters import manager class ApplicationUsageFormatter(interface.EventFormatter): """Formatter for a Mac OS X Application usage event.""" DATA_TYPE = u'macosx:application_usage' ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 464, 4100, 7294, 1395, 3586, 8748, 1785, 1296, 1436, 526, 15931, 198, 198, 6738, 458, 292, 78, 13, 18982, 1010, 1330, 7071, 198, 6738, 458, 292, 78, 13, 18982, ...
2.907834
217
# -*- coding: utf-8 -*- from builtins import object import importlib import itertools import logging import re from collections import namedtuple, defaultdict from babel.numbers import get_currency_symbol, get_currency_name from django.conf import settings from django.contrib.contenttypes.models import ContentType fr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 3170, 1040, 1330, 2134, 198, 11748, 1330, 8019, 198, 11748, 340, 861, 10141, 198, 11748, 18931, 198, 11748, 302, 198, 6738, 17268, 1330, 3706, 83, 29291, 11, ...
2.36717
2,187
""" Methods for fitting background in energy dispersive xray spectra Authors/Modifications: ---------------------- * Mark Rivers, GSECARS * modified for Larch, M Newville Notes: ------ This function fits a background to an MCA spectrum. The background is fitted using an enhanced version of the algorithm published by ...
[ 37811, 198, 46202, 329, 15830, 4469, 287, 2568, 4596, 24469, 2124, 2433, 5444, 430, 198, 198, 30515, 669, 14, 5841, 6637, 25, 198, 19351, 438, 198, 9, 2940, 18280, 11, 402, 23683, 27415, 198, 9, 9518, 329, 406, 998, 11, 337, 968, 42...
2.515871
4,253
from machine import Pin import utime morse_code={'.-': 'A', '-...': 'B', '-.-.': 'C', '-..': 'D', '.': 'E', '..-.': 'F', '--.': 'G', '....': 'H', '..': 'I', '.---': 'J', '-.-': 'K', '.-..': 'L', '--': 'M', '-.': 'N', '---': 'O', '.--.': 'P', '--.-': 'Q', '.-.': 'R', '...': 'S', '-': 'T', '..-': 'U', '......
[ 6738, 4572, 1330, 13727, 201, 198, 11748, 3384, 524, 201, 198, 4491, 325, 62, 8189, 34758, 4458, 12, 10354, 705, 32, 3256, 705, 12, 986, 10354, 705, 33, 3256, 705, 12, 7874, 2637, 25, 705, 34, 3256, 705, 12, 492, 10354, 705, 35, 3...
1.769883
943
# # PySNMP MIB module HH3C-EVI-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HH3C-EVI-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:26:52 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019,...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 47138, 18, 34, 12, 36, 12861, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490, 14, 67, 6...
2.538509
14,620
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np from rasa_core.actions.action import ACTION_LISTEN_NAME
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 299, 32152, ...
3.721311
61
#! /usr/bin/python ################################################################################# # Copyright 2018 NTREX CO. # # 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:/...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 198, 198, 29113, 29113, 14468, 2, 198, 2, 15069, 2864, 24563, 2200, 55, 7375, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2,...
2.92126
508
# -*- coding: utf-8 -*- from pandas import DataFrame from pandas import concat from matplotlib import pyplot from keras.models import Sequential from keras.layers import Dense from keras.layers import LSTM import numpy from sklearn.preprocessing import MinMaxScaler from pandas import Series
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 19798, 292, 1330, 6060, 19778, 198, 6738, 19798, 292, 1330, 1673, 265, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 198, 6738, 41927, 292, 13, 27530, 1330, 2460...
3.318182
88
# testNewSimBulkStandard.py # Date Who Comment # ---------- --- ----------------------------------------------- # 2020-07-20 JRM Try to have a more complete simBulkStd # that can be inserted in a script # import dtsa2 as dtsa2 import dtsa2.mcSimulate3 as mc3 import time ...
[ 2, 1332, 3791, 8890, 33, 12171, 23615, 13, 9078, 198, 2, 220, 220, 7536, 220, 220, 220, 220, 220, 5338, 220, 18957, 198, 2, 24200, 438, 220, 11420, 220, 20368, 24305, 198, 2, 12131, 12, 2998, 12, 1238, 220, 449, 29138, 220, 9993, ...
2.229793
2,128
from django.urls import path from . import views app_name = 'fundraising' urlpatterns = [ path('', views.index, name='index'), path('donation-session', views.configure_checkout_session, name='donation-session'), path('thank-you/', views.thank_you, name='thank-you'), path('manage-donations/<hero>/', vi...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 1330, 5009, 198, 198, 1324, 62, 3672, 796, 705, 10990, 32741, 6, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 5009, 13, 9630, 11, 1438, 116...
2.745455
220
# =============================================================================== # Copyright 2016 Jake Ross # # 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...
[ 2, 38093, 25609, 855, 198, 2, 15069, 1584, 14757, 9847, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
4.314286
315
from os import linesep from pathlib import Path from typing import Dict, Union from pydux import create_store from Utils.Debounce import debounce from Utils.Singleton import Singleton from Utils.Store.Actions.CredentialsStoreActions import CredentialsStoreActions
[ 6738, 28686, 1330, 3951, 538, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 360, 713, 11, 4479, 198, 198, 6738, 12972, 646, 87, 1330, 2251, 62, 8095, 198, 198, 6738, 7273, 4487, 13, 16587, 8652, 1330, 1915, 8652, 198, 67...
3.608108
74
from scraping_functions import man_woman, scraping, get_tag http = man_woman() resp = scraping(http) lista = get_tag(resp)
[ 6738, 46743, 62, 12543, 2733, 1330, 582, 62, 8580, 11, 46743, 11, 651, 62, 12985, 628, 198, 4023, 796, 582, 62, 8580, 3419, 198, 4363, 796, 46743, 7, 4023, 8, 198, 4868, 64, 796, 651, 62, 12985, 7, 4363, 8, 628, 628 ]
3.047619
42
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # PROGRAMMER: Rafael Mata M. # DATE CREATED: 28 May 2020 # REVISED DATE: 31 May 2020 # PURPOSE: Train, validate and test a deep neural network to classify flower images # using different pretrained CNN models, save the checkp...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 46805, 29296, 25, 220, 220, 220, 31918, 45332, 337, 13, 198, 2, 360, 6158, 29244, 11617, 25, 220, 25...
2.19768
3,966
from setuptools import setup, find_packages from pathlib import Path ## I'm just going to manually do this for now. ## I don't think there is an easy way to fix the bug with readme files. description = """\ # SimpadLib v2.2 ### Example Usages ```py from simpadlib import simpad sim = simpad.Controller() # Initialize ...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 2235, 314, 1101, 655, 1016, 284, 14500, 466, 428, 329, 783, 13, 198, 2235, 314, 836, 470, 892, 612, 318, 281, 2562, 835, 284, 42...
2.878613
519
# -*- coding: utf-8 -*- from random import randrange import numpy as np from project.tiles import GrassTile, WaterTile, WoodTile
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 4738, 1330, 43720, 9521, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1628, 13, 83, 2915, 1330, 19062, 35103, 11, 5638, 35103, 11, 5326, 35103, 628 ]
3.119048
42
#!/usr/bin/env python import os import socket from twisted.internet import defer from twisted.internet import reactor from twisted.internet import error from twisted.names import error from twisted.names.common import extractRecord # from twisted.names.client import getResolver from common import getResolver # XXX: See...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 11748, 17802, 198, 6738, 19074, 13, 37675, 1330, 29135, 198, 6738, 19074, 13, 37675, 1330, 21905, 198, 6738, 19074, 13, 37675, 1330, 4049, 198, 6738, 19074, 13, 14933, ...
3.849057
212
import hashlib print(f"Answer part one: {find_number('ckczppom', 5)}") print(f"Answer part two: {find_number('ckczppom', 6)}")
[ 11748, 12234, 8019, 628, 198, 198, 4798, 7, 69, 1, 33706, 636, 530, 25, 1391, 19796, 62, 17618, 10786, 694, 26691, 381, 296, 3256, 642, 38165, 4943, 198, 4798, 7, 69, 1, 33706, 636, 734, 25, 1391, 19796, 62, 17618, 10786, 694, 26691...
2.6
50
from .compare_test import CompareTest from .id_setup_test import IDSetupTest from .lookup_generator_test import LookupGeneratorTest from .magnets_test import MagnetsTest from .bfield_phase_error_test import BfieldPhaseErrorTest from .mpi_runner_for_shim_opt_test import MpiRunnerForShimOptTest from .mpi_runner_test impo...
[ 6738, 764, 5589, 533, 62, 9288, 1330, 27814, 14402, 198, 6738, 764, 312, 62, 40406, 62, 9288, 1330, 4522, 40786, 14402, 198, 6738, 764, 5460, 929, 62, 8612, 1352, 62, 9288, 1330, 6803, 929, 8645, 1352, 14402, 198, 6738, 764, 76, 4660,...
3.233333
120
import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt df = pd.read_csv("data/car data.csv") features = list(filter(lambda x: x!="Car_Name" ,list(df.columns))) final_dataset = df[features] final_dataset['No_Year'] = 2020 - df['Year'] final_dataset.drop(['Year'], axis=1, inplace=T...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 7568, 796, 279, 67, 13, 961, 62, 40664, 7203, 78...
2.740602
798
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
[ 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 220, 220, ...
3.461165
206
mapping = { 1:'GetDllVersion', 2:'DllGetVersion', 3:'Extract', 4:'DeleteExtractedFiles', 10:'FCICreate', 11:'FCIAddFile', 12:'FCIFlushFolder', 13:'FCIFlushCabinet', 14:'FCIDestroy', 20:'FDICreate', 21:'FDIIsCabinet', 22:'FDICopy', 23:'FDIDestroy', 24:'FDITruncateCabinet', }
[ 76, 5912, 796, 1391, 198, 16, 32105, 3855, 35, 297, 14815, 3256, 198, 17, 32105, 35, 297, 3855, 14815, 3256, 198, 18, 32105, 11627, 974, 3256, 198, 19, 32105, 38727, 11627, 20216, 25876, 3256, 198, 940, 32105, 4851, 2149, 260, 378, 32...
2.192
125
from app.log import logger from app.middlewares.base import Middleware
[ 6738, 598, 13, 6404, 1330, 49706, 198, 6738, 598, 13, 27171, 86, 3565, 13, 8692, 1330, 6046, 1574, 628 ]
3.789474
19
#!/usr/bin/env python ############################################################## # _ __ ____ ___ _ __ __ __ ____ # # | | | ( (` | |_ | |_) | | | ( (` / /\ / /`_ | |_ # # \_\_/ _)_) |_|__ |_| \ \_\_/ _)_) /_/--\ \_\_/ |_|__ # # Userusage Python by Will Dr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 29113, 14468, 7804, 4242, 2235, 198, 2, 220, 220, 220, 220, 4808, 220, 220, 220, 220, 11593, 220, 220, 220, 1427, 220, 46444, 220, 220, 4808, 220, 220, 220, 220, 11593, 220, 220...
2.103462
15,194
import pathlib import click import altendpy.processtemplates @click.command() @click.option( '--root', default='.', type=click.Path(file_okay=False), help='Recursively search this directory for templates', show_default = True, ) @click.option( '--suffix', default='_template', help='Exten...
[ 11748, 3108, 8019, 198, 198, 11748, 3904, 198, 198, 11748, 5988, 437, 9078, 13, 1676, 728, 927, 17041, 628, 198, 31, 12976, 13, 21812, 3419, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 705, 438, 15763, 3256, 198, 220, 220, 220...
2.599174
242
import mlflow.sklearn import mlflow import os # using Thore's login since I know it still works! MLFLOW_USERNAME = 'tbuergel' MLFLOW_PASSWORD = 'tbuergel' os.environ["MLFLOW_TRACKING_USERNAME"] = MLFLOW_USERNAME os.environ["MLFLOW_TRACKING_PASSWORD"] = MLFLOW_PASSWORD MLFLOW_VM_URL = 'http://10.138.0.58' # Not curr...
[ 11748, 285, 1652, 9319, 13, 8135, 35720, 198, 11748, 285, 1652, 9319, 198, 198, 11748, 28686, 198, 2, 1262, 536, 382, 338, 17594, 1201, 314, 760, 340, 991, 2499, 0, 198, 5805, 3697, 3913, 62, 29904, 20608, 796, 705, 83, 11110, 6422, ...
2.482517
143
from blasteroids.lib.constants import SHIP_EXHAUST_ANIMATION_ID from .orientable_game_object import OrientableGameObject
[ 6738, 48131, 10994, 13, 8019, 13, 9979, 1187, 1330, 6006, 4061, 62, 6369, 7801, 7759, 62, 1565, 3955, 6234, 62, 2389, 198, 6738, 764, 13989, 540, 62, 6057, 62, 15252, 1330, 35275, 540, 8777, 10267, 628 ]
3.388889
36
from flask import jsonify, Markup, render_template from app import app import os import re initialised = False musicFiles = None mpeg_regex = re.compile(r"^.*\.mp3$") jpeg_regex = re.compile(r"^.*\.jpe?g$") png_regex = re.compile(r"^.*\.png$") @app.route('/') @app.route('/index/') @app.route('/pla...
[ 6738, 42903, 1330, 33918, 1958, 11, 2940, 929, 11, 8543, 62, 28243, 201, 198, 6738, 598, 1330, 598, 201, 198, 11748, 28686, 201, 198, 11748, 302, 201, 198, 201, 198, 36733, 1417, 796, 10352, 201, 198, 28965, 25876, 796, 6045, 198, 439...
2.358852
209
# @Time : 2020/11/14 # @Author : Junyi Li, Gaole He # @Email : lijunyi@ruc.edu.cn # UPDATE: # @Time : 2021/1/19 # @Author : Tianyi Tang # @Email : steventang@ruc.edu.cn """ textbox.config.configurator ################################ """ import re import os import sys import yaml import torch from logging impo...
[ 2, 2488, 7575, 220, 220, 1058, 12131, 14, 1157, 14, 1415, 198, 2, 2488, 13838, 1058, 7653, 48111, 7455, 11, 12822, 2305, 679, 198, 2, 2488, 15333, 220, 1058, 300, 2926, 403, 48111, 31, 622, 66, 13, 15532, 13, 31522, 198, 198, 2, 3...
2.436626
2,217
""" ## Description [PIPEWIRE](https://pipewire.org/) provides a low-latency, graph based processing engine on top of audio and video devices that can be used to support the use cases currently handled by both pulseaudio and JACK. PipeWire was designed with a powerful security model that makes interacting with audio an...
[ 37811, 198, 2235, 12489, 198, 198, 58, 47, 4061, 6217, 41736, 16151, 5450, 1378, 79, 541, 413, 557, 13, 2398, 34729, 3769, 257, 1877, 12, 15460, 1387, 11, 4823, 1912, 7587, 3113, 198, 261, 1353, 286, 6597, 290, 2008, 4410, 326, 460, ...
2.617965
924
# This gives an interface to Windows Search, returning results similar to # os.scandir. import asyncio, time, os, stat from adodbapi import ado_consts from pathlib import Path from pprint import pprint # Get this from pywin32, not from adodbapi: try: import adodbapi except ImportError as e: adodbapi = None ...
[ 2, 770, 3607, 281, 7071, 284, 3964, 11140, 11, 8024, 2482, 2092, 284, 198, 2, 28686, 13, 1416, 392, 343, 13, 198, 198, 11748, 30351, 952, 11, 640, 11, 28686, 11, 1185, 198, 6738, 512, 375, 65, 15042, 1330, 50129, 62, 1102, 6448, 1...
2.796909
906
#!/usr/bin/env python from abc import ABC, abstractmethod from collections.abc import Iterable from functools import wraps import colorsys import copy import sys import ctypes
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 17268, 13, 39305, 1330, 40806, 540, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 11748, 7577, 893, 198, 11748, 4866, 198, 11748,...
3.744681
47
import re import requests
[ 11748, 302, 198, 198, 11748, 7007, 198 ]
3.857143
7
from .ruscodes import _check_inn, _check_ogrn from .commonrules import _validate_email, _validate_url VALIDATION_RULEMAP = { 'ru.org.ogrn' : _check_ogrn, 'ru.org.inn' : _check_inn, 'common.email' : _validate_email, 'common.url' : _validate_url }
[ 6738, 764, 14932, 40148, 1330, 4808, 9122, 62, 3732, 11, 4808, 9122, 62, 519, 35906, 198, 6738, 764, 11321, 38785, 1330, 4808, 12102, 378, 62, 12888, 11, 4808, 12102, 378, 62, 6371, 198, 198, 23428, 2389, 6234, 62, 49, 24212, 33767, 7...
2.339286
112
#!/usr/bin/env python # -*- coding:utf-8 -*- import argparse import collections import datetime import glob import json import os.path as osp import numpy as np import labelme import pycocotools.mask parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('--img_di...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 220, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 11748, 1822, 29572, 198, 11748, 17268, 198, 11748, 4818, 8079, 198, 11748, 15095, 198, 11748, 33918, 198, 11748, 28686, ...
2.024127
1,575
import random start= random.randint(-10000, 990) stop = random.randint(1000,10000) filename = "random_" filepath="../data/" +filename print("insert number of files to create:") num_files=int(input()) print("insert size of the problem") N_input=int(input()) for nF in range(num_files): N = N_input + random.randi...
[ 11748, 4738, 198, 198, 9688, 28, 4738, 13, 25192, 600, 32590, 49388, 11, 860, 3829, 8, 198, 11338, 796, 4738, 13, 25192, 600, 7, 12825, 11, 49388, 8, 198, 198, 34345, 796, 366, 25120, 62, 1, 198, 7753, 6978, 2625, 40720, 7890, 30487...
2.201592
377
""" Main entry-point for vaultup. Parses arguments from the CLI, and performs the action. """ if __name__ == '__main__': import colorama from vaultup import cli colorama.init() ns = cli.parser.parse_args() action = cli.actions[ns.action] action.exec(ns)
[ 37811, 198, 13383, 5726, 12, 4122, 329, 22563, 929, 13, 198, 198, 47, 945, 274, 7159, 422, 262, 43749, 11, 290, 17706, 262, 2223, 13, 198, 37811, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220...
2.660377
106
import os os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = "hide" import sys import pygame import ctypes ################################################ # Initializing file system: fs = open('disk.img', 'r+b') # Read and write (binary file) ################################################ # Error stub: #################...
[ 11748, 28686, 198, 418, 13, 268, 2268, 17816, 47, 56, 47109, 62, 39, 14114, 62, 40331, 15490, 62, 4805, 2662, 11571, 20520, 796, 366, 24717, 1, 198, 198, 11748, 25064, 198, 11748, 12972, 6057, 198, 11748, 269, 19199, 198, 198, 29113, ...
2.496265
937
"""@package deepac.predict Predict pathogenic potentials and use them to filter sequences of interest. """ from deepac.preproc import read_fasta, tokenize from multiprocessing import Pool from functools import partial import time import tensorflow as tf import numpy as np from Bio.SeqIO.FastaIO import SimpleFastaParse...
[ 37811, 31, 26495, 2769, 330, 13, 79, 17407, 198, 47, 17407, 3108, 15147, 2785, 82, 290, 779, 606, 284, 8106, 16311, 286, 1393, 13, 198, 198, 37811, 198, 6738, 2769, 330, 13, 3866, 36942, 1330, 1100, 62, 7217, 64, 11, 11241, 1096, 19...
1.677016
8,149
from tests.util import BaseTest
[ 6738, 5254, 13, 22602, 1330, 7308, 14402, 628 ]
4.125
8
import asyncio import os import shutil import subprocess import tempfile import unittest import repour.asgit import repour.adjust.adjust from test import util loop = asyncio.get_event_loop()
[ 11748, 30351, 952, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 850, 14681, 198, 11748, 20218, 7753, 198, 11748, 555, 715, 395, 198, 198, 11748, 1128, 454, 13, 292, 18300, 198, 11748, 1128, 454, 13, 23032, 13, 23032, 198, 6738,...
3.327586
58
# Licensed under a 3-clause BSD style license - see LICENSE.rst # Copyright (c) Geoffrey Lentner 2016. All Rights Reserved. # slipy/spectrum/core/__init__.py """core (functions) for Spectrum object. """ from .copy import _copy from .from_array import _from_array from .from_file import _from_file from .init import _in...
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 2, 15069, 357, 66, 8, 42803, 43751, 1008, 1584, 13, 1439, 6923, 33876, 13, 198, 2, 13819, 88, 14, 4443, 6582, 14, 7295, 14, ...
3.065789
152
from typing import Sequence import numpy as np import pandas as pd import statsmodels.api as sm from statsmodels.regression.rolling import RollingOLS from mundi.pandas import Pandas from .utils import diff, smooth, cases from ..docs import docstring from ..types import ValueStd KT_METHODS = {} K_METHODS = {} METHODS...
[ 6738, 19720, 1330, 45835, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 9756, 27530, 13, 15042, 355, 895, 198, 6738, 9756, 27530, 13, 2301, 2234, 13, 18886, 1330, 21567, 3535, 50, 198, 198, ...
2.468702
1,965
#!/usr/bin/python3 """sends a request to the URL and displays the value of the X-Request-Id""" import requests from sys import argv if __name__ == "__main__": req = requests.get(argv[1]) print(req.headers.get('X-Request-Id'))
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 37811, 82, 2412, 257, 2581, 284, 262, 10289, 290, 11298, 262, 1988, 286, 262, 1395, 12, 18453, 12, 7390, 37811, 198, 11748, 7007, 198, 6738, 25064, 1330, 1822, 85, 628, 198, 361, 11593, ...
2.776471
85
# # Copyright (c) 2015 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
[ 2, 198, 2, 15069, 357, 66, 8, 1853, 497, 87, 33, 3457, 13, 290, 1854, 13, 1439, 2489, 10395, 13, 198, 2, 2638, 1378, 12413, 65, 13, 785, 290, 3740, 1378, 12567, 13, 785, 14, 12413, 33, 14, 1416, 1192, 1098, 12, 25981, 15813, 14,...
2.511903
6,007
#!/usr/bin/env python # Python DBUS Test Server # runs until the Quit() method is called via DBUS from gi.repository import GLib from pydbus import SessionBus loop = GLib.MainLoop() class MyDBUSService(object): """ <node> <interface name='net.lew21.pydbus.ClientServerExample'> <method na...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 11361, 20137, 2937, 6208, 9652, 198, 2, 4539, 1566, 262, 48887, 3419, 2446, 318, 1444, 2884, 20137, 2937, 198, 198, 6738, 308, 72, 13, 260, 1930, 37765, 1330, 10188, 571, 198, ...
2.288136
472
from GeneticAlgorithm import GeneticAlgorithm import pandas as pd import os os.environ['KMP_DUPLICATE_LIB_OK'] = 'True'
[ 6738, 42295, 2348, 42289, 1330, 42295, 2348, 42289, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 418, 13, 268, 2268, 17816, 42, 7378, 62, 35, 52, 31484, 6158, 62, 40347, 62, 11380, 20520, 796, 705, 17821, 6, 628, 628,...
2.883721
43
import unittest import mock from google.appengine.api import app_identity import bq_utils import tools.generate_ext_tables as gen_ext import common import resources import constants.bq_utils as bq_consts import constants.cdr_cleaner.clean_cdr as cdr_consts
[ 11748, 555, 715, 395, 198, 198, 11748, 15290, 198, 6738, 23645, 13, 1324, 18392, 13, 15042, 1330, 598, 62, 738, 414, 198, 198, 11748, 275, 80, 62, 26791, 198, 11748, 4899, 13, 8612, 378, 62, 2302, 62, 83, 2977, 355, 2429, 62, 2302, ...
3.095238
84
''' Given a string S of lowercase letters, a duplicate removal consists of choosing two adjacent and equal letters, and removing them. We repeatedly make duplicate removals on S until we no longer can. Return the final string after all such duplicate removals have been made. It is guaranteed the answer is unique. Exa...
[ 7061, 6, 198, 15056, 257, 4731, 311, 286, 2793, 7442, 7475, 11, 257, 23418, 9934, 10874, 286, 11236, 734, 15909, 290, 4961, 7475, 11, 290, 10829, 606, 13, 198, 1135, 7830, 787, 23418, 816, 709, 874, 319, 311, 1566, 356, 645, 2392, 4...
3.670588
170
from collections import defaultdict import heapq if __name__ == "__main__": with open('15.txt') as f: grid = [[int(i) for i in l.strip()] for l in f.readlines()] costs = dict() costs[(0, 0)] = 0 pqueue = [(0, (0, 0))] while pqueue: (cost, (x, y)) = heapq.heappop(pqueue) ...
[ 6738, 17268, 1330, 4277, 11600, 198, 11748, 24575, 80, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 351, 1280, 10786, 1314, 13, 14116, 11537, 355, 277, 25, 198, 220, 220, 220, 220, 220, 220, ...
1.866071
448
import torch from ws.RLAgents.D_PolicyGradientBased.misc import _fn_calculate_montecarlo_normalized_rewards from ws.RLAgents.D_PolicyGradientBased.Buffer import Buffer from .ActorCritic import ActorCritic from .detail_mgt import detail_mgt from .model_persistance_mgt import model_persistance_mgt
[ 11748, 28034, 198, 198, 6738, 266, 82, 13, 7836, 10262, 658, 13, 35, 62, 36727, 42731, 1153, 15001, 13, 44374, 1330, 4808, 22184, 62, 9948, 3129, 378, 62, 2144, 660, 7718, 5439, 62, 11265, 1143, 62, 260, 2017, 198, 6738, 266, 82, 13...
3.05102
98
name = data.get('name', 'world') logger.info("Hello {}".format(name)) hass.bus.fire(name, { "wow": "from a Python script!" })
[ 3672, 796, 1366, 13, 1136, 10786, 3672, 3256, 705, 6894, 11537, 198, 6404, 1362, 13, 10951, 7203, 15496, 23884, 1911, 18982, 7, 3672, 4008, 198, 71, 562, 13, 10885, 13, 6495, 7, 3672, 11, 1391, 366, 42773, 1298, 366, 6738, 257, 11361,...
2.73913
46
from data_processing import * from visual_vocabulary import * if __name__ == '__main__': folders = maybe_extract('data.tar.gz', 250) size = 48 trim_images(folders, size, size, 2) X, y = load_images(['trim_'+ folder for folder in folders], size, size)
[ 6738, 1366, 62, 36948, 1330, 1635, 198, 6738, 5874, 62, 18893, 22528, 1330, 1635, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 197, 11379, 364, 796, 3863, 62, 2302, 974, 10786, 7890, 13, 18870, 13, 34586, 3...
2.802198
91
# Space: O(n) # Time: O(n)
[ 198, 2, 4687, 25, 440, 7, 77, 8, 198, 2, 3862, 25, 440, 7, 77, 8, 628, 628, 198 ]
1.684211
19
if __name__ == "__main__": print(Solution().findPeakElement([1,2,1,3,5,6,4])) """ A peak element is an element that is greater than its neighbors. Given an input array nums, where nums[i] ≠ nums[i+1], find a peak element and return its index. The array may contain multiple peaks...
[ 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3601, 7, 46344, 22446, 19796, 6435, 461, 20180, 26933, 16, 11, 17, 11, 16, 11, 18, 11, 20, 11, 21, 11, 19, 60, 4008, 628, 628, 628, 198, 220, 220,...
2.443182
352
import numpy as np import time from .QSPObj_sym import QSPObj_sym from .QSPGrad_Sim import QSPGrad_sym from .ChebyCoef2Func import ChebyCoef2Func from .QSP_LBFGS import QSP_LBFGS # -------------------------------------------------------------------------- # Given coefficients of a polynomial P, yield corresponding pha...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 6738, 764, 48, 4303, 49201, 62, 37047, 1330, 1195, 4303, 49201, 62, 37047, 198, 6738, 764, 48, 4303, 42731, 62, 8890, 1330, 1195, 4303, 42731, 62, 37047, 198, 6738, 764, 7376, 1525, ...
3.540845
355
import re from datetime import datetime from collections import OrderedDict from openpyxl import Workbook import pytest from _pytest.mark.structures import Mark _py_ext_re = re.compile(r"\.py$")
[ 198, 11748, 302, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 1280, 9078, 87, 75, 1330, 5521, 2070, 198, 11748, 12972, 9288, 198, 6738, 4808, 9078, 9288, 13, 4102, 13, 7249, 942, 13...
3.044776
67
# Generated by Django 3.0.3 on 2020-02-18 15:01 import datetime from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 18, 319, 12131, 12, 2999, 12, 1507, 1315, 25, 486, 198, 198, 11748, 4818, 8079, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.972222
36
import pandas as pd from pdia.utils.countVisits import countVisits def createUniqueRunID(df, var='onScreen', runId='onScreenRunID'): """Create a new column with countVisits() :param df: data frame :param var: name of the column from which we are creating the runs :param runId: name of the column we ...
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 279, 67, 544, 13, 26791, 13, 9127, 15854, 896, 1330, 954, 15854, 896, 628, 198, 4299, 2251, 40257, 10987, 2389, 7, 7568, 11, 1401, 11639, 261, 23901, 3256, 1057, 7390, 11639, 261, 23901...
2.888889
189
landmarks_per_tooth = [1,2,3,5,6,7,8,9] index =1 temp = landmarks_per_tooth[index] print(landmarks_per_tooth[index][:, 1]) temp = center_to_origin(landmarks_per_tooth[index]) print(landmarks_per_tooth[index][:, 1])
[ 198, 1044, 14306, 62, 525, 62, 1462, 849, 796, 685, 16, 11, 17, 11, 18, 11, 20, 11, 21, 11, 22, 11, 23, 11, 24, 60, 198, 9630, 796, 16, 198, 29510, 796, 41532, 62, 525, 62, 1462, 849, 58, 9630, 60, 198, 4798, 7, 1044, 14306,...
2.311828
93
from providers.provider import Provider from providers.mailgun import MailgunProvider from providers.mandrill import MandrillProvider
[ 6738, 9549, 13, 15234, 1304, 1330, 32549, 198, 6738, 9549, 13, 4529, 7145, 1330, 11099, 7145, 29495, 198, 6738, 9549, 13, 22249, 20190, 1330, 13314, 20190, 29495, 628 ]
4.821429
28
""" Version information """ __version__ = "2.3.0" __version_info__ = (2, 3, 0)
[ 37811, 10628, 1321, 37227, 198, 198, 834, 9641, 834, 796, 366, 17, 13, 18, 13, 15, 1, 198, 834, 9641, 62, 10951, 834, 796, 357, 17, 11, 513, 11, 657, 8, 198 ]
2.5
32
# -*- coding: utf-8 -*- import pandas as pd import matplotlib.pyplot as plt from numpy import corrcoef, transpose, arange from pylab import pcolor, show, colorbar, xticks, yticks, savefig import sklearn.neighbors from scipy import cluster from sklearn import preprocessing # Read the data and load it into memory df = ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 299, 32152, 1330, 1162, 81, 1073, 891, 11, 1007, 3455, 11, 61...
2.777778
1,386
from flask import jsonify from flask import request from controllers import usuario
[ 6738, 42903, 1330, 33918, 1958, 198, 6738, 42903, 1330, 2581, 198, 6738, 20624, 1330, 514, 84, 4982 ]
4.882353
17
from datetime import datetime import random from django.shortcuts import render, render_to_response, redirect, reverse from django.core.paginator import Paginator from django.db.models import F from django.shortcuts import render from django.views import View from jedzonko.models import * from django.contrib import me...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 4738, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 8543, 62, 1462, 62, 26209, 11, 18941, 11, 9575, 198, 6738, 42625, 14208, 13, 7295, 13, 79, 363, 20900, 1330, 31525, 20900, ...
3.336207
116
import yaml from pprint import pprint from netmiko import ConnectHandler filename = "/home/thana/.netmiko.yml" with open(filename) as f: yaml_data = yaml.load(f) device_info = yaml_data['cisco3'] net_connect = ConnectHandler(**device_info) pprint(net_connect.find_prompt()) net_connect.disconnect()
[ 11748, 331, 43695, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 6738, 2010, 76, 12125, 1330, 8113, 25060, 198, 198, 34345, 796, 12813, 11195, 14, 400, 2271, 11757, 3262, 76, 12125, 13, 88, 4029, 1, 198, 4480, 1280, 7, 34345, 8, 355, ...
2.772727
110
import matplotlib.pyplot as plt import numpy as np import pandas as pd strategy = 5 filenames = ['mut5crossp3.csv','mut5crossp7.csv','mut7crossp3.csv', \ 'mut7crossp7.csv','mut9crossp3.csv','mut9crossp7.csv'] for i in range(len(filenames)): filenames[i] = 'strategy{}'.format(strategy) + filenames[i] print(f...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 220, 198, 11748, 299, 32152, 355, 45941, 220, 198, 11748, 19798, 292, 355, 279, 67, 220, 198, 198, 2536, 4338, 796, 642, 198, 198, 10379, 268, 1047, 796, 37250, 21973, 20, 19692...
2.186869
396
from django.core.exceptions import ValidationError from django.forms.fields import Field
[ 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 6738, 42625, 14208, 13, 23914, 13, 25747, 1330, 7663, 628, 220, 220, 220, 220, 220, 220, 220, 220, 628, 220, 220, 220, 220 ]
2.888889
36
# coding: utf8 """ Kriging Class ============= Interpolation using Gaussian Process method. :Example: :: >> from batman.surrogate import Kriging >> import numpy as np >> sample = np.array([[2, 4], [3, 5], [6, 9]]) >> data = np.array([[12, 1], [10, 2], [9, 4]]) >> predictor = Kriging(sample, data...
[ 2, 19617, 25, 3384, 69, 23, 198, 37811, 198, 42, 4359, 278, 5016, 198, 25609, 28, 198, 198, 9492, 16104, 341, 1262, 12822, 31562, 10854, 2446, 13, 198, 198, 25, 16281, 25, 198, 198, 3712, 628, 220, 220, 220, 9609, 422, 7365, 805, ...
2.173854
3,664
from kairos_face import settings, exceptions
[ 6738, 479, 1872, 4951, 62, 2550, 1330, 6460, 11, 13269, 628, 198 ]
3.916667
12
import logging import sys from config import LOGGING_TO_CHAT from meta import bot from .logging import get_logger
[ 11748, 18931, 198, 11748, 25064, 198, 198, 6738, 4566, 1330, 41605, 38, 2751, 62, 10468, 62, 31542, 198, 6738, 13634, 1330, 10214, 198, 6738, 764, 6404, 2667, 1330, 651, 62, 6404, 1362, 628, 198 ]
3.441176
34
import sys import codecs import os import json import re from collections import OrderedDict from xml.dom import minidom import kindred import bioc from future.utils import native # TODO: Deal with complex relations more clearly def iterLoad(dataFormat,path,corpusSizeCutoff=500): """ Iteratively load sections o...
[ 11748, 25064, 198, 11748, 40481, 82, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 302, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 6738, 35555, 13, 3438, 1330, 949, 312, 296, 198, 198, 11748, 46449, 198, 198, 11748, 318...
3.067974
1,530
import shutil smile = open("SMILE_list.txt") for line in smile: line = line.strip() try: shutil.move("C:\\Users\\kirut\\Documents\\smile_rec\\lfwcrop_color\\faces\\"+line[:-3]+"ppm","C:\\Users\\kirut\\Documents\\smile_rec\\SMILE_list\\"+line[:-3]+"ppm") except : None non_smile = open...
[ 11748, 4423, 346, 201, 198, 5796, 576, 796, 1280, 7203, 50, 8895, 2538, 62, 4868, 13, 14116, 4943, 201, 198, 1640, 1627, 287, 8212, 25, 201, 198, 220, 220, 220, 1627, 796, 1627, 13, 36311, 3419, 201, 198, 220, 220, 220, 1949, 25, ...
2.069536
302
import torch import torch.nn as nn import torch.optim as optim from torchvision.utils import save_image from utils import save_args, add_args, Status from nnutils import get_device from nnutils.loss import gradient_penalty, NonSaturatingLoss from tqdm import tqdm from .model import Generator, Discriminator
[ 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 6738, 28034, 10178, 13, 26791, 1330, 3613, 62, 9060, 198, 198, 6738, 3384, 4487, 1330, 3613, 62, 22046, 11, 751, 62, 22046, 1...
3.380435
92
import tinder import time q = tinder.queue.RabbitProducer("test_q") i = 0 while True: i += 1 print(i) q.send("random " + str(i)) time.sleep(3)
[ 11748, 256, 5540, 198, 11748, 640, 198, 198, 80, 796, 256, 5540, 13, 36560, 13, 49, 14229, 11547, 2189, 7203, 9288, 62, 80, 4943, 198, 198, 72, 796, 657, 198, 4514, 6407, 25, 198, 220, 220, 220, 1312, 15853, 352, 198, 220, 220, 22...
2.175676
74
import pandas as pd from sklearn.preprocessing import MinMaxScaler import numpy as np from sklearn.model_selection import train_test_split import plot def loadDataset(symbol): '''Loads Dataset of the passed symbol from the datasets folder.''' df = pd.read_csv('datasets/'+symbol+'.csv', parse_dates=['Date']) ...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 1855, 11518, 3351, 36213, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 11748, 711...
2.649302
1,075
import pytest from openbb_terminal.cryptocurrency.due_diligence import cryptopanic_view @pytest.fixture(scope="module") @pytest.mark.vcr @pytest.mark.record_stdout
[ 11748, 12972, 9288, 198, 198, 6738, 1280, 11848, 62, 23705, 282, 13, 29609, 420, 13382, 13, 23301, 62, 67, 346, 328, 594, 1330, 8194, 404, 26277, 62, 1177, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 29982, 2625, 21412, 4943, 628, 19...
2.68254
63
# -*- coding: utf-8 -*- # # Copyright (C) 2014 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file LICENSE, which # you should have received as part of this distribution. # import asyncio import base64 from .client import Resource, HttpStreamResponse from io import RawIOBase ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 1946, 10009, 911, 273, 259, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 3788, 318, 11971, 355, 3417, 287, 262, 2393, 38559, 2...
2.208767
4,129
"""Volumetric affine transformations implemented in TensorFlow.""" import tensorflow as tf def warp_features_labels(features, labels, matrix, scalar_label=False): """Warp features and labels tensors according to affine matrix. Trilinear interpolation is used for features, and nearest neighbor interpolat...
[ 37811, 16598, 388, 19482, 1527, 500, 38226, 9177, 287, 309, 22854, 37535, 526, 15931, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 628, 198, 4299, 25825, 62, 40890, 62, 23912, 1424, 7, 40890, 11, 14722, 11, 17593, 11, 16578, 283, 62,...
2.224021
4,571
from pymongo import MongoClient
[ 6738, 279, 4948, 25162, 1330, 42591, 11792 ]
4.428571
7
import numpy as np import torch from losses import mae_loss, mae_globalmean from utils.oct_utils import get_mask_rnfl from utils.utils import select_modalities, subsample GPU = 0 device = torch.device('cuda:' + str(GPU) if torch.cuda.is_available() else 'cpu') one_ = torch.tensor(1.0).to(device) zero_ = torch.tensor...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 198, 6738, 9089, 1330, 285, 3609, 62, 22462, 11, 285, 3609, 62, 20541, 32604, 198, 6738, 3384, 4487, 13, 38441, 62, 26791, 1330, 651, 62, 27932, 62, 35906, 2704, 198, 6738, 3384, ...
2.230838
5,558
from test import get_user_session, cassette from test.resources.documents import delete_all_documents, create_document, assert_core_document, assert_bib_document, \ assert_client_document, assert_tags_document, assert_all_document
[ 6738, 1332, 1330, 651, 62, 7220, 62, 29891, 11, 42812, 198, 6738, 1332, 13, 37540, 13, 15390, 2886, 1330, 12233, 62, 439, 62, 15390, 2886, 11, 2251, 62, 22897, 11, 6818, 62, 7295, 62, 22897, 11, 6818, 62, 65, 571, 62, 22897, 11, 3...
3.492754
69
from step_project.base_commands import ProjectCommand
[ 6738, 2239, 62, 16302, 13, 8692, 62, 9503, 1746, 1330, 4935, 21575, 628 ]
4.230769
13