text
stringlengths
0
1.05M
meta
dict
"""Base classes and convenience functions for writing indexers and skimmers""" import cgi from collections import namedtuple from itertools import imap from operator import itemgetter from os.path import join, islink from warnings import warn from funcy import group_by, decorator, imapcat from dxr.utils import build...
{ "repo_name": "kleintom/dxr", "path": "dxr/indexers.py", "copies": "1", "size": "22658", "license": "mit", "hash": 8998935244638800000, "line_mean": 37.9982788296, "line_max": 185, "alpha_frac": 0.6297113602, "autogenerated": false, "ratio": 4.255023474178404, "config_test": true, "has_no_key...
""" Base classes and data for building the API """ from flask_restful import abort, reqparse, Resource from .util import clean_attrs, set_attrs from dockci.server import DB from dockci.util import unique_model_conflicts AUTH_FORM_LOCATIONS = ('form', 'json') class BaseDetailResource(Resource): """ Base resourc...
{ "repo_name": "RickyCook/DockCI", "path": "dockci/api/base.py", "copies": "2", "size": "2590", "license": "isc", "hash": 5995484395927956000, "line_mean": 34.4794520548, "line_max": 76, "alpha_frac": 0.5517374517, "autogenerated": false, "ratio": 4.295190713101161, "config_test": false, "has_...
"""Base classes and definitions common to all Fields.""" import abc import enum import functools import io import os import typing import warnings from typing import Any from typing import BinaryIO from typing import Callable from typing import Generic from typing import Iterable from typing import Mapping from typing...
{ "repo_name": "dargueta/binobj", "path": "binobj/fields/base.py", "copies": "1", "size": "32967", "license": "bsd-3-clause", "hash": 244167209540602400, "line_mean": 37.5128504673, "line_max": 88, "alpha_frac": 0.6061516062, "autogenerated": false, "ratio": 4.399706392633124, "config_test": fal...
"""Base classes and functions used by all/most augmenters. This module is planned to contain :class:`imgaug.augmenters.meta.Augmenter` in the future. Added in 0.4.0. """ from __future__ import print_function, division, absolute_import import imgaug as ia class SuspiciousMultiImageShapeWarning(UserWarning): """...
{ "repo_name": "aleju/imgaug", "path": "imgaug/augmenters/base.py", "copies": "2", "size": "2535", "license": "mit", "hash": 3562365149556080600, "line_mean": 41.25, "line_max": 80, "alpha_frac": 0.617357002, "autogenerated": false, "ratio": 3.8702290076335877, "config_test": false, "has_no_ke...
"""Base classes and helpers commonly used in examples.""" import abc import importlib from xentica import core class RegularCA(core.CellularAutomaton): """ Template for the most regular CA topology. Does not implements any logic. """ class Topology: """2D Moore neighborhood, wrapped t...
{ "repo_name": "a5kin/hecate", "path": "examples/base.py", "copies": "1", "size": "1122", "license": "mit", "hash": -1275935242428960500, "line_mean": 20.5769230769, "line_max": 67, "alpha_frac": 0.6319073084, "autogenerated": false, "ratio": 3.8958333333333335, "config_test": false, "has_no_k...
'''Base classes and helpers for building zone specific tzinfo classes''' from datetime import datetime, timedelta, tzinfo from bisect import bisect_right from sets import Set import pytz __all__ = [] _timedelta_cache = {} def memorized_timedelta(seconds): '''Create only one instance of each distinct timedelta''...
{ "repo_name": "clobrano/personfinder", "path": "app/pytz/tzinfo.py", "copies": "7", "size": "12965", "license": "apache-2.0", "hash": 7094335264716363000, "line_mean": 33.2084432718, "line_max": 79, "alpha_frac": 0.6013883533, "autogenerated": false, "ratio": 4.028899937849596, "config_test": f...
'''Base classes and helpers for building zone specific tzinfo classes''' from datetime import datetime, timedelta, tzinfo from bisect import bisect_right try: set except NameError: from sets import Set as set import pytz from pytz.exceptions import AmbiguousTimeError, NonExistentTimeError __all__ = [] _time...
{ "repo_name": "jinie/sublime-wakatime", "path": "packages/wakatime/packages/pytz3/tzinfo.py", "copies": "11", "size": "19217", "license": "bsd-3-clause", "hash": 1984130548798261500, "line_mean": 33.1332149201, "line_max": 79, "alpha_frac": 0.5855752719, "autogenerated": false, "ratio": 3.9516759...
'''Base classes and helpers for building zone specific tzinfo classes gaepytz from https://pypi.python.org/pypi/gaepytz Copyright (c) 2011 Rodrigo Moraes Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the S...
{ "repo_name": "BrandTurner/ChromeWebLab", "path": "Sketchbots/sw/labqueue/pytz/tzinfo.py", "copies": "7", "size": "16447", "license": "apache-2.0", "hash": 5191484983339238000, "line_mean": 34.5995670996, "line_max": 79, "alpha_frac": 0.618349851, "autogenerated": false, "ratio": 4.02619339045287...
"""Base classes and mixins for unit tests.""" import logging from collections import OrderedDict from unittest.mock import patch from django.contrib.auth.models import AnonymousUser from django.contrib.messages.storage.fallback import FallbackStorage from django.contrib.sessions.middleware import SessionMiddleware fro...
{ "repo_name": "rtfd/readthedocs.org", "path": "readthedocs/rtd_tests/base.py", "copies": "1", "size": "4774", "license": "mit", "hash": -2113727008749626600, "line_mean": 32.6197183099, "line_max": 78, "alpha_frac": 0.6141600335, "autogenerated": false, "ratio": 4.759720837487538, "config_test"...
"""Base classes and mixins. """ class _NotSet(object): """Represents an unset value.""" def __repr__(self): # pragma: no cover return 'NotSet' #: Singleton to indicate that a keyword argument was not provided. NotSet = _NotSet() class Assertion(object): """Base class for assertions. If `...
{ "repo_name": "dgilland/verify", "path": "verify/base.py", "copies": "1", "size": "4150", "license": "mit", "hash": -5136811370368065000, "line_mean": 31.421875, "line_max": 79, "alpha_frac": 0.6130120482, "autogenerated": false, "ratio": 4.313929313929314, "config_test": false, "has_no_keywo...
"""Base classes and utilities for readers and writers. Authors: * Brian Granger """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING,...
{ "repo_name": "ArcherSys/ArcherSys", "path": "Lib/site-packages/nbformat/v2/rwbase.py", "copies": "12", "size": "5997", "license": "mit", "hash": 3403488150000693000, "line_mean": 35.3454545455, "line_max": 83, "alpha_frac": 0.5215941304, "autogenerated": false, "ratio": 4.696162881754111, "con...
"""Base classes and utilities for readers and writers.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. def _is_json_mime(mime): """Is a key a JSON mime-type that should be left alone?""" return mime == 'application/json' or \ (mime.startswith('ap...
{ "repo_name": "sserrot/champion_relationships", "path": "venv/Lib/site-packages/nbformat/v4/rwbase.py", "copies": "1", "size": "4274", "license": "mit", "hash": -6068144415304243000, "line_mean": 33.192, "line_max": 83, "alpha_frac": 0.6052877866, "autogenerated": false, "ratio": 4.05887939221272...
"""Base classes and utilities for readers and writers.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from base64 import encodestring, decodestring from ipython_genutils import py3compat from ipython_genutils.py3compat import str_to_bytes, unicode_type, string...
{ "repo_name": "nitin-cherian/LifeLongLearning", "path": "Python/PythonProgrammingLanguage/Encapsulation/encap_env/lib/python3.5/site-packages/nbformat/v3/rwbase.py", "copies": "12", "size": "6782", "license": "mit", "hash": -8133505816546255000, "line_mean": 34.6947368421, "line_max": 83, "alpha_frac...
"""Base classes and utilities for readers and writers.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from ipython_genutils.py3compat import string_types, cast_unicode_py2 def rejoin_lines(nb): """rejoin multiline text into strings For reversing effe...
{ "repo_name": "fzheng/codejam", "path": "lib/python2.7/site-packages/nbformat/v4/rwbase.py", "copies": "4", "size": "3645", "license": "mit", "hash": -3380337354125147000, "line_mean": 34.7352941176, "line_max": 83, "alpha_frac": 0.5920438957, "autogenerated": false, "ratio": 4.1657142857142855, ...
"""Base classes and utilities for readers and writers.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from IPython.utils.py3compat import string_types, cast_unicode_py2 def rejoin_lines(nb): """rejoin multiline text into strings For reversing effects ...
{ "repo_name": "wusung/ipython-notebook-tabs", "path": "kyper/nbformat/v0/rwbase.py", "copies": "1", "size": "3701", "license": "apache-2.0", "hash": 6906401369413212000, "line_mean": 36.7653061224, "line_max": 93, "alpha_frac": 0.5820048636, "autogenerated": false, "ratio": 4.273672055427252, "...
"""Base classes and utilities for wiring.""" from typing import Dict, List, Tuple, TypeVar, Callable wire_colors = { 12: "YE", 5: "RD", 48: "BU", 0: "BK", -2: "WH", 1: "WH", -1: "PK" } PinSpecs = List[Tuple[str, int]] class Board: """A board with connectors. This is not an element i...
{ "repo_name": "missionpinball/mpf", "path": "mpf/wire/base.py", "copies": "1", "size": "11579", "license": "mit", "hash": -3434724317540563000, "line_mean": 34.8482972136, "line_max": 115, "alpha_frac": 0.5788928232, "autogenerated": false, "ratio": 3.9872589531680442, "config_test": false, "...
"""Base classes derived from tornado.web for use in zmq.web This module should only contain minimal changes required for compatibility with the extended functionality implemented in zmq.web.proxy Authors: * Brian Granger """ #----------------------------------------------------------------------------- # Copyright...
{ "repo_name": "ellisonbg/zmqweb", "path": "zmqweb/zmqweb.py", "copies": "1", "size": "12256", "license": "bsd-3-clause", "hash": 8628778817684490000, "line_mean": 40.4054054054, "line_max": 112, "alpha_frac": 0.60345953, "autogenerated": false, "ratio": 4.370898716119829, "config_test": false, ...
"""Base classes / Design The design is that there are three components fitting together in this project: - Trials - a list of documents including at least sub-documents: ['spec'] - the specification of hyper-parameters for a job ['result'] - the result of Bandit.evaluate(). Typically includes: ['statu...
{ "repo_name": "rajegannathan/grasp-lift-eeg-cat-dog-solution-updated", "path": "python-packages/hyperopt-0.0.2/hyperopt/base.py", "copies": "1", "size": "36375", "license": "bsd-3-clause", "hash": -1478844636039565000, "line_mean": 33.1549295775, "line_max": 89, "alpha_frac": 0.5516701031, "autogen...
"""Base classes for all config file formats.""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import os from .. import exc from ..core import compat from ..core import config class ConfigurationFile(object): ...
{ "repo_name": "kevinconway/confpy", "path": "confpy/loaders/base.py", "copies": "1", "size": "2602", "license": "mit", "hash": 7040959233197714000, "line_mean": 25.5510204082, "line_max": 79, "alpha_frac": 0.5837817064, "autogenerated": false, "ratio": 4.965648854961832, "config_test": true, ...
"""Base classes for all estimators.""" # Author: Gael Varoquaux <gael.varoquaux@normalesup.org> # License: BSD 3 clause import copy import inspect import warnings import numpy as np from scipy import sparse from .externals import six class ChangedBehaviorWarning(UserWarning): pass ############################...
{ "repo_name": "Srisai85/scikit-learn", "path": "sklearn/base.py", "copies": "65", "size": "17384", "license": "bsd-3-clause", "hash": -7465808166043111000, "line_mean": 35.6751054852, "line_max": 79, "alpha_frac": 0.5378508974, "autogenerated": false, "ratio": 4.591653460116218, "config_test": ...
"""Base classes for all estimators.""" # Author: Gael Varoquaux <gael.varoquaux@normalesup.org> # License: BSD 3 clause import copy import warnings from collections import defaultdict import platform import inspect import re import numpy as np from . import __version__ from ._config import get_config from .utils im...
{ "repo_name": "anntzer/scikit-learn", "path": "sklearn/base.py", "copies": "5", "size": "30311", "license": "bsd-3-clause", "hash": -4440724965051784700, "line_mean": 34.3687281214, "line_max": 79, "alpha_frac": 0.5716076672, "autogenerated": false, "ratio": 4.406309056548917, "config_test": fa...
"""Base classes for all estimators.""" # Author: Gael Varoquaux <gael.varoquaux@normalesup.org> # License: BSD 3 clause import copy import warnings from collections import defaultdict import numpy as np from scipy import sparse from .externals import six from .utils.fixes import signature from . import __version__ ...
{ "repo_name": "vortex-ape/scikit-learn", "path": "sklearn/base.py", "copies": "5", "size": "19024", "license": "bsd-3-clause", "hash": 5809010610495928000, "line_mean": 32.6707964602, "line_max": 79, "alpha_frac": 0.5529857023, "autogenerated": false, "ratio": 4.600725513905683, "config_test": ...
"""Base classes for all estimators.""" # Author: Gael Varoquaux <gael.varoquaux@normalesup.org> # License: BSD 3 clause import copy import warnings import numpy as np from scipy import sparse from .externals import six from .utils.fixes import signature from . import __version__ ###################################...
{ "repo_name": "hlin117/scikit-learn", "path": "sklearn/base.py", "copies": "1", "size": "19726", "license": "bsd-3-clause", "hash": -1008652890085901000, "line_mean": 35.9400749064, "line_max": 79, "alpha_frac": 0.5380715807, "autogenerated": false, "ratio": 4.649069054913976, "config_test": tr...
"""Base classes for all estimators.""" # Author: Johann Faouzi <johann.faouzi@gmail.com> # License: BSD-3-Clause from sklearn.metrics import accuracy_score class UnivariateTransformerMixin: """Mixin class for all univariate transformers in pyts.""" def fit_transform(self, X, y=None, **fit_params): ...
{ "repo_name": "johannfaouzi/pyts", "path": "pyts/base.py", "copies": "1", "size": "3878", "license": "bsd-3-clause", "hash": 6068914092940504000, "line_mean": 29.296875, "line_max": 81, "alpha_frac": 0.5773594636, "autogenerated": false, "ratio": 4.215217391304348, "config_test": false, "has_...
"""Base classes for all plug-ins""" import os import imp import re from vb2py.utils import modulePath from vb2py.config import VB2PYConfig Config = VB2PYConfig() from vb2py import logger log = logger.getLogger("PlugInLoader") def loadAllPlugins(): """Load all plug-ins from the plug-in directory and return a l...
{ "repo_name": "mvz/vb2py", "path": "vb2py/extensions.py", "copies": "1", "size": "6526", "license": "bsd-3-clause", "hash": 6610354410083561000, "line_mean": 28.0044444444, "line_max": 79, "alpha_frac": 0.6009806926, "autogenerated": false, "ratio": 4.296247531270573, "config_test": false, "h...
"""Base classes for applications.""" from typing import Optional, Type import attr from axis.api import APIItem, APIItems, Body class ApplicationAPIItem(APIItem): """Base class for application profiles.""" @property def camera(self) -> int: """Camera ID.""" return self.raw["camera"] ...
{ "repo_name": "Kane610/axis", "path": "axis/applications/api.py", "copies": "1", "size": "2171", "license": "mit", "hash": -8662597484211419000, "line_mean": 24.8452380952, "line_max": 70, "alpha_frac": 0.561953017, "autogenerated": false, "ratio": 4.333333333333333, "config_test": false, "ha...
# Base classes for ASN.1 types import sys from pyasn1.type import constraint, tagmap from pyasn1 import error class Asn1Item: pass class Asn1ItemBase(Asn1Item): # Set of tags for this ASN.1 type tagSet = () # A list of constraint.Constraint instances for checking values subtypeSpec = constraint.C...
{ "repo_name": "ychen820/microblog", "path": "y/google-cloud-sdk/lib/pyasn1/type/base.py", "copies": "35", "size": "9405", "license": "bsd-3-clause", "hash": 7375759460435425000, "line_mean": 37.5450819672, "line_max": 84, "alpha_frac": 0.6311536417, "autogenerated": false, "ratio": 4.134065934065...
# Base classes for ASN.1 types import sys from pyasn1.type import constraint, tagmap, tag from pyasn1 import error class Asn1Item: pass class Asn1ItemBase(Asn1Item): # Set of tags for this ASN.1 type tagSet = tag.TagSet() # A list of constraint.Constraint instances for checking values subtypeSpec...
{ "repo_name": "nischalshrestha/sampleAppEngine", "path": "lib/pyasn1/type/base.py", "copies": "86", "size": "10706", "license": "mit", "hash": 3163821935755635000, "line_mean": 37.5107913669, "line_max": 91, "alpha_frac": 0.6235755651, "autogenerated": false, "ratio": 4.083142639206712, "config...
# Base classes for ASN.1 types import sys from pyasn1.type import constraint, tagmap from pyasn1 import error class Asn1Item: pass class Asn1ItemBase(Asn1Item): # Set of tags for this ASN.1 type tagSet = () # A list of constraint.Constraint instances for checking values subtypeSpec = constraint.Co...
{ "repo_name": "itielshwartz/BackendApi", "path": "lib/pyasn1/type/base.py", "copies": "1", "size": "9738", "license": "apache-2.0", "hash": -969507264592098700, "line_mean": 30.4129032258, "line_max": 84, "alpha_frac": 0.6133703019, "autogenerated": false, "ratio": 4.190189328743545, "config_te...
# Base classes for ASN.1 types try: from sys import version_info except ImportError: version_info = (0, 0) # a really early version from operator import getslice, setslice, delslice from string import join from types import SliceType from pyasn1.type import constraint from pyasn1 import error class Asn1Item:...
{ "repo_name": "aerissecure/rdpy", "path": "pyasn1/v1/type/base.py", "copies": "5", "size": "8058", "license": "mit", "hash": -4576364944265790000, "line_mean": 35.9633027523, "line_max": 79, "alpha_frac": 0.6341523951, "autogenerated": false, "ratio": 4.1881496881496885, "config_test": false, ...
"""Base classes for boards and peripherals.""" import re class BoardMeta(type): """ Metaclass for `Board` subclasses. This is here to automatically add the instances to a registry. """ BOARDS = [] def __new__(cls, name, bases, attrs): """Instantiate subclass.""" cls = type....
{ "repo_name": "sourcebots/robotd", "path": "robotd/devices_base.py", "copies": "1", "size": "2273", "license": "mit", "hash": 7746356434203955000, "line_mean": 22.6770833333, "line_max": 75, "alpha_frac": 0.5560932688, "autogenerated": false, "ratio": 4.217068645640074, "config_test": false, ...
""" Base classes for boxes of Gst pipeline elements. """ import re from gi.repository import GObject, Gst as gst # noqa class ElementProxy(object): def __init__(self, elem): self.__dict__['_elem'] = elem def __getattr__(self, name): return getattr(self._elem.props, name) def __setattr_...
{ "repo_name": "hodgestar/laghuis", "path": "laghuis/box.py", "copies": "1", "size": "2111", "license": "mit", "hash": -5066246874603046000, "line_mean": 28.3194444444, "line_max": 70, "alpha_frac": 0.5518711511, "autogenerated": false, "ratio": 3.577966101694915, "config_test": false, "has_no...
"""Base classes for Builders.""" from __future__ import absolute_import from builtins import object from functools import wraps import os import logging import shutil log = logging.getLogger(__name__) def restoring_chdir(fn): # XXX:dc: This would be better off in a neutral module @wraps(fn) def decorato...
{ "repo_name": "pombredanne/readthedocs.org", "path": "readthedocs/doc_builder/base.py", "copies": "1", "size": "3819", "license": "mit", "hash": -3048102939889924000, "line_mean": 32.2086956522, "line_max": 91, "alpha_frac": 0.5886357685, "autogenerated": false, "ratio": 4.067092651757188, "con...
""" Base classes for classification """ import numpy # import matplotlib as mpl # mpl.rcParams['text.usetex']=True # mpl.rcParams['text.latex.unicode']=True import matplotlib.pyplot as plt import os import cPickle import logging import math import numpy import os import timeit import warnings # base class from pyS...
{ "repo_name": "pyspace/pyspace", "path": "pySPACE/missions/nodes/classification/base.py", "copies": "1", "size": "89563", "license": "bsd-3-clause", "hash": 6997944212162331000, "line_mean": 41.1274694262, "line_max": 154, "alpha_frac": 0.4888625883, "autogenerated": false, "ratio": 4.66619777013...
'''Base classes for CODA codecs.''' from abc import ABCMeta, abstractmethod class EncodingError(Exception): '''Base class for exceptions encountered during encoding or decoding.''' def __init__(self, msg): self.__msg = msg def msg(self): return self.__msg class Encoder(metaclass=ABCMeta): '''Interfa...
{ "repo_name": "viridia/coda", "path": "libs/coda/io/codec.py", "copies": "1", "size": "5890", "license": "apache-2.0", "hash": -6804294599774114000, "line_mean": 24.7205240175, "line_max": 77, "alpha_frac": 0.6823429542, "autogenerated": false, "ratio": 4.277414669571533, "config_test": false, ...
'''Base classes for CODA objects.''' import copy from .frozendict import FrozenDict class ObjectMeta(type): '''Metaclass that creates (but does not initialize) a default instance for each class. The default instance will be initialized later by the bootstrap code - this avoids the problem with circular re...
{ "repo_name": "viridia/coda", "path": "libs/coda/runtime/object.py", "copies": "1", "size": "4569", "license": "apache-2.0", "hash": 6845626727385283000, "line_mean": 26.5240963855, "line_max": 96, "alpha_frac": 0.6511271613, "autogenerated": false, "ratio": 3.9730434782608697, "config_test": f...
# Base classes for code generation. from abc import abstractmethod, ABCMeta import os import collections from coda import types from coda.descriptors import FileOptions, StructOptions, FieldOptions, EnumOptions def getScopedOption(optionMap, scope, defaultValue=None): '''@type fd: coda.descriptors.FileDescriptor ...
{ "repo_name": "viridia/coda", "path": "libs/coda/compiler/genbase.py", "copies": "1", "size": "14631", "license": "apache-2.0", "hash": -6965177488052978000, "line_mean": 30.129787234, "line_max": 94, "alpha_frac": 0.6817715809, "autogenerated": false, "ratio": 3.838142707240294, "config_test":...
""" Base classes for computing fingerprints and exportable versions of objects. """ import json #from gmpy import mpz from gmpy2 import mpz, bit_length, f_divmod_2exp from base64 import b64encode from hashlib import sha256 as crypthash from tools import utils def fingerprint(blob): """Compute the fingerprint...
{ "repo_name": "ecuvelier/closest", "path": "main/tools/fingexp.py", "copies": "1", "size": "5817", "license": "apache-2.0", "hash": 3897512281170392000, "line_mean": 34.0421686747, "line_max": 86, "alpha_frac": 0.602028537, "autogenerated": false, "ratio": 3.973360655737705, "config_test": fals...
""" Base classes for computing fingerprints and exportable versions of objects. """ import json from gmpy import mpz # from gmpy2 import mpz, bit_length, f_divmod_2exp from base64 import b64encode from hashlib import sha256 as crypthash import utils def fingerprint(blob): """Compute the fingerprint of its in...
{ "repo_name": "ecuvelier/P3MVEOS", "path": "tools/fingexp.py", "copies": "3", "size": "5725", "license": "apache-2.0", "hash": -1814310413281741000, "line_mean": 33.4879518072, "line_max": 80, "alpha_frac": 0.6008733624, "autogenerated": false, "ratio": 3.989547038327526, "config_test": false, ...
"""Base classes for creating GUI objects to create manually selected points. The definition of X,Y axis is the following: xmin,ymin o---------o xmax,ymin | | | | | | | | xmin,ymax o---------o xmax,ymax """ from collections import na...
{ "repo_name": "neuropoly/spinalcordtoolbox", "path": "spinalcordtoolbox/gui/base.py", "copies": "1", "size": "13042", "license": "mit", "hash": 5480251624276098000, "line_mean": 30.7323600973, "line_max": 124, "alpha_frac": 0.5951541175, "autogenerated": false, "ratio": 4.222078342505665, "conf...
"""Base classes for cursors. These classes centralize common code. """ from vtdb import dbexceptions class BasePEP0249Cursor(object): """Cursor with common PEP0249 implementations.""" def __init__(self): self._clear_common_state() self._conn = None def callproc(self): """For PEP 0249.""" rai...
{ "repo_name": "yaoshengzhe/vitess", "path": "py/vtdb/base_cursor.py", "copies": "4", "size": "5289", "license": "bsd-3-clause", "hash": -1931518404487639800, "line_mean": 23.3732718894, "line_max": 77, "alpha_frac": 0.6547551522, "autogenerated": false, "ratio": 3.909090909090909, "config_test"...
"""Base classes for descriptors and descriptor owners. @bug: L{Proxy} is currently unaware of its context. @author: Stephan Wenger @date: 2012-02-29 """ from inspect import getmembers as _getmembers import types as _types import numpy as _np import glitter.raw as _gl from glitter.utils.dtypes import coerce_array, in...
{ "repo_name": "swenger/glitter", "path": "glitter/utils/proxy.py", "copies": "1", "size": "6121", "license": "mit", "hash": 1711917334190372900, "line_mean": 34.3815028902, "line_max": 136, "alpha_frac": 0.5742525731, "autogenerated": false, "ratio": 3.906190172303765, "config_test": false, "...
""" Base classes for easily creating commands. """ def local_op_undefined(channel, **kw): """ Local operation not implemented. """ raise NotImplementedError("Operation not implemented.") class UnixCommand(object): """ Base class for traditional Unix command line utilities. """ # tuple of names of p...
{ "repo_name": "hodgestar/fishnet", "path": "fishnet/cmds/base.py", "copies": "1", "size": "1422", "license": "mit", "hash": 8252621235771842000, "line_mean": 32.0697674419, "line_max": 76, "alpha_frac": 0.5949367089, "autogenerated": false, "ratio": 4.133720930232558, "config_test": false, "h...
"""Base classes for enumerations. @author: Stephan Wenger @date: 2012-02-29 """ class EnumConstant(object): def __init__(self, enum, name, value): self._enum = enum self.name = name self._value = value def __str__(self): return self.name def __repr__(self): return...
{ "repo_name": "swenger/glitter", "path": "glitter/utils/enum.py", "copies": "1", "size": "1305", "license": "mit", "hash": 3541260577197720600, "line_mean": 28, "line_max": 103, "alpha_frac": 0.5724137931, "autogenerated": false, "ratio": 3.8269794721407626, "config_test": false, "has_no_keyw...
"""Base classes for filters.""" from distance import Level from distance.base import Transform, TransformError from distance.classes import DefaultClasses _ANIM_FRAG_TAGS = ( 'Animator', 'EventListener', 'TrackAttachment', ) ANIM_FRAG_SECTIONS = {DefaultClasses.fragments.get_base_key(tag) ...
{ "repo_name": "ferreum/distanceutils", "path": "distance/filter/base.py", "copies": "1", "size": "4127", "license": "mit", "hash": 44141121868998744, "line_mean": 28.9057971014, "line_max": 87, "alpha_frac": 0.6004361522, "autogenerated": false, "ratio": 3.915559772296015, "config_test": false,...
"""Base classes for `flavio`""" import numpy as np from .config import config from collections import OrderedDict, defaultdict import copy import flavio from flavio._parse_errors import constraints_from_string, \ convolve_distributions, dict2dist from flavio.statistics.probability import string_to_class import wa...
{ "repo_name": "flav-io/flavio", "path": "flavio/classes.py", "copies": "1", "size": "34199", "license": "mit", "hash": 1204712711386349800, "line_mean": 39.0890973036, "line_max": 130, "alpha_frac": 0.5933442508, "autogenerated": false, "ratio": 4.318221997726986, "config_test": false, "has_n...
"""Base classes for indexed operations (sums and products)""" from abc import ABCMeta from .abstract_algebra import Expression, Operation from .exceptions import InfiniteSumError from ..pattern_matching import wc from ...utils.indices import ( IdxSym, IndexRangeBase, SymbolicLabelBase, yield_from_ranges, ) __all...
{ "repo_name": "mabuchilab/QNET", "path": "src/qnet/algebra/core/indexed_operations.py", "copies": "1", "size": "9421", "license": "mit", "hash": 6584770128926219000, "line_mean": 36.0905511811, "line_max": 80, "alpha_frac": 0.5593885999, "autogenerated": false, "ratio": 4.507655502392344, "conf...
"""Base classes for interaction with database. """ import inspect import datetime import hashlib import re import numpy as np from django.db import models from django.conf import settings from django.utils.importlib import import_module from h1ds.filters import BaseFilter, excluded_filters # Match strings "f(fid)_na...
{ "repo_name": "h1ds/h1ds", "path": "h1ds/h1ds/base.py", "copies": "1", "size": "12074", "license": "mit", "hash": 4946640901185607000, "line_mean": 32.7262569832, "line_max": 145, "alpha_frac": 0.6074209044, "autogenerated": false, "ratio": 3.829368855058674, "config_test": false, "has_no_key...
""" Base classes for interfacing with iproute2. """ # -*- coding: utf-8 -*- from __future__ import print_function import functools import netaddr import re import sys import time from sh import ErrorReturnCode EUI = functools.partial(netaddr.EUI, dialect=netaddr.mac_unix_expanded) IPAddress = netaddr.IPAddress IPNet...
{ "repo_name": "jta/ipyroute", "path": "ipyroute/base.py", "copies": "1", "size": "6554", "license": "mit", "hash": -900692573714172700, "line_mean": 32.4387755102, "line_max": 91, "alpha_frac": 0.5805614892, "autogenerated": false, "ratio": 4.106516290726817, "config_test": false, "has_no_key...
"""Base classes for Jacoco coverage report unit tests.""" from base_collectors import XMLFileSourceCollector from collector_utilities.functions import parse_source_response_xml from source_model import SourceMeasurement, SourceResponses class JacocoCoverageBaseClass(XMLFileSourceCollector): # pylint: disable=too-fe...
{ "repo_name": "ICTU/quality-time", "path": "components/collector/src/source_collectors/jacoco/base.py", "copies": "1", "size": "1131", "license": "apache-2.0", "hash": -4486596559349923300, "line_mean": 50.4090909091, "line_max": 112, "alpha_frac": 0.6940760389, "autogenerated": false, "ratio": 4...
"""Base classes for Jira collectors.""" from typing import Optional, cast from collector_utilities.type import URL, Value from source_model import Entities, Entity from .issues import JiraIssues class JiraFieldSumBase(JiraIssues): """Base class for collectors that sum a custom Jira field.""" field_paramet...
{ "repo_name": "ICTU/quality-time", "path": "components/collector/src/source_collectors/jira/base.py", "copies": "1", "size": "1593", "license": "apache-2.0", "hash": -7685592140813817000, "line_mean": 39.8461538462, "line_max": 91, "alpha_frac": 0.6691776522, "autogenerated": false, "ratio": 3.92...
"""Base Classes for Likelihood Models in time series analysis Warning: imports numdifftools Created on Sun Oct 10 15:00:47 2010 Author: josef-pktd License: BSD """ import numpy as np import numdifftools as ndt from scikits.statsmodels.base.model import LikelihoodModel #copied from sandbox/regression/mle.py #T...
{ "repo_name": "wesm/statsmodels", "path": "scikits/statsmodels/tsa/mlemodel.py", "copies": "1", "size": "2071", "license": "bsd-3-clause", "hash": -8648954669127937000, "line_mean": 24.8875, "line_max": 80, "alpha_frac": 0.622887494, "autogenerated": false, "ratio": 3.793040293040293, "config_t...
"""Base Classes for Likelihood Models in time series analysis Warning: imports numdifftools Created on Sun Oct 10 15:00:47 2010 Author: josef-pktd License: BSD """ import numpy as np try: import numdifftools as ndt except ImportError: pass from statsmodels.base.model import LikelihoodModel #copied fro...
{ "repo_name": "wkfwkf/statsmodels", "path": "statsmodels/tsa/mlemodel.py", "copies": "36", "size": "2101", "license": "bsd-3-clause", "hash": 9111185106868132000, "line_mean": 24.313253012, "line_max": 80, "alpha_frac": 0.6220847216, "autogenerated": false, "ratio": 3.8130671506352085, "config_...
"""Base Classes for Likelihood Models in time series analysis Warning: imports numdifftools Created on Sun Oct 10 15:00:47 2010 Author: josef-pktd License: BSD """ try: import numdifftools as ndt except ImportError: pass from statsmodels.base.model import LikelihoodModel #copied from sandbox/regressi...
{ "repo_name": "jseabold/statsmodels", "path": "statsmodels/tsa/mlemodel.py", "copies": "5", "size": "2181", "license": "bsd-3-clause", "hash": -1882234271408679000, "line_mean": 24.3604651163, "line_max": 80, "alpha_frac": 0.6121045392, "autogenerated": false, "ratio": 3.901610017889088, "confi...
"Base classes for lookup creation." from __future__ import unicode_literals import json import operator import re from functools import reduce from django.conf import settings from django.core.paginator import Paginator, InvalidPage, EmptyPage from django.core.urlresolvers import reverse from django.core.serializers....
{ "repo_name": "affan2/django-selectable", "path": "selectable/base.py", "copies": "1", "size": "5447", "license": "bsd-2-clause", "hash": -5940823578658385000, "line_mean": 30.1257142857, "line_max": 84, "alpha_frac": 0.6062052506, "autogenerated": false, "ratio": 4.148514851485149, "config_tes...
"Base classes for lookup creation." import operator import re from functools import reduce from django.conf import settings from django.core.paginator import Paginator, InvalidPage, EmptyPage from django.http import JsonResponse from django.db.models import Q, Model from django.urls import reverse from django.utils.en...
{ "repo_name": "mlavin/django-selectable", "path": "selectable/base.py", "copies": "1", "size": "5027", "license": "bsd-2-clause", "hash": -4865164039478830000, "line_mean": 29.8404907975, "line_max": 84, "alpha_frac": 0.58882037, "autogenerated": false, "ratio": 4.151114781172585, "config_test"...
"Base classes for lookup creation." import operator import re from django.conf import settings from django.core.paginator import Paginator, InvalidPage, EmptyPage from django.core.urlresolvers import reverse from django.core.serializers.json import DjangoJSONEncoder from django.http import HttpResponse from django.db...
{ "repo_name": "makinacorpus/django-selectable", "path": "selectable/base.py", "copies": "1", "size": "5267", "license": "bsd-2-clause", "hash": 4030431630858926600, "line_mean": 29.9823529412, "line_max": 77, "alpha_frac": 0.6058477312, "autogenerated": false, "ratio": 4.157063930544593, "confi...
"""Base classes for Message processing.""" import sys import traceback from .compat import Long class Deadline(object): KEY = "__Deadline" EVENT_KEY = "__Deadline_Event" def __init__(self, timeout): """ Args: timeout - The timeout in seconds """ import time self._ts...
{ "repo_name": "steveniemitz/scales", "path": "scales/message.py", "copies": "1", "size": "3922", "license": "mit", "hash": -9111663681658303000, "line_mean": 26.8382352941, "line_max": 78, "alpha_frac": 0.6165221826, "autogenerated": false, "ratio": 4.235421166306695, "config_test": false, "h...
# Copyright (c) 2012,2013 Cisco Systems, Inc. and others. All rights reserved. # # This program and the accompanying materials are made available under the # terms of the Eclipse Public License v1.0 which accompanies this distribution, # and is available at http://www.eclipse.org/legal/epl-v10.html import time impor...
{ "repo_name": "bigdataops/bgpcep", "path": "pcep/pcepy/message/base.py", "copies": "2", "size": "30501", "license": "epl-1.0", "hash": 3593614048331249000, "line_mean": 34.5904317386, "line_max": 114, "alpha_frac": 0.5493262516, "autogenerated": false, "ratio": 4.048447040084948, "config_test":...
"""Base classes for my data model.""" import decimal from google.appengine.ext import ndb from google.appengine.ext.ndb import polymodel from appengine import history, rest, user # From http://stackoverflow.com/questions/10035133/ndb-decimal-property class DecimalProperty(ndb.IntegerProperty): """Decimal property...
{ "repo_name": "tomwilkie/awesomation", "path": "src/appengine/model.py", "copies": "1", "size": "2045", "license": "mit", "hash": 4889962388898247000, "line_mean": 30.4615384615, "line_max": 76, "alpha_frac": 0.6562347188, "autogenerated": false, "ratio": 3.78003696857671, "config_test": false,...
"""Base classes for NCover collectors.""" import json from abc import ABC from bs4 import BeautifulSoup from base_collectors import HTMLFileSourceCollector from collector_utilities.type import Response from source_model import SourceMeasurement, SourceResponses class NCoverBase(HTMLFileSourceCollector, ABC): # py...
{ "repo_name": "ICTU/quality-time", "path": "components/collector/src/source_collectors/ncover/base.py", "copies": "1", "size": "1630", "license": "apache-2.0", "hash": 5636669298615334000, "line_mean": 40.7948717949, "line_max": 117, "alpha_frac": 0.6889570552, "autogenerated": false, "ratio": 4....
"""Base classes for network layers. """ # standard imports from typing import Tuple, List import numpy as np from collections import OrderedDict # toolbox imports from base import Identifiable # ------------ Base layers ---------------------- class Layer(Identifiable): """A Layer encapsulates operations that tr...
{ "repo_name": "Petr-By/qtpyvis", "path": "dltb/network/layer.py", "copies": "1", "size": "10233", "license": "mit", "hash": -5049984934613913000, "line_mean": 27.9886685552, "line_max": 87, "alpha_frac": 0.5622007232, "autogenerated": false, "ratio": 4.2887678122380555, "config_test": false, ...
""" Base classes for Nodes """ import inspect from pike.exceptions import ValidationError import six def asnode(node): """ Convert non-node objects into a Node """ wrapper = getattr(node, '__wrapper_node__', None) if wrapper is None: return node return wrapper(node) def run_node(node, args, ...
{ "repo_name": "stevearc/python-pike", "path": "pike/nodes/base.py", "copies": "1", "size": "20156", "license": "mit", "hash": -3912870018388429000, "line_mean": 30.2496124031, "line_max": 79, "alpha_frac": 0.5390454455, "autogenerated": false, "ratio": 4.292163543441227, "config_test": false, ...
"""Base classes for objects in levels.""" from .base import BaseObject from .bytes import Section, Magic from .base import Fragment, default_fragments from ._data import MaterialSet from .classes import CollectorGroup Classes = CollectorGroup() @Classes.fragments.fragment class MaterialFragment(Fragment): ba...
{ "repo_name": "ferreum/distanceutils", "path": "distance/levelobjects.py", "copies": "1", "size": "3611", "license": "mit", "hash": -3215023520031615000, "line_mean": 27.888, "line_max": 74, "alpha_frac": 0.6028800886, "autogenerated": false, "ratio": 3.821164021164021, "config_test": false, ...
"""Base classes for ONVIF entities.""" from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC from homeassistant.helpers.entity import Entity from .const import DOMAIN from .device import ONVIFDevice from .models import Profile class ONVIFBaseEntity(Entity): """Base class common to all ONVIF en...
{ "repo_name": "home-assistant/home-assistant", "path": "homeassistant/components/onvif/base.py", "copies": "16", "size": "1773", "license": "apache-2.0", "hash": 956585021945480400, "line_mean": 36.7234042553, "line_max": 82, "alpha_frac": 0.6198533559, "autogenerated": false, "ratio": 4.47727272...
"""Base classes for OpenCV-based computer vision.""" import numpy as np try: import cv2 except ImportError: print "You need OpenCV to use vision modules, sorry." sys.exit(1) from util import log class FrameProcessor: """Processes a sequence of images (frames).""" def __init__(self, options): self.g...
{ "repo_name": "IEEERobotics/high-level", "path": "qwe/vision/base.py", "copies": "1", "size": "4764", "license": "bsd-2-clause", "hash": -5191568223830278000, "line_mean": 37.4193548387, "line_max": 153, "alpha_frac": 0.6950041982, "autogenerated": false, "ratio": 4.135416666666667, "config_tes...
"""Base classes for OpenGL objects. @todo: Rethink what C{__del__} and C{__exit__} methods should do when the interpreter exits (e.g. restoring to a deleted object will not work). @author: Stephan Wenger @date: 2012-02-29 """ from functools import wraps as _wraps import glitter.raw as _gl def _get_context(): "...
{ "repo_name": "swenger/glitter", "path": "glitter/utils/objects.py", "copies": "1", "size": "12866", "license": "mit", "hash": 7185572223051202000, "line_mean": 33.5860215054, "line_max": 143, "alpha_frac": 0.6253691901, "autogenerated": false, "ratio": 4.185426154847105, "config_test": false, ...
"""Base classes for organizing data (for instance to visualize data with Qt, or to run hierarchical checks) in a global graph, and a detail tree at each node of the global graph. The classes defined here assume that data can be organized in two stages: a global level which only shows 'top-level' objects (i.e. large fi...
{ "repo_name": "griest024/PokyrimTools", "path": "pyffi-develop/pyffi/utils/graph.py", "copies": "1", "size": "8280", "license": "mit", "hash": 106840500209913660, "line_mean": 38.6172248804, "line_max": 80, "alpha_frac": 0.677294686, "autogenerated": false, "ratio": 4.385593220338983, "config_t...
"""Base classes for ox_herd plugins. """ from flask_wtf import FlaskForm from wtforms import (StringField, RadioField, IntegerField, validators) from ox_herd.core import ox_tasks class OxPlugin(object): """Abstract class for an ox_herd plugin. """ def name(self): """Return string name of the plu...
{ "repo_name": "aocks/ox_herd", "path": "ox_herd/core/plugins/base.py", "copies": "1", "size": "6238", "license": "bsd-2-clause", "hash": -2126338016149184800, "line_mean": 34.8505747126, "line_max": 80, "alpha_frac": 0.655658865, "autogenerated": false, "ratio": 4.133863485752154, "config_test"...
""" Base Classes for PIoT Sensors """ class BaseSensor: def __init__(self): """ Base Sensor """ self.sensor_name = '' """The name of the sensor. """ def get_notification_text(self, sensor_value): """ Get the notification text for the sensor. :param sensor_valu...
{ "repo_name": "tnewman/PIoT", "path": "piot/sensor/base.py", "copies": "1", "size": "1865", "license": "mit", "hash": -5834140693582876000, "line_mean": 26.8358208955, "line_max": 74, "alpha_frac": 0.5694369973, "autogenerated": false, "ratio": 4.75765306122449, "config_test": false, "has_no_...
"""Base classes for pipelines and pipeline blocks.""" class Block(object): """Base class for all blocks. Notes ----- Blocks should take their parameters in ``__init__`` and provide at least the ``process`` method for taking in data and returning some result. """ def __init__(self, name=N...
{ "repo_name": "ucdrascal/axopy", "path": "axopy/pipeline/core.py", "copies": "2", "size": "4458", "license": "mit", "hash": -954686885091209300, "line_mean": 27.7612903226, "line_max": 79, "alpha_frac": 0.5663974877, "autogenerated": false, "ratio": 4.567622950819672, "config_test": false, "h...
"""Base classes for pipelines and pipeline blocks.""" class PipelineBlock(object): """Base class for all blocks in copper. Notes ----- Blocks should take their parameters in ``__init__`` and provide at least the ``process`` method for taking in data and returning some result. """ def __i...
{ "repo_name": "ixjlyons/copper", "path": "copper/core.py", "copies": "2", "size": "7161", "license": "bsd-3-clause", "hash": 5614059758580919000, "line_mean": 31.1121076233, "line_max": 79, "alpha_frac": 0.6048037984, "autogenerated": false, "ratio": 4.4868421052631575, "config_test": false, ...
"""Base classes for plugins. """ import sys import os import wx from pubsub import pub import gui from config import Config def has_method(obj, name): return callable(getattr(obj, name, None)) class PluginManager(object): def __init__(self): self._plugins = {} def load(self, path): # L...
{ "repo_name": "ronald-d-rogers/twitchy", "path": "plugins.py", "copies": "1", "size": "3313", "license": "bsd-2-clause", "hash": -7656203753701715000, "line_mean": 21.8482758621, "line_max": 72, "alpha_frac": 0.5354663447, "autogenerated": false, "ratio": 3.7224719101123593, "config_test": fals...
"""Base classes for Quality-time collectors.""" from abc import ABC from typing import Any from base_collectors import SourceCollector, SourceCollectorException from collector_utilities.type import Response, URL class QualityTimeCollector(SourceCollector, ABC): # skipcq: PYL-W0223 """Base collector for Quality...
{ "repo_name": "ICTU/quality-time", "path": "components/collector/src/source_collectors/quality_time/base.py", "copies": "1", "size": "1278", "license": "apache-2.0", "hash": -860234686471078100, "line_mean": 37.7272727273, "line_max": 120, "alpha_frac": 0.6424100156, "autogenerated": false, "rati...
""" Base classes for representing and manipulating data. """ import logging import re import os import sys import numpy as np import pandas as pd from scipy import sparse from neurosynth.base import mask, imageutils, transformations from neurosynth.base import lexparser as lp from neurosynth.utils import deprecated #...
{ "repo_name": "neurosynth/neurosynth", "path": "neurosynth/base/dataset.py", "copies": "1", "size": "33663", "license": "mit", "hash": -8807947557108047000, "line_mean": 42.3801546392, "line_max": 102, "alpha_frac": 0.591450554, "autogenerated": false, "ratio": 4.3246402877697845, "config_test"...
""" Base classes for representing and manipulating data. """ import logging import re import os import sys import numpy as np import pandas as pd from scipy import sparse import mappable from neurosynth.base import mask, imageutils, transformations from neurosynth.base import lexparser as lp from neurosynth.utils impo...
{ "repo_name": "taylorhxu/neurosynth", "path": "neurosynth/base/dataset.py", "copies": "1", "size": "39571", "license": "mit", "hash": -2380127541674176500, "line_mean": 43.8650793651, "line_max": 102, "alpha_frac": 0.5978367997, "autogenerated": false, "ratio": 4.319978165938864, "config_test":...
""" Base classes for representing and manipulating data. """ import logging import re import os from scipy import sparse from neurosynth.base import mappable from neurosynth.base import mask, imageutils, transformations from neurosynth.base import lexparser as lp from neurosynth.utils import deprecated # For Python ...
{ "repo_name": "chrisfilo/Neurosynth", "path": "neurosynth/base/dataset.py", "copies": "1", "size": "40098", "license": "mit", "hash": 4685885315741518000, "line_mean": 43.6525612472, "line_max": 102, "alpha_frac": 0.5996807821, "autogenerated": false, "ratio": 4.299592536993352, "config_test": ...
"""Base classes for resource widget. A resource is everything that may require some extra installation of hardware or software, including tools, data, and models (networks). """ # Generic imports import logging # Qt imports from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QWidget, QGroupBox, QStackedWidget, QS...
{ "repo_name": "Petr-By/qtpyvis", "path": "qtgui/widgets/resource.py", "copies": "1", "size": "16719", "license": "mit", "hash": -1439715557081497300, "line_mean": 35.9889380531, "line_max": 78, "alpha_frac": 0.6468688319, "autogenerated": false, "ratio": 4.374411302982732, "config_test": false,...
"""Base classes for Robot Framework collector unit tests.""" from ..source_collector_test_case import SourceCollectorTestCase class RobotFrameworkTestCase(SourceCollectorTestCase): # skipcq: PTC-W0046 """Base class for testing Robot Framework collectors.""" SOURCE_TYPE = "robot_framework" ROBOT_FRAMEWO...
{ "repo_name": "ICTU/quality-time", "path": "components/collector/tests/source_collectors/robot_framework/base.py", "copies": "1", "size": "2443", "license": "apache-2.0", "hash": 2600735676163552000, "line_mean": 39.0491803279, "line_max": 102, "alpha_frac": 0.4654113795, "autogenerated": false, ...
"""Base classes for schemas.""" class _Missing(tuple): pass Missing = _Missing() class Invalid(Exception): def __init__(self, msg, value, array=None, document=None): self.msg = msg self.value = value self.array = array self.document = document def __repr__(self): ...
{ "repo_name": "rick446/barin", "path": "barin/schema/base.py", "copies": "1", "size": "3236", "license": "apache-2.0", "hash": 8334468135576774000, "line_mean": 25.9666666667, "line_max": 62, "alpha_frac": 0.5135970334, "autogenerated": false, "ratio": 4.361185983827493, "config_test": false, ...
"""Base classes for server/gateway implementations""" from types import StringType from util import FileWrapper, guess_scheme, is_hop_by_hop from headers import Headers import sys, os, time __all__ = ['BaseHandler', 'SimpleHandler', 'BaseCGIHandler', 'CGIHandler'] try: dict except NameError: def dict(items)...
{ "repo_name": "romankagan/DDBWorkbench", "path": "python/lib/Lib/wsgiref/handlers.py", "copies": "104", "size": "15596", "license": "apache-2.0", "hash": 1340864931153422000, "line_mean": 30.6991869919, "line_max": 79, "alpha_frac": 0.6174660169, "autogenerated": false, "ratio": 4.261202185792349...
"""Base classes for server/gateway implementations""" from .util import FileWrapper, guess_scheme, is_hop_by_hop from .headers import Headers import sys, os, time __all__ = ['BaseHandler', 'SimpleHandler', 'BaseCGIHandler', 'CGIHandler'] # Weekday and month names for HTTP date/time formatting; always English! _week...
{ "repo_name": "MalloyPower/parsing-python", "path": "front-end/testsuite-python-lib/Python-3.1/Lib/wsgiref/handlers.py", "copies": "1", "size": "15944", "license": "mit", "hash": 3527904049291061000, "line_mean": 31.5387755102, "line_max": 81, "alpha_frac": 0.6155293527, "autogenerated": false, "...
"""Base classes for server/gateway implementations""" from .util import FileWrapper, guess_scheme, is_hop_by_hop from .headers import Headers import sys, os, time __all__ = [ 'BaseHandler', 'SimpleHandler', 'BaseCGIHandler', 'CGIHandler', 'IISCGIHandler', 'read_environ' ] # Weekday and month names for HTTP ...
{ "repo_name": "bonitadecker77/python-for-android", "path": "python3-alpha/python3-src/Lib/wsgiref/handlers.py", "copies": "51", "size": "20582", "license": "apache-2.0", "hash": 6021383570595743000, "line_mean": 36.7651376147, "line_max": 102, "alpha_frac": 0.6171897775, "autogenerated": false, "...
"""Base classes for server/gateway implementations""" #M: # This module provides base handler classes for implementing # WSGI servers and gateways. from types import StringType from util import FileWrapper, guess_scheme, is_hop_by_hop from headers import Headers import sys, os, time __all__ = ['BaseHandler'...
{ "repo_name": "minixalpha/SourceLearning", "path": "wsgiref-0.1.2/src/wsgiref/handlers.py", "copies": "1", "size": "19202", "license": "apache-2.0", "hash": -3559850536506988000, "line_mean": 34.0401459854, "line_max": 90, "alpha_frac": 0.6101968545, "autogenerated": false, "ratio": 4.20727432077...
"""Base classes for server/gateway implementations""" from types import StringType from util import FileWrapper, guess_scheme, is_hop_by_hop from headers import Headers import sys, os, time __all__ = ['BaseHandler', 'SimpleHandler', 'BaseCGIHandler', 'CGIHandler'] try: dict except NameError: de...
{ "repo_name": "ericlink/adms-server", "path": "playframework-dist/play-1.1/python/Lib/wsgiref/handlers.py", "copies": "2", "size": "16088", "license": "mit", "hash": 6862625656611454000, "line_mean": 30.6991869919, "line_max": 79, "alpha_frac": 0.5985827946, "autogenerated": false, "ratio": 4.365...
"""Base classes for SmartTub entities.""" import logging import smarttub from homeassistant.helpers.entity import DeviceInfo from homeassistant.helpers.update_coordinator import ( CoordinatorEntity, DataUpdateCoordinator, ) from .const import DOMAIN from .helpers import get_spa_name _LOGGER = logging.getLog...
{ "repo_name": "home-assistant/home-assistant", "path": "homeassistant/components/smarttub/entity.py", "copies": "2", "size": "2012", "license": "apache-2.0", "hash": -1486477382159986200, "line_mean": 26.9444444444, "line_max": 80, "alpha_frac": 0.6232604374, "autogenerated": false, "ratio": 4.00...
""" base classes for temporal models """ import abc import collections import contextlib import datetime as dt import typing import uuid import warnings import sqlalchemy as sa import sqlalchemy.dialects.postgresql as sap import sqlalchemy.orm as orm import sqlalchemy.orm.attributes as attributes import psycopg2.extra...
{ "repo_name": "CloverHealth/temporal-sqlalchemy", "path": "temporal_sqlalchemy/bases.py", "copies": "1", "size": "10067", "license": "bsd-3-clause", "hash": -3209535677562079700, "line_mean": 33.3583617747, "line_max": 107, "alpha_frac": 0.5805105791, "autogenerated": false, "ratio": 4.2584602368...
"""Base classes for text-based Problems. * Text2TextProblem: input=text, target=text. * Text2SelfProblem (for language modeling): target=text The Text2TextTmpDir problem allows you to train without defining a problem. It expects you to format your data in a particular way and put it in tmp_dir. See its docstring. """...
{ "repo_name": "mlperf/training_results_v0.6", "path": "Google/benchmarks/transformer/implementations/tpu-v3-1024-transformer/transformer/data_generators/text_problems.py", "copies": "6", "size": "25287", "license": "apache-2.0", "hash": -5156728316889623000, "line_mean": 31.5863402062, "line_max": 80, ...
"""Base classes for the CMS admin interface.""" from django.contrib import admin from django.contrib.auth.models import User from django.contrib.admin.sites import NotRegistered try: from usertools.admin import UserAdmin except ImportError: from django.contrib.auth.admin import UserAdmin from cms import exte...
{ "repo_name": "jamesfoley/cms", "path": "cms/admin.py", "copies": "3", "size": "3520", "license": "bsd-3-clause", "hash": 5170437443752755000, "line_mean": 27.3870967742, "line_max": 150, "alpha_frac": 0.6792613636, "autogenerated": false, "ratio": 3.968432919954904, "config_test": false, "ha...
"""Base classes for the CMS admin interface.""" from django.contrib import admin from cms import externals from cms.models.base import SearchMetaBaseSearchAdapter, PageBaseSearchAdapter class PublishedBaseAdmin(admin.ModelAdmin): """Base admin class for published models.""" change_form...
{ "repo_name": "etianen/cms", "path": "src/cms/admin.py", "copies": "1", "size": "2744", "license": "bsd-3-clause", "hash": 7179397721792044000, "line_mean": 28.8369565217, "line_max": 167, "alpha_frac": 0.6417638484, "autogenerated": false, "ratio": 4.157575757575757, "config_test": false, "h...
""" Base classes for the processors and outputters. You can extend these to make your own processors and outputters. """ import os import logging try: import json except ImportError: from django.utils import simplejson as json class Processor(object): def __init__(self, pipeline): """ The pi...
{ "repo_name": "potatolondon/assetpipe", "path": "assetpipe/base.py", "copies": "1", "size": "2859", "license": "bsd-2-clause", "hash": 5916732931782660000, "line_mean": 30.4175824176, "line_max": 85, "alpha_frac": 0.6687653026, "autogenerated": false, "ratio": 4.1982378854625555, "config_test":...
"""Base classes for the ``Responders`` and ``Adapters``. """ import json from six import iteritems class BaseResponder(object): TYPE = None SERIALIZER = None LINKS = None ADAPTER = None def __init__(self): if not self.ADAPTER: raise NotImplementedError('Responder must define ...
{ "repo_name": "kalasjocke/hyp", "path": "hyp/base.py", "copies": "1", "size": "3871", "license": "mit", "hash": 3799623382345218000, "line_mean": 28.3257575758, "line_max": 85, "alpha_frac": 0.5827951434, "autogenerated": false, "ratio": 4.1893939393939394, "config_test": false, "has_no_keywo...
'''Base classes for the various location models. Example usage: >>> import tweet >>> from tok.unicode_props import UP_Tiny >>> import geo.new_yorker >>> tw = tweet.Tweet.from_list(['186347637706989568', ... '2012-04-01T07:01:53+00:00', ... 'RT @...
{ "repo_name": "joh12041/quac", "path": "lib/geo/base.py", "copies": "1", "size": "13430", "license": "apache-2.0", "hash": 930011935734382800, "line_mean": 39.4518072289, "line_max": 119, "alpha_frac": 0.6166790767, "autogenerated": false, "ratio": 4.296225207933461, "config_test": true, "has...
"""Base classes for type definitions in the STIX2 library.""" import collections import collections.abc import copy import itertools import re import uuid import simplejson as json import stix2 from stix2.canonicalization.Canonicalize import canonicalize from .exceptions import ( AtLeastOnePropertyError, Depend...
{ "repo_name": "oasis-open/cti-python-stix2", "path": "stix2/base.py", "copies": "1", "size": "21463", "license": "bsd-3-clause", "hash": -794208910968109400, "line_mean": 35.6888888889, "line_max": 137, "alpha_frac": 0.5887341005, "autogenerated": false, "ratio": 4.25009900990099, "config_test"...
"""Base classes for VCS backends.""" from __future__ import absolute_import from builtins import object import logging import os import shutil import subprocess from collections import namedtuple from os.path import basename log = logging.getLogger(__name__) class VCSVersion(object): """ Represents a Versi...
{ "repo_name": "pombredanne/readthedocs.org", "path": "readthedocs/vcs_support/base.py", "copies": "1", "size": "4884", "license": "mit", "hash": 3599157870969751600, "line_mean": 28.963190184, "line_max": 79, "alpha_frac": 0.5477067977, "autogenerated": false, "ratio": 4.840436075322101, "confi...
"""Base classes for VCS backends.""" import logging import os import shutil from readthedocs.doc_builder.exceptions import BuildEnvironmentWarning from readthedocs.projects.exceptions import RepositoryError log = logging.getLogger(__name__) class VCSVersion: """ Represents a Version (tag or branch) in a V...
{ "repo_name": "rtfd/readthedocs.org", "path": "readthedocs/vcs_support/base.py", "copies": "1", "size": "4983", "license": "mit", "hash": -5403139606899478000, "line_mean": 29.2, "line_max": 81, "alpha_frac": 0.5970299017, "autogenerated": false, "ratio": 4.819148936170213, "config_test": false...
"""Base classes for workers.""" # pylint: disable=abstract-method import abc import six import time import threading try: import queue except ImportError: import Queue as queue from optinum.common import utils LOG = utils.get_logger(__name__) @six.add_metaclass(abc.ABCMeta) class BaseWorker(object): d...
{ "repo_name": "alexandrucoman/optinum", "path": "optinum/common/worker.py", "copies": "1", "size": "5808", "license": "mit", "hash": 2299178172727473400, "line_mean": 27.4705882353, "line_max": 76, "alpha_frac": 0.5709366391, "autogenerated": false, "ratio": 4.41002277904328, "config_test": fal...
"""Base classes implementing arithmetic for xarray objects.""" from __future__ import absolute_import, division, print_function import numbers import numpy as np from .options import OPTIONS from .pycompat import bytes_type, dask_array_type, unicode_type from .utils import not_implemented class SupportsArithmetic(...
{ "repo_name": "jcmgray/xarray", "path": "xarray/core/arithmetic.py", "copies": "1", "size": "3377", "license": "apache-2.0", "hash": 1089298714668802200, "line_mean": 42.8571428571, "line_max": 79, "alpha_frac": 0.5809890435, "autogenerated": false, "ratio": 4.461030383091149, "config_test": fa...
"""Base classes implementing arithmetic for xarray objects.""" import numbers import numpy as np from .options import OPTIONS from .pycompat import dask_array_type from .utils import not_implemented class SupportsArithmetic: """Base class for xarray types that support arithmetic. Used by Dataset, DataArray...
{ "repo_name": "shoyer/xarray", "path": "xarray/core/arithmetic.py", "copies": "3", "size": "3383", "license": "apache-2.0", "hash": 4039662591935535600, "line_mean": 31.5288461538, "line_max": 80, "alpha_frac": 0.5551285841, "autogenerated": false, "ratio": 4.331626120358515, "config_test": fal...
"""Base classes implementing arithmetic for xarray objects.""" import numbers import numpy as np # _typed_ops.py is a generated file from ._typed_ops import ( DataArrayGroupByOpsMixin, DataArrayOpsMixin, DatasetGroupByOpsMixin, DatasetOpsMixin, VariableOpsMixin, ) from .common import ImplementsArr...
{ "repo_name": "pydata/xarray", "path": "xarray/core/arithmetic.py", "copies": "1", "size": "4478", "license": "apache-2.0", "hash": 3492133124431597600, "line_mean": 29.0536912752, "line_max": 81, "alpha_frac": 0.6368914694, "autogenerated": false, "ratio": 4.34757281553398, "config_test": fals...