content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import os import glob import subprocess from setuptools import setup, find_packages from distutils import log import sys BUILD_CUAEV = '--cuaev' in sys.argv if BUILD_CUAEV: sys.argv.remove('--cuaev') if not BUILD_CUAEV: log.warn("Will not install cuaev") # type: ignore with open("README.md", "r") as fh: ...
[ 11748, 28686, 198, 11748, 15095, 198, 11748, 850, 14681, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 6738, 1233, 26791, 1330, 2604, 198, 11748, 25064, 198, 198, 19499, 26761, 62, 43633, 14242, 53, 796, 705, 438, ...
2.392208
385
#!/usr/bin/env python3 from six.moves import getoutput import os.path from os import chdir directory = os.path.dirname(os.path.abspath(__file__)) chdir(directory) print('Working directory set to {}'.format(directory)) proto_path = os.path.join('..', 'schema') python_out = os.path.join('..', 'reblockstorer', 'proto')...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 2237, 13, 76, 5241, 1330, 651, 22915, 198, 11748, 28686, 13, 6978, 198, 6738, 28686, 1330, 442, 15908, 198, 198, 34945, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, ...
2.364116
379
# -*- coding: utf-8 -*- import sys import inspect import getopt import traceback from exceptions import * write = sys.stdout.write err = sys.stderr.write def trim(docstring): """Intelligently undent given docstring.""" if not docstring: return '' # Convert tabs to spaces (following the normal Python rules) ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 25064, 198, 11748, 10104, 198, 11748, 651, 8738, 198, 11748, 12854, 1891, 198, 198, 6738, 13269, 1330, 1635, 220, 628, 198, 13564, 796, 25064, 13, 19282, 448, ...
2.482143
728
# a = [-10, -2, 0, 5, 66, 77, 99, 102, 239, 567, 875, 934] # print(encontra_impares(a))
[ 2, 257, 796, 25915, 940, 11, 532, 17, 11, 657, 11, 642, 11, 7930, 11, 8541, 11, 7388, 11, 15143, 11, 32817, 11, 642, 3134, 11, 807, 2425, 11, 860, 2682, 60, 628, 198, 2, 3601, 7, 268, 3642, 430, 62, 11011, 3565, 7, 64, 4008 ]
1.934783
46
from .Collection import Collection from me.storage.data_config import DataType from datetime import datetime from me.logger import MeLogger, DEBUG
[ 6738, 764, 36307, 1330, 12251, 198, 6738, 502, 13, 35350, 13, 7890, 62, 11250, 1330, 6060, 6030, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 502, 13, 6404, 1362, 1330, 2185, 11187, 1362, 11, 16959, 628, 198 ]
3.921053
38
import sys from django.core.management.base import BaseCommand from ... import models from ...ocr import walk
[ 11748, 25064, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 2644, 1330, 4981, 198, 6738, 2644, 1696, 1330, 2513, 198 ]
4.074074
27
import requests as req import sys import json request = req.get('https://economia.awesomeapi.com.br/json/all') cotacoes = json.loads(request.text) consultas = ["USD", "ARS", "EUR", "BTC"] if(len(sys.argv) > 1): consultas = sys.argv[1:] print("1 BRL ==") exibeCotacoes(consultas)
[ 11748, 7007, 355, 43089, 198, 11748, 25064, 198, 11748, 33918, 198, 198, 25927, 796, 43089, 13, 1136, 10786, 5450, 1378, 13926, 544, 13, 707, 5927, 15042, 13, 785, 13, 1671, 14, 17752, 14, 439, 11537, 198, 25557, 330, 3028, 796, 33918, ...
2.456897
116
import logging import urllib import json import base64 import typing as t from galaxy.http import create_client_session, handle_exception from galaxy.api.errors import AccessDenied, AuthenticationRequired logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 11748, 2956, 297, 571, 198, 11748, 33918, 198, 11748, 2779, 2414, 198, 11748, 19720, 355, 256, 198, 198, 6738, 16161, 13, 4023, 1330, 2251, 62, 16366, 62, 29891, 11, 5412, 62, 1069, 4516, 198, 6738, 16161, 13, 15042, ...
3.701493
67
# -*- coding: utf-8 -*- from django.apps import AppConfig
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
2.565217
23
import progressbar import pythonwhois def is_registered(site): """Check if a domain has an WHOIS record.""" try: details = pythonwhois.get_whois(site) except pythonwhois.shared.WhoisException as e: print(f"Exception for {site}") print(e) return False return not details[...
[ 11748, 4371, 5657, 198, 11748, 21015, 8727, 271, 628, 198, 4299, 318, 62, 33736, 7, 15654, 2599, 198, 220, 220, 220, 37227, 9787, 611, 257, 7386, 468, 281, 19494, 1797, 1700, 526, 15931, 198, 220, 220, 220, 1949, 25, 198, 220, 220, ...
2.688266
571
""" zoom.tools """ import datetime import logging import os from markdown import Markdown from zoom.response import RedirectResponse import zoom.helpers from zoom.helpers import abs_url_for, url_for_page, url_for from zoom.utils import trim, dedup from zoom.render import apply_helpers one_day = datetime.timedelt...
[ 37811, 198, 220, 220, 220, 19792, 13, 31391, 198, 37811, 198, 198, 11748, 4818, 8079, 198, 11748, 18931, 198, 11748, 28686, 198, 198, 6738, 1317, 2902, 1330, 2940, 2902, 198, 6738, 19792, 13, 26209, 1330, 2297, 1060, 31077, 198, 11748, ...
2.369754
5,528
# -*- coding: utf-8 -*- import json import os import requests import urllib.request import time import re from bs4 import BeautifulSoup from slackclient import SlackClient from flask import Flask, request, make_response, render_template, jsonify from selenium import webdriver # 바꼈지롱 app = Flask(__name__) app.config['...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 7007, 198, 11748, 2956, 297, 571, 13, 25927, 198, 11748, 640, 198, 11748, 302, 198, 6738, 275, 82, 19, 1330, 23762, 50, 1048...
1.556164
730
"""A COCO annotation writer.""" import datetime import json from discolight.params.params import Params from .types import AnnotationWriter class COCO(AnnotationWriter): """A COCO annotation writer.""" def __init__(self, annotations_file): """Construct a COCO annotation writer.""" self.annot...
[ 37811, 32, 327, 4503, 46, 23025, 6260, 526, 15931, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 6738, 1221, 349, 432, 13, 37266, 13, 37266, 1330, 2547, 4105, 198, 6738, 764, 19199, 1330, 1052, 38983, 34379, 628, 198, 4871, 327, 4503,...
1.924081
3,293
from django.conf import settings from django.utils.module_loading import import_string from rest_framework.exceptions import AuthenticationFailed from game.authentication.base_websocket_authentication import ( AbstractWebsocketAuthentication, ) from game.models import AppUser def authenticate_websocket(auth_head...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 26791, 13, 21412, 62, 25138, 1330, 1330, 62, 8841, 198, 6738, 1334, 62, 30604, 13, 1069, 11755, 1330, 48191, 37, 6255, 198, 198, 6738, 983, 13, 41299, 3299, 13, 8...
3.012012
333
import spacy # Carga el modelo en_core_web_sm nlp = spacy.load("en_core_web_sm") # Imprime en pantalla los nombres de los componentes del pipeline print(nlp.pipe_names) # Imprime en pantalla el pipeline entero de tuples (name, component) print(nlp.pipeline)
[ 11748, 599, 1590, 198, 198, 2, 327, 853, 64, 1288, 2746, 78, 551, 62, 7295, 62, 12384, 62, 5796, 198, 21283, 79, 796, 599, 1590, 13, 2220, 7203, 268, 62, 7295, 62, 12384, 62, 5796, 4943, 198, 198, 2, 1846, 35505, 551, 15857, 30315...
2.747368
95
#!/usr/bin/env python import lib_robotis_xm430 as xm430 import sys import time # import rospy # from o2as_precision_gripper.srv import * ###################################################################################################### #outer gripper related functions #################################...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 9195, 62, 305, 13645, 271, 62, 87, 76, 31794, 355, 2124, 76, 31794, 198, 11748, 25064, 198, 11748, 640, 198, 2, 1330, 686, 2777, 88, 198, 2, 422, 267, 17, 292, 62, 3866...
3.658182
275
from . import test_adapters from . import test_explore from . import test_image from . import test_metrics from . import test_missing from . import test_numeric from . import test_shaping from . import test_text
[ 6738, 764, 1330, 1332, 62, 324, 12126, 198, 6738, 764, 1330, 1332, 62, 20676, 382, 198, 6738, 764, 1330, 1332, 62, 9060, 198, 6738, 764, 1330, 1332, 62, 4164, 10466, 198, 6738, 764, 1330, 1332, 62, 45688, 198, 6738, 764, 1330, 1332, ...
3.47541
61
""" Provide quantilized form of torch.nn.modules.activation """ import torch import torch.nn as nn import torch.nn.functional as F from .number import directquant, alldirectquant
[ 37811, 198, 15946, 485, 5554, 346, 1143, 1296, 286, 28034, 13, 20471, 13, 18170, 13, 48545, 198, 37811, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 6...
3.45283
53
import dbus import logging import RequestQueue log = logging.getLogger(__name__) ## The main interface for the Charon file service. # # This contains the main interface definition for the Charon file service. # It is exposed over DBus as the "nl.ultimaker.charon" service, with # "/nl/ultimaker/charon" as its ...
[ 11748, 288, 10885, 198, 11748, 18931, 198, 198, 11748, 19390, 34991, 198, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 2235, 220, 383, 1388, 7071, 329, 262, 3178, 261, 2393, 2139, 13, 198, 2, 198, 2,...
3.376884
199
from HelpersCsv import ParseCsv, WriteCsv import argparse import sys parser = argparse.ArgumentParser() parser.add_argument('--path', '-p', help="path of input data", type=str) parser.add_argument('--hasheaders', '-hh', help="if file has headers", type=int, default=0) parser.add_argument('--distance', '-d', help="pass...
[ 6738, 10478, 364, 34, 21370, 1330, 2547, 325, 34, 21370, 11, 19430, 34, 21370, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 697...
2.822511
231
#!/usr/bin/python # Launcher for building vcl import os import subprocess import sys def main(): """ VCL builder script """ # find path to helper script script_path = os.path.dirname(os.path.abspath(sys.argv[0])) vcl_build = f"{script_path}/{sys.argv[1]}" # find path to vpp/vcl source code ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 26385, 329, 2615, 410, 565, 198, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 25064, 628, 198, 4299, 1388, 33529, 198, 220, 220, 220, 37227, 569, 5097, 27098, 4226, 37227, 6...
2.3213
277
import hoomd from hoomd import md hoomd.context.initialize() # Create a 10x10x10 simple cubic lattice of particles with type name A hoomd.init.create_lattice( unitcell=hoomd.lattice.sc(a=2.0, type_name='A'), n=10) # Specify Lennard-Jones interactions between particle pairs nl = md.nlist.cell() lj = md.pair.lj(r_c...
[ 11748, 289, 4207, 67, 198, 6738, 289, 4207, 67, 1330, 45243, 198, 71, 4207, 67, 13, 22866, 13, 36733, 1096, 3419, 198, 198, 2, 13610, 257, 838, 87, 940, 87, 940, 2829, 27216, 47240, 501, 286, 13166, 351, 2099, 1438, 317, 198, 71, ...
2.299685
317
## # The MIT License (MIT) # # Copyright (c) 2016 Stefan Wendler # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy,...
[ 2235, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 1584, 28842, 21042, 1754, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 4...
3.533505
388
from unittest import mock from know_me.profile import models def test_get_media_resource_upload_path(): """ Media Resources should be stored with their original filename in a folder titled ``know-me/users/{id}/media-resources``. """ resource = mock.Mock(name="Mock Media Resource") resource.km...
[ 6738, 555, 715, 395, 1330, 15290, 198, 198, 6738, 760, 62, 1326, 13, 13317, 1330, 4981, 628, 198, 4299, 1332, 62, 1136, 62, 11431, 62, 31092, 62, 25850, 62, 6978, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 6343, 13864, 81...
2.803398
412
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ########################################### # (c) 2016-2020 Polyvios Pratikakis # polyvios@ics.forth.gr ########################################### #__all__ = ['utils'] ''' empty '''
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 7804, 21017, 198, 2, 357, 66, 8, 1584, 12, 42334, 12280, 85, 4267, 1736, 265, 1134, 27321, 198, 2, 7514, ...
3.121622
74
# coding=utf-8 """List II - In-place functions: Reverse, Sort and Extend. Examples with in-place list functions. In-place functions changes the original object and return None after calling it. """ def do_something_magical(animes, tvshows): """Use some list methods.""" animes.reverse() print("Inv...
[ 2, 19617, 28, 40477, 12, 23, 198, 37811, 8053, 2873, 532, 554, 12, 5372, 5499, 25, 31849, 11, 33947, 290, 46228, 13, 628, 220, 220, 220, 21066, 351, 287, 12, 5372, 1351, 5499, 13, 554, 12, 5372, 5499, 2458, 198, 220, 220, 220, 262...
2.8
525
import ald import numpy as np import h5py U0 = 1.0 tauR = 1.2 alpha = 1.2 particle = ald.Pareto(U0=U0, tauR=tauR, alpha=alpha) flow = ald.ZeroVelocity() domain = ald.Box() ic = ald.InitialConfig( x=ald.Uniform(domain.left, domain.right), y=ald.Uniform(domain.left, domain.right), theta=ald.Uniform(0, 2 *...
[ 11748, 257, 335, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 289, 20, 9078, 198, 198, 52, 15, 796, 352, 13, 15, 198, 83, 559, 49, 796, 352, 13, 17, 198, 26591, 796, 352, 13, 17, 198, 3911, 1548, 796, 257, 335, 13, 47, 533, ...
2.302829
601
#Skrip alfa from requests import get from bs4 import BeautifulSoup as bs import pandas as pd hari = input('Tanggal? (dua digit): \n') bulan = input('Bulan? (dua digit): \n') tahun = input('Tahun? (empat digit): \n') x = bulan+'/'+hari+'/'+tahun halaman_detik = [str(i) for i in range(1, 21)] #https://news.detik.com/...
[ 2, 15739, 5528, 435, 13331, 198, 198, 6738, 7007, 1330, 651, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 355, 275, 82, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 49573, 796, 5128, 10786, 43909, 13528, 30, 357, 646, 64, 1683...
2.006849
730
from aws_cdk import ( aws_ec2 as ec2, core )
[ 6738, 3253, 82, 62, 10210, 74, 1330, 357, 198, 220, 220, 220, 3253, 82, 62, 721, 17, 355, 9940, 17, 11, 198, 220, 220, 220, 4755, 198, 8, 198 ]
1.827586
29
#!/usr/bin/python # 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 writi...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 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, 26...
2.883721
344
from typing import List, Optional import signal import sys from . import __version__, __title__ from .api import Api from .github_handler import GithubHandler from .config_creator import ConfigCreator from .lib.ci_exception import SilentAbortException from .lib.gravity import define_arguments_recursive, construct_comp...
[ 6738, 19720, 1330, 7343, 11, 32233, 198, 11748, 6737, 198, 11748, 25064, 198, 198, 6738, 764, 1330, 11593, 9641, 834, 11, 11593, 7839, 834, 198, 6738, 764, 15042, 1330, 5949, 72, 198, 6738, 764, 12567, 62, 30281, 1330, 38994, 25060, 198...
3.607143
196
# -*- coding: utf-8 -*- # __author__ : py_lee # __time__ : '18-12-14 下午2:54' import re from rest_framework import serializers from rest_framework.validators import UniqueTogetherValidator from user_operation.models import UserFav, UserLeavingMessage, UserAddress from goods.serializer import UserFavGoodsSerializers f...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 11593, 9800, 834, 1058, 12972, 62, 7197, 198, 2, 11593, 2435, 834, 220, 220, 1058, 705, 1507, 12, 1065, 12, 1415, 220, 10310, 233, 39355, 230, 17, 25, 4051, 6, 19...
2.011396
1,053
from .utils import get_gitignored EXCLUDE_DOC = {'*.md', '*.doc', '*.docx', '*.txt', '*.pdf', } EXCLUDE_CONFIG = {'*.cfg', '*.ini', '*.conf', } EXCLUDE_YAML = {'*.yml', '*.yaml', } EXCLUDE_BASH = {'*.sh', } EXCLUDE_GIT = {'.git', '.gitignore', } EXCLUDE_DOCKER = {'Dockerfile', '.dockerignore', } EXCLUDE_VIRTUALENV ...
[ 6738, 764, 26791, 1330, 651, 62, 18300, 570, 1850, 628, 198, 6369, 5097, 52, 7206, 62, 38715, 796, 1391, 6, 24620, 9132, 3256, 705, 24620, 15390, 3256, 705, 24620, 15390, 87, 3256, 705, 24620, 14116, 3256, 705, 24620, 12315, 3256, 1782,...
1.990138
507
#Source: http://code.activestate.com/recipes/578948-flattening-an-arbitrarily-nested-list-in-python/ def flatten(lis): """Given a list, possibly nested to any level, return it flattened.""" new_lis = [] for item in lis: if type(item) == type([]): new_lis.extend(flatten(item)) el...
[ 198, 2, 7416, 25, 2638, 1378, 8189, 13, 15791, 44146, 13, 785, 14, 8344, 18636, 14, 3553, 4531, 2780, 12, 2704, 1078, 3101, 12, 272, 12, 283, 2545, 39000, 12, 77, 7287, 12, 4868, 12, 259, 12, 29412, 14, 198, 4299, 27172, 268, 7, ...
2.26506
166
from django.urls import path, re_path from . import views app_name = 'categorias' urlpatterns = [ path('', views.index, name='index'), path('crear_categoria', views.crear_categoria, name='crear_categoria'), path('process_new_categories', views.process_new_categories, name='process_new_categories'), ...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 302, 62, 6978, 201, 198, 6738, 764, 1330, 5009, 201, 198, 201, 198, 1324, 62, 3672, 796, 705, 66, 47467, 4448, 6, 201, 198, 6371, 33279, 82, 796, 685, 201, 198, 220, 220, 220, 3108...
2.643275
342
""" These meta-datasources operate on :class:`revscoring.Datasource`'s that return a flat `dict` of key-value pairs (aka a "table") and filter ("select") keys and/or weight values. .. autoclass:: revscoring.datasources.meta.selectors.tfidf .. autoclass:: revscoring.datasources.meta.selectors.filter_keys """ from co...
[ 37811, 198, 4711, 13634, 12, 19608, 292, 2203, 8076, 319, 1058, 4871, 25, 63, 18218, 46536, 13, 27354, 292, 1668, 63, 6, 82, 326, 1441, 198, 64, 6228, 4600, 11600, 63, 286, 1994, 12, 8367, 14729, 357, 8130, 257, 366, 11487, 4943, 29...
2.637821
624
import argparse import logging import os import time from .helper import notify from .state import QuitNow, TimedState if __name__ == '__main__': logging.basicConfig(format='%(asctime)s: %(message)s', level=logging.INFO) main()
[ 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 640, 198, 198, 6738, 764, 2978, 525, 1330, 19361, 198, 6738, 764, 5219, 1330, 48887, 3844, 11, 5045, 276, 9012, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, ...
2.892857
84
import os import scipy.misc # import numpy as np from model import DCGAN from utils import pp, visualize, to_json, show_all_variables import tensorflow as tf flags = tf.app.flags flags.DEFINE_integer("epoch", 25, "Epoch to train [25]") flags.DEFINE_float("learning_rate", 0.0002, "Learning rate of for adam [0.0002]")...
[ 11748, 28686, 198, 11748, 629, 541, 88, 13, 44374, 1303, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 2746, 1330, 6257, 45028, 198, 6738, 3384, 4487, 1330, 9788, 11, 38350, 11, 284, 62, 17752, 11, 905, 62, 439, 62, 25641, 2977,...
3.144737
532
from .base_3droi_head import Base3DRoIHead from .bbox_heads import PartA2BboxHead from .mask_heads import PointwiseSemanticHead from .part_aggregation_roi_head import PartAggregationROIHead from .roi_extractors import Single3DRoIAwareExtractor, SingleRoIExtractor __all__ = [ 'Base3DRoIHead', 'PartAggregationROIHea...
[ 6738, 764, 8692, 62, 18, 22285, 72, 62, 2256, 1330, 7308, 18, 7707, 78, 40, 13847, 198, 6738, 764, 65, 3524, 62, 16600, 1330, 2142, 32, 17, 33, 3524, 13847, 198, 6738, 764, 27932, 62, 16600, 1330, 6252, 3083, 13900, 5109, 13847, 198...
2.801325
151
from pathlib import Path import pytest @pytest.fixture # type: ignore
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 12972, 9288, 628, 198, 31, 9078, 9288, 13, 69, 9602, 220, 1303, 2099, 25, 8856, 198 ]
3.083333
24
# path: lib/processors # filename: loop.py # description: WSGI application image file processors ''' # make python2 strings and dictionaries behave like python3 from __future__ import unicode_literals try: from builtins import dict, str except ImportError: from __builtin__ import dict, str Copyright 2017 Mark M...
[ 2, 3108, 25, 9195, 14, 14681, 669, 198, 2, 29472, 25, 9052, 13, 9078, 198, 2, 6764, 25, 25290, 18878, 3586, 2939, 2393, 20399, 198, 7061, 6, 220, 198, 2, 787, 21015, 17, 13042, 290, 48589, 3166, 17438, 588, 21015, 18, 198, 6738, 1...
3.478395
324
''' Copyright 2015 Serendio Inc. Author - Satish Palaniappan 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 ...
[ 7061, 6, 198, 15269, 1853, 30175, 358, 952, 3457, 13, 198, 13838, 532, 7031, 680, 3175, 5411, 381, 272, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 407, 779, 428, 2...
2.620262
1,372
from pgpelib.restore import to_torch_module from typing import List, Optional import sys import torch from torch import nn import numpy as np import gym import pybullet_envs from time import sleep from copy import deepcopy if __name__ == "__main__": main(*(sys.argv[1:]))
[ 6738, 23241, 30242, 571, 13, 2118, 382, 1330, 284, 62, 13165, 354, 62, 21412, 198, 6738, 19720, 1330, 7343, 11, 32233, 198, 11748, 25064, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 11748, 299, 32152, 355, 45941, 198, 11748...
3.122222
90
import pickle import numpy as np # import garage.misc.logger as logger from dowel import logger from dowel import tabular import ast_toolbox.mcts.MDP as MDP class ASTParams: """Structure that stores internal parameters for AST. Parameters ---------- max_steps : int, optional The maximum sea...
[ 11748, 2298, 293, 198, 198, 11748, 299, 32152, 355, 45941, 198, 2, 1330, 15591, 13, 44374, 13, 6404, 1362, 355, 49706, 198, 6738, 47276, 417, 1330, 49706, 198, 6738, 47276, 417, 1330, 7400, 934, 198, 198, 11748, 6468, 62, 25981, 3524, ...
2.174012
3,086
# pylama:ignore=E722,E303 import json import sys import re from functools import update_wrapper from datetime import datetime import urllib.error import urllib.parse import urllib.request import time import m3u8
[ 2, 279, 2645, 1689, 25, 46430, 28, 36, 22, 1828, 11, 36, 22572, 198, 11748, 33918, 198, 11748, 25064, 198, 11748, 302, 198, 6738, 1257, 310, 10141, 1330, 4296, 62, 48553, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 2956, 297,...
3.013889
72
import os import matplotlib as mpl import matplotlib.pyplot as plt from .simulator import Simulator
[ 11748, 28686, 198, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 6738, 764, 14323, 8927, 1330, 13942, 628, 198 ]
3.25
32
# Copyright 2020 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 12131, 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, 13789, 13, 198, 2, 921, 743, 733...
3.702857
350
#!/usr/bin/python """ ZetCode wxPython tutorial In this example we work with wx.KeyEvent. author: Jan Bodnar website: www.zetcode.com last modified: April 2018 """ import wx if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 37811, 198, 57, 316, 10669, 266, 87, 37906, 11808, 198, 198, 818, 428, 1672, 356, 670, 351, 266, 87, 13, 9218, 9237, 13, 198, 198, 9800, 25, 2365, 26285, 23955, 198, 732, 12485, 25, ...
2.638554
83
#! /usr/bin/env python # www7.py -- display the contents of a URL in a Text widget # - set window title # - make window resizable # - update display while reading import sys import urllib from Tkinter import * main()
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 7324, 22, 13, 9078, 1377, 3359, 262, 10154, 286, 257, 10289, 287, 257, 8255, 26295, 198, 2, 532, 900, 4324, 3670, 198, 2, 532, 787, 4324, 581, 13821, 198, 2, 532, 4296, ...
3.235294
68
#!/usr/bin/env python # coding: utf-8 # Copyright © 2015 Wieland Hoffmann # License: MIT, see LICENSE for details from flask.ext.sqlalchemy import SQLAlchemy from sqlalchemy.dialects.postgresql import JSONB, UUID db = SQLAlchemy()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 15069, 10673, 1853, 370, 8207, 392, 21890, 9038, 198, 2, 13789, 25, 17168, 11, 766, 38559, 24290, 329, 3307, 198, 6738, 42903, 13, 2302, 13, ...
2.987179
78
import torch import torch.nn as nn import numpy as np import cv2 import matplotlib.pyplot as plt a=torch.randn(6,6,3) a_s = a.numpy() im=cv2.imread('./assets/dog.jpg') plt.imshow(im) plt.show()
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 64, 28, 13165, 354, 13, 25192, 77, 7, 21,...
2.142857
91
# -*- coding: utf-8 -*- from jetfactory.schema import fields, Schema
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 12644, 69, 9548, 13, 15952, 2611, 1330, 7032, 11, 10011, 2611, 628, 628 ]
2.517241
29
import sympy
[ 11748, 10558, 88, 628, 628 ]
3.2
5
# Generated by Django 3.2.2 on 2021-05-15 19:29 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 17, 319, 33448, 12, 2713, 12, 1314, 678, 25, 1959, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 142...
3.019231
52
import os.path from urllib.parse import urlparse class Link: """Represents a Link on a page, links are equivalent in the following circumstances: * They have the same domain * They have the same path (after being resolved to an absolute path) * They may have diffenent schemes (so https ...
[ 11748, 28686, 13, 6978, 198, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 628, 628, 198, 4871, 7502, 25, 198, 220, 220, 220, 37227, 6207, 6629, 257, 7502, 319, 257, 2443, 11, 6117, 389, 7548, 287, 262, 1708, 5917, 25, 1...
2.391381
2,854
import os from utils import tsv, www from gig2 import _utils from gig2._utils import log
[ 11748, 28686, 198, 198, 6738, 3384, 4487, 1330, 256, 21370, 11, 7324, 198, 198, 6738, 12526, 17, 1330, 4808, 26791, 198, 6738, 12526, 17, 13557, 26791, 1330, 2604, 628 ]
3.172414
29
import onnx from onnx import optimizer from onnx import numpy_helper import numpy as np import argparse DATA_TYPES = { np.float32: 1, np.float16: 10 } if __name__ == "__main__": main()
[ 11748, 319, 77, 87, 198, 6738, 319, 77, 87, 1330, 6436, 7509, 198, 6738, 319, 77, 87, 1330, 299, 32152, 62, 2978, 525, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1822, 29572, 628, 198, 26947, 62, 9936, 47, 1546, 796, 1391, 198,...
2.348315
89
# Generated by Django 3.1.4 on 2022-03-06 18:34 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 19, 319, 33160, 12, 3070, 12, 3312, 1248, 25, 2682, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
3.019231
52
''' Created on Jun 28, 2017 @author: make ma ''' from threading import Thread class ServerProcess(Thread): ''' classdocs '''
[ 7061, 6, 198, 41972, 319, 7653, 2579, 11, 2177, 198, 198, 31, 9800, 25, 787, 17266, 198, 7061, 6, 198, 198, 6738, 4704, 278, 1330, 14122, 198, 198, 4871, 9652, 18709, 7, 16818, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 2...
2.257143
70
import inspect from collections.abc import Coroutine as CoroutineBase from functools import partial from types import CodeType, FunctionType from typing import Any
[ 11748, 10104, 198, 6738, 17268, 13, 39305, 1330, 2744, 28399, 355, 2744, 28399, 14881, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 3858, 1330, 6127, 6030, 11, 15553, 6030, 198, 6738, 19720, 1330, 4377, 628, 628, 628, 198 ]
4.358974
39
import os, json META = None PATH = os.path.dirname(os.path.realpath(__file__)) with open(f'{PATH}/META.json') as fp: META = json.load(fp) OUTPUT = [] for index in META: transmit_range = META[index]["transmit_range"] amount_nodes = META[index]["amount_nodes"] routing_protocol = META[index]["routing_p...
[ 11748, 28686, 11, 33918, 198, 198, 44, 20892, 796, 6045, 198, 34219, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 4008, 198, 198, 4480, 1280, 7, 69, 6, 90, 34219, 92, 14, 44, 20892, ...
2.052239
670
from src.database import SqliteDatabase
[ 6738, 12351, 13, 48806, 1330, 311, 13976, 578, 38105, 198, 197, 198, 197, 198, 197, 628, 197, 628 ]
2.777778
18
#!/usr/bin/env python3 import os import sys import time sys.path.append(os.getcwd()+'/CPDP') sys.path.append(os.getcwd()+'/JinEnv') sys.path.append(os.getcwd()+'/lib') import CPDP import JinEnv from casadi import * from scipy.integrate import solve_ivp import scipy.io as sio # ---------------------------------------l...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 1136, 66, 16993, 3419, 10, 26488, 34, 5760, 47, 11537, 198, 17597, 13, 6978, 13, 33...
2.67263
1,118
# simple math ab = input().split() cd = input().split() t = int(input()) dist_x = abs(int(ab[0]) - int(cd[0])) dist_y = abs(int(ab[1]) - int(cd[1])) dist = dist_x + dist_y if t >= dist and t % 2 == dist % 2: print("Y") else: print("N")
[ 2, 2829, 10688, 198, 198, 397, 796, 5128, 22446, 35312, 3419, 198, 10210, 796, 5128, 22446, 35312, 3419, 198, 83, 796, 493, 7, 15414, 28955, 198, 17080, 62, 87, 796, 2352, 7, 600, 7, 397, 58, 15, 12962, 532, 493, 7, 10210, 58, 15,...
2.245283
106
import requests
[ 11748, 7007, 198 ]
5.333333
3
from PyPDF3 import PdfFileReader, PdfFileWriter import tkinter as tk from tkinter import filedialog root = tk.Tk() root.withdraw() path = filedialog.askopenfilename() file = open(path, "rb") pdf = PdfFileReader(file) writer = PdfFileWriter() writer.appendPagesFromReader(pdf) metadata = pdf.getDocumentInfo() writer.a...
[ 6738, 9485, 20456, 18, 1330, 350, 7568, 8979, 33634, 11, 350, 7568, 8979, 34379, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 6738, 256, 74, 3849, 1330, 5717, 498, 519, 198, 198, 15763, 796, 256, 74, 13, 51, 74, 3419, 198, 15763, ...
2.832685
257
from __future__ import division import torch from torch import nn
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 628, 628 ]
3.888889
18
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-07-17 16:42 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 22, 319, 2177, 12, 2998, 12, 1558, 1467, 25, 3682, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.73913
69
from django.shortcuts import render, get_object_or_404 from django.db.models import Q from django.utils import timezone from rest_framework import pagination, generics, views, status, mixins from rest_framework.response import Response from rest_framework.views import APIView from rest_framework.parsers import JSONPar...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 651, 62, 15252, 62, 273, 62, 26429, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 198, 6738, 1334, 62, 30604, ...
3.905956
319
# niw import re from nltk.tokenize import sent_tokenize from string import punctuation from solvers.solver_helpers import RubertForMasking, AbstractSolver
[ 2, 299, 14246, 198, 198, 11748, 302, 198, 6738, 299, 2528, 74, 13, 30001, 1096, 1330, 1908, 62, 30001, 1096, 198, 6738, 4731, 1330, 21025, 2288, 198, 198, 6738, 1540, 690, 13, 82, 14375, 62, 16794, 364, 1330, 11667, 4835, 1890, 44, ...
3.291667
48
""" This module provides classes to create and manage transactions. """ import uuid import datetime from fintool.db import DbFactory from fintool.logging import LoggingHelper class Error(Exception): """Base class for all errors in this module. """ class MissingFieldError(Error): """ Raised when t...
[ 37811, 198, 1212, 8265, 3769, 6097, 284, 2251, 290, 6687, 8945, 13, 198, 37811, 628, 198, 11748, 334, 27112, 198, 11748, 4818, 8079, 198, 198, 6738, 277, 600, 970, 13, 9945, 1330, 360, 65, 22810, 198, 6738, 277, 600, 970, 13, 6404, ...
2.198944
3,408
from algoplex.api.common.exchange_access import ExchangeAccess from algoplex.api.common.maket_data_subscriber import MarketDataSubscriber from algoplex.api.order import Order from algoplex.api.execution import Execution import time
[ 6738, 435, 70, 643, 87, 13, 15042, 13, 11321, 13, 1069, 3803, 62, 15526, 1330, 12516, 15457, 198, 6738, 435, 70, 643, 87, 13, 15042, 13, 11321, 13, 76, 461, 316, 62, 7890, 62, 7266, 1416, 24735, 1330, 5991, 6601, 7004, 1416, 24735, ...
3.236111
72
import pytest import fnmatch import os from pathlib import Path from eobox.sampledata import get_dataset from eobox.vector import convert_polygons_to_lines from eobox.vector import calc_distance_to_border @pytest.fixture
[ 11748, 12972, 9288, 198, 11748, 24714, 15699, 198, 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 304, 672, 1140, 13, 37687, 10137, 1045, 1330, 651, 62, 19608, 292, 316, 198, 6738, 304, 672, 1140, 13, 31364, 1330, 103...
3.026667
75
#x= 'Global x' print("\nTesting Global and Local Scope") test() print(x) m=min([3,4,5,6]) print(m) print("\nTesting Enclosing Scope") outer()
[ 2, 87, 28, 705, 22289, 2124, 6, 198, 4798, 7203, 59, 77, 44154, 8060, 290, 10714, 41063, 4943, 198, 9288, 3419, 198, 4798, 7, 87, 8, 198, 198, 76, 28, 1084, 26933, 18, 11, 19, 11, 20, 11, 21, 12962, 198, 4798, 7, 76, 8, 198, ...
2.360656
61
''' Created on Sep 29, 2017 @author: Liza Dayoub ''' import requests from requests.packages.urllib3 import disable_warnings from requests.packages.urllib3.exceptions import InsecureRequestWarning class ApiSession(object): ''' classdocs ''' def __init__(self, **kwargs): ''' Construct...
[ 7061, 6, 198, 41972, 319, 8621, 2808, 11, 2177, 198, 198, 31, 9800, 25, 406, 23638, 3596, 12944, 198, 7061, 6, 198, 198, 11748, 7007, 198, 6738, 7007, 13, 43789, 13, 333, 297, 571, 18, 1330, 15560, 62, 40539, 654, 198, 6738, 7007, ...
2.223386
573
# Entry Point ####################################################### lengths = list(map(int, open('day10.txt').read().split(','))) string = hash(256, lengths) print(string[0] * string[1]) # = 46600
[ 198, 2, 21617, 6252, 1303, 29113, 14468, 4242, 2235, 198, 198, 13664, 82, 796, 1351, 7, 8899, 7, 600, 11, 1280, 10786, 820, 940, 13, 14116, 27691, 961, 22446, 35312, 7, 41707, 22305, 198, 8841, 796, 12234, 7, 11645, 11, 20428, 8, 19...
3.311475
61
import os import subprocess import sys import git from tools.config import Config from tools.logger import log_error, log_info def exit_if_not_executed_in_ide_environment(): '''This part checks if environment variables is set or not.''' if not ("OSSRH_USER" and "OSSRH_PASSWD" and "GPG_SIGNING_PASSWD" and "B...
[ 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 198, 11748, 17606, 198, 198, 6738, 4899, 13, 11250, 1330, 17056, 198, 6738, 4899, 13, 6404, 1362, 1330, 2604, 62, 18224, 11, 2604, 62, 10951, 628, 198, 4299, 8420, 62, 361, ...
2.665012
403
#!/usr/bin/env python from flask import Flask, request, jsonify import numpy as np import deco import requests import csv import json import argparse parser = argparse.ArgumentParser(description='Exports keras model to serving format') parser.add_argument('--port', action="store", dest="port", default=4000) parser.add...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 42903, 1330, 46947, 11, 2581, 11, 33918, 1958, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 875, 78, 198, 11748, 7007, 198, 11748, 269, 21370, 198, 11748, 33918, 198, 11748, 182...
3.028391
317
import csv import time import json import requests import urllib3 import importlib import sys import copy import arrow import os import pytz import configparser MAX_RETRY_NUM = 10 RETRY_WAIT_TIME_IN_SEC = 30 MAX_MESSAGE_LENGTH = 10000 MAX_DATA_SIZE = 4000000 MAX_PACKET_SIZE = 5000000 def send_data(log_data): """ ...
[ 11748, 269, 21370, 198, 11748, 640, 198, 11748, 33918, 198, 11748, 7007, 198, 11748, 2956, 297, 571, 18, 198, 11748, 1330, 8019, 198, 11748, 25064, 198, 11748, 4866, 198, 11748, 15452, 198, 11748, 28686, 198, 11748, 12972, 22877, 198, 117...
2.069817
1,418
import pytest @pytest.mark.skip('not implemented')
[ 11748, 12972, 9288, 628, 198, 31, 9078, 9288, 13, 4102, 13, 48267, 10786, 1662, 9177, 11537, 198 ]
3.117647
17
# -*-coding:utf-8 -*- """ 一个函数包括输入参数和输出参数 """ # 定义函数 # 调用函数 result = calulus(2) print(result) # 参数必须要正确地写入函数中,函数的参数也可以为多个 def fruit_function(fruit1, fruit2): """ fruits = fruit1 + " " + fruit2 return fruits """ lst = []; lst.append(fruit1) lst.append(fruit2) return lst # 调用函数 r...
[ 2, 532, 9, 12, 66, 7656, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 31660, 10310, 103, 49035, 121, 46763, 108, 44293, 227, 162, 233, 105, 164, 122, 241, 17739, 98, 20998, 224, 46763, 108, 161, 240, 234, 164, 122, 241, ...
1.388471
798
from . import class_
[ 6738, 764, 1330, 1398, 62, 628 ]
3.666667
6
# # 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 # ...
[ 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, ...
3.341121
214
#!/usr/bin/env python3 import argparse import asyncio import json import logging import os import socket import ssl import sys import time from queue import Queue import paho.mqtt.client as mqtt SERVER_ADDRESS = ('localhost', 2598) # Logging Configuration logging.basicConfig(level=logging.INFO, stream=sys.stdout) lo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 1822, 29572, 198, 11748, 30351, 952, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 17802, 198, 11748, 264, 6649, 198, 11748, 25064, 198, 11748, 640, 198, ...
1.876097
4,899
#!/usr/bin/env python # coding: utf-8 # In[ ]: import tweepy import pandas as pd import numpy as np import webbrowser import time from tweepy import OAuthHandler import json import csv import re import string import os # In[ ]: key = "VEyxpXLGHG9USYhM7spHVKl36" secret = "FG61nlBuLR7mb6UCPGxHH4UdMqwYNwL6aFhDt9gQJ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 2361, 25, 628, 198, 11748, 4184, 538, 88, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748...
2.239852
1,355
expected_output = { "version": { "build_time": "08:13:43 Apr 7, 2021", "firmware_ver": "18r.1.00h", "install_time": "07:14:32 Jun 1, 2021", "slot": { "L1/0": { "name": "L1/0", "primary_ver": "18r.1.00h", "secondary_ver": "...
[ 40319, 62, 22915, 796, 1391, 198, 220, 220, 220, 366, 9641, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 11249, 62, 2435, 1298, 366, 2919, 25, 1485, 25, 3559, 2758, 220, 767, 11, 33448, 1600, 198, 220, 220, 220, 220, 2...
1.435831
1,535
from .FPN import * from .PAN import *
[ 6738, 764, 5837, 45, 1330, 1635, 220, 198, 6738, 764, 47, 1565, 1330, 1635, 220 ]
2.6
15
def main(): """Generate reStructuredText README from Markdown. The ``main()`` function is also registered in the setup entry points. Convertion example:: import ipster.command_line ipster.command_line.main() """ readme_in = 'README.md' readme_out = 'README.rst' try: ...
[ 4299, 1388, 33529, 198, 220, 220, 220, 37227, 8645, 378, 302, 44909, 1522, 8206, 20832, 11682, 422, 2940, 2902, 13, 198, 220, 220, 220, 383, 7559, 12417, 3419, 15506, 2163, 318, 635, 6823, 287, 262, 9058, 5726, 2173, 13, 628, 220, 220...
2.29646
226
#!/usr/bin/env python # Thanks to https://github.com/ritchielawrence/cmdow # For providing help for treating Win32 API import re import os from argparse import ArgumentParser import win32gui import win32api import win32console import win32process from win32com.client import GetObject from win_maximize.parent_tree ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 6930, 284, 3740, 1378, 12567, 13, 785, 14, 46510, 8207, 707, 6784, 14, 28758, 322, 198, 2, 1114, 4955, 1037, 329, 13622, 7178, 2624, 7824, 198, 198, 11748, 302, 198, 11748, 2...
3.210191
157
import json from django import template register = template.Library() @register.filter
[ 11748, 33918, 198, 198, 6738, 42625, 14208, 1330, 11055, 198, 198, 30238, 796, 11055, 13, 23377, 3419, 628, 198, 31, 30238, 13, 24455, 198 ]
3.791667
24
from raccgen import generate build = generate.build pair = generate.racc
[ 6738, 3444, 66, 5235, 1330, 7716, 198, 198, 11249, 796, 7716, 13, 11249, 198, 24874, 796, 7716, 13, 81, 4134 ]
3.65
20
from django.db import models from django.core.exceptions import ValidationError from django.core.validators import MaxValueValidator, MinValueValidator import uuid # def validate_color(color): # match = re.search(r'^#(?:[0-9a-fA-F]{3}){1,2}$', color) # if match == False: # raise ValidationError( # ...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 6738, 42625, 14208, 13, 7295, 13, 12102, 2024, 1330, 5436, 11395, 47139, 1352, 11, 1855, 11395, 47139, 1352, 198,...
1.801325
906
from __future__ import absolute_import, print_function, unicode_literals from wolframclient.language.expression import WLInputExpression, WLSymbolFactory wl = WLSymbolFactory() """A factory of :class:`~wolframclient.language.expression.WLSymbol` instances without any particular context. This instance of :class:`~wol...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 17481, 859, 16366, 13, 16129, 13, 38011, 1330, 370, 43, 20560, 16870, 2234, 11, 370, 6561, 88, 23650, 22810, 198, 198...
3.083218
721
import time from typing import Iterable, Optional, Sequence import orjson from django.http import HttpRequest, HttpResponse from django.utils.translation import ugettext as _ from zerver.decorator import REQ, has_request_variables, internal_notify_view, process_client from zerver.lib.response import json_error, json_...
[ 11748, 640, 198, 6738, 19720, 1330, 40806, 540, 11, 32233, 11, 45835, 198, 198, 11748, 393, 17752, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 18453, 11, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 3...
3.080702
285
"""Accessors for NAMD FEP datasets. """ from os.path import dirname, join from glob import glob from .. import Bunch def load_tyr2ala(): """Load the NAMD tyrosine to alanine mutation dataset. Returns ------- data : Bunch Dictionary-like object, the interesting attributes are: - 'da...
[ 37811, 15457, 669, 329, 399, 28075, 376, 8905, 40522, 13, 198, 198, 37811, 198, 198, 6738, 28686, 13, 6978, 1330, 26672, 3672, 11, 4654, 198, 6738, 15095, 1330, 15095, 198, 198, 6738, 11485, 1330, 347, 3316, 198, 198, 4299, 3440, 62, ...
2.368732
339
import pandas as pd import ta # Load data df = pd.read_csv('ui.csv', sep=',') # Clean nan values df = ta.utils.dropna(df) print('roc') print(ta.momentum.roc(close=df['close']),40) print('-----------------------------------') print('rsi') print(ta.momentum.rsi(close=df['close']),14) print('---------------------------...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 20486, 198, 198, 2, 8778, 1366, 198, 7568, 796, 279, 67, 13, 961, 62, 40664, 10786, 9019, 13, 40664, 3256, 41767, 28, 3256, 11537, 198, 198, 2, 5985, 15709, 3815, 198, 7568, 796, 20486, 1...
3.132609
460
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: dpaslaru # @Date: 2014-09-17 18:36:03 # @Last Modified by: dpaslaru # @Last Modified time: 2014-09-17 19:40:59
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 13838, 25, 288, 44429, 75, 11493, 198, 2, 2488, 10430, 25, 220, 220, 1946, 12, 2931, 12, 1558, 1248, 25, 2...
2.177215
79
#!/usr/bin/env python3 """ Script for extracting a JSON payload for plotting from VarScan VCF files annotated with VEP. Only samples with calls are returned. If a file containing Ensembl IDs (one per line) is supplied, only records associated with the IDs are returned. Requirements: * Python 3.x * PyVCF 0.6...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 198, 7391, 329, 37895, 257, 19449, 21437, 329, 29353, 422, 12372, 33351, 569, 22495, 3696, 198, 34574, 515, 351, 569, 8905, 13, 198, 198, 10049, 8405, 351, 3848, 389, 4...
2.057793
5,935
import simuvex from itertools import count fastpath_data_counter = count() #pylint:disable=arguments-differ from simuvex.s_options import ABSTRACT_MEMORY, CGC_NO_SYMBOLIC_RECEIVE_LENGTH
[ 11748, 985, 45177, 87, 198, 6738, 340, 861, 10141, 1330, 954, 198, 198, 7217, 6978, 62, 7890, 62, 24588, 796, 954, 3419, 198, 220, 220, 220, 1303, 79, 2645, 600, 25, 40223, 28, 853, 2886, 12, 26069, 263, 198, 198, 6738, 985, 45177, ...
2.594595
74
import datetime data = datetime.datetime.now() data1 = data.strftime("%d-%m-%Y %H:%M:%S") import pandas as pd url = 'https://raw.githubusercontent.com/AlanTurist/Greece_covid19/master/region_greece.csv' df = pd.read_csv(url,index_col=0, sep=",")
[ 11748, 4818, 8079, 198, 7890, 796, 4818, 8079, 13, 19608, 8079, 13, 2197, 3419, 198, 7890, 16, 796, 1366, 13, 2536, 31387, 7203, 4, 67, 12, 4, 76, 12, 4, 56, 4064, 39, 25, 4, 44, 25, 4, 50, 4943, 198, 198, 11748, 19798, 292, 3...
2.320755
106