content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import re from setuptools import setup __version__ ,= re.findall('__version__ = "(.*)"', open('runtype/__init__.py').read()) setup( name = "runtype", version = __version__, packages = ['runtype'], requires = [], install_requires = [], package_data = { '': ['*.md'] }, test_suite = 'tests...
[ 11748, 302, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 834, 9641, 834, 837, 28, 302, 13, 19796, 439, 10786, 834, 9641, 834, 796, 30629, 15885, 16725, 3256, 1280, 10786, 5143, 4906, 14, 834, 15003, 834, 13, 9078, 27691, 961, 2...
3.019578
664
# -*- coding: utf-8 -*- __author__ = 'eeneku' import random from pyglet.window import key from pyglet import gl from pyglet.text import Label from pyglet import clock from engine import state from game import tile_map from game import entity class WorldMap(state.State): """ The world map state. """
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 834, 9800, 834, 796, 705, 6429, 988, 84, 6, 198, 198, 11748, 4738, 198, 198, 6738, 12972, 70, 1616, 13, 17497, 1330, 1994, 198, 6738, 12972, 70, 1616, 1330, 1278, 198,...
2.953271
107
# Copyright 2018-2019 Leland Lucius # # 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 wr...
[ 198, 2, 15069, 2864, 12, 23344, 406, 8822, 42477, 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, 1...
3.732143
168
from django.shortcuts import render, redirect, HttpResponse from django.contrib.auth.decorators import login_required from django.urls import reverse from django.contrib import messages from .models import Workshop from .forms import WorkshopForm from RoboClub.decorators import has_role_head_or_coordinator # Create y...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 11, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198,...
3.348837
129
"""Parent class with type conversions and utilites for encode/decode classes.""" from pygcdm.protogen import gcdm_netcdf_pb2 as grpc_msg import numpy as np class gRPC_netCDF(): """Parent netCDF gRPC class with utility items.""" def __init__(self): """Initialization function that defines dictionarie...
[ 37811, 24546, 1398, 351, 2099, 32626, 290, 220, 7736, 2737, 329, 37773, 14, 12501, 1098, 6097, 526, 15931, 198, 198, 6738, 12972, 70, 10210, 76, 13, 11235, 6644, 1330, 308, 10210, 76, 62, 3262, 66, 7568, 62, 40842, 17, 355, 1036, 1475...
1.891403
1,768
from django.shortcuts import render # Create your views here. from django.http.response import JsonResponse from django.shortcuts import get_object_or_404, render, redirect, reverse from django.contrib.auth import ( get_user_model, # returns the AUTH_USER_MODEL variable's value from settings.py authenticate, ...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 198, 2, 13610, 534, 5009, 994, 13, 198, 6738, 42625, 14208, 13, 4023, 13, 26209, 1330, 449, 1559, 31077, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, ...
3.202454
163
import unittest from calculator import Calculate from CsvReader import CsvReader if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 28260, 1330, 27131, 378, 198, 6738, 327, 21370, 33634, 1330, 327, 21370, 33634, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 34...
3.046512
43
import json,random,datetime,re,os import requests basepath = os.path.abspath(os.path.dirname(__file__)) if __name__ == '__main__': # fileDecoding() lst = songsearch(keyword='五月天',pagesize=5) # 可以自己调整的 for each in getSongGenerator(lst): # each.save() print(each)
[ 11748, 33918, 11, 25120, 11, 19608, 8079, 11, 260, 11, 418, 201, 198, 11748, 7007, 201, 198, 201, 198, 12093, 538, 776, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 201, 198...
1.993421
152
# program asks a user to input a string and outputs # every second letter in reverse order sentence = str(input("please Enter a Sentence: ")) reverseSentence = sentence[ : :-1] # reverse the sentence print(reverseSentence[ : :2]) # prints every second letter
[ 2, 1430, 7893, 257, 2836, 284, 5128, 257, 4731, 290, 23862, 220, 198, 2, 790, 1218, 3850, 287, 9575, 1502, 628, 198, 34086, 594, 796, 965, 7, 15414, 7203, 29688, 6062, 257, 11352, 594, 25, 366, 4008, 198, 198, 50188, 31837, 594, 796...
3.666667
72
import numpy as np import tensorflow as tf from methods.selection import fisher from methods.selection_wrapper import SelectionWrapper if __name__ == '__main__': tf.test.main()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 5050, 13, 49283, 1330, 17685, 198, 6738, 5050, 13, 49283, 62, 48553, 1330, 29538, 36918, 2848, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 83...
3.363636
55
from enum import IntEnum # also update frontend/constants/inputLengths.ts
[ 6738, 33829, 1330, 2558, 4834, 388, 198, 198, 2, 635, 4296, 2166, 437, 14, 9979, 1187, 14, 15414, 24539, 82, 13, 912 ]
3.363636
22
import gc import omni.ext try: import cv2 except: omni.kit.pipapi.install("opencv-python") try: from .. import _openxr as _openxr except: print(">>>> [DEVELOPMENT] import openxr") from .. import openxr as _openxr __all__ = ["Extension", "_openxr"]
[ 11748, 308, 66, 198, 11748, 39030, 8461, 13, 2302, 198, 28311, 25, 198, 220, 220, 220, 1330, 269, 85, 17, 198, 16341, 25, 198, 220, 220, 220, 39030, 8461, 13, 15813, 13, 79, 541, 15042, 13, 17350, 7203, 9654, 33967, 12, 29412, 4943,...
2.368421
114
pkgname = "efl" pkgver = "1.26.1" pkgrel = 0 build_style = "meson" configure_args = [ "-Dbuild-tests=false", "-Dbuild-examples=false", "-Dembedded-lz4=false", "-Dcrypto=openssl", "-Decore-imf-loaders-disabler=scim", # rlottie (json) is pretty useless and unstable so keep that off "-Devas-loa...
[ 35339, 3672, 796, 366, 891, 75, 1, 198, 35339, 332, 796, 366, 16, 13, 2075, 13, 16, 1, 198, 35339, 2411, 796, 657, 198, 11249, 62, 7635, 796, 366, 6880, 261, 1, 198, 11250, 495, 62, 22046, 796, 685, 198, 220, 220, 220, 27444, 35...
2.18599
1,242
from dataclasses_json.api import (DataClassJsonMixin, LetterCase, config, dataclass_json)
[ 6738, 4818, 330, 28958, 62, 17752, 13, 15042, 1330, 357, 6601, 9487, 41, 1559, 35608, 259, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.465649
131
import weakref from functools import partial from typing import Generator, Any, List import pytest from oop_ext.foundation.callback import After, Before, Callback, Callbacks, Remove from oop_ext.foundation.types_ import Null from oop_ext.foundation.weak_ref import GetWeakProxy, WeakMethodProxy, WeakMethodRef @py...
[ 11748, 4939, 5420, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 19720, 1330, 35986, 11, 4377, 11, 7343, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 267, 404, 62, 2302, 13, 42526, 13, 47423, 1330, 2293, 11, 7413, 11, 4889, 18...
3.33557
298
""" This file is part of the FJournal Project. Copyright © 2020, Daniele Penazzo. All Rights Reserved. The use of this code is governed by the MIT license attached. See the LICENSE file for the full license. Created on: 2020-07-03 Author: Penaz """ from .calendar import Calendar from .weight_entry_popup import Weight...
[ 37811, 198, 1212, 2393, 318, 636, 286, 262, 376, 25296, 4935, 13, 198, 15269, 10673, 12131, 11, 6035, 494, 293, 7507, 8101, 78, 13, 1439, 6923, 33876, 13, 198, 464, 779, 286, 428, 2438, 318, 21825, 416, 262, 17168, 5964, 7223, 13, 1...
3.401639
122
# import Flask from flask import Flask, render_template, request, redirect, jsonify from data import get_all_data, end_station_location, start_station_location, station_dropdown # create app passing the __name__ app = Flask(__name__) ###################################################################### # HOME PAGE #...
[ 2, 1330, 46947, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 11, 18941, 11, 33918, 1958, 198, 6738, 1366, 1330, 651, 62, 439, 62, 7890, 11, 886, 62, 17529, 62, 24886, 11, 923, 62, 17529, 62, 24886, 11, 4429, 62, 1...
4.859756
328
from rest_framework.serializers import ModelSerializer from .models import Category
[ 6738, 1334, 62, 30604, 13, 46911, 11341, 1330, 9104, 32634, 7509, 198, 198, 6738, 764, 27530, 1330, 21743, 628 ]
4.526316
19
from django.test import TestCase from ..models import Food from categories.models import Category
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 11485, 27530, 1330, 7318, 198, 6738, 9376, 13, 27530, 1330, 21743, 198 ]
4.304348
23
s = ' hello\n' print s s1 = s.strip() print s1 s2 = s.lstrip() print s2 s3 = s.rstrip() print s3 t = '-----hello=====' t1 = t.lstrip('-') print t1 t2 = t.rstrip('=') print t2 print t.strip('-=') with open('./r1_19.py') as f: lines = (line.strip() for line in f) for line in lines: print line
[ 82, 796, 705, 23748, 59, 77, 6, 198, 198, 4798, 264, 198, 198, 82, 16, 796, 264, 13, 36311, 3419, 198, 198, 4798, 264, 16, 198, 198, 82, 17, 796, 264, 13, 75, 36311, 3419, 198, 198, 4798, 264, 17, 198, 198, 82, 18, 796, 264, ...
2.046358
151
import unittest from typing import Set, List class Solution: """ This solution simply iterates over the numbers, adding each one to a set and checking whether the number already exists in the set. Since adding to and looking up from a set are both (on average) constant time operations this makes ...
[ 11748, 555, 715, 395, 198, 198, 6738, 19720, 1330, 5345, 11, 7343, 628, 198, 4871, 28186, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 770, 4610, 2391, 11629, 689, 625, 262, 3146, 11, 4375, 1123, 198, 220, 220, 220, 530, 284, ...
3.625
96
import json import logging from logging import handlers import time import os
[ 11748, 33918, 198, 11748, 18931, 198, 6738, 18931, 1330, 32847, 198, 11748, 640, 198, 11748, 28686, 198 ]
4.588235
17
from .connection import BixlyConnection
[ 6738, 764, 38659, 1330, 347, 844, 306, 32048 ]
4.875
8
""" Wavesloshing """ import numpy as np from math import cos from proteus import Domain from proteus import Context from proteus import FemTools as ft from proteus import MeshTools as mt from proteus import WaveTools as wt from proteus.mprans import SpatialTools as st from proteus.Profiling import logEvent from prote...
[ 37811, 198, 54, 3080, 33280, 722, 220, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 10688, 1330, 8615, 198, 6738, 5915, 385, 1330, 20021, 198, 6738, 5915, 385, 1330, 30532, 220, 198, 6738, 5915, 385, 1330, 31149, 33637, 35...
2.327273
2,365
from __future__ import print_function import sys import os import re from .check_recipe import check_output
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 302, 198, 6738, 764, 9122, 62, 29102, 431, 1330, 2198, 62, 22915, 198 ]
3.724138
29
import difflib import os import sys import pytest from warp.yul.main import transpile_from_solidity warp_root = os.path.abspath(os.path.join(__file__, "../../..")) test_dir = os.path.join(warp_root, "tests", "golden") tests = [ os.path.join(test_dir, item) for item in os.listdir(test_dir) if item.endswit...
[ 11748, 814, 8019, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 25825, 13, 88, 377, 13, 12417, 1330, 1007, 79, 576, 62, 6738, 62, 39390, 414, 198, 198, 86, 5117, 62, 15763, 796, 28686, 13, 6978, ...
2.411111
180
############################################################################### ############################################################################### # pre_process_tetrode.py # Collection of routines and subroutines for processing raw neuralynx CSC files. # # Dependencies: # get_neuralynx.py # robust_stats.py...
[ 29113, 29113, 7804, 4242, 21017, 198, 29113, 29113, 7804, 4242, 21017, 198, 2, 662, 62, 14681, 62, 83, 316, 305, 2934, 13, 9078, 198, 2, 12251, 286, 31878, 290, 850, 81, 448, 1127, 329, 7587, 8246, 17019, 2047, 87, 327, 6173, 3696, ...
2.385361
2,992
#!/usr/bin/env python3 # The MIT License (MIT) # ===================== # # Copyright © 2020 Azavea # # 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 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 36658, 1421, 198, 2, 198, 2, 15069, 10673, 12131, 7578, 1015, 64, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286,...
2.563492
1,134
# -*- coding: utf-8 -*- """ Module for command execution functions. Copyright: 2022 by Clemens Rabe <clemens.rabe@clemensrabe.de> All rights reserved. This file is part of gitcache (https://github.com/seeraven/gitcache) and is released under the "BSD 3-Clause License". Please see the ``LICENSE`` file...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 26796, 329, 3141, 9706, 5499, 13, 198, 198, 15269, 25, 198, 220, 220, 220, 33160, 416, 3779, 45535, 371, 11231, 1279, 2375, 45535, 13, 81, 11231, 31, 2375, ...
2.593441
3,232
import unittest import relately.engine as engine
[ 198, 11748, 555, 715, 395, 198, 198, 11748, 823, 1286, 13, 18392, 355, 3113, 198 ]
3.4
15
import asyncio import pytest from channels.db import database_sync_to_async from unittest.mock import patch from match.logic.Match import Match from match.logic.MatchManager import MatchManager from ..utils import make_test_users # fixtures @pytest.fixture @pytest.fixture def clear_match_manager_matches(match_ma...
[ 11748, 30351, 952, 198, 11748, 12972, 9288, 198, 6738, 9619, 13, 9945, 1330, 6831, 62, 27261, 62, 1462, 62, 292, 13361, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 6738, 2872, 13, 6404, 291, 13, 23850, 1330, 13225, ...
2.86123
699
import json from typing import Dict from datastore.shared.di import service_as_singleton from datastore.shared.typing import Fqfield from datastore.shared.util import ( JSON, META_POSITION, Field, Fqid, Position, fqfield_from_fqid_and_field, logger, ) from datastore.writer.core import Messa...
[ 11748, 33918, 198, 6738, 19720, 1330, 360, 713, 198, 198, 6738, 4818, 459, 382, 13, 28710, 13, 10989, 1330, 2139, 62, 292, 62, 12215, 10565, 198, 6738, 4818, 459, 382, 13, 28710, 13, 774, 13886, 1330, 376, 80, 3245, 198, 6738, 4818, ...
2.734568
162
''' 自己写的,用来测试 可视化文件夹下的点云数据 输入:n*3的矩阵 ''' from __future__ import print_function import os import sys print(sys.path) sys.path.append(os.path.dirname(os.getcwd())) print(sys.path) from show3d_balls import showpoints import argparse import numpy as np import torch import torch.nn.parallel import torch.utils.data from to...
[ 7061, 6, 198, 164, 229, 103, 32432, 109, 37863, 247, 21410, 11, 18796, 101, 30266, 98, 38184, 233, 46237, 243, 198, 20998, 107, 164, 100, 228, 44293, 244, 23877, 229, 20015, 114, 13783, 117, 10310, 233, 21410, 163, 224, 117, 12859, 23...
2.02277
1,054
# This code is part of Qiskit. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
[ 2, 770, 2438, 318, 636, 286, 1195, 1984, 270, 13, 198, 2, 198, 2, 357, 34, 8, 15069, 19764, 33448, 13, 198, 2, 198, 2, 770, 2438, 318, 11971, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 13, 921, 743, 198, 2, 7330, 257, 486...
2.162773
2,611
import uuid from django.db import models from django import forms from profiles.models import Author from multiselectfield import MultiSelectField from datetime import datetime from django.utils import timezone MARKDOWN = 'text/markdown' PLAIN = 'text/plain' BASE64 = 'application/base64' PNG = 'image/png;base64' JPE...
[ 11748, 334, 27112, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 16545, 13, 27530, 1330, 6434, 198, 6738, 1963, 786, 801, 3245, 1330, 15237, 17563, 15878, 198, 6738, 4818, 8079, 1330, ...
2.654762
252
''' Some functions that make life easier @author: Klint ''' def make_int_array(size, start_value=0): '''returns an int list of length size with values start_value, default being 0''' to_return = [] for i in range(size): to_return.append(0) return to_return if __name__ == '__main__': ...
[ 7061, 6, 198, 4366, 5499, 326, 787, 1204, 4577, 220, 198, 198, 31, 9800, 25, 14770, 600, 198, 7061, 6, 628, 198, 4299, 787, 62, 600, 62, 18747, 7, 7857, 11, 923, 62, 8367, 28, 15, 2599, 198, 220, 220, 220, 705, 7061, 7783, 82, ...
2.396476
227
import warnings from typehandlers.base import ForwardWrapperBase, ReverseWrapperBase, \ Parameter, ReturnValue, TypeConfigurationError, NotSupportedError import cppclass ### ### ------------ C++ class parameter type handlers ------------ ### class CppClassParameterBase(Parameter): "Base class for all C+...
[ 11748, 14601, 198, 198, 6738, 2099, 4993, 8116, 13, 8692, 1330, 19530, 36918, 2848, 14881, 11, 31849, 36918, 2848, 14881, 11, 3467, 198, 220, 220, 220, 25139, 2357, 11, 8229, 11395, 11, 5994, 38149, 12331, 11, 1892, 48181, 12331, 198, 1...
1.87339
26,941
from armulator.armv6.opcodes.abstract_opcode import AbstractOpcode from armulator.armv6.arm_exceptions import EndOfInstruction from armulator.armv6.bits_ops import add as bits_add, sub as bits_sub from bitstring import BitArray
[ 6738, 3211, 8927, 13, 1670, 85, 21, 13, 404, 40148, 13, 397, 8709, 62, 404, 8189, 1330, 27741, 18257, 8189, 198, 6738, 3211, 8927, 13, 1670, 85, 21, 13, 1670, 62, 1069, 11755, 1330, 5268, 5189, 6310, 2762, 198, 6738, 3211, 8927, 13,...
3.271429
70
import igraph as ig from .utils import get_igraph def fast_betweenness(G, weight=None, kind = 'edge', norm=True, cutoff=None): """ Gets betweenness centrality. For relativelly large graphs, this func is faster than networkx Parameters ---------- G : NetworkX DiGraph or Graph The grap...
[ 11748, 45329, 1470, 355, 45329, 198, 6738, 764, 26791, 1330, 651, 62, 45920, 198, 198, 4299, 3049, 62, 23395, 1108, 7, 38, 11, 3463, 28, 14202, 11, 1611, 796, 705, 14907, 3256, 2593, 28, 17821, 11, 45616, 28, 14202, 2599, 198, 220, ...
2.147627
1,138
import torch import torch.nn as nn from nn.layers import gelu, swish, concat_relu, concat_elu, gated_tanh class GELU(nn.Module): '''GELU activation (https://arxiv.org/abs/1606.08415) as used in Sparse Transformers (https://arxiv.org/abs/1904.10509).''' class Swish(nn.Module): '''Swish activation (https://a...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 6738, 299, 77, 13, 75, 6962, 1330, 20383, 84, 11, 1509, 680, 11, 1673, 265, 62, 260, 2290, 11, 1673, 265, 62, 417, 84, 11, 308, 515, 62, 38006, 71, 628, 198, 48...
2.413793
261
""" # Definition for a Node. class Node: def __init__(self, val = 0, neighbors = None): self.val = val self.neighbors = neighbors if neighbors is not None else [] """
[ 37811, 198, 2, 30396, 329, 257, 19081, 13, 198, 4871, 19081, 25, 198, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 1188, 796, 657, 11, 12020, 796, 6045, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2100, 796, 1188...
2.724638
69
from typing import Optional import attr from web_poet import Injectable, ItemPage from web_poet.mixins import ResponseShortcutsMixin from autoextract_poet.items import ( Article, ArticleList, Comments, ForumPosts, JobPosting, Product, ProductList, RealEstate, Reviews, Vehicle, ...
[ 6738, 19720, 1330, 32233, 198, 198, 11748, 708, 81, 198, 6738, 3992, 62, 7501, 316, 1330, 554, 752, 540, 11, 9097, 9876, 198, 6738, 3992, 62, 7501, 316, 13, 19816, 1040, 1330, 18261, 16438, 23779, 35608, 259, 198, 198, 6738, 8295, 230...
2.750929
1,345
# Copyright (c) 2021, NVIDIA CORPORATION. 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 applic...
[ 2, 15069, 357, 66, 8, 33448, 11, 15127, 23929, 44680, 6234, 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, 284...
3.445946
296
import sys from PyQt5.QtWidgets import QAction,QHBoxLayout,QWidget,QApplication,QMainWindow from PyQt5.QtGui import QIcon if __name__ == '__main__': app = QApplication(sys.argv) main = QToolBarDemo() main.show() sys.exit(app.exec_())
[ 11748, 25064, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 12502, 11, 48, 39, 14253, 32517, 11, 48, 38300, 11, 48, 23416, 11, 48, 13383, 27703, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 8205, 72, 1330, 119...
2.35514
107
from model.project import Project testdata = [ Project(name="project 111", status="development", view_status="public", description="description project 111"), Project(name="project 222", status="release", view_status="private", description="description project 111"), ]
[ 6738, 2746, 13, 16302, 1330, 4935, 628, 198, 9288, 7890, 796, 685, 198, 220, 220, 220, 4935, 7, 3672, 2625, 16302, 13374, 1600, 3722, 2625, 31267, 1600, 1570, 62, 13376, 2625, 11377, 1600, 6764, 2625, 11213, 1628, 13374, 12340, 198, 220...
4.057971
69
import numpy as np import matplotlib.pyplot as plt import pandas as pd import pandas_datareader.data as web from part1 import apple, start, end apple['20d-50d'] = apple['20d'] - apple['50d'] apple["Regime"] = np.where(apple['20d-50d'] > 0, 1, 0) # We have 1's for bullish regimes and 0's for everything else....
[ 11748, 299, 32152, 220, 197, 197, 197, 197, 292, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 220, 197, 292, 458, 83, 198, 11748, 19798, 292, 220, 197, 197, 197, 197, 292, 279, 67, 198, 11748, 19798, 292, 62, 19608, 533, 5...
2.356648
7,220
"""https://trec.nist.gov/data/spam.html https://trec.nist.gov/pubs/trec16/papers/SPAM.OVERVIEW16.pdf """
[ 37811, 5450, 1378, 83, 8344, 13, 77, 396, 13, 9567, 14, 7890, 14, 2777, 321, 13, 6494, 220, 198, 5450, 1378, 83, 8344, 13, 77, 396, 13, 9567, 14, 12984, 82, 14, 83, 8344, 1433, 14, 40491, 14, 4303, 2390, 13, 41983, 28206, 1433, ...
2.1875
48
import sys, random, argparse sys.path.append('../utilities/') #CHANGE THIS PATH IF SCR import my_utils parser=argparse.ArgumentParser( description="generates a random dataset of sequences") parser.add_argument("outFile", type=str, help="name of the output file the \ generated ...
[ 11748, 25064, 11, 4738, 11, 1822, 29572, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 315, 2410, 14, 11537, 1303, 3398, 27746, 12680, 46490, 16876, 6374, 49, 198, 11748, 616, 62, 26791, 198, 198, 48610, 28, 853, 29572, 13, 28100, 1713...
2.5
370
# https://leetcode.com/problems/longest-common-prefix/
[ 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 6511, 395, 12, 11321, 12, 40290, 14, 198 ]
2.75
20
"""Provide an authentication layer for Home Assistant.""" import asyncio import logging from collections import OrderedDict from datetime import timedelta from typing import Any, Dict, List, Optional, Tuple, cast import jwt from homeassistant import data_entry_flow from homeassistant.auth.const import ACCESS_TOKEN_EX...
[ 37811, 15946, 485, 281, 18239, 7679, 329, 5995, 15286, 526, 15931, 198, 11748, 30351, 952, 198, 11748, 18931, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 19720, 1330, 4377, 11, 360, ...
2.289375
7,765
import unittest from jostedal import stun from jostedal.stun.agent import Message, Address, Unknown from jostedal.stun import attributes from jostedal.utils import ha1 if __name__ == "__main__": #import sys;sys.argv = ['', 'Test.testName'] unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 474, 455, 276, 282, 1330, 7991, 198, 6738, 474, 455, 276, 282, 13, 301, 403, 13, 25781, 1330, 16000, 11, 17917, 11, 16185, 198, 6738, 474, 455, 276, 282, 13, 301, 403, 1330, 12608, 198, 6738, 474, ...
2.8
95
""" Reverse bits of a given 32 bits unsigned integer. Note: Note that in some languages, such as Java, there is no unsigned integer type. In this case, both input and output will be given as a signed integer type. They should not affect your implementation, as the integer's internal binary representation is the same,...
[ 37811, 198, 49, 964, 325, 10340, 286, 257, 1813, 3933, 10340, 22165, 18253, 13, 198, 198, 6425, 25, 198, 198, 6425, 326, 287, 617, 8950, 11, 884, 355, 7349, 11, 612, 318, 645, 22165, 18253, 2099, 13, 554, 428, 1339, 11, 1111, 5128, ...
3.215116
516
""" Slixmpp: The Slick XMPP Library Copyright (C) 2017 Emmanuel Gil Peyrot This file is part of Slixmpp. See the file LICENSE for copying permission. """ import unittest from slixmpp import Iq from slixmpp.test import SlixTest from slixmpp.plugins.xep_0300 import Hash from slixmpp.xmlstream import reg...
[ 37811, 198, 220, 220, 220, 3454, 844, 76, 381, 25, 383, 3454, 624, 1395, 7378, 47, 10074, 198, 220, 220, 220, 15069, 357, 34, 8, 2177, 32390, 10689, 2631, 88, 10599, 198, 220, 220, 220, 770, 2393, 318, 636, 286, 3454, 844, 76, 381...
2.832168
143
""" Copyright (c) 2016 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import unicode_literals from copy import deepcopy import requests import requests.auth try: from urlparse import urlpars...
[ 37811, 198, 15269, 357, 66, 8, 1584, 2297, 10983, 11, 3457, 198, 3237, 2489, 10395, 13, 198, 198, 1212, 3788, 743, 307, 9518, 290, 9387, 739, 262, 2846, 198, 1659, 262, 347, 10305, 5964, 13, 4091, 262, 38559, 24290, 2393, 329, 3307, ...
2.722917
480
import numpy as np from .utilities import nanmatprod ELIM = 1e-12
[ 11748, 299, 32152, 355, 45941, 198, 6738, 764, 315, 2410, 1330, 15709, 6759, 1676, 67, 198, 198, 3698, 3955, 796, 352, 68, 12, 1065, 628, 628, 628, 628 ]
2.642857
28
# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors # This software is distributed under the terms and conditions of the 'Apache-2.0' # license which can be found in the file 'LICENSE' in this package distribution # or at 'http://www.apache.org/licenses/LICENSE-2.0'. """ Those API are helping API ...
[ 2, 15069, 1853, 4946, 19193, 329, 41288, 53, 4935, 11, 3457, 13, 290, 663, 20420, 198, 2, 770, 3788, 318, 9387, 739, 262, 2846, 290, 3403, 286, 262, 705, 25189, 4891, 12, 17, 13, 15, 6, 198, 2, 5964, 543, 460, 307, 1043, 287, 26...
2.115127
2,241
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import ConvModule from mmcv.runner import force_fp32, auto_fp16 from mmdet.models.builder import HEADS, build_loss from mmdet.models.roi_heads.mask_heads.fcn_mask_head import ( _do_paste_mask, BYTES_PER_FLOAT, GPU_...
[ 11748, 299, 32152, 355, 45941, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 6738, 8085, 33967, 13, 66, 20471, 1330, 34872, 26796, 198, 6738, 8085, 33967...
2.748252
143
# -*- coding: utf-8 -*- from unittest.mock import patch, Mock from unittest import TestCase import requests from swiftclient import client from django.urls import reverse from django.utils.translation import gettext as _ from django.test.utils import override_settings from django.contrib.auth.models import Group, Us...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 11, 44123, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 11748, 7007, 198, 198, 6738, 14622, 16366, 1330, 5456, ...
3.5
130
from nemcore.types.easy_access import EasyAccessDict
[ 6738, 36945, 7295, 13, 19199, 13, 38171, 62, 15526, 1330, 16789, 15457, 35, 713, 628, 628 ]
3.5
16
#!usr/local/bin/python2.7 # Name Haonan Li # Student ID: 955022 import sys import os # editex letter distance matrix ALPHABET = "abcdefghijklmnopqrstuvwxyz#" letter_group = ["aeiouy", "bp", "ckq", "dt", "lr", "mn", "gj", "fpv", "sxz", "csz"] # 'h' and 'w' are not in the group # init distance matrix D = [[2 for i in ...
[ 2, 0, 14629, 14, 12001, 14, 8800, 14, 29412, 17, 13, 22, 198, 2, 6530, 9398, 261, 272, 7455, 198, 2, 13613, 4522, 25, 6957, 1120, 1828, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 2, 1225, 578, 87, 3850, 5253, 17593, 198,...
2.074468
376
""" Copyright (C) 2015-2016 Kinnay, MrRean, RoadrunnerWMC All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of con...
[ 37811, 201, 198, 15269, 357, 34, 8, 1853, 12, 5304, 33304, 323, 11, 1770, 3041, 272, 11, 5567, 16737, 54, 9655, 201, 198, 3237, 2489, 10395, 13, 201, 198, 201, 198, 7738, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, ...
3.552204
431
"""Constants for the network integration.""" from __future__ import annotations from typing import Final import voluptuous as vol import homeassistant.helpers.config_validation as cv DOMAIN: Final = "network" STORAGE_KEY: Final = "core.network" STORAGE_VERSION: Final = 1 DATA_NETWORK: Final = "network" ATTR_ADAPT...
[ 37811, 34184, 1187, 329, 262, 3127, 11812, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 19720, 1330, 8125, 198, 198, 11748, 2322, 37623, 5623, 355, 2322, 198, 198, 11748, 1363, 562, 10167, 13, 16794, 364, 13, 1...
2.359756
328
"""Methods for parsing, importing, and querying Adverse Outcome Pathway (AOP) data."""
[ 37811, 46202, 329, 32096, 11, 33332, 11, 290, 42517, 1112, 1215, 4399, 3806, 2958, 10644, 1014, 357, 32, 3185, 8, 1366, 526, 15931, 198 ]
3.625
24
""" 复杂post请求 """ import requests # 设置data参数 payload = {'key1':'value1','key2':'value2'} r = requests.post('http://httpbin.org/post', data = payload) print(r.text) # 设置json参数。 Requests 允许你使用 json 直接传递参数,然后它就会被自动编码。 payload= {'some':'data'} r = requests.post('http://httpbin.org/post', json=payload) print(r.text) #...
[ 37811, 198, 13783, 235, 30266, 224, 7353, 46237, 115, 162, 109, 224, 198, 37811, 198, 198, 11748, 7007, 198, 198, 2, 5525, 106, 122, 163, 121, 106, 7890, 20998, 224, 46763, 108, 198, 15577, 2220, 796, 1391, 6, 2539, 16, 10354, 6, 83...
1.712644
261
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest from scribd_dl.utils import GreaterThanLastPageError
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 12972, 9288, 198, 6738, 44661, 67, 62, 25404, 13, 26791, 1330, 18169, 817, 272, 5956, 9876, 12331, 628 ]
2.674419
43
#!/usr/bin/python3 # -*- coding: utf-8 -*- # GBD Benchmark Database (GBD) # Copyright (C) 2020 Markus Iser, Karlsruhe Institute of Technology (KIT) # # 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 Founda...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 13124, 35, 25187, 4102, 24047, 357, 4579, 35, 8, 198, 2, 15069, 357, 34, 8, 12131, 46013, 1148, 263, 11, 15415...
3.327778
360
#!/usr/bin/env python import numpy as np from scipy.misc import imread, imresize import matplotlib.pyplot as plt import cv2 import scipy.io import scipy.stats as st from scipy import ndimage as ndi from skimage import feature from skimage.morphology import skeletonize import pdb def gkern(kernlen=21, nsig=3): ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 44374, 1330, 545, 961, 11, 545, 411, 1096, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, ...
1.650907
1,544
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 15069, 357, 66, 8, 1584, 11, 33160, 11, 18650, 290, 14, 273, 663, 29116, 13, 220, 1439, 2489, 10395, 13, 198, 2, 770, 3788, 318, 10668, 12, 36612, 284, 345, 739, 262, 14499, 2448, 33532, 1...
2.45325
7,647
from pathlib import Path from fcs_trade.trader.app import BaseApp from fcs_trade.trader.constant import Direction from fcs_trade.trader.object import TickData, BarData, TradeData, OrderData from fcs_trade.trader.utility import BarGenerator, ArrayManager from .base import APP_NAME, StopOrder from .engine import CtaEng...
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 277, 6359, 62, 25351, 13, 2213, 5067, 13, 1324, 1330, 7308, 4677, 198, 6738, 277, 6359, 62, 25351, 13, 2213, 5067, 13, 9979, 415, 1330, 41837, 198, 6738, 277, 6359, 62, 25351, 13, 2213, ...
2.936975
238
''' Created on 1.12.2016 @author: Darren '''''' Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue. Here, we will use the integers 0, 1, and 2 to represent the color red, white, and blue...
[ 7061, 6, 201, 198, 41972, 319, 352, 13, 1065, 13, 5304, 201, 198, 201, 198, 31, 9800, 25, 26203, 201, 198, 39115, 7061, 201, 198, 201, 201, 198, 15056, 281, 7177, 351, 299, 5563, 16396, 2266, 11, 2330, 393, 4171, 11, 3297, 606, 52...
3.138889
252
import matplotlib.pyplot as plt import numpy as np from kernel_functions import create_kernel #Time parameters dt = 1.0 #milliseconds dt_kernel = 5.0 #milliseconds dt_stimuli = 10.0 # milliseconds kernel_size = 25 # The size of the kernel T_simulation = 8 * 10 ** 4.0 # Total time of the simulation in ms Nt_s...
[ 220, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 9720, 62, 12543, 2733, 1330, 2251, 62, 33885, 628, 198, 2, 7575, 10007, 220, 220, 198, 28664, 796, 352, 13, 15, 220, 1...
2.476976
1,455
import os os.environ['OPENBLAS_NUM_THREADS'] = '1' import numpy as np from joblib import Parallel, delayed
[ 11748, 28686, 198, 418, 13, 268, 2268, 17816, 3185, 1677, 9148, 1921, 62, 41359, 62, 4221, 15675, 50, 20520, 796, 705, 16, 6, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1693, 8019, 1330, 42945, 11, 11038, 628, 628, 198 ]
2.731707
41
from tests.support.inline import inline from tests.support.asserts import assert_error, assert_success alert_doc = inline("<script>window.alert()</script>") # 10.7.4 Minimize Window
[ 6738, 5254, 13, 11284, 13, 45145, 1330, 26098, 198, 6738, 5254, 13, 11284, 13, 30493, 82, 1330, 6818, 62, 18224, 11, 6818, 62, 13138, 628, 198, 44598, 62, 15390, 796, 26098, 7203, 27, 12048, 29, 17497, 13, 44598, 3419, 3556, 12048, 29...
3.310345
58
# Generated by Django 3.2.4 on 2021-07-19 13:30 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, 19, 319, 33448, 12, 2998, 12, 1129, 1511, 25, 1270, 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
from __future__ import unicode_literals import youtube_dl import json import sys import re playlist_url = sys.argv[1] ydl_opts = {'ignoreerrors': True} with youtube_dl.YoutubeDL(ydl_opts) as ydl: playlist = ydl.extract_info(playlist_url, download=False) songs = [] failed = [] for song in playlist['entries']: ...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 35116, 62, 25404, 198, 11748, 33918, 198, 11748, 25064, 198, 11748, 302, 198, 198, 1759, 4868, 62, 6371, 796, 25064, 13, 853, 85, 58, 16, 60, 628, 198, 5173, 75, ...
2.366906
278
import pytest from tinkoff.bank import TinkoffBank pytestmark = [pytest.mark.django_db] @pytest.fixture @pytest.fixture(autouse=True) @pytest.fixture @pytest.fixture
[ 11748, 12972, 9288, 198, 198, 6738, 44569, 2364, 13, 17796, 1330, 309, 676, 2364, 28650, 198, 198, 9078, 9288, 4102, 796, 685, 9078, 9288, 13, 4102, 13, 28241, 14208, 62, 9945, 60, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198, 3...
2.478873
71
# -*- coding: utf-8 -*- # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 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, 2...
2.533878
2,450
"""Unit test package for bayes_window."""
[ 37811, 26453, 1332, 5301, 329, 15489, 274, 62, 17497, 526, 15931, 198 ]
3.5
12
#! coding=UTF-8 # Copyright 2012 Thomas Bollmeier <tbollmeier@web.de> # 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 app...
[ 2, 0, 19617, 28, 48504, 12, 23, 198, 198, 2, 15069, 2321, 5658, 43479, 49468, 1279, 83, 65, 692, 49468, 31, 12384, 13, 2934, 29, 198, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198...
3.256267
359
import cv2 import mediapipe as mp import numpy as np from videosource import WebcamSource from custom.face_geometry import ( # isort:skip PCF, get_metric_landmarks, procrustes_landmark_basis, ) mp_drawing = mp.solutions.drawing_utils mp_face_mesh = mp.solutions.face_mesh drawing_spec = mp_drawing.Drawin...
[ 11748, 269, 85, 17, 198, 11748, 16957, 499, 3757, 355, 29034, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 5861, 1668, 1330, 5313, 20991, 7416, 198, 198, 6738, 2183, 13, 2550, 62, 469, 15748, 1330, 357, 220, 1303, 318, 419, 25,...
2.463235
408
import asyncio import logging from . import conn import asyncio import logging from . import conn
[ 11748, 30351, 952, 198, 11748, 18931, 198, 6738, 764, 1330, 48260, 198, 11748, 30351, 952, 198, 11748, 18931, 198, 198, 6738, 764, 1330, 48260, 628, 628, 628, 628, 628, 628 ]
3.666667
30
# Copyright © 2019 Province of British Columbia # # 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 agr...
[ 2, 15069, 10673, 13130, 22783, 286, 3517, 9309, 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, ...
3.35989
364
import torch.nn as nn import torch.nn.functional as F import gans.building_blocks as bb
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 11748, 308, 504, 13, 16894, 62, 27372, 355, 275, 65, 628, 628, 198 ]
3
31
#!/usr/bin/env python # Corey Goldberg - 2010 # # display info/stats from redis server (using python redis client) in a web page # to access: run this script then visit http://<your_server>/stats import redis import BaseHTTPServer WEB_PORT = 8081 REDIS_HOST = 'host.foo.com' REDIS_PORT = 6379 REDIS_D...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 24154, 31225, 532, 3050, 201, 198, 2, 201, 198, 2, 3359, 7508, 14, 34242, 422, 2266, 271, 4382, 357, 3500, 21015, 2266, 271, 5456, 8, 287, 257, 3992, 2443, 201, 198, 2, 284...
2.447514
181
#!/usr/bin/env python3 """ Add ACT types """ import argparse import json import os import sys from logging import critical, warning from typing import Any, Dict, List, Text from pkg_resources import resource_filename import act.api def parseargs() -> argparse.Namespace: """ Parse arguments """ parser = ar...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 3060, 11741, 3858, 37227, 198, 198, 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 18931, 1330, 4688, 11, 6509, 198, 6738, 19720, ...
2.377453
2,803
from .base import customizer, Model from ..helpers import Percentage, PixelGrid
[ 198, 6738, 764, 8692, 1330, 2183, 7509, 11, 9104, 198, 6738, 11485, 16794, 364, 1330, 36013, 11, 11349, 41339 ]
4.210526
19
#!/usr/bin/python3 import sys # Fill content with non-zero values content = bytearray(0xaa for i in range(40)) #**Note**: it must be modified there. the origin length of `content` is 300, which may cause `retlib` return directly without launching a root shell. Please change the length to a smaller int. X = 32 sh_...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 25064, 198, 198, 2, 27845, 2695, 351, 1729, 12, 22570, 3815, 198, 11299, 796, 416, 83, 451, 2433, 7, 15, 87, 7252, 329, 1312, 287, 2837, 7, 1821, 4008, 1303, 1174, 6425, 1174, ...
2.725632
277
import ast import inspect from typing import TYPE_CHECKING, Callable
[ 11748, 6468, 198, 11748, 10104, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 11, 4889, 540 ]
4.25
16
from __future__ import annotations from spark_auto_mapper_fhir.fhir_types.uri import FhirUri from spark_auto_mapper_fhir.value_sets.generic_type import GenericTypeCode from spark_auto_mapper.type_definitions.defined_types import AutoMapperTextInputType # This file is auto-generated by generate_classes so do not edi...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 9009, 62, 23736, 62, 76, 11463, 62, 69, 71, 343, 13, 69, 71, 343, 62, 19199, 13, 9900, 1330, 376, 71, 343, 52, 380, 198, 198, 6738, 9009, 62, 23736, 62, 76, 11463, 62, 69, 71...
2.795918
539
#!/usr/bin/env python3 # # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 15069, 33160, 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...
3.47032
219
# # Copyright (c) Contributors to the Open 3D Engine Project. # For complete copyright and license terms please see the LICENSE at the root of this distribution. # # SPDX-License-Identifier: Apache-2.0 OR MIT # # import datetime import json import socket from tiaf_logger import get_logger logger = get_logger(__file__...
[ 2, 198, 2, 15069, 357, 66, 8, 25767, 669, 284, 262, 4946, 513, 35, 7117, 4935, 13, 198, 2, 1114, 1844, 6634, 290, 5964, 2846, 3387, 766, 262, 38559, 24290, 379, 262, 6808, 286, 428, 6082, 13, 198, 2, 198, 2, 30628, 55, 12, 34156...
2.348114
8,006
import cv2 cap = cv2.VideoCapture(0) tracker = cv2.TrackerMOSSE_create() # speed yay, accuracy low # tracker = cv2.TrackerCRST_create() # speed low, accuracy yay success, img = cap.read() bbox = cv2.selectROI("Tracking", img, False) tracker.init(img,bbox) while True: timer = cv2.getTickCount() success, im...
[ 11748, 269, 85, 17, 198, 198, 11128, 796, 269, 85, 17, 13, 10798, 49630, 7, 15, 8, 198, 198, 2213, 10735, 796, 269, 85, 17, 13, 35694, 44, 2640, 5188, 62, 17953, 3419, 1303, 2866, 331, 323, 11, 9922, 1877, 198, 2, 30013, 796, 26...
2.082228
377
import copy from spaint.ansi256 import * from spaint.ansi8 import * from spaint.common import * def old_stylize_colorsec(color_sec): ''' for compatible with old code old_style_color_sec = {1: (0, 11, 'white'), 2: (12, 19, 'blue'), 3: (20, 21, 'white')} new_style_color_sec = [(0, 12, 'white...
[ 11748, 4866, 198, 6738, 599, 2913, 13, 504, 72, 11645, 1330, 1635, 198, 6738, 599, 2913, 13, 504, 72, 23, 1330, 1635, 198, 6738, 599, 2913, 13, 11321, 1330, 1635, 628, 198, 4299, 1468, 62, 301, 2645, 1096, 62, 8043, 2363, 7, 8043, ...
2
677
from django.conf.urls import patterns, url from blog import views urlpatterns = patterns('', url(r'^$', views.redirect_to_latest, name='redirect_to_latest'), url(r'^posts/$', views.post_list_by_user, name='post_list_by_user'), url(r'^posts/new/$', views.post_create, name='post_create'), url(r'^(?P<blo...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 19016, 198, 198, 6738, 4130, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 7572, 10786, 3256, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 3, 3256, 5009, 13, 445, 1060, 62, 14...
2.176944
373
#!/usr/bin/env python # -*- coding: utf-8 -*- import Tkinter import random import backend as myback # i imported the backend file as an object from Tkinter import StringVar root = Tkinter.Tk() root.configure(bg="white") root.title("My Super To Do List") root.geometry("500x500") print "haiiiiiiiiiiii" lbl_title=Tk...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 309, 74, 3849, 198, 11748, 4738, 198, 11748, 30203, 355, 616, 1891, 1303, 1312, 17392, 262, 30203, 2393, 35...
2.541353
399
ages = {"Jackson": 22, "Amy": 25} ages["Matthew"] = 30 ages["Jackson"] += 1 print(ages)
[ 1095, 796, 19779, 31270, 1298, 2534, 11, 366, 40797, 1298, 1679, 92, 198, 1095, 14692, 25372, 8973, 796, 1542, 198, 1095, 14692, 31270, 8973, 15853, 352, 198, 198, 4798, 7, 1095, 8, 198 ]
2.69697
33
import shapely.wkt from shapely.ops import transform from shapely.geometry import MultiPolygon from .datatype import DataType from .point import ( degrees_like, easting_northing_like, osm_like, osgb_to_wgs84, osm_to_wgs84, within_england, )
[ 11748, 5485, 306, 13, 86, 21841, 198, 6738, 5485, 306, 13, 2840, 1330, 6121, 198, 6738, 5485, 306, 13, 469, 15748, 1330, 15237, 34220, 14520, 198, 198, 6738, 764, 19608, 265, 2981, 1330, 6060, 6030, 198, 6738, 764, 4122, 1330, 357, 19...
2.458716
109
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import os import random import numpy as np from pymoo.model.problem import Problem from pymoo.optimize import minimize from pymoo.model.sampling import Sampling from pymoo.model.crossover import Crossover from pymoo.model.mutation import Mutation from pym...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 4738, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, ...
3.070833
240
import aiohttp
[ 11748, 257, 952, 4023, 628 ]
3.2
5
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.gi...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 14432, 84, 11712, 30617, 7824, 628, 220, 220, 220, 383, 14432, 84, 11712, 30617, 7824, 3769, 345, 351, 257, 3665, 11, 11282, 11, 290, 2829, 5313, 2594, 7824, 329, ...
2.233448
4,078