content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import asyncio import contextlib from typing import Dict, Any, Optional import aioboto3 import botocore import statey as st SubnetConfigType = st.Struct[ "vpc_id" : st.String, "cidr_block" : st.String, # Optional args "ipv6_cidr_block" : ~st.String, "map_public_ip_on_launch" : st.Boolean(default...
[ 11748, 30351, 952, 198, 11748, 4732, 8019, 198, 6738, 19720, 1330, 360, 713, 11, 4377, 11, 32233, 198, 198, 11748, 257, 72, 672, 2069, 18, 198, 11748, 10214, 420, 382, 198, 198, 11748, 1181, 88, 355, 336, 628, 198, 7004, 3262, 16934, ...
2.078982
1,532
class constants: """Class of constants for each component of detector """ class bgsub: """Background subtraction/segmentation mod [str] the segmentation model (MOG2, KNN, GMG) """ mod = 'MOG2' class HSV: """HSV inRange filtering maximum values and init...
[ 4871, 38491, 25, 198, 220, 220, 220, 37227, 9487, 286, 38491, 329, 1123, 7515, 286, 31029, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 1398, 275, 70, 7266, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 21756, 13284, 7861, 14...
1.940179
1,120
import logging from pathlib import Path import time import boto3 # This module requires a directory `.aws/` containing credentials in the home directory, # or environment variables `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`. logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 640, 198, 198, 11748, 275, 2069, 18, 198, 198, 2, 770, 8265, 4433, 257, 8619, 4600, 13, 8356, 14, 63, 7268, 18031, 287, 262, 1363, 8619, 11, 198, 2, 393, 2858, 9633, 4600...
3.282353
85
import numpy as np import cudamat as cm
[ 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 463, 321, 265, 355, 12067, 628 ]
2.8
15
from typing import Union, Dict, List, Any, Tuple, Optional import json, tempfile, os, logging, re, shutil, mimetypes, good from tornado import httpclient, web, queues from storitch import utils, config from storitch.decorators import run_on_executor from wand import image, exceptions @web.stream_request_body def thum...
[ 6738, 19720, 1330, 4479, 11, 360, 713, 11, 7343, 11, 4377, 11, 309, 29291, 11, 32233, 198, 11748, 33918, 11, 20218, 7753, 11, 28686, 11, 18931, 11, 302, 11, 4423, 346, 11, 17007, 2963, 12272, 11, 922, 198, 6738, 33718, 1330, 2638, 1...
2.384749
1,154
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "Lucas Miguel S Ponce" __email__ = "lucasmsp@gmail.com" from ddf_library.bases.metadata import Status, OPTGroup from ddf_library.bases.context_base import ContextBase from ddf_library.ddf import DDF from ddf_library.bases.ddf_model import ModelDDF from ddf_l...
[ 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, 834, 9800, 834, 796, 366, 22946, 292, 29825, 311, 350, 27078, 1, 198, 834, 12888, 834, 796, 366, 75, 1229, ...
2.234832
2,802
import PySimpleGUI as sg from uart_serial import uart arduino = uart()
[ 11748, 9485, 26437, 40156, 355, 264, 70, 198, 6738, 334, 433, 62, 46911, 1330, 334, 433, 198, 198, 446, 84, 2879, 796, 334, 433, 3419, 628 ]
2.807692
26
# Generated by Django 2.2.6 on 2019-11-27 20:28 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 21, 319, 13130, 12, 1157, 12, 1983, 1160, 25, 2078, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from django.contrib.auth.models import User from tinymce.models import HTMLField from django.db import models # Create your models here.
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 7009, 76, 344, 13, 27530, 1330, 11532, 15878, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 13610, 534, 4981, 994, 13, 628 ]
3.564103
39
"""empty message Revision ID: 6564c80d1598 Revises: c3c2dc9000d3 Create Date: 2021-06-19 17:03:45.811885 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '6564c80d1598' down_revision = 'c3c2dc9000d3' branch_labels = None depends_on = None
[ 37811, 28920, 3275, 198, 198, 18009, 1166, 4522, 25, 6135, 2414, 66, 1795, 67, 1314, 4089, 198, 18009, 2696, 25, 269, 18, 66, 17, 17896, 24, 830, 67, 18, 198, 16447, 7536, 25, 33448, 12, 3312, 12, 1129, 1596, 25, 3070, 25, 2231, 1...
2.430894
123
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except (IOError, ImportError): with open('README.md') as f: long_description = f.read() from xl import ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 28311, 25, 198, 220, 220, 220, 422, 900, 37623, 10141, 1330, 9058, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 1233, 26791, 13, 7295, 1330, 9058, 198, 198, 28311, 25, 198, ...
2.567391
460
# all, any for group condition check # Manas Dash # 22th July 2020 # think of any (or) and all (and) as series of logical or and and operators healthy_percentage = 100 have_money = 0 no_of_friends = 5 mental_happiness = [ healthy_percentage > 50, have_money > 0, no_of_friends >= 1 ] if all(mental_happiness): p...
[ 198, 2, 477, 11, 597, 329, 1448, 4006, 2198, 198, 2, 1869, 292, 16189, 198, 2, 2534, 400, 2901, 12131, 198, 2, 892, 286, 597, 357, 273, 8, 290, 477, 357, 392, 8, 355, 2168, 286, 12219, 393, 290, 290, 12879, 628, 198, 22796, 62, ...
3
140
from __future__ import annotations import abc from typing import List, Text, TypeVar, Generic from abc import ABC from functools import singledispatchmethod from dataclasses import dataclass from zx64c.types import Type, Callable T = TypeVar("T") @SjasmplusSnapshotProgram.__eq__.register @Program.__eq__.re...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 450, 66, 198, 198, 6738, 19720, 1330, 7343, 11, 8255, 11, 5994, 19852, 11, 42044, 198, 6738, 450, 66, 1330, 9738, 198, 6738, 1257, 310, 10141, 1330, 31958, 8802, 963, 24396, 198, ...
2.666667
297
import datetime import logging import os from threading import Thread import cv2 from lib.cleanup import SegmentCleanup from lib.helpers import draw_objects from lib.mqtt.camera import MQTTCamera from lib.segments import Segments LOGGER = logging.getLogger(__name__)
[ 11748, 4818, 8079, 198, 11748, 18931, 198, 11748, 28686, 198, 6738, 4704, 278, 1330, 14122, 198, 198, 11748, 269, 85, 17, 198, 198, 6738, 9195, 13, 27773, 929, 1330, 1001, 5154, 32657, 929, 198, 6738, 9195, 13, 16794, 364, 1330, 3197, ...
3.26506
83
#!/usr/bin/env python __author__ = "bt3" if __name__ == '__main__': test_setdef()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 834, 9800, 834, 796, 366, 18347, 18, 1, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1332, 62, 2617, 4299, 3419, 628 ]
2.214286
42
from Foundation import * import objc import sys print "PyTestPlugin", __name__ print u"[inside] currentBundle %r" % (objc.currentBundle(),)
[ 6738, 5693, 1330, 1635, 198, 11748, 26181, 66, 198, 11748, 25064, 198, 198, 4798, 366, 20519, 14402, 37233, 1600, 11593, 3672, 834, 198, 4798, 334, 17912, 48787, 60, 1459, 33, 31249, 4064, 81, 1, 4064, 357, 26801, 66, 13, 14421, 33, 3...
3.133333
45
from __future__ import annotations from typing import Sequence, Union, Optional from securify.grammar import abstract_production, production @abstract_production @abstract_production @production @production @production @production
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 19720, 1330, 45835, 11, 4479, 11, 32233, 198, 198, 6738, 792, 333, 1958, 13, 4546, 3876, 1330, 12531, 62, 25493, 11, 3227, 628, 198, 31, 397, 8709, 62, 25493, 198, 198, 31, 397, ...
3.919355
62
#!/usr/bin/env python3 from os import environ from json import dumps
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 28686, 1330, 551, 2268, 198, 6738, 33918, 1330, 45514, 628, 628, 198 ]
3.083333
24
from argparse import ArgumentParser from sys import exit, stderr
[ 6738, 1822, 29572, 1330, 45751, 46677, 198, 6738, 25064, 1330, 8420, 11, 336, 1082, 81, 628 ]
4.125
16
# -*- coding:utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. 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, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 357, 34, 8, 12131, 13, 43208, 21852, 1766, 1539, 12052, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, ...
2.760811
740
# -*- coding: utf-8 -*- """ Defines unit tests for :mod:`colour.models.cie_lab` module. """ from __future__ import division, unicode_literals import numpy as np import unittest from itertools import permutations from colour.models import XYZ_to_Lab, Lab_to_XYZ, Lab_to_LCHab, LCHab_to_Lab from colour.utilities import...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 7469, 1127, 4326, 5254, 329, 1058, 4666, 25, 63, 49903, 13, 27530, 13, 66, 494, 62, 23912, 63, 8265, 13, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 133...
1.871213
6,965
from delphin import tdl, itsdb from delphin.tokens import YYTokenLattice import glob, sys, pathlib import json, pickle import numpy as np from collections import OrderedDict import pos_map from datetime import datetime CONTEXT_WINDOW = 2 DEV = ['ws212', 'ecpa'] TEST = ['cb', 'ecpr', 'jhk', 'jhu', 'tgk', 'tgu', 'psk',...
[ 6738, 1619, 746, 259, 1330, 256, 25404, 11, 663, 9945, 198, 6738, 1619, 746, 259, 13, 83, 482, 641, 1330, 575, 56, 30642, 43, 1078, 501, 198, 11748, 15095, 11, 25064, 11, 3108, 8019, 198, 11748, 33918, 11, 2298, 293, 198, 11748, 299...
2.216
625
"""Support for the Environment Canada radar imagery.""" from __future__ import annotations import voluptuous as vol from homeassistant.components.camera import Camera from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import ( ...
[ 37811, 15514, 329, 262, 9344, 3340, 13428, 19506, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 2322, 37623, 5623, 355, 2322, 198, 198, 6738, 1363, 562, 10167, 13, 5589, 3906, 13, 25695, 1330, 20432, 198, 6738, ...
2.633754
871
from urllib.request import urlopen from io import StringIO import csv data = urlopen("http://pythonscraping.com/files/MontyPythonAlbums.csv").read().decode('ascii', 'ignore') dataFile = StringIO(data) dictReader = csv.DictReader(dataFile) print(dictReader.fieldnames) for row in dictReader: print(row)
[ 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 198, 6738, 33245, 1330, 10903, 9399, 198, 11748, 269, 21370, 198, 198, 7890, 796, 19016, 9654, 7203, 4023, 1378, 79, 5272, 684, 66, 2416, 278, 13, 785, 14, 16624, 14, 26031, 88, 3790...
2.825688
109
# Write an algorithm such that if an element in MxN matrix is 0, it's entire row and column are set to 0. matrix = [[1,1,1,1],[1,1,1,1],[1,1,0,1],[1,1,1,1],[1,1,1,0]] matrixZero(matrix) print('\n'.join(['\t'.join([str(cell) for cell in row]) for row in matrix]))
[ 2, 19430, 281, 11862, 884, 326, 611, 281, 5002, 287, 337, 87, 45, 17593, 318, 657, 11, 340, 338, 2104, 5752, 290, 5721, 389, 900, 284, 657, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 628, 198, 6759, 860...
2.222222
126
# -*- coding: utf-8 -*- """ Created on Wed Nov 4 18:55:46 2020 @author: Jonathan Browning """ import numpy as np from scipy.stats import gaussian_kde as kdf from scipy import special as sp
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 5267, 220, 604, 1248, 25, 2816, 25, 3510, 12131, 198, 198, 31, 9800, 25, 11232, 4373, 278, 198, 37811, 198, 198, 11748, 299, 32152, 355, ...
2.618421
76
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Set empty next_cycle_start_date Create Date: 2017-09-25 13:56:32.087965 """ # disable Invalid constant name pylint warning for mandatory Alembic variables. # pylint: disable=invalid-name from alembic i...
[ 2, 15069, 357, 34, 8, 2177, 3012, 3457, 13, 198, 2, 49962, 739, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 1279, 3826, 38559, 24290, 2393, 29, 198, 198, 37811, 198, 7248, 6565, 1306,...
2.472093
430
""" Tests for the :class:`cpymad.madx.Madx` API. """ import os import sys import numpy as np from numpy.testing import assert_allclose, assert_equal from pytest import approx, fixture, mark, raises import cpymad from cpymad.madx import Madx, Sequence, metadata @fixture @fixture SEQU = """ ! constants QP_K1 = 2...
[ 37811, 198, 51, 3558, 329, 262, 1058, 4871, 25, 63, 13155, 4948, 324, 13, 9937, 87, 13, 18454, 87, 63, 7824, 13, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, ...
2.339341
1,609
""" File: single_objective_engine.py Author: ngocjr7 Email: ngocjr7@gmail.com Github: https://github.com/ngocjr7 Description: """ from __future__ import absolute_import from typing import List, Union, Callable from functools import wraps from collections import OrderedDict from ..geneticengine import GeneticEngine ...
[ 37811, 198, 8979, 25, 2060, 62, 15252, 425, 62, 18392, 13, 9078, 198, 13838, 25, 23370, 420, 73, 81, 22, 198, 15333, 25, 23370, 420, 73, 81, 22, 31, 14816, 13, 785, 198, 38, 10060, 25, 3740, 1378, 12567, 13, 785, 14, 782, 420, 7...
3.690323
155
# timing.py import datetime, calendar today = datetime.date.today() yesterday = today - datetime.timedelta(days = 1) tomorrow = today + datetime.timedelta(days = 1) print(yesterday, today, tomorrow) # ------------------------- ''' last_friday = datetime.date.today() oneday = datetime.timedelta(days = 1) while la...
[ 2, 10576, 13, 9078, 198, 198, 11748, 4818, 8079, 11, 11845, 198, 198, 40838, 796, 4818, 8079, 13, 4475, 13, 40838, 3419, 198, 198, 8505, 6432, 796, 1909, 532, 4818, 8079, 13, 16514, 276, 12514, 7, 12545, 796, 352, 8, 198, 198, 39532...
2.534314
204
from manticore.utils.helpers import CacheDict from .expression import * from functools import lru_cache import logging import operator logger = logging.getLogger(__name__) class Visitor(object): ''' Class/Type Visitor Inherit your class visitor from this one and get called on a different visiting f...
[ 6738, 285, 5109, 382, 13, 26791, 13, 16794, 364, 1330, 34088, 35, 713, 198, 6738, 764, 38011, 1330, 1635, 198, 6738, 1257, 310, 10141, 1330, 300, 622, 62, 23870, 198, 11748, 18931, 198, 11748, 10088, 198, 6404, 1362, 796, 18931, 13, 1...
2.106525
2,253
from django import urls from django.conf.urls import include, url from django.contrib.auth.forms import AdminPasswordChangeForm from django.urls import path from .views import * urlpatterns = [ path(r'user/<str:usr>/', accountView), path('register_/', register_), ]
[ 6738, 42625, 14208, 1330, 2956, 7278, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 32053, 35215, 19400, 8479, 198, 6738, 42625, 14208, 13, 6...
2.857143
98
# -*- coding: utf-8 -*- """try: import jieba except: print("please install jieba first.") input("press any key to continue") quit()"""
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 28311, 25, 198, 220, 220, 220, 1330, 474, 494, 7012, 198, 16341, 25, 198, 220, 220, 220, 3601, 7203, 29688, 2721, 474, 494, 7012, 717, 19570, 198, 220, 220, 220...
2.5
60
""" This is the C{admin.py} file for C{map_annotate_app}. For more details, see the documentation for C{map_annotate_app}. """ from django.contrib import admin from .models import Crime from .models import CrimeType from .models import Location from .models import Sansad admin.site.register(Location) admin.site.regi...
[ 37811, 198, 1212, 318, 262, 327, 90, 28482, 13, 9078, 92, 2393, 329, 327, 90, 8899, 62, 34574, 378, 62, 1324, 27422, 198, 1890, 517, 3307, 11, 766, 262, 10314, 329, 327, 90, 8899, 62, 34574, 378, 62, 1324, 27422, 198, 37811, 198, ...
3.258333
120
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2018, University of California, Berkeley # author: Kevin Laeufer <laeufer@cs.berkeley.edu> from collections import defaultdict if __name__ == "__main__": g = Grammar() S, B, D, E, F = non_term = g.non_terminal('S', 'B', 'D', 'E', 'F') u, v, w, x, y,...
[ 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, 2864, 11, 2059, 286, 3442, 11, 14727, 198, 2, 1772, 25, 7939, 406, 3609, 84, 2232, 1279, 75, 360...
1.959302
344
import socket, threading HOST = "127.0.0.1" PORT = 9999 server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.bind((HOST, PORT)) server.listen() clients = [] nicknames = [] # broadcast func # handle func # receive func print("******Server is running******") receive()
[ 11748, 17802, 11, 4704, 278, 201, 198, 201, 198, 39, 10892, 796, 366, 16799, 13, 15, 13, 15, 13, 16, 1, 201, 198, 15490, 796, 860, 17032, 201, 198, 201, 198, 15388, 796, 17802, 13, 44971, 7, 44971, 13, 8579, 62, 1268, 2767, 11, ...
2.294964
139
# # Copyright (c) 2015, Adam Meily <meily.adam@gmail.com> # Pypsi - https://github.com/ameily/pypsi # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # ...
[ 2, 198, 2, 15069, 357, 66, 8, 1853, 11, 7244, 2185, 813, 1279, 1326, 813, 13, 324, 321, 31, 14816, 13, 785, 29, 198, 2, 9485, 862, 72, 532, 3740, 1378, 12567, 13, 785, 14, 480, 813, 14, 9078, 862, 72, 198, 2, 198, 2, 2448, 3...
2.532193
6,663
QUESTIONS = ['a', 'b', 'c', 'x', 'y', 'z'] if __name__ == '__main__': with open('input') as file: groups = [] group = [] for row in file: row = row.strip() if not row: groups.append(group) group = [] continue ...
[ 35780, 11053, 796, 37250, 64, 3256, 705, 65, 3256, 705, 66, 3256, 705, 87, 3256, 705, 88, 3256, 705, 89, 20520, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 351, 1280, 10786, 15414, 11537, ...
1.867769
242
from dataclasses import dataclass from typing import Any, Dict, Generator, List, Optional from .base import ( Blob, Bucket, BucketClient, BucketEntry, ClientError, PathyScanDir, PurePathy, ) try: from google.api_core import exceptions as gcs_errors # type:ignore from google.auth.e...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 35986, 11, 7343, 11, 32233, 198, 198, 6738, 764, 8692, 1330, 357, 198, 220, 220, 220, 1086, 672, 11, 198, 220, 220, 220, 48353, 11, 198,...
2.950581
344
# -*- coding: utf-8 -*- from time import sleep from bs4 import BeautifulSoup import csv import requests links = [] items = [] for i in range(1,38): endpoint = f"https://baby.webteb.com/baby-names/%D8%A7%D8%B3%D9%85%D8%A7%D8%A1-%D8%A7%D9%88%D9%84%D8%A7%D8%AF-%D9%88%D8%A8%D9%86%D8%A7%D8%AA?pageindex={i}" get_r...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 640, 1330, 3993, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 269, 21370, 198, 11748, 7007, 198, 198, 28751, 796, 17635, 198, 23814, 796, 17635, 198...
2.258065
775
from typing import Tuple import haiku as hk import jax.numpy as jnp import numpyro from absl import flags from numpyro.distributions.continuous import MultivariateNormal from sde import drifts, diffusions Array = jnp.ndarray flags.DEFINE_enum("solver", "strong_3_halfs", ["euler_maruyama", "strong_3_halfs"], "Solver...
[ 6738, 19720, 1330, 309, 29291, 198, 198, 11748, 387, 28643, 355, 289, 74, 198, 11748, 474, 897, 13, 77, 32152, 355, 474, 37659, 198, 11748, 299, 32152, 305, 198, 6738, 2352, 75, 1330, 9701, 198, 6738, 299, 32152, 305, 13, 17080, 2455,...
2.684211
171
# # PySNMP MIB module JUNIPER-SONET-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/JUNIPER-SONET-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:50:16 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Ma...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 449, 4944, 4061, 1137, 12, 11782, 2767, 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, 1...
2.417255
1,982
from unit.applications.lang.python import TestApplicationPython
[ 6738, 4326, 13, 1324, 677, 602, 13, 17204, 13, 29412, 1330, 6208, 23416, 37906, 628 ]
4.333333
15
#!/usr/bin/env python from batch_demographics import create_app from config import DevConfig app = create_app(DevConfig()) if __name__ == "__main__": app.run(host="0.0.0.0", port=8000)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 15458, 62, 9536, 24188, 1330, 2251, 62, 1324, 198, 6738, 4566, 1330, 6245, 16934, 198, 198, 1324, 796, 2251, 62, 1324, 7, 13603, 16934, 28955, 198, 198, 361, 11593, 3672, 834, 66...
2.753623
69
from django.contrib import admin from .models import supeHero # Register your models here. admin.site.register(supeHero) # Register your models here.
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 424, 431, 30411, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 28482, 13, 15654, 13, 30238, 7, 2385, 431, 30411, 8, 198, 2, 17296, 534, 4981, 994, 13, 198 ]
3.511628
43
from easygui.boxes.choice_box import choicebox from easygui.boxes.text_box import textbox from phase1 import phase1 from phase2 import phase2 __author__ = 'po0ya' choices = [ 'Phase1', 'Phase2' ] choice = choicebox(msg='Please select project phase:', choices=choices) if choice == choices[0]: phase1() el...
[ 6738, 2562, 48317, 13, 29305, 13, 25541, 62, 3524, 1330, 3572, 3524, 198, 6738, 2562, 48317, 13, 29305, 13, 5239, 62, 3524, 1330, 2420, 3524, 198, 6738, 7108, 16, 1330, 7108, 16, 198, 6738, 7108, 17, 1330, 7108, 17, 198, 198, 834, 9...
2.785124
121
# -*- coding: utf-8 -*- # Copyright 2015 Donne Martin. 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. A copy of # the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "lice...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 1853, 2094, 710, 5780, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 11074, ...
2.345912
1,272
# Generated by Django 3.1.3 on 2021-06-23 02:36 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 18, 319, 33448, 12, 3312, 12, 1954, 7816, 25, 2623, 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.818182
44
''' 33. Search in Rotated Sorted Array Medium Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). You are given a target value to search. If found in the array return its index, otherwise return -1. You may assume no du...
[ 7061, 6, 198, 2091, 13, 11140, 287, 18481, 515, 311, 9741, 15690, 13398, 198, 198, 15979, 577, 281, 7177, 23243, 287, 41988, 1502, 318, 38375, 379, 617, 30355, 6439, 284, 345, 27091, 13, 198, 198, 7, 72, 13, 68, 1539, 685, 15, 11, ...
2.78392
199
""" glashammer.bundles.contrib.auth.openidauth ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Open ID Support for Glashammer :copyright: 2010 Glashammer Developers :license: MIT """ from openid.consumer.consumer import Consumer, SUCCESS, CANCEL from werkzeug import redirect from glashammer.utils import sibpath, url_fo...
[ 37811, 198, 4743, 1077, 321, 647, 13, 65, 917, 829, 13, 3642, 822, 13, 18439, 13, 9654, 3755, 1071, 198, 27156, 27156, 15116, 4907, 198, 198, 11505, 4522, 7929, 329, 2671, 1077, 321, 647, 198, 198, 25, 22163, 4766, 25, 3050, 2671, 1...
3.195804
143
import pandas as pd import numpy as np import os import pickle as pkl import json from tqdm import tqdm single_task = ['5849', '25000', '41401', '4019'] for task in single_task: path = 'data/preprocessed_data/baseline/' + task if not os.path.exists(path): os.makedirs(path) train_data, dim = pre...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 2298, 293, 355, 279, 41582, 198, 11748, 33918, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 628, 628, 198, 198, 29762, 62, 35943, ...
2.518987
237
import webapp2 from webapp2_extras import jinja2 class BaseHandler(webapp2.RequestHandler): """Provide a cached Jinja environment to each request.""" @webapp2.cached_property app = webapp2.WSGIApplication([("/_ah/warmup", MainPage), ('/', MainPage), ])
[ 11748, 3992, 1324, 17, 198, 6738, 3992, 1324, 17, 62, 2302, 8847, 1330, 474, 259, 6592, 17, 628, 198, 4871, 7308, 25060, 7, 12384, 1324, 17, 13, 18453, 25060, 2599, 198, 220, 37227, 15946, 485, 257, 39986, 17297, 6592, 2858, 284, 1123...
2.421488
121
import unittest from src.choice import Choice from src.choice.exceptions import InvalidChoiceException class UserChoiceTests(unittest.TestCase): """Tests for the user choice class""" def test_valid_choice(self): """Test valid user input""" choice = Choice('r') self.assertTrue(choice....
[ 11748, 555, 715, 395, 198, 198, 6738, 12351, 13, 25541, 1330, 18502, 198, 6738, 12351, 13, 25541, 13, 1069, 11755, 1330, 17665, 46770, 16922, 628, 198, 4871, 11787, 46770, 51, 3558, 7, 403, 715, 395, 13, 14402, 20448, 2599, 198, 220, ...
2.607843
255
#!/usr/bin/env python3 import unittest import os import networkit as nk if __name__ == "__main__": unittest.main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 555, 715, 395, 198, 11748, 28686, 198, 11748, 3127, 270, 355, 299, 74, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 197, 403, 715, 395, 13, 1241...
2.622222
45
# -*- coding: utf-8 -*- """ Created on Fri Feb 28 15:03:12 2020 @author: Ayantika """ # Importing necessary libraries import numpy as np import pandas as pd from pandas import Series, DataFrame from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression impo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 19480, 3158, 2579, 1315, 25, 3070, 25, 1065, 12131, 201, 198, 201, 198, 31, 9800, 25, 13709, 415, 9232, 201, 198, 37811, 201, 198, 20...
2.476064
376
from app import app from models import db, connect_db, User, Issue, Comment, Priority, Status, Category, Role # Drop db tables and create them anew db.drop_all() db.create_all() # Priority p1 = Priority( priority_id=0, priority_label="Low" ) p2 = Priority( priority_id=1, priority_label="Medium" ) p...
[ 6738, 598, 1330, 598, 198, 6738, 4981, 1330, 20613, 11, 2018, 62, 9945, 11, 11787, 11, 18232, 11, 18957, 11, 34416, 11, 12678, 11, 21743, 11, 20934, 198, 198, 2, 14258, 20613, 8893, 290, 2251, 606, 44951, 198, 9945, 13, 14781, 62, 4...
2.454709
1,115
from main import app app.run(host='127.0.0.1', port=8090, debug=True)
[ 6738, 1388, 1330, 598, 198, 1324, 13, 5143, 7, 4774, 11639, 16799, 13, 15, 13, 15, 13, 16, 3256, 2493, 28, 1795, 3829, 11, 14257, 28, 17821, 8, 198 ]
2.413793
29
""" :py:mod:`pymco.ssl` ------------------- Contains SSL security provider plugin. """ from __future__ import print_function import base64 import os try: from Crypto.Signature import PKCS1_v1_5 from Crypto.Hash import SHA except ImportError as exc: print('You need install pycrypto for using SSL security pr...
[ 37811, 198, 25, 9078, 25, 4666, 25, 63, 79, 4948, 1073, 13, 45163, 63, 198, 1783, 6329, 198, 4264, 1299, 25952, 2324, 10131, 13877, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 2779, 2414, 198, 11748...
2.458398
1,298
import inspect import pkgutil from importlib import import_module from pathlib import Path from client.connection import Connection from client.exceptions import ArkParameterException from client.resource import Resource
[ 11748, 10104, 198, 11748, 279, 10025, 22602, 198, 6738, 1330, 8019, 1330, 1330, 62, 21412, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 5456, 13, 38659, 1330, 26923, 198, 6738, 5456, 13, 1069, 11755, 1330, 9128, 36301, 16922, 198, ...
4.723404
47
import avalon.api from reveries.maya import lib, capsule from reveries.maya.plugins import ReferenceLoader class CameraLoader(ReferenceLoader, avalon.api.Loader): """Specific loader for the reveries.camera family""" label = "Reference camera" order = -10 icon = "code-fork" color = "orange" ...
[ 198, 11748, 37441, 261, 13, 15042, 198, 6738, 33033, 444, 13, 11261, 64, 1330, 9195, 11, 27855, 198, 6738, 33033, 444, 13, 11261, 64, 13, 37390, 1330, 20984, 17401, 628, 198, 4871, 20432, 17401, 7, 26687, 17401, 11, 37441, 261, 13, 15...
2.637931
174
# encoding: utf-8 # module renderdoc # from P:\1-Scripts\_Python\Py-Autocomplete\renderdoc.pyd # by generator 1.146 # no doc # imports import enum as __enum from .SwigPyObject import SwigPyObject class D3D12OM(SwigPyObject): """ Describes the current state of the output-merger stage of the D3D12 pipeline. """ ...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 2, 8265, 8543, 15390, 198, 2, 422, 350, 7479, 16, 12, 7391, 82, 59, 62, 37906, 59, 20519, 12, 16541, 42829, 6677, 59, 13287, 15390, 13, 79, 5173, 198, 2, 416, 17301, 352, 13, 20964, 198, 2, ...
2.948617
1,012
/home/runner/.cache/pip/pool/85/03/a8/e8d26fae6c7b3b8548be18e886767b946dd069a8481930ee9dda2adccd
[ 14, 11195, 14, 16737, 11757, 23870, 14, 79, 541, 14, 7742, 14, 5332, 14, 3070, 14, 64, 23, 14, 68, 23, 67, 2075, 69, 3609, 21, 66, 22, 65, 18, 65, 5332, 2780, 1350, 1507, 68, 3459, 3134, 3134, 65, 24, 3510, 1860, 3312, 24, 64,...
1.655172
58
import numpy as np import matplotlib.pyplot as plt import seaborn as sns import itertools fonts = {"family": "serif", "weight": "normal", "size": "12"} plt.rc('font', **fonts) plt.rc('text', usetex=True) ftc_noiseless = np.loadtxt('ftc_noiseless_case3.csv') ftc_noise = np.loadtxt('ftc_noise_case3.c...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 11748, 340, 861, 10141, 198, 198, 10331, 82, 796, 19779, 17989, 1298, 366, 2655, 361, 1600, 1...
2.054688
640
import cv2 import numpy as np if __name__ == '__main__': main()
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419 ]
2.428571
28
''' Encapsulates all tasks that can be run against the 'notes' endpoint '''
[ 7061, 6, 198, 27195, 1686, 15968, 477, 8861, 326, 460, 307, 1057, 1028, 262, 705, 17815, 6, 36123, 198, 7061, 6, 628 ]
3.5
22
# Generated by Django 2.2.2 on 2019-07-03 11:05 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 17, 319, 13130, 12, 2998, 12, 3070, 1367, 25, 2713, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
''' Program to convert any Image to Pattern Input your Image URL or just press enter to see the default image. Created by Sayok Dey Majumder. Github User handle : NeilSayok Link to profile: https://github.com/NeilSayok ''' import cv2 import imutils import urllib.request import numpy as np url = input("Enter...
[ 7061, 6, 198, 15167, 284, 10385, 597, 7412, 284, 23939, 198, 198, 20560, 534, 7412, 10289, 393, 655, 1803, 3802, 284, 766, 262, 4277, 2939, 13, 220, 220, 198, 198, 41972, 416, 13816, 482, 1024, 88, 12390, 388, 1082, 13, 198, 198, 38...
2.239468
451
# # Copyright (c) 2017, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This program is distributed in the hope it will be useful, but WITHOUT...
[ 2, 198, 2, 15069, 357, 66, 8, 2177, 11, 8180, 10501, 13, 198, 2, 198, 2, 770, 1430, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273, 13096, 340, 198, 2, 739, 262, 2846, 290, 3403, 286, 262, 22961, 3611, 5094, 13789...
2.133765
3,394
import os import time import random import ast import json import argparse import numpy as np import tensorflow as tf from style_enc_model import Style_Enc_Model from data import CHN_Style_DataLoader from model_utils import save_model, reset_graph NPZ_DIR = "../WriteLikeYouData/npz_relative_dist/CASIA_rdp4.0" assert...
[ 11748, 28686, 198, 11748, 640, 198, 11748, 4738, 198, 11748, 6468, 198, 11748, 33918, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 3918, 62, 12685, 62, 19849, 1330...
2.190021
1,463
km = float(input('digite km rodados: ')) dias = float(input('total de dias: ')) total_de_km = km * 0.15 total_de_dias = dias * 60 total_a_pagar = total_de_dias + total_de_km print(f'total a pagar e: {total_a_pagar} R$')
[ 13276, 796, 12178, 7, 15414, 10786, 12894, 578, 10571, 15299, 22484, 25, 705, 4008, 198, 67, 4448, 796, 12178, 7, 15414, 10786, 23350, 390, 2566, 292, 25, 705, 4008, 198, 198, 23350, 62, 2934, 62, 13276, 796, 10571, 1635, 657, 13, 131...
2.25
100
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause...
[ 2, 16529, 35937, 201, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 201, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 201, 198, 2, 5964, 1321, 13, 201, 198, 2, ...
2.5
266
from VarEvents import Property from VarEvents import Var from time import sleep from xml.dom import minidom class Climate(object): """ This class handles the ISY climate module. | parent: ISY class | xml: String of xml data containing the climate data :ivar Gust_Speed: Watched V...
[ 6738, 12372, 37103, 1330, 14161, 201, 198, 6738, 12372, 37103, 1330, 12372, 201, 198, 6738, 640, 1330, 3993, 201, 198, 6738, 35555, 13, 3438, 1330, 949, 312, 296, 201, 198, 201, 198, 201, 198, 4871, 13963, 7, 15252, 2599, 201, 198, 20...
2.53173
4,034
from PySide2.QtCore import Qt, Slot, QDir, QSettings from PySide2.QtWidgets import QApplication, QMainWindow, QWidget, QAction, QPushButton, QFileDialog, QInputDialog, \ QLineEdit, QHBoxLayout, QVBoxLayout, QLabel import sys if __name__ == "__main__": app = QApplication(sys.argv) widget = Application()...
[ 6738, 9485, 24819, 17, 13, 48, 83, 14055, 1330, 33734, 11, 32026, 11, 1195, 35277, 11, 1195, 26232, 198, 6738, 9485, 24819, 17, 13, 48, 83, 54, 312, 11407, 1330, 1195, 23416, 11, 1195, 13383, 27703, 11, 1195, 38300, 11, 1195, 12502, ...
2.639752
161
from __future__ import division from __future__ import absolute_import # PopulationSim # See full license in LICENSE.txt. import logging import pandas as pd import numpy as np from activitysim.core import pipeline from activitysim.core import inject from activitysim.core.config import setting from .helper import ge...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 2, 20133, 8890, 198, 2, 4091, 1336, 5964, 287, 38559, 24290, 13, 14116, 13, 198, 198, 11748, 18931, 198, 198, 11748, 19798, 292, 355, 279, ...
2.632489
1,619
import os import pickle import os.path import sys import torch import torch.utils.data as data import torchvision.transforms as transforms from PIL import Image, ImageDraw, ImageFont import cv2 import numpy as np from operator import itemgetter from skimage.draw import polygon if sys.version_info[0] == 2: import x...
[ 11748, 28686, 198, 11748, 2298, 293, 198, 11748, 28686, 13, 6978, 198, 11748, 25064, 198, 11748, 28034, 198, 11748, 28034, 13, 26791, 13, 7890, 355, 1366, 198, 11748, 28034, 10178, 13, 7645, 23914, 355, 31408, 198, 6738, 350, 4146, 1330, ...
2.218214
3,382
import cv2 import numpy as np import imutils import easyocr from matplotlib import pyplot as plt image = cv2.imread('images/license.jpg') gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) image_filter = cv2.bilateralFilter(gray, 11, 15, 15) edges = cv2.Canny(image_filter, 30, 200) contours = cv2.findContours(edges.copy...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 545, 26791, 198, 11748, 2562, 1696, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 198, 9060, 796, 269, 85, 17, 13, 320, 961, 10786, 17566, 14, ...
2.2
570
# Carlos Montes Parra # A program that displays a number from the Fibonacci sequence. The position # in the sequence is linked to the first and last letter of the user's name # and the addition of their Unicode values. # Adapted from one of Ian McLoughlin's lectures https://github.com/ianmcloughlin/python-fib/blob/m...
[ 2, 17409, 5575, 274, 2547, 430, 198, 198, 2, 317, 1430, 326, 11298, 257, 1271, 422, 262, 41566, 261, 44456, 8379, 13, 383, 2292, 220, 198, 2, 287, 262, 8379, 318, 6692, 284, 262, 717, 290, 938, 3850, 286, 262, 2836, 338, 1438, 198...
3.118033
305
import os import argparse import numpy as np import pandas as pd TASK = "xflickrco" LANGS = ['de', 'ja'] SHOTS = [200, 500, 1000, 1500, '100x5', '200x5'] if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--models', type=str) parser.add_argument('--exp_dir', type=str) ...
[ 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 51, 1921, 42, 796, 366, 87, 2704, 18994, 1073, 1, 198, 25697, 14313, 796, 37250, 2934, 3256, 705, 6592, 20520, ...
1.899809
1,048
import matplotlib.pyplot as plt import numpy as np plt.plot(list(index for index, y in enumerate(get_coords())), list(y for y in get_coords()), "y-.s") plt.show()
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 628, 198, 198, 489, 83, 13, 29487, 7, 4868, 7, 9630, 329, 6376, 11, 331, 287, 27056, 378, 7, 1136, 62, 1073, 3669, 28955, 828, 1351, 7, 8...
2.553846
65
from torchtext.data import Field from quati import constants from quati.dataset.vocabulary import Vocabulary class AffixesField(Field): """ Defines a field for affixes (prefixes and suffixes) by setting only unk_token and pad_token to their default constant value. """
[ 6738, 28034, 5239, 13, 7890, 1330, 7663, 198, 198, 6738, 627, 7246, 1330, 38491, 198, 6738, 627, 7246, 13, 19608, 292, 316, 13, 18893, 22528, 1330, 47208, 22528, 628, 198, 4871, 6708, 844, 274, 15878, 7, 15878, 2599, 198, 220, 220, 22...
3.222222
90
"""Interface to the game""" import anre import time import enum import logging import pkg_resources logging.basicConfig(level=logging.INFO) LOG = logging.getLogger(__name__) AVOID_DOUBLE_TAB_DELAY = 0.1
[ 37811, 39317, 284, 262, 983, 37811, 198, 198, 11748, 281, 260, 198, 11748, 640, 198, 11748, 33829, 198, 11748, 18931, 198, 198, 11748, 279, 10025, 62, 37540, 628, 628, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, 10...
2.55814
86
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ 2, 15069, 1584, 3012, 3457, 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, 351, 262, 13789, ...
3.554054
222
import py pydir = py.path.local(py.__file__).dirpath() pytestpath = pydir.join("bin", "py.test") EXPECTTIMEOUT=10.0
[ 11748, 12972, 198, 198, 79, 5173, 343, 796, 12972, 13, 6978, 13, 12001, 7, 9078, 13, 834, 7753, 834, 737, 15908, 6978, 3419, 198, 9078, 9288, 6978, 796, 279, 5173, 343, 13, 22179, 7203, 8800, 1600, 366, 9078, 13, 9288, 4943, 198, 49...
2.307692
52
from utils import ListNode
[ 6738, 3384, 4487, 1330, 7343, 19667, 628 ]
4
7
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-11-24 18:27 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 20, 319, 2177, 12, 1157, 12, 1731, 1248, 25, 1983, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.690909
55
# This is a sample Python script. # Press Shift+F10 to execute it or replace it with your code. # Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings. from graphviz import Digraph # Press the green button in the gutter to run the script. if __name__ == '__main__': main...
[ 2, 770, 318, 257, 6291, 11361, 4226, 13, 198, 198, 2, 4332, 15576, 10, 37, 940, 284, 12260, 340, 393, 6330, 340, 351, 534, 2438, 13, 198, 2, 4332, 11198, 15576, 284, 2989, 8347, 329, 6097, 11, 3696, 11, 2891, 9168, 11, 4028, 11, ...
3.385965
114
import json import socketserver import threading import time from http.server import BaseHTTPRequestHandler, HTTPServer from io import BytesIO from pathlib import Path import sys from socketserver import ThreadingMixIn from time import sleep import depthai as dai import numpy as np import cv2 from PIL import Image impo...
[ 11748, 33918, 198, 11748, 37037, 18497, 198, 11748, 4704, 278, 198, 11748, 640, 198, 6738, 2638, 13, 15388, 1330, 7308, 40717, 18453, 25060, 11, 38288, 18497, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 6738, 3108, 8019, 1330, 10644, 1...
2.203396
2,591
import string import pdb from collections import namedtuple import math ADD, SUB, MUL, DIV, CHAR = 'ADD','SUB','MUL','DIV','CHAR' NUM, EOF, OPAR, CPAR, POW = 'NUM','EOF','OPAR','CPAR','POW' WHITESPACE = string.whitespace Token = namedtuple('Token',['token_type', 'token_value']) if __name__ == "__main__": main(...
[ 11748, 4731, 198, 11748, 279, 9945, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 10688, 198, 198, 29266, 11, 28932, 11, 337, 6239, 11, 360, 3824, 11, 28521, 796, 705, 29266, 41707, 50, 10526, 41707, 44, 6239, 41707, 33569, 41707...
2.576
125
# -*- coding: utf-8 -*- """ @author: Victor Kohler @since: date 17/12/2016 @version: 0.1 """ import httplib import helpers import cookies class Response(object): """Used to set and return data back to the server. The Response object can be instantiated in one of two ways: 1. It is created manually in the...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 9800, 25, 12622, 24754, 1754, 198, 31, 20777, 25, 3128, 1596, 14, 1065, 14, 5304, 198, 31, 9641, 25, 657, 13, 16, 198, 37811, 198, 198, 11748, 1841, ...
2.439863
1,164
# Copyright 2021 Sony Corporation. # Copyright 2021 Sony Group Corporation. # # 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 requi...
[ 2, 15069, 33448, 10184, 10501, 13, 198, 2, 15069, 33448, 10184, 4912, 10501, 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, ...
3.455197
279
# Generated by Django 2.0.4 on 2018-04-25 14:50 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 19, 319, 2864, 12, 3023, 12, 1495, 1478, 25, 1120, 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.818182
44
#!/usr/bin/env python # from .app_macros import * #relative import - did not work properly from app_macros import *
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 220, 220, 220, 198, 2, 422, 764, 1324, 62, 20285, 4951, 1330, 1635, 220, 1303, 43762, 1330, 532, 750, 407, 670, 6105, 198, 6738, 598, 62, 20285, 4951, 1330, 1635, 628, 198 ]
3.05
40
"""Clean Code in Python - Chapter 3: General Traits of Good Code > Error Handling - Exceptions """ import logging import time from base import Connector, Event logger = logging.getLogger(__name__) def connect_with_retry( connector: Connector, retry_n_times: int, retry_backoff: int = 5 ): """Tries to establ...
[ 37811, 32657, 6127, 287, 11361, 532, 7006, 513, 25, 3611, 4759, 896, 286, 4599, 6127, 198, 198, 29, 13047, 49500, 532, 1475, 11755, 198, 37811, 198, 11748, 18931, 198, 11748, 640, 198, 198, 6738, 2779, 1330, 8113, 273, 11, 8558, 198, ...
2.657407
540
from flask import Blueprint, render_template, Response from application.helpers import requires_auth from core.tag.models import Tag tag_pages = Blueprint('tag', __name__ , template_folder='templates', static_folder='static') @tag_pages.route("/list") @requires_auth
[ 6738, 42903, 1330, 39932, 11, 8543, 62, 28243, 11, 18261, 198, 198, 6738, 3586, 13, 16794, 364, 1330, 4433, 62, 18439, 198, 6738, 4755, 13, 12985, 13, 27530, 1330, 17467, 198, 198, 12985, 62, 31126, 796, 39932, 10786, 12985, 3256, 11593...
3.532468
77
# -*- coding: UTF-8 -*- import os import tqdm import pickle import argparse import numpy as np from scipy.io import loadmat parser = argparse.ArgumentParser(description='widerface evaluate') parser.add_argument('-p', '--pred', default="./widerface_evaluate/widerface_txt/") parser.add_argument('-g', '--gt', default='....
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 11748, 256, 80, 36020, 198, 11748, 2298, 293, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 952, 1330, 3440, ...
2.022821
2,191
import os import subprocess import shutil OBJDUMP = "objdump" DLL_NAME_PREFIX = 'DLL Name:' paths = filter(lambda line: not "windows" in line.lower(), os.environ['PATH'].split(os.pathsep)) searchfiles = [f for f in os.listdir('.') if is_interesting_local_file(f)] while len(searchfiles): localfile =...
[ 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 4423, 346, 198, 198, 9864, 37882, 20476, 796, 366, 26801, 39455, 1, 198, 35, 3069, 62, 20608, 62, 47, 31688, 10426, 796, 705, 35, 3069, 6530, 32105, 198, 198, 6978, 82, 796, 8106, 7, ...
2.403162
253
import sys import typing def bvh(filepath: str = "", filter_glob: str = "*.bvh", target: typing.Union[str, int] = 'ARMATURE', global_scale: float = 1.0, frame_start: int = 1, use_fps_scale: bool = False, update_scene_fps: bool = False, update_scene_duration: boo...
[ 11748, 25064, 198, 11748, 19720, 628, 198, 4299, 275, 85, 71, 7, 7753, 6978, 25, 965, 796, 366, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 8106, 62, 4743, 672, 25, 965, 796, 366, 24620, 65, 85, 71, 1600, 198, 220, 220, 220, 2...
2.685185
864
left = 1 right = 22 p = Solution() print(p.selfDividingNumbers(left,right))
[ 9464, 796, 352, 198, 3506, 796, 2534, 198, 79, 796, 28186, 3419, 198, 4798, 7, 79, 13, 944, 35, 1699, 278, 49601, 7, 9464, 11, 3506, 4008 ]
2.777778
27
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from . import models from allauth.socialaccount.providers.facebook.views import FacebookOAuth2Adapter from rest_auth.registration.views import SocialLoginView
[ 6738, 1334, 62, 30604, 13, 33571, 1330, 3486, 3824, 769, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 764, 1330, 4981, 198, 6738, 477, 18439, 13, 14557, 23317, 13, 15234, 4157, ...
4.227273
66
from django.test import TestCase from rdmsapp.models import Contact class ContactTests(TestCase): """Contact model tests."""
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 374, 67, 907, 1324, 13, 27530, 1330, 14039, 198, 198, 4871, 14039, 51, 3558, 7, 14402, 20448, 2599, 198, 220, 220, 220, 37227, 17829, 2746, 5254, 526, 15931, 198 ]
3.275
40