content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# Copyright 2021 Ibrahim Ayed, Emmanuel de Bézenac, Mickaël Chen, Jean-Yves Franceschi, Sylvain Lamprier, Patrick Gallinari # 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.ap...
[ 2, 15069, 33448, 30917, 13709, 276, 11, 32390, 390, 347, 2634, 4801, 330, 11, 337, 29873, 26689, 75, 12555, 11, 11320, 12, 56, 1158, 27025, 11072, 11, 24286, 391, 28607, 5277, 11, 9925, 7096, 259, 2743, 198, 198, 2, 49962, 739, 262, ...
3.79703
202
from django.db import models from django.contrib.auth.models import AbstractBaseUser from rest_framework.authtoken.models import Token from .managers import UserManager class UserProfile(AbstractBaseUser): """ 用户 """ username = models.CharField("账号", max_length=64, unique=True) email = models.Em...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 27741, 14881, 12982, 198, 198, 6738, 1334, 62, 30604, 13, 18439, 30001, 13, 27530, 1330, 29130, 198, 198, 6738, 764, 805, 1032...
2.477778
270
#!/usr/bin/python3 # -*- coding: utf-8 -*- import os,sys import math,re import numpy as np import datetime,time import scipy.io as scio work_path = './ROE_V1.0/' data_path= work_path + 'gaode-crawler/output/' f_basemap = open(work_path + '/base_info/base_traffic_map_modified_withroad_length.csv', 'r', encoding='utf-...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 11, 17597, 198, 11748, 10688, 11, 260, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4818, 8079, 11, ...
1.505078
4,037
from .base import * # noqa # SITE CONFIGURATION # ------------------------------------------------------------------------------ # Hosts/domain names that are valid for this site # See https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts ALLOWED_HOSTS = env.list('DJANGO_ALLOWED_HOSTS', default=['*']) # E...
[ 6738, 764, 8692, 1330, 1635, 220, 1303, 645, 20402, 198, 198, 2, 311, 12709, 25626, 4261, 6234, 198, 2, 16529, 26171, 198, 2, 14504, 82, 14, 27830, 3891, 326, 389, 4938, 329, 428, 2524, 198, 2, 4091, 3740, 1378, 31628, 13, 28241, 64...
2.853261
184
"""Main script for running the pipeline. This script takes in the command line arguments, builds the execution graph of the pipeline, and then executes the pipeline. Command Line Args: Required: --root_node_id: id for the first node to be executed in the graph. Optional: --graph_confi...
[ 37811, 13383, 4226, 329, 2491, 262, 11523, 13, 198, 198, 1212, 4226, 2753, 287, 262, 3141, 1627, 7159, 11, 12188, 262, 9706, 4823, 286, 198, 1169, 11523, 11, 290, 788, 42985, 262, 11523, 13, 198, 198, 21575, 6910, 943, 14542, 25, 198,...
2.571668
1,793
# Generated by Django 2.2.12 on 2020-05-19 14:48 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1065, 319, 12131, 12, 2713, 12, 1129, 1478, 25, 2780, 201, 198, 201, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 201, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 201,...
2.779661
59
import os import os.path import sys from qgis.core import * from qgis.gui import * from PyQt4.QtCore import * from PyQt4.QtGui import * from ui_mainWindow import Ui_MainWindow import resources from constants import * from mapTools import * if __name__ == "__main__": main()
[ 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 11748, 25064, 198, 198, 6738, 10662, 70, 271, 13, 7295, 1330, 1635, 198, 6738, 10662, 70, 271, 13, 48317, 1330, 1635, 198, 6738, 9485, 48, 83, 19, 13, 48, 83, 14055, 1330, 1635, 198, 6...
2.683761
117
#!/usr/bin/python import argparse import json import logging import os import sys import uuid from elasticsearch import Elasticsearch from elasticsearch.helpers import streaming_bulk from requests_aws4auth import AWS4Auth parser = argparse.ArgumentParser() parser.add_argument("-c", "--config", action="store", defaul...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 334, 27112, 198, 198, 6738, 27468, 12947, 1330, 48567, 12947, 198, 6738, 27468, 12...
2.963441
465
__version__ = "3.0.1" __version_info__ = (3, 0, 1)
[ 834, 9641, 834, 796, 366, 18, 13, 15, 13, 16, 1, 198, 834, 9641, 62, 10951, 834, 796, 357, 18, 11, 657, 11, 352, 8, 198 ]
1.961538
26
# modules_for_ui_func import maya_converter_calc_ui class MayaConverterCalcFunc(maya_converter_calc_ui.MayaConverterCalcUI): """This Class is Func for UI converting metric to cm in maya Attributes: """ # CAVEAT : Value box and dropdown to choose type of metric def mcc_metric_dropdown_combobox_fu...
[ 2, 13103, 62, 1640, 62, 9019, 62, 20786, 201, 198, 11748, 743, 64, 62, 1102, 332, 353, 62, 9948, 66, 62, 9019, 201, 198, 201, 198, 201, 198, 4871, 26041, 3103, 332, 353, 9771, 66, 37, 19524, 7, 11261, 64, 62, 1102, 332, 353, 62,...
2.237576
825
import torch.nn as nn import torch from utils import UnetConv3, UnetUp3_CT, UnetGridGatingSignal3, UnetDsv3 import torch.nn.functional as F from networks_other import init_weights from grid_attention_layer import GridAttentionBlock3D
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 198, 6738, 3384, 4487, 1330, 791, 316, 3103, 85, 18, 11, 791, 316, 4933, 18, 62, 4177, 11, 791, 316, 41339, 38, 803, 11712, 282, 18, 11, 791, 316, 35, 21370, 18, 198, 11748...
3.092105
76
from __future__ import absolute_import from lltk.corpus.corpus import Corpus,load_corpus from lltk.text.text import Text import os """ class LitHist(Corpus): TEXT_CLASS=Text PATH_TXT = 'lithist/_txt_lithist' PATH_XML = 'lithist/_xml_lithist' PATH_METADATA = 'lithist/corpus-metadata.LitHist.txt' def __init__(sel...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 32660, 30488, 13, 10215, 79, 385, 13, 10215, 79, 385, 1330, 44874, 11, 2220, 62, 10215, 79, 385, 198, 6738, 32660, 30488, 13, 5239, 13, 5239, 1330, 8255, 198, 11748, 2868...
2.411017
236
#!/usr/bin/env python # coding: utf-8 # In[1]: totalcost = "What is the total cost of a 4 year college?" monthsavings = "How much money can you save in a month for this college?" giftscholar = "How much in additional gift money or scholarship will be given to you?" futureattend="How many more years until you can att...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 16, 5974, 628, 198, 23350, 15805, 796, 366, 2061, 318, 262, 2472, 1575, 286, 257, 604, 614, 4152, 1701, 198, 8424, 39308, 654,...
3.05949
353
from vfssh.vfs.fs_object import FileObject from vfssh.vfs.error import VFSError
[ 6738, 410, 69, 45824, 13, 85, 9501, 13, 9501, 62, 15252, 1330, 9220, 10267, 198, 6738, 410, 69, 45824, 13, 85, 9501, 13, 18224, 1330, 569, 37, 5188, 81, 1472, 628 ]
2.612903
31
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys from os.path import join, dirname sys.path.insert(0, join(dirname(__file__), '..')) import simulator simulator.load('/home/wang/CARLA_0.9.9.4') import carla from simulator import config, set_weather, add_vehicle from simulator.sensor_manager import SensorManage...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 25064, 198, 6738, 28686, 13, 6978, 1330, 4654, 11, 26672, 3672, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11...
2.502146
233
# -*- coding: utf-8 -*- from miasm2.ir.translators.translator import Translator from miasm2.ir.translators.z3_ir import Z3Mem from bhpasm import assemble_text from miasm2.arch.x86.disasm import dis_x86_64 as dis_engine from miasm2.arch.x86.ira import ir_a_x86_64 from miasm2.ir.symbexec import symbexec from miasm2.expr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 285, 16401, 17, 13, 343, 13, 7645, 75, 2024, 13, 7645, 41880, 1330, 3602, 41880, 198, 6738, 285, 16401, 17, 13, 343, 13, 7645, 75, 2024, 13, 89, 18, 62, ...
2.289063
384
# Copyright (c) 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import re from collections import defaultdict def parse(filename): """Searches the file for lines that start with `# TEAM:` or `# COMPONEN...
[ 2, 15069, 357, 66, 8, 2177, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 1...
2.526789
3,117
from unittest import TestCase import numpy as np from datumaro.components.annotation import ( AnnotationType, Bbox, Label, LabelCategories, Mask, Polygon, ) from datumaro.components.extractor import DatasetItem from datumaro.components.operations import compute_ann_statistics from datumaro.components.project impo...
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 4818, 388, 12022, 13, 5589, 3906, 13, 1236, 14221, 1330, 357, 198, 220, 220, 220, 1052, 38983, 6030, 11, 347, 3524, 11, 36052, 11, 36052,...
3.425197
127
import inspect from numbers import Real from typing import Optional, Set, cast from autofit.database.query import condition as c from autofit.database.query.junction import AbstractJunction from .abstract import AbstractQuery def _make_comparison( symbol: str, other ) -> c.AbstractCondition: """ ...
[ 11748, 10104, 198, 6738, 3146, 1330, 6416, 198, 6738, 19720, 1330, 32233, 11, 5345, 11, 3350, 198, 198, 6738, 1960, 1659, 270, 13, 48806, 13, 22766, 1330, 4006, 355, 269, 198, 6738, 1960, 1659, 270, 13, 48806, 13, 22766, 13, 73, 4575,...
2.418647
547
from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( ...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 2, 1675, 779, 257, 6414, 21004, 198, 6738, 40481, 82, 1330, 1280, 198, 6738, 28686, 1330, 3108, 198, 198, 1456, 796, 3108, 13, 397, 2777, 776, 7, 6978, 13, 15908, 3672, ...
2.540107
561
from pyccel.complexity.memory import MemComplexity from pyccel.complexity.arithmetic import OpComplexity import os ###################### if __name__ == '__main__': test_complexity()
[ 6738, 12972, 66, 5276, 13, 41887, 414, 13, 31673, 1330, 4942, 5377, 11141, 414, 198, 6738, 12972, 66, 5276, 13, 41887, 414, 13, 283, 29848, 1330, 8670, 5377, 11141, 414, 198, 11748, 28686, 628, 628, 628, 628, 628, 198, 198, 14468, 424...
3.09375
64
from .base import * from django.core.management.utils import get_random_secret_key SECRET_KEY = get_random_secret_key() DEBUG = False
[ 6738, 764, 8692, 1330, 1635, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 26791, 1330, 651, 62, 25120, 62, 21078, 62, 2539, 198, 198, 23683, 26087, 62, 20373, 796, 651, 62, 25120, 62, 21078, 62, 2539, 3419, 198, 198, 30531, 796, ...
3.090909
44
string=input(("Enter a string:")) if(string==string[::-1]): print("The string is a palindrome") else: print ("Not a palindrome")
[ 8841, 28, 15414, 7, 7203, 17469, 257, 4731, 11097, 4008, 198, 198, 361, 7, 8841, 855, 8841, 58, 3712, 12, 16, 60, 2599, 628, 220, 220, 220, 3601, 7203, 464, 4731, 318, 257, 6340, 521, 5998, 4943, 198, 198, 17772, 25, 628, 220, 220...
2.611111
54
class BrowserEventsInterface: """ Interface for browser events """ def click_like(self) -> None: """ Click on the like button """ raise NotImplementedError("click_like not implemented")
[ 4871, 34270, 37103, 39317, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 26491, 329, 6444, 2995, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 825, 3904, 62, 2339, 7, 944, 8, 4613, 6045, 25, 198, 220, 220, 220, 220, 220, 220...
2.611111
90
import climate_categories
[ 11748, 4258, 62, 66, 26129, 628, 628 ]
4.142857
7
import praw import ctypes import shutil import requests import requests_cache from PIL import Image import os import io requests_cache.install_cache('bg_cache') filepath = "reddit.creds.txt" with open(filepath, "r") as fin: client_id = fin.readline().replace("\n", "") # TODO: update code to accept...
[ 11748, 279, 1831, 201, 198, 11748, 269, 19199, 201, 198, 11748, 4423, 346, 201, 198, 11748, 7007, 201, 198, 11748, 7007, 62, 23870, 201, 198, 6738, 350, 4146, 1330, 7412, 201, 198, 11748, 28686, 201, 198, 11748, 33245, 201, 198, 201, ...
2.994318
352
import os import unittest from alembic import command from alembic.config import Config from chillapi.logger.app_loggers import logger dir_path = os.path.dirname(os.path.realpath(__file__)) os.environ.setdefault('__CHILLAPI_SETUP_TESTING__', 'true') os.environ.setdefault('__CHILLAPI_SETUP_TESTING_DB_DSN__', 'postgre...
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 198, 6738, 31341, 2022, 291, 1330, 3141, 198, 6738, 31341, 2022, 291, 13, 11250, 1330, 17056, 198, 6738, 20493, 15042, 13, 6404, 1362, 13, 1324, 62, 6404, 5355, 1330, 49706, 198, 198, 15908,...
2.354749
358
from .activity_detail import * from .activity_summary import * from .administrative_amendments import * from .applications_view import ApplicationsView from .now_application import NOWApplication from .now_application_identity import NOWApplicationIdentity from .application_type_code import ApplicationTypeCode from .no...
[ 6738, 764, 21797, 62, 49170, 1330, 1635, 198, 6738, 764, 21797, 62, 49736, 1330, 1635, 198, 6738, 764, 39081, 13260, 62, 321, 437, 902, 1330, 1635, 198, 6738, 764, 1324, 677, 602, 62, 1177, 1330, 26622, 7680, 198, 6738, 764, 2197, 62,...
3.702595
501
import psycopg2 import os import pandas as pd import streamlit as st # Obtain username/password saved as environment variables user = os.environ['windowsuser'] pwd = os.environ['windowspwd'] @st.cache(allow_output_mutation=True) def write(): """ Writes content to the app """ st.title("Get Members Data from P...
[ 11748, 17331, 22163, 70, 17, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 4269, 18250, 355, 336, 198, 198, 2, 1835, 3153, 20579, 14, 28712, 7448, 355, 2858, 9633, 198, 7220, 796, 28686, 13, 268, 2268, 17816, 28...
2.539877
326
#!/usr/bin/env python import pygame import sys MAX_FPS = 30 BLACK = (0, 0, 0) GRAY = (80, 80, 80) WHITE = (255, 255, 255) BLUE = (90, 90, 255) RED = (255, 50, 50) if __name__ == "__main__": try: main() except KeyboardInterrupt: quit()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 12972, 6057, 198, 11748, 25064, 628, 198, 22921, 62, 37, 3705, 796, 1542, 198, 9148, 8120, 796, 357, 15, 11, 657, 11, 657, 8, 198, 38, 30631, 796, 357, 1795, 11, 4019, ...
2.09375
128
# -*- encoding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the ...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 393, 517, 198, 2, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 9387, 351, 198, 2,...
3.247405
578
# Copyright (c) 2021 PaddlePaddle 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 applic...
[ 2, 15069, 357, 66, 8, 33448, 350, 37382, 47, 37382, 46665, 13, 1439, 6923, 33876, 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, 28...
2.376685
1,261
# Copyright 2019 Katteli Inc. # TestFlows.com Open-Source Software Testing Framework (http://testflows.com) # # 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/lice...
[ 2, 15069, 13130, 509, 1078, 43733, 3457, 13, 198, 2, 6208, 7414, 1666, 13, 785, 4946, 12, 7416, 10442, 23983, 25161, 357, 4023, 1378, 9288, 44041, 13, 785, 8, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, ...
2.789532
898
from flask import Flask, render_template, request from mot.serving.inference import handle_post_request app = Flask(__name__) @app.route('/', methods=['GET', 'POST']) if __name__ == "__main__": app.run(threaded=True, port=5000, debug=False, host="0.0.0.0")
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 198, 198, 6738, 2369, 13, 31293, 13, 259, 4288, 1330, 5412, 62, 7353, 62, 25927, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 628, 198, 31, 1324, 13, 38629, 10786, 14, ...
2.752577
97
'''OpenGL extension ARB.imaging_DEPRECATED Automatically generated by the get_gl_extensions script, do not edit! ''' from OpenGL import platform, constants, constant, arrays from OpenGL import extensions from OpenGL.GL import glget import ctypes EXTENSION_NAME = 'GL_ARB_imaging' _DEPRECATED = True GL_CONVOLUTION_1D = ...
[ 7061, 6, 11505, 8763, 7552, 5923, 33, 13, 320, 3039, 62, 46162, 38827, 11617, 198, 198, 38062, 4142, 7560, 416, 262, 651, 62, 4743, 62, 2302, 5736, 4226, 11, 466, 407, 4370, 0, 198, 7061, 6, 198, 6738, 30672, 1330, 3859, 11, 38491, ...
2.390304
2,434
from django.contrib import admin # Register your models here. from .models import Todos admin.site.register(Todos)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 6738, 764, 27530, 1330, 309, 375, 418, 198, 198, 28482, 13, 15654, 13, 30238, 7, 51, 375, 418, 8 ]
3.222222
36
#!/usr/bin/python import rtmidi_python as rtmidi import time MIDI_PORT_NAME = "FLUID" NOTE = 60 VELOCITY = 120 DURATION = 0.5 NOTE_ON = 0x90 NOTE_OFF = 0x80 CONTROL = 0xB0 VOLUME = 0x07 EXPRESSION = 0x0B midi_out = rtmidi.MidiOut() for port_name in midi_out.ports: if MIDI_PORT_NAME in po...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 201, 198, 201, 198, 11748, 374, 83, 13602, 72, 62, 29412, 355, 374, 83, 13602, 72, 201, 198, 11748, 640, 201, 198, 201, 198, 44, 2389, 40, 62, 15490, 62, 20608, 796, 366, 3697, 27586, 1, 201, ...
1.943787
338
""" ========================== Author: Niels Justesen Year: 2018 ========================== A few utilities used across the core modules. """ import os import ffai def get_line(start, end): """Bresenham's Line Algorithm Produces a list of tuples from start and end >>> points1 = get_line((0, 0), (3, 4))...
[ 37811, 198, 4770, 2559, 855, 198, 13838, 25, 11556, 1424, 2329, 274, 268, 198, 17688, 25, 2864, 198, 4770, 2559, 855, 198, 32, 1178, 20081, 973, 1973, 262, 4755, 13103, 13, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 31246, 1872, ...
2.215714
700
# Generated by Django 3.2.1 on 2021-05-11 02:33 import django.db.models.deletion from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 16, 319, 33448, 12, 2713, 12, 1157, 7816, 25, 2091, 198, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, ...
2.818182
44
# Turn on in a star pattern import time import random from adafruit_circuitplayground import cp # They are very bright, maybe keep them dim so they're easier to look at cp.pixels.brightness = 0.1 time_step = 0.3 # time between turning on pixels while True: for i in [0, 6, 3, 9, 5, 2, 8, 4, 1, 7]: r = ra...
[ 2, 6756, 319, 287, 257, 3491, 3912, 198, 11748, 640, 198, 11748, 4738, 198, 6738, 512, 1878, 4872, 62, 21170, 5013, 1759, 2833, 1330, 31396, 198, 198, 2, 1119, 389, 845, 6016, 11, 3863, 1394, 606, 5391, 523, 484, 821, 4577, 284, 804...
2.328638
213
from unittest import mock import pytest from django.db import models from rest_framework import serializers, viewsets from rest_framework.decorators import api_view from rest_framework.response import Response from drf_spectacular.openapi import AutoSchema from drf_spectacular.utils import ( OpenApiParameter, Pol...
[ 6738, 555, 715, 395, 1330, 15290, 198, 198, 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 11, 5009, 1039, 198, 6738, 1334, 62, 30604, 13, 12501, 273, 2024, 1330, 40391...
2.833031
551
__author__ = 'thor' import matplotlib.pyplot as plt import numpy as np import scipy def xy_density(xdat, ydat, cmap='jet', marker='.', imshow_kwargs={}, bins=[100, 100], density_thresh=0, xyrange=None, plot_kwargs={}): ''' graphs the density of (x,y) points in the plane, using color (defined b...
[ 834, 9800, 834, 796, 705, 400, 273, 6, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 628, 198, 4299, 2124, 88, 62, 43337, 7, 87, 19608, 11, 331, 19...
2.29638
884
import re import os # example for adding a custom chat handler main_chat_handler = None # Reboot function, to be added to the extended chat commands.
[ 11748, 302, 198, 11748, 28686, 198, 198, 2, 1672, 329, 4375, 257, 2183, 8537, 21360, 198, 12417, 62, 17006, 62, 30281, 796, 6045, 628, 198, 2, 50204, 2163, 11, 284, 307, 2087, 284, 262, 7083, 8537, 9729, 13, 198, 220, 220, 220, 220,...
3.577778
45
class dotTransformationPlane_t(object): """ dotTransformationPlane_t(Size: int) """ @staticmethod def __new__(self,Size): """ __new__[dotTransformationPlane_t]() -> dotTransformationPlane_t __new__(cls: type,Size: int) """ pass MatrixToGlobal=None MatrixToLocal=None QueryType=None Ret...
[ 4871, 16605, 8291, 1161, 3646, 1531, 62, 83, 7, 15252, 2599, 201, 198, 37227, 16605, 8291, 1161, 3646, 1531, 62, 83, 7, 10699, 25, 493, 8, 37227, 201, 198, 2488, 12708, 24396, 201, 198, 825, 11593, 3605, 834, 7, 944, 11, 10699, 2599...
2.572519
131
import numpy as np import scipy.sparse as spsparse def objective_p_laplace(u, W, b, p): """Minimizers of this objective function solve the p-Laplace equation with `b` as RHS. $ 1/(2p) \sum_{ij}^n W_{ij} |u_i - u_j|^p - u * b $ """ difference_matrix = np.abs(u[:, np.newaxis] - u[np.newaxis, :]) ** ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 82, 29572, 355, 599, 82, 29572, 628, 198, 4299, 9432, 62, 79, 62, 5031, 5372, 7, 84, 11, 370, 11, 275, 11, 279, 2599, 198, 220, 220, 220, 37227, 9452, 320, 11341, 286, ...
2.237705
488
from app.main.service import search as search_service from app.main.service import main as main_service from app.main.model import * from flask_restx import Resource, Namespace, fields from flask import request, redirect, jsonify import logging search = Namespace('search', description='relating to search') place_obj ...
[ 6738, 598, 13, 12417, 13, 15271, 1330, 2989, 355, 2989, 62, 15271, 198, 6738, 598, 13, 12417, 13, 15271, 1330, 1388, 355, 1388, 62, 15271, 198, 6738, 598, 13, 12417, 13, 19849, 1330, 1635, 198, 6738, 42903, 62, 2118, 87, 1330, 20857, ...
1.884455
1,679
# Python Security Project (PySec) and its related class files. # # PySec is a set of tools for secure application development under Linux # # Copyright 2014 PySec development team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You...
[ 2, 11361, 4765, 4935, 357, 20519, 6558, 8, 290, 663, 3519, 1398, 3696, 13, 198, 2, 198, 2, 9485, 6558, 318, 257, 900, 286, 4899, 329, 5713, 3586, 2478, 739, 7020, 198, 2, 198, 2, 15069, 1946, 9485, 6558, 2478, 1074, 198, 2, 198, ...
2.390411
1,168
from flask import Flask, render_template, request from flask_table import Table, Col import sqlite3 my_list = [] app = Flask(__name__) DATABASE = 'db/matchinfo.db' conn = sqlite3.connect(DATABASE) c = conn.cursor() # Or, more likely, load items from your database with something like event = c.execute('SELECT Event FR...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 198, 6738, 42903, 62, 11487, 1330, 8655, 11, 1623, 198, 11748, 44161, 578, 18, 198, 198, 1820, 62, 4868, 796, 17635, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 35, 1404...
2.93311
299
from django.contrib import admin from shell.models import Projects from shell.models import Mycommand # Register your models here. admin.site.register(Projects) admin.site.register(Mycommand)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 7582, 13, 27530, 1330, 29898, 198, 6738, 7582, 13, 27530, 1330, 2011, 21812, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 28482, 13, 15654, 13, 30238, 7, 16775, 82, 8, 198, ...
3.764706
51
"""Test connecting to a device and issuing commands.""" import pytest from pyruckus.exceptions import AuthenticationError from tests import connect_ruckus @pytest.mark.asyncio async def test_connect_success(): """Test that a normal connection works.""" ruckus = await connect_ruckus() assert ruckus.ssh.is...
[ 37811, 14402, 14320, 284, 257, 3335, 290, 19089, 9729, 526, 15931, 198, 11748, 12972, 9288, 198, 198, 6738, 12972, 30915, 385, 13, 1069, 11755, 1330, 48191, 12331, 198, 6738, 5254, 1330, 2018, 62, 30915, 385, 628, 198, 31, 9078, 9288, 1...
2.909548
398
import os, sys, requests, tarfile, re, time, shutil from multiprocessing.pool import ThreadPool year = sys.argv[1] dataDir = "/mnt/data3/scott/" + year + "data" textDir = "/mnt/data3/scott/textfiles" scriptDir = "/mnt/data3/scott/scripts" with open('/home/sburgholzer/.rdaPass.txt', 'r') as file: pswd = f...
[ 11748, 28686, 11, 25064, 11, 7007, 11, 13422, 7753, 11, 302, 11, 640, 11, 4423, 346, 201, 198, 6738, 18540, 305, 919, 278, 13, 7742, 1330, 14122, 27201, 201, 198, 201, 198, 1941, 796, 25064, 13, 853, 85, 58, 16, 60, 201, 198, 7890...
2.415625
640
# Generated by Django 2.1.5 on 2019-03-25 14:08 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 20, 319, 13130, 12, 3070, 12, 1495, 1478, 25, 2919, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.795455
44
# Testing module instance_storage.false import pytest import ec2_compare.internal.instance_storage.false
[ 198, 2, 23983, 8265, 4554, 62, 35350, 13, 9562, 198, 11748, 12972, 9288, 198, 11748, 9940, 17, 62, 5589, 533, 13, 32538, 13, 39098, 62, 35350, 13, 9562, 198 ]
3.655172
29
import os import torch import random import re from copy import deepcopy from typing import List, Dict from datasets.dataset_dict import DatasetDict from torch.utils.data import Dataset from torch.utils.data.dataset import T_co from third_party.miscs.bridge_content_encoder import get_database_matches from tqdm impor...
[ 11748, 28686, 198, 11748, 28034, 198, 11748, 4738, 198, 11748, 302, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 19720, 1330, 7343, 11, 360, 713, 198, 198, 6738, 40522, 13, 19608, 292, 316, 62, 11600, 1330, 16092, 292, 316, 35, 713, ...
2.6
640
import sys import re import yaml import subprocess from logger import log
[ 11748, 25064, 198, 11748, 302, 198, 11748, 331, 43695, 198, 11748, 850, 14681, 198, 6738, 49706, 1330, 2604, 198 ]
3.894737
19
import tensorflow as tf import numpy as np import os from src.utils.pose import Pose3D from src.utils.pose import PoseConfig class Pose3DInterface: """ Extend the pose2D in 3 dimension. Args: * a list of src.utils.pose.pose2D Return: * a list of src.utils....
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 198, 6738, 12351, 13, 26791, 13, 3455, 1330, 37557, 18, 35, 198, 6738, 12351, 13, 26791, 13, 3455, 1330, 37557, 16934, 628, 198, 4871, 375...
2.315436
149
x=int(input('Press\n1.Login as User\n2.Login as Admin\n=>')) if(x==1): y=int(input('Press\n1.New user\n2.Existing user\n=>')) if(y==1): a=input('Enter your name ') b=input('Enter your password ') c=int(input('Enter your age ')) inv() d=input('Enter your E...
[ 220, 220, 220, 220, 201, 198, 87, 28, 600, 7, 15414, 10786, 13800, 59, 77, 16, 13, 47790, 355, 11787, 59, 77, 17, 13, 47790, 355, 32053, 59, 77, 14804, 6, 4008, 201, 198, 361, 7, 87, 855, 16, 2599, 201, 198, 220, 220, 220, 331...
1.879344
1,036
#!/usr/bin/env python3 # coding: utf-8 # Example 29 IoTボタンや温度センサでチャイム音・玄関呼び鈴システム # IoTボタンやIoT温度センサが送信するUDPを受信し、IoTチャイムへ鳴音指示を送信する # 接続図 # [IoTボタン] --+---> [本機] ------> [IoTチャイム] # ボタン操作 | チャイム音 # | # [IoT温度センサ] --+ # 温度値 # 機器構成 # 本機...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 17934, 2808, 38488, 1209, 250, 23376, 6527, 1792, 226, 162, 116, 102, 41753, 99, 47271, 6527, 26503, 30640, 31090, 23131, 11482, 25795,...
1.523058
2,472
# parameter.py - parameter processing # RMM, 19 Aug 2018 # # This file contains the Parameter class that is used for representing # parameters, as well as utility functions for manipulating # parameters. # # Copyright (c) 2018, Build-A-Cell. All rights reserved. # See LICENSE file in the project root directory for deta...
[ 2, 11507, 13, 9078, 532, 11507, 7587, 198, 2, 371, 12038, 11, 678, 2447, 2864, 198, 2, 198, 2, 770, 2393, 4909, 262, 25139, 2357, 1398, 326, 318, 973, 329, 10200, 198, 2, 10007, 11, 355, 880, 355, 10361, 5499, 329, 29349, 198, 2, ...
2.518077
4,868
import glob import os import shutil import sys import tarfile from tempfile import TemporaryDirectory from ..utils import ERROR from ..utils import Spinner from ..utils import add_jobs_argument from ..utils import add_no_ccache_argument from ..utils import add_verbose_argument from ..utils import box_print from ..util...
[ 11748, 15095, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 25064, 198, 11748, 13422, 7753, 198, 6738, 20218, 7753, 1330, 46042, 43055, 198, 198, 6738, 11485, 26791, 1330, 33854, 198, 6738, 11485, 26791, 1330, 1338, 5083, 198, 6738,...
3.854701
117
import numpy as np import egt.species as sp import egt.individual as indi import matplotlib.pyplot as plt import seaborn as sns from matplotlib.colors import ListedColormap import os import glob import imageio # class individualGame(game): # # def __init__(self,payoffMatrix,rowPlayerTypes,gameType): # t...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 304, 13655, 13, 35448, 355, 599, 198, 11748, 304, 13655, 13, 43129, 355, 773, 72, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198,...
2.208191
293
# -*- coding: utf-8 -*- from src.bellman_ford_shortest_path import shortest_path as bellman_ford_shortest_paths from src.dijkstra_shortest_path import shortest_path_heap as dijkstra_shortest_path from src.graph import Graph INF = float('inf') def dijkstra(graph): """ Run dijkstra on all nodes in a graph. The g...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 12351, 13, 7923, 805, 62, 3841, 62, 19509, 395, 62, 6978, 1330, 35581, 62, 6978, 355, 8966, 805, 62, 3841, 62, 19509, 395, 62, 6978, 82, 198, 6738, 12351, ...
2.421392
2,169
import logging from extensions.base.proxylistener import ProxyListener from libs.messageupdaterfactory import MessageUpdaterFactory from models.messageupdate import MessageUpdate LOGGER = logging.getLogger(__name__)
[ 11748, 18931, 198, 198, 6738, 18366, 13, 8692, 13, 1676, 87, 2645, 396, 877, 1330, 38027, 33252, 198, 6738, 9195, 82, 13, 20500, 929, 67, 729, 69, 9548, 1330, 16000, 4933, 67, 729, 22810, 198, 6738, 4981, 13, 20500, 19119, 1330, 16000...
3.711864
59
class FailedJob(object): """Create and posts a message indicated that a job has been failed Arguments: message_router {MessageRouter} -- The message router with which to push the message with pipeline_context {PipelineContext} -- The pipeline context associated with the job error_i...
[ 198, 4871, 22738, 33308, 7, 15252, 2599, 198, 220, 220, 220, 37227, 16447, 290, 6851, 257, 3275, 8203, 326, 257, 1693, 468, 587, 4054, 198, 220, 220, 220, 220, 198, 220, 220, 220, 20559, 2886, 25, 198, 220, 220, 220, 220, 220, 220, ...
2.563107
412
from itertools import combinations, chain
[ 6738, 340, 861, 10141, 1330, 17790, 11, 6333, 201, 198 ]
4.3
10
import os import random import time from flask import Flask, render_template, redirect, request from flask_sqlalchemy import SQLAlchemy database_file = os.getenv('DATABASE', 'sqlite:///data/data.db') app = Flask(__name__, static_folder='static', static_url_path='') app.config['SQLALCHEMY_DATABASE_URI'] = database_fi...
[ 11748, 28686, 198, 11748, 4738, 198, 11748, 640, 198, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 18941, 11, 2581, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 198, 48806, 62, 7753, 796, 28686, 13,...
2.648649
222
from django.views.generic import View from django.views.decorators.cache import never_cache from django.utils.decorators import method_decorator from django.contrib import messages from django.contrib.auth.decorators import login_required from django.shortcuts import ( get_object_or_404, render, ) from django.u...
[ 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 3582, 198, 6738, 42625, 14208, 13, 33571, 13, 12501, 273, 2024, 13, 23870, 1330, 1239, 62, 23870, 198, 6738, 42625, 14208, 13, 26791, 13, 12501, 273, 2024, 1330, 2446, 62, 12501, 273, 1352...
3.15311
209
import pyautogui as pg from time import sleep sleep(3) national_id = "14524657185" #0-1 smoking = 0 r_rate = "10" pain = "5" h_rate = "79" ldl = "100" hdl = "110" tri = "214" hemoglobin = "154" sodium = "1.7" systolic = "8.7" diastolic = "12.9" #0-5 stress = 3 #enter national id press_key('tab', 8) pg.write(national...
[ 11748, 12972, 2306, 519, 9019, 355, 23241, 198, 6738, 640, 1330, 3993, 198, 198, 42832, 7, 18, 8, 198, 198, 14648, 62, 312, 796, 366, 18781, 1731, 37680, 21652, 1, 198, 2, 15, 12, 16, 198, 48783, 796, 657, 198, 81, 62, 4873, 796, ...
2.289474
418
from pprint import pprint import re template_header = """\ /// This is a generated file. Do not modify. /// See `opcodes.py` to understand how this file was generated. use crate::cpu::{Cpu, R8, R16, Addr, Flag}; impl Cpu { """ template_footer = "}\n" template_match_start = "match opcode {\n" template_match_end = "}...
[ 6738, 279, 4798, 1330, 279, 4798, 198, 11748, 302, 628, 198, 28243, 62, 25677, 796, 37227, 59, 198, 20379, 770, 318, 257, 7560, 2393, 13, 2141, 407, 13096, 13, 198, 20379, 4091, 4600, 404, 40148, 13, 9078, 63, 284, 1833, 703, 428, 2...
2.494595
370
"""Name-en-US: DK-Aim At Description-en-US: Select all objects you want to aim, then select the target before running this command. ## Usage Instructions 1. Select the the objects you want to aim. 2. Hold down Ctrl and select the object you want to Aim At. 3. Run this Script. ## License The MIT License (MIT) Copyri...
[ 37811, 5376, 12, 268, 12, 2937, 25, 32975, 12, 49945, 1629, 198, 11828, 12, 268, 12, 2937, 25, 9683, 477, 5563, 345, 765, 284, 4031, 11, 788, 2922, 262, 2496, 878, 2491, 428, 3141, 13, 198, 198, 2235, 29566, 27759, 198, 198, 16, 1...
3.492958
497
from . import AnonymousUsageTests
[ 6738, 764, 1330, 19200, 28350, 51, 3558, 628 ]
4.375
8
from django.urls import path from . import views urlpatterns = [ path('call/status/<int:call_id>', views.call_status_listener, name='status'), path('call/instructions/<int:message_id>', views.instructions, name='instructions'), path('call/gather/<int:call_id>', views.call_gather, name='call-gather'), ...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 13345, 14, 13376, 14, 27, 600, 25, 13345, 62, 312, 29, 3256, 5009, 13, 13345, 62, ...
2.716381
409
#!/usr/bin/env python3 from scipy.ndimage import imread from scipy.misc import imsave from collections import Counter import random import math import numpy as np from pyflann import * import weave def is_boundary_pixel(shape, index, n_size): """ Pixel is True and at least one 4-neighbor is False. """ code = ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 629, 541, 88, 13, 358, 9060, 1330, 545, 961, 198, 6738, 629, 541, 88, 13, 44374, 1330, 545, 21928, 198, 6738, 17268, 1330, 15034, 198, 11748, 4738, 198, 11748, 10688, ...
2.118039
4,651
# Copyright 2012 OpenStack Foundation # # 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 l...
[ 2, 220, 220, 220, 15069, 2321, 4946, 25896, 5693, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287,...
3.205306
867
from django.test import TestCase from django.contrib.auth.models import User, Group from django.test.client import Client from django.urls import reverse from apps.accounts.models import UserProfile from waffle.testutils import override_switch class LoginTestCase(TestCase): """ Test Non-MFA login and logout ...
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 11, 4912, 198, 6738, 42625, 14208, 13, 9288, 13, 16366, 1330, 20985, 198, 6738, 42625, 14208, 13, 6371, 82, 1330...
2.414837
1,321
# Generated by Django 3.0.5 on 2020-08-24 23:52 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 20, 319, 12131, 12, 2919, 12, 1731, 2242, 25, 4309, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from itertools import chain from sys import version_info from makefun import with_signature from valid8.base import failure_raiser, ValidationFailure, is_mini_lambda, pop_kwargs try: # python 3.5+ # noinspection PyUnresolvedReferences from typing import Callable, Union, List, Tuple, Iterable, Mapping, Any ...
[ 6738, 340, 861, 10141, 1330, 6333, 198, 6738, 25064, 1330, 2196, 62, 10951, 198, 198, 6738, 787, 12543, 1330, 351, 62, 12683, 1300, 198, 198, 6738, 4938, 23, 13, 8692, 1330, 5287, 62, 430, 5847, 11, 3254, 24765, 50015, 11, 318, 62, ...
2.534914
5,313
# https://projecteuler.net/problem=8 import re s = """ 73167176531330624919225119674426574742355349194934 96983520312774506326239578318016984801869478851843 85861560789112949495459501737958331952853208805511 12540698747158523863050715693290963295227443043557 66896648950445244523161731856403098711121722383113...
[ 2, 3740, 1378, 16302, 68, 18173, 13, 3262, 14, 45573, 28, 23, 201, 198, 201, 198, 11748, 302, 201, 198, 201, 198, 82, 796, 37227, 201, 198, 4790, 21940, 1558, 2996, 25838, 20548, 21626, 17477, 1495, 16315, 3134, 2598, 2075, 3553, 3865...
2.094637
634
from py_adventure import Entity a : Entity = Entity("entity") b : Entity = Entity("entity") c : Entity = Entity("entity") d : Entity = Entity("entity") e : Entity = Entity("entity") f : Entity = Entity("entity")
[ 198, 198, 6738, 12972, 62, 324, 5388, 1330, 20885, 628, 198, 64, 1058, 20885, 796, 20885, 7203, 26858, 4943, 198, 65, 1058, 20885, 796, 20885, 7203, 26858, 4943, 198, 66, 1058, 20885, 796, 20885, 7203, 26858, 4943, 198, 67, 1058, 20885,...
3.323077
65
import random import sys if __name__ == '__main__': simulate(int(sys.argv[1]))
[ 11748, 4738, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 29308, 7, 600, 7, 17597, 13, 853, 85, 58, 16, 60, 4008, 198 ]
2.470588
34
from __future__ import print_function from __future__ import absolute_import from __future__ import division from .browser import Browser # noqa: F401 F403 from .attributes import AttributesForm # noqa: F401 F403 from .settings import SettingsForm # noqa: F401 F403 from .error import rv2_error # noqa: F401 F403 fr...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 6738, 764, 40259, 1330, 34270, 220, 1303, 645, 20402, 25, 376, 21844, 376, 31552, 19...
3.233766
154
from ..encoding_mode import EncodingMode from .alphanumeric_encoder import AlphanumericEncoder from .kanji_encoder import KanjiEncoder from .qrcode_encoder import QRCodeEncoder from ..format.mode_indicator import ModeIndicator from ..misc.charset import Charset
[ 6738, 11485, 12685, 7656, 62, 14171, 1330, 14711, 7656, 19076, 198, 6738, 764, 17307, 272, 39223, 62, 12685, 12342, 1330, 978, 19080, 39223, 27195, 12342, 198, 6738, 764, 27541, 7285, 62, 12685, 12342, 1330, 14248, 7285, 27195, 12342, 198, ...
3.329114
79
import socket from unittest.mock import MagicMock, patch from output import Socket
[ 11748, 17802, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 11, 8529, 198, 6738, 5072, 1330, 47068, 628, 628, 628, 628, 628, 628, 198 ]
3.392857
28
import datetime from repachain import RepaBlock, InvalidBlockException import pytest
[ 11748, 4818, 8079, 198, 6738, 1128, 620, 391, 1330, 1432, 64, 12235, 11, 17665, 12235, 16922, 198, 198, 11748, 12972, 9288, 628 ]
3.954545
22
import codecs from collections import defaultdict import itertools import matplotlib.pyplot as plt import numpy as np import pandas as pd import random from sklearn.decomposition import PCA from sklearn.manifold import TSNE import scipy import scipy.spatial.distance import sys import utils __author__ = "Christopher Po...
[ 11748, 40481, 82, 198, 6738, 17268, 1330, 4277, 11600, 198, 11748, 340, 861, 10141, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 4738...
2.295361
3,880
#!/usr/bin/env python # coding: utf-8 """Write battery voltage to csv. Attributes ---------- LISTEN_TO : str ros topic with battery states ofile : file obj csv file writer : write obj write to specified file """ import rospy import time import csv from sensor_msgs.msg import BatteryState # global vars L...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 16594, 6555, 15004, 284, 269, 21370, 13, 198, 198, 29021, 198, 35937, 198, 45849, 1677, 62, 10468, 1058, 965, 198, 220, 220, 220, 686...
2.729529
403
import coco from coco import Image, Annotation import argparse import numpy as np import sys if __name__ == "__main__": main()
[ 11748, 8954, 78, 198, 6738, 8954, 78, 1330, 7412, 11, 1052, 38983, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 25064, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, ...
2.977778
45
import numpy as np import seaborn as sns import matplotlib.pyplot as plt from cde.density_estimator import LSConditionalDensityEstimation, NeighborKernelDensityEstimation, KernelMixtureNetwork from matplotlib.lines import Line2D import pandas as pd from cde.density_simulation import GaussianMixture, EconDensity from cd...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 269, 2934, 13, 43337, 62, 395, 320, 1352, 1330, 406, 6173, 623, 1859, 35, 6377, 22362, ...
2.963918
194
""" Diamond Pattern """ print("") n = 5 # Method 1 print("Method 1") for a in range(n - 1): for b in range(a, n): print(" ", end="") for c in range(a): print(" * ", end="") for d in range(a + 1): print(" * ", end="") print("") for e in range(n): ...
[ 198, 37811, 198, 47710, 23939, 198, 37811, 198, 4798, 7203, 4943, 628, 198, 77, 796, 642, 198, 198, 2, 11789, 352, 198, 4798, 7203, 17410, 352, 4943, 198, 198, 1640, 257, 287, 2837, 7, 77, 532, 352, 2599, 220, 198, 220, 220, 220, ...
1.880325
493
#!/usr/bin/env python # -*- coding: utf-8 -*- import codecs import os import re import sys from setuptools import setup try: bytes except NameError: bytes = str class UltraMagicString(object): ''' Taken from http://stackoverflow.com/questions/1162338/whats-the-right-way-to-use-unicode-metadata-...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 40481, 82, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 6738, 900, 37623, 10141, 1330, 9058, 628, ...
2.405152
854
import numpy as np import pytest from qlearnkit.algorithms import QKNeighborsClassifier from qlearnkit.encodings import AmplitudeEncoding from qiskit import Aer from qiskit.utils import QuantumInstance, algorithm_globals seed = 42 algorithm_globals.random_seed = seed sv_quantum_instance = QuantumInstance( Aer.g...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 198, 6738, 10662, 35720, 15813, 13, 282, 7727, 907, 1330, 1195, 42, 46445, 32289, 9487, 7483, 198, 6738, 10662, 35720, 15813, 13, 12685, 375, 654, 1330, 44074, 3984, 27195, 7656...
2.122775
1,629
from pydm import dmsetup from pydm.blockdev import Blockdev from virtman.utils import singleton from virtman.utils import rootwrap dm = DmExecutor() prefix = dm.mapdev_prefix
[ 6738, 279, 5173, 76, 1330, 288, 907, 316, 929, 198, 6738, 279, 5173, 76, 13, 9967, 7959, 1330, 9726, 7959, 198, 198, 6738, 4118, 805, 13, 26791, 1330, 2060, 1122, 198, 6738, 4118, 805, 13, 26791, 1330, 6808, 37150, 628, 198, 198, 36...
2.936508
63
# -*- coding: utf-8 -*- """ Bombolone ~~~~~~~~~~~~~~~~~~~~~ Bombolone is a tasty Content Management System for Python based on Flask, MongoDB, AngularJS, Sass and Bootstrap. It's designed to be a simple, flexible toolset for projects of any size. :copyright: (c) 2014 by @zizzamia :license: BSD (See LICENSE for deta...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 48478, 349, 505, 198, 27156, 8728, 93, 198, 198, 48478, 349, 505, 318, 257, 25103, 14041, 8549, 4482, 329, 11361, 1912, 319, 46947, 11, 220, 198, 44, 25162, ...
2.933775
151
""" Wrapper around requests library APIs """ import requests from utils.logging import with_logger class RequestsWrapper(object): """ Wrapper around Python's requests package APIs for custom functionality mostly geared towards tracing and logging. Overriding `__getattr__` which will be called if `__g...
[ 37811, 198, 36918, 2848, 1088, 7007, 5888, 23113, 198, 37811, 198, 11748, 7007, 198, 6738, 3384, 4487, 13, 6404, 2667, 1330, 351, 62, 6404, 1362, 628, 198, 4871, 9394, 3558, 36918, 2848, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, ...
3.155378
251
import os import numpy as np import cv2 import pickle import torch import imageio from PIL import Image from dataset.util import RHD2Bighand_skeidx, root_idx, wrist_idx, norm_idx from dataset.base_dataset import BaseDataset if __name__ == '__main__': import os,torch os.chdir('/home/yangl/MultiTaskH...
[ 11748, 28686, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 269, 85, 17, 201, 198, 11748, 2298, 293, 201, 198, 11748, 28034, 201, 198, 11748, 2939, 952, 201, 198, 6738, 350, 4146, 1330, 7412, 201, 198, 6738, 27039, 13, 226...
1.933852
1,028
''' 给定一个排序数组,你需要在原地删除重复出现的元素,使得每个元素只出现一次,返回移除后数组的新长度。 不要使用额外的数组空间,你必须在原地修改输入数组并在使用 O(1) 额外空间的条件下完成。 示例 1: 给定数组 nums = [1,1,2], 函数应该返回新的长度 2, 并且原数组 nums 的前两个元素被修改为 1, 2。 你不需要考虑数组中超出新长度后面的元素。 解法: 使用快慢指针来记录遍历的坐标。 开始时这两个指针都指向第一个数字 如果两个指针指的数字相同,则快指针向前走一步 如果不同,慢指针的下一个值为快指针的值,且两个指针都向前走一步 当快指针走完整个数组后,慢指针当前的坐标加1就是数组中不...
[ 7061, 6, 198, 163, 119, 247, 22522, 248, 31660, 10310, 103, 162, 236, 240, 41753, 237, 46763, 108, 163, 119, 226, 171, 120, 234, 19526, 254, 165, 250, 222, 17358, 223, 28839, 101, 43889, 253, 28839, 108, 26344, 254, 165, 247, 97, 34...
0.54235
732
""" NodeNotFoundException This exception will be raised when no nodes will be found """
[ 37811, 198, 19667, 3673, 21077, 16922, 198, 1212, 6631, 481, 307, 4376, 618, 645, 13760, 481, 307, 1043, 198, 37811, 628 ]
4.238095
21
#!/usr/bin/env python # This file is part of the pyMOR project (http://www.pymor.org). # Copyright 2013-2020 pyMOR developers and contributors. All rights reserved. # License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) import matplotlib.pyplot as plt import numpy as np import scipy.sparse as sp...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 770, 2393, 318, 636, 286, 262, 12972, 44, 1581, 1628, 357, 4023, 1378, 2503, 13, 9078, 4491, 13, 2398, 737, 198, 2, 15069, 2211, 12, 42334, 12972, 44, 1581, 6505, 290, 20420, 13, ...
2.109939
1,801
from django.contrib import admin from .models import Message, Chat @admin.register(Chat) admin.site.register(Message)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 16000, 11, 24101, 628, 198, 198, 31, 28482, 13, 30238, 7, 30820, 8, 628, 198, 28482, 13, 15654, 13, 30238, 7, 12837, 8, 198 ]
3.324324
37
from django.test import TestCase from accounts.apps import AccountsConfig
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 5504, 13, 18211, 1330, 35584, 16934, 628 ]
4.222222
18