text
stringlengths
0
1.05M
meta
dict
"""Base OpHandler for ops that use group lasso regularizer. This OpHandler should not be called directly. It is a virtual base class for regularization source OpHandlers that use Group Lasso as their regularizer. """ from __future__ import absolute_import from __future__ import division from __future__ import print_f...
{ "repo_name": "google-research/morph-net", "path": "morph_net/framework/group_lasso_base_op_handler.py", "copies": "1", "size": "5974", "license": "apache-2.0", "hash": 7361213210553545000, "line_mean": 36.1055900621, "line_max": 79, "alpha_frac": 0.6637094074, "autogenerated": false, "ratio": 3....
"""Base option parser setup""" from __future__ import absolute_import import logging import optparse import sys import textwrap from distutils.util import strtobool from pip._vendor.six import string_types from pip._internal.configuration import Configuration, ConfigurationError from pip._internal.utils.compat impor...
{ "repo_name": "techtonik/pip", "path": "src/pip/_internal/cli/parser.py", "copies": "1", "size": "9300", "license": "mit", "hash": -4793342826711477000, "line_mean": 34.7692307692, "line_max": 79, "alpha_frac": 0.5894623656, "autogenerated": false, "ratio": 4.3992431409649955, "config_test": tr...
"""Base option parser setup""" from __future__ import absolute_import import sys import optparse import os import re import textwrap from distutils.util import strtobool from pip._vendor.six import string_types from pip._vendor.six.moves import configparser from pip.locations import ( legacy_config_file, config_b...
{ "repo_name": "rvmoura96/projeto-almoxarifado", "path": "myvenv/Lib/site-packages/pip/baseparser.py", "copies": "339", "size": "10465", "license": "mit", "hash": -5758534996753798000, "line_mean": 34.7167235495, "line_max": 79, "alpha_frac": 0.5871954133, "autogenerated": false, "ratio": 4.393366...
"""Base option parser setup""" from __future__ import absolute_import import sys import optparse import textwrap from distutils.util import strtobool from pip._vendor.six import string_types from pip.configuration import Configuration from pip.utils import get_terminal_size class PrettyHelpFormatter(optparse.Indent...
{ "repo_name": "fiber-space/pip", "path": "pip/baseparser.py", "copies": "2", "size": "7460", "license": "mit", "hash": 162161750451946980, "line_mean": 34.0234741784, "line_max": 79, "alpha_frac": 0.5963806971, "autogenerated": false, "ratio": 4.362573099415204, "config_test": true, "has_no_k...
"""Base option parser setup""" import logging import optparse import shutil import sys import textwrap from contextlib import suppress from typing import Any, Dict, Iterator, List, Tuple from pip._internal.cli.status_codes import UNKNOWN_ERROR from pip._internal.configuration import Configuration, ConfigurationError ...
{ "repo_name": "pypa/pip", "path": "src/pip/_internal/cli/parser.py", "copies": "4", "size": "10796", "license": "mit", "hash": 7319740237649085000, "line_mean": 35.9726027397, "line_max": 85, "alpha_frac": 0.575120415, "autogenerated": false, "ratio": 4.430036930652442, "config_test": true, "...
"""Base option parser setup""" import sys import optparse import pkg_resources import ConfigParser import os from distutils.util import strtobool from pip.locations import default_config_file class UpdatingDefaultsHelpFormatter(optparse.IndentedHelpFormatter): """Custom help formatter for use in ConfigOptionParse...
{ "repo_name": "2013Commons/HUE-SHARK", "path": "build/env/lib/python2.7/site-packages/pip-0.6.3-py2.7.egg/pip/baseparser.py", "copies": "1", "size": "7626", "license": "apache-2.0", "hash": -4158041093573373400, "line_mean": 33.197309417, "line_max": 78, "alpha_frac": 0.6273275636, "autogenerated":...
"""Base option parser setup""" # The following comment should be removed at some point in the future. # mypy: disallow-untyped-defs=False import logging import optparse import shutil import sys import textwrap from pip._vendor.contextlib2 import suppress from pip._internal.cli.status_codes import UNKNOWN_ERROR from...
{ "repo_name": "nataddrho/DigiCue-USB", "path": "Python3/src/venv/Lib/site-packages/pip/_internal/cli/parser.py", "copies": "1", "size": "10123", "license": "mit", "hash": 5519775693897437000, "line_mean": 35.024911032, "line_max": 79, "alpha_frac": 0.5769040798, "autogenerated": false, "ratio": 4...
base = ord('a') def base_it(c): return ord(c) - base def ascii_it(n): return chr(n + base) def process(inp): if len(inp) == 1: return '' new = inp[1:] s = '' for idx, char in enumerate(new): n = (base_it(char) + 1) % 26 s += ascii_it((n + base_it(inp[idx])) % 26) ...
{ "repo_name": "matslindh/codingchallenges", "path": "knowit2020/11.py", "copies": "1", "size": "1030", "license": "mit", "hash": -5782717971615212000, "line_mean": 18.0740740741, "line_max": 91, "alpha_frac": 0.4912621359, "autogenerated": false, "ratio": 3.03834808259587, "config_test": false,...
#base orm from SBaaS_base.postgresql_orm_base import * #dependent orm models from .lims_standards_postgresql_models import * #Calibrators and mixes #mix_storage class mix_storage(Base): __tablename__ = 'mix_storage' mix_id = Column(String(25), nullable = False); mixdate= Column(Date); box = Column(post...
{ "repo_name": "dmccloskey/SBaaS_LIMS", "path": "SBaaS_LIMS/lims_calibratorsAndMixes_postgresql_models.py", "copies": "1", "size": "9933", "license": "mit", "hash": 1979048858509656600, "line_mean": 41.2680851064, "line_max": 117, "alpha_frac": 0.6412966878, "autogenerated": false, "ratio": 3.3143...
base_package = 'cz/stechy/drd/' templates = './resources/templates/' online_item_template = '' base_manager_template = '' advanced_manager_template = '' getter_setter_property_template = '' getter_setter_object_property_template = '' builder_template = '' with open(templates + 'online_item_template.txt', 'r', encoding...
{ "repo_name": "stechy1/drd", "path": "scripts/src/item_builder.py", "copies": "1", "size": "9234", "license": "apache-2.0", "hash": -4767985604046732000, "line_mean": 42.7630331754, "line_max": 207, "alpha_frac": 0.5677929391, "autogenerated": false, "ratio": 3.9461538461538463, "config_test": ...
"""Base pages Blueprint.""" from flask import ( Blueprint, render_template, url_for, redirect, flash, session, request, jsonify, send_file ) from flask_login import logout_user, login_user, current_user from webfest.modules.linkedin import linkedin from webfest.modules.twitter import TwitterUser, tweets2tags f...
{ "repo_name": "PawelPamula/who-are-you", "path": "webfest/base/views.py", "copies": "1", "size": "2786", "license": "mit", "hash": -8234084466405936000, "line_mean": 27.4285714286, "line_max": 73, "alpha_frac": 0.6690595836, "autogenerated": false, "ratio": 3.6041397153945667, "config_test": fa...
"""Base pagination iterator for traversing API respones.""" class BasePaginationIterator: def __init__( self, client, path, params=None, limit=None, per_page=None, cursor=None ): self._client = client self.path = path # Custom params that along every requests self.para...
{ "repo_name": "tsileo/blobstash-python-docstore", "path": "blobstash/base/iterator.py", "copies": "1", "size": "1829", "license": "mit", "hash": -4605133980582504400, "line_mean": 27.578125, "line_max": 99, "alpha_frac": 0.5675232367, "autogenerated": false, "ratio": 4.313679245283019, "config_...
'''basepair package''' import re from setuptools import setup with open('basepair/__init__.py', 'r') as fd: version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: raise RuntimeError('Cannot find version information') with open(...
{ "repo_name": "basepair/basepair-python", "path": "setup.py", "copies": "1", "size": "1789", "license": "mit", "hash": 2215437852493134000, "line_mean": 26.953125, "line_max": 72, "alpha_frac": 0.5919508105, "autogenerated": false, "ratio": 3.750524109014675, "config_test": false, "has_no_key...
""" Base parser definitions shared between most cli utilities. """ import argparse import logging import os import cgitb import platform import sys from .. import __version__ from ..arch.target_list import target_names, create_arch from ..build.tasks import TaskError from ..common import logformat, CompilerError from ...
{ "repo_name": "windelbouwman/ppci-mirror", "path": "ppci/cli/base.py", "copies": "1", "size": "7028", "license": "bsd-2-clause", "hash": 1817940553302684200, "line_mean": 27.8032786885, "line_max": 79, "alpha_frac": 0.6240751281, "autogenerated": false, "ratio": 3.9196876742889013, "config_test...
"""Base part of language set""" import collections import random DEFAULT_STORAGE = 'name.storage' class NamingLibException(Exception): """Basic exception class for naming""" pass class AutoMemberSetType(type): """This metaclass automatically set the arguments and change it into list""" def __call__(...
{ "repo_name": "pauis/name", "path": "basepart.py", "copies": "1", "size": "4485", "license": "mit", "hash": 1676773970155951000, "line_mean": 35.4634146341, "line_max": 80, "alpha_frac": 0.603567447, "autogenerated": false, "ratio": 4.179869524697111, "config_test": false, "has_no_keywords": ...
"""base patches for mount.""" import os import stat as _stat import __builtin__ from mlpatches import base from stashutils.mount_ctrl import get_manager from stashutils.fsi.errors import IsFile, OperationFailure # store default functions _org_listdir = os.listdir _org_open = __builtin__.open _org_chdir = os.chdir ...
{ "repo_name": "cclauss/stash", "path": "lib/mlpatches/mount_base.py", "copies": "1", "size": "11316", "license": "mit", "hash": 5925829297806803000, "line_mean": 23.2334047109, "line_max": 78, "alpha_frac": 0.673029339, "autogenerated": false, "ratio": 2.999204876755897, "config_test": false, ...
base_path = "." # Load the on-time parquet file on_time_dataframe = spark.read.parquet('data/on_time_performance.parquet') on_time_dataframe = on_time_dataframe.limit(100000) on_time_dataframe.registerTempTable("on_time_performance") # Load airport/station mappings closest_stations_path = "{}/data/airport_station_pai...
{ "repo_name": "rjurney/Agile_Data_Code_2", "path": "ch10/match_reports_with_flights.py", "copies": "2", "size": "5445", "license": "mit", "hash": -5029568648302301000, "line_mean": 29.25, "line_max": 108, "alpha_frac": 0.7175390266, "autogenerated": false, "ratio": 3.201058201058201, "config_te...
"""BasePlot for dotplot, matrixplot and stacked_violin """ import collections.abc as cabc from collections import namedtuple from typing import Optional, Union, Mapping # Special from typing import Sequence, Iterable # ABCs from typing import Tuple # Classes import numpy as np from anndata import AnnData from matpl...
{ "repo_name": "theislab/scanpy", "path": "scanpy/plotting/_baseplot_class.py", "copies": "1", "size": "38723", "license": "bsd-3-clause", "hash": 8395843625127552000, "line_mean": 35.4623352166, "line_max": 100, "alpha_frac": 0.5590992433, "autogenerated": false, "ratio": 4.019827675698121, "co...
"""Base Plotting module.""" from . import State, units from CoolProp.CoolProp import PropsSI import matplotlib.pyplot as plt import numpy as np from abc import ABC, abstractmethod from dataclasses import dataclass, field @dataclass class PlottedState: """Data class to efficiently store states in the self.states ...
{ "repo_name": "bryanwweber/thermostate", "path": "src/thermostate/plotting.py", "copies": "1", "size": "13925", "license": "bsd-3-clause", "hash": 5151594868016639000, "line_mean": 37.6805555556, "line_max": 88, "alpha_frac": 0.5392459605, "autogenerated": false, "ratio": 3.6606203995793902, "c...
BASE_PRIME = 101 def check_rotation(a1, a2): """ Check wheather a2 is a rotation of a1. """ if len(a1) != len(a2): return False double_a2 = a2 + a2 if is_subarray(a1, double_a2): return True return False def rabin_fingerprint(a): hash = 0 for index, degree in enu...
{ "repo_name": "ankeshanand/interview-prep", "path": "arrays/checkrotation.py", "copies": "1", "size": "1098", "license": "mit", "hash": -2007146484117512000, "line_mean": 20.1153846154, "line_max": 69, "alpha_frac": 0.5182149362, "autogenerated": false, "ratio": 2.8153846153846156, "config_test...
"""Base primititve classes for working with Storm.""" from __future__ import absolute_import, print_function, unicode_literals from logging import Handler from traceback import format_exc from .ipc import send_message # Support for Storm Log levels as per STORM-414 _STORM_LOG_TRACE = 0 _STORM_LOG_DEBUG = 1 _STORM_LO...
{ "repo_name": "scrapinghub/streamparse", "path": "streamparse/base.py", "copies": "1", "size": "3376", "license": "apache-2.0", "hash": -1028152954770419800, "line_mean": 35.3010752688, "line_max": 79, "alpha_frac": 0.5826421801, "autogenerated": false, "ratio": 3.9905437352245863, "config_test...
"""Base primititve classes for working with Storm.""" from __future__ import absolute_import, print_function, unicode_literals from traceback import format_exc from .ipc import send_message # Support for Storm Log levels as per STORM-414 _STORM_LOG_TRACE = 0 _STORM_LOG_DEBUG = 1 _STORM_LOG_INFO = 2 _STORM_LOG_WARN =...
{ "repo_name": "singhdev/streamparse", "path": "streamparse/base.py", "copies": "1", "size": "2522", "license": "apache-2.0", "hash": 4376232123545543700, "line_mean": 36.6417910448, "line_max": 79, "alpha_frac": 0.5900079302, "autogenerated": false, "ratio": 3.88, "config_test": false, "has_n...
"""Base primititve classes for working with Storm.""" from __future__ import absolute_import, print_function, unicode_literals import io import logging import os import signal import sys from collections import deque, namedtuple from logging.handlers import RotatingFileHandler from os.path import join from threading i...
{ "repo_name": "msmakhlouf/streamparse", "path": "streamparse/storm/component.py", "copies": "6", "size": "20083", "license": "apache-2.0", "hash": 8742119806712260000, "line_mean": 39.0858283433, "line_max": 153, "alpha_frac": 0.5695862172, "autogenerated": false, "ratio": 4.33103299547121, "co...
"""Base primititve classes for working with Storm.""" from __future__ import absolute_import, print_function, unicode_literals import logging import os import signal import sys import threading from collections import deque, namedtuple from logging.handlers import RotatingFileHandler from os.path import join from trac...
{ "repo_name": "pystorm/pystorm", "path": "pystorm/component.py", "copies": "1", "size": "21806", "license": "apache-2.0", "hash": -2726613512343016400, "line_mean": 37.9392857143, "line_max": 182, "alpha_frac": 0.5829129597, "autogenerated": false, "ratio": 4.296748768472907, "config_test": fal...
"""Base primititve classes for working with Storm.""" import traceback from ipc import send_message class Component(object): """Base class for Spouts and Bolts which contains class methods for logging messages back to the Storm worker process.""" def raise_exception(self, exception, tup=None): "...
{ "repo_name": "thedrow/streamparse", "path": "streamparse/base.py", "copies": "1", "size": "1414", "license": "apache-2.0", "hash": 4335887408162224600, "line_mean": 37.2162162162, "line_max": 79, "alpha_frac": 0.5898161245, "autogenerated": false, "ratio": 4.561290322580645, "config_test": fal...
"""Base printer objects.""" import sys from mako.lookup import TemplateLookup from ignition.dsl.flame.printing import FLAME_TEMPLATE_DIR class TemplatePrinter (object): """Abstract printer class for using a Mako Template""" def __init__ (self, template, filename=None, **kws): self.template = templa...
{ "repo_name": "IgnitionProject/ignition", "path": "ignition/dsl/flame/printing/printer.py", "copies": "1", "size": "1459", "license": "bsd-3-clause", "hash": 5300710021736480000, "line_mean": 29.3958333333, "line_max": 71, "alpha_frac": 0.6374228924, "autogenerated": false, "ratio": 4.08683473389...
# Base "Project" Class import os import sys import shutil import threading from glob import glob from datetime import datetime from optparse import OptionGroup from bit.instance import bit from bit.utils import flatten, fix_strings from bit.cprint import success, warning, error, info from bit.compiler.compiler imp...
{ "repo_name": "am0d/bit", "path": "bit/project/project.py", "copies": "1", "size": "5509", "license": "bsd-3-clause", "hash": 1453563103966693400, "line_mean": 31.4058823529, "line_max": 98, "alpha_frac": 0.5748774732, "autogenerated": false, "ratio": 4.068685376661743, "config_test": false, ...
"""Base project views used for subclassing""" from readthedocs.projects.models import Project class ProjectOnboardMixin(object): """Add project onboard context data to project object views""" def get_context_data(self, **kwargs): """Add onboard context data""" context = super(ProjectOnboard...
{ "repo_name": "atsuyim/readthedocs.org", "path": "readthedocs/projects/views/base.py", "copies": "15", "size": "1081", "license": "mit", "hash": -3116008358731676700, "line_mean": 35.0333333333, "line_max": 77, "alpha_frac": 0.6216466235, "autogenerated": false, "ratio": 4.2896825396825395, "co...
"""Base provider module for all Lexicon providers""" from abc import ABC, abstractmethod from typing import Any, Dict, List, Optional, Union from lexicon.config import ConfigResolver, legacy_config_resolver class Provider(ABC): """ This is the base class for all lexicon Providers. It provides common func...
{ "repo_name": "AnalogJ/lexicon", "path": "lexicon/providers/base.py", "copies": "1", "size": "8018", "license": "mit", "hash": 7135224814822014000, "line_mean": 32.6890756303, "line_max": 102, "alpha_frac": 0.5987777501, "autogenerated": false, "ratio": 4.182576943140323, "config_test": true, ...
"""base.py: HasProperties class and metaclass""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from collections import OrderedDict from warnings import warn from six import iteritems, itervalues, PY2, string_types, ...
{ "repo_name": "3ptscience/properties", "path": "properties/base/base.py", "copies": "1", "size": "27006", "license": "mit", "hash": 3400836130130782000, "line_mean": 40.4838709677, "line_max": 151, "alpha_frac": 0.5613567355, "autogenerated": false, "ratio": 4.799360227474676, "config_test": fa...
from git.util import LazyMixin, join_path_native, stream_copy, bin_to_hex import gitdb.typ as dbtyp import os.path as osp from .util import get_object_type_by_name _assertion_msg_format = "Created object %r whose python type %r disagrees with the acutal git object type %r" __all__ = ("Object", "IndexObject") cla...
{ "repo_name": "nvie/GitPython", "path": "git/objects/base.py", "copies": "3", "size": "6689", "license": "bsd-3-clause", "hash": 2804742438064809500, "line_mean": 35.7527472527, "line_max": 109, "alpha_frac": 0.6099566452, "autogenerated": false, "ratio": 3.9910501193317423, "config_test": fals...
from git.util import LazyMixin, join_path_native, stream_copy from util import get_object_type_by_name from gitdb.util import ( hex_to_bin, bin_to_hex, basename ) import gitdb.typ as dbtyp _assertion_msg_fo...
{ "repo_name": "jantman/GitPython", "path": "git/objects/base.py", "copies": "3", "size": "6835", "license": "bsd-3-clause", "hash": 3518175388466908000, "line_mean": 37.8352272727, "line_max": 129, "alpha_frac": 0.5901975128, "autogenerated": false, "ratio": 4.105105105105105, "config_test": fa...
from git.util import LazyMixin, join_path_native, stream_copy from util import get_object_type_by_name from gitdb.util import ( hex_to_bin, bin_to_hex, basename ) import gitdb.typ as dbtyp _assertion_msg_format = "Created object %r whose python type %r disagrees with the acutal git object ...
{ "repo_name": "OpenInkpot-archive/iplinux-python-git", "path": "lib/git/objects/base.py", "copies": "1", "size": "5904", "license": "bsd-3-clause", "hash": -3413314611856125000, "line_mean": 33.1271676301, "line_max": 120, "alpha_frac": 0.6873306233, "autogenerated": false, "ratio": 3.29464285714...
from .util import get_object_type_by_name from git.util import LazyMixin, join_path_native, stream_copy from gitdb.util import ( bin_to_hex, basename ) import gitdb.typ as dbtyp _assertion_msg_format = "Created object %r whose python type %r disagrees with the acutal git object type %r" __all__ = ("Object", ...
{ "repo_name": "h4ck3rm1k3/GitPython", "path": "git/objects/base.py", "copies": "13", "size": "6682", "license": "bsd-3-clause", "hash": -78224211454407870, "line_mean": 35.5136612022, "line_max": 109, "alpha_frac": 0.6089494163, "autogenerated": false, "ratio": 3.9797498511018463, "config_test"...
from util import get_object_type_by_name from git.util import ( hex_to_bin, bin_to_hex, dirname, basename, LazyMixin, join_path_native, stream_copy ) from git.db.interface import RepositoryPathsMixin from git.exc import UnsupportedOperation from git.typ import ...
{ "repo_name": "Conjuro/GitPython", "path": "objects/base.py", "copies": "1", "size": "6458", "license": "bsd-3-clause", "hash": -5841928869275329000, "line_mean": 32.6354166667, "line_max": 120, "alpha_frac": 0.6909259833, "autogenerated": false, "ratio": 3.337467700258398, "config_test": false...
"""base.py: OMF Project and base classes for its components""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from collections import OrderedDict import datetime import properties class UidModel(properties.HasPrope...
{ "repo_name": "GMSGDataExchange/omf", "path": "omf/base.py", "copies": "2", "size": "7100", "license": "mit", "hash": -7063638440405865000, "line_mean": 31.7188940092, "line_max": 112, "alpha_frac": 0.5852112676, "autogenerated": false, "ratio": 4.736490993995997, "config_test": false, "has_n...
""" Skeleton of an encoder. G{packagetree nano_htm} """ __docformat__ = 'epytext' # Native imports from abc import ABCMeta, abstractmethod # Third party imports import numpy as np # Program imports from util import flatten, create_unique_name ####################################################...
{ "repo_name": "tehtechguy/mHTM", "path": "dev/car_evaluation/encoder/base.py", "copies": "1", "size": "3426", "license": "mit", "hash": -1094697311741843800, "line_mean": 21.972027972, "line_max": 79, "alpha_frac": 0.6094570928, "autogenerated": false, "ratio": 3.4781725888324875, "config_test"...
"""base.py sets up BaseExample class that allows examples to be accessed as properties at the class level """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from os import makedirs, mkdir from os.path import exists, ...
{ "repo_name": "3ptscience/steno3dpy", "path": "steno3d/examples/base.py", "copies": "1", "size": "6106", "license": "mit", "hash": -8973722612648090000, "line_mean": 38.6493506494, "line_max": 79, "alpha_frac": 0.5319358009, "autogenerated": false, "ratio": 5.236706689536878, "config_test": fal...
#base python3 import hashlib import io import logging import os import random import re import sys import csv import PIL.Image import tensorflow as tf sys.path.append('../models') # from object_detection.utils import dataset_util # from object_detection.utils import label_map_util flags = tf.app.flags flags.DEFINE_...
{ "repo_name": "lbin/nexar-2", "path": "tools/analyze_data.py", "copies": "1", "size": "2970", "license": "mit", "hash": -7959215001185982000, "line_mean": 29.618556701, "line_max": 96, "alpha_frac": 0.561952862, "autogenerated": false, "ratio": 3.6576354679802954, "config_test": false, "has_n...
# base python imports from datetime import datetime import time # EventsNear.me imports from user import * from comment import * from item import * # the Event class to store an Event's info class Event: # constructor for event; takes in id and mongo instances def __init__(self, uid="42", mongo=None): ...
{ "repo_name": "astonshane/EventsNearMe", "path": "eventsnearme/event.py", "copies": "1", "size": "5980", "license": "mit", "hash": 4608963041453952000, "line_mean": 33.5664739884, "line_max": 97, "alpha_frac": 0.5590301003, "autogenerated": false, "ratio": 4.289813486370158, "config_test": fals...
"""Base quality score recalibration.""" import os import shutil from resolwe.process import ( Cmd, DataField, FileField, ListField, Process, SchedulingClass, StringField, ) class BQSR(Process): """A two pass process of BaseRecalibrator and ApplyBQSR from GATK. See GATK website fo...
{ "repo_name": "genialis/resolwe-bio", "path": "resolwe_bio/processes/reads_processing/bqsr.py", "copies": "1", "size": "8460", "license": "apache-2.0", "hash": 697625721055246300, "line_mean": 36.1052631579, "line_max": 118, "alpha_frac": 0.554964539, "autogenerated": false, "ratio": 4.1008240426...
"""Base Query Class for interacting with devices.""" class Query(object): """Base snmp query object. Args: None Returns: None Key Methods: supported: Queries the device to determine whether the MIB is supported using a known OID defined in the MIB. Returns True ...
{ "repo_name": "PalisadoesFoundation/switchmap-ng", "path": "switchmap/snmp/base_query.py", "copies": "2", "size": "1527", "license": "apache-2.0", "hash": -3816294180389135000, "line_mean": 22.859375, "line_max": 75, "alpha_frac": 0.5776031434, "autogenerated": false, "ratio": 4.517751479289941, ...
BASE_QUOTE_CHARS = '\'"' class CScanSplit: """Split a string into words using the specified separator, but respecting quotes and escape characters. Special support for / at start of line (to allow /search). Python rules for " and '. Result is: self.words: list o...
{ "repo_name": "njr0/fish", "path": "fish/cline.py", "copies": "1", "size": "4316", "license": "mit", "hash": -4916725882406979000, "line_mean": 36.8596491228, "line_max": 79, "alpha_frac": 0.4594531974, "autogenerated": false, "ratio": 4.404081632653061, "config_test": false, "has_no_keywords...
# baserate.py # # Helper code for the baserate_fallacy.ipynb notebook in the # Notebooks-Bioinformatics repo import matplotlib.pylab as pylab def p_correct_given_pos(sens, fpr, b): """Returns a simple Bayesian probability for the probability that a prediction is correct, given that the prediction was pos...
{ "repo_name": "widdowquinn/Notebooks-Bioinformatics", "path": "helpers/baserate.py", "copies": "1", "size": "2135", "license": "mit", "hash": -5372305019920307000, "line_mean": 37.8181818182, "line_max": 78, "alpha_frac": 0.5948477752, "autogenerated": false, "ratio": 3.0719424460431655, "confi...
"""Base request engine.""" __author__ = 'vovanec@gmail.com' import logging SLASH = '/' class BaseRequestEngine(object): """Base class for HTTP request engine.""" def __init__(self, api_base_url, connect_timeout, request_timeout, conn_retries, username=None, password=None, ...
{ "repo_name": "vovanec/httputil", "path": "httputil/request_engines/base.py", "copies": "1", "size": "2977", "license": "mit", "hash": -8990055861149761000, "line_mean": 31.0107526882, "line_max": 78, "alpha_frac": 0.5999328183, "autogenerated": false, "ratio": 4.24679029957204, "config_test": ...
"""Base Resource behavior.""" from __future__ import unicode_literals from future.utils import iteritems from builtins import filter as _filter from json import dumps as to_json from . import ( CB, build_request_body, build_request_include, from_iso_date ) class Base(object): """A base class to d...
{ "repo_name": "helium/helium-python", "path": "helium/resource.py", "copies": "1", "size": "15130", "license": "bsd-3-clause", "hash": 8918441991969311000, "line_mean": 32.1798245614, "line_max": 84, "alpha_frac": 0.6147389293, "autogenerated": false, "ratio": 4.803174603174603, "config_test": ...
"""Base Resource classes for Tastypie-based API""" # Significant portions of this code are based on Tastypie # (http://tastypieapi.org) # # This is mostly because I had to patch methods in the Tastypie API # to provide additional hooks or workarounds. # # Tastypie's license is as follows: # # Copyright (c) 2010, Dani...
{ "repo_name": "denverfoundation/storybase", "path": "apps/storybase/api/resources.py", "copies": "1", "size": "22939", "license": "mit", "hash": -6405795077127875000, "line_mean": 39.1031468531, "line_max": 127, "alpha_frac": 0.6352936048, "autogenerated": false, "ratio": 4.325664718084103, "co...
"""Base resource here """ import hashlib class BaseResource(object): """A resource is any `creates` or `depends` or `task` that is mentioned in a flo.yaml. A resource can be on the file system, in a database, etc. The basic functionality of an resource is to assess the state of the resource and ...
{ "repo_name": "deanmalmgren/flo", "path": "flo/resources/base.py", "copies": "1", "size": "4336", "license": "mit", "hash": -3786974753633539600, "line_mean": 35.1333333333, "line_max": 78, "alpha_frac": 0.6293819188, "autogenerated": false, "ratio": 4.465499485066942, "config_test": false, "...
BASE_RESOURCE_PATH = 'https://localhost' def req2levent(chalice_app, request): # context = { # 'api-id': None, # 'authorizer': {}, # 'http-method': request.method, # 'identity': {}, # 'request-id': None, # 'resource-id': None, # 'resource-path': BASE_RESOURCE...
{ "repo_name": "green-latte/chalice-view", "path": "chalice_view/utils.py", "copies": "1", "size": "1680", "license": "apache-2.0", "hash": 6304128144094423000, "line_mean": 29.5454545455, "line_max": 78, "alpha_frac": 0.5142857143, "autogenerated": false, "ratio": 3.8443935926773456, "config_te...
_base_ = './retinanet_r50_fpn_1x_coco.py' model = dict( backbone=dict( norm_cfg=dict(requires_grad=False), norm_eval=True, style='caffe', init_cfg=dict( type='Pretrained', checkpoint='open-mmlab://detectron2/resnet50_caffe'))) # use caffe img_norm img_norm_cfg...
{ "repo_name": "open-mmlab/mmdetection", "path": "configs/retinanet/retinanet_r50_caffe_fpn_1x_coco.py", "copies": "1", "size": "1408", "license": "apache-2.0", "hash": 3630065013992499000, "line_mean": 33.3414634146, "line_max": 72, "alpha_frac": 0.5894886364, "autogenerated": false, "ratio": 3.2...
_base_ = './retinanet_r50_fpn_1x_coco_v1.py' model = dict( backbone=dict( norm_cfg=dict(requires_grad=False), norm_eval=True, style='caffe', init_cfg=dict( type='Pretrained', checkpoint='open-mmlab://detectron/resnet50_caffe'))) # use caffe img_norm img_norm_c...
{ "repo_name": "open-mmlab/mmdetection", "path": "configs/legacy_1.x/retinanet_r50_caffe_fpn_1x_coco_v1.py", "copies": "1", "size": "1413", "license": "apache-2.0", "hash": -4136031258550463500, "line_mean": 33.4634146341, "line_max": 75, "alpha_frac": 0.5902335456, "autogenerated": false, "ratio"...
_base_ = '../retinanet/retinanet_r50_caffe_fpn_1x_coco.py' model = dict( bbox_head=dict( _delete_=True, type='GARetinaHead', num_classes=80, in_channels=256, stacked_convs=4, feat_channels=256, approx_anchor_generator=dict( type='AnchorGenerator', ...
{ "repo_name": "open-mmlab/mmdetection", "path": "configs/guided_anchoring/ga_retinanet_r50_caffe_fpn_1x_coco.py", "copies": "1", "size": "2055", "license": "apache-2.0", "hash": 124008487980498200, "line_mean": 32.1451612903, "line_max": 74, "alpha_frac": 0.496836983, "autogenerated": false, "rat...
"""Base routing service class""" import requests from cachecontrol import CacheControl from . import __version__ from . import errors def Session(): """Returns an HTTP session. """ session = requests.Session() session.headers.update({ 'User-Agent': 'rap/{0} {1}'.format(__version__, ...
{ "repo_name": "tumluliu/rap", "path": "rap/base.py", "copies": "1", "size": "1412", "license": "mit", "hash": 428641290167329540, "line_mean": 29.0425531915, "line_max": 79, "alpha_frac": 0.5708215297, "autogenerated": false, "ratio": 4.482539682539683, "config_test": false, "has_no_keywords"...
_base_ = '../rpn/rpn_r50_caffe_fpn_1x_coco.py' model = dict( rpn_head=dict( _delete_=True, type='GARPNHead', in_channels=256, feat_channels=256, approx_anchor_generator=dict( type='AnchorGenerator', octave_base_scale=8, scales_per_octave=3,...
{ "repo_name": "open-mmlab/mmdetection", "path": "configs/guided_anchoring/ga_rpn_r50_caffe_fpn_1x_coco.py", "copies": "1", "size": "2028", "license": "apache-2.0", "hash": 5354433426566968000, "line_mean": 33.9655172414, "line_max": 74, "alpha_frac": 0.4911242604, "autogenerated": false, "ratio":...
"""Base runner for applications.""" __all__ = [ # Public interface. 'LABELS', 'run', # Helpers for implementing runners. 'prepare_startup', 'do_startup', ] import argparse import inspect import contextlib import sys from startup import startup from g1.bases import labels from g1.bases.assert...
{ "repo_name": "clchiou/garage", "path": "py/g1/apps/g1/apps/bases.py", "copies": "1", "size": "3038", "license": "mit", "hash": 4609227214699835400, "line_mean": 20.8561151079, "line_max": 70, "alpha_frac": 0.6313364055, "autogenerated": false, "ratio": 3.5, "config_test": false, "has_no_keyw...
"""Base runtime interface.""" import abc import os import six from treadmill import appcfg from treadmill import exc from treadmill import utils from treadmill.appcfg import manifest as app_manifest @six.add_metaclass(abc.ABCMeta) class RuntimeBase(object): """Base class for a Treadmill runtime. :param t...
{ "repo_name": "gaocegege/treadmill", "path": "treadmill/runtime/runtime_base.py", "copies": "3", "size": "4604", "license": "apache-2.0", "hash": -7735306242349746000, "line_mean": 27.775, "line_max": 78, "alpha_frac": 0.5879669852, "autogenerated": false, "ratio": 4.270871985157699, "config_te...
"""Base runtime interface. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import abc import logging import os import shutil import six from treadmill import appcfg from treadmill import exc from treadmill impor...
{ "repo_name": "ceache/treadmill", "path": "lib/python/treadmill/runtime/runtime_base.py", "copies": "2", "size": "2854", "license": "apache-2.0", "hash": -8619783378035062000, "line_mean": 25.6728971963, "line_max": 79, "alpha_frac": 0.6240364401, "autogenerated": false, "ratio": 4.26606875934230...
"""Base schema class.""" from marshmallow import (Schema, ValidationError, fields, post_dump, post_load, pre_dump, pre_load) from backend.utils import convert class BaseSchema(Schema): """Base schema with the time and key fields and pre and post methods.""" __model__ = None tim...
{ "repo_name": "akita8/scrapper", "path": "backend/schemas/base.py", "copies": "1", "size": "1614", "license": "mit", "hash": -4786339346981571000, "line_mean": 29.4528301887, "line_max": 79, "alpha_frac": 0.5867410161, "autogenerated": false, "ratio": 4.096446700507614, "config_test": false, ...
"""Base schema. Revision ID: 000000000000 Revises: None Create Date: 2016-04-14 14:08:27.104535 """ from collections import namedtuple import logging import os.path from alembic import op import sqlalchemy as sa from sqlalchemy import text DBCreds = namedtuple("DBCreds", "user pwd") log = logging.getLogger("alem...
{ "repo_name": "mozilla/ichnaea", "path": "ichnaea/alembic/versions/000000000000_base.py", "copies": "1", "size": "1457", "license": "apache-2.0", "hash": -6843730239954234000, "line_mean": 21.4153846154, "line_max": 53, "alpha_frac": 0.6314344544, "autogenerated": false, "ratio": 3.55365853658536...
"""Base Script for Cortex XSOAR (aka Demisto) This is an empty script with some basic structure according to the code conventions. MAKE SURE YOU REVIEW/REPLACE ALL THE COMMENTS MARKED AS "TODO" Developer Documentation: https://xsoar.pan.dev/docs/welcome Code Conventions: https://xsoar.pan.dev/docs/integrations/code-...
{ "repo_name": "demisto/content", "path": "Packs/StarterPack/Scripts/BaseScript/BaseScript.py", "copies": "1", "size": "2007", "license": "mit", "hash": -8104515426071756000, "line_mean": 24.7307692308, "line_max": 76, "alpha_frac": 0.6940707524, "autogenerated": false, "ratio": 3.7867924528301886...
"""Base script for generated CLI.""" # pylint: disable=g-import-not-at-top import atexit import code import logging import os import readline import rlcompleter import sys from google.apputils import appcommands import gflags as flags from googlecloudapis.apitools.base.py import encoding from googlecloudapis.apitool...
{ "repo_name": "wemanuel/smry", "path": "smry/server-auth/ls/google-cloud-sdk/.install/.backup/lib/googlecloudapis/apitools/base/py/base_cli.py", "copies": "4", "size": "4386", "license": "apache-2.0", "hash": 3610511978457914400, "line_mean": 28.0463576159, "line_max": 75, "alpha_frac": 0.6924304606,...
"""Base script used across defined.""" import requests import paystackapi as api class Borg: """Borg class making class attributes global""" _shared_state = {} def __init__(self): self.__dict__ = self._shared_state class PayStackBase(Borg): """Base Class used across defined.""" def __init__(self, **kwargs...
{ "repo_name": "andela-sjames/paystack-python", "path": "paystackapi/base.py", "copies": "1", "size": "1960", "license": "mit", "hash": 5639299645920168000, "line_mean": 21.2727272727, "line_max": 62, "alpha_frac": 0.6714285714, "autogenerated": false, "ratio": 3.2721202003338896, "config_test":...
"""Base selection class from which all Selectors should derive. """ class AbstractSelection(object): """Base class for Selector classes. This classes provides useful functions for different selector classes and also defines the functions that all selector classes must implement. This class should...
{ "repo_name": "asherkhb/coge", "path": "bin/last_wrapper/Bio/GA/Selection/Abstract.py", "copies": "3", "size": "2084", "license": "bsd-2-clause", "hash": 1952581313077215700, "line_mean": 34.3220338983, "line_max": 77, "alpha_frac": 0.6578694818, "autogenerated": false, "ratio": 4.102362204724409...
"""Base Sensor for the Xbox Integration.""" from __future__ import annotations from yarl import URL from homeassistant.helpers.update_coordinator import CoordinatorEntity from . import PresenceData, XboxUpdateCoordinator from .const import DOMAIN class XboxBaseSensorEntity(CoordinatorEntity): """Base Sensor fo...
{ "repo_name": "home-assistant/home-assistant", "path": "homeassistant/components/xbox/base_sensor.py", "copies": "2", "size": "2643", "license": "apache-2.0", "hash": 2500491848758781000, "line_mean": 33.3246753247, "line_max": 102, "alpha_frac": 0.6201286417, "autogenerated": false, "ratio": 4.2...
"""Base Sensor for the Xbox Integration.""" from typing import Optional from homeassistant.helpers.update_coordinator import CoordinatorEntity from . import PresenceData, XboxUpdateCoordinator from .const import DOMAIN class XboxBaseSensorEntity(CoordinatorEntity): """Base Sensor for the Xbox Integration.""" ...
{ "repo_name": "balloob/home-assistant", "path": "homeassistant/components/xbox/base_sensor.py", "copies": "8", "size": "1994", "license": "apache-2.0", "hash": -2830740515188254700, "line_mean": 30.6507936508, "line_max": 93, "alpha_frac": 0.6153460381, "autogenerated": false, "ratio": 4.29741379...
"""Base Sensor for the Xbox Integration.""" from typing import Optional from yarl import URL from homeassistant.helpers.update_coordinator import CoordinatorEntity from . import PresenceData, XboxUpdateCoordinator from .const import DOMAIN class XboxBaseSensorEntity(CoordinatorEntity): """Base Sensor for the X...
{ "repo_name": "partofthething/home-assistant", "path": "homeassistant/components/xbox/base_sensor.py", "copies": "1", "size": "2596", "license": "mit", "hash": 2254788864230693600, "line_mean": 33.6133333333, "line_max": 102, "alpha_frac": 0.624422188, "autogenerated": false, "ratio": 4.214285714...
'''Base sequence classes.''' import collections import coral from coral.sequence._sequence import Sequence from coral.constants.molecular_bio import COMPLEMENTS class NucleicAcid(Sequence): '''Abstract sequence container for a single nucleic acid sequence molecule.''' def __init__(self, sequence, materia...
{ "repo_name": "klavinslab/coral", "path": "coral/sequence/_nucleicacid.py", "copies": "1", "size": "6465", "license": "mit", "hash": -3099854110524758000, "line_mean": 31.6515151515, "line_max": 78, "alpha_frac": 0.5593194122, "autogenerated": false, "ratio": 4.272967614011897, "config_test": f...
'''Base sequence classes.''' import re from coral.constants.genbank import TO_CORAL from coral.constants.molecular_bio import ALPHABETS, COMPLEMENTS class Sequence(object): '''Abstract representation of single chain of molecular sequences, e.g. a single DNA or RNA strand or Peptide.''' def __init__(se...
{ "repo_name": "klavinslab/coral", "path": "coral/sequence/_sequence.py", "copies": "1", "size": "14435", "license": "mit", "hash": -5526843243663390000, "line_mean": 30.0430107527, "line_max": 79, "alpha_frac": 0.5576723242, "autogenerated": false, "ratio": 4.165945165945166, "config_test": fal...
"""BaseServer implementation.""" import logging import traceback import gc import sys from concurrent.futures import ThreadPoolExecutor # from jsonrpc import JSONRPCResponseManager, dispatcher from werkzeug.serving import run_simple from werkzeug.wrappers import Request, Response from .utils import serialize_data ...
{ "repo_name": "connectome-ai/mls", "path": "mls/server/base.py", "copies": "1", "size": "3699", "license": "mit", "hash": 7274499865489359000, "line_mean": 30.8879310345, "line_max": 98, "alpha_frac": 0.6063801027, "autogenerated": false, "ratio": 4.321261682242991, "config_test": true, "has_...
"""Base Service class""" import base64 import json import os from cachecontrol import CacheControl import requests from .. import __version__ from mapbox import errors def Session(access_token=None, env=None): """Create an HTTP session. Parameters ---------- access_token : str Mapbox acces...
{ "repo_name": "mapbox/mapbox-sdk-py", "path": "mapbox/services/base.py", "copies": "1", "size": "4021", "license": "mit", "hash": 5414995894794354000, "line_mean": 26.9236111111, "line_max": 78, "alpha_frac": 0.5774682915, "autogenerated": false, "ratio": 4.389737991266376, "config_test": false...
"""Base service for all RESTful endpoints.""" from flask import request, jsonify, make_response from flask.views import MethodView from flask_sandboy.models import verify_fields from flask_sandboy.exception import NotFoundException class ReadService(MethodView): """Base class for all resources.""" __model__...
{ "repo_name": "jeffknupp/flask_sandboy", "path": "flask_sandboy/service.py", "copies": "1", "size": "3460", "license": "bsd-2-clause", "hash": -1336670353350276600, "line_mean": 33.2574257426, "line_max": 77, "alpha_frac": 0.6037572254, "autogenerated": false, "ratio": 4.413265306122449, "confi...
"""Base service for all RESTful endpoints.""" from flask import request, make_response from flask.views import MethodView from flask_sandboy.models import verify_fields from flask_sandboy.exception import NotFoundException from sqlalchemy import desc class ReadService(MethodView): """Base class for all resources...
{ "repo_name": "UYSio/flask_sandboy", "path": "flask_sandboy/service.py", "copies": "1", "size": "4492", "license": "bsd-2-clause", "hash": -7238950835348303000, "line_mean": 34.6507936508, "line_max": 80, "alpha_frac": 0.5601068566, "autogenerated": false, "ratio": 4.4563492063492065, "config_t...
# Base setting file, content will be imported in DjangoAutoConf # Default database name, can be override in extra_settings.settings from .django_dev_server_auto_conf import DjangoDevServerAutoConf MYSQL_DATABASE_NAME = "test" AUTHENTICATION_BACKENDS = [] DATABASE_ROUTERS = [] MEDIA_URL = "/media/" MEDIA_ROOT = "/m...
{ "repo_name": "weijia/djangoautoconf", "path": "djangoautoconf/base_settings.py", "copies": "1", "size": "1467", "license": "bsd-3-clause", "hash": 6764643618696926000, "line_mean": 31.6, "line_max": 85, "alpha_frac": 0.7702794819, "autogenerated": false, "ratio": 3.912, "config_test": false, ...
"""Base settings available to all environments.""" # Based on https://github.com/rdegges/django-skel and # https://github.com/cyberdelia/django-heroku-template. import os import sys from datetime import timedelta from django.contrib.messages import constants as messages from djcelery import setup_loader ## Path con...
{ "repo_name": "PrecisionMojo/pm-www", "path": "www/settings/base.py", "copies": "1", "size": "11622", "license": "mit", "hash": 8391756849643647000, "line_mean": 32.2057142857, "line_max": 98, "alpha_frac": 0.7066769919, "autogenerated": false, "ratio": 3.4589285714285714, "config_test": true, ...
# Base settings file import os from unipath import Path from django.core.exceptions import ImproperlyConfigured import dj_database_url PROJECT_ROOT = Path(__file__).ancestor(4) def get_env_var(varname, default=None): """Get the environment variable or raise an exception.""" try: return os.environ[...
{ "repo_name": "harnash/home_budget", "path": "web/apps/core/settings/base.py", "copies": "2", "size": "4987", "license": "mit", "hash": -7289541977981243000, "line_mean": 29.2242424242, "line_max": 79, "alpha_frac": 0.677361139, "autogenerated": false, "ratio": 3.821455938697318, "config_test":...
# Base settings file import os import sys from unipath import Path from django.core.exceptions import ImproperlyConfigured import dj_database_url PROJECT_ROOT = Path(__file__).ancestor(4) def get_env_var(varname, default=None): """Get the environment variable or raise an exception.""" try: return ...
{ "repo_name": "harnash/selene_drf", "path": "web/apps/core/settings/base.py", "copies": "1", "size": "6097", "license": "mit", "hash": -4693422712064488000, "line_mean": 29.0344827586, "line_max": 79, "alpha_frac": 0.6654092176, "autogenerated": false, "ratio": 3.7916666666666665, "config_test"...
"""Base settings file; used by manage.py. All settings can be overridden via local_settings.py""" import os from django.utils.crypto import get_random_string ALLOWED_HOSTS = [ value for key, value in os.environ.items() if key.startswith('ALLOWED_HOST') ] INSTALLED_APPS = [ 'django.contrib.contenttypes', ...
{ "repo_name": "18F/regulations-core", "path": "regcore/settings/base.py", "copies": "2", "size": "2022", "license": "cc0-1.0", "hash": 8191756651722145000, "line_mean": 20.9782608696, "line_max": 77, "alpha_frac": 0.615727003, "autogenerated": false, "ratio": 3.37, "config_test": false, "has_...
"""Base settings file; used by manage.py. All settings can be overridden via local_settings.py""" import os from django.utils.crypto import get_random_string INSTALLED_APPS = [ 'haystack', 'regcore', 'regcore_read', 'regcore_write', ] MIDDLEWARE_CLASSES = [] SECRET_KEY = os.environ.get('DJANGO_SECRE...
{ "repo_name": "willbarton/regulations-core", "path": "regcore/settings/base.py", "copies": "1", "size": "1137", "license": "cc0-1.0", "hash": 2806245504622637600, "line_mean": 19.3035714286, "line_max": 76, "alpha_frac": 0.6657871592, "autogenerated": false, "ratio": 3.0159151193633953, "config...
"""Base settings file; used by manage.py. All settings can be overridden via local_settings.py""" import os from django.utils.crypto import get_random_string INSTALLED_APPS = [ 'mptt', 'haystack', 'regcore', 'regcore_read', 'regcore_write', ] MIDDLEWARE_CLASSES = [] SECRET_KEY = os.environ.get('...
{ "repo_name": "cmc333333/regulations-core", "path": "regcore/settings/base.py", "copies": "1", "size": "1769", "license": "cc0-1.0", "hash": 9184074275752583000, "line_mean": 20.0595238095, "line_max": 77, "alpha_frac": 0.6009044658, "autogenerated": false, "ratio": 3.3314500941619585, "config_...
# Base settings for all Selvbetjening installations, overrride this with a # per. instance settings.py file. import selvbetjening import os SELV_DIRNAME = os.path.abspath(os.path.dirname(__file__)) from selvbetjening import contrib contrib.add_contrib_to_python_path() VERSION = selvbetjening.__version__ # Debuggin...
{ "repo_name": "animekita/selvbetjening", "path": "selvbetjening/settings_base.py", "copies": "1", "size": "7576", "license": "mit", "hash": 765256440623092200, "line_mean": 28.4785992218, "line_max": 81, "alpha_frac": 0.6709345301, "autogenerated": false, "ratio": 3.306852902662593, "config_tes...
"""Base settings for Facet. Development and Production inherit from this.""" import os # Directories used in these settings files SETTINGS_DIR = os.path.dirname(__file__) PROJECT_DIR = os.path.abspath(SETTINGS_DIR + "/../..") GIT_DIR = os.path.abspath(PROJECT_DIR + "/..") ############################################...
{ "repo_name": "ProjectFacet/facet", "path": "project/project/settings/base.py", "copies": "1", "size": "5675", "license": "mit", "hash": 6269669496990897000, "line_mean": 28.4041450777, "line_max": 91, "alpha_frac": 0.6158590308, "autogenerated": false, "ratio": 3.8267026298044504, "config_test...
"""Base settings linter class""" from contextlib import contextmanager class SettingsLinter: """Generic linter superclass""" def __init__(self, prefs): self.prefs = prefs self.errors = [] self.error_prefix = '*' def lint(self): """ Lint the given prefs Arg...
{ "repo_name": "aurule/npc", "path": "npc/linters/settings/settings_linter.py", "copies": "1", "size": "1742", "license": "mit", "hash": -5200294257810612000, "line_mean": 24.2463768116, "line_max": 80, "alpha_frac": 0.5752009185, "autogenerated": false, "ratio": 4.879551820728292, "config_test"...
# Base settings import json from unipath import Path from django.core.exceptions import ImproperlyConfigured # Directory calculations BASE_DIR = Path(__file__).ancestor(3) # jakubcaprnka_project/jakubcaprnka/ PROJECT_ROOT = BASE_DIR.parent WEBAPPS_ROOT = PROJECT_ROOT.ancestor(1) # Secrets Loader with open(PROJEC...
{ "repo_name": "lukasmatiasko/jakubcaprnka", "path": "jakubcaprnka/jakubcaprnka/settings/base.py", "copies": "1", "size": "2277", "license": "mit", "hash": 6267586560146450000, "line_mean": 25.1724137931, "line_max": 75, "alpha_frac": 0.6662274923, "autogenerated": false, "ratio": 3.72667757774140...
"""Base settings shared by all environments""" # Import global settings to make it easier to extend settings. from django.conf.global_settings import * # pylint: disable=W0614,W0401 #============================================================================== # Calculation of directories relative to the project mo...
{ "repo_name": "oblalex/django-workflow", "path": "src/example_project/example_project/settings/base.py", "copies": "1", "size": "4938", "license": "mit", "hash": -7669440909991404000, "line_mean": 30.253164557, "line_max": 79, "alpha_frac": 0.4959497772, "autogenerated": false, "ratio": 4.2901824...
"""Base settings shared by all environments""" import os import sys import re # Import global settings to make it easier to extend settings. from django.conf.global_settings import * # pylint: disable=W0614,W0401 # NOQA import hub as project_module PROJECT_DIR = os.path.dirname(os.path.realpath(project_module.__...
{ "repo_name": "AASHE/hub", "path": "hub/settings/base.py", "copies": "1", "size": "12807", "license": "mit", "hash": -1361552022107542000, "line_mean": 33.8016304348, "line_max": 81, "alpha_frac": 0.5991254783, "autogenerated": false, "ratio": 3.6685763391578345, "config_test": false, "has_no...
"""Base settings shared by all environments. This is a reusable basic settings file. """ from django.conf.global_settings import * import os import sys import re # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name TIME_ZONE = 'GB' USE_TZ = True US...
{ "repo_name": "seddonym/bobsleigh-seddonym", "path": "bobsleigh_seddonym/settings/base.py", "copies": "1", "size": "2877", "license": "bsd-2-clause", "hash": 2592892333381650400, "line_mean": 24.6964285714, "line_max": 87, "alpha_frac": 0.5641293014, "autogenerated": false, "ratio": 3.68846153846...
""" Base setup """ import pytest import numpy as np from pandas.util import testing as tm from pandas import DataFrame, MultiIndex @pytest.fixture def mframe(): index = MultiIndex(levels=[['foo', 'bar', 'baz', 'qux'], ['one', 'two', 'three']], ...
{ "repo_name": "jmmease/pandas", "path": "pandas/tests/groupby/common.py", "copies": "15", "size": "2100", "license": "bsd-3-clause", "hash": -2638555856661696500, "line_mean": 32.8709677419, "line_max": 79, "alpha_frac": 0.4423809524, "autogenerated": false, "ratio": 3.2507739938080493, "config...
# bases functions supporting Brie import os import subprocess import numpy as np from .sam_utils import load_samfile from .bias_utils import BiasFile, FastaFile from .tran_utils import TranUnits, TranSplice def get_count_matrix(g, g_idx, sam_files, bias_mode, ref_file, bias_file, FLmean, FLst...
{ "repo_name": "huangyh09/brie", "path": "brie/utils/run_utils.py", "copies": "1", "size": "7427", "license": "apache-2.0", "hash": -3303628658600921600, "line_mean": 35.0582524272, "line_max": 80, "alpha_frac": 0.5454423051, "autogenerated": false, "ratio": 2.905712050078247, "config_test": fal...
'''Base socket wrapper''' class SocketWrapper(object): '''Wraps a socket in another layer''' # Methods for which we the default should be to simply pass through to the # underlying socket METHODS = ( 'accept', 'bind', 'close', 'connect', 'fileno', 'getpeername', 'getsockname', 'getsock...
{ "repo_name": "dlecocq/nsq-py", "path": "nsq/sockets/base.py", "copies": "1", "size": "1634", "license": "mit", "hash": -1064687335848817300, "line_mean": 34.5217391304, "line_max": 80, "alpha_frac": 0.6022031824, "autogenerated": false, "ratio": 4.380697050938338, "config_test": false, "has_...
from SpikeRecord.Plexon.PlexClient import PlexClient from SpikeRecord.Plexon.PlexFile import PlexFile from SpikeRecord.Plexon.PlexUtil import PlexUtil class PlexSpikeData(object): # Base class handling spike records online or offline from Plexon. def __init__(self, filename=None): self.online = True ...
{ "repo_name": "chrox/RealTimeElectrophy", "path": "Experimenter/SpikeData/PlexSpikeData.py", "copies": "1", "size": "2003", "license": "bsd-2-clause", "hash": -6312892340890474000, "line_mean": 30.8095238095, "line_max": 105, "alpha_frac": 0.6010983525, "autogenerated": false, "ratio": 3.86679536...
"""Base Spout classes.""" from ipc import read_handshake, read_command, send_message, json, _stdout from base import Component class Spout(Component): """Base class for all streamparse spouts. For more information on spouts, consult Storm's `Concepts documentation <http://storm.incubator.apache.org/docum...
{ "repo_name": "thedrow/streamparse", "path": "streamparse/spout.py", "copies": "1", "size": "5439", "license": "apache-2.0", "hash": 6741504747042996000, "line_mean": 36, "line_max": 94, "alpha_frac": 0.5600294172, "autogenerated": false, "ratio": 4.513692946058091, "config_test": false, "has...
# bases.py - bitset base classes """Base classes for bitsets providing integer-like and set-like interface.""" from itertools import compress, filterfalse from . import combos from . import integers from . import meta __all__ = ['MemberBits', 'BitSet'] __new__ = int.__new__ class MemberBits(int, metaclass=meta.M...
{ "repo_name": "xflr6/bitsets", "path": "bitsets/bases.py", "copies": "1", "size": "6596", "license": "mit", "hash": 3199304145975314000, "line_mean": 31.0194174757, "line_max": 81, "alpha_frac": 0.5961188599, "autogenerated": false, "ratio": 4.140615191462649, "config_test": false, "has_no_ke...
# bases.py - bitset base classes """Base classes for bitsets providing integer-like and set-like interface.""" from itertools import compress from ._compat import long_int, get_unbound_func, map, filter, filterfalse,\ py2_bool_to_nonzero, with_metaclass from . import meta, integers, combos __all__ = ['MemberB...
{ "repo_name": "pombredanne/bitsets", "path": "bitsets/bases.py", "copies": "1", "size": "6800", "license": "mit", "hash": -4267498590484784000, "line_mean": 31.380952381, "line_max": 81, "alpha_frac": 0.5938235294, "autogenerated": false, "ratio": 4.098854731766124, "config_test": false, "has...
# bases.py - relations, comparisons, operations from ._compat import map, py2_bool_to_nonzero, with_metaclass from . import meta, tools __all__ = ['FeatureSet'] @py2_bool_to_nonzero class FeatureSet(with_metaclass(meta.FeatureSetMeta, object)): """Formal concept intent as ordered set of features. Usage: ...
{ "repo_name": "pombredanne/features", "path": "features/bases.py", "copies": "1", "size": "6415", "license": "mit", "hash": 3408456077573329400, "line_mean": 26.7705627706, "line_max": 86, "alpha_frac": 0.5820732658, "autogenerated": false, "ratio": 3.634560906515581, "config_test": false, "h...
# bases.py - relations, comparisons, operations from . import meta from . import tools __all__ = ['FeatureSet'] class FeatureSet(metaclass=meta.FeatureSetMeta): """Formal concept intent as ordered set of features. Usage: >>> from features.systems import FeatureSystem >>> fs = FeatureSystem('plura...
{ "repo_name": "xflr6/features", "path": "features/bases.py", "copies": "1", "size": "6759", "license": "mit", "hash": 431551672297326660, "line_mean": 28.3869565217, "line_max": 91, "alpha_frac": 0.59328303, "autogenerated": false, "ratio": 3.715777899945025, "config_test": false, "has_no_key...
# bases.py - to be subclassed by client code from . import meta __all__ = ['Config', 'Stacked'] class Config(metaclass=meta.ConfigMeta): """Return section by name from filename as instance.""" def __init__(self, **kwargs): self.__dict__.update(kwargs) def __str__(self): items = sorted(...
{ "repo_name": "xflr6/fileconfig", "path": "fileconfig/bases.py", "copies": "1", "size": "1490", "license": "mit", "hash": -2892986337958799400, "line_mean": 32.1111111111, "line_max": 78, "alpha_frac": 0.5248322148, "autogenerated": false, "ratio": 3.643031784841076, "config_test": false, "ha...
"""Base SQLAlchemy test case module.""" from datetime import datetime from sqlalchemy import create_engine, event, ForeignKey, orm from sqlalchemy import Column, Date, DateTime, Enum, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker, relationship from unit...
{ "repo_name": "caxiam/sqlalchemy-jsonapi-collections", "path": "tests/sqlalchemy.py", "copies": "1", "size": "4628", "license": "apache-2.0", "hash": 4518514151140763000, "line_mean": 26.0643274854, "line_max": 78, "alpha_frac": 0.6486603284, "autogenerated": false, "ratio": 4.024347826086957, ...
_base_ = 'ssd300_coco.py' input_size = 512 model = dict( neck=dict( out_channels=(512, 1024, 512, 256, 256, 256, 256), level_strides=(2, 2, 2, 2, 1), level_paddings=(1, 1, 1, 1, 1), last_kernel_size=4), bbox_head=dict( in_channels=(512, 1024, 512, 256, 256, 256, 256), ...
{ "repo_name": "open-mmlab/mmdetection", "path": "configs/ssd/ssd512_coco.py", "copies": "1", "size": "2523", "license": "apache-2.0", "hash": 4550444206036631600, "line_mean": 32.64, "line_max": 79, "alpha_frac": 0.5588585018, "autogenerated": false, "ratio": 3.13416149068323, "config_test": fa...
""" Bases shared by the different gamification components""" from six import string_types class Registry(object): """Class providing a collection of named objects. Components use which components use to register objects to indentifiers and provide smart regisration functions""" def __init__(se...
{ "repo_name": "williamhogman/operant", "path": "operant/base.py", "copies": "1", "size": "1477", "license": "bsd-2-clause", "hash": -8487861594304716000, "line_mean": 31.8222222222, "line_max": 71, "alpha_frac": 0.5822613406, "autogenerated": false, "ratio": 3.949197860962567, "config_test": fa...
"""Base storage mechanism for accessing CUDS entities, mainly datasets. This module contains the base class for implementing different access strategies for CUDS,notably MemoryStore and ProxyStore. """ import abc class ABCStateDataStore(object): """Abstract base class for all stores. """ __metaclass__ = ...
{ "repo_name": "simphony/simphony-common", "path": "simphony/cuds/store.py", "copies": "1", "size": "2796", "license": "bsd-2-clause", "hash": 1852935198281697300, "line_mean": 29.7252747253, "line_max": 73, "alpha_frac": 0.6262517883, "autogenerated": false, "ratio": 4.3015384615384615, "config...