text
stringlengths
0
1.05M
meta
dict
__all__ = [ 'deps', ] import collections import logging import urllib.parse from pathlib import Path from tempfile import TemporaryDirectory from garage import apps from garage import scripts LOG = logging.getLogger(__name__) # TODO: Use typing.NamedTuple and the new annotation syntax when all # systems are u...
{ "repo_name": "clchiou/garage", "path": "py/ops/ops/onboard/deps.py", "copies": "1", "size": "4137", "license": "mit", "hash": 212621806671744420, "line_mean": 29.197080292, "line_max": 151, "alpha_frac": 0.645636935, "autogenerated": false, "ratio": 3.6225919439579686, "config_test": false, ...
__all__ = [ 'DictBlocker', 'ForeverBlocker', 'TaskCompletionBlocker', 'TimeoutBlocker', ] import heapq from g1.bases.assertions import ASSERT from . import tasks class BlockerBase: """Abstract blocker interface. This tracks which-task-is-blocked-by-what relationship. """ def __boo...
{ "repo_name": "clchiou/garage", "path": "py/g1/asyncs/kernels/g1/asyncs/kernels/blockers.py", "copies": "1", "size": "4676", "license": "mit", "hash": -7659171392564091000, "line_mean": 23.8723404255, "line_max": 71, "alpha_frac": 0.5660821215, "autogenerated": false, "ratio": 3.9863597612958226,...
__all__ = ['ndimage_to_list', 'list_to_ndimage'] import numpy as np # import itk as itk from ..core import ants_image as iio from ..core import ants_image_io as iio2 from .. import utils def list_to_ndimage( image, image_list ): """ Merge list of multiple scalar ANTsImage types of dimension into o...
{ "repo_name": "ANTsX/ANTsPy", "path": "ants/utils/ndimage_to_list.py", "copies": "1", "size": "3400", "license": "apache-2.0", "hash": -5701864576605256000, "line_mean": 29.0884955752, "line_max": 72, "alpha_frac": 0.6132352941, "autogenerated": false, "ratio": 3.549060542797495, "config_test":...
__all__ = [ "dispatcher", ] import asyncore import inotify class dispatcher(asyncore.file_dispatcher): """ Subclasses can monitor inotify watch events by overriding the handle_watch(event) method. """ def __init__(self, flags=0, bufsize=65536, map=None): """ Initialize an inotify event ...
{ "repo_name": "tsavola/pyinotify-basic", "path": "inotify/async.py", "copies": "1", "size": "1352", "license": "mit", "hash": 8034155994563019000, "line_mean": 27.1666666667, "line_max": 70, "alpha_frac": 0.6013313609, "autogenerated": false, "ratio": 3.907514450867052, "config_test": false, ...
__all__ = [ "dmap_data_types", "dmap_names", "dmap_reverse_data_types", "dmap_code_types"] dmap_code_types = { "abal": ("daap.browsealbumlisting", 12), "abar": ("daap.browseartistlisting", 12), "abcp": ("daap.browsecomposerlisting", 12), "abgn": ("daap.browsegenrelisting", 12), "abpl": ("da...
{ "repo_name": "basilfx/flask-daapserver", "path": "daapserver/daap_data.py", "copies": "2", "size": "6648", "license": "mit", "hash": 4593596000581459500, "line_mean": 37.4277456647, "line_max": 63, "alpha_frac": 0.573856799, "autogenerated": false, "ratio": 2.6132075471698113, "config_test": f...
__all__ = [ 'downsample_tile', 'fill_micropolygon_mesh', 'fill_bounds_buffer', 'generate_numpy_begin', 'generate_numpy_span', 'Rectangle', 'print_coordinates', 'print_vertices', ] import os import ctypes import functools import sys from pathlib import Path memoize = functools.lru_cach...
{ "repo_name": "bracket/rasterizer", "path": "handsome/capi.py", "copies": "2", "size": "2421", "license": "bsd-2-clause", "hash": -5743713711062450000, "line_mean": 21.6261682243, "line_max": 77, "alpha_frac": 0.6055349029, "autogenerated": false, "ratio": 3.386013986013986, "config_test": fals...
__all__ = [ 'DowntimeApi', 'MonitorApi', 'MonitorType', ] from dogapi.constants import MonitorType from dogapi.exceptions import ApiError class MonitorApi(object): def monitor(self, mtype, query, name=None, message=None, options=None): """ Create a new monitor of type *mtype* with the...
{ "repo_name": "DataDog/dogapi", "path": "src/dogapi/http/monitors.py", "copies": "1", "size": "8087", "license": "bsd-3-clause", "hash": -7777666767508158000, "line_mean": 33.8577586207, "line_max": 108, "alpha_frac": 0.5717818721, "autogenerated": false, "ratio": 4.123916369199388, "config_tes...
__all__ = [ 'Dropbox', 'DropboxTeam', 'create_session', ] # This should always be 0.0.0 in master. Only update this after tagging # before release. __version__ = '0.0.0' import contextlib import json import logging import random import time import requests import six from datetime import datetime, timed...
{ "repo_name": "dropbox/dropbox-sdk-python", "path": "dropbox/dropbox.py", "copies": "1", "size": "31005", "license": "mit", "hash": -1470882700649511700, "line_mean": 40.2300531915, "line_max": 100, "alpha_frac": 0.5724238026, "autogenerated": false, "ratio": 4.492827126503405, "config_test": f...
__all__ = [ 'Dropbox', 'DropboxTeam', 'create_session', ] # This should always be 0.0.0 in master. Only update this after tagging # before release. __version__ = '9.4.0' import contextlib import json import logging import random import time import requests import six from . import files, stone_serialize...
{ "repo_name": "micahg/script.module.dropbox", "path": "lib/dropbox/dropbox.py", "copies": "1", "size": "25197", "license": "mit", "hash": 2849959819126757000, "line_mean": 40.3743842365, "line_max": 94, "alpha_frac": 0.5664563242, "autogenerated": false, "ratio": 4.532649757150566, "config_test...
__all__ = [ 'Dropbox', ] # TODO(kelkabany): We need to auto populate this as done in the v1 SDK. __version__ = '3.23' import json import logging import os import random import six import time import requests from . import babel_serializers from .base import DropboxBase from .exceptions import ( ApiError, ...
{ "repo_name": "leonardoo/dropbox-sdk-python", "path": "dropbox/dropbox.py", "copies": "1", "size": "14359", "license": "mit", "hash": -2829151590393703400, "line_mean": 39.4478873239, "line_max": 87, "alpha_frac": 0.5508043736, "autogenerated": false, "ratio": 4.505491057420772, "config_test": ...
__all__ = [ 'Dropbox', ] # TODO(kelkabany): We need to auto populate this as done in the v1 SDK. __version__ = '3.27' import contextlib import json import logging import os import random import six import time import requests from . import babel_serializers from .base import DropboxBase from .exceptions import ...
{ "repo_name": "smarx/dropbox-sdk-python", "path": "dropbox/dropbox.py", "copies": "1", "size": "14406", "license": "mit", "hash": 7043735093690148000, "line_mean": 39.5802816901, "line_max": 87, "alpha_frac": 0.5511592392, "autogenerated": false, "ratio": 4.510331872260489, "config_test": false...
__all__ = [ 'Dropbox', ] # TODO(kelkabany): We need to auto populate this as done in the v1 SDK. __version__ = '3.33' import contextlib import json import logging import os import random import six import time import requests from . import babel_serializers from .base import DropboxBase from .exceptions import ...
{ "repo_name": "ewjoachim/dropbox-sdk-python", "path": "dropbox/dropbox.py", "copies": "1", "size": "15353", "license": "mit", "hash": 5948928332503049000, "line_mean": 39.8324468085, "line_max": 80, "alpha_frac": 0.5509672377, "autogenerated": false, "ratio": 4.498388514503369, "config_test": f...
__all__ = [ 'Dropbox', ] # TODO(kelkabany): We need to auto populate this as done in the v1 SDK. __version__ = '4.0' import contextlib import json import logging import os import random import six import time import requests from . import babel_serializers from .base import DropboxBase from .exceptions import (...
{ "repo_name": "mafrosis/dropbox-python-sdk", "path": "dropbox/dropbox.py", "copies": "1", "size": "15311", "license": "mit", "hash": -1393481337625033000, "line_mean": 39.9385026738, "line_max": 80, "alpha_frac": 0.5511070472, "autogenerated": false, "ratio": 4.5072122460995, "config_test": fal...
__all__ = [ 'Dropbox', ] # TODO(kelkabany): We need to auto populate this as done in the v1 SDK. __version__ = '<insert-version-number-here>' import json import logging import os import pkg_resources import random import six import ssl import time import requests from requests.adapters import HTTPAdapter from re...
{ "repo_name": "CoolCloud/dropbox-sdk-python", "path": "dropbox/dropbox.py", "copies": "1", "size": "15325", "license": "mit", "hash": -9203606141165584000, "line_mean": 40.307277628, "line_max": 87, "alpha_frac": 0.553278956, "autogenerated": false, "ratio": 4.527326440177252, "config_test": fa...
__all__ = [ 'dump', 'generate_release_metadata', 'get_output_dir_path', 'get_output_label', ] import dataclasses import json import typing import foreman from g1 import scripts from g1.bases.assertions import ASSERT @dataclasses.dataclass(frozen=True) class ReleaseMetadata: @dataclasses.datacl...
{ "repo_name": "clchiou/garage", "path": "shipyard2/shipyard2/rules/releases.py", "copies": "1", "size": "2209", "license": "mit", "hash": 6663348857964692000, "line_mean": 22.5, "line_max": 70, "alpha_frac": 0.5885015844, "autogenerated": false, "ratio": 3.6633499170812605, "config_test": false...
__all__ = [ 'DynamicListBuilder', 'DynamicListReader', 'DynamicStructBuilder', 'DynamicStructReader', ] import enum import functools import operator from g1.bases import classes from g1.bases import collections from g1.bases.assertions import ASSERT from . import _capnp # pylint: disable=c-extension-...
{ "repo_name": "clchiou/garage", "path": "py/g1/third-party/capnp/capnp/dynamics.py", "copies": "1", "size": "12144", "license": "mit", "hash": 8128664539617976000, "line_mean": 29.4360902256, "line_max": 79, "alpha_frac": 0.6164361001, "autogenerated": false, "ratio": 3.721728470732455, "config...
__all__ = [ 'DynamicObject', 'DynamicListAdapter', 'register_converter', 'register_enum', 'register_serializer', ] import collections import collections.abc import enum import warnings from . import bases from .schemas import Type from .dynamics import DynamicEnum from .dynamics import DynamicList...
{ "repo_name": "clchiou/garage", "path": "py/capnp/capnp/objects.py", "copies": "1", "size": "12005", "license": "mit", "hash": -3669758189165029000, "line_mean": 27.0490654206, "line_max": 77, "alpha_frac": 0.594002499, "autogenerated": false, "ratio": 4.181469871125044, "config_test": false, ...
__all__=( 'Ean13BarcodeWidget','isEanString', 'Ean8BarcodeWidget', 'UPCA', 'Ean5BarcodeWidget', 'ISBNBarcodeWidget', ) from reportlab.graphics.shapes import Group, String, Rect from reportlab.lib import colors from reportlab.pdfbase.pdfmetrics import stringWidth from reportlab.lib.validators imp...
{ "repo_name": "sandeepkoduri/GAE-html-to-pdf", "path": "libs/reportlab/graphics/barcode/eanbc.py", "copies": "4", "size": "18911", "license": "mit", "hash": 2372243573872961500, "line_mean": 31.9459930314, "line_max": 137, "alpha_frac": 0.5107080535, "autogenerated": false, "ratio": 3.29345175896...
# All needed as part of functions from math import * from decimal import * from random import shuffle from os import path from inspect import signature, getdoc from re import compile, split import csv import ScrapingFunctions as SF from hmc_urllib import getHTML from RankingSettings import * # Imports the dictio...
{ "repo_name": "avnestico/smash_glicko2_ratings", "path": "RankingFunctions.py", "copies": "1", "size": "52613", "license": "mit", "hash": -383307278361958300, "line_mean": 46.5705244123, "line_max": 186, "alpha_frac": 0.6247125235, "autogenerated": false, "ratio": 3.379343567345366, "config_tes...
__all__ = ["need_migrate", "run"] from peewee import Model, IntegerField, DateTimeField import logging import os from glob import glob import re from datetime import datetime import importlib import sys logger = logging.getLogger("peewee-simple-migrate") class MigrationError(Exception): pass def generate_mode...
{ "repo_name": "anjianshi/peewee-simple-migrate", "path": "peewee_simple_migrate.py", "copies": "1", "size": "3488", "license": "mit", "hash": 4810804351007812000, "line_mean": 31.2962962963, "line_max": 105, "alpha_frac": 0.6416284404, "autogenerated": false, "ratio": 4.074766355140187, "config...
__all__ = [ 'ElementMatcher', 'TagElementMatcher', 'NoAttributesTagElementMatcher', 'AttributeSubstringTagElementMatcher', ] class ElementMatcher(object): """Abstract base class for element matchers""" def doesMatch(self, element): raise NotImplementedError class TagElementMatcher(El...
{ "repo_name": "taleinat/searchtml", "path": "searchtml/matchers.py", "copies": "1", "size": "2182", "license": "mit", "hash": -2630215420643187700, "line_mean": 40.9615384615, "line_max": 145, "alpha_frac": 0.6796516957, "autogenerated": false, "ratio": 4.245136186770428, "config_test": false, ...
__all__ = ( 'Engine', 'SimpleEngine', 'RandomEngine', ) import abc import random class Engine(metaclass=abc.ABCMeta): def __init__(self, net): self._net = net self._net.add_engine(self) self._timestep = 0 @property def net(self): return self._net @propert...
{ "repo_name": "simone-campagna/petra", "path": "petra/engine.py", "copies": "1", "size": "2140", "license": "apache-2.0", "hash": 2211631142849900000, "line_mean": 23.3181818182, "line_max": 71, "alpha_frac": 0.6060747664, "autogenerated": false, "ratio": 4.467640918580376, "config_test": false...
__all__ = [ 'EventApi', ] class EventApi(object): def stream(self, start, end, priority=None, sources=None, tags=None): """ Get the events that occurred between the *start* and *end* POSIX timestamps, optional filtered by *priority* ("low" or "normal"), *sources* and *tags*. ...
{ "repo_name": "DataDog/dogapi", "path": "src/dogapi/http/events.py", "copies": "1", "size": "7284", "license": "bsd-3-clause", "hash": -23574762257918000, "line_mean": 30.3965517241, "line_max": 199, "alpha_frac": 0.5399505766, "autogenerated": false, "ratio": 4.124575311438279, "config_test": ...
__all__ = [ 'Event', 'TaskCancelled', 'TaskSet', 'TaskStack', 'cancelling', 'select', 'spawn', # HACK! 'close_socket_and_wakeup_task', ] from collections import OrderedDict, deque from functools import partial import inspect import curio import curio.io import curio.traps from gar...
{ "repo_name": "clchiou/garage", "path": "py/garage/garage/asyncs/__init__.py", "copies": "1", "size": "10210", "license": "mit", "hash": 6846861701288514000, "line_mean": 30.4153846154, "line_max": 78, "alpha_frac": 0.6024485798, "autogenerated": false, "ratio": 3.9573643410852712, "config_test...
__all__ = ['newaxis', 'ndarray', 'flatiter', 'nditer', 'nested_iters', 'ufunc', 'arange', 'array', 'zeros', 'count_nonzero', 'empty', 'broadcast', 'dtype', 'fromstring', 'fromfile', 'frombuffer', 'int_asbuffer', 'where', 'argwhere', 'concatenate', 'fastCopyAndTranspose', 'lex...
{ "repo_name": "google/syzygy", "path": "third_party/numpy/files/numpy/core/numeric.py", "copies": "16", "size": "69492", "license": "apache-2.0", "hash": 8322618619895369000, "line_mean": 27.6564948454, "line_max": 86, "alpha_frac": 0.569763426, "autogenerated": false, "ratio": 3.5589470449656866...
__all__ = ['newaxis', 'ndarray', 'flatiter', 'nditer', 'nested_iters', 'ufunc', 'arange', 'array', 'zeros', 'count_nonzero', 'empty', 'broadcast', 'dtype', 'fromstring', 'fromfile', 'frombuffer', 'int_asbuffer', 'where', 'argwhere', 'copyto', 'concatenate', 'fastCopyAndTransp...
{ "repo_name": "astrofrog/numpy", "path": "numpy/core/numeric.py", "copies": "1", "size": "74658", "license": "bsd-3-clause", "hash": 8354031225215597000, "line_mean": 27.8366164542, "line_max": 86, "alpha_frac": 0.5702001125, "autogenerated": false, "ratio": 3.5612478534630796, "config_test": f...
__all__ = ['newaxis', 'ndarray', 'flatiter', 'newiter', 'nested_iters', 'ufunc', 'arange', 'array', 'zeros', 'count_nonzero', 'empty', 'broadcast', 'dtype', 'fromstring', 'fromfile', 'frombuffer', 'int_asbuffer', 'where', 'argwhere', 'concatenate', 'fastCopyAndTranspose', 'le...
{ "repo_name": "qsnake/numpy", "path": "numpy/core/numeric.py", "copies": "1", "size": "69498", "license": "bsd-3-clause", "hash": 4259968191210057700, "line_mean": 27.6589690722, "line_max": 86, "alpha_frac": 0.5698149587, "autogenerated": false, "ratio": 3.561260568793236, "config_test": false...
__all__ = ['newaxis', 'ndarray', 'flatiter', 'ufunc', 'arange', 'array', 'zeros', 'empty', 'broadcast', 'dtype', 'fromstring', 'fromfile', 'frombuffer','newbuffer', 'getbuffer', 'int_asbuffer', 'where', 'argwhere', 'concatenate', 'fastCopyAndTranspose', 'lexsort', ...
{ "repo_name": "santisiri/popego", "path": "envs/ALPHA-POPEGO/lib/python2.5/site-packages/numpy-1.0.4-py2.5-linux-x86_64.egg/numpy/core/numeric.py", "copies": "1", "size": "31685", "license": "bsd-3-clause", "hash": -8775957641127733000, "line_mean": 29.1474785918, "line_max": 83, "alpha_frac": 0.6004...
__all__ = ['newaxis', 'ndarray', 'flatiter', 'ufunc', 'arange', 'array', 'zeros', 'empty', 'broadcast', 'dtype', 'fromstring', 'fromfile', 'frombuffer', 'int_asbuffer', 'where', 'argwhere', 'concatenate', 'fastCopyAndTranspose', 'lexsort', 'set_numeric_ops', 'can_c...
{ "repo_name": "numpy/datetime", "path": "numpy/core/numeric.py", "copies": "3", "size": "69094", "license": "bsd-3-clause", "hash": -2095222668556706600, "line_mean": 27.492371134, "line_max": 83, "alpha_frac": 0.5677193389, "autogenerated": false, "ratio": 3.5580616921571657, "config_test": fa...
__all__ = [ 'ExecutionError', 'NoDispatch', 'InvalidLibraryDefinition', 'CustomSyntaxError' ] # TODO: BlazeException base class ? # for Numba class ExecutionError(Exception): """ Raised when we are unable to execute a certain lazy or immediate expression. """ # for the RTS class NoDis...
{ "repo_name": "seibert/blaze-core", "path": "blaze/error.py", "copies": "1", "size": "1982", "license": "bsd-2-clause", "hash": -5559749482462343000, "line_mean": 25.4266666667, "line_max": 73, "alpha_frac": 0.515136226, "autogenerated": false, "ratio": 4.0531697341513295, "config_test": false,...
__all__ = [ 'Executor', 'PriorityExecutor', ] import itertools import logging import os import sys from g1.bases.assertions import ASSERT from . import actors from . import futures from . import queues LOG = logging.getLogger(__name__) # Python 3.4 implements PEP 442 for safe ``__del__``. ASSERT.greater_or...
{ "repo_name": "clchiou/garage", "path": "py/g1/threads/g1/threads/executors.py", "copies": "1", "size": "5170", "license": "mit", "hash": 5319031289867785000, "line_mean": 29.4117647059, "line_max": 76, "alpha_frac": 0.5839458414, "autogenerated": false, "ratio": 4.064465408805032, "config_test...
__all__ = [ 'ExtractTopography', ] __displayname__ = 'Subsetting' import numpy as np import vtk from vtk.numpy_interface import dataset_adapter as dsa import pyvista as pv from .. import interface from ..base import FilterBase # NOTE: internal import - from scipy.spatial import cKDTree ######################...
{ "repo_name": "banesullivan/ParaViewGeophysics", "path": "PVGeo/grids/subset.py", "copies": "1", "size": "8722", "license": "bsd-3-clause", "hash": 2149973573444274700, "line_mean": 35.6470588235, "line_max": 95, "alpha_frac": 0.6224489796, "autogenerated": false, "ratio": 4.456821665815023, "c...
__all__ = [ 'Field', 'ForeignKey', 'NumberField', 'StringField', 'ObjectField', 'DateTimeField', 'ListField' ] from datetime import datetime import re class Field(object): def __init__(self, required=False, default=None, alias='', extra=lambda x:True): self.alias = alias ...
{ "repo_name": "veeloox/ramen", "path": "ramen/db/fields.py", "copies": "1", "size": "5422", "license": "apache-2.0", "hash": 174904560249059070, "line_mean": 26.3838383838, "line_max": 104, "alpha_frac": 0.5440796754, "autogenerated": false, "ratio": 3.9432727272727273, "config_test": false, ...
__all__ = [ 'FileAdapter', 'FutureAdapter', 'SocketAdapter', ] import io import logging import os import socket import ssl import weakref from g1.asyncs.kernels import contexts from g1.asyncs.kernels import traps from g1.bases import classes from g1.bases.assertions import ASSERT LOG = logging.getLogger(...
{ "repo_name": "clchiou/garage", "path": "py/g1/asyncs/bases/g1/asyncs/bases/adapters.py", "copies": "1", "size": "10995", "license": "mit", "hash": -3130149115248846000, "line_mean": 31.5295857988, "line_max": 78, "alpha_frac": 0.5601637108, "autogenerated": false, "ratio": 4.215874233128834, "...
__all__ = [ 'FileLock', ] import errno import fcntl import os from garage import scripts from garage.assertions import ASSERT class FileLock: """Non-reentrant, non-blocking file lock.""" def __init__(self, lock_file_path): self._lock_file_path = lock_file_path self._fd = None @prop...
{ "repo_name": "clchiou/garage", "path": "py/ops/ops/onboard/locks.py", "copies": "1", "size": "1374", "license": "mit", "hash": 2040652302834215200, "line_mean": 22.2881355932, "line_max": 64, "alpha_frac": 0.5356622999, "autogenerated": false, "ratio": 3.7747252747252746, "config_test": false,...
__all__ = [ 'FileLock', 'NotLocked', 'acquire_exclusive', 'acquiring_exclusive', 'acquiring_shared', 'try_acquire_exclusive', 'is_locked_by_other', ] import contextlib import errno import fcntl import os from g1.bases.assertions import ASSERT class NotLocked(Exception): """Raise when...
{ "repo_name": "clchiou/garage", "path": "py/g1/files/g1/files/locks.py", "copies": "1", "size": "2592", "license": "mit", "hash": 3342851420796753400, "line_mean": 21.5391304348, "line_max": 70, "alpha_frac": 0.5733024691, "autogenerated": false, "ratio": 3.79502196193265, "config_test": false,...
__all__ = [ 'fill_micropolygon_mesh' ] from pathlib import Path from .util import memoize import numpy as np import pyopencl as cl def fill_micropolygon_mesh(mesh, tile): from .capi import generate_numpy_begin, print_vertices rows, columns = mesh.buffer.shape buffer_ptr = generate_numpy_begin(mesh...
{ "repo_name": "bracket/rasterizer", "path": "handsome/opencl_api.py", "copies": "2", "size": "1605", "license": "bsd-2-clause", "hash": 5815364551026163000, "line_mean": 22.2608695652, "line_max": 102, "alpha_frac": 0.6635514019, "autogenerated": false, "ratio": 3.2035928143712575, "config_test...
__all__ = [ 'Fixture', ] import contextlib import subprocess class Fixture: @staticmethod def check_shared(path): return _check_file_lock(path, '--shared') @staticmethod def check_exclusive(path): return _check_file_lock(path, '--exclusive') @staticmethod def using_shar...
{ "repo_name": "clchiou/garage", "path": "py/g1/devtools/tests/g1/devtools/tests/filelocks.py", "copies": "1", "size": "1568", "license": "mit", "hash": 4484708845268428000, "line_mean": 25.1333333333, "line_max": 75, "alpha_frac": 0.5841836735, "autogenerated": false, "ratio": 4.083333333333333, ...
__all__ = [ 'Future', ] import logging from g1.asyncs.kernels import errors from g1.bases import classes from g1.bases.assertions import ASSERT from . import locks LOG = logging.getLogger(__name__) class Future: """Asynchronous future. Generally a task object is sufficient for most use cases, but in ...
{ "repo_name": "clchiou/garage", "path": "py/g1/asyncs/bases/g1/asyncs/bases/futures.py", "copies": "1", "size": "3685", "license": "mit", "hash": 6637384362495461000, "line_mean": 26.9166666667, "line_max": 75, "alpha_frac": 0.5869742198, "autogenerated": false, "ratio": 4.294871794871795, "con...
__all__ = [ "gatekeeper_check", "block_default_avatars", "block_bots", "minimum_creation_time", "block_all", "username_regex", ] import datetime import functools import inspect import re from typing import Any, Dict, List import discord from .core import Bounce, Report CheckOptions = Dict[st...
{ "repo_name": "sliceofcode/dogbot", "path": "dog/ext/gatekeeper/checks.py", "copies": "2", "size": "2854", "license": "mit", "hash": -5400498281103370000, "line_mean": 27.2574257426, "line_max": 87, "alpha_frac": 0.6450595655, "autogenerated": false, "ratio": 4.008426966292135, "config_test": f...
__all__ = [ 'gen_toy', 'gen_toyn', ] import numpy as np from ._libstat import compute_cdf, invert_cdf, _vector_apply from util import describe import numpy.random as npr from matplotlib import pyplot as plt from probfit_warnings import SmallIntegralWarning from warnings import warn def gen_toyn(f, nsample, n...
{ "repo_name": "piti118/probfit", "path": "probfit/toy.py", "copies": "2", "size": "2294", "license": "mit", "hash": -2412388403238895000, "line_mean": 27.3209876543, "line_max": 91, "alpha_frac": 0.6006974717, "autogenerated": false, "ratio": 3.217391304347826, "config_test": false, "has_no_k...
__all__ = ( 'get_aql_info', 'dump_aql_info', ) # ============================================================================== class AqlInfo (object): __slots__ = ( 'name', 'module', 'description', 'version', 'date', 'url', 'license', ) # ...
{ "repo_name": "aqualid/aqualid", "path": "aql/main/aql_info.py", "copies": "1", "size": "1418", "license": "mit", "hash": 1148452979871103000, "line_mean": 23.0338983051, "line_max": 80, "alpha_frac": 0.3519040903, "autogenerated": false, "ratio": 4.574193548387097, "config_test": false, "has...
__all__ = [ 'get_axes_dimension', 'assert_axes_dimension', 'width_to_dict', 'size_to_sizedict', ] def get_axes_dimension(axes): """Returns the number of dimensions of a matplotlib axes object. Parameters ---------- axes : object The matplotlib axes object. ...
{ "repo_name": "compas-dev/compas", "path": "src/compas_plotters/core/utilities.py", "copies": "1", "size": "1996", "license": "mit", "hash": -7101602305227351000, "line_mean": 27.1126760563, "line_max": 89, "alpha_frac": 0.5751503006, "autogenerated": false, "ratio": 4.008032128514056, "config_...
__all__ = [ 'get_builder_name', 'get_builder_image_path', 'get_image_path', 'parse_images_parameter', # Helper commands. 'chown', 'rsync', ] import getpass import foreman from g1 import scripts from g1.bases.assertions import ASSERT from g1.containers import models import shipyard2 def...
{ "repo_name": "clchiou/garage", "path": "shipyard2/shipyard2/rules/images/utils.py", "copies": "1", "size": "1675", "license": "mit", "hash": 8814770200839174000, "line_mean": 22.5915492958, "line_max": 77, "alpha_frac": 0.5964179104, "autogenerated": false, "ratio": 3.4968684759916493, "config...
__all__ = ( 'get_client', ) import pytz from zeep import Client from zeep.cache import SqliteCache from zeep.transports import Transport TZ_AR = pytz.timezone(pytz.country_timezones['ar'][0]) transport = Transport(cache=SqliteCache(timeout=86400)) wsdls = { ('wsaa', False): 'https://wsaa.afip.gov.ar/ws/serv...
{ "repo_name": "hobarrera/django-afip", "path": "django_afip/clients.py", "copies": "1", "size": "1576", "license": "isc", "hash": -8560964083990989000, "line_mean": 32.5319148936, "line_max": 79, "alpha_frac": 0.6922588832, "autogenerated": false, "ratio": 3.502222222222222, "config_test": fals...
__all__ = [ 'get_declared_error_types', 'select', ] import dataclasses from g1.bases import typings from g1.bases.assertions import ASSERT NoneType = type(None) def get_declared_error_types(response_type): # When there is only one error type, reqrep.make_annotations # would not generate Optional[T]...
{ "repo_name": "clchiou/garage", "path": "py/g1/messaging/g1/messaging/reqrep/utils.py", "copies": "1", "size": "1245", "license": "mit", "hash": 4343416570348286000, "line_mean": 27.9534883721, "line_max": 77, "alpha_frac": 0.6040160643, "autogenerated": false, "ratio": 3.7841945288753798, "con...
__all__ = [ "get_login", "do_login", "do_logout", "get_apps", "do_deploy", "wb_error_handler", "generic_error_handler", ] from flask import render_template, request, redirect, url_for from flask import session, g, current_app from flask import Response from wb_api import WBAPIUnauthorizedEr...
{ "repo_name": "hmrc/wristband-frontend", "path": "fe/views.py", "copies": "1", "size": "2682", "license": "apache-2.0", "hash": 8010592971688773000, "line_mean": 26.0909090909, "line_max": 151, "alpha_frac": 0.6159582401, "autogenerated": false, "ratio": 3.585561497326203, "config_test": false,...
__all__ = [ 'get_many', 'pop_many', ] def get_many(d, required=[], optional=[], one_of=[]): """ Returns a predictable number of elements out of ``d`` in a list for auto-expanding. Keys in ``required`` will raise KeyError if not found in ``d``. Keys in ``optional`` will return None if not found in...
{ "repo_name": "shazow/unstdlib.py", "path": "unstdlib/standard/dict_.py", "copies": "1", "size": "1061", "license": "mit", "hash": -6806512681523439000, "line_mean": 26.2051282051, "line_max": 119, "alpha_frac": 0.5956644675, "autogenerated": false, "ratio": 3.5366666666666666, "config_test": f...
__all__ = [ 'get_outputs', 'get_rule', ] import itertools import logging import iga.context import iga.precond from iga.build_rules import build_rules from iga.core import WriteOnceDict from iga.error import IgaError from iga.path import Glob from iga.rule import Rule from iga.rule import RuleFunc LOG = log...
{ "repo_name": "clchiou/iga", "path": "iga/package.py", "copies": "1", "size": "2334", "license": "mit", "hash": 1617790225011279400, "line_mean": 25.2247191011, "line_max": 76, "alpha_frac": 0.6452442159, "autogenerated": false, "ratio": 3.447562776957164, "config_test": false, "has_no_keywor...
__all__ = [ 'get_selected_array_name', 'get_selected_array_field', 'copy_arrays_to_point_data', 'get_numpy_array', 'get_vtk_array', 'add_array', 'get_selected_array', 'search_for_array', 'get_all_array_names', ] import vtk from vtk.numpy_interface import dataset_adapter as dsa from...
{ "repo_name": "banesullivan/ParaViewGeophysics", "path": "PVGeo/_helpers/arrays.py", "copies": "1", "size": "9733", "license": "bsd-3-clause", "hash": -560654485157803600, "line_mean": 27.9672619048, "line_max": 107, "alpha_frac": 0.5873831296, "autogenerated": false, "ratio": 3.8153665229321834,...
__all__ = [ 'GSLibReader', 'GSLibPointSetReader', 'WriteTableToGSLib', ] __displayname__ = 'GSLib/GeoEAS File I/O' import numpy as np from .. import _helpers, interface from ..base import WriterBase from ..readers import DelimitedPointsReaderBase, DelimitedTextReader class _GSLibReaderMethods(object): ...
{ "repo_name": "banesullivan/ParaViewGeophysics", "path": "PVGeo/gslib/gslib.py", "copies": "1", "size": "4031", "license": "bsd-3-clause", "hash": 5172806691811774000, "line_mean": 34.052173913, "line_max": 85, "alpha_frac": 0.647233937, "autogenerated": false, "ratio": 3.82085308056872, "confi...
__all__ = [ 'Headers', ] from kitsu.http.errors import * _canonicalHeaderParts = { 'www' : 'WWW' } def _canonicalHeaderName(name): def canonical(part): return _canonicalHeaderParts.get(part) or part.capitalize() return '-'.join(canonical(part.lower()) for part in name.split('-')) nil = object() ...
{ "repo_name": "snaury/kitsu.http", "path": "kitsu/http/headers.py", "copies": "1", "size": "10038", "license": "mit", "hash": 2147044326410370800, "line_mean": 31.5909090909, "line_max": 224, "alpha_frac": 0.5152420801, "autogenerated": false, "ratio": 4.249788314987299, "config_test": false, ...
__all__ = [ 'HelpOperation', 'ListOperation', 'UploadOperation', 'DownloadOperation', 'InfoOperation', 'DeleteOperation', ] from .help import HelpOperation from .list import ListOperation from .upload import UploadOperation from .download import DownloadOperation from .info import InfoOperation ...
{ "repo_name": "mogproject/artifact-cli", "path": "src/artifactcli/operation/__init__.py", "copies": "1", "size": "1169", "license": "apache-2.0", "hash": 1268293663820252400, "line_mean": 32.4, "line_max": 87, "alpha_frac": 0.6852010265, "autogenerated": false, "ratio": 4.32962962962963, "confi...
__all__ = [ 'Hider', 'check_dependencies', 'choicify', 'get_key_by_value', ] # Django imports from django.conf import settings from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext from ..exceptions import DependencyError class Hider(object): de...
{ "repo_name": "sololuz/cibb-web", "path": "app/core/utils/misc.py", "copies": "1", "size": "2666", "license": "bsd-3-clause", "hash": 8136893400721822000, "line_mean": 27.6666666667, "line_max": 120, "alpha_frac": 0.6762940735, "autogenerated": false, "ratio": 4.473154362416107, "config_test": ...
__all__ = [ 'HTML5TreeBuilder', ] from bs4.builder import ( PERMISSIVE, HTML, HTML_5, HTMLTreeBuilder, ) import html5lib from html5lib.constants import DataLossWarning import warnings from bs4.element import ( Comment, Doctype, NavigableString, Tag, ) class HTML5TreeBui...
{ "repo_name": "colinmcd94/kickdata", "path": "lib/build/lib/bs4/builder/_html5lib.py", "copies": "2", "size": "8266", "license": "apache-2.0", "hash": -1977692613134710500, "line_mean": 34.4763948498, "line_max": 103, "alpha_frac": 0.6283571256, "autogenerated": false, "ratio": 4.215196328403875,...
__all__ = [ 'HTML5TreeBuilder', ] from pdb import set_trace import warnings from bs4.builder import ( PERMISSIVE, HTML, HTML_5, HTMLTreeBuilder, ) from bs4.element import ( NamespacedAttribute, whitespace_re, ) import html5lib from html5lib.constants import namespaces from bs4.eleme...
{ "repo_name": "crlang/sublime-text---front-end-config", "path": "Data/Packages/CodeFormatter/codeformatter/lib/htmlbeautifier/bs4/builder/_html5lib.py", "copies": "15", "size": "12768", "license": "mit", "hash": 4580490675864824300, "line_mean": 37.4578313253, "line_max": 159, "alpha_frac": 0.6184993...
__all__ = [ 'HTML5TreeBuilder', ] import warnings from argeweb.libs.bs4.builder import ( PERMISSIVE, HTML, HTML_5, HTMLTreeBuilder, ) from argeweb.libs.bs4.element import NamespacedAttribute import html5lib from html5lib.constants import namespaces from argeweb.libs.bs4.element import ( ...
{ "repo_name": "argeweb/start", "path": "argeweb/libs/bs4/builder/_html5lib.py", "copies": "1", "size": "10686", "license": "mit", "hash": -3433142352263756300, "line_mean": 36.4947368421, "line_max": 159, "alpha_frac": 0.6231517874, "autogenerated": false, "ratio": 4.2270569620253164, "config_t...
__all__ = [ 'HTML5TreeBuilder', ] import warnings from bs4.builder import ( PERMISSIVE, HTML, HTML_5, HTMLTreeBuilder, ) from bs4.element import NamespacedAttribute import html5lib from html5lib.constants import namespaces from bs4.element import ( Comment, Doctype, NavigableStr...
{ "repo_name": "kevlar1818/mipster", "path": "bs4/builder/_html5lib.py", "copies": "2", "size": "7747", "license": "mit", "hash": -6580460414988890000, "line_mean": 33.8963963964, "line_max": 159, "alpha_frac": 0.6223054085, "autogenerated": false, "ratio": 4.156115879828326, "config_test": fals...
__all__ = [ 'HTML5TreeBuilder', ] import warnings from ..builder import ( PERMISSIVE, HTML, HTML_5, HTMLTreeBuilder, ) from ..element import NamespacedAttribute import html5lib from html5lib.constants import namespaces from ..element import ( Comment, Doctype, NavigableString, ...
{ "repo_name": "yongshengwang/builthue", "path": "desktop/core/ext-py/requests-2.0.0/requests/packages/bs4/builder/_html5lib.py", "copies": "2", "size": "10641", "license": "apache-2.0", "hash": -7843711672085510000, "line_mean": 36.3368421053, "line_max": 159, "alpha_frac": 0.6218400526, "autogener...
__all__ = ( 'HTTPException', 'HTTPError', 'HTTPRedirection', 'HTTPSuccessful', 'HTTPOk', 'HTTPCreated', 'HTTPAccepted', 'HTTPNonAuthoritativeInformation', 'HTTPNoContent', 'HTTPResetContent', 'HTTPPartialContent', 'HTTPMultipleChoices', 'HTTPMovedPermanently', 'HT...
{ "repo_name": "lfblogs/aio2py", "path": "aio2py/required/aiohttp/web_exceptions.py", "copies": "1", "size": "6801", "license": "apache-2.0", "hash": -6364510862985858000, "line_mean": 22.6145833333, "line_max": 78, "alpha_frac": 0.6497573886, "autogenerated": false, "ratio": 4.334608030592734, ...
__all__ = [ 'HttpMetricApi', ] import logging import time from dogapi.constants import MetricType logger = logging.getLogger('dd.dogapi') class HttpMetricApi(object): default_metric_type = MetricType.Gauge def metric(self, name, points, host=None, device=None, tags=None, metric_type=MetricType.Gaug...
{ "repo_name": "DataDog/dogapi", "path": "src/dogapi/http/metrics.py", "copies": "1", "size": "1967", "license": "bsd-3-clause", "hash": -5863638129847229000, "line_mean": 31.7833333333, "line_max": 108, "alpha_frac": 0.5871886121, "autogenerated": false, "ratio": 3.8568627450980393, "config_tes...
__all__ = [ 'HttpServer', ] import logging import socket import ssl import sys from . import wsgi logging.getLogger(__name__).addHandler(logging.NullHandler()) VERSION = '%s/v1' % __name__ class HttpServer: def __init__(self, server_socket, application): address = server_socket.getsockname() ...
{ "repo_name": "clchiou/garage", "path": "py/g1/http/http1_servers/g1/http/http1_servers/__init__.py", "copies": "1", "size": "1331", "license": "mit", "hash": 7398082729926357000, "line_mean": 29.25, "line_max": 73, "alpha_frac": 0.5785123967, "autogenerated": false, "ratio": 3.846820809248555, ...
__all__ = [ 'HttpServer', ] import logging import socket import ssl from . import nghttp2 as ng from . import wsgi logging.getLogger(__name__).addHandler(logging.NullHandler()) VERSION = '%s/nghttp2=%s' % ( __name__, # pylint: disable=no-member ng.F.nghttp2_version(0).contents.version_str.decode('ut...
{ "repo_name": "clchiou/garage", "path": "py/g1/http/http2_servers/g1/http/http2_servers/__init__.py", "copies": "1", "size": "1306", "license": "mit", "hash": 8414811375016516000, "line_mean": 27.3913043478, "line_max": 65, "alpha_frac": 0.5842266462, "autogenerated": false, "ratio": 3.7207977207...
__all__ = [ 'IdentityDecoder', 'ChunkedDecoder', 'DeflateDecoder', 'CompoundDecoder', ] from kitsu.http.errors import * from kitsu.http.headers import * from kitsu.http.parsers import * class IdentityDecoder(Parser): def __init__(self, length=None): self.length = length def parseR...
{ "repo_name": "snaury/kitsu.http", "path": "kitsu/http/decoders.py", "copies": "1", "size": "6611", "license": "mit", "hash": 8266131573049647000, "line_mean": 31.5665024631, "line_max": 97, "alpha_frac": 0.5315383452, "autogenerated": false, "ratio": 4.7664023071377075, "config_test": false, ...
__all__ = [ 'ImproperlyConfigured', 'ElasticsearchException', 'SerializationError', 'TransportError', 'NotFoundError', 'ConflictError', 'RequestError', 'ConnectionError', 'SSLError', 'ConnectionTimeout', 'AuthenticationException', 'AuthorizationException' ] class ImproperlyConfigured(Exception): """ ...
{ "repo_name": "brunobell/elasticsearch-py", "path": "elasticsearch/exceptions.py", "copies": "2", "size": "3180", "license": "apache-2.0", "hash": 1805538558205631200, "line_mean": 28.1743119266, "line_max": 90, "alpha_frac": 0.6528301887, "autogenerated": false, "ratio": 4.472573839662447, "co...
__all__ = [ 'InfrastructureApi', ] class InfrastructureApi(object): def search(self, query): """ Search datadog for hosts and metrics by name. The search *query* can be faceted to limit the results (e.g. ``"host:foo"``, or ``"metric:bar"``) or un-faceted, which will return resul...
{ "repo_name": "edx/dogapi", "path": "src/dogapi/http/infrastructure.py", "copies": "3", "size": "3488", "license": "bsd-3-clause", "hash": -5995819106621650000, "line_mean": 30.7090909091, "line_max": 79, "alpha_frac": 0.501146789, "autogenerated": false, "ratio": 3.795429815016322, "config_tes...
__all__ = [ 'init', 'make_ops_dirs', ] import dataclasses import logging import tempfile from pathlib import Path import g1.files from g1 import scripts from g1.bases.assertions import ASSERT from g1.containers import models as ctr_models from g1.containers import scripts as ctr_scripts from g1.texts import j...
{ "repo_name": "clchiou/garage", "path": "py/g1/operations/cores/g1/operations/cores/pod_ops_dirs.py", "copies": "1", "size": "12030", "license": "mit", "hash": 2669948795422736400, "line_mean": 36.7115987461, "line_max": 79, "alpha_frac": 0.5804655029, "autogenerated": false, "ratio": 3.900778210...
__all__ = [ 'init', 'make_ops_dirs', ] import logging from pathlib import Path import g1.files from g1.bases.assertions import ASSERT from g1.containers import scripts as ctr_scripts from g1.texts import jsons from . import bases from . import models from . import repos LOG = logging.getLogger(__name__) c...
{ "repo_name": "clchiou/garage", "path": "py/g1/operations/cores/g1/operations/cores/xar_ops_dirs.py", "copies": "1", "size": "4367", "license": "mit", "hash": 2612508407486844000, "line_mean": 30.4172661871, "line_max": 76, "alpha_frac": 0.6185024044, "autogenerated": false, "ratio": 3.4852354349...
__all__ = ["NinjaTurtleAPI", "RenderTurtleAPI", "FullNinjaTurtleAPI"] # Animation methods # ----------------- # These methods are handled by the NinjaTurtle class and engine, and are to do # with movement and position. NinjaTurtleAPI = [ 'forward', 'fd', 'backward', 'bk', 'back', 'right', 'rt', 'left'...
{ "repo_name": "AllTheWayDown/ninjaturtle", "path": "ninjaturtle/turtleapi.py", "copies": "1", "size": "1610", "license": "mit", "hash": 4411687448325537000, "line_mean": 18.1666666667, "line_max": 78, "alpha_frac": 0.5559006211, "autogenerated": false, "ratio": 3.23943661971831, "config_test": ...
__all__ = [ 'InprocServer', ] import functools from g1.bases import collections as g1_collections from . import utils class InprocServer: """Expose an asynchronous application in the same process. This does not even use the inproc transport, omitting serialization and memory-copying of messages en...
{ "repo_name": "clchiou/garage", "path": "py/g1/messaging/g1/messaging/reqrep/inprocs.py", "copies": "1", "size": "1519", "license": "mit", "hash": -2782363643091988000, "line_mean": 26.125, "line_max": 99, "alpha_frac": 0.5865701119, "autogenerated": false, "ratio": 4.402898550724638, "config_t...
__all__ = [ 'json_schema', 'Encoder', 'TypeEncoder', 'ModifierEncoder', 'AnyEncoder', 'StringEncoder', 'NumberEncoder', 'BooleanEncoder', 'DateTimeEncoder', 'DateEncoder', 'TimeEncoder', 'ListEncoder', 'TupleEncoder', 'ObjectEncoder', 'DictEncoder', 'One...
{ "repo_name": "maximkulkin/lollipop-jsonschema", "path": "lollipop_jsonschema/jsonschema.py", "copies": "1", "size": "15427", "license": "mit", "hash": 7456907588266180000, "line_mean": 28.6103646833, "line_max": 91, "alpha_frac": 0.5793738251, "autogenerated": false, "ratio": 4.20698118352877, ...
__all__ = [ 'json_schema', ] import lollipop.types as lt import lollipop.validators as lv from lollipop.utils import identity from collections import OrderedDict from .compat import iteritems def find_validators(schema, validator_type): return [validator for validator in schema.validators ...
{ "repo_name": "akscram/lollipop-jsonschema", "path": "lollipop_jsonschema/jsonschema.py", "copies": "1", "size": "5661", "license": "mit", "hash": -3347910036887420400, "line_mean": 36.74, "line_max": 83, "alpha_frac": 0.5945945946, "autogenerated": false, "ratio": 4.052254831782391, "config_te...
__all__ = [ 'Kernel', ] import collections import contextlib import functools import inspect import logging import os import sys import threading import time import weakref from g1.bases import classes from g1.bases import timers from g1.bases.assertions import ASSERT from . import blockers from . import errors ...
{ "repo_name": "clchiou/garage", "path": "py/g1/asyncs/kernels/g1/asyncs/kernels/kernels.py", "copies": "1", "size": "16166", "license": "mit", "hash": -373675982654959300, "line_mean": 30.4513618677, "line_max": 77, "alpha_frac": 0.5575281455, "autogenerated": false, "ratio": 3.9778543307086616, ...
__all__ = [ 'KernelTimeout', 'call_with_kernel', 'get_kernel', 'run', 'with_kernel', ] import contextlib import contextvars import functools import logging from . import contexts from . import kernels # Re-export errors. from .errors import KernelTimeout logging.getLogger(__name__).addHandler(lo...
{ "repo_name": "clchiou/garage", "path": "py/g1/asyncs/kernels/g1/asyncs/kernels/__init__.py", "copies": "1", "size": "1425", "license": "mit", "hash": 5452541043687833000, "line_mean": 22.75, "line_max": 70, "alpha_frac": 0.6421052632, "autogenerated": false, "ratio": 3.969359331476323, "config...
__all__ = [ 'keys', ] from pathlib import Path import logging from garage import apps from garage import scripts LOG = logging.getLogger(__name__) HOST_KEYS = [ ('dsa', 1024), ('ecdsa', 521), ('ed25519', None), ('rsa', 4096), ] # ECDSA requires less bits than RSA at same level of strength an...
{ "repo_name": "clchiou/garage", "path": "py/ops/ops/mob/keys.py", "copies": "1", "size": "2338", "license": "mit", "hash": -8494565224786233000, "line_mean": 22.6161616162, "line_max": 74, "alpha_frac": 0.5988023952, "autogenerated": false, "ratio": 3.344778254649499, "config_test": false, "h...
__all__ = [ "kill_qthread", "QT", "QTKiller" ] import time from PySide import QtCore def kill_qthread(t): if not t: return t.terminate() # t.wait() class QT(QtCore.QThread): def __init__(self, func, *args, **kwargs): QtCore.QThread.__init__(self) self._func...
{ "repo_name": "alexlib/Qt-Python-Binding-Examples", "path": "qcommons/qthreadutils.py", "copies": "2", "size": "1085", "license": "bsd-3-clause", "hash": -5534238519669601000, "line_mean": 20.2745098039, "line_max": 62, "alpha_frac": 0.5391705069, "autogenerated": false, "ratio": 3.52272727272727...
__all__ = ['NList'] __doc__ = """This module provides class :class:`NList`, a multidimensional list. Indexes and shapes used with NList must be tuples. Example: :: l = nlist.NList(shape=(2, 3)) l[1, 2] = 42 NList's shape can be an empty tuple meaning a zero-dimensional list that has one element with index ()...
{ "repo_name": "swarmer/nlist", "path": "nlist.py", "copies": "1", "size": "8031", "license": "mit", "hash": -68766892974057380, "line_mean": 29.3056603774, "line_max": 84, "alpha_frac": 0.5697920558, "autogenerated": false, "ratio": 4.013493253373313, "config_test": false, "has_no_keywords": ...
__all__ = [ 'localvms', ] from pathlib import Path import logging import re import time from garage import apps from garage import scripts LOG = logging.getLogger(__name__) @apps.with_help('create virtual machine') @apps.with_argument( '--virtual-machines-dir', required=True, type=Path, help='provide ...
{ "repo_name": "clchiou/garage", "path": "py/ops/ops/mob/localvms.py", "copies": "1", "size": "5386", "license": "mit", "hash": 1821008466074332700, "line_mean": 28.4316939891, "line_max": 72, "alpha_frac": 0.5997029335, "autogenerated": false, "ratio": 3.7325017325017327, "config_test": false, ...
__all__ = [ "LoginFailure", "QualysApi", ] import requests import xml.etree.ElementTree as ET class LoginFailure(Exception): pass class QualysApi(object): API_ENDPOINT = "https://qualysapi.qualys.com/api/2.0/fo" def __init__(self, username, password, endpoint="qualysapi.qualys.com"): self....
{ "repo_name": "HurricaneLabs/TA-qualys", "path": "bin/qualys/__init__.py", "copies": "1", "size": "2328", "license": "mit", "hash": -1852089004202463500, "line_mean": 31.3333333333, "line_max": 83, "alpha_frac": 0.5704467354, "autogenerated": false, "ratio": 3.6661417322834646, "config_test": f...
__all__ = [ 'LXMLTreeBuilderForXML', 'LXMLTreeBuilder', ] from io import BytesIO from io import StringIO import collections from lxml import etree from bs4.element import Comment, Doctype, NamespacedAttribute from bs4.builder import ( FAST, HTML, HTMLTreeBuilder, PERMISSIVE, ParserRejec...
{ "repo_name": "bzhou26/Delaware-Crawler", "path": "bs4/builder/_lxml.py", "copies": "16", "size": "8663", "license": "mit", "hash": 2495170085199681500, "line_mean": 36.1802575107, "line_max": 85, "alpha_frac": 0.6108738312, "autogenerated": false, "ratio": 4.21352140077821, "config_test": fals...
__all__ = [ 'LXMLTreeBuilderForXML', 'LXMLTreeBuilder', ] from io import BytesIO from StringIO import StringIO import collections from lxml import etree from argeweb.libs.bs4.element import Comment, Doctype, NamespacedAttribute from argeweb.libs.bs4.builder import ( FAST, HTML, HTMLTreeBuilder,...
{ "repo_name": "argeweb/start", "path": "argeweb/libs/bs4/builder/_lxml.py", "copies": "1", "size": "8700", "license": "mit", "hash": 4322037359213379000, "line_mean": 36.339055794, "line_max": 82, "alpha_frac": 0.6125287356, "autogenerated": false, "ratio": 4.206963249516441, "config_test": fal...
__all__ = [ 'LXMLTreeBuilderForXML', 'LXMLTreeBuilder', ] from io import BytesIO from StringIO import StringIO import collections from lxml import etree from bs4.element import Comment, Doctype, NamespacedAttribute from bs4.builder import ( FAST, HTML, HTMLTreeBuilder, PERMISSIVE, TreeB...
{ "repo_name": "pedropramos/gerador-horarios", "path": "bs4/builder/_lxml.py", "copies": "14", "size": "7078", "license": "mit", "hash": -6736482342923745000, "line_mean": 34.567839196, "line_max": 82, "alpha_frac": 0.606103419, "autogenerated": false, "ratio": 4.112725159790819, "config_test": ...
__all__ = [ 'LXMLTreeBuilderForXML', 'LXMLTreeBuilder', ] from io import BytesIO from StringIO import StringIO import collections from lxml import etree from ..element import Comment, Doctype, NamespacedAttribute from ..builder import ( FAST, HTML, HTMLTreeBuilder, PERMISSIVE, ParserRej...
{ "repo_name": "yongshengwang/builthue", "path": "desktop/core/ext-py/requests-2.0.0/requests/packages/bs4/builder/_lxml.py", "copies": "2", "size": "8655", "license": "apache-2.0", "hash": -2680636047397935600, "line_mean": 36.1459227468, "line_max": 82, "alpha_frac": 0.6108607741, "autogenerated":...
__all__ = [ 'LXMLTreeBuilderForXML', 'LXMLTreeBuilder', ] from StringIO import StringIO import collections from lxml import etree from alp.request.bs4.element import Comment, Doctype, NamespacedAttribute from alp.request.bs4.builder import ( FAST, HTML, HTMLTreeBuilder, PERMISSIVE, Tree...
{ "repo_name": "bfontaine/alfred-pp", "path": "alp/request/bs4/builder/_lxml.py", "copies": "2", "size": "7199", "license": "mit", "hash": -4165564893127535000, "line_mean": 35.175879397, "line_max": 82, "alpha_frac": 0.5961939158, "autogenerated": false, "ratio": 4.156466512702078, "config_test...
__all__ = [ 'LXMLTreeBuilderForXML', 'LXMLTreeBuilder', ] import collections from lxml import etree from bs4.element import Comment, Doctype, NamespacedAttribute from bs4.builder import ( FAST, HTML, HTMLTreeBuilder, PERMISSIVE, TreeBuilder, XML) from bs4.dammit import UnicodeDammit...
{ "repo_name": "Zord13appdesa/python-for-android", "path": "python3-alpha/extra_modules/bs4/builder/_lxml.py", "copies": "46", "size": "5603", "license": "apache-2.0", "hash": -2784184247092684000, "line_mean": 34.2389937107, "line_max": 85, "alpha_frac": 0.5995002677, "autogenerated": false, "rat...
__all__ = [ 'LXMLTreeBuilderForXML', 'LXMLTreeBuilder', ] import collections from lxml import etree from bs4.element import Comment, Doctype from bs4.builder import ( FAST, HTML, HTMLTreeBuilder, PERMISSIVE, TreeBuilder, XML) from bs4.dammit import UnicodeDammit LXML = 'lxml' clas...
{ "repo_name": "colinmcd94/kickdata", "path": "lib/bs4/oldbs4/builder/_lxml.py", "copies": "2", "size": "3169", "license": "apache-2.0", "hash": -4018932810000257000, "line_mean": 28.3425925926, "line_max": 77, "alpha_frac": 0.6330072578, "autogenerated": false, "ratio": 3.907521578298397, "conf...
__all__ = [ 'main', ] from g1 import scripts from g1.bases import argparses from g1.bases import oses from g1.bases.assertions import ASSERT from . import alerts from . import bases from . import envs from . import pod_ops_dirs from . import tokens from . import xar_ops_dirs @argparses.begin_parser( 'init',...
{ "repo_name": "clchiou/garage", "path": "py/g1/operations/cores/g1/operations/cores/repo_cmds.py", "copies": "1", "size": "1944", "license": "mit", "hash": -3153221123087140000, "line_mean": 23, "line_max": 70, "alpha_frac": 0.6862139918, "autogenerated": false, "ratio": 3.261744966442953, "con...
__all__ = [ 'main', ] import argparse import itertools import logging import sys from collections import OrderedDict import iga.context import iga.fargparse import iga.ninja import iga.package from iga.context import load_workspace from iga.label import Label from iga.ninja import NinjaRule def parse_argv(argv)...
{ "repo_name": "clchiou/iga", "path": "iga/main.py", "copies": "1", "size": "2554", "license": "mit", "hash": -7399041527092131000, "line_mean": 24.54, "line_max": 70, "alpha_frac": 0.6280344558, "autogenerated": false, "ratio": 3.659025787965616, "config_test": false, "has_no_keywords": false...
__all__ = [ 'main', ] import logging import sys from g1.bases import argparses from g1.bases import oses from g1.bases.assertions import ASSERT from g1.containers import models as ctr_models from g1.texts import columns from g1.texts.columns import argparses as columns_argparses from . import models from . impor...
{ "repo_name": "clchiou/garage", "path": "py/g1/operations/cores/g1/operations/cores/token_cmds.py", "copies": "1", "size": "7952", "license": "mit", "hash": 2057044704145725700, "line_mean": 27.6043165468, "line_max": 78, "alpha_frac": 0.6506539235, "autogenerated": false, "ratio": 3.345393352965...
__all__ = [ 'main', ] import sys from g1.bases import argparses from g1.bases import oses from g1.bases.assertions import ASSERT from g1.texts import columns from g1.texts.columns import argparses as columns_argparses from . import envs from . import models _ENV_LIST_COLUMNS = frozenset(( 'name', 'value...
{ "repo_name": "clchiou/garage", "path": "py/g1/operations/cores/g1/operations/cores/env_cmds.py", "copies": "1", "size": "2411", "license": "mit", "hash": -167832319378670980, "line_mean": 22.8712871287, "line_max": 79, "alpha_frac": 0.6831190377, "autogenerated": false, "ratio": 3.13116883116883...
__all__ = [ 'main', 'run', ] from startup import startup import g1.scripts.parts from g1.apps import bases as apps_bases from g1.bases import argparses from g1.bases.assertions import ASSERT from . import alert_cmds from . import env_cmds from . import pod_cmds from . import repo_cmds from . import token_cmd...
{ "repo_name": "clchiou/garage", "path": "py/g1/operations/cores/g1/operations/cores/apps.py", "copies": "1", "size": "1440", "license": "mit", "hash": 3158717034613512700, "line_mean": 26.1698113208, "line_max": 79, "alpha_frac": 0.6930555556, "autogenerated": false, "ratio": 3.123644251626898, ...
__all__ = [ 'main', 'run', ] import json import sys from pathlib import Path from startup import startup import g1.scripts.parts from g1.apps import bases from g1.bases import argparses from g1.bases.assertions import ASSERT from . import build from . import cleanup from . import repos @argparses.begin_pa...
{ "repo_name": "clchiou/garage", "path": "shipyard2/shipyard2/releases/apps.py", "copies": "1", "size": "3210", "license": "mit", "hash": -9076809681554804000, "line_mean": 25.3114754098, "line_max": 69, "alpha_frac": 0.6320872274, "autogenerated": false, "ratio": 3.3092783505154637, "config_tes...
__all__ = [ 'make_bdist_zipapp', ] import distutils.core import distutils.errors import distutils.log import stat import tempfile import zipfile from pathlib import Path def make_bdist_zipapp( *, python='/usr/bin/env python3', main_optional=False, main=None ): # pylint: disable=too-many-statements c...
{ "repo_name": "clchiou/garage", "path": "py/g1/devtools/buildtools/g1/devtools/buildtools/zipapps.py", "copies": "1", "size": "4968", "license": "mit", "hash": -7487802471318898000, "line_mean": 33.985915493, "line_max": 78, "alpha_frac": 0.501610306, "autogenerated": false, "ratio": 4.5163636363...
__all__ = [ 'make_compile_schemas', ] import subprocess import warnings from distutils import log from distutils.core import Command from pathlib import Path def make_compile_schemas(schemas, *, import_paths=()): class compile_schemas(Command): IMPORT_PATH = ':'.join(map(str, import_paths)) ...
{ "repo_name": "clchiou/garage", "path": "py/g1/devtools/buildtools/g1/devtools/buildtools/capnps.py", "copies": "1", "size": "3044", "license": "mit", "hash": 3416143251514324500, "line_mean": 29.1386138614, "line_max": 76, "alpha_frac": 0.6199080158, "autogenerated": false, "ratio": 3.7580246913...
__all__ = [ 'make_compile_schemas', ] import warnings from distutils import log from distutils.core import Command from pathlib import Path from subprocess import check_call def make_compile_schemas(schemas, *, import_paths=()): class compile_schemas(Command): IMPORT_PATH = ':'.join(map(str, import...
{ "repo_name": "clchiou/garage", "path": "py/buildtools/buildtools/capnp.py", "copies": "1", "size": "2997", "license": "mit", "hash": -8321407284662016000, "line_mean": 29.2727272727, "line_max": 76, "alpha_frac": 0.6232899566, "autogenerated": false, "ratio": 3.755639097744361, "config_test": ...
__all__ = [ 'make_json_formatter', 'make_yaml_formatter', ] import datetime import enum from collections import Mapping from collections import OrderedDict from functools import partial def make_json_formatter(): import json from .json import encode_datetime from .json import encode_mapping f...
{ "repo_name": "clchiou/garage", "path": "py/garage/garage/formatters/__init__.py", "copies": "1", "size": "1234", "license": "mit", "hash": 457118538008033860, "line_mean": 26.4222222222, "line_max": 74, "alpha_frac": 0.6936790924, "autogenerated": false, "ratio": 4.127090301003345, "config_tes...
__all__ = [ 'make_read_write_lock', ] import threading from g1.bases.assertions import ASSERT def make_read_write_lock(): rwlock = ReadWriteLock() return ( LockLike(rwlock.reader_acquire, rwlock.reader_release), LockLike(rwlock.writer_acquire, rwlock.writer_release), ) class LockLi...
{ "repo_name": "clchiou/garage", "path": "py/g1/threads/g1/threads/locks.py", "copies": "1", "size": "2624", "license": "mit", "hash": -1552650514924904400, "line_mean": 28.8181818182, "line_max": 74, "alpha_frac": 0.5910823171, "autogenerated": false, "ratio": 4.185007974481659, "config_test": ...
__all__ = [ 'make_server_socket', 'make_ssl_context', ] import socket import ssl from g1.asyncs.bases import adapters def make_server_socket( address, *, family=socket.AF_INET, backlog=128, reuse_address=False, reuse_port=False, ssl_context=None, ): sock = socket.socket(famil...
{ "repo_name": "clchiou/garage", "path": "py/g1/networks/servers/g1/networks/servers/sockets.py", "copies": "1", "size": "1395", "license": "mit", "hash": 3296465647869094000, "line_mean": 25.320754717, "line_max": 78, "alpha_frac": 0.6566308244, "autogenerated": false, "ratio": 3.549618320610687,...
__all__ = [ 'make_server_socket', 'serve', 'synchronous', ] from functools import wraps from curio import socket import curio from garage import asyncs from garage.assertions import ASSERT def make_server_socket( address, *, family=socket.AF_INET, backlog=128, reuse_addr...
{ "repo_name": "clchiou/garage", "path": "py/garage/garage/asyncs/utils.py", "copies": "1", "size": "3267", "license": "mit", "hash": -6377752611726776000, "line_mean": 30.7184466019, "line_max": 73, "alpha_frac": 0.6036118763, "autogenerated": false, "ratio": 4.114609571788413, "config_test": f...
__all__ = [ 'make_tables', ] from sqlalchemy import ( Column, Table, # Column types. BigInteger, Integer, LargeBinary, ) from g1.bases import collections as g1_collections # Type aliases. Revision = BigInteger Key = LargeBinary Value = LargeBinary Lease = BigInteger Expiration = BigIntege...
{ "repo_name": "clchiou/garage", "path": "py/g1/operations/databases/servers/g1/operations/databases/servers/schemas.py", "copies": "1", "size": "2117", "license": "mit", "hash": -6165557596501174000, "line_mean": 30.1323529412, "line_max": 73, "alpha_frac": 0.5843174303, "autogenerated": false, "...