content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import numpy as np from abides_markets.generators import ( ConstantDepthGenerator, ConstantOrderSizeGenerator, UniformDepthGenerator, UniformOrderSizeGenerator, )
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 450, 1460, 62, 34162, 13, 8612, 2024, 1330, 357, 198, 220, 220, 220, 20217, 48791, 8645, 1352, 11, 198, 220, 220, 220, 20217, 18743, 10699, 8645, 1352, 11, 198, 220, 220, 220, 35712, 4879...
3.066667
60
from django.shortcuts import render, redirect, reverse from django.views import View, generic from django.contrib import messages from django.contrib.auth.mixins import LoginRequiredMixin from .forms import CommentForm
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 11, 9575, 198, 6738, 42625, 14208, 13, 33571, 1330, 3582, 11, 14276, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13,...
3.877193
57
# Generated by Django 3.2 on 2021-08-11 20:10 import datetime from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 319, 33448, 12, 2919, 12, 1157, 1160, 25, 940, 198, 198, 11748, 4818, 8079, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
3.088235
34
import basic_func as bf from gen_drivfunc import * from fpexception_detection import FPexcption_detector_whole from fpexception_detection import get_testing_point from math_lib import rfl from plot_domain import plot_2vfunc_domain from plot_domain import plot_1func_domain from mpmath import * import itertools import nu...
[ 11748, 4096, 62, 20786, 355, 275, 69, 198, 6738, 2429, 62, 7553, 85, 20786, 1330, 1635, 198, 6738, 277, 24900, 4516, 62, 15255, 3213, 1330, 31459, 41194, 1159, 62, 15255, 9250, 62, 1929, 2305, 198, 6738, 277, 24900, 4516, 62, 15255, 3...
3.080189
212
import binascii import os from typing import Union from django.apps import apps from django.core.exceptions import ObjectDoesNotExist from django.db.models import QuerySet from django.db.models.base import Model from rest_framework.exceptions import APIException from rest_framework.response import Response from rest_f...
[ 11748, 9874, 292, 979, 72, 198, 11748, 28686, 198, 6738, 19720, 1330, 4479, 198, 198, 6738, 42625, 14208, 13, 18211, 1330, 6725, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 9515, 13921, 3673, 3109, 396, 198, 6738, 42625, 1...
2.754144
362
# Copyright (c) 2015 Simon Kennedy <sffjunkie+code@gmail.com> from collections import namedtuple __all__ = ['Element'] _Element = namedtuple('Element', "title reader writer key log")
[ 2, 15069, 357, 66, 8, 1853, 11288, 10401, 1279, 82, 487, 73, 2954, 494, 10, 8189, 31, 14816, 13, 785, 29, 198, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 834, 439, 834, 796, 37250, 20180, 20520, 198, 198, 62, 20180, 796, 3...
3.263158
57
from substratools import exceptions, Metrics from substratools.utils import import_module, load_interface_from_module import pytest
[ 6738, 47294, 265, 10141, 1330, 13269, 11, 3395, 10466, 198, 6738, 47294, 265, 10141, 13, 26791, 1330, 1330, 62, 21412, 11, 3440, 62, 39994, 62, 6738, 62, 21412, 198, 198, 11748, 12972, 9288, 628 ]
3.941176
34
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'chooseserver.no.ui' # # Created by: PyQt5 UI code generator 5.13.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 6679, 4629, 18497, 13, 3919, 13, 9019, 6, 198, 2, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, 12454, 2438, 1...
2.829545
88
# -*- coding: utf-8 -*- """ Created on Wed Jun 6 12:02:05 2018 @author: eub_hmy """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import os.path import sys import time import tensorflow as tf import pandas as pd import numpy as np from s...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 7653, 220, 718, 1105, 25, 2999, 25, 2713, 2864, 198, 198, 31, 9800, 25, 304, 549, 62, 71, 1820, 198, 37811, 198, 6738, 11593, 37443, 834,...
2.103696
974
# # PySNMP MIB module FA-EXT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/FA-EXT-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:11:49 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 9677, 12, 13918, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490, 14, 67, 615, 47562, 19, ...
2.822044
4,872
# Copyright 2017 The TensorFlow 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 applica...
[ 2, 15069, 2177, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
3.585075
335
from PyQt5.Qt import * from UI.reader_interface import Ui_MainWindow import sys if __name__ == "__main__": app = QApplication(sys.argv) window = ReaderPane() window.show() sys.exit(app.exec_())
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 1330, 1635, 198, 6738, 12454, 13, 46862, 62, 39994, 1330, 471, 72, 62, 13383, 27703, 198, 11748, 25064, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, ...
2.529412
85
import tensorflow as tf import matplotlib.pyplot as plt import time
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 640, 198 ]
3.238095
21
""" API Provider filter """ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2015, 2017 VMware, Inc. All rights reserved. -- VMware Confidential' # pylint: disable=line-too-long import abc import six from vmware.vapi.core import ApiProvider from vmware.vapi.data.serializers.introspection import ( convert...
[ 37811, 198, 17614, 32549, 8106, 198, 37811, 198, 198, 834, 9800, 834, 796, 705, 15996, 1574, 11, 3457, 2637, 198, 834, 22163, 4766, 834, 796, 705, 15269, 1853, 11, 2177, 37754, 11, 3457, 13, 220, 1439, 2489, 10395, 13, 1377, 37754, 73...
2.493902
1,640
"""The WaveBlocks Project Compute the kinetic and potential energies of a wavefunction. @author: R. Bourquin @copyright: Copyright (C) 2012, 2016 R. Bourquin @license: Modified BSD License """ from numpy import zeros from WaveBlocksND import BlockFactory from WaveBlocksND import KineticOperator from WaveBlocksND im...
[ 37811, 464, 17084, 45356, 4935, 198, 198, 7293, 1133, 262, 37892, 290, 2785, 27598, 286, 257, 6769, 8818, 13, 198, 198, 31, 9800, 25, 371, 13, 20576, 21915, 198, 31, 22163, 4766, 25, 15069, 357, 34, 8, 2321, 11, 1584, 371, 13, 20576...
2.382598
1,678
import argparse from importlib import import_module if __name__ == "__main__": main()
[ 11748, 1822, 29572, 198, 6738, 1330, 8019, 1330, 1330, 62, 21412, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419 ]
3.103448
29
""" :mod:`dim` is an HTML parser and simple DOM implementation with CSS selector support. :mod:`dim` - is a single module; - has no dependency outside `PSL <https://docs.python.org/3/library/>`_; - is not crazy long; - supports Python 3.6 and forward, so the file could be directly embedded in any Python 3.4+ applica...
[ 37811, 198, 25, 4666, 25, 63, 27740, 63, 318, 281, 11532, 30751, 290, 2829, 24121, 7822, 351, 17391, 198, 19738, 273, 1104, 13, 198, 198, 25, 4666, 25, 63, 27740, 63, 198, 198, 12, 318, 257, 2060, 8265, 26, 198, 12, 468, 645, 2020...
2.223517
13,046
# Generated by Django 2.1.1 on 2018-09-25 19:27 import itertools from django.db import migrations, models forward_map = { 'Daily': "daily", 'Weekly': "weekly", 'Monthly': "monthly", } reverse_map = {v: k for k, v in forward_map.items()}
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 16, 319, 2864, 12, 2931, 12, 1495, 678, 25, 1983, 198, 198, 11748, 340, 861, 10141, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628, 198, 11813, 62, 8899, 796, 1391, 19...
2.514851
101
# Generated by Django 3.1.3 on 2020-11-17 19:29 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 18, 319, 12131, 12, 1157, 12, 1558, 678, 25, 1959, 201, 198, 201, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 201, 198, 201, 198 ]
2.567568
37
#!/usr/bin/python from scheduler import Scheduler from queue import Queue from fixjob import FixJob from tokenbucket import TokenBucket from server import Server import logging, sys import numpy as np logging.basicConfig(stream=sys.stdout, level=logging.INFO) ### one token bucket numJob = 1 testDuration = 500.0 bRa...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 6738, 6038, 18173, 1330, 27774, 18173, 198, 6738, 16834, 1330, 4670, 518, 198, 6738, 4259, 21858, 1330, 13268, 33308, 198, 6738, 11241, 27041, 316, 1330, 29130, 33, 38811, 198, 6738, 4382, ...
2.35078
898
#!/usr/bin/env python # ROS packages required import rospy import rospkg # Dependencies required import gym import os import numpy as np import pandas as pd import time # from stable_baselines.common.policies import MlpPolicy, MlpLstmPolicy, MlpLnLstmPolicy # from stable_baselines.common.vec_env import DummyVecEnv # f...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 48263, 10392, 2672, 198, 11748, 686, 2777, 88, 198, 11748, 686, 2777, 10025, 198, 2, 37947, 3976, 2672, 198, 11748, 11550, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, ...
2.673273
1,867
from allauth.socialaccount.providers.oauth_provider.urls import default_urlpatterns from .provider import OpenStreetMapProvider urlpatterns = default_urlpatterns(OpenStreetMapProvider)
[ 6738, 477, 18439, 13, 14557, 23317, 13, 15234, 4157, 13, 12162, 1071, 62, 15234, 1304, 13, 6371, 82, 1330, 4277, 62, 6371, 33279, 82, 198, 198, 6738, 764, 15234, 1304, 1330, 4946, 34356, 13912, 29495, 628, 198, 6371, 33279, 82, 796, 4...
3.54717
53
"""Example test for a pdf or function""" import numpy as np import pytest import tensorflow as tf import zfit import zfit_physics as zphys # Important, do the imports below from zfit.core.testing import tester # specify globals here. Do NOT add any TensorFlow but just pure python param1_true = 0.3 param2_true = 1.2 ...
[ 37811, 16281, 1332, 329, 257, 37124, 393, 2163, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 1976, 11147, 198, 198, 11748, 1976, 11147, 62, 746, 23154, 355...
3.297297
148
file = open('./map') m = [[c for c in line[:-1]] for line in file] start = findStart() dist = 0 paths = { start: [] } queue = [start, None] while queue: loc = queue.pop(0) if not loc: if (len(queue) == 0 or not queue[0]): break dist += 1 queue.append(None) co...
[ 7753, 796, 1280, 7, 4458, 14, 8899, 11537, 198, 198, 76, 796, 16410, 66, 329, 269, 287, 1627, 58, 21912, 16, 11907, 329, 1627, 287, 2393, 60, 628, 198, 198, 9688, 796, 1064, 10434, 3419, 198, 17080, 796, 657, 198, 6978, 82, 796, 1...
1.980822
365
NUM_CLASSES = 14 IMG_HEIGHT = 353 IMG_WIDTH = 257 IMG_SMALL_HEIGHT = 120 IMG_SMALL_WIDTH = 96 RADIUS = 25 epochs = 10 batch_size = 64
[ 198, 41359, 62, 31631, 1546, 796, 1478, 198, 3955, 38, 62, 13909, 9947, 220, 796, 47567, 198, 3955, 38, 62, 54, 2389, 4221, 220, 220, 796, 36100, 198, 198, 3955, 38, 62, 12310, 7036, 62, 13909, 9947, 796, 7982, 198, 3955, 38, 62, ...
1.931507
73
import os from flask import Flask, json, jsonify, request from flask_cors import CORS from flask_caching import Cache from decouple import config import logging # setting up for local testing, wnat to be able to log the database """ We want to be able to test locally and log information for debugging """ # Local sql...
[ 11748, 28686, 198, 6738, 42903, 1330, 46947, 11, 33918, 11, 33918, 1958, 11, 2581, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 198, 6738, 42903, 62, 66, 8103, 1330, 34088, 198, 6738, 875, 43846, 1330, 4566, 198, 11748, 18931, 628, ...
2.563177
554
# Copyright (c) 2003-2009 Ralph Meijer # See LICENSE for details """ Tests for L{wokkel.xmppim}. """ from twisted.internet import defer from twisted.trial import unittest from twisted.words.protocols.jabber.jid import JID from twisted.words.protocols.jabber.xmlstream import toResponse from twisted.words.xish import d...
[ 2, 15069, 357, 66, 8, 5816, 12, 10531, 20993, 2185, 2926, 263, 198, 2, 4091, 38559, 24290, 329, 3307, 198, 198, 37811, 198, 51, 3558, 329, 406, 90, 86, 482, 7750, 13, 87, 76, 381, 320, 27422, 198, 37811, 198, 198, 6738, 19074, 13,...
2.241644
4,697
from server import api, db from flask_restful import Resource from flask import request, g from server.models import MailConfig class MailConfigClass(Resource): """邮箱设置,接受前端发来的邮箱信息放到数据库 """ def get(self): """获取邮箱设置 """ mail_config = MailConfig.query.filter_by(ownerId = g.userId).f...
[ 6738, 4382, 1330, 40391, 11, 20613, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 198, 6738, 42903, 1330, 2581, 11, 308, 198, 6738, 4382, 13, 27530, 1330, 11099, 16934, 628, 198, 4871, 11099, 16934, 9487, 7, 26198, 2599, 198, 220, 220, ...
1.715102
1,225
# "Chef" class is defined with 3 functions.
[ 2, 366, 7376, 69, 1, 1398, 318, 5447, 351, 513, 5499, 13, 198 ]
3.384615
13
#!/usr/bin/env python from nlp import NlpClass import sqlite3 import os # import time from datetime import datetime dir = os.path.dirname(os.path.abspath(__file__)) RM = sqlite3.connect(dir + '/data/robbie_memory.db') if __name__ == '__main__': st = TerminalInput()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 628, 198, 6738, 299, 34431, 1330, 399, 34431, 9487, 198, 11748, 44161, 578, 18, 198, 11748, 28686, 198, 2, 1330, 640, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 15908, 796, 28686, 1...
2.660194
103
"""Compute the observed order of convergence for the velocity and pressure.""" import numpy import pathlib import petibmpy def observed_order_convergence(fields, grids, grid_ref, ratio): """Compute the observed order of convergence. Parameters ---------- fields : tuple of numpy.ndarray objects ...
[ 37811, 7293, 1133, 262, 6515, 1502, 286, 40826, 329, 262, 15432, 290, 3833, 526, 15931, 628, 198, 11748, 299, 32152, 198, 11748, 3108, 8019, 198, 198, 11748, 4273, 571, 3149, 88, 628, 198, 4299, 6515, 62, 2875, 62, 1102, 332, 12745, 7...
2.671306
934
import errno import os import subprocess from bp import abstract, generic from bp.filepath import FilePath from characteristic import Attribute, attributes from zope.interface import implementer # TODO: Really betterpath should have a separate interface for like, # file systems, or listable things. @implement...
[ 11748, 11454, 3919, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 198, 6738, 275, 79, 1330, 12531, 11, 14276, 198, 6738, 275, 79, 13, 7753, 6978, 1330, 9220, 15235, 198, 6738, 16704, 1330, 3460, 4163, 11, 12608, 198, 6738, 1976, 3008,...
2.521073
522
"""Test methods in __main__.""" from unittest.mock import patch, PropertyMock from homeassistant import __main__ as main @patch('sys.exit') def test_validate_python(mock_exit): """Test validate Python version method.""" with patch('sys.version_info', new_callable=PropertyMock(return_value=(2, ...
[ 37811, 14402, 5050, 287, 11593, 12417, 834, 526, 15931, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 11, 14161, 44, 735, 198, 198, 6738, 1363, 562, 10167, 1330, 11593, 12417, 834, 355, 1388, 628, 198, 31, 17147, 10786, 17597, 13...
2.335907
518
from datetime import datetime from typing import Callable, Optional import pytest from _pytest.config.argparsing import Parser from _pytest.fixtures import SubRequest from _pytest.terminal import TerminalReporter from .version import __version__ @pytest.fixture(name="printer") def printer(request: SubRequest) -> C...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 4889, 540, 11, 32233, 198, 198, 11748, 12972, 9288, 198, 6738, 4808, 9078, 9288, 13, 11250, 13, 853, 79, 945, 278, 1330, 23042, 263, 198, 6738, 4808, 9078, 9288, 13, 69, 2550...
3.070707
198
# # ovirt-engine-setup -- ovirt engine setup # # Copyright oVirt Authors # SPDX-License-Identifier: Apache-2.0 # # from otopi import util from . import connection from . import engine_connection from . import dbmsupgrade from . import schema from . import vacuum @util.export # vim: expandtab tabstop=4 shiftwidt...
[ 2, 198, 2, 19643, 2265, 12, 18392, 12, 40406, 1377, 19643, 2265, 3113, 9058, 198, 2, 198, 2, 15069, 267, 53, 2265, 46665, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 198, 2, 628, 198, 6738, ...
3.145631
103
from app import create_app,db from app.models import User from flask_script import Manager,Server from flask_migrate import Migrate,MigrateCommand from app.models import User, Blog, Comment, Quote #creating app instance app= create_app('production') manager= Manager(app) manager.add_command('server',Server) migr...
[ 6738, 598, 1330, 2251, 62, 1324, 11, 9945, 198, 6738, 598, 13, 27530, 1330, 11787, 198, 6738, 42903, 62, 12048, 1330, 9142, 11, 10697, 198, 6738, 220, 42903, 62, 76, 42175, 1330, 337, 42175, 11, 44, 42175, 21575, 198, 6738, 598, 13, ...
3.210145
138
# -------------------------------------------------------- # Tensorflow Faster R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by Xinlei Chen # -------------------------------------------------------- from __future__ import absolute_import from __future__ import division from __future__ impor...
[ 2, 20368, 22369, 198, 2, 309, 22854, 11125, 38996, 371, 12, 18474, 198, 2, 49962, 739, 383, 17168, 13789, 685, 3826, 38559, 24290, 329, 3307, 60, 198, 2, 22503, 416, 25426, 293, 72, 12555, 198, 2, 20368, 22369, 198, 6738, 11593, 37443...
2.309027
3,113
# Copyright 2013 Google Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
[ 2, 220, 220, 220, 15069, 2211, 3012, 3457, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846,...
2.412131
3,693
# -*- coding: utf-8 -*- import torchvision import torchvision.transforms as transforms import torch.nn as nn from Mnn_Core.mnn_pytorch import * from torch.utils.tensorboard import SummaryWriter writer = SummaryWriter('runs/cifar10_experiment_1') class Mnn_Classic(torch.nn.Module): """Some Information about Net""...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28034, 10178, 198, 11748, 28034, 10178, 13, 7645, 23914, 355, 31408, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 337, 20471, 62, 14055, 13, 10295, 77, ...
2.834483
145
# Copyright 2020 nunopenim @github # # Licensed under the PEL (Penim Enterprises License), v1.0 # # You may not use this file or any of the content within it, unless in # compliance with the PE License """ used to get github api information for github module """ import json import urllib.request as url VERSION = "1.1...
[ 2, 15069, 12131, 48157, 9654, 320, 2488, 12567, 198, 2, 198, 2, 49962, 739, 262, 350, 3698, 357, 25553, 320, 41253, 13789, 828, 410, 16, 13, 15, 198, 2, 198, 2, 921, 743, 407, 779, 428, 2393, 393, 597, 286, 262, 2695, 1626, 340, ...
3.164286
140
import os import re from typing import List, Optional, Union import numpy as np from matplotlib import pyplot as plt from pandas import DataFrame from scipy.optimize import curve_fit from sigfig import round from sklearn.metrics import r2_score
[ 11748, 28686, 198, 11748, 302, 198, 6738, 19720, 1330, 7343, 11, 32233, 11, 4479, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 6738, 19798, 292, 1330, 6060, 19778, 198, 67...
3.528571
70
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE.txt file in the root directory of this source tree. from abc import ABC, abstractmethod from typing import Dict, List, NamedTuple, Option...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 347, 10305, 12, 7635...
3.384416
770
from django.contrib import admin from django import forms from .models import Invoice, InvoiceItem, Payment admin.site.register(Invoice, InvoiceAdmin) admin.site.register(InvoiceItem, InvoiceItemAdmin) admin.site.register(Payment, PaymentAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 764, 27530, 1330, 10001, 2942, 11, 10001, 2942, 7449, 11, 28784, 628, 198, 28482, 13, 15654, 13, 30238, 7, 19904, 2942, 11, 10001, 2942, 467...
3.311688
77
import os import pandas as pd import joblib base_accounts_dir = os.path.join(os.path.abspath('TweetSuite'),'accounts') base_accounts = [account for account in os.listdir(base_accounts_dir) if account != 'vault'] accounts_dir = os.path.abspath('accounts') getInput(base_accounts)
[ 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 1693, 8019, 198, 198, 8692, 62, 23317, 82, 62, 15908, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 397, 2777, 776, 10786, 47845, 5606, 578, 33809, 6, 23317, 8...
2.688679
106
import unittest import pytest import sys import hubcheck pytestmark = [ pytest.mark.fail] if __name__ == '__main__': # unittest.main(verbosity=0) tr = unittest.TextTestRunner(stream=sys.stdout,verbosity=0) unittest.main(testRunner=tr,exit=False)
[ 11748, 555, 715, 395, 198, 11748, 12972, 9288, 198, 11748, 25064, 198, 198, 11748, 12575, 9122, 198, 198, 9078, 9288, 4102, 796, 685, 12972, 9288, 13, 4102, 13, 32165, 60, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 1...
2.514286
105
import unittest import math import numpy as np from cdtw.dtw import * from numpy.testing import assert_array_equal, assert_array_almost_equal try: import dtaidistance DTAIDISTANCE_INSTALLED = True except ImportError: DTAIDISTANCE_INSTALLED = False if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 10688, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 22927, 4246, 13, 67, 4246, 1330, 1635, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 18747, 62, 40496, 11, 6818, 62, 18747, 62, 28177, 62...
2.713043
115
# -*- coding: utf-8 -*- import inspect import logging import re from six import string_types from . import helpers from . import magicnumbers from . import util from .magicnumbers import maps, language_map from .xpath import xpb log = logging.getLogger(__name__) class Detail(object): """Represent a detail bel...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 10104, 198, 11748, 18931, 198, 11748, 302, 198, 198, 6738, 2237, 1330, 4731, 62, 19199, 198, 198, 6738, 764, 1330, 49385, 198, 6738, 764, 1330, 5536, 77, 17024, 1...
2.24092
1,652
"""Executing a bash script.""" # Copyright (c) 2017 Thomas Lehmann # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # software and associated documentation files (the "Software"), to deal in the Software # without restriction, including without limitation the rights to use, copy,...
[ 37811, 23002, 15129, 257, 27334, 4226, 526, 15931, 198, 2, 15069, 357, 66, 8, 2177, 5658, 29921, 9038, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 286, 428, 198, 2, 3788, ...
2.295052
3,335
import sys import numpy as np from lab1 import input_matrix, input_vector # from lab4 import first_and_second_step_simplex_method def double_simplex(c, b, a_matrix, j_vector): """Сreates an optimal unfeasible plan and then converts it to a feasible one without violating optimality. Args: c (np.a...
[ 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 2248, 16, 1330, 5128, 62, 6759, 8609, 11, 5128, 62, 31364, 198, 2, 422, 2248, 19, 1330, 717, 62, 392, 62, 12227, 62, 9662, 62, 14323, 11141, 62, 24396, 628, 198, 4299...
1.761087
2,097
name = raw_input("Enter") print"Hello " + name
[ 3672, 796, 8246, 62, 15414, 7203, 17469, 4943, 198, 4798, 1, 15496, 366, 1343, 1438 ]
3.066667
15
# -*- coding: utf-8 -*- """Project metadata Information describing the project. """ # The package name, which is also the "UNIX name" for the project. package = 'airport challenge' project = "Airport Challenge in Python" project_no_spaces = project.replace(' ', '') version = '0.1' description = 'Just some experimenta...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 16775, 20150, 198, 198, 21918, 12059, 262, 1628, 13, 198, 37811, 198, 198, 2, 383, 5301, 1438, 11, 543, 318, 635, 262, 366, 4944, 10426, 1438, 1, 329, 262, 1628...
3.390909
110
from utils import * from data_load import load_data import pandas as pd import sys import os import glob from argparse import ArgumentParser import imp import numpy as np from utils import spectrogram2wav # from scipy.io.wavfile import write import soundfile as sf import tqdm from concurrent.futures import Process...
[ 6738, 3384, 4487, 1330, 1635, 198, 6738, 1366, 62, 2220, 1330, 3440, 62, 7890, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 15095, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 198, 117...
2.461402
1,127
# %% # import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt import networkx as nx from joblib import Parallel, delayed from tqdm import tqdm from pymaid_creds import url, name, password, token import pymaid import connectome_tools.cluster_analysis as clust import connectome_too...
[ 2, 43313, 198, 2, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 3127, 87, 355, 299...
2.443929
1,293
from mayan.apps.documents.tests.base import GenericDocumentViewTestCase from ..permissions import permission_workflow_transition from .mixins import ( WorkflowTestMixin, WorkflowViewTestMixin, WorkflowTransitionViewTestMixin )
[ 6738, 743, 272, 13, 18211, 13, 15390, 2886, 13, 41989, 13, 8692, 1330, 42044, 24941, 7680, 14402, 20448, 198, 198, 6738, 11485, 525, 8481, 1330, 7170, 62, 1818, 11125, 62, 7645, 653, 198, 198, 6738, 764, 19816, 1040, 1330, 357, 198, 2...
3.441176
68
# from pathlib import Path # from text_utils.ipa2symb import IPAExtractionSettings # from text_utils.language import Language # from text_utils.text import EngToIpaMode # def test_add_corpus_from_text_file(tmp_path: Path): # base_dir = tmp_path / "base_dir" # text_path = tmp_path / "input.txt" # text_path.writ...
[ 2, 422, 3108, 8019, 1330, 10644, 198, 198, 2, 422, 2420, 62, 26791, 13, 541, 64, 17, 1837, 2022, 1330, 27966, 11627, 7861, 26232, 198, 2, 422, 2420, 62, 26791, 13, 16129, 1330, 15417, 198, 2, 422, 2420, 62, 26791, 13, 5239, 1330, ...
2.093107
1,117
K = int(input()) a = input().split() d = [0] for x in a: d.append(d[-1] ^ int(x)) # d[i] == a_1 ^ ... ^ a_i Q = int(input()) for i in range(Q): l, r = [int(x) for x in input().split()] print(d[r % (K+1)] ^ d[(l-1) % (K+1)])
[ 42, 796, 493, 7, 15414, 28955, 198, 64, 796, 5128, 22446, 35312, 3419, 198, 67, 796, 685, 15, 60, 198, 1640, 2124, 287, 257, 25, 198, 220, 220, 220, 288, 13, 33295, 7, 67, 58, 12, 16, 60, 10563, 493, 7, 87, 4008, 220, 1303, 28...
1.875
128
import torch import torch.nn as nn ### Model : RRCNN-C ###
[ 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 201, 198, 21017, 9104, 1058, 371, 7397, 6144, 12, 34, 44386, 201, 198, 201 ]
2.407407
27
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2014,2015,2016,2017 Jeremie DECOCK (http://www.jdhp.org) # 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, ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 357, 66, 8, 1946, 11, 4626, 11, 5304, 11, 5539, 10272, 44871, 27196, 11290, 357, 4023, 1378, 2503,...
3.648725
353
a=int(input()) for i in range(1,a+1): print(i*'*')
[ 198, 64, 28, 600, 7, 15414, 28955, 198, 198, 1640, 1312, 287, 2837, 7, 16, 11, 64, 10, 16, 2599, 198, 220, 220, 220, 3601, 7, 72, 9, 6, 9, 11537 ]
1.806452
31
from ..bert import Bert, BertMLMHead from ..configs import RobertaConfig class Roberta(Bert): """ Roberta """ config_cls = RobertaConfig class RobertaPreTraining(Roberta): """ Roberta PreTraining Model, it exclude nsp task """
[ 6738, 11485, 4835, 1330, 22108, 11, 22108, 5805, 44, 13847, 198, 6738, 11485, 11250, 82, 1330, 5199, 64, 16934, 628, 198, 4871, 5199, 64, 7, 33, 861, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 5199, 64, 198, 220, 220, 220,...
2.795699
93
import sys import os import thriftpy sys.path.append("../") sys.path.append("gen-py") from SpotifakeServices import TrackService from SpotifakeServices.ttypes import * from SpotifakeManagement.ttypes import * from SQLConnection.sqlServer_track import SqlServerTrackManagement
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 5636, 2135, 9078, 198, 17597, 13, 6978, 13, 33295, 7203, 40720, 4943, 198, 17597, 13, 6978, 13, 33295, 7203, 5235, 12, 9078, 4943, 198, 6738, 15899, 361, 539, 31007, 1330, 17762, 16177, 198, ...
3.618421
76
from geraldo.utils import get_attr_value, calculate_size from geraldo.widgets import Widget, Label, SystemField from geraldo.graphics import Graphic, RoundRect, Rect, Line, Circle, Arc,\ Ellipse, Image class ReportGenerator(object): """A report generator is used to generate a report to a specific format.""...
[ 6738, 308, 1691, 4598, 13, 26791, 1330, 651, 62, 35226, 62, 8367, 11, 15284, 62, 7857, 198, 6738, 308, 1691, 4598, 13, 28029, 11407, 1330, 370, 17484, 11, 36052, 11, 4482, 15878, 198, 6738, 308, 1691, 4598, 13, 70, 11549, 1330, 43029,...
2.241553
12,933
import zipfile try: with zipfile.ZipFile("data/hfpy_ch5_data.zip") as zipFile: print(zipFile.namelist()) players = [] for name in zipFile.namelist(): fileContent = zipFile.read(name).decode('utf-8') fileContent = sanitize(fileContent) players.append(sor...
[ 11748, 19974, 7753, 628, 198, 198, 28311, 25, 198, 220, 220, 220, 351, 19974, 7753, 13, 41729, 8979, 7203, 7890, 14, 71, 69, 9078, 62, 354, 20, 62, 7890, 13, 13344, 4943, 355, 19974, 8979, 25, 198, 220, 220, 220, 220, 220, 220, 22...
2.034682
1,038
# Extract the raw 32 byte values of 'r and s' from OpenSSL's DER formatted signature. bytelen('r + s') == 64 from asn1crypto.core import Sequence import binascii raw64byte_sig = '' with open("REAL_DERformat_openssl_gen_sig.bin", "rb") as f: signature = f.read() # parse the ASN.1 sequence from this signature seq = ...
[ 2, 29677, 262, 8246, 3933, 18022, 3815, 286, 705, 81, 290, 264, 6, 422, 4946, 31127, 338, 360, 1137, 39559, 9877, 13, 416, 37524, 268, 10786, 81, 1343, 264, 11537, 6624, 5598, 220, 198, 6738, 355, 77, 16, 29609, 78, 13, 7295, 1330, ...
2.580769
260
# -*- coding: utf-8 -*- """ Do grid search only for uavs should save the configurations of the uavs from hiearchy search send this configuration to the Astar """ from __future__ import print_function import numpy as np import math as m import random from Astar import Astar, AstarGraph, AstarLowLevel import itertool...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 5211, 10706, 2989, 691, 329, 334, 615, 82, 220, 198, 21754, 3613, 262, 25412, 286, 262, 334, 615, 82, 422, 23105, 3679, 88, 2989, 198, 21280, 428, 8398, 28...
2.777778
288
from argparse import ArgumentParser
[ 6738, 1822, 29572, 1330, 45751, 46677, 198 ]
5.142857
7
#Find total number of Squares in a N*N cheesboard. # using mathematical logic #taking input num = int(input("Enter the number :")) obj = Solution() print("The square : ") print(obj.squares(num)) ''' Time complexity : O(N) Space complexity : O(1) Input : Enter the number : 1 Output : The square is : 1 '''
[ 2, 16742, 2472, 1271, 286, 5056, 3565, 287, 257, 399, 9, 45, 27384, 3526, 13, 198, 220, 220, 220, 1303, 1262, 18069, 9156, 198, 198, 2, 26103, 5128, 198, 22510, 796, 493, 7, 15414, 7203, 17469, 262, 1271, 1058, 48774, 198, 26801, 79...
2.95283
106
import fitz from typing import Dict, List import logging logger = logging.getLogger(__name__)
[ 11748, 4197, 89, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 198, 198, 11748, 18931, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198 ]
3.096774
31
#encoding=utf-8 import evt_abi abi=evt_abi.evt_abi() j=r''' { "name": "test", "issuer": "EVT8MGU4aKiVzqMtWi9zLpu8KuTHZWjQQrX475ycSxEkLd6aBpraX", "issue": { "name": "issue", "threshold": 1, "authorizers": [{ "ref": "[A] EVT8MGU4aKiVzqMtWi9zLpu8KuTHZWjQQrX475ycSxEkLd6aBpraX", "weight": 1 ...
[ 2, 12685, 7656, 28, 40477, 12, 23, 198, 11748, 819, 83, 62, 17914, 198, 198, 17914, 28, 1990, 83, 62, 17914, 13, 1990, 83, 62, 17914, 3419, 198, 73, 28, 81, 7061, 6, 198, 90, 198, 1, 3672, 1298, 366, 9288, 1600, 198, 1, 747, 1...
1.873253
1,073
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019-06-13 14:52 # @Author : liupan # @Site : # @File : demo2.py # @Software: PyCharm import csv with open('data.csv', 'w') as csvfile: writer = csv.writer(csvfile, delimiter=' ') writer.writerow(['id', 'name', 'age']) writer.writerow(['10...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 13130, 12, 3312, 12, 1485, 1478, 25, 4309, 198, 2, 2488, 13838, 220, 1058, 7649, ...
2.236842
190
from __future__ import absolute_import import logging import os import time import typing from collections import defaultdict import pyspark.sql as spark from pyspark import Row from pyspark.sql.functions import ( approx_count_distinct, col, count, countDistinct, desc, floor, isnull, ...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 19720, 198, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 11748, 279, 893, 20928, 13, 25410, 355, 9009, 198, 198, 6...
2.338173
2,135
from distutils.core import setup from distutils.command.install import INSTALL_SCHEMES from os import sys, path import os,shutil,re from glob import glob for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] from imp import find_module try: find_module('numpy') except: sys.exit('### Error: py...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 6738, 1233, 26791, 13, 21812, 13, 17350, 1330, 40589, 7036, 62, 50, 3398, 3620, 1546, 198, 6738, 28686, 1330, 25064, 11, 3108, 198, 11748, 28686, 11, 1477, 22602, 11, 260, 198, 6738, 15095, ...
2.385906
894
# -------------------------------------------------------- # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- import pybullet as p import os import IPython # adapted from https://github.com/bryandlee/franka_pybullet/tree/ac86319a0b2f6c863ba3c7ee3d52f4...
[ 2, 20368, 22369, 198, 2, 49962, 739, 383, 17168, 13789, 685, 3826, 38559, 24290, 329, 3307, 60, 198, 2, 20368, 22369, 198, 198, 11748, 12972, 15065, 1616, 355, 279, 198, 11748, 28686, 198, 11748, 6101, 7535, 198, 198, 2, 16573, 422, 3...
3.362069
116
from pandas import DataFrame import urllib.error import urllib.request from bs4 import BeautifulSoup # initializes variables used for beautifulsoup valid = False postcode = input("Please enter your postal code so we may show you relevant showtime information (no spaces): ") imdb = "https://www.imdb.com/showtimes/locat...
[ 6738, 19798, 292, 1330, 6060, 19778, 198, 11748, 2956, 297, 571, 13, 18224, 198, 11748, 2956, 297, 571, 13, 25927, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 198, 2, 4238, 4340, 9633, 973, 329, 4950, 82, 10486, 198, 12102, ...
2.633776
1,581
from tars.helpers.api import CromAPI def test_crom_api(): """Simple test cases for the Crom API wrapper.""" api = CromAPI("en") # Honestly, the tag list seems like the only thing that I'm reasonably guaranteeing # won't be screwed with in the future. scp_5000 = api.get_one_page_meta("scp-5000") ...
[ 6738, 256, 945, 13, 16794, 364, 13, 15042, 1330, 39131, 17614, 628, 198, 4299, 1332, 62, 66, 398, 62, 15042, 33529, 198, 220, 220, 220, 37227, 26437, 1332, 2663, 329, 262, 39131, 7824, 29908, 526, 15931, 198, 220, 220, 220, 40391, 796...
2.613577
383
# 沿每个维度按crop_width裁剪数组
[ 2, 10545, 110, 123, 162, 107, 237, 10310, 103, 163, 119, 112, 41753, 99, 162, 234, 231, 31476, 62, 10394, 32518, 223, 30298, 103, 46763, 108, 163, 119, 226 ]
0.758621
29
import torch import os import pandas as pd import math import numpy as np import dendropy from Bio import SeqIO
[ 11748, 28034, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 288, 437, 28338, 198, 6738, 16024, 1330, 1001, 80, 9399, 628 ]
3.323529
34
import pytest import kopf from kopf._core.intents.filters import PRESENT OBJECT_BODY = { 'apiVersion': 'group/version', 'kind': 'singular', 'metadata': { 'name': 'test', 'labels': { 'key': 'value', }, 'annotations': { 'key': 'value', } } ...
[ 11748, 12972, 9288, 198, 198, 11748, 479, 404, 69, 198, 6738, 479, 404, 69, 13557, 7295, 13, 600, 658, 13, 10379, 1010, 1330, 32552, 3525, 198, 198, 9864, 23680, 62, 33, 33076, 796, 1391, 198, 220, 220, 220, 705, 15042, 14815, 10354, ...
2.42707
761
# -*- coding:utf-8 -*- # Copyright 2018 Huawei Technologies Co.,Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use # this file except in compliance with the License. You may obtain a copy of the # License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 15069, 2864, 43208, 21852, 1766, 1539, 43, 8671, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 407...
3.011211
446
from .func import Func
[ 6738, 764, 20786, 1330, 11138, 66 ]
3.666667
6
import xml.etree.ElementTree import json import sys import os import hashlib from collections import defaultdict from bs4 import BeautifulSoup if '__file__' in globals(): sys.path.insert(0, os.path.join(os.path.abspath(__file__), 'scripts')) else: sys.path.insert(0, os.path.join(os.path.abspath(os.getcwd()), '...
[ 11748, 35555, 13, 316, 631, 13, 20180, 27660, 198, 11748, 33918, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 12234, 8019, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 198, 361, 705, 834...
2.180349
3,094
import numpy as np import cv2 as cv try: log = open('log.txt',"w") except: print( "No se puede abrir el archivo log") #Contadores de entrada y salida cnt_up = 0 cnt_down = 0 #Fuente de video #cap = cv.VideoCapture(0) cap = cv.VideoCapture('Test Files/videos/TestVideo.avi') #Imprime las propiedades de cap...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 355, 269, 85, 198, 198, 28311, 25, 198, 220, 220, 220, 2604, 796, 1280, 10786, 6404, 13, 14116, 40264, 86, 4943, 198, 16341, 25, 198, 220, 220, 220, 3601, 7, 366, 2949, 384, ...
1.909329
2,294
""" Tests for settings utils """ from pyramid_duh.settings import asdict try: import unittest2 as unittest # pylint: disable=F0401 except ImportError: import unittest class TestAsDict(unittest.TestCase): """ Tests for asdict """ def test_default(self): """ If provided value is a dict, ret...
[ 37811, 30307, 329, 6460, 3384, 4487, 37227, 198, 6738, 27944, 62, 646, 71, 13, 33692, 1330, 355, 11600, 628, 198, 28311, 25, 198, 220, 220, 220, 1330, 555, 715, 395, 17, 355, 555, 715, 395, 220, 1303, 279, 2645, 600, 25, 15560, 28, ...
2.051908
655
from tika import parser from dateutil.parser import parser as date_parser from PortugueseParserInfo import PortugueseParserInfo
[ 6738, 256, 9232, 1330, 30751, 198, 6738, 3128, 22602, 13, 48610, 1330, 30751, 355, 3128, 62, 48610, 198, 6738, 21813, 46677, 12360, 1330, 21813, 46677, 12360, 628, 628 ]
4.678571
28
from django.contrib import admin from .models import Unit, Skill, Gear, Guild, Category # noinspection PyMethodMayBeStatic,PyUnusedLocal @admin.register(Unit) @admin.register(Gear) @admin.register(Skill) @admin.register(Category) @admin.register(Guild)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 27530, 1330, 11801, 11, 16023, 11, 10740, 11, 16446, 11, 21743, 628, 198, 2, 645, 1040, 14978, 9485, 17410, 6747, 3856, 45442, 11, 20519, 3118, 1484, 14565, 628, 198, ...
3.068966
87
import json from asyncio import AbstractEventLoop, get_event_loop from typing import Optional, NoReturn from aiohttp import TCPConnector, ClientSession
[ 11748, 33918, 198, 6738, 30351, 952, 1330, 27741, 9237, 39516, 11, 651, 62, 15596, 62, 26268, 198, 6738, 19720, 1330, 32233, 11, 1400, 13615, 198, 198, 6738, 257, 952, 4023, 1330, 23633, 34525, 11, 20985, 36044, 628 ]
4.162162
37
import numpy as np def laplace_numpy(image): """Laplace operator in NumPy for 2D images.""" laplacian = ( image[:-2, 1:-1] + image[2:, 1:-1] + image[1:-1, :-2] + image[1:-1, 2:] - 4 * image[1:-1, 1:-1] ) thresh = np.abs(laplacian) > 0.05 return thresh def ...
[ 11748, 299, 32152, 355, 45941, 628, 198, 4299, 8591, 5372, 62, 77, 32152, 7, 9060, 2599, 198, 220, 220, 220, 37227, 14772, 5372, 10088, 287, 31835, 20519, 329, 362, 35, 4263, 526, 15931, 198, 220, 220, 220, 8591, 489, 330, 666, 796, ...
1.659696
526
import pkg_resources import os.path from PIL import ImageFont def available(): """ Returns list of available font names. """ names = [] for f in pkg_resources.resource_listdir('ev3dev.fonts', ''): name, ext = os.path.splitext(os.path.basename(f)) if ext == '.pil': names....
[ 11748, 279, 10025, 62, 37540, 198, 11748, 28686, 13, 6978, 198, 6738, 350, 4146, 1330, 7412, 23252, 198, 198, 4299, 1695, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 16409, 1351, 286, 1695, 10369, 3891, 13, 198, 220, 220, 22...
2.467866
389
# https://tailwindcss.com
[ 2, 3740, 1378, 13199, 7972, 25471, 13, 785, 628, 628 ]
2.9
10
# Generated by Django 3.0.2 on 2020-06-16 14:06 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 17, 319, 12131, 12, 3312, 12, 1433, 1478, 25, 3312, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import os import sys import launch import launch_ros.actions if __name__ == '__main__': generate_launch_description()
[ 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 4219, 198, 11748, 4219, 62, 4951, 13, 4658, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 7716, 62, 35681, 62, 11213, 3419, 198 ]
3.15
40
from os import getenv as env from urllib.parse import quote from datetime import datetime from pytz import timezone import json from utils import ( TIMESTAMP_FORMAT, retrieve_schedule, schedule_days, schedule_match, PipelineStatus, ZoomStatus, ) import logging logger = logging.getLogger() ST...
[ 6738, 28686, 1330, 651, 24330, 355, 17365, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 9577, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 12972, 22877, 1330, 640, 11340, 198, 11748, 33918, 198, 6738, 3384, 4487, 1330, 357, 198, 2...
2.625397
315
if __name__ == '__main__': from argparse import ArgumentParser import fileinput parser = ArgumentParser() parser.add_argument('--kind', choices=['sexism', 'racism']) args = parser.parse_args() print('doc_id\ttext\tis_hate') for i, line in enumerate(fileinput.input('-')): line = ...
[ 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 422, 1822, 29572, 1330, 45751, 46677, 198, 220, 220, 220, 1330, 2393, 15414, 628, 220, 220, 220, 30751, 796, 45751, 46677, 3419, 198, 220, 220, 220, 30...
2.290179
224
from sfaira.versions.topologies.mouse.embedding.ae import AE_TOPOLOGIES from sfaira.versions.topologies.mouse.embedding.linear import LINEAR_TOPOLOGIES from sfaira.versions.topologies.mouse.embedding.nmf import NMF_TOPOLOGIES from sfaira.versions.topologies.mouse.embedding.vae import VAE_TOPOLOGIES from sfaira.versions...
[ 6738, 264, 22043, 64, 13, 47178, 13, 4852, 5823, 13, 35888, 13, 20521, 12083, 13, 3609, 1330, 25603, 62, 35222, 33462, 11015, 198, 6738, 264, 22043, 64, 13, 47178, 13, 4852, 5823, 13, 35888, 13, 20521, 12083, 13, 29127, 1330, 48920, 1...
3.059603
151
from fastapi import APIRouter, Query, Response, Request from fastapi.encoders import jsonable_encoder from fastapi.responses import JSONResponse import json from pydantic import BaseModel import s3fs from typing import Optional, TypedDict from .backend import * router = APIRouter() s3 = s3fs.S3FileSystem(anon=False, ...
[ 6738, 3049, 15042, 1330, 3486, 4663, 39605, 11, 43301, 11, 18261, 11, 19390, 198, 6738, 3049, 15042, 13, 12685, 375, 364, 1330, 33918, 540, 62, 12685, 12342, 198, 6738, 3049, 15042, 13, 16733, 274, 1330, 19449, 31077, 198, 11748, 33918, ...
2.873278
363
import sys import cv2 import numpy as np import matplotlib.pyplot as plt from skimage.transform import resize from skimage import measure from skimage.measure import regionprops import matplotlib.patches as patches from skimage.color import rgb2gray from skimage.io import imread from skimage.filters import threshold_...
[ 11748, 25064, 198, 11748, 269, 85, 17, 220, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 1341, 9060, 13, 35636, 1330, 47558, 198, 6738, 1341, 9060, 1330, 3953, 198, 6738, ...
2.417413
2,458
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2018 herrlich10@gmail.com # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 357, 66, 8, 2864, 607, 81, 33467, 940, 31, 14816, 13, 785, 198, 2, 198, 2, 2448, 3411, 318, 29376, ...
2.355117
7,651
from assetman import AssetManager
[ 6738, 11171, 805, 1330, 31433, 13511, 220, 198 ]
4.375
8
from django.conf.urls import url from django.contrib.auth import views as auth_views from . import views urlpatterns = [ url(r'^login/$', auth_views.login, {'template_name': 'auth/login.html'}, name='login'), url(r'^logout/$', auth_views.logout, name='logout'), url(r'^$', views.home, name='Home'), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 5009, 355, 6284, 62, 33571, 198, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 197, 6371, 7, ...
2.655172
116
# -*- coding: utf-8 -*- import random import numpy as np
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 11748, 4738, 198, 198, 11748, 299, 32152, 355, 45941, 628, 628, 198 ]
2.37037
27