content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from mitmproxy.test import tflow, taddons from mitmproxy.addons.comment import Comment
[ 6738, 10255, 76, 36436, 13, 9288, 1330, 256, 11125, 11, 256, 39996, 198, 6738, 10255, 76, 36436, 13, 39996, 13, 23893, 1330, 18957, 628 ]
3.666667
24
# This file is MACHINE GENERATED! Do not edit. # Generated by: tensorflow/tools/api/generator/create_python_api.py script. """Home of estimator related functions. """ from __future__ import print_function from tensorflow.python.estimator.estimator_lib import model_to_estimator del print_function
[ 2, 770, 2393, 318, 337, 16219, 8881, 24700, 1137, 11617, 0, 2141, 407, 4370, 13, 198, 2, 2980, 515, 416, 25, 11192, 273, 11125, 14, 31391, 14, 15042, 14, 8612, 1352, 14, 17953, 62, 29412, 62, 15042, 13, 9078, 4226, 13, 198, 37811, ...
3.135417
96
import os import config from sprites import * from sprite_templates import * import traceback from xml.dom.minidom import parseString import sys LEVEL = """ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1....
[ 11748, 28686, 198, 11748, 4566, 198, 6738, 42866, 1330, 1635, 198, 6738, 33810, 62, 11498, 17041, 1330, 1635, 198, 11748, 12854, 1891, 198, 6738, 35555, 13, 3438, 13, 1084, 312, 296, 1330, 21136, 10100, 198, 11748, 25064, 628, 198, 2538, ...
2.048159
5,378
#!/usr/bin/python3 import io import csv import json import warnings import pickle import operator import time import logging import math import functools import numpy from sklearn.preprocessing import MinMaxScaler from threading import Thread from random import shuffle from sklearn.neural_network import MLPClassifier ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 33245, 198, 11748, 269, 21370, 198, 11748, 33918, 198, 11748, 14601, 198, 11748, 2298, 293, 198, 11748, 10088, 198, 11748, 640, 198, 11748, 18931, 198, 11748, 10688, 198, 11748, ...
3.203024
463
import logging from os import getenv from flask import Flask from flask import session # pylint: disable=unused-import from config import DATABASE_URL, ENV from database import database from views import login, new_tip, register, tips, tests, like
[ 11748, 18931, 198, 6738, 28686, 1330, 651, 24330, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 1330, 6246, 220, 1303, 279, 2645, 600, 25, 15560, 28, 403, 1484, 12, 11748, 198, 6738, 4566, 1330, 360, 1404, 6242, 11159, 62, 21886, 11,...
3.787879
66
# Copyright 2013 10gen, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, soft...
[ 2, 15069, 2211, 838, 5235, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, ...
2.987037
540
# Copyright 2022 Huawei Technologies Co., Ltd # # 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...
[ 2, 15069, 33160, 43208, 21852, 1766, 1539, 12052, 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.181075
856
#!/usr/bin/env python3 from model_weights import * import argparse if __name__ == "__main__": parser = argparse.ArgumentParser(description='See what variables are stored in model.npy file') parser.add_argument('load_from', metavar='LOAD_FROM', type=str, help='the model.npy file') a...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 2746, 62, 43775, 1330, 1635, 198, 11748, 1822, 29572, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 30751, 796, 1822, 29572, 13,...
2.429245
212
from czifiletools import pylibCZIrw_tools as cztrw from pylibCZIrw import czi as pyczi #from pylibCZIrw import Rectangle from matplotlib import pyplot as plt #filename = r'd:\Testdata_Zeiss\CZI_Testfiles\Z=4_CH=2.czi' #filename = r'd:\Testdata_Zeiss\CZI_Testfiles\T=3_Z=4_CH=2.czi' #filename = r'd:\Testdata_Zeiss\CZI_...
[ 6738, 24785, 361, 576, 31391, 1330, 279, 2645, 571, 34, 57, 23820, 86, 62, 31391, 355, 24785, 2213, 86, 198, 6738, 279, 2645, 571, 34, 57, 23820, 86, 1330, 269, 17027, 355, 12972, 66, 17027, 198, 2, 6738, 279, 2645, 571, 34, 57, 2...
2.129436
1,916
"""Helper functions for generating panoramics.""" import logging import os from contextlib import redirect_stderr from glob import glob from shutil import copyfile import cv2 import numpy as np import psutil from tqdm import tqdm logger = logging.getLogger(__name__) def prepare_directories_for_stitching_in_rows(inp...
[ 37811, 47429, 5499, 329, 15453, 3425, 273, 321, 873, 526, 15931, 198, 11748, 18931, 198, 11748, 28686, 198, 6738, 4732, 8019, 1330, 18941, 62, 301, 1082, 81, 198, 6738, 15095, 1330, 15095, 198, 6738, 4423, 346, 1330, 4866, 7753, 198, 19...
2.466415
1,325
import dataclasses from typing import Any, ClassVar, List, Optional, Sequence, Tuple, Type, Union from dbdaora.keys import FallbackKey from dbdaora.query import BaseQuery, Query, QueryMany from .repositories import HashData, HashEntity, HashRepository @dataclasses.dataclass(init=False) @dataclasses.dataclass(init...
[ 11748, 4818, 330, 28958, 198, 6738, 19720, 1330, 4377, 11, 5016, 19852, 11, 7343, 11, 32233, 11, 45835, 11, 309, 29291, 11, 5994, 11, 4479, 198, 198, 6738, 20613, 6814, 5799, 13, 13083, 1330, 7218, 1891, 9218, 198, 6738, 20613, 6814, ...
3.257426
101
# -*- coding: utf-8 -*- from collections import defaultdict import numpy as np from endochrone import Base, Transformer from endochrone.stats.measures import arg_nearest __author__ = "nickwood" __copyright__ = "nickwood" __license__ = "mit"
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 17268, 1330, 4277, 11600, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 886, 5374, 33171, 1330, 7308, 11, 3602, 16354, 198, 6738, 886, 5374, 33171, 13, 34242, ...
3.0625
80
import matplotlib.pyplot as plt import matplotlib.animation as animation from matplotlib.patches import Circle import numpy as np import time from rtd.simulator_files.planner.planner import get_env from rtd.simulator_files.planner.planner import astar_planning
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 11227, 341, 355, 11034, 198, 6738, 2603, 29487, 8019, 13, 8071, 2052, 1330, 16291, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 628, 198...
3.231707
82
import json import os import pickle from typing import Dict import bibtexparser import typer from functional import pseq from rich.console import Console from rebiber.bib2json import normalize_title console = Console() app = typer.Typer() @app.command() @app.command() if __name__ == "__main__": app()
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 2298, 293, 198, 6738, 19720, 1330, 360, 713, 198, 198, 11748, 275, 571, 16886, 48610, 198, 11748, 1259, 525, 198, 6738, 10345, 1330, 15838, 80, 198, 6738, 5527, 13, 41947, 1330, 24371, 198, 1...
3.047619
105
import pexpect import sys from figcli.test.cli.actions.delete import DeleteAction from figcli.test.cli.actions.put import PutAction from figcli.test.cli.config import * from figcli.test.cli.figgy import FiggyTest from figcli.test.cli.test_utils import TestUtils from figcli.utils.utils import * import time
[ 11748, 613, 87, 806, 198, 11748, 25064, 198, 198, 6738, 2336, 44506, 13, 9288, 13, 44506, 13, 4658, 13, 33678, 1330, 23520, 12502, 198, 6738, 2336, 44506, 13, 9288, 13, 44506, 13, 4658, 13, 1996, 1330, 5930, 12502, 198, 6738, 2336, 44...
3.252632
95
"""<changes description> Revision ID: 3483e421713d Revises: 784a82cec07a Create Date: 2017-12-27 12:29:26.302823 """ from alembic import op from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '3483e421713d' down_revision = '784a82cec07a' branch_labels = None depends_on = No...
[ 37811, 27, 36653, 6764, 29, 198, 198, 18009, 1166, 4522, 25, 513, 38783, 68, 3682, 1558, 1485, 67, 198, 18009, 2696, 25, 767, 5705, 64, 6469, 344, 66, 2998, 64, 198, 16447, 7536, 25, 2177, 12, 1065, 12, 1983, 1105, 25, 1959, 25, 2...
2.372822
287
# coding=utf-8 from django.core import validators from django.db import models class MoneyField(models.BigIntegerField): """ Stores money to nearest penny as integer. e.g. £10.22 would be 1022 """
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 42625, 14208, 13, 7295, 1330, 4938, 2024, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 198, 4871, 12911, 15878, 7, 27530, 13, 12804, 46541, 15878, 2599, 198, 220, 220, 220, 37227, 198, 22...
3.014286
70
import logging import json from invokust.aws_lambda import LambdaLoadTest, results_aggregator logging.basicConfig(level=logging.INFO) ### # SETTINGS ### # How long should the test run for in minutes? # Note that Lambda invokations that are started cannot be stopped. # Test times will actually be run in intervals of ...
[ 11748, 18931, 198, 11748, 33918, 198, 6738, 800, 482, 436, 13, 8356, 62, 50033, 1330, 21114, 6814, 8912, 14402, 11, 2482, 62, 9460, 2301, 1352, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, 10778, 8, 198, 198, ...
2.620985
467
# Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right # Your FindElements object will be instantiated and called as such: # obj = FindElements(root) # param_1 = obj.find(target)
[ 2, 30396, 329, 257, 13934, 5509, 10139, 13, 198, 2, 1398, 12200, 19667, 25, 198, 2, 220, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 1188, 28, 15, 11, 1364, 28, 14202, 11, 826, 28, 14202, 2599, 198, 2, 220, 220, 220, 220,...
2.556452
124
import FWCore.ParameterSet.Config as cms from DQMOffline.Trigger.JetMonitor_cfi import hltJetMETmonitoring ### HLT_PFJet Triggers ### # HLT_PFJet450 PFJet450_Prommonitoring = hltJetMETmonitoring.clone( FolderName = 'HLT/JME/Jets/AK4/PF/HLT_PFJet450/', histoPSet = dict(jetPtThrPSet = dict( nbin...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 6738, 360, 48, 44, 28657, 13, 48344, 13, 42273, 35479, 62, 66, 12463, 1330, 289, 2528, 42273, 47123, 41143, 278, 198, 198, 21017, 367, 27734, 62, 42668, 42273, ...
1.837356
9,487
import exceRNApipeline.pipeline.__main__ as pipeline from unittest import TestCase import sys import os import shutil _FILE_DIR = os.path.dirname(__file__) _TEMP_DIR = os.path.join(_FILE_DIR, "_test_tmp")
[ 11748, 43748, 27204, 79, 541, 4470, 13, 79, 541, 4470, 13, 834, 12417, 834, 355, 11523, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 4423, 346, 628, 198, 62, 25664, 62, 34720, 796, 286...
2.783784
74
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from gaiatest import GaiaTestCase from gaiatest.tests.clock import clock_object import time
[ 2, 770, 8090, 6127, 5178, 318, 2426, 284, 262, 2846, 286, 262, 29258, 5094, 198, 2, 13789, 11, 410, 13, 362, 13, 15, 13, 1002, 257, 4866, 286, 262, 4904, 43, 373, 407, 9387, 351, 428, 198, 2, 2393, 11, 921, 460, 7330, 530, 379, ...
3.329545
88
import re import shlex import subprocess import sys from typing import Any, Dict, List, Optional, Set, Tuple, Union, cast import click from click.utils import make_default_short_help from neuro_sdk import ConfigError from .root import Root from .utils import NeuroClickMixin, Option
[ 11748, 302, 198, 11748, 427, 2588, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 32233, 11, 5345, 11, 309, 29291, 11, 4479, 11, 3350, 198, 198, 11748, 3904, 198, 6738, 3904, 13, ...
3.511905
84
import requests, socket import barcode from barcode.writer import ImageWriter c128 = barcode.get_barcode_class('CODE128') host_name = socket.gethostname() host_ip = socket.gethostbyname(host_name) url = 'http://{}:5000'.format(host_ip) res = requests.get('{}/get_all_books'.format(url)) if res.status_code == 200: bo...
[ 11748, 7007, 11, 17802, 198, 11748, 2318, 8189, 198, 6738, 2318, 8189, 13, 16002, 1330, 7412, 34379, 198, 198, 66, 12762, 796, 2318, 8189, 13, 1136, 62, 65, 5605, 1098, 62, 4871, 10786, 34, 16820, 12762, 11537, 198, 198, 4774, 62, 367...
2.735955
178
from django.shortcuts import render from rest_framework import viewsets from rest_framework.filters import BaseFilterBackend from rest_framework.decorators import action from rest_framework.response import Response from .models import Album from .serializers import AlbumSerializer from WeebFM.permissions import IsStaff...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 1334, 62, 30604, 1330, 5009, 1039, 198, 6738, 1334, 62, 30604, 13, 10379, 1010, 1330, 7308, 22417, 7282, 437, 198, 6738, 1334, 62, 30604, 13, 12501, 273, 2024, 1330, 2223, 198...
4.202532
79
from .models import Image,Category,Location from django.http import HttpResponse,Http404 from django.shortcuts import render import datetime as dt # Create your views here.
[ 6738, 764, 27530, 1330, 7412, 11, 27313, 11, 14749, 198, 6738, 42625, 14208, 13, 4023, 220, 1330, 367, 29281, 31077, 11, 43481, 26429, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 11748, 4818, 8079, 355, 288, 83, 198, 198...
3.433962
53
import unittest import pysal suite = unittest.TestLoader().loadTestsFromTestCase(Test_Components) if __name__ == '__main__': runner = unittest.TextTestRunner() runner.run(suite)
[ 198, 11748, 555, 715, 395, 198, 11748, 279, 893, 282, 628, 198, 198, 2385, 578, 796, 555, 715, 395, 13, 14402, 17401, 22446, 2220, 51, 3558, 4863, 14402, 20448, 7, 14402, 62, 7293, 3906, 8, 198, 198, 361, 11593, 3672, 834, 6624, 705...
2.616438
73
# # Explore # - The Adventure Interpreter # # Copyright (C) 2006 Joe Peterson # import sys import Explore filename = None no_delay = False trs_compat = False for arg_num in range(len(sys.argv)): if sys.argv[arg_num] == "-f": if len(sys.argv) > (arg_num + 1) and (len(sys.argv[arg_num + 1]) == 0 or sy...
[ 2, 198, 2, 41401, 198, 2, 220, 220, 220, 532, 383, 9553, 4225, 3866, 353, 198, 2, 198, 2, 15069, 357, 34, 8, 4793, 220, 5689, 18914, 198, 2, 198, 198, 11748, 25064, 198, 198, 11748, 41401, 198, 198, 34345, 796, 6045, 198, 3919, ...
2.010363
772
#!/usr/bin/python import math import json import random import rospy from geometry_msgs.msg import PoseStamped import tf2_ros import tf2_geometry_msgs from utils import * if __name__ == '__main__': local_goal_creator = LocalGoalCreator() try: local_goal_creator.process() except rospy.ROSInterru...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 10688, 198, 11748, 33918, 198, 11748, 4738, 198, 198, 11748, 686, 2777, 88, 198, 6738, 22939, 62, 907, 14542, 13, 19662, 1330, 37557, 1273, 13322, 198, 11748, 48700, 17, 62, 4951, ...
2.621212
132
# https://codeforces.com/problemset/problem/281/A capital_Input = input("") compare_List = list(capital_Input) a = compare_List[0].upper() print(a+capital_Input[1:])
[ 2, 3740, 1378, 19815, 891, 273, 728, 13, 785, 14, 1676, 22143, 316, 14, 45573, 14, 30368, 14, 32, 198, 27544, 62, 20560, 796, 5128, 7203, 4943, 198, 5589, 533, 62, 8053, 796, 1351, 7, 27544, 62, 20560, 8, 198, 64, 796, 8996, 62, ...
2.634921
63
# coding: utf-8 # Distributed under the terms of the MIT License. """ This submodule implements some common workflow steps for use in more complicated workflows. """ import copy import logging __all__ = ("castep_prerelax", "castep_scf") LOG = logging.getLogger("run3") def castep_scf( computer, calc_doc, ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 17168, 13789, 13, 198, 198, 37811, 770, 850, 21412, 23986, 617, 2219, 30798, 4831, 329, 779, 287, 198, 3549, 8253, 670, 44041, 13, 198, 198, 37811, 198, ...
2.535193
1,577
from Regex_To_Dfa import * #inp = "(01*1)*1" print("\nProject 5 : Construction of an Dfa equivalent to a Regular Expression\nBy Patrick Lenis & Paul Cvasa") print("Regular expression examples : xy, x+y, x*, (xy*y)*y\n") inp = input("Your regular expression : ") nfaObj = NFAfromRegex(inp) nfa = nfaObj.getNFA()...
[ 6738, 797, 25636, 62, 2514, 62, 35, 13331, 1330, 1635, 201, 198, 201, 198, 2, 259, 79, 796, 30629, 486, 9, 16, 27493, 16, 1, 201, 198, 4798, 7203, 59, 77, 16775, 642, 1058, 20395, 286, 281, 360, 13331, 7548, 284, 257, 23603, 41986...
2.22488
209
""" testgen.py: simple test for a sequence generator """ import unittest #from gen123 import gen123 from class123 import gen123 if __name__ == "__main__": unittest.main()
[ 37811, 198, 9288, 5235, 13, 9078, 25, 2829, 1332, 329, 257, 8379, 17301, 198, 37811, 198, 198, 11748, 555, 715, 395, 198, 2, 6738, 2429, 10163, 1330, 2429, 10163, 198, 6738, 1398, 10163, 1330, 2429, 10163, 198, 220, 220, 220, 220, 220...
2.787879
66
# -*- coding: utf-8 -*- import scrapy from scrapy.selector import Selector from scrapy_selenium import SeleniumRequest from selenium.webdriver.common.keys import Keys import time import datetime
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 15881, 88, 198, 6738, 15881, 88, 13, 19738, 273, 1330, 9683, 273, 198, 6738, 15881, 88, 62, 741, 47477, 1330, 15300, 47477, 18453, 198, 6738, 384, 11925, 1505, 13...
3.288136
59
from __future__ import division from six.moves import range from dials.array_family import flex import math from rstbx.symmetry.constraints.parameter_reduction \ import symmetrize_reduce_enlarge from scitbx.matrix import sqr, col from xfel.merging.algorithms.error_model.error_modeler_base import error_modeler_base...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 2237, 13, 76, 5241, 1330, 2837, 198, 6738, 5980, 82, 13, 18747, 62, 17989, 1330, 7059, 198, 11748, 10688, 198, 6738, 374, 301, 65, 87, 13, 1837, 3020, 11973, 13, 1102, 2536, 6003, 13, ...
2.994624
186
import aredis import asyncio import uvloop import time import sys from functools import wraps from argparse import ArgumentParser if sys.version_info[0] == 3: long = int @timer @timer @timer @timer @timer @timer @timer @timer @timer if __name__ == '__main__': print('WITH ASYNCIO ONLY:') ...
[ 11748, 389, 6381, 198, 11748, 30351, 952, 198, 11748, 334, 85, 26268, 198, 11748, 640, 198, 11748, 25064, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 198, 361, 25064, 13, 9641, 62, 10951, 5...
2.580189
212
from decimal import Decimal import json import os from django.test.testcases import TestCase from custom.ilsgateway.api import Product, ILSUser, SMSUser, Location, ProductStock, StockTransaction
[ 6738, 32465, 1330, 4280, 4402, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 42625, 14208, 13, 9288, 13, 9288, 33964, 1330, 6208, 20448, 198, 6738, 2183, 13, 4487, 10494, 1014, 13, 15042, 1330, 8721, 11, 314, 6561, 12982, 11, 29287, ...
3.862745
51
import pickle import os.path import catlas dir_path = os.path.dirname(os.path.realpath(__file__))
[ 11748, 2298, 293, 198, 11748, 28686, 13, 6978, 198, 11748, 3797, 21921, 198, 198, 15908, 62, 6978, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 4008, 628 ]
2.702703
37
from portfolio import Operation from tinvest import Operation as TinkoffOperation
[ 6738, 15320, 1330, 14680, 198, 6738, 19783, 4223, 1330, 14680, 355, 309, 676, 2364, 32180, 628 ]
5.1875
16
_base_ = [ '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' ] model = dict( type='MJODNet', pretrained='open-mmlab://regnetx_400mf', backbone=dict( type='RegNet', arch='regnetx_400mf', out_indices=(3, ), frozen_stages=1, norm_cfg=dict(type='BN'...
[ 62, 8692, 62, 796, 685, 198, 220, 220, 220, 705, 40720, 62, 8692, 62, 14, 1416, 704, 5028, 14, 15952, 5950, 62, 16, 87, 13, 9078, 3256, 705, 40720, 62, 8692, 62, 14, 12286, 62, 43282, 13, 9078, 6, 198, 60, 198, 19849, 796, 8633,...
1.968107
1,944
from types import GeneratorType import httpx import pytest from fintoc.client import Client
[ 6738, 3858, 1330, 35986, 6030, 198, 198, 11748, 2638, 87, 198, 11748, 12972, 9288, 198, 198, 6738, 277, 600, 420, 13, 16366, 1330, 20985, 628, 198 ]
3.692308
26
# django imports from django.contrib import admin # app imports from .models import Article, Author admin.site.register(Article) admin.site.register(Author)
[ 2, 42625, 14208, 17944, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 2, 598, 17944, 198, 6738, 764, 27530, 1330, 10172, 11, 6434, 628, 198, 28482, 13, 15654, 13, 30238, 7, 14906, 8, 198, 28482, 13, 15654, 13, 30238, ...
3.478261
46
import torch from torch.autograd import Variable import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import numpy as np import random # from configure import args from load_data import find_node # Hierarchical Memory Extractor 分层记忆抽取器 class HME(nn.Module): ''' 分层记忆抽取器...
[ 11748, 28034, 201, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 201, 198, 11748, 28034, 13, 40085, 355, 6436, 201, 198, 11...
1.815534
206
from bs4 import BeautifulSoup from urllib.request import urlopen url = "https://coinmarketcap.com" html = urlopen(url) soup = BeautifulSoup(html, 'lxml')
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 628, 198, 6371, 796, 366, 5450, 1378, 3630, 10728, 11128, 13, 785, 1, 198, 6494, 796, 19016, 9654, 7, 6371, 8, 198, 82, 10486, 796, ...
2.907407
54
import tkinter as tk from tkinter import ttk from copy import copy
[ 11748, 256, 74, 3849, 355, 256, 74, 198, 6738, 256, 74, 3849, 1330, 256, 30488, 198, 198, 6738, 4866, 1330, 4866, 628 ]
3.136364
22
from sklearn_pandas import DataFrameMapper from sklearn.pipeline import Pipeline from sklearn.preprocessing import LabelBinarizer from sklearn2pmml.decoration import Alias, CategoricalDomain, ContinuousDomain from sklearn2pmml.preprocessing import ExpressionTransformer import pandas df = pandas.read_csv("audit.csv") ...
[ 6738, 1341, 35720, 62, 79, 392, 292, 1330, 6060, 19778, 44, 11463, 198, 6738, 1341, 35720, 13, 79, 541, 4470, 1330, 37709, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 36052, 33, 22050, 7509, 198, 6738, 1341, 35720, 17, 79, 3020, 75...
2.761724
789
import sys import subprocess import pandas as pd import os from pathlib import Path import time import datetime import ast from configparser import ConfigParser '''Reading the Config file from command line argument''' parser = ConfigParser() pd.set_option('display.max_columns', None) config_file = sys.argv[1] parser....
[ 11748, 25064, 198, 11748, 850, 14681, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 640, 198, 11748, 4818, 8079, 198, 11748, 6468, 198, 6738, 4566, 48610, 1330, 17056, 46677, 198,...
2.426958
1,328
from cube2common.constants import weapon_types from spyd.registry_manager import register from spyd.utils.constrain import constrain_range @register('room_player_event_handler')
[ 6738, 23441, 17, 11321, 13, 9979, 1187, 1330, 4282, 62, 19199, 198, 6738, 599, 5173, 13, 2301, 4592, 62, 37153, 1330, 7881, 198, 6738, 599, 5173, 13, 26791, 13, 1102, 2536, 391, 1330, 1500, 3201, 62, 9521, 628, 198, 31, 30238, 10786, ...
3.529412
51
from pymodbus.interfaces import IModbusFramer import struct # Unit ID, Function Code BYTE_ORDER = '>' FRAME_HEADER = 'BB' # Transaction Id, Protocol ID, Length, Unit ID, Function Code SOCKET_FRAME_HEADER = BYTE_ORDER + 'HHH' + FRAME_HEADER # Function Code TLS_FRAME_HEADER = BYTE_ORDER + 'B' class ModbusFramer(IModb...
[ 6738, 12972, 4666, 10885, 13, 3849, 32186, 1330, 314, 5841, 10885, 21055, 263, 198, 11748, 2878, 198, 198, 2, 11801, 4522, 11, 15553, 6127, 198, 17513, 9328, 62, 12532, 1137, 796, 705, 29, 6, 198, 10913, 10067, 62, 37682, 1137, 796, 7...
2.347245
599
# -*- coding:utf-8 -*- # !/usr/bin/env python3 """ download tie from Baidu Tieba """ import http.client import os import re import urllib.error import urllib.parse import urllib.request from minghu6.http.request import headers from color import color from minghu6.text.encoding import get_decode_html ...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 201, 198, 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 201, 198, 37811, 201, 198, 15002, 9839, 422, 347, 1698, 84, 36286, 7012, 201, 198, 37811, 201, 198, 201...
1.98995
199
from __future__ import print_function # Standard Library Imports from typing import List, Iterator, NamedTuple, NoReturn from functools import partial from copy import deepcopy import binascii import argparse import pickle import json import abc import re # Package imports from kodi_addon_dev.repo import LocalRepo fr...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 2, 8997, 10074, 1846, 3742, 198, 6738, 19720, 1330, 7343, 11, 40806, 1352, 11, 34441, 51, 29291, 11, 1400, 13615, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 4866, 1330, ...
2.368223
3,449
# # This file is subject to the terms and conditions defined in the # file 'LICENSE', which is part of this source code package. # import json import unittest from tests.helpers.unittest_base import BaseTestCase # -- BQ model imports from rdr_service.model import ( bq_code, bq_genomics, bq_hpo, bq_organization, b...
[ 2, 198, 2, 770, 2393, 318, 2426, 284, 262, 2846, 290, 3403, 5447, 287, 262, 198, 2, 2393, 705, 43, 2149, 24290, 3256, 543, 318, 636, 286, 428, 2723, 2438, 5301, 13, 198, 2, 198, 11748, 33918, 198, 11748, 555, 715, 395, 198, 198, ...
2.804833
1,614
n = int(input()) result = 0 for num in range(1, n+1) : result += num print(result)
[ 77, 796, 493, 7, 15414, 28955, 198, 20274, 796, 657, 198, 1640, 997, 287, 2837, 7, 16, 11, 299, 10, 16, 8, 1058, 198, 220, 220, 220, 1255, 15853, 997, 198, 4798, 7, 20274, 8 ]
2.457143
35
import struct import socket import select ## This module provides library to send and receive messages to NOX's messenger # # This is a rewrite of noxmsg.py from OpenRoads (OpenFlow Wireless) # # @author ykk (Stanford University) # @date January, 2010 # @see messenger def stringarray(string): """Output array of ...
[ 11748, 2878, 198, 198, 11748, 17802, 198, 11748, 2922, 198, 198, 2235, 770, 8265, 3769, 5888, 284, 3758, 290, 3328, 6218, 284, 8005, 55, 338, 31228, 198, 2, 198, 2, 770, 318, 257, 28183, 286, 645, 87, 19662, 13, 9078, 422, 4946, 291...
2.209947
2,272
import os import shutil import tarfile import tempfile import zipfile import traceback import requests import apkutils2 from logzero import logger from adbutils import device as get_device device = get_device() atx_agent_version = "0.10.0" __all__ = ["get_atx_agent_bundle", "get_whatsinput_apk"] def get_atx_agent_b...
[ 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 13422, 7753, 198, 11748, 20218, 7753, 198, 11748, 19974, 7753, 198, 11748, 12854, 1891, 198, 11748, 7007, 198, 11748, 2471, 74, 26791, 17, 198, 6738, 2604, 22570, 1330, 49706, 198, 6738, 51...
2.356936
692
test = { 'name': 'q1.3', 'points': 1, 'suites': [ { 'cases': [ { 'code': '>>> assert np.abs(v_direct_forward - 1280) / 1280 < 0.1;\n' '>>> assert v_head_forward > 7000;\n' '>>> assert v_direct_reverse < 2000;...
[ 9288, 796, 1391, 220, 220, 705, 3672, 10354, 705, 80, 16, 13, 18, 3256, 198, 220, 220, 220, 705, 13033, 10354, 352, 11, 198, 220, 220, 220, 705, 2385, 2737, 10354, 685, 220, 220, 1391, 220, 220, 705, 33964, 10354, 685, 220, 220, 1...
1.465368
462
# -*- coding: utf-8 -*- from django.db import models, migrations from django.utils import timezone ABOUT_PAGE = { 'title': 'About', 'slug': 'about', 'content': 'About placeholder text', 'publish_date': timezone.now(), 'created': timezone.now(), 'modified': timezone.now() } FAQ_PAGE = { ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 628, 198, 6242, 12425, 62, 4537, 8264, 796, 1391, 19...
2.536585
205
# Copyright 2015 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
[ 2, 15069, 1853, 383, 347, 41319, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, ...
2.294428
1,328
#!/usr/local/bin/python3 ''' libradius(3) wrapper ''' import socket from ctypes import * from ctypes import util from collections import namedtuple from enum import IntEnum, unique RadiusAttribute = namedtuple('RadiusAttribute', ['type', 'data', 'datalen', 'vendor']) # allow unknown attributes as pure integers ...
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 18, 198, 198, 7061, 6, 198, 75, 2889, 324, 3754, 7, 18, 8, 29908, 198, 7061, 6, 198, 198, 11748, 17802, 198, 6738, 269, 19199, 1330, 1635, 198, 6738, 269, 19199, 1330, 7736, 198, 67...
2.233429
1,388
import torch from models.resnet import ResNet from shapley.dshap import DShap from utils.dataset import FashionMNISTDataModule from shapley.knn_shapley import KNNShapley if __name__ == "__main__": save_dir = "fmnist_shapley.pt" scores = main() print(scores) torch.save(scores, save_dir)
[ 11748, 28034, 220, 198, 198, 6738, 4981, 13, 411, 3262, 1330, 1874, 7934, 220, 198, 6738, 427, 499, 1636, 13, 67, 1477, 499, 1330, 360, 2484, 499, 220, 198, 6738, 3384, 4487, 13, 19608, 292, 316, 1330, 30958, 39764, 8808, 6601, 26796,...
2.504065
123
import yaml from unittest import TestCase, main from dynamic_yaml import load, dump if __name__ == '__main__': import sys sys.exit(main())
[ 11748, 331, 43695, 198, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 11, 1388, 198, 198, 6738, 8925, 62, 88, 43695, 1330, 3440, 11, 10285, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, ...
2.781818
55
from flask_cors import CORS if __name__ == "__main__": app = Flask(__name__) app.secret_key = "averysecretkey" # secret key for encoding and decoding session data #app.permanent_session_lifetime = datetime.timedelta(hours=12) CORS(app, supports_credentials=True) app.run() # for development #...
[ 6738, 42903, 62, 66, 669, 1330, 327, 20673, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 598, 796, 46947, 7, 834, 3672, 834, 8, 198, 220, 220, 220, 598, 13, 21078, 62, 2539, 796, 366, 1244...
2.668831
154
# # ISC License # # Copyright (C) 2021-present DS-Homebrew # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND TH...
[ 2, 198, 2, 3180, 34, 13789, 198, 2, 198, 2, 15069, 357, 34, 8, 33448, 12, 25579, 17400, 12, 16060, 11269, 198, 2, 198, 2, 2448, 3411, 284, 779, 11, 4866, 11, 13096, 11, 290, 14, 273, 14983, 428, 3788, 329, 597, 198, 2, 4007, 3...
3.115789
380
# Copyright (c) 2018-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals from distutils.core import setup from Cython.B...
[ 2, 15069, 357, 66, 8, 2864, 12, 25579, 11, 3203, 11, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 42...
2.814016
371
#!/usr/bin/python3 import sys import argparse import time import json import requests import socketio from utils import create_hmac_sig URL_BASE = "http://localhost:5000/" WS_URL = "ws://localhost:5000/" EXIT_NO_COMMAND = 1 if __name__ == "__main__": # parse arguments parser = construct_parser() args ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 11748, 640, 198, 11748, 33918, 198, 198, 11748, 7007, 198, 11748, 17802, 952, 198, 198, 6738, 3384, 4487, 1330, 2251, 62, 71, 20285, 62, 8...
2.554865
483
import pygame import pymunk class Bullet: """Class for making a bullet Arguments: pos {tuple} -- Starting position of the bullet. vel {tuple} -- Starting velocity of the bullet. radius {int} -- Radius of bullet (to make relative to tank size). """
[ 11748, 12972, 6057, 198, 11748, 279, 4948, 2954, 628, 198, 4871, 18003, 25, 198, 220, 220, 220, 37227, 9487, 329, 1642, 257, 10492, 628, 220, 220, 220, 20559, 2886, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1426, 1391, 83, 29291, ...
2.87
100
""" Lift Curve Widget ----------------- """ from collections import namedtuple import numpy as np import sklearn.metrics as skl_metrics from AnyQt import QtWidgets from AnyQt.QtGui import QColor, QPen, QPalette, QFont from AnyQt.QtCore import Qt import pyqtgraph as pg import Orange from Orange.widgets import widge...
[ 37811, 198, 43, 2135, 46300, 370, 17484, 198, 1783, 12, 198, 198, 37811, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1341, 35720, 13, 4164, 10466, 355, 1341, 75, 62, 4164, 10466, 198, ...
2.978723
329
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
[ 2, 46424, 347, 43312, 38644, 38559, 24290, 9878, 11290, 46424, 198, 2, 198, 2, 220, 770, 1430, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273, 198, 2, 220, 13096, 340, 739, 262, 2846, 286, 262, 22961, 3611, 5094, 1378...
3.492701
274
import re from collections import defaultdict import discord from discord import app_commands from discord.ext import commands from utils import (GIRContext, cfg, get_ios_cfw, transform_context, transform_groups) from utils.framework import (DeviceTransformer, VersionOnDevice, ...
[ 11748, 302, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 11748, 36446, 198, 6738, 36446, 1330, 598, 62, 9503, 1746, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 3384, 4487, 1330, 357, 38, 4663, 21947, 11, 30218, 70, 11, 651, 6...
2.352679
224
import numpy as np import pytest from gcm_filters.kernels import ALL_KERNELS, GridType @pytest.fixture(scope="module", params=list(GridType))
[ 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 198, 6738, 308, 11215, 62, 10379, 1010, 13, 74, 44930, 1330, 11096, 62, 42, 28778, 37142, 11, 24846, 6030, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 29982, 2625, 21412, 160...
2.92
50
def pressure_ensemble(val): """ :param val: string, Name of the ensemble :return: boolean, returns True if pressure should be specified """ if val=='NPE_F' or val=='NPE_I' or val=='NPT_F' or val=='NPT_I' or val=='NPT_GEMC': return True else: return False def temperat...
[ 4299, 3833, 62, 1072, 11306, 7, 2100, 2599, 201, 198, 220, 220, 220, 37227, 201, 198, 201, 198, 220, 220, 220, 1058, 17143, 1188, 25, 4731, 11, 6530, 286, 262, 34549, 201, 198, 220, 220, 220, 1058, 7783, 25, 25131, 11, 5860, 6407, ...
2.228758
306
import Tkinter as tk from Tkinter import * import BeautifulSoup from BeautifulSoup import BeautifulSoup import re import config import os
[ 11748, 309, 74, 3849, 355, 256, 74, 201, 198, 6738, 309, 74, 3849, 1330, 1635, 201, 198, 11748, 23762, 50, 10486, 201, 198, 6738, 23762, 50, 10486, 1330, 23762, 50, 10486, 201, 198, 11748, 302, 201, 198, 11748, 4566, 201, 198, 11748, ...
3.12766
47
"""Module for generating test messages for the new APEL system. It will currently generate job messages or summary messages, depending on command-line arguments, but shouldn't be difficult to extend to other types of message. Create a subclass of RecordGenerator for each message type. """ import getopt import os imp...
[ 37811, 26796, 329, 15453, 1332, 6218, 329, 262, 649, 3486, 3698, 1080, 13, 198, 198, 1026, 481, 3058, 7716, 1693, 6218, 393, 10638, 6218, 11, 6906, 319, 198, 21812, 12, 1370, 7159, 11, 475, 6584, 470, 307, 2408, 284, 9117, 284, 584, ...
2.244385
5,565
from .defs import * from .enums import * from .models import * HOMEPAGE_URL = "https://warframe.market" API_BASE_URL = "https://api.warframe.market/v1" WSS_BASE_URL = "wss://warframe.market/socket"
[ 6738, 764, 4299, 82, 1330, 1635, 198, 6738, 764, 268, 5700, 1330, 1635, 198, 6738, 764, 27530, 1330, 1635, 198, 198, 39069, 4537, 8264, 62, 21886, 796, 366, 5450, 1378, 5767, 14535, 13, 10728, 1, 198, 17614, 62, 33, 11159, 62, 21886, ...
2.584416
77
# ProDy: A Python Package for Protein Dynamics Analysis # # Copyright (C) 2010-2012 Ahmet Bakan # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your...
[ 2, 1041, 35, 88, 25, 317, 11361, 15717, 329, 31702, 33806, 14691, 198, 2, 220, 198, 2, 15069, 357, 34, 8, 3050, 12, 6999, 7900, 4164, 17466, 272, 198, 2, 220, 198, 2, 770, 1430, 318, 1479, 3788, 25, 345, 460, 17678, 4163, 340, 2...
2.933202
509
import pycryptonight import ecdsa from Crypto.Hash import RIPEMD160 import hashlib from log import Logger import base58 import os import time import string from merklelib import MerkleTree string def fast_hash(data: bytes): """ Hashing function used for Corner hashes. :param data: bytes :return: str...
[ 11748, 12972, 29609, 261, 432, 198, 11748, 9940, 9310, 64, 198, 6738, 36579, 13, 26257, 1330, 44967, 3620, 35, 14198, 198, 11748, 12234, 8019, 198, 6738, 2604, 1330, 5972, 1362, 198, 11748, 2779, 3365, 198, 11748, 28686, 198, 11748, 640, ...
2.064105
4,477
import pathlib import re OCR_AP = { 'dir': 'ap', 'last': '問80' } OCR_KOUDO = { 'dir': 'koudo', 'last': '問30', } # 最後の問題が終わったと判断するための正規表現 AFTER_LAST_QUESTION = re.compile(r'[0-9]|-') if __name__ == '__main__': main()
[ 11748, 3108, 8019, 198, 11748, 302, 198, 198, 4503, 49, 62, 2969, 796, 1391, 198, 220, 220, 220, 705, 15908, 10354, 705, 499, 3256, 198, 220, 220, 220, 705, 12957, 10354, 705, 161, 243, 237, 1795, 6, 198, 92, 198, 4503, 49, 62, 42...
1.506173
162
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Dec 30 09:15:23 2019 Modified from the cornstover biorefinery constructed in Cortes-Peña et al., 2020, with modification of fermentation system for organic acids instead of the original ethanol [1] Cortes-Peña et al., BioSTEAM: A Fast and Flexible Plat...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 2892, 4280, 1542, 7769, 25, 1314, 25, 1954, 13130, 198, 198, 5841, 1431, 422, 262, 11676, ...
2.110083
17,187
import pytest from ithkuil.morphology.words import remove_stress txts_to_test = [ ('a', 'a'), ('o', 'o'), ('áu', 'au'), ('ái', 'ai'), ('aú', 'aù'), ('aé', 'ae'), ('á', 'a') ] @pytest.mark.parametrize('txt, expected', txts_to_test)
[ 11748, 12972, 9288, 198, 6738, 340, 71, 23063, 346, 13, 24503, 1435, 13, 10879, 1330, 4781, 62, 41494, 198, 198, 14116, 82, 62, 1462, 62, 9288, 796, 685, 198, 220, 220, 220, 19203, 64, 3256, 705, 64, 33809, 198, 220, 220, 220, 19203...
1.984733
131
#------------------------------------------------------------------------------- # Name: Vdc Source # Author: D.Fathi # Created: 20/03/2015 # Modified: 01/04/2020 # Copyright: (c) PyAMS # Licence: CC-BY-SA #------------------------------------------------------------------------------- fr...
[ 171, 119, 123, 2, 10097, 24305, 198, 2, 6530, 25, 220, 220, 220, 220, 220, 220, 220, 569, 17896, 8090, 198, 2, 6434, 25, 220, 220, 220, 220, 220, 360, 13, 37, 44202, 198, 2, 15622, 25, 220, 220, 220, 220, 1160, 14, 3070, 14, 4...
3.643478
115
# Copyright © 2018. All rights reserved. # Author: German Yakimov # 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 appl...
[ 2, 15069, 10673, 2864, 13, 1439, 2489, 10395, 13, 198, 2, 6434, 25, 2679, 30254, 44273, 198, 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, ...
3.920213
188
import pytest @pytest.fixture(scope='function') @pytest.fixture(scope='module') @pytest.mark.website
[ 11748, 12972, 9288, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 29982, 11639, 8818, 11537, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 29982, 11639, 21412, 11537, 628, 198, 31, 9078, 9288, 13, 4102, 13, 732, 12485, 628, 198 ]
2.658537
41
from setuptools import setup, find_packages from PublisherJiraTestsResults.version import VERSION classifiers = [ 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3' ] setup( name='robotframework-publisher-results-jira', version=VERS...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 6738, 28045, 41, 8704, 51, 3558, 25468, 13, 9641, 1330, 44156, 2849, 198, 198, 4871, 13350, 796, 685, 198, 220, 220, 220, 705, 34156, 7904, 7294, 40, 20010, 1079, 7904, 17...
3.088889
225
import importlib _DEVICE = 'frontend' required_entries = [ 'reset', 'init', 'run', 'add_node', ]
[ 11748, 1330, 8019, 198, 198, 62, 7206, 27389, 796, 705, 8534, 437, 6, 198, 35827, 62, 298, 1678, 796, 685, 198, 220, 220, 220, 705, 42503, 3256, 198, 220, 220, 220, 705, 15003, 3256, 198, 220, 220, 220, 705, 5143, 3256, 198, 220, ...
2.148148
54
import pdb import argparse import matplotlib import numpy as np import gym, sys, time, os import torch import numpy as np import datetime sys.path.insert(0, '..') # NOQA: E402 from logger.logger import Logger import utils from mountain_car import MCFeatures, MCFeaturesOnehot parser = argparse.ArgumentParser() par...
[ 11748, 279, 9945, 198, 11748, 1822, 29572, 198, 11748, 2603, 29487, 8019, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11550, 11, 25064, 11, 640, 11, 28686, 198, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 220, 198, 198, 1...
2.742475
1,196
import contextlib import typing as t from dataclasses import dataclass from ..scanner import Scanner if t.TYPE_CHECKING: from .extractor import TokenExtractor T = t.TypeVar('T') U = t.TypeVar('U') V = t.TypeVar('V') R = t.TypeVar('R') @dataclass @dataclass class RuleSet(t.Generic[T, U]): """ A ordered l...
[ 198, 11748, 4732, 8019, 198, 11748, 19720, 355, 256, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 6738, 11485, 35836, 1008, 1330, 20937, 1008, 198, 198, 361, 256, 13, 25216, 62, 50084, 2751, 25, 198, 220, 422, 764, 2...
2.813765
741
import cv2 import numpy as np import random from augraphy.base.augmentation import Augmentation from augraphy.base.augmentationresult import AugmentationResult class BrightnessTexturizeAugmentation(Augmentation): """Creates a random noise in the brightness channel to emulate paper textures. :param range:...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 198, 6738, 16339, 1470, 88, 13, 8692, 13, 559, 5154, 341, 1330, 2447, 14374, 198, 6738, 16339, 1470, 88, 13, 8692, 13, 559, 5154, 341, 20274, 1330, 2447, ...
2.9775
400
from __future__ import division from utils import * def test_state_gen_and_count(): """Test generation of binary states using bin_states() and xbin_states().""" assert np.array_equal( bin_states(5),np.vstack([i for i in xbin_states(5)]) ) states = bin_states(5) p,s = state_probs(states) assert (p=...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 3384, 4487, 1330, 1635, 198, 198, 4299, 1332, 62, 5219, 62, 5235, 62, 392, 62, 9127, 33529, 198, 220, 220, 220, 37227, 14402, 5270, 286, 13934, 2585, 1262, 9874, 62, 27219, 3419, 290, 21...
2.5
200
soma = 0 cont = 0 maior = 0 mulher = 0 nomemaisvelho = '' for p in range(1, 5): print(f'----- {p}ª pessoa -----') nome = str(input('nome: ')).strip() idade = int(input('idade: ')) sexo = str(input('sexo [M/F]: ')).strip().lower() soma = idade + soma cont = cont + 1 if p == 1 and sexo == 'm':...
[ 82, 6086, 796, 657, 198, 3642, 796, 657, 198, 2611, 1504, 796, 657, 198, 76, 377, 372, 796, 657, 198, 26601, 368, 15152, 626, 8873, 796, 10148, 198, 1640, 279, 287, 2837, 7, 16, 11, 642, 2599, 198, 220, 220, 220, 3601, 7, 69, 6,...
2.053922
408
import unittest import numpy as np from gcode_gen import number
[ 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 308, 8189, 62, 5235, 1330, 1271, 628 ]
3.421053
19
import datetime import typing from ..transform import Transform, TransformContext, Transformer from .common import create_random
[ 11748, 4818, 8079, 198, 11748, 19720, 198, 198, 6738, 11485, 35636, 1330, 26981, 11, 26981, 21947, 11, 3602, 16354, 198, 6738, 764, 11321, 1330, 2251, 62, 25120, 628, 198 ]
4.551724
29
import sys sys.path.append('../G26/Instrucciones') from instruccion import *
[ 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 38, 2075, 14, 6310, 622, 535, 295, 274, 11537, 198, 198, 6738, 916, 622, 535, 295, 1330, 1635, 198 ]
2.689655
29
#--------------- #MIT License #Copyright (c) 2019 Simon Liljestrand #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, ...
[ 2, 24305, 198, 2, 36393, 13789, 198, 198, 2, 15269, 357, 66, 8, 13130, 11288, 16342, 73, 395, 25192, 198, 198, 2, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 1659, 428, 3788, 29...
2.959371
763
import argparse import sys import yaml sys.path.insert(0, "../../../util/python") import Cons _conf = None # Implement when needed
[ 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 331, 43695, 198, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 366, 40720, 40720, 40720, 22602, 14, 29412, 4943, 198, 11748, 3515, 198, 198, 62, 10414, 796, 6045, 628, 628, 198, 2, 4828...
3.044444
45
import torch import torch.nn as nn import torchvision.transforms as transforms import matplotlib.pyplot as plt import numpy as np import pandas as pd from torch.utils.data import Dataset from torch.utils.data import DataLoader if __name__ == '__main__': main()
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 10178, 13, 7645, 23914, 355, 31408, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 3...
3.162791
86
import gym import random import torch import numpy as np from collections import deque # imort matplotlib.pyplot as plt from MyAgent import Agent env = gym.make('Pendulum-v0') env.seed(2) agent = Agent(state_size=3, action_size=1) scores = ddpg() # fig = plt.figure() # ax = fig.add_subplot(111) # plt.plot(np.arange(...
[ 11748, 11550, 198, 11748, 4738, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 390, 4188, 198, 2, 545, 419, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2011, 36772, 1330, 15906, 198, 198,...
2.54375
160
from voxel_globe.common_tasks import shared_task, VipTask from celery.utils.log import get_task_logger logger = get_task_logger(__name__) @shared_task(base=VipTask, bind=True) def cleanup(self, upload_session_id): ''' Clean up after successful ingest Currently this only entails removing the upload session ...
[ 6738, 410, 1140, 417, 62, 4743, 5910, 13, 11321, 62, 83, 6791, 1330, 4888, 62, 35943, 11, 569, 541, 25714, 198, 198, 6738, 18725, 1924, 13, 26791, 13, 6404, 1330, 651, 62, 35943, 62, 6404, 1362, 198, 6404, 1362, 796, 651, 62, 35943,...
3.149351
154
import json import boto3 import re import datetime s3 = boto3.client('s3') GET_RAW_PATH = '/getLogCount' POST_RAW_PATH = '/postLogCount' GRPC_RAW_PATH = '/GRPC' TEST_RAW_PATH = '/test' regexPattern = re.compile('([a-c][e-g][0-3]|[A-Z][5-9][f-w]){5,15}') ## Method to parse input for GET, POST, GRPC requests ## Metho...
[ 11748, 33918, 198, 11748, 275, 2069, 18, 198, 11748, 302, 198, 11748, 4818, 8079, 198, 198, 82, 18, 796, 275, 2069, 18, 13, 16366, 10786, 82, 18, 11537, 198, 198, 18851, 62, 20530, 62, 34219, 796, 31051, 1136, 11187, 12332, 6, 198, ...
2.854054
185
""" Author: shikechen Function: Write image to sheet Version: 1.0 Date: 2019/3/6 """ from openpyxl import Workbook from openpyxl.drawing.image import Image if __name__ == '__main__': main()
[ 37811, 198, 220, 220, 220, 6434, 25, 427, 522, 6607, 198, 220, 220, 220, 15553, 25, 19430, 2939, 284, 9629, 198, 220, 220, 220, 10628, 25, 352, 13, 15, 198, 220, 220, 220, 7536, 25, 13130, 14, 18, 14, 21, 198, 37811, 198, 6738, ...
2.535714
84
import numpy as np import pickle # Load in color lookup table data with open('colors.pkl', 'rb') as f: LERPED = pickle.load(f) LUT = np.load('LUT.npy') def set_color(bg, fg): ''' Generates a character sequence to set the foreground and background colors ''' return f'\u001b[48;5;{bg...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2298, 293, 201, 198, 201, 198, 2, 8778, 287, 3124, 35847, 3084, 1366, 201, 198, 4480, 1280, 10786, 4033, 669, 13, 79, 41582, 3256, 705, 26145, 11537, 355, 277, 25, 201, 198, 220, 220, ...
2.036585
902