text stringlengths 0 1.05M | meta dict |
|---|---|
"""Base class for sparse matrix formats using compressed storage."""
from __future__ import division, print_function, absolute_import
__all__ = []
from warnings import warn
import operator
import numpy as np
from scipy.lib.six import xrange, zip as izip
from .base import spmatrix, isspmatrix, SparseEfficiencyWarnin... | {
"repo_name": "ogrisel/scipy",
"path": "scipy/sparse/compressed.py",
"copies": "1",
"size": "41493",
"license": "bsd-3-clause",
"hash": 53000747978416990,
"line_mean": 36.6866485014,
"line_max": 97,
"alpha_frac": 0.5188104018,
"autogenerated": false,
"ratio": 4.163873557451079,
"config_test": f... |
"""Base class for sparse matrix formats using compressed storage."""
from __future__ import division, print_function, absolute_import
__all__ = []
from warnings import warn
import numpy as np
from scipy.lib.six import xrange
from .base import spmatrix, isspmatrix, SparseEfficiencyWarning
from .data import _data_mat... | {
"repo_name": "juliantaylor/scipy",
"path": "scipy/sparse/compressed.py",
"copies": "2",
"size": "35266",
"license": "bsd-3-clause",
"hash": -4288082600436054000,
"line_mean": 36.6773504274,
"line_max": 98,
"alpha_frac": 0.5190268247,
"autogenerated": false,
"ratio": 4.226003594967046,
"config_... |
"""Base class for sparse matrix formats using compressed storage
"""
from __future__ import division, print_function, absolute_import
__all__ = []
from warnings import warn
import numpy as np
from scipy.lib.six.moves import xrange
from .base import spmatrix, isspmatrix, SparseEfficiencyWarning
from .data import _da... | {
"repo_name": "sargas/scipy",
"path": "scipy/sparse/compressed.py",
"copies": "1",
"size": "24529",
"license": "bsd-3-clause",
"hash": 7047330226060531000,
"line_mean": 34.3953823954,
"line_max": 108,
"alpha_frac": 0.524318154,
"autogenerated": false,
"ratio": 4.17870528109029,
"config_test": f... |
"""Base class for sparse matrix formats using compressed storage
"""
__all__ = []
from warnings import warn
import numpy as np
from base import spmatrix, isspmatrix, SparseEfficiencyWarning
from data import _data_matrix
import sparsetools
from sputils import upcast, to_native, isdense, isshape, getdtype, \
... | {
"repo_name": "stefanv/scipy3",
"path": "scipy/sparse/compressed.py",
"copies": "2",
"size": "24580",
"license": "bsd-3-clause",
"hash": 4602358287716317700,
"line_mean": 33.7175141243,
"line_max": 108,
"alpha_frac": 0.5286411717,
"autogenerated": false,
"ratio": 4.139440889188279,
"config_test... |
"""Base class for spstrategy classes"""
###############################################################################
#
# Copyright (C) 2016 Bitquant Research Laboratories (Asia) Limited
#
# Licensed under the GPLv3+ License
#
###############################################################################
import sys... | {
"repo_name": "joequant/sptrader",
"path": "sptrader/spstrategy.py",
"copies": "1",
"size": "2287",
"license": "bsd-2-clause",
"hash": -6445711100190905000,
"line_mean": 26.8902439024,
"line_max": 79,
"alpha_frac": 0.5137735024,
"autogenerated": false,
"ratio": 4.047787610619469,
"config_test":... |
"""Base class for SQS utility classes."""
from __future__ import absolute_import
import logging
import boto3
import botocore
from kale import exceptions
from kale import settings
logger = logging.getLogger(__name__)
class SQSTalk(object):
"""Base class for SQS utility classes."""
_client = None
_sessi... | {
"repo_name": "Nextdoor/ndkale",
"path": "kale/sqs.py",
"copies": "1",
"size": "3325",
"license": "bsd-2-clause",
"hash": 8180917361446705000,
"line_mean": 30.6666666667,
"line_max": 88,
"alpha_frac": 0.602406015,
"autogenerated": false,
"ratio": 4.125310173697271,
"config_test": false,
"has_... |
"""Base class for SQS utility classes."""
import logging
import boto.sqs
import boto.sqs.connection
from kale import exceptions
from kale import message
from kale import settings
logger = logging.getLogger(__name__)
class SQSTalk(object):
"""Base class for SQS utility classes."""
# Class attribute for s... | {
"repo_name": "wenbinf/ndkale",
"path": "kale/sqs.py",
"copies": "1",
"size": "3104",
"license": "bsd-2-clause",
"hash": 7048218286042462000,
"line_mean": 34.2727272727,
"line_max": 79,
"alpha_frac": 0.599871134,
"autogenerated": false,
"ratio": 4.188933873144399,
"config_test": false,
"has_n... |
""" Base class for storage backends """
from typing import BinaryIO, List, Tuple, Type
from pyramid.request import Request
from pypicloud.models import Package
class IStorage(object):
"""Base class for a backend that stores package files"""
def __init__(self, request: Request):
self.request = requ... | {
"repo_name": "stevearc/pypicloud",
"path": "pypicloud/storage/base.py",
"copies": "1",
"size": "3005",
"license": "mit",
"hash": -6669503110576360000,
"line_mean": 25.3596491228,
"line_max": 79,
"alpha_frac": 0.5747088186,
"autogenerated": false,
"ratio": 4.958745874587459,
"config_test": fals... |
# Base class for storing Node informations in AST
import tree
class Node():
node_number = 0
def __init__(self, parent=None):
self.number = Node.node_number
Node.node_number += 1
self.parent = parent
self.statements = []
self.depth = 0
def addStatement(self, stateme... | {
"repo_name": "wilima/herocomp",
"path": "herocomp/tree/nodes/Node.py",
"copies": "1",
"size": "1728",
"license": "mit",
"hash": 8912903887488101000,
"line_mean": 26.4285714286,
"line_max": 68,
"alpha_frac": 0.5758101852,
"autogenerated": false,
"ratio": 4.813370473537605,
"config_test": false,... |
"""Base class for streams, handling the basics of BigBrain protocol."""
import json
import re
import msgpack
import tornado.escape
import tornado.websocket
class Stream(tornado.websocket.WebSocketHandler):
"""Websocket connection that is generated when a client connects."""
def initialize(self, db, cluster, rp... | {
"repo_name": "timblakely/bigbrain",
"path": "bigbrain/bigbrain/streams/stream.py",
"copies": "1",
"size": "3571",
"license": "apache-2.0",
"hash": 5329557938477519000,
"line_mean": 30.052173913,
"line_max": 93,
"alpha_frac": 0.6384766172,
"autogenerated": false,
"ratio": 3.811099252934899,
"co... |
"""Base class for Tables
"""
from abc import ABCMeta
from collections import OrderedDict, Mapping, Iterable
import operator
import logging
import numpy as np
from progressivis.core.index_update import IndexUpdate
from progressivis.core.utils import (integer_types, norm_slice, is_slice,
... | {
"repo_name": "jdfekete/progressivis",
"path": "progressivis/table/table_base.py",
"copies": "1",
"size": "40641",
"license": "bsd-2-clause",
"hash": -7413345530606482000,
"line_mean": 33.8550600343,
"line_max": 91,
"alpha_frac": 0.5409069659,
"autogenerated": false,
"ratio": 4.1180464079440675,
... |
"""Base class for Tado entity."""
from homeassistant.helpers.entity import Entity
from .const import DEFAULT_NAME, DOMAIN, TADO_HOME, TADO_ZONE
class TadoDeviceEntity(Entity):
"""Base implementation for Tado device."""
def __init__(self, device_info):
"""Initialize a Tado device."""
super().... | {
"repo_name": "home-assistant/home-assistant",
"path": "homeassistant/components/tado/entity.py",
"copies": "5",
"size": "2285",
"license": "apache-2.0",
"hash": 4575024524847986700,
"line_mean": 27.9240506329,
"line_max": 66,
"alpha_frac": 0.5549234136,
"autogenerated": false,
"ratio": 3.9601386... |
"""Base class for Tado entity."""
from homeassistant.helpers.entity import Entity
from .const import DEFAULT_NAME, DOMAIN, TADO_ZONE
class TadoDeviceEntity(Entity):
"""Base implementation for Tado device."""
def __init__(self, device_info):
"""Initialize a Tado device."""
super().__init__()
... | {
"repo_name": "turbokongen/home-assistant",
"path": "homeassistant/components/tado/entity.py",
"copies": "2",
"size": "1695",
"license": "apache-2.0",
"hash": 1199876033675415000,
"line_mean": 28.224137931,
"line_max": 66,
"alpha_frac": 0.5628318584,
"autogenerated": false,
"ratio": 4.00709219858... |
"""Base class for Tasks."""
import time
from oslo_log import log as logging
from asciipic.tasks import base
from asciipic.common import exception
LOG = logging.getLogger(__name__)
class Echo(base.BaseTask):
"""Base class for Tasks."""
def __init__(self, sleep=False):
"""Initialize the Echo class.
... | {
"repo_name": "micumatei/asciipic",
"path": "asciipic/tasks/echo_task.py",
"copies": "1",
"size": "1553",
"license": "mit",
"hash": -2001851547104173300,
"line_mean": 24.8833333333,
"line_max": 76,
"alpha_frac": 0.5750160979,
"autogenerated": false,
"ratio": 4.141333333333334,
"config_test": fa... |
"""Base class for Test doubles."""
# Python3 support
from __future__ import print_function
from __future__ import unicode_literals
import json
import re
import os
import sys
class BaseTestDouble(object):
"""Base class for test doubles."""
def __init__(self, *args, **kwargs):
"""Initiate object."""
... | {
"repo_name": "spotify/napalm",
"path": "napalm/base/test/double.py",
"copies": "1",
"size": "2533",
"license": "apache-2.0",
"hash": -4213855163551279000,
"line_mean": 28.8,
"line_max": 98,
"alpha_frac": 0.5767864193,
"autogenerated": false,
"ratio": 4.1592775041050905,
"config_test": true,
... |
"""Base class for the documentation builders.
All the builders should be derived from this base builder, and if necessary
reimplement its interface, defined in :class:`BaseBuilder`
Copyright (c) 2015 Francesco Montesano
MIT Licence
"""
import abc
from pathlib import Path
import shutil
import subprocess as sp
import... | {
"repo_name": "montefra/dodocs",
"path": "dodocs/mkdoc/builders/base_builder.py",
"copies": "1",
"size": "4028",
"license": "mit",
"hash": 2840490564530381300,
"line_mean": 27.9784172662,
"line_max": 79,
"alpha_frac": 0.6040218471,
"autogenerated": false,
"ratio": 4.445916114790287,
"config_tes... |
"""Base class for the generation of loaders from schema-salad definitions."""
import collections
from typing import Any, Dict, List, MutableSequence, Optional, Set, Union
from . import schema
class TypeDef: # pylint: disable=too-few-public-methods
"""Schema Salad type description."""
__slots__ = [
... | {
"repo_name": "common-workflow-language/schema_salad",
"path": "schema_salad/codegen_base.py",
"copies": "1",
"size": "4427",
"license": "apache-2.0",
"hash": 7516431687217536000,
"line_mean": 30.3971631206,
"line_max": 88,
"alpha_frac": 0.596340637,
"autogenerated": false,
"ratio": 4.15290806754... |
### Base class for the player and NPCs
import random
from objects import GameObject
import util
from ai.predicate import In, Wants, Solves
class Actor(GameObject):
def __init__(self, name, description='', location=None, *args, **kwargs):
self.map_memory = {}
GameObject.__init__(self, name=name, ... | {
"repo_name": "fish-face/agutaywusyg",
"path": "src/actor.py",
"copies": "1",
"size": "5801",
"license": "bsd-3-clause",
"hash": -1048945237485618200,
"line_mean": 33.325443787,
"line_max": 105,
"alpha_frac": 0.526460955,
"autogenerated": false,
"ratio": 3.9678522571819426,
"config_test": false... |
"""Base class for the various assembler programs."""
import sys
from shutil import which
import textwrap
import psutil
import lib.log as log
from .assemblers.abyss import AbyssAssembler
from .assemblers.spades import SpadesAssembler
from .assemblers.trinity import TrinityAssembler
from .assemblers.velvet import Velvet... | {
"repo_name": "AntonelliLab/seqcap_processor",
"path": "bin/aTRAM-master/lib/assembler.py",
"copies": "1",
"size": "4911",
"license": "mit",
"hash": 7721065916542206000,
"line_mean": 34.0785714286,
"line_max": 79,
"alpha_frac": 0.6192221543,
"autogenerated": false,
"ratio": 3.839718530101642,
"... |
"""Base class for the various assembler programs."""
import sys
import textwrap
from shutil import which
from .assemblers.abyss import AbyssAssembler
from .assemblers.none import NoneAssembler
from .assemblers.spades import SpadesAssembler
from .assemblers.trinity import TrinityAssembler
from .assemblers.velvet impor... | {
"repo_name": "juliema/aTRAM",
"path": "lib/assembler.py",
"copies": "1",
"size": "1499",
"license": "bsd-3-clause",
"hash": 3564957471907586600,
"line_mean": 33.0681818182,
"line_max": 73,
"alpha_frac": 0.7124749833,
"autogenerated": false,
"ratio": 3.7012345679012344,
"config_test": false,
... |
"""Base class for the various assembler wrappers."""
import datetime
from os.path import abspath, basename, exists, getsize, join, splitext
from subprocess import CalledProcessError, TimeoutExpired
from .. import bio, db_atram, util
class BaseAssembler: # pylint: disable=too-many-public-methods
"""A base class... | {
"repo_name": "juliema/aTRAM",
"path": "lib/assemblers/base.py",
"copies": "1",
"size": "11410",
"license": "bsd-3-clause",
"hash": -7848996429575477000,
"line_mean": 37.288590604,
"line_max": 79,
"alpha_frac": 0.5558282209,
"autogenerated": false,
"ratio": 3.986722571628232,
"config_test": fal... |
"""Base class for the various Python data-format storage type APIs
Data-type handlers are specified using OpenGL.plugins module
"""
import ctypes
from OpenGL import plugins
class FormatHandler( object ):
"""Abstract class describing the handler interface
Each data-type handler is responsible for providin... | {
"repo_name": "frederica07/Dragon_Programming_Process",
"path": "PyOpenGL-3.0.2/OpenGL/arrays/formathandler.py",
"copies": "1",
"size": "3806",
"license": "bsd-2-clause",
"hash": 5077751100423620000,
"line_mean": 40.3695652174,
"line_max": 85,
"alpha_frac": 0.6103520757,
"autogenerated": false,
"... |
# base class for tk common dialogues
#
# this module provides a base class for accessing the common
# dialogues available in Tk 4.2 and newer. use filedialog,
# colorchooser, and messagebox to access the individual
# dialogs.
#
# written by Fredrik Lundh, May 1997
#
from tkinter import *
class Dialog:
command ... | {
"repo_name": "MalloyPower/parsing-python",
"path": "front-end/testsuite-python-lib/Python-3.6.0/Lib/tkinter/commondialog.py",
"copies": "13",
"size": "1247",
"license": "mit",
"hash": -1800299986639862800,
"line_mean": 21.6727272727,
"line_max": 66,
"alpha_frac": 0.5709703288,
"autogenerated": fal... |
# base class for tk common dialogues
#
# this module provides a base class for accessing the common
# dialogues available in Tk 4.2 and newer. use tkFileDialog,
# tkColorChooser, and tkMessageBox to access the individual
# dialogs.
#
# written by Fredrik Lundh, May 1997
#
from Tkinter import *
class Dial... | {
"repo_name": "babyliynfg/cross",
"path": "tools/project-creator/Python2.6.6/Lib/lib-tk/tkCommonDialog.py",
"copies": "11",
"size": "1478",
"license": "mit",
"hash": 6359453796039877000,
"line_mean": 22.6333333333,
"line_max": 67,
"alpha_frac": 0.5541271989,
"autogenerated": false,
"ratio": 4.175... |
"""Base class for "type-aware" (sharded) document storage. This goes beyond simple subclasses
like PhylesystemProxy by introducing more business rules and differences between document types
in the store (eg, Nexson studies in Phylesystem, tree collections in TreeCollectionStore)."""
import os
try:
# noinspection P... | {
"repo_name": "OpenTreeOfLife/peyotl",
"path": "peyotl/git_storage/type_aware_doc_store.py",
"copies": "2",
"size": "17825",
"license": "bsd-2-clause",
"hash": -230002264793405600,
"line_mean": 44.822622108,
"line_max": 108,
"alpha_frac": 0.5251612903,
"autogenerated": false,
"ratio": 4.360322896... |
"""Base class for undirected dynamic graphs.
The DynGraph class allows any hashable object as a node.
Of each interaction needs be specified the set of timestamps of its presence.
Self-loops are allowed.
"""
from typing import List, Any
import networkx as nx
from collections import defaultdict
from dynetx.utils impo... | {
"repo_name": "GiulioRossetti/dynetx",
"path": "dynetx/classes/dyngraph.py",
"copies": "1",
"size": "44735",
"license": "bsd-2-clause",
"hash": 7390536497244468000,
"line_mean": 28.8830995324,
"line_max": 116,
"alpha_frac": 0.4849670281,
"autogenerated": false,
"ratio": 4.07496811805429,
"confi... |
"""Base class for undirected graphs.
The Graph class allows any hashable object as a node
and can associate key/value attribute pairs with each undirected edge.
Self-loops are allowed but multiple edges are not (see MultiGraph).
For directed graphs see DiGraph and MultiDiGraph.
"""
# Copyright (C) 2004-2011 by
# ... | {
"repo_name": "Duke-NSOE/GeoHAT",
"path": "GeoHat_V10/Scripts/networkx/classes/graph.py",
"copies": "1",
"size": "53934",
"license": "cc0-1.0",
"hash": 4742917025795247000,
"line_mean": 28.6666666667,
"line_max": 90,
"alpha_frac": 0.5109949197,
"autogenerated": false,
"ratio": 4.096460580282546,
... |
"""Base class for UniFi clients."""
import logging
from homeassistant.core import callback
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity import Entity
LOGGER = logging.getLogger(__name__... | {
"repo_name": "postlund/home-assistant",
"path": "homeassistant/components/unifi/unifi_client.py",
"copies": "1",
"size": "2222",
"license": "apache-2.0",
"hash": 4096846471366685700,
"line_mean": 33.1846153846,
"line_max": 87,
"alpha_frac": 0.6485148515,
"autogenerated": false,
"ratio": 4.192452... |
"""Base class for UniFi entities."""
import logging
from typing import Any
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.entity_registry import async_entries_for_device
_LOGGER = ... | {
"repo_name": "turbokongen/home-assistant",
"path": "homeassistant/components/unifi/unifi_entity_base.py",
"copies": "7",
"size": "4023",
"license": "apache-2.0",
"hash": 7684153973488100000,
"line_mean": 32.2479338843,
"line_max": 107,
"alpha_frac": 0.6012925677,
"autogenerated": false,
"ratio":... |
"""Base class for UniFi entities."""
import logging
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.entity_registry import async_entries_for_device
LOGGER = logging.getLogger(__name... | {
"repo_name": "pschmitt/home-assistant",
"path": "homeassistant/components/unifi/unifi_entity_base.py",
"copies": "7",
"size": "3438",
"license": "apache-2.0",
"hash": -3301314451918181000,
"line_mean": 37.2,
"line_max": 107,
"alpha_frac": 0.6471785922,
"autogenerated": false,
"ratio": 4.15217391... |
# Base class for unit tests.
import numpy as np
from typing import Union
from numbers import Real
from pytest import approx
class BaseTest:
def assertItemsAlmostEqual(self,
a: Union[list, np.array],
b: Union[list, np.array],
... | {
"repo_name": "comp-imaging/ProxImaL",
"path": "proximal/tests/base_test.py",
"copies": "1",
"size": "1189",
"license": "mit",
"hash": -2555319691089922600,
"line_mean": 26.0227272727,
"line_max": 82,
"alpha_frac": 0.5105130362,
"autogenerated": false,
"ratio": 3.8478964401294498,
"config_test"... |
"""Base class git action manager (subclasses will accommodate each type)"""
from peyotl.utility.str_util import is_str_type
from peyotl.nexson_syntax import write_as_json
from peyotl.utility import get_logger
import os
# noinspection PyUnresolvedReferences
from sh import git # pylint: disable=E0611
import shutil
impor... | {
"repo_name": "mtholder/peyotl",
"path": "peyotl/git_storage/git_action.py",
"copies": "2",
"size": "22488",
"license": "bsd-2-clause",
"hash": -7524474844550475000,
"line_mean": 39.228980322,
"line_max": 107,
"alpha_frac": 0.5316613305,
"autogenerated": false,
"ratio": 3.919818720585672,
"conf... |
# Base Class
class Host:
# Init Class Object
def __init__(self, hostname):
self.hostname = hostname
def hostname(self):
print(self.hostname)
# Base SNMP Class
class SnmpHost(Host):
# Init Class Object
def __init__(self, hostname, snmpCommunity, snmpVersion):
Host.__init__(self, hostname)
self.snmpCommuni... | {
"repo_name": "bendews/EasyInflux-Docker",
"path": "root/root/host_classes.py",
"copies": "1",
"size": "1411",
"license": "mit",
"hash": -4407551574505508400,
"line_mean": 26.1538461538,
"line_max": 70,
"alpha_frac": 0.7356484763,
"autogenerated": false,
"ratio": 3.281395348837209,
"config_test... |
"""Base class object for superclasses."""
from json import dumps, loads
from os.path import getmtime
from time import localtime, strftime, time
from pybliometrics.scopus.exception import ScopusQueryError
from pybliometrics.scopus.utils import get_content
from tqdm import tqdm
class Base:
def __init__(self, fnam... | {
"repo_name": "jkitchin/scopus",
"path": "pybliometrics/scopus/superclasses/base.py",
"copies": "1",
"size": "7101",
"license": "mit",
"hash": -371428077779429950,
"line_mean": 34.505,
"line_max": 80,
"alpha_frac": 0.5344317702,
"autogenerated": false,
"ratio": 4.427057356608479,
"config_test":... |
"""Base class of a profiler wrapper."""
import inspect
import multiprocessing
import os
import pkgutil
import sys
import zlib
def get_pkg_module_names(package_path):
"""Returns module filenames from package.
Args:
package_path: Path to Python package.
Returns:
A set of module filenames.
... | {
"repo_name": "nvdv/vprof",
"path": "vprof/base_profiler.py",
"copies": "1",
"size": "5381",
"license": "bsd-2-clause",
"hash": 4221054693750931000,
"line_mean": 30.2848837209,
"line_max": 79,
"alpha_frac": 0.6063928638,
"autogenerated": false,
"ratio": 4.213782302270948,
"config_test": false,
... |
# Base class of site movers
# All site movers inherit from this class
import os
import commands
import re
import time
from urllib import urlopen, urlencode
from urllib2 import Request, urlopen
from futil import *
from pUtil import tolog, readpar, dumpOrderedItems, getDirectAccessDic, getExtension, getSiteInformation
... | {
"repo_name": "RRCKI/pilot",
"path": "SiteMover.py",
"copies": "1",
"size": "141830",
"license": "apache-2.0",
"hash": -3267541441505423000,
"line_mean": 40.1578641904,
"line_max": 243,
"alpha_frac": 0.555919058,
"autogenerated": false,
"ratio": 3.791536343465127,
"config_test": false,
"has_n... |
"""Base class, related classes, and helpers for configurable components.
"""
# Copyright (c) 2015 University of Southampton
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restricti... | {
"repo_name": "prov-suite/interop-test-harness",
"path": "prov_interop/component.py",
"copies": "1",
"size": "6185",
"license": "mit",
"hash": 4443095105700819000,
"line_mean": 29.0242718447,
"line_max": 80,
"alpha_frac": 0.6782538399,
"autogenerated": false,
"ratio": 4.456051873198847,
"config... |
""" Base class to describe a parameter
"""
from __future__ import print_function
# from itertools import groupby
class Param(object):
def __init__(self, name="", value=None, group="", help="", units="", **kwargs):
self.name = name.lower() # keep lower case (fortran-written namelist have upper case otherw... | {
"repo_name": "perrette/pyglacier",
"path": "pyglacier/parameters.py",
"copies": "1",
"size": "4075",
"license": "mit",
"hash": 5845575868738444000,
"line_mean": 32.6776859504,
"line_max": 105,
"alpha_frac": 0.5516564417,
"autogenerated": false,
"ratio": 3.9601554907677357,
"config_test": false... |
"""Base class to load data into data warehouse"""
#pylint: disable=relative-import
#pylint: disable=too-many-function-args
#pylint: disable=too-many-arguments
import MySQLdb
from etl_framework.datastore_interfaces.sql_database_interface import SqlDatabaseInterface
class MySqlDatabase(SqlDatabaseInterface):
"""lo... | {
"repo_name": "pantheon-systems/etl-framework",
"path": "etl_framework/datastores/mysql_database.py",
"copies": "1",
"size": "1253",
"license": "mit",
"hash": -8349790753593520000,
"line_mean": 28.8333333333,
"line_max": 90,
"alpha_frac": 0.5969672785,
"autogenerated": false,
"ratio": 4.589743589... |
"""Base class to load data into data warehouse"""
#pylint: disable=relative-import
#pylint: disable=too-many-function-args
#pylint: disable=too-many-arguments
#pylint: disable=abstract-class-instantiated
#pylint: disable=attribute-defined-outside-init
import abc
from contextlib import closing
from etl_framework.datas... | {
"repo_name": "pantheon-systems/etl-framework",
"path": "etl_framework/datastore_interfaces/sql_database_interface.py",
"copies": "1",
"size": "6889",
"license": "mit",
"hash": 6700500828097417000,
"line_mean": 30.4566210046,
"line_max": 111,
"alpha_frac": 0.5459428074,
"autogenerated": false,
"r... |
"""Base class to manage a running kernel"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import absolute_import
from contextlib import contextmanager
import os
import re
import signal
import sys
import time
import warnings
try:
from queue im... | {
"repo_name": "martydill/url_shortener",
"path": "code/venv/lib/python2.7/site-packages/IPython/kernel/manager.py",
"copies": "2",
"size": "15254",
"license": "mit",
"hash": -8768030295125667000,
"line_mean": 33.5113122172,
"line_max": 83,
"alpha_frac": 0.586600236,
"autogenerated": false,
"ratio... |
"""Base class to manage a running kernel"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from contextlib import contextmanager
import asyncio
import os
import re
import signal
import sys
import time
import warnings
import zmq
from ipython_genutils.importstring... | {
"repo_name": "sserrot/champion_relationships",
"path": "venv/Lib/site-packages/jupyter_client/manager.py",
"copies": "1",
"size": "31123",
"license": "mit",
"hash": 3801998615449919500,
"line_mean": 36.6336154776,
"line_max": 114,
"alpha_frac": 0.5900780773,
"autogenerated": false,
"ratio": 4.60... |
"""Base class to manage a running kernel"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import absolute_import
from contextlib import contextmanager
import os
import re
import signal
import sys
import time
import warnings
try:
from queue im... | {
"repo_name": "bdh1011/wau",
"path": "venv/lib/python2.7/site-packages/jupyter_client/manager.py",
"copies": "1",
"size": "15015",
"license": "mit",
"hash": 3322219916773755400,
"line_mean": 33.2808219178,
"line_max": 83,
"alpha_frac": 0.5862803863,
"autogenerated": false,
"ratio": 4.547244094488... |
"""Base class to manage comms"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import sys
import logging
from traitlets.config import LoggingConfigurable
from ipython_genutils.importstring import import_item
from ipython_genutils.py3compat import string_types
f... | {
"repo_name": "Edu-Glez/Bank_sentiment_analysis",
"path": "env/lib/python3.6/site-packages/ipykernel/comm/manager.py",
"copies": "8",
"size": "4044",
"license": "apache-2.0",
"hash": 8188207566031525000,
"line_mean": 30.1076923077,
"line_max": 100,
"alpha_frac": 0.590504451,
"autogenerated": false,... |
"""Base class to manage comms"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import sys
from IPython.config import LoggingConfigurable
from IPython.core.prompts import LazyEvaluate
from IPython.core.getipython import get_ipython
from IPython.utils.importstrin... | {
"repo_name": "wolfram74/numerical_methods_iserles_notes",
"path": "venv/lib/python2.7/site-packages/IPython/kernel/comm/manager.py",
"copies": "4",
"size": "5132",
"license": "mit",
"hash": -2407312485666892300,
"line_mean": 31.6878980892,
"line_max": 100,
"alpha_frac": 0.588659392,
"autogenerated... |
"""Base class to manage comms"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import sys
from traitlets.config import LoggingConfigurable
from IPython.core.prompts import LazyEvaluate
from IPython.core.getipython import get_ipython
from ipython_genutils.import... | {
"repo_name": "bdh1011/wau",
"path": "venv/lib/python2.7/site-packages/ipykernel/comm/manager.py",
"copies": "1",
"size": "5000",
"license": "mit",
"hash": 8978284423628714000,
"line_mean": 30.847133758,
"line_max": 100,
"alpha_frac": 0.6014,
"autogenerated": false,
"ratio": 3.977724741447892,
... |
"""Base class to manage comms"""
#-----------------------------------------------------------------------------
# Copyright (C) 2013 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#------------------... | {
"repo_name": "Lightmatter/django-inlineformfield",
"path": ".tox/py27/lib/python2.7/site-packages/IPython/kernel/comm/manager.py",
"copies": "8",
"size": "6124",
"license": "mit",
"hash": -7478175731520095000,
"line_mean": 31.9247311828,
"line_max": 96,
"alpha_frac": 0.5506205095,
"autogenerated":... |
"""Base class to manage the interaction with a running kernel"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import absolute_import
from IPython.kernel.channels import major_protocol_version
from IPython.utils.py3compat import string_types, iter... | {
"repo_name": "initNirvana/Easyphotos",
"path": "env/lib/python3.4/site-packages/IPython/kernel/client.py",
"copies": "4",
"size": "14429",
"license": "mit",
"hash": -3353452029794981000,
"line_mean": 35.9974358974,
"line_max": 95,
"alpha_frac": 0.5967842539,
"autogenerated": false,
"ratio": 4.39... |
"""Base class to manage the interaction with a running kernel"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import absolute_import
from jupyter_client.channels import major_protocol_version
from ipython_genutils.py3compat import string_types, i... | {
"repo_name": "bdh1011/wau",
"path": "venv/lib/python2.7/site-packages/jupyter_client/client.py",
"copies": "1",
"size": "14665",
"license": "mit",
"hash": 7715318391051014000,
"line_mean": 36.4107142857,
"line_max": 95,
"alpha_frac": 0.5982270713,
"autogenerated": false,
"ratio": 4.3999399939994... |
"""Base class to manage the interaction with a running kernel"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from jupyter_client.channels import major_protocol_version
import zmq
from traitlets import (
Any, Instance, Type,
)
from .channelsabc import (Ch... | {
"repo_name": "sserrot/champion_relationships",
"path": "venv/Lib/site-packages/jupyter_client/client.py",
"copies": "1",
"size": "16500",
"license": "mit",
"hash": -4582914108888910300,
"line_mean": 36.0786516854,
"line_max": 95,
"alpha_frac": 0.593030303,
"autogenerated": false,
"ratio": 4.4,
... |
"""Base class to manage the interaction with a running kernel
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2013 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of t... | {
"repo_name": "marcoantoniooliveira/labweb",
"path": "oscar/lib/python2.7/site-packages/IPython/kernel/client.py",
"copies": "2",
"size": "7638",
"license": "bsd-3-clause",
"hash": 1132629741786379300,
"line_mean": 36.0776699029,
"line_max": 81,
"alpha_frac": 0.5519769573,
"autogenerated": false,
... |
"""Base class to represent datastore."""
import dateutil.parser
import dateutil.tz
from apscheduler.jobstores import sqlalchemy as sched_sqlalchemy
from sqlalchemy import select
from sqlalchemy import desc
from ndscheduler import constants
from ndscheduler import settings
from ndscheduler import utils
from ndschedul... | {
"repo_name": "DurgaChowdary/ndscheduler",
"path": "ndscheduler/core/datastore/providers/base.py",
"copies": "1",
"size": "7862",
"license": "bsd-2-clause",
"hash": -7205613361714987000,
"line_mean": 35.0642201835,
"line_max": 98,
"alpha_frac": 0.5878911219,
"autogenerated": false,
"ratio": 4.166... |
"""Base class to represent datastore."""
import dateutil.tz
import dateutil.parser
from apscheduler.jobstores import sqlalchemy as sched_sqlalchemy
from sqlalchemy import desc, select, MetaData
from ndscheduler.corescheduler import constants
from ndscheduler.corescheduler import utils
from ndscheduler.corescheduler.d... | {
"repo_name": "Nextdoor/ndscheduler",
"path": "ndscheduler/corescheduler/datastore/base.py",
"copies": "1",
"size": "8802",
"license": "bsd-2-clause",
"hash": 6880529344532521000,
"line_mean": 38.12,
"line_max": 98,
"alpha_frac": 0.5997500568,
"autogenerated": false,
"ratio": 4.095858538855282,
... |
"""Base class used by all hvac api "category" classes."""
import logging
from abc import ABCMeta, abstractproperty
from hvac.api.vault_api_base import VaultApiBase
logger = logging.getLogger(__name__)
class VaultApiCategory(VaultApiBase):
"""Base class for API categories."""
__metaclass__ = ABCMeta
def... | {
"repo_name": "ianunruh/hvac",
"path": "hvac/api/vault_api_category.py",
"copies": "1",
"size": "3612",
"license": "apache-2.0",
"hash": -3839780421294220000,
"line_mean": 36.625,
"line_max": 115,
"alpha_frac": 0.6564230343,
"autogenerated": false,
"ratio": 4.54911838790932,
"config_test": fals... |
"""Base class used for things that "play" from the config files, such as WidgetPlayer, SlidePlayer, etc."""
import abc
import asyncio
from functools import partial
from typing import List
from mpf.core.machine import MachineController
from mpf.core.mode import Mode
from mpf.core.logging import LogMixin
from mpf.except... | {
"repo_name": "missionpinball/mpf",
"path": "mpf/core/config_player.py",
"copies": "1",
"size": "15304",
"license": "mit",
"hash": 5413511890061142000,
"line_mean": 39.8106666667,
"line_max": 117,
"alpha_frac": 0.607422896,
"autogenerated": false,
"ratio": 4.534518518518518,
"config_test": true... |
# Base class. Uses a descriptor to set a value
class Descriptor:
def __init__(self, name=None, **opts):
self.name = name
self.__dict__.update(opts)
def __set__(self, instance, value):
instance.__dict__[self.name] = value
def Typed(expected_type, cls=None):
if cls is None:
r... | {
"repo_name": "tuanavu/python-cookbook-3rd",
"path": "src/8/implementing_a_data_model_or_type_system/example_clsdec.py",
"copies": "2",
"size": "3926",
"license": "mit",
"hash": 5002170730082828000,
"line_mean": 24.660130719,
"line_max": 64,
"alpha_frac": 0.5624044829,
"autogenerated": false,
"ra... |
"""Base Client containing shared functionality for all clients"""
# pylint: disable=too-few-public-methods, too-many-arguments
from functools import wraps
from uuid import UUID
import warnings
from formencode import Invalid
from launchkey.entities.service import Service, ServiceSecurityPolicy
from launchkey.entitie... | {
"repo_name": "LaunchKey/launchkey-python",
"path": "launchkey/clients/base.py",
"copies": "2",
"size": "25069",
"license": "mit",
"hash": -6214659997046401000,
"line_mean": 38.9824561404,
"line_max": 79,
"alpha_frac": 0.6029358969,
"autogenerated": false,
"ratio": 4.478206502322258,
"config_te... |
from urllib.parse import urlparse
import urllib.request, urllib.parse, urllib.error
import http.client as http
import json
from .SdsError import SdsError
import requests
import time
class BaseClient(object):
"""Handles communication with Sds Service"""
def __init__(self, apiversion, tenant, url, clientId... | {
"repo_name": "osisoft/Qi-Samples",
"path": "ocs_samples/library_samples/Python3/ocs_sample_library_preview/BaseClient.py",
"copies": "1",
"size": "2968",
"license": "apache-2.0",
"hash": -2289636551062739700,
"line_mean": 29.9166666667,
"line_max": 103,
"alpha_frac": 0.6148921833,
"autogenerated":... |
""" Base client/server controller for testing.
Copyright (c) 2014 Kenn Takara
See LICENSE for details
"""
import logging
from fixtest.base.asserts import *
from fixtest.base.controller import TestCaseController
from fixtest.fix.constants import FIX
from fixtest.fix.messages import logon_message, logout_mess... | {
"repo_name": "kennt/fixtest",
"path": "simple/simple_base.py",
"copies": "1",
"size": "4643",
"license": "mit",
"hash": -6088101053265244000,
"line_mean": 33.9097744361,
"line_max": 77,
"alpha_frac": 0.6000430756,
"autogenerated": false,
"ratio": 4.160394265232975,
"config_test": true,
"has_... |
"""Base client to extend to create search clients for endpoints of the GiantBomb API."""
from typing import Any, Dict, List, Optional, Union
from requests import get, Response as RequestsResponse
from pybomb.clients.base.client import Client
from pybomb.response import Response
class SearchClient(Client):
"""Ba... | {
"repo_name": "steveYeah/PyBomb",
"path": "src/pybomb/clients/base/search_client.py",
"copies": "1",
"size": "4888",
"license": "mit",
"hash": 4849453521677872000,
"line_mean": 33.9142857143,
"line_max": 88,
"alpha_frac": 0.6084288052,
"autogenerated": false,
"ratio": 4.427536231884058,
"config... |
"""Base client used by fetch and search clients."""
from abc import ABC, abstractmethod
from typing import Dict, List, NamedTuple, Union
import pkg_resources
from requests import Response as RequestsResponse
from requests.exceptions import HTTPError
from pybomb.exceptions import (
BadRequestException,
Invalid... | {
"repo_name": "steveYeah/PyBomb",
"path": "src/pybomb/clients/base/client.py",
"copies": "1",
"size": "5301",
"license": "mit",
"hash": -5083492158057027000,
"line_mean": 31.5214723926,
"line_max": 89,
"alpha_frac": 0.6136578004,
"autogenerated": false,
"ratio": 4.4961832061068705,
"config_test... |
base_cnf="""[req]
distinguished_name = req_distinguished_name
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
C = US
ST = {state}
L = {city}
O = {org}
CN = {skill}
[v3_req]
keyUsage = keyEncipherment, dataEncipherment
extendedKeyUsage = serverAuth
subjectAltName = @subject_alternate_names
[subject_alte... | {
"repo_name": "anjishnu/ask-alexa-twitter",
"path": "scripts/create_ssl_cnf.py",
"copies": "1",
"size": "1084",
"license": "mit",
"hash": 9068362595266352000,
"line_mean": 29.1111111111,
"line_max": 101,
"alpha_frac": 0.6540590406,
"autogenerated": false,
"ratio": 3.345679012345679,
"config_tes... |
# Base code for calculating the fractal dimension of a digital image.
# Thesis
# Michael C. Murphy
# Code started: November, 2016
import sys
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
from math import log
from statistics import variance
import time
from random import randint
fr... | {
"repo_name": "mcm7f/thesis",
"path": "bca.py",
"copies": "1",
"size": "19434",
"license": "mit",
"hash": 1464553232292846300,
"line_mean": 30.651465798,
"line_max": 126,
"alpha_frac": 0.5609241535,
"autogenerated": false,
"ratio": 3.328309642061997,
"config_test": true,
"has_no_keywords": fa... |
""" Base code for dataset conversion and management
This code contains:
- core functions
- asserting definitions to ensure dataset's integrity
TODO
----
#TODO: find the best way to define the global path
#TODO: check tests
#TODO: think if it should be a class in this manner 'dataset_name' etc..
... | {
"repo_name": "massich/oct_image_classif",
"path": "src/data_loading/base.py",
"copies": "2",
"size": "3405",
"license": "mit",
"hash": -4938038251859202000,
"line_mean": 25.3953488372,
"line_max": 87,
"alpha_frac": 0.6475770925,
"autogenerated": false,
"ratio": 3.864926220204313,
"config_test"... |
#Base Code of project written in Python 3
import binascii
import re
import random
import dnaEncoder as de
BIGCOUNT = 0
div = 0
effcount = 0
while (BIGCOUNT < 10):
n = 2
#Uses DNAEncoder class to slim down encoding process in efficiency test
randString = de.DNAEncoder()
randString.normalize('The quic... | {
"repo_name": "koolventure/replicator",
"path": "base-code.py",
"copies": "1",
"size": "4514",
"license": "mit",
"hash": 5569358802781943000,
"line_mean": 27.3899371069,
"line_max": 340,
"alpha_frac": 0.5141781125,
"autogenerated": false,
"ratio": 3.7774058577405856,
"config_test": false,
"ha... |
#Base code was written by Jonas Busk - Modified to suit project by Jacob Jon Hansen
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from tensorflow.python.ops.nn import relu, softmax
import gym
import pickle
from sklearn.preprocessing import normalize
import sys
import os
sys.path.append('..... | {
"repo_name": "jakejhansen/minesweeper_solver",
"path": "policy_gradients/train_condensed_6x6_v4.py",
"copies": "1",
"size": "10918",
"license": "mit",
"hash": 1797278810746531600,
"line_mean": 37.8540925267,
"line_max": 172,
"alpha_frac": 0.5935152958,
"autogenerated": false,
"ratio": 3.41294154... |
#Base code was written by Jonas Busk - Modified to suit project by Jacob Jon Hansen
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from tensorflow.python.ops.nn import relu, softmax
import gym
import pickle
from sklearn.preprocessing import normalize
import sys
import os
sys.path.append('.... | {
"repo_name": "jakejhansen/minesweeper_solver",
"path": "policy_gradients/train_full_6x6_CNN.py",
"copies": "1",
"size": "10221",
"license": "mit",
"hash": -2665419710758277600,
"line_mean": 34.9894366197,
"line_max": 167,
"alpha_frac": 0.6000391351,
"autogenerated": false,
"ratio": 3.47653061224... |
"""Base collectors for SonarQube."""
from abc import ABC
from base_collectors import SourceCollector, SourceCollectorException
from collector_utilities.type import URL
from source_model import Entities, SourceMeasurement, SourceResponses
class SonarQubeCollector(SourceCollector, ABC): # skipcq: PYL-W0223
"""Ba... | {
"repo_name": "ICTU/quality-time",
"path": "components/collector/src/source_collectors/sonarqube/base.py",
"copies": "1",
"size": "4218",
"license": "apache-2.0",
"hash": -7228063783446860000,
"line_mean": 45.3516483516,
"line_max": 120,
"alpha_frac": 0.6545756283,
"autogenerated": false,
"ratio"... |
"""Base Command class, and related routines"""
from __future__ import absolute_import
import logging
import logging.config
import optparse
import os
import sys
import warnings
from pip._internal import cmdoptions
from pip._internal.baseparser import (
ConfigOptionParser, UpdatingDefaultsHelpFormatter,
)
from pip.... | {
"repo_name": "zvezdan/pip",
"path": "src/pip/_internal/basecommand.py",
"copies": "1",
"size": "13632",
"license": "mit",
"hash": 7793820517391105000,
"line_mean": 35.5469168901,
"line_max": 79,
"alpha_frac": 0.5492224178,
"autogenerated": false,
"ratio": 4.59919028340081,
"config_test": true,... |
"""Base Command class, and related routines"""
from __future__ import absolute_import
import logging
import logging.config
import optparse
import os
import sys
from pip._internal.cli import cmdoptions
from pip._internal.cli.parser import (
ConfigOptionParser, UpdatingDefaultsHelpFormatter,
)
from pip._internal.cl... | {
"repo_name": "techtonik/pip",
"path": "src/pip/_internal/cli/base_command.py",
"copies": "1",
"size": "9814",
"license": "mit",
"hash": 7761925965704342000,
"line_mean": 34.5579710145,
"line_max": 77,
"alpha_frac": 0.5861014877,
"autogenerated": false,
"ratio": 4.508038585209003,
"config_test"... |
"""Base Command class, and related routines"""
from __future__ import absolute_import
import logging
import logging.config
import optparse
import os
import sys
from pip._internal import cmdoptions
from pip._internal.baseparser import (
ConfigOptionParser, UpdatingDefaultsHelpFormatter,
)
from pip._internal.downlo... | {
"repo_name": "astaninger/speakout",
"path": "venv/lib/python3.6/site-packages/pip/_internal/basecommand.py",
"copies": "8",
"size": "9780",
"license": "mit",
"hash": 5213880332357885000,
"line_mean": 34.6934306569,
"line_max": 77,
"alpha_frac": 0.586809816,
"autogenerated": false,
"ratio": 4.542... |
"""Base Command class, and related routines"""
from __future__ import absolute_import
import logging
import logging.config
import os
import sys
import optparse
import warnings
from pip import cmdoptions
from pip.index import PackageFinder
from pip.locations import running_under_virtualenv
from pip.download import Pip... | {
"repo_name": "fiber-space/pip",
"path": "pip/basecommand.py",
"copies": "1",
"size": "11734",
"license": "mit",
"hash": 863027797791540200,
"line_mean": 34.2372372372,
"line_max": 79,
"alpha_frac": 0.5290608488,
"autogenerated": false,
"ratio": 4.840759075907591,
"config_test": true,
"has_no... |
"""Base Command class, and related routines"""
from __future__ import absolute_import
import logging
import os
import sys
import optparse
import warnings
from pip import cmdoptions
from pip.index import PackageFinder
from pip.locations import running_under_virtualenv
from pip.download import PipSession
from pip.excep... | {
"repo_name": "sigmavirus24/pip",
"path": "pip/basecommand.py",
"copies": "2",
"size": "11837",
"license": "mit",
"hash": -9196472186639420000,
"line_mean": 34.3343283582,
"line_max": 79,
"alpha_frac": 0.5288502154,
"autogenerated": false,
"ratio": 4.841308793456033,
"config_test": false,
"ha... |
"""Base Command class, and related routines"""
from __future__ import absolute_import
import logging
import os
import sys
import optparse
import warnings
from pip import cmdoptions
from pip.locations import running_under_virtualenv
from pip.download import PipSession
from pip.exceptions import (BadCommand, Installati... | {
"repo_name": "AkhilHector/Rex.Inc",
"path": ".env/lib/python2.7/site-packages/pip/basecommand.py",
"copies": "181",
"size": "10617",
"license": "mit",
"hash": 2926822446850365400,
"line_mean": 33.8098360656,
"line_max": 79,
"alpha_frac": 0.5170952246,
"autogenerated": false,
"ratio": 4.854595336... |
"""Base Command class, and related routines"""
from __future__ import absolute_import
import logging
import os
import sys
import optparse
from pip import cmdoptions
from pip.index import PackageFinder
from pip.locations import running_under_virtualenv
from pip.download import PipSession
from pip.exceptions import (Ba... | {
"repo_name": "James-Firth/pip",
"path": "pip/basecommand.py",
"copies": "2",
"size": "10890",
"license": "mit",
"hash": -3676659059968279000,
"line_mean": 33.7923322684,
"line_max": 79,
"alpha_frac": 0.5239669421,
"autogenerated": false,
"ratio": 4.799471132657558,
"config_test": false,
"has... |
"""Base Command class, and related routines"""
from __future__ import absolute_import
import logging
import os
import sys
import optparse
from pip import cmdoptions
from pip.locations import running_under_virtualenv
from pip.download import PipSession
from pip.exceptions import (BadCommand, InstallationError, Uninsta... | {
"repo_name": "yati-sagade/pip",
"path": "pip/basecommand.py",
"copies": "9",
"size": "10139",
"license": "mit",
"hash": -2709279500259230000,
"line_mean": 33.7226027397,
"line_max": 79,
"alpha_frac": 0.5179998027,
"autogenerated": false,
"ratio": 4.832697807435653,
"config_test": false,
"has... |
"""Base Command class, and related routines"""
from __future__ import absolute_import
import logging
import os
import sys
import traceback
import optparse
import warnings
from pip._vendor.six import StringIO
from pip import cmdoptions
from pip.locations import running_under_virtualenv
from pip.download import PipSes... | {
"repo_name": "beblount/Steer-Clear-Backend-Web",
"path": "env/Lib/site-packages/pip/basecommand.py",
"copies": "53",
"size": "10837",
"license": "mit",
"hash": 3710759862584939000,
"line_mean": 33.2943037975,
"line_max": 79,
"alpha_frac": 0.5215465535,
"autogenerated": false,
"ratio": 4.77821869... |
"""Base Command class, and related routines"""
from __future__ import absolute_import, print_function
import logging
import logging.config
import optparse
import os
import platform
import sys
import traceback
from pip._internal.cli import cmdoptions
from pip._internal.cli.cmdoptions import make_search_scope
from pip.... | {
"repo_name": "xyuanmu/XX-Net",
"path": "python3.8.2/Lib/site-packages/pip/_internal/cli/base_command.py",
"copies": "9",
"size": "13029",
"license": "bsd-2-clause",
"hash": -2509429843897167000,
"line_mean": 36.6560693642,
"line_max": 101,
"alpha_frac": 0.5799370635,
"autogenerated": false,
"rat... |
"""Base Command class, and related routines"""
from __future__ import absolute_import, print_function
import logging
import logging.config
import optparse
import os
import platform
import sys
import traceback
from pipenv.patched.notpip._internal.cli import cmdoptions
from pipenv.patched.notpip._internal.cli.command_... | {
"repo_name": "kennethreitz/pipenv",
"path": "pipenv/patched/notpip/_internal/cli/base_command.py",
"copies": "1",
"size": "8164",
"license": "mit",
"hash": 2617687673533367300,
"line_mean": 35.1238938053,
"line_max": 101,
"alpha_frac": 0.602278295,
"autogenerated": false,
"ratio": 4.410588870880... |
"""Base Command class, and related routines"""
import logging
import logging.config
import optparse
import os
import sys
import traceback
from optparse import Values
from typing import Any, List, Optional, Tuple
from pip._internal.cli import cmdoptions
from pip._internal.cli.command_context import CommandContextMixIn... | {
"repo_name": "pfmoore/pip",
"path": "src/pip/_internal/cli/base_command.py",
"copies": "4",
"size": "7622",
"license": "mit",
"hash": 689089413441111900,
"line_mean": 34.6168224299,
"line_max": 86,
"alpha_frac": 0.6067961165,
"autogenerated": false,
"ratio": 4.534205829863176,
"config_test": f... |
"""Base Command class, and related routines"""
import logging
import logging.config
import optparse
import os
import sys
import traceback
from pip._internal.cli import cmdoptions
from pip._internal.cli.command_context import CommandContextMixIn
from pip._internal.cli.parser import ConfigOptionParser, UpdatingDefaults... | {
"repo_name": "nataddrho/DigiCue-USB",
"path": "Python3/src/venv/Lib/site-packages/pip/_internal/cli/base_command.py",
"copies": "1",
"size": "7901",
"license": "mit",
"hash": -171341636553799460,
"line_mean": 33.9601769912,
"line_max": 86,
"alpha_frac": 0.5990380964,
"autogenerated": false,
"rat... |
"""Base Command class, and related routines"""
import os
from pkgutil import walk_packages
import socket
import sys
import tempfile
import traceback
import time
import optparse
from pip.log import logger
from pip.download import urlopen
from pip.exceptions import (BadCommand, InstallationError, UninstallationError,
... | {
"repo_name": "radiosilence/pip",
"path": "pip/basecommand.py",
"copies": "1",
"size": "6815",
"license": "mit",
"hash": 2997705011115811300,
"line_mean": 32.7376237624,
"line_max": 92,
"alpha_frac": 0.5900220103,
"autogenerated": false,
"ratio": 4.107896323086196,
"config_test": false,
"has_... |
"""Base Command class, and related routines"""
import os
from pkgutil import walk_packages
import socket
import sys
import tempfile
import traceback
import time
from pip import commands
from pip.log import logger
from pip.baseparser import parser, ConfigOptionParser, UpdatingDefaultsHelpFormatter
from pip.download im... | {
"repo_name": "ericholscher/pip-1",
"path": "pip/basecommand.py",
"copies": "1",
"size": "6443",
"license": "mit",
"hash": 7128712829914032000,
"line_mean": 31.0547263682,
"line_max": 92,
"alpha_frac": 0.5845103213,
"autogenerated": false,
"ratio": 4.088197969543147,
"config_test": false,
"ha... |
"""Base Command class, and related routines"""
import os
from pkgutil import walk_packages
import socket
import sys
import traceback
import time
from pip import commands
from pip.log import logger
from pip.baseparser import parser, ConfigOptionParser, UpdatingDefaultsHelpFormatter
from pip.download import urlopen
fro... | {
"repo_name": "domenkozar/pip",
"path": "pip/basecommand.py",
"copies": "1",
"size": "6401",
"license": "mit",
"hash": -970879220835133800,
"line_mean": 31.1658291457,
"line_max": 92,
"alpha_frac": 0.5825652242,
"autogenerated": false,
"ratio": 4.084875558391832,
"config_test": false,
"has_no... |
"""Base Command class, and related routines"""
import os
import socket
import sys
import tempfile
import traceback
import time
import optparse
from pip.log import logger
from pip.download import urlopen
from pip.exceptions import (BadCommand, InstallationError, UninstallationError,
Command... | {
"repo_name": "PulsePod/evepod",
"path": "lib/python2.7/site-packages/pip/basecommand.py",
"copies": "79",
"size": "7011",
"license": "apache-2.0",
"hash": 1243085112708096300,
"line_mean": 32.8695652174,
"line_max": 92,
"alpha_frac": 0.5873627157,
"autogenerated": false,
"ratio": 4.1096131301289... |
"""Base Command class, and related routines"""
import os
import socket
import sys
import traceback
import time
from pip import commands
from pip.log import logger
from pip.baseparser import parser, ConfigOptionParser, UpdatingDefaultsHelpFormatter
from pip.download import urlopen
from pip.exceptions import (BadComman... | {
"repo_name": "VagrantApe/flaskMicroblog",
"path": "venv/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py",
"copies": "60",
"size": "6183",
"license": "bsd-3-clause",
"hash": -8396984799906378000,
"line_mean": 31.0362694301,
"line_max": 92,
"alpha_frac": 0.585476306,
"autogenerated"... |
"""Base Command class, and related routines"""
import os
import sys
import tempfile
import traceback
import time
import optparse
from pip import cmdoptions
from pip.locations import running_under_virtualenv
from pip.log import logger
from pip.download import PipSession
from pip.exceptions import (BadCommand, Installa... | {
"repo_name": "blueyed/pip",
"path": "pip/basecommand.py",
"copies": "1",
"size": "6754",
"license": "mit",
"hash": 8516412124401310000,
"line_mean": 31.1619047619,
"line_max": 79,
"alpha_frac": 0.5830618893,
"autogenerated": false,
"ratio": 4.184634448574969,
"config_test": false,
"has_no_ke... |
"""Base Command class, and related routines"""
import os
import sys
import tempfile
import traceback
import time
import optparse
from pip import cmdoptions
from pip.log import logger
from pip.download import PipSession
from pip.exceptions import (BadCommand, InstallationError, UninstallationError,
... | {
"repo_name": "alquerci/pip",
"path": "pip/basecommand.py",
"copies": "2",
"size": "6530",
"license": "mit",
"hash": 6999995577878743000,
"line_mean": 31.65,
"line_max": 86,
"alpha_frac": 0.5777947933,
"autogenerated": false,
"ratio": 4.1198738170347005,
"config_test": false,
"has_no_keywords... |
"""Base Command class, and related routines"""
import sys
import os
import socket
import urllib2
import urllib
from cStringIO import StringIO
import traceback
import time
from pip.log import logger
from pip.baseparser import parser, ConfigOptionParser, UpdatingDefaultsHelpFormatter
from pip.exceptions import BadComman... | {
"repo_name": "kevinr/750book-web",
"path": "750book-web-env/lib/python2.7/site-packages/pip-0.7.2-py2.7.egg/pip/basecommand.py",
"copies": "3",
"size": "8182",
"license": "mit",
"hash": -3038922147179059700,
"line_mean": 36.0226244344,
"line_max": 92,
"alpha_frac": 0.5813981912,
"autogenerated": f... |
"""Base Command class, and related routines"""
import os
import socket
import sys
import traceback
import time
from pip import commands
from pip.log import logger
from pip.baseparser import parser, ConfigOptionParser, UpdatingDefaultsHelpFormatter
from pip.download import urlopen
from pip.exceptions impor... | {
"repo_name": "diego-d5000/MisValesMd",
"path": "env/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py",
"copies": "1",
"size": "6376",
"license": "mit",
"hash": -7638012546696991000,
"line_mean": 31.0362694301,
"line_max": 92,
"alpha_frac": 0.5677540778,
"autogenerated": false,
"r... |
"""Base command for grow."""
import os
import click
from grow.common import config
from grow.deployments.destinations import local as local_destination
HELP_TEXT = ('Grow is a declarative file-based website generator. Read docs at '
'https://grow.io. This is version {}.'.format(config.VERSION))
# pylint... | {
"repo_name": "grow/pygrow",
"path": "grow/commands/group.py",
"copies": "1",
"size": "2373",
"license": "mit",
"hash": 5844829713709849000,
"line_mean": 41.375,
"line_max": 83,
"alpha_frac": 0.6670880742,
"autogenerated": false,
"ratio": 4.07032590051458,
"config_test": false,
"has_no_keywor... |
"""Base command for grow."""
import os
import click
from grow.sdk import sdk_utils
from grow.deployments.destinations import local as local_destination
HELP_TEXT = ('Grow is a declarative file-based website generator. Read docs at '
'https://grow.io. This is version {}.'.format(sdk_utils.VERSION))
# pyl... | {
"repo_name": "grow/grow",
"path": "grow/commands/group.py",
"copies": "1",
"size": "2379",
"license": "mit",
"hash": -8648066911699329000,
"line_mean": 41.4821428571,
"line_max": 83,
"alpha_frac": 0.6666666667,
"autogenerated": false,
"ratio": 4.039049235993208,
"config_test": false,
"has_no... |
"""Base command for search-related management commands."""
from __future__ import annotations
import argparse
import builtins
import logging
from typing import Any, Optional, Union
from django.core.management.base import BaseCommand
from elasticsearch.exceptions import TransportError
CommandReturnType = Optional[Uni... | {
"repo_name": "yunojuno/elasticsearch-django",
"path": "elasticsearch_django/management/commands/__init__.py",
"copies": "1",
"size": "2465",
"license": "mit",
"hash": -5695971818575269000,
"line_mean": 35.7910447761,
"line_max": 86,
"alpha_frac": 0.5655172414,
"autogenerated": false,
"ratio": 4.... |
# Base Compiler Class
import os
import sys
import threading
import subprocess
from bit.instance import bit
from bit.database import Database
from bit.utils import which, flatten, hash
from bit.cprint import command, error
class Compiler(object):
def __init__(self, project_name):
self.project_name = pro... | {
"repo_name": "am0d/bit",
"path": "bit/compiler/compiler.py",
"copies": "1",
"size": "3619",
"license": "bsd-3-clause",
"hash": -4426005794292850700,
"line_mean": 30.1982758621,
"line_max": 92,
"alpha_frac": 0.5888366952,
"autogenerated": false,
"ratio": 3.9209100758396533,
"config_test": false... |
"""Base Compiler class used by all codecs.
"""
import binascii
import sys
from operator import attrgetter
import bitstruct
from copy import copy
from copy import deepcopy
from ..errors import CompileError
from ..parser import EXTENSION_MARKER
def flatten(dlist):
flist = []
for item in dlist:
if is... | {
"repo_name": "eerimoq/asn1tools",
"path": "asn1tools/codecs/compiler.py",
"copies": "1",
"size": "41015",
"license": "mit",
"hash": -6904867825389576000,
"line_mean": 33.408557047,
"line_max": 86,
"alpha_frac": 0.5040351091,
"autogenerated": false,
"ratio": 4.866516373991457,
"config_test": fa... |
""" Base compound class for generating different compounds """
import os
import sys
import inspect
# Add extra libraries' directories to import list
baseLibDir = os.path.join(os.path.realpath(os.path.dirname(
inspect.getfile(inspect.currentframe()))), '..')
sys.path.append(baseLibDir)
# Import own librar... | {
"repo_name": "nelsyeung/half-metals-analysis",
"path": "lib/compounds/compound.py",
"copies": "1",
"size": "8691",
"license": "mit",
"hash": -4922234100652478000,
"line_mean": 36.7869565217,
"line_max": 78,
"alpha_frac": 0.4602462317,
"autogenerated": false,
"ratio": 4.040446304044631,
"config... |
"""Base config factories.
Authors:
* Min RK
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2010-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this softwar... | {
"repo_name": "martydill/url_shortener",
"path": "code/venv/lib/python2.7/site-packages/IPython/parallel/factory.py",
"copies": "5",
"size": "2859",
"license": "mit",
"hash": 447574740043432300,
"line_mean": 38.1643835616,
"line_max": 84,
"alpha_frac": 0.5225603358,
"autogenerated": false,
"ratio... |
""" base.config unit tests
Copyright (c) 2014 Kenn Takara
See LICENSE for details
"""
import os
import unittest
from fixtest.base.config import FileConfig, DictConfig
class TestConfig(unittest.TestCase):
# pylint: disable=missing-docstring
def setUp(self):
self.config = DictConfig({
... | {
"repo_name": "kennt/fixtest",
"path": "fixtest/tests/base_config_test.py",
"copies": "1",
"size": "2930",
"license": "mit",
"hash": 4298592732271171000,
"line_mean": 31.5555555556,
"line_max": 77,
"alpha_frac": 0.5276450512,
"autogenerated": false,
"ratio": 4.296187683284457,
"config_test": tr... |
"""Base configuration for Raven logins
"""
import calendar, time
import ast
import hashlib
import urllib
from OpenSSL.crypto import FILETYPE_PEM, load_certificate, verify
from django.core.urlresolvers import reverse
from pyroven.utils import decode_sig, setting, parse_time
class MalformedResponseError(Exception):
... | {
"repo_name": "leifdenby/django-pyroven",
"path": "pyroven/__init__.py",
"copies": "1",
"size": "8759",
"license": "mit",
"hash": 6434224503524122000,
"line_mean": 40.5118483412,
"line_max": 104,
"alpha_frac": 0.5617079575,
"autogenerated": false,
"ratio": 4.7994520547945205,
"config_test": fal... |
"""Base configuration for Raven logins
"""
import time
import urllib
from OpenSSL.crypto import FILETYPE_PEM, load_certificate, verify
from pyroven.utils import decode_sig, setting, parse_time
class MalformedResponseError(Exception):
"""Raised if a response from the raven server is malformed."""
pass
clas... | {
"repo_name": "pyroven/django-pyroven",
"path": "pyroven/__init__.py",
"copies": "1",
"size": "8533",
"license": "mit",
"hash": 3787928757069605400,
"line_mean": 37.7863636364,
"line_max": 79,
"alpha_frac": 0.5564279855,
"autogenerated": false,
"ratio": 4.807323943661972,
"config_test": false,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.