text
stringlengths
0
1.05M
meta
dict
from functools import partial from graphql.utilities import build_schema from graphql.validation.rules.unique_type_names import UniqueTypeNamesRule from .harness import assert_sdl_validation_errors assert_errors = partial(assert_sdl_validation_errors, UniqueTypeNamesRule) assert_valid = partial(assert_errors, error...
{ "repo_name": "graphql-python/graphql-core", "path": "tests/validation/test_unique_type_names.py", "copies": "1", "size": "4349", "license": "mit", "hash": -4395797047899268600, "line_mean": 29.2013888889, "line_max": 74, "alpha_frac": 0.4200965739, "autogenerated": false, "ratio": 5.068764568764...
from functools import partial from graphql.validation import VariablesInAllowedPositionRule from .harness import assert_validation_errors assert_errors = partial(assert_validation_errors, VariablesInAllowedPositionRule) assert_valid = partial(assert_errors, errors=[]) def describe_validate_variables_are_in_allowe...
{ "repo_name": "graphql-python/graphql-core", "path": "tests/validation/test_variables_in_allowed_position.py", "copies": "1", "size": "10190", "license": "mit", "hash": 7860963099599536000, "line_mean": 26.9178082192, "line_max": 81, "alpha_frac": 0.4226692836, "autogenerated": false, "ratio": 4....
from functools import partial from greenlet import getcurrent, GreenletExit from .core import gethub, Condition from . import sleep, TimeoutError class Pool(object): def __init__(self, callback, *, limit, timeout): self.callback = callback self.limit = limit self.timeout = timeout ...
{ "repo_name": "tailhook/zorro", "path": "zorro/pool.py", "copies": "1", "size": "1037", "license": "mit", "hash": 3117820805662120400, "line_mean": 24.925, "line_max": 63, "alpha_frac": 0.5641272903, "autogenerated": false, "ratio": 4.164658634538153, "config_test": false, "has_no_keywords": ...
from functools import partial from homely._ui import allowinteractive, note, shellquote, warn from homely._utils import haveexecutable, run __all__ = ["haveexecutable", "execute"] def execute(cmd, stdout=None, stderr=None, expectexit=0, **kwargs): # Executes `cmd` in a subprocess. Raises a SystemError if the ex...
{ "repo_name": "toomuchphp/terraform", "path": "homely/system.py", "copies": "3", "size": "3287", "license": "mit", "hash": 6376184155689341000, "line_mean": 37.2209302326, "line_max": 79, "alpha_frac": 0.5792515972, "autogenerated": false, "ratio": 4.181933842239186, "config_test": false, "ha...
from functools import partial from ..hw_wallet.qt import QtHandlerBase, QtPluginBase from .digitalbitbox import DigitalBitboxPlugin from electrum.i18n import _ from electrum.plugin import hook from electrum.wallet import Standard_Wallet class Plugin(DigitalBitboxPlugin, QtPluginBase): icon_unpaired = ":icons/di...
{ "repo_name": "asfin/electrum", "path": "electrum/plugins/digitalbitbox/qt.py", "copies": "1", "size": "1216", "license": "mit", "hash": 4813961156856652000, "line_mean": 27.2790697674, "line_max": 91, "alpha_frac": 0.6578947368, "autogenerated": false, "ratio": 3.8603174603174604, "config_test...
from functools import partial from ..hw_wallet.qt import QtHandlerBase, QtPluginBase from .digitalbitbox import DigitalBitboxPlugin from electrum.i18n import _ from electrum.plugins import hook from electrum.wallet import Standard_Wallet class Plugin(DigitalBitboxPlugin, QtPluginBase): icon_unpaired = ":icons/d...
{ "repo_name": "kyuupichan/electrum", "path": "plugins/digitalbitbox/qt.py", "copies": "1", "size": "1217", "license": "mit", "hash": -3788515959145935000, "line_mean": 27.3023255814, "line_max": 91, "alpha_frac": 0.6581758422, "autogenerated": false, "ratio": 3.8634920634920635, "config_test": ...
from functools import partial from . import converters, exceptions, filters, validators from ._config import get_run_validators, set_run_validators from ._funcs import asdict, assoc, astuple, evolve, has from ._make import ( NOTHING, Attribute, Factory, attrib, attrs, fields, fields_dict, ...
{ "repo_name": "pegasus-isi/pegasus", "path": "packages/pegasus-common/src/Pegasus/vendor/attr/__init__.py", "copies": "1", "size": "1282", "license": "apache-2.0", "hash": -9021215339219988000, "line_mean": 18.7230769231, "line_max": 64, "alpha_frac": 0.5904836193, "autogenerated": false, "ratio"...
from functools import partial from .. import query from ..graph import Link, Nothing from ..types import TypeRef, Sequence from ..query import merge from ..types import Any from ..engine import Query from ..expr.refs import RequirementsExtractor from ..expr.core import to_expr, S, THIS from ..expr.checker import check...
{ "repo_name": "vmagamedov/hiku", "path": "hiku/sources/graph.py", "copies": "1", "size": "4291", "license": "bsd-3-clause", "hash": -6943962251393723000, "line_mean": 32.2635658915, "line_max": 76, "alpha_frac": 0.5791190865, "autogenerated": false, "ratio": 3.7313043478260868, "config_test": f...
from functools import partial from kazoo.exceptions import NoNodeError from kazoo.protocol.states import EventType from distconfig.backends.base import BaseBackend class ZooKeeperBackend(BaseBackend): """Zooekeeper backend implentation. If you are using gevent, make sure that the kazoo client is setup to ...
{ "repo_name": "deliveryhero/distconfig", "path": "distconfig/backends/zookeeper.py", "copies": "2", "size": "1789", "license": "apache-2.0", "hash": 7422117309203301000, "line_mean": 37.0638297872, "line_max": 103, "alpha_frac": 0.6746785914, "autogenerated": false, "ratio": 3.5708582834331337, ...
from functools import partial from keras import backend as K def dice_coefficient(y_true, y_pred, smooth=1.): y_true_f = K.flatten(y_true) y_pred_f = K.flatten(y_pred) intersection = K.sum(y_true_f * y_pred_f) return (2. * intersection + smooth) / (K.sum(y_true_f) + K.sum(y_pred_f) + smooth) def di...
{ "repo_name": "ellisdg/3DUnetCNN", "path": "legacy/unet3dlegacy/metrics.py", "copies": "1", "size": "1508", "license": "mit", "hash": -2143257309783919600, "line_mean": 31.085106383, "line_max": 100, "alpha_frac": 0.5915119363, "autogenerated": false, "ratio": 3.168067226890756, "config_test": ...
from functools import partial from keras.layers import Input, LeakyReLU, Add, UpSampling3D, Activation, SpatialDropout3D, Conv3D from keras.engine import Model from keras.optimizers import Adam from .unet import create_convolution_block, concatenate from ..metrics import weighted_dice_coefficient_loss create_convol...
{ "repo_name": "ellisdg/3DUnetCNN", "path": "legacy/unet3dlegacy/model/isensee2017.py", "copies": "1", "size": "4212", "license": "mit", "hash": 8053541314996926000, "line_mean": 39.8932038835, "line_max": 111, "alpha_frac": 0.7046533713, "autogenerated": false, "ratio": 3.566469093988146, "conf...
from functools import partial from kivy.animation import Animation from kivy.core.window import Window from kivy.clock import Clock from kivy.uix.bubble import Bubble, BubbleButton from kivy.properties import ListProperty from kivy.uix.widget import Widget from electroncash_gui.i18n import _ class ContextMenuItem(Wi...
{ "repo_name": "molecular/electrum", "path": "gui/kivy/uix/menus.py", "copies": "1", "size": "2782", "license": "mit", "hash": -6169850710554922000, "line_mean": 28.2842105263, "line_max": 80, "alpha_frac": 0.5995686556, "autogenerated": false, "ratio": 3.6847682119205296, "config_test": false, ...
from functools import partial from kivy.core.image import Image as CoreImage from kivy.properties import ObjectProperty, BooleanProperty, StringProperty from kivy.uix.behaviors import ButtonBehavior, ToggleButtonBehavior from kivy.uix.boxlayout import BoxLayout from kivy.uix.image import AsyncImage from kivy.uix.label...
{ "repo_name": "EdvardasDlugauskas/Auto-Rain", "path": "widgets.py", "copies": "1", "size": "7812", "license": "mit", "hash": -3439061246746005000, "line_mean": 28.7034220532, "line_max": 102, "alpha_frac": 0.7025089606, "autogenerated": false, "ratio": 3.01854714064915, "config_test": false, ...
from functools import partial from kivy.graphics.instructions import Callback from kivy.uix.relativelayout import RelativeLayout from kivy.clock import Clock from kivy.graphics.fbo import Fbo from kivy.graphics.opengl import glReadPixels, GL_RGBA, GL_UNSIGNED_BYTE from kivy.graphics.texture import Texture from mpfmc...
{ "repo_name": "missionpinball/mpf_mc", "path": "mpfmc/config_players/display_light_player.py", "copies": "1", "size": "5441", "license": "mit", "hash": -6893278795816764000, "line_mean": 35.7635135135, "line_max": 119, "alpha_frac": 0.5842675979, "autogenerated": false, "ratio": 4.150266971777269...
from functools import partial from kivy.properties import ObjectProperty from kivy.uix.actionbar import ActionButton, ContextualActionView class EditContView(ContextualActionView): '''EditContView is a ContextualActionView, used to display Edit items: Copy, Cut, Paste, Undo, Redo, Select All, Add Custom W...
{ "repo_name": "kiok46/kivy-designer", "path": "designer/components/edit_contextual_view.py", "copies": "4", "size": "3247", "license": "mit", "hash": -6543123781423037000, "line_mean": 32.8229166667, "line_max": 78, "alpha_frac": 0.6199568833, "autogenerated": false, "ratio": 3.7364787111622553, ...
from functools import partial from llvmlite import ir from numba.core.datamodel.registry import register_default from numba.core import types, cgutils from numba.np import numpy_support class DataModel(object): """ DataModel describe how a FE type is represented in the LLVM IR at different contexts. ...
{ "repo_name": "sklam/numba", "path": "numba/core/datamodel/models.py", "copies": "1", "size": "44008", "license": "bsd-2-clause", "hash": -8488065218421940000, "line_mean": 31.146092038, "line_max": 83, "alpha_frac": 0.6064806399, "autogenerated": false, "ratio": 3.774271012006861, "config_test...
from functools import partial from .matchers import MatchCriteria try: import asyncio except ImportError: asyncio = None class Behaviour(object): def __init__(self, name=None, match_criteria=None, result=None): self.name = name self.match_criteria = match_criteria self.results = ...
{ "repo_name": "atbentley/pock", "path": "pock/behaviour.py", "copies": "1", "size": "5619", "license": "mit", "hash": -1188952334464354600, "line_mean": 32.4464285714, "line_max": 114, "alpha_frac": 0.6328528208, "autogenerated": false, "ratio": 3.987934705464869, "config_test": false, "has_n...
from functools import partial from menpo.feature import no_op from menpofit.math import (IIRLRegression, IRLRegression, PCRRegression, OptimalLinearRegression, OPPRegression) from menpofit.modelinstance import OrthoPDM from menpofit.error import euclidean_bb_normalised_error from menpofit.r...
{ "repo_name": "yuxiang-zhou/menpofit", "path": "menpofit/sdm/algorithm/parametricshape.py", "copies": "6", "size": "12770", "license": "bsd-3-clause", "hash": -2097104099410488800, "line_mean": 41.1452145215, "line_max": 80, "alpha_frac": 0.6312451057, "autogenerated": false, "ratio": 4.337635869...
from functools import partial from menpo.feature import no_op from menpofit.result import MultiScaleNonParametricIterativeResult from menpofit.error import euclidean_bb_normalised_error from menpofit.math import (IIRLRegression, IRLRegression, PCRRegression, OptimalLinearRegression, OPPRegr...
{ "repo_name": "grigorisg9gr/menpofit", "path": "menpofit/sdm/algorithm/nonparametric.py", "copies": "6", "size": "10542", "license": "bsd-3-clause", "hash": -5568107345077107000, "line_mean": 40.6679841897, "line_max": 80, "alpha_frac": 0.6338455701, "autogenerated": false, "ratio": 4.45373891001...
from functools import partial from mission.framework.helpers import call_if_function, within_deadband from mission.framework.task import Task from shm import kalman from shm import navigation_desires as desires from shm.navigation_settings import position_controls class PositionalControlNeedy(Task): def on_first_...
{ "repo_name": "cuauv/software", "path": "mission/framework/movement.py", "copies": "1", "size": "9411", "license": "bsd-3-clause", "hash": 6241681077874518000, "line_mean": 52.1694915254, "line_max": 166, "alpha_frac": 0.7137392413, "autogenerated": false, "ratio": 3.8904505994212486, "config_t...
from functools import partial from .modifiers import DimensionModifier class NumericInterval(DimensionModifier): def __init__(self, dimension, size=1, offset=0): self.size = size self.offset = offset super().__init__(dimension) def __eq__(self, other): return all([isinstance(...
{ "repo_name": "kayak/fireant", "path": "fireant/dataset/intervals.py", "copies": "2", "size": "1197", "license": "apache-2.0", "hash": -7794699138981150000, "line_mean": 29.6923076923, "line_max": 115, "alpha_frac": 0.6390977444, "autogenerated": false, "ratio": 4.016778523489933, "config_test"...
from functools import partial from mongoengine.queryset.queryset import QuerySet __all__ = ("queryset_manager", "QuerySetManager") class QuerySetManager: """ The default QuerySet Manager. Custom QuerySet Manager functions can extend this class and users can add extra queryset functionality. Any cu...
{ "repo_name": "MongoEngine/mongoengine", "path": "mongoengine/queryset/manager.py", "copies": "1", "size": "2222", "license": "mit", "hash": -6966146728268480000, "line_mean": 37.3103448276, "line_max": 79, "alpha_frac": 0.6710171017, "autogenerated": false, "ratio": 4.6582809224318655, "config...
from functools import partial from multipledispatch import Dispatcher import ibis.common.exceptions as com import ibis.expr.operations as ops from ibis.backends.base import Client from ibis.expr.scope import Scope from .trace import TraceTwoLevelDispatcher # Individual operation execution execute_node = TraceTwoLev...
{ "repo_name": "ibis-project/ibis", "path": "ibis/backends/pandas/dispatch.py", "copies": "1", "size": "2532", "license": "apache-2.0", "hash": -7841277293009019000, "line_mean": 23.8235294118, "line_max": 79, "alpha_frac": 0.7045813586, "autogenerated": false, "ratio": 3.871559633027523, "confi...
from functools import partial from nose.tools import assert_is_none from nose.tools import eq_ from rest_framework.compat import RequestFactory from rest_framework.relations import PKOnlyObject from rest_framework.request import Request from rest_framework.reverse import reverse from drf_nested_resources.fields impor...
{ "repo_name": "pombredanne/drf-nested-resources", "path": "tests/test_serialization.py", "copies": "1", "size": "11104", "license": "bsd-3-clause", "hash": 1246936983127690500, "line_mean": 31.6588235294, "line_max": 76, "alpha_frac": 0.5486311239, "autogenerated": false, "ratio": 4.2905718701700...
from functools import partial from nose.tools import eq_ from bleach import clean clean = partial(clean, tags=['p'], attributes=['style']) def test_allowed_css(): tests = ( ('font-family: Arial; color: red; float: left; ' 'background-color: red;', 'color: red;', ['color']), ('border: ...
{ "repo_name": "marcdm/bleach", "path": "bleach/tests/test_css.py", "copies": "1", "size": "4238", "license": "bsd-3-clause", "hash": 9200600908157013000, "line_mean": 44.5698924731, "line_max": 84, "alpha_frac": 0.5427088249, "autogenerated": false, "ratio": 3.4371451743714516, "config_test": f...
from functools import partial from openapi_core.deserializing.parameters.deserializers import ( CallableParameterDeserializer, ) from openapi_core.deserializing.parameters.deserializers import ( UnsupportedStyleDeserializer, ) from openapi_core.deserializing.parameters.util import split from openapi_core.schem...
{ "repo_name": "p1c2u/openapi-core", "path": "openapi_core/deserializing/parameters/factories.py", "copies": "1", "size": "1046", "license": "bsd-3-clause", "hash": 4494886968866590000, "line_mean": 32.7419354839, "line_max": 72, "alpha_frac": 0.7179732314, "autogenerated": false, "ratio": 4.10196...
from functools import partial from OpenGL.GL import * from PyEngine3D.Utilities import GetClassName, Singleton from PyEngine3D.Common import logger from PyEngine3D.OpenGLContext import OpenGLContext class FrameBuffer: errors = ( GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT, GL_FRAMEBUFFER_INCOMPLETE_DRA...
{ "repo_name": "ubuntunux/GuineaPig", "path": "PyEngine3D/OpenGLContext/FrameBuffer.py", "copies": "1", "size": "12670", "license": "bsd-2-clause", "hash": -631755463148294400, "line_mean": 43.7703180212, "line_max": 161, "alpha_frac": 0.6187056038, "autogenerated": false, "ratio": 3.5660005629045...
from functools import partial from ..params.encodings import EncodingParam from ..params.values import URLParam from .base import StringProp __all__ = ["PhotoProp"] class PhotoProp(StringProp): authorized_params = ["ENCODING", "TYPE", "VALUE"] name = "PHOTO" def export(self, path): """Export...
{ "repo_name": "Jorispilot/pycard", "path": "pycard/prop/photo.py", "copies": "1", "size": "1111", "license": "mit", "hash": -7556329312409859000, "line_mean": 24.8372093023, "line_max": 75, "alpha_frac": 0.5733573357, "autogenerated": false, "ratio": 4.224334600760456, "config_test": false, "...
from functools import partial from parser.libpicohttpparser import ffi from request import HttpRequest class TracingProtocol: def __init__(self, on_headers_adapter: callable, on_body_adapter: callable): self.requests = [] self.error = None self.on_headers_adapter = on_he...
{ "repo_name": "squeaky-pl/japronto", "path": "src/japronto/protocol/tracing.py", "copies": "1", "size": "2664", "license": "mit", "hash": 8364239998551004000, "line_mean": 28.9325842697, "line_max": 79, "alpha_frac": 0.6486486486, "autogenerated": false, "ratio": 3.6343792633015006, "config_tes...
from functools import partial from plenum.common.messages.node_messages import PrePrepare from plenum.common.types import OPERATION, f from plenum.common.constants import DOMAIN_LEDGER_ID, POOL_LEDGER_ID, AUDIT_LEDGER_ID from plenum.common.util import getMaxFailures, get_utc_epoch from plenum.server.consensus.ordering...
{ "repo_name": "evernym/zeno", "path": "plenum/test/node_request/node_request_helper.py", "copies": "2", "size": "16725", "license": "apache-2.0", "hash": 1405368365070987000, "line_mean": 44.2027027027, "line_max": 111, "alpha_frac": 0.5294469357, "autogenerated": false, "ratio": 4.60490088105726...
from functools import partial from plumbum import local import benchbuild as bb from benchbuild.environments.domain.declarative import ContainerImage from benchbuild.settings import CFG from benchbuild.source import Git from benchbuild.utils.cmd import make, mkdir, tar from benchbuild.utils.settings import get_number...
{ "repo_name": "PolyJIT/benchbuild", "path": "benchbuild/projects/benchbuild/js.py", "copies": "1", "size": "2347", "license": "mit", "hash": 7769393923580749, "line_mean": 31.5972222222, "line_max": 72, "alpha_frac": 0.5573072007, "autogenerated": false, "ratio": 3.416302765647744, "config_test...
from functools import partial from .primitives import EMPTY __all__ = ['identity', 'constantly', 'caller', 'partial', 'rpartial', 'func_partial', 'curry', 'rcurry', 'autocurry', 'iffy'] def identity(x): return x def constantly(x): return lambda *a, **kw: x # an operator.m...
{ "repo_name": "musicpax/funcy", "path": "funcy/simple_funcs.py", "copies": "3", "size": "1941", "license": "bsd-3-clause", "hash": 5203841046211414000, "line_mean": 22.962962963, "line_max": 67, "alpha_frac": 0.5564142195, "autogenerated": false, "ratio": 3.4112478031634446, "config_test": fals...
from functools import partial from .processVideo import processVideo, isGoodVideo def args_(fn, param): #step requirements requirements = [('can_read_video', partial(isGoodVideo, fn['original_video']))] if param.is_WT2: from ..compress_add_data import storeAdditionalDataSW, hasAdditionalFiles ...
{ "repo_name": "ver228/tierpsy-tracker", "path": "tierpsy/analysis/compress/__init__.py", "copies": "1", "size": "2605", "license": "mit", "hash": 1554348110702616800, "line_mean": 37.8955223881, "line_max": 130, "alpha_frac": 0.6061420345, "autogenerated": false, "ratio": 3.310038119440915, "co...
from functools import partial from pulsar import Connection, Pool, get_actor from pulsar.utils.pep import to_string from pulsar.apps.data import RemoteStore from pulsar.apps.ds import redis_parser from .client import RedisClient, Pipeline, Consumer, ResponseError from .pubsub import RedisPubSub class RedisStoreConn...
{ "repo_name": "nooperpudd/pulsar", "path": "pulsar/apps/data/redis/store.py", "copies": "5", "size": "4614", "license": "bsd-3-clause", "hash": 3156420776598993400, "line_mean": 32.4347826087, "line_max": 79, "alpha_frac": 0.6148677937, "autogenerated": false, "ratio": 4.225274725274725, "confi...
from functools import partial from pulsar import Protocol from pulsar.apps.data import PubSub class PubsubProtocol(Protocol): def __init__(self, handler, **kw): super().__init__(handler._loop, **kw) self.parser = self._producer._parser_class() self.handler = handler def execute(self...
{ "repo_name": "ymero/pulsar", "path": "pulsar/apps/data/redis/pubsub.py", "copies": "5", "size": "3178", "license": "bsd-3-clause", "hash": -8802111716602501000, "line_mean": 33.5434782609, "line_max": 78, "alpha_frac": 0.5846444305, "autogenerated": false, "ratio": 4.395573997233749, "config_t...
from functools import partial from pydispatch import dispatcher from icecrate import database from icecrate import items from icecrate.utils import keygen tagkey = partial(keygen, "icecrate", "tags") def all_tags(): # pragma: no cover return database.smembers(tagkey(meta="all")) def by_item_id(item_id): ""...
{ "repo_name": "Artanis/icecrate", "path": "icecrate/tags.py", "copies": "1", "size": "1435", "license": "bsd-2-clause", "hash": 449615211346356300, "line_mean": 24.625, "line_max": 76, "alpha_frac": 0.6571428571, "autogenerated": false, "ratio": 3.384433962264151, "config_test": false, "has_n...
from functools import partial from pydispatch import dispatcher from icecrate import database from icecrate.utils import keygen itemkey = partial(keygen, "icecrate", "items") def all_items(): # pragma: no cover """Retrieve set of all item ids from the database. """ return database.smembers(itemkey(meta...
{ "repo_name": "Artanis/icecrate", "path": "icecrate/items.py", "copies": "1", "size": "1281", "license": "bsd-2-clause", "hash": 5347343758983795000, "line_mean": 28.1136363636, "line_max": 71, "alpha_frac": 0.7088212334, "autogenerated": false, "ratio": 3.588235294117647, "config_test": false,...
from functools import partial from pykit.ir import vvisit, ArgLoader, verify_lowlevel from pykit.ir import defs, opgrouper from pykit.types import Boolean, Integral, Real, Pointer, Function, Int64 from pykit.codegen.llvm.llvm_types import llvm_type import llvm.core as lc from llvm.core import Type, Constant #===----...
{ "repo_name": "Inaimathi/pykit", "path": "pykit/codegen/llvm/llvm_codegen.py", "copies": "2", "size": "12597", "license": "bsd-3-clause", "hash": 6072332041225850000, "line_mean": 31.137755102, "line_max": 82, "alpha_frac": 0.5386996904, "autogenerated": false, "ratio": 3.50695991091314, "confi...
from functools import partial from pyparsing import alphanums, nums, oneOf, opAssoc, operatorPrecedence,\ CaselessLiteral, Combine, Keyword, Literal, MatchFirst, Optional,\ ParseException, Regex, Word, ZeroOrMore from bamboo.core.aggregations import AGGREGATIONS from bamboo.core.operations import EvalAndOp, E...
{ "repo_name": "pld/bamboo", "path": "bamboo/core/parser.py", "copies": "2", "size": "12674", "license": "bsd-3-clause", "hash": 3235487308347919000, "line_mean": 33.6284153005, "line_max": 79, "alpha_frac": 0.5665141234, "autogenerated": false, "ratio": 4.217637271214643, "config_test": false, ...
from functools import partial from PyQt4.QtGui import * from PyQt4.QtCore import * from electrum_arg.plugins import hook from electrum_arg.i18n import _ from electrum_arg_gui.qt import EnterButton from electrum_arg_gui.qt.util import ThreadedButton, Buttons from electrum_arg_gui.qt.util import WindowModalDialog, OkBu...
{ "repo_name": "argentumproject/electrum-arg", "path": "plugins/labels/qt.py", "copies": "1", "size": "2045", "license": "mit", "hash": 3728527760502373000, "line_mean": 31.9838709677, "line_max": 80, "alpha_frac": 0.6215158924, "autogenerated": false, "ratio": 4.122983870967742, "config_test": ...
from functools import partial from PyQt4.QtGui import * from PyQt4.QtCore import * from electrum_cesc.plugins import hook from electrum_cesc.i18n import _ from electrum_cesc_gui.qt import EnterButton from electrum_cesc_gui.qt.util import ThreadedButton, Buttons from electrum_cesc_gui.qt.util import WindowModalDialog,...
{ "repo_name": "Marcdnd/electrum-cesc", "path": "plugins/labels/qt.py", "copies": "1", "size": "2050", "license": "mit", "hash": -1028435937784564100, "line_mean": 32.064516129, "line_max": 80, "alpha_frac": 0.6224390244, "autogenerated": false, "ratio": 4.091816367265469, "config_test": false, ...
from functools import partial from PyQt4.QtGui import * from PyQt4.QtCore import * from electrum_dgb.plugins import hook from electrum_dgb.i18n import _ from electrum_dgb_gui.qt import EnterButton from electrum_dgb_gui.qt.util import ThreadedButton, Buttons from electrum_dgb_gui.qt.util import WindowModalDialog, OkBu...
{ "repo_name": "protonn/Electrum-Cash", "path": "plugins/labels/qt.py", "copies": "1", "size": "2045", "license": "mit", "hash": -1200133445251655000, "line_mean": 31.9838709677, "line_max": 80, "alpha_frac": 0.6215158924, "autogenerated": false, "ratio": 4.081836327345309, "config_test": false,...
from functools import partial from PyQt4.QtGui import * from PyQt4.QtCore import * from electrum.plugins import hook from electrum.i18n import _ from electrum_gui.qt import EnterButton from electrum_gui.qt.util import ThreadedButton, Buttons from electrum_gui.qt.util import WindowModalDialog, OkButton from labels im...
{ "repo_name": "parkbyte/electrumparkbyte", "path": "plugins/labels/qt.py", "copies": "14", "size": "2025", "license": "mit", "hash": 3848333242469787600, "line_mean": 31.6612903226, "line_max": 80, "alpha_frac": 0.6202469136, "autogenerated": false, "ratio": 4.166666666666667, "config_test": fa...
from functools import partial from PyQt4.QtGui import * from PyQt4.QtCore import * from electrum_vtc.plugins import hook from electrum_vtc.i18n import _ from electrum_vtc_gui.qt import EnterButton from electrum_vtc_gui.qt.util import ThreadedButton, Buttons from electrum_vtc_gui.qt.util import WindowModalDialog, OkBu...
{ "repo_name": "vertcoin/electrum-vtc", "path": "plugins/labels/qt.py", "copies": "4", "size": "2045", "license": "mit", "hash": -7584358201030574000, "line_mean": 31.9838709677, "line_max": 80, "alpha_frac": 0.6215158924, "autogenerated": false, "ratio": 4.081836327345309, "config_test": false,...
from functools import partial from PyQt5.QtCore import pyqtSignal from PyQt5.QtWidgets import QInputDialog, QLabel, QVBoxLayout, QLineEdit from electrum.i18n import _ from electrum.plugin import hook from electrum.wallet import Standard_Wallet from electrum.gui.qt.util import WindowModalDialog from .ledger import Le...
{ "repo_name": "spesmilo/electrum", "path": "electrum/plugins/ledger/qt.py", "copies": "1", "size": "2752", "license": "mit", "hash": 2954452151811930000, "line_mean": 32.156626506, "line_max": 121, "alpha_frac": 0.6460755814, "autogenerated": false, "ratio": 3.689008042895442, "config_test": fa...
from functools import partial from PyQt5.QtCore import pyqtSignal from PyQt5.QtWidgets import QInputDialog, QLabel, QVBoxLayout, QLineEdit from electrum_ltc.i18n import _ from electrum_ltc.plugin import hook from electrum_ltc.wallet import Standard_Wallet from electrum_ltc.gui.qt.util import WindowModalDialog from ....
{ "repo_name": "pooler/electrum-ltc", "path": "electrum_ltc/plugins/ledger/qt.py", "copies": "1", "size": "2768", "license": "mit", "hash": -3655205941857157000, "line_mean": 32.3493975904, "line_max": 121, "alpha_frac": 0.6466763006, "autogenerated": false, "ratio": 3.6517150395778364, "config_...
from functools import partial from PyQt5.QtCore import pyqtSignal from PyQt5.QtWidgets import QInputDialog, QLabel, QVBoxLayout, QLineEdit from electrum_mona.i18n import _ from electrum_mona.plugin import hook from electrum_mona.wallet import Standard_Wallet from electrum_mona.gui.qt.util import WindowModalDialog fr...
{ "repo_name": "wakiyamap/electrum-mona", "path": "electrum_mona/plugins/ledger/qt.py", "copies": "1", "size": "2772", "license": "mit", "hash": 2359518758556208000, "line_mean": 32.3975903614, "line_max": 121, "alpha_frac": 0.6471861472, "autogenerated": false, "ratio": 3.6569920844327175, "con...
from functools import partial from PyQt5.QtCore import pyqtSignal from PyQt5.QtWidgets import QWidget, QGridLayout, QPushButton class SongSelectWidget(QWidget): song_selected = pyqtSignal(int) def __init__(self, *args, **kwargs): super(SongSelectWidget, self).__init__(*args, **kwargs) self...
{ "repo_name": "maccesch/songscreen", "path": "song_select_widget.py", "copies": "1", "size": "1980", "license": "bsd-3-clause", "hash": 5776669647018893000, "line_mean": 27.2857142857, "line_max": 80, "alpha_frac": 0.5247474747, "autogenerated": false, "ratio": 4.159663865546219, "config_test":...
from functools import partial from PyQt5.QtCore import pyqtSignal from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QApplication, QPushButton class ScreenSelectWidget(QWidget): screen_selected = pyqtSignal(int) def __init__(self, *args, **kwargs): super(ScreenSelectWidget, self).__init__(*ar...
{ "repo_name": "maccesch/songscreen", "path": "screen_select_widget.py", "copies": "1", "size": "2268", "license": "bsd-3-clause", "hash": 2168263619252270600, "line_mean": 29.24, "line_max": 114, "alpha_frac": 0.6014109347, "autogenerated": false, "ratio": 4.1614678899082564, "config_test": fal...
from functools import partial from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import (QHBoxLayout, QLabel, QVBoxLayout) from electroncash.plugins import hook from electroncash.i18n import _ from electroncash_gui.qt import EnterButton from electroncash_gui.qt.main_window import ElectrumWindow...
{ "repo_name": "fyookball/electrum", "path": "plugins/labels/qt.py", "copies": "1", "size": "9928", "license": "mit", "hash": -6536225406980029000, "line_mean": 41.6094420601, "line_max": 148, "alpha_frac": 0.6144238517, "autogenerated": false, "ratio": 4.037413582757218, "config_test": false, ...
from functools import partial from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import (QHBoxLayout, QLabel, QVBoxLayout) from electrum.plugins import hook from electrum.i18n import _ from electrum_gui.qt import EnterButton from electrum_gui.qt.util import ThreadedButton, Buttons from electrum...
{ "repo_name": "digitalbitbox/electrum", "path": "plugins/labels/qt.py", "copies": "3", "size": "2168", "license": "mit", "hash": -9154392979003385000, "line_mean": 31.3582089552, "line_max": 74, "alpha_frac": 0.6356088561, "autogenerated": false, "ratio": 4.1138519924098675, "config_test": fals...
from functools import partial from PyQt5.QtWidgets import ( QPushButton, QLabel, QVBoxLayout, QLineEdit, QHBoxLayout, ) from PyQt5.QtCore import Qt, QMetaObject, Q_RETURN_ARG, pyqtSlot from electrum.gui.qt.util import ( WindowModalDialog, OkButton, ButtonsTextEdit, ) from electrum.i1...
{ "repo_name": "spesmilo/electrum", "path": "electrum/plugins/bitbox02/qt.py", "copies": "1", "size": "3535", "license": "mit", "hash": -6481809635611866000, "line_mean": 29.474137931, "line_max": 154, "alpha_frac": 0.6059405941, "autogenerated": false, "ratio": 3.8257575757575757, "config_test"...
from functools import partial from pyramid.config import Configurator from sqlalchemy.orm import joinedload from clld.web.app import menu_item, CtxFactoryQuery from clld.db.models import common from clld.interfaces import ICtxFactoryQuery # we must make sure custom models are known at database initialization! from d...
{ "repo_name": "clld/dogonlanguages", "path": "dogonlanguages/__init__.py", "copies": "1", "size": "3074", "license": "apache-2.0", "hash": 8900822941337025000, "line_mean": 36.950617284, "line_max": 87, "alpha_frac": 0.6476903058, "autogenerated": false, "ratio": 3.6858513189448443, "config_tes...
from functools import partial from pyramid.config import Configurator from clld import interfaces from clld.web.app import menu_item from clld_glottologfamily_plugin.util import LanguageByFamilyMapMarker # we must make sure custom models are known at database initialization! from dictionaria import models from dicti...
{ "repo_name": "clld/dictionaria", "path": "dictionaria/__init__.py", "copies": "1", "size": "2102", "license": "apache-2.0", "hash": 6941073361912910000, "line_mean": 31.84375, "line_max": 95, "alpha_frac": 0.6883920076, "autogenerated": false, "ratio": 3.681260945709282, "config_test": true, ...
from functools import partial from PySide import QtCore, QtGui from jukeboxcore.gui.widgetdelegate import CommentDelegate class AbstractLevel(object): """Mixin for QtGui.QWidget for a level of a browser A level is a widget that should display data of a specific root index of its model. So it can be jus...
{ "repo_name": "JukeboxPipeline/jukebox-core", "path": "src/jukeboxcore/gui/widgets/browser.py", "copies": "1", "size": "23060", "license": "bsd-3-clause", "hash": 8719329090429435000, "line_mean": 32.1798561151, "line_max": 139, "alpha_frac": 0.6115784909, "autogenerated": false, "ratio": 4.35752...
from functools import partial from PySide import QtGui, QtCore from jukeboxcore.gui.widgets.reftrackwidget_ui import Ui_ReftrackWidget from jukeboxcore.gui.widgets.optionselector_ui import Ui_OptionSelector from jukeboxcore.gui.widgets.browser import ComboBoxBrowser from jukeboxcore.gui.widgetdelegate import WidgetDe...
{ "repo_name": "JukeboxPipeline/jukebox-core", "path": "src/jukeboxcore/gui/widgets/reftrackwidget.py", "copies": "1", "size": "15322", "license": "bsd-3-clause", "hash": 631177368306332700, "line_mean": 30.7883817427, "line_max": 129, "alpha_frac": 0.5807988513, "autogenerated": false, "ratio": 3...
from functools import partial from pytest import fixture from ..generic import GenericOAuthenticator from .mocks import setup_oauth_mock def user_model(username, **kwargs): """Return a user model""" user = { 'username': username, 'scope': 'basic', } user.update(kwargs) return use...
{ "repo_name": "jupyterhub/oauthenticator", "path": "oauthenticator/tests/test_generic.py", "copies": "1", "size": "5347", "license": "bsd-3-clause", "hash": -8354341320816043000, "line_mean": 30.6390532544, "line_max": 88, "alpha_frac": 0.6575649897, "autogenerated": false, "ratio": 3.77080394922...
from functools import partial from pythonforandroid.toolchain import Recipe, shprint, current_directory import sh class OpenSSLRecipe(Recipe): version = '1.0.2e' url = 'https://www.openssl.org/source/openssl-{version}.tar.gz' def should_build(self, arch): return not self.has_libs(arch, 'libssl.s...
{ "repo_name": "bob-the-hamster/python-for-android", "path": "pythonforandroid/recipes/openssl/__init__.py", "copies": "1", "size": "2168", "license": "mit", "hash": 7289603634022912000, "line_mean": 35.7457627119, "line_max": 90, "alpha_frac": 0.5705719557, "autogenerated": false, "ratio": 3.5599...
from functools import partial from pythonforandroid.toolchain import Recipe, shprint, current_directory import sh class OpenSSLRecipe(Recipe): version = '1.0.2g' url = 'https://www.openssl.org/source/openssl-{version}.tar.gz' def should_build(self, arch): return not self.has_libs(arch, 'libssl.s...
{ "repo_name": "kived/python-for-android", "path": "pythonforandroid/recipes/openssl/__init__.py", "copies": "1", "size": "2168", "license": "mit", "hash": -8236347342745823000, "line_mean": 35.7457627119, "line_max": 90, "alpha_frac": 0.5705719557, "autogenerated": false, "ratio": 3.5599343185550...
from functools import partial from pythonforandroid.toolchain import Recipe, shprint, current_directory import sh class OpenSSLRecipe(Recipe): version = '1.0.2h' url = 'https://www.openssl.org/source/openssl-{version}.tar.gz' def should_build(self, arch): return not self.has_libs(arch, 'libssl' ...
{ "repo_name": "ibobalo/python-for-android", "path": "pythonforandroid/recipes/openssl/__init__.py", "copies": "1", "size": "2597", "license": "mit", "hash": 1629172824179409400, "line_mean": 38.3484848485, "line_max": 94, "alpha_frac": 0.554871005, "autogenerated": false, "ratio": 3.6220362622036...
from functools import partial from ray.rllib.utils.annotations import override, PublicAPI, DeveloperAPI from ray.rllib.utils.framework import try_import_tf, try_import_tfp, \ try_import_torch from ray.rllib.utils.deprecation import deprecation_warning, renamed_agent, \ renamed_class, renamed_function from ray....
{ "repo_name": "ray-project/ray", "path": "rllib/utils/__init__.py", "copies": "1", "size": "2849", "license": "apache-2.0", "hash": -7719769847469798000, "line_mean": 25.6261682243, "line_max": 79, "alpha_frac": 0.6507546508, "autogenerated": false, "ratio": 3.657252888318357, "config_test": fa...
from functools import partial from rb.utils import iteritems class Promise(object): """A promise object that attempts to mirror the ES6 APIs for promise objects. Unlike ES6 promises this one however also directly gives access to the underlying value and it has some slightly different static method n...
{ "repo_name": "getsentry/rb", "path": "rb/promise.py", "copies": "1", "size": "5350", "license": "apache-2.0", "hash": 7046956473560502000, "line_mean": 28.8882681564, "line_max": 77, "alpha_frac": 0.5757009346, "autogenerated": false, "ratio": 4.144074360960496, "config_test": false, "has_no...
from functools import partial from rest_framework import fields, serializers from access import acl from users.models import UserProfile from mkt.api.serializers import PotatoCaptchaSerializer class AccountSerializer(serializers.ModelSerializer): class Meta: model = UserProfile fields = ('displ...
{ "repo_name": "robhudson/zamboni", "path": "mkt/account/serializers.py", "copies": "1", "size": "2881", "license": "bsd-3-clause", "hash": -1700625465175926, "line_mean": 31.7386363636, "line_max": 74, "alpha_frac": 0.6560222145, "autogenerated": false, "ratio": 4.432307692307693, "config_test"...
from functools import partial from rest_framework import fields, serializers from mkt.access import acl from mkt.api.fields import ReverseChoiceField from mkt.api.serializers import PotatoCaptchaSerializer from mkt.users.models import UserProfile class AccountSerializer(serializers.ModelSerializer): class Meta:...
{ "repo_name": "andymckay/zamboni", "path": "mkt/account/serializers.py", "copies": "1", "size": "3842", "license": "bsd-3-clause", "hash": -6959055076883101000, "line_mean": 33.9272727273, "line_max": 79, "alpha_frac": 0.6520041645, "autogenerated": false, "ratio": 4.411021814006888, "config_te...
from functools import partial from rest_framework import fields, serializers import amo from mkt.access import acl from mkt.api.serializers import PotatoCaptchaSerializer from mkt.users.models import UserProfile class AccountSerializer(serializers.ModelSerializer): class Meta: model = UserProfile ...
{ "repo_name": "ngokevin/zamboni", "path": "mkt/account/serializers.py", "copies": "1", "size": "4435", "license": "bsd-3-clause", "hash": 7605124059289817000, "line_mean": 33.3798449612, "line_max": 79, "alpha_frac": 0.6532130778, "autogenerated": false, "ratio": 4.352306182531894, "config_test...
from functools import partial from rest_framework import fields, serializers import mkt from mkt.access import acl from mkt.access.models import Group from mkt.api.serializers import PotatoCaptchaSerializer from mkt.users.models import UserProfile class AccountSerializer(serializers.ModelSerializer): class Met...
{ "repo_name": "elysium001/zamboni", "path": "mkt/account/serializers.py", "copies": "1", "size": "5781", "license": "bsd-3-clause", "hash": 6681262059321466000, "line_mean": 33.6167664671, "line_max": 79, "alpha_frac": 0.6402006573, "autogenerated": false, "ratio": 4.36631419939577, "config_tes...
from functools import partial from rest_framework import fields, serializers import mkt from mkt.access import acl from mkt.api.serializers import PotatoCaptchaSerializer from mkt.users.models import UserProfile class AccountSerializer(serializers.ModelSerializer): class Meta: model = UserProfile ...
{ "repo_name": "jamesthechamp/zamboni", "path": "mkt/account/serializers.py", "copies": "6", "size": "4743", "license": "bsd-3-clause", "hash": 4410085933117730300, "line_mean": 33.1223021583, "line_max": 79, "alpha_frac": 0.6495888678, "autogenerated": false, "ratio": 4.296195652173913, "config...
from functools import partial from rest_framework import status from rest_framework.test import APITestCase from pprint import pformat from collections import OrderedDict from rest_framework.utils.serializer_helpers import ReturnList def compare_lists(data, expected_data): data_gen = (item for item in data) ...
{ "repo_name": "baseclue/django-rest-test", "path": "rest_test/__init__.py", "copies": "1", "size": "13329", "license": "apache-2.0", "hash": -7768518745897162000, "line_mean": 31.512195122, "line_max": 111, "alpha_frac": 0.5884912597, "autogenerated": false, "ratio": 4.151043288695111, "config_...
from functools import partial from rlkit.envs.contextual import ContextualEnv from rlkit.policies.base import Policy from rlkit.samplers.data_collector import MdpPathCollector from rlkit.samplers.rollout_functions import contextual_rollout class ContextualPathCollector(MdpPathCollector): def __init__( ...
{ "repo_name": "vitchyr/rlkit", "path": "rlkit/samplers/data_collector/contextual_path_collector.py", "copies": "1", "size": "1313", "license": "mit", "hash": -4706289876643138000, "line_mean": 31.825, "line_max": 74, "alpha_frac": 0.6138613861, "autogenerated": false, "ratio": 4.181528662420382, ...
from functools import partial from scapy.all import ARP, Ether, sendp from sleepproxy.sniff import SnifferThread _HOSTS = {} def handle(othermac, addresses, mymac, iface): print 'Pretending to handle arp for %s on %s' % (addresses, iface) if othermac in _HOSTS: print "I already seem to be managing ...
{ "repo_name": "rcloran/SleepProxyServer", "path": "sleepproxy/arp.py", "copies": "1", "size": "1609", "license": "bsd-2-clause", "hash": 6672050711540156000, "line_mean": 26.7413793103, "line_max": 82, "alpha_frac": 0.5748912368, "autogenerated": false, "ratio": 3.4527896995708156, "config_test...
from functools import partial from scapy.all import IP, TCP import sleepproxy.manager from sleepproxy.sniff import SnifferThread from sleepproxy.wol import wake _HOSTS = {} def handle(mac, addresses, iface): print "Pretending to handle incoming SYN for %s: %s" % (mac, addresses, ) if mac in _HOSTS: ...
{ "repo_name": "rcloran/SleepProxyServer", "path": "sleepproxy/tcp.py", "copies": "1", "size": "1445", "license": "bsd-2-clause", "hash": -5440300622273619000, "line_mean": 28.4897959184, "line_max": 115, "alpha_frac": 0.6069204152, "autogenerated": false, "ratio": 3.5591133004926108, "config_te...
from functools import partial from six import iteritems from bravado_core.docstring import docstring_property from bravado_core.schema import ( is_dict_like, is_list_like, SWAGGER_PRIMITIVES ) # Models in #/definitions are tagged with this key so that they can be # differentiated from 'object' types. MO...
{ "repo_name": "admetricks/bravado-core", "path": "bravado_core/model.py", "copies": "1", "size": "8127", "license": "bsd-3-clause", "hash": 7683172662376320000, "line_mean": 33.436440678, "line_max": 80, "alpha_frac": 0.6339362618, "autogenerated": false, "ratio": 3.9760273972602738, "config_te...
from functools import partial from sklearn.base import ClassifierMixin, RegressorMixin from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor from sklearn.tree._tree import Tree, TREE_LEAF import numpy as np from sklearn_pmml.convert.model import EstimatorConverter, ModelMode, Schema from sklearn_pmml...
{ "repo_name": "YuHuaCheng/sklearn-pmml", "path": "sklearn_pmml/convert/tree.py", "copies": "2", "size": "7712", "license": "mit", "hash": 8650804406269311000, "line_mean": 44.3705882353, "line_max": 120, "alpha_frac": 0.625129668, "autogenerated": false, "ratio": 4.442396313364055, "config_test...
from functools import partial from sklearn.tree import DecisionTreeClassifier from sklearn.utils.testing import assert_less from sklearn.utils.testing import assert_raise_message import pytest from skopt import gbrt_minimize from skopt import forest_minimize from skopt.benchmarks import bench1 from skopt.benchmarks i...
{ "repo_name": "ccauet/scikit-optimize", "path": "skopt/tests/test_forest_opt.py", "copies": "1", "size": "2442", "license": "bsd-3-clause", "hash": -9098783385870677000, "line_mean": 37.15625, "line_max": 74, "alpha_frac": 0.6203931204, "autogenerated": false, "ratio": 3.5911764705882354, "conf...
from functools import partial from sqlalchemy.ext.associationproxy import association_proxy, AssociationProxy from sqlalchemy.orm import Query, aliased, mapper, relationship, synonym from sqlalchemy.orm.collections import attribute_mapped_collection from sqlalchemy.orm.scoping import ScopedSession from sqlalchemy.orm....
{ "repo_name": "DaMouse404/pokedex", "path": "pokedex/db/multilang.py", "copies": "3", "size": "10159", "license": "mit", "hash": -4088000991344343600, "line_mean": 38.9960629921, "line_max": 105, "alpha_frac": 0.6685697411, "autogenerated": false, "ratio": 4.231153685964181, "config_test": fals...
from functools import partial from sqlalchemy.ext.compiler import compiles from sqlalchemy.schema import DDLElement __all__ = ('CreateUpdateAtTrigger', 'DropUpdateAtTrigger', 'UPDATE_AT_DDL_STATEMENT') UPDATE_AT_PROCEDURE = 'set_updated_at_timestamp()' UPDATE_AT_TRIGGER = 'trigger_column_updated_at' # ...
{ "repo_name": "portfoliome/pgawedge", "path": "pgawedge/triggers.py", "copies": "1", "size": "1820", "license": "mit", "hash": -3821061356292938000, "line_mean": 26.5757575758, "line_max": 74, "alpha_frac": 0.6835164835, "autogenerated": false, "ratio": 3.7142857142857144, "config_test": false,...
from functools import partial from sqlalchemy.orm import joinedload_all from pyramid.config import Configurator from clld.web.app import CtxFactoryQuery, menu_item from clld.db.models.common import Contribution, Unit from clld.interfaces import ICtxFactoryQuery # we must make sure custom models are known at database...
{ "repo_name": "clld/tsezacp", "path": "tsezacp/__init__.py", "copies": "1", "size": "1654", "license": "apache-2.0", "hash": 312555078288269800, "line_mean": 32.7551020408, "line_max": 115, "alpha_frac": 0.692261185, "autogenerated": false, "ratio": 3.742081447963801, "config_test": true, "ha...
from functools import partial from src.agent.decisions import * class Agent(object): """ This is the core class that other intelligent agents inherit from. Agents are the first step towards reification - 1. They have 'needs' they are weighted higher via their biases 2. They have 'wants' ...
{ "repo_name": "lexwraith/ThisIsBob", "path": "src/agent/agent.py", "copies": "1", "size": "3586", "license": "apache-2.0", "hash": -2926316878970876400, "line_mean": 29.6495726496, "line_max": 100, "alpha_frac": 0.6081985499, "autogenerated": false, "ratio": 4.522068095838588, "config_test": fa...
from functools import partial from stdnet.utils import zip, JSPLITTER, EMPTYJSON, iteritems from stdnet.utils.exceptions import * from .base import ModelType, ModelBase, raise_kwargs from .session import Manager __all__ = ['StdModel', 'create_model', 'model_to_dict'] class StdModel(ModelBase): '''A :class:`Mo...
{ "repo_name": "lsbardel/python-stdnet", "path": "stdnet/odm/models.py", "copies": "1", "size": "11993", "license": "bsd-3-clause", "hash": 2181175628786513000, "line_mean": 36.5956112853, "line_max": 79, "alpha_frac": 0.5959309597, "autogenerated": false, "ratio": 4.1875, "config_test": false, ...
from functools import partial from torch import nn from .myronenko import MyronenkoLayer, MyronenkoResidualBlock from . import resnet class BasicDecoder(nn.Module): def __init__(self, in_planes, layers, block=resnet.BasicBlock, plane_dilation=2, upsampling_mode="trilinear", upsampling_scale=2):...
{ "repo_name": "ellisdg/3DUnetCNN", "path": "unet3d/models/pytorch/classification/decoder.py", "copies": "1", "size": "8019", "license": "mit", "hash": 8371905371162251000, "line_mean": 48.5, "line_max": 119, "alpha_frac": 0.5771293179, "autogenerated": false, "ratio": 3.8645783132530123, "confi...
from functools import partial from .translation import _ class OriginalQuerysetMixin(object): def get_queryset(self, request): """Returns a QuerySet of all model instances without default manager 'objects' that can be edited by the admin site. This is used by changelist_view.""" ...
{ "repo_name": "mtrgroup/django-mtr-utils", "path": "mtr/utils/admin.py", "copies": "1", "size": "1560", "license": "mit", "hash": -5061417589292999000, "line_mean": 27.8888888889, "line_max": 68, "alpha_frac": 0.5955128205, "autogenerated": false, "ratio": 4.521739130434782, "config_test": fals...
from functools import partial from twisted.internet.defer import inlineCallbacks, succeed, fail from vumi.tests.helpers import VumiTestCase from vumi.transports.failures import PermanentFailure from vumi.transports.parlayx_ussd import ParlayXUSSDTransport from vumi.transports.parlayx_ussd.client import PolicyExcepti...
{ "repo_name": "TouK/vumi", "path": "vumi/transports/parlayx_ussd/tests/test_parlayx.py", "copies": "1", "size": "7652", "license": "bsd-3-clause", "hash": 1654363236144027000, "line_mean": 37.4522613065, "line_max": 81, "alpha_frac": 0.6301620491, "autogenerated": false, "ratio": 3.96066252587991...
from functools import partial from twisted.internet import defer, task from twisted.internet.error import ConnectionDone from twisted.internet.protocol import DatagramProtocol from twisted.names import dns from twisted.python.failure import Failure from twisted.trial import unittest from dnsagent.app import App from ...
{ "repo_name": "account-login/dnsagent", "path": "dnsagent/tests/test_bugfix_resolver.py", "copies": "1", "size": "6622", "license": "mit", "hash": -1528304451844030700, "line_mean": 28.3008849558, "line_max": 88, "alpha_frac": 0.6650558744, "autogenerated": false, "ratio": 3.838840579710145, "c...
from functools import partial from twisted.python import log from bl.debug import DEBUG class PageWidget(object): addressPattern = None def __init__(self, receiver, callbacks=[], page=1): self.receiver = receiver self.page = page self.callbacks = callbacks def _callback(self, ...
{ "repo_name": "djfroofy/beatlounge", "path": "bl/osc/touchosc.py", "copies": "1", "size": "5917", "license": "mit", "hash": -9140468278677423000, "line_mean": 30.3068783069, "line_max": 76, "alpha_frac": 0.5653202636, "autogenerated": false, "ratio": 3.6278356836296752, "config_test": false, ...
from functools import partial from twtxt.mentions import format_mentions def mock_mention_format(name, url, expected_name, expected_url): assert name == expected_name assert url == expected_url if name: return '@' + name else: return name def test_format_mentions(): texts = {'No...
{ "repo_name": "buckket/twtxt", "path": "tests/test_mentions.py", "copies": "1", "size": "2024", "license": "mit", "hash": 8221774495463207000, "line_mean": 35.1428571429, "line_max": 117, "alpha_frac": 0.5839920949, "autogenerated": false, "ratio": 3.6600361663652805, "config_test": false, "h...
from functools import partial from typing import Callable, Any, TypeVar, Generic from .typing import Functor from .typing import Monad from .typing import Applicative TEnv = TypeVar("TEnv") TSource = TypeVar("TSource") TResult = TypeVar("TResult") class Reader(Generic[TEnv, TSource]): """The Reader monad. ...
{ "repo_name": "dbrattli/OSlash", "path": "oslash/reader.py", "copies": "1", "size": "4527", "license": "apache-2.0", "hash": 4073795968712686000, "line_mean": 28.3961038961, "line_max": 100, "alpha_frac": 0.5875855975, "autogenerated": false, "ratio": 3.781954887218045, "config_test": false, ...
from functools import partial from ubuntui.utils import Color, Padding from ubuntui.widgets.hr import HR from ubuntui.widgets.input import Selector from urwid import ( BoxAdapter, CheckBox, Columns, Edit, Filler, Frame, Pile, Text, WidgetWrap ) from conjureup.app_config import app ...
{ "repo_name": "conjure-up/conjure-up", "path": "conjureup/ui/views/base.py", "copies": "2", "size": "17285", "license": "mit", "hash": 2075046830455840500, "line_mean": 34.060851927, "line_max": 78, "alpha_frac": 0.5468325137, "autogenerated": false, "ratio": 4.2742334322453015, "config_test": ...
from functools import partial from ..utils import isort_test attrs_isort_test = partial(isort_test, profile="attrs") def test_attrs_code_snippet_one(): attrs_isort_test( """from __future__ import absolute_import, division, print_function import sys from functools import partial from . import converte...
{ "repo_name": "PyCQA/isort", "path": "tests/unit/profiles/test_attrs.py", "copies": "1", "size": "1845", "license": "mit", "hash": -315460365857581700, "line_mean": 17.0882352941, "line_max": 75, "alpha_frac": 0.6764227642, "autogenerated": false, "ratio": 3.5755813953488373, "config_test": tru...
from functools import partial from ..utils import isort_test django_isort_test = partial(isort_test, profile="django", known_first_party=["django"]) def test_django_snippet_one(): django_isort_test( """import copy import inspect import warnings from functools import partialmethod from itertools import c...
{ "repo_name": "PyCQA/isort", "path": "tests/unit/profiles/test_django.py", "copies": "1", "size": "3741", "license": "mit", "hash": -2340259936317739000, "line_mean": 29.6639344262, "line_max": 87, "alpha_frac": 0.7626303128, "autogenerated": false, "ratio": 3.996794871794872, "config_test": tr...
from functools import partial from ..utils import isort_test google_isort_test = partial(isort_test, profile="google") def test_google_code_snippet_shared_example(): """Tests snippet examples directly shared with the isort project. See: https://github.com/PyCQA/isort/issues/1486. """ google_isort_te...
{ "repo_name": "PyCQA/isort", "path": "tests/unit/profiles/test_google.py", "copies": "1", "size": "13379", "license": "mit", "hash": 2650775435499632000, "line_mean": 31.3946731235, "line_max": 103, "alpha_frac": 0.7600717542, "autogenerated": false, "ratio": 3.9806605177030647, "config_test": ...
from functools import partial from ..utils import isort_test plone_isort_test = partial(isort_test, profile="plone") def test_plone_code_snippet_one(): plone_isort_test( """# -*- coding: utf-8 -*- from plone.app.multilingual.testing import PLONE_APP_MULTILINGUAL_PRESET_FIXTURE # noqa from plone.app.rob...
{ "repo_name": "PyCQA/isort", "path": "tests/unit/profiles/test_plone.py", "copies": "1", "size": "2280", "license": "mit", "hash": 5475636919671588000, "line_mean": 29.4, "line_max": 88, "alpha_frac": 0.7872807018, "autogenerated": false, "ratio": 3.449319213313162, "config_test": true, "has_...
from functools import partial from ..utils import isort_test pycharm_isort_test = partial(isort_test, profile="pycharm") def test_pycharm_snippet_one(): pycharm_isort_test( """import shutil import sys from io import StringIO from pathlib import Path from typing import ( Optional, TextIO, Uni...
{ "repo_name": "PyCQA/isort", "path": "tests/unit/profiles/test_pycharm.py", "copies": "1", "size": "1121", "license": "mit", "hash": -8205352681625555000, "line_mean": 19.3818181818, "line_max": 79, "alpha_frac": 0.6966993756, "autogenerated": false, "ratio": 3.4281345565749235, "config_test": ...
from functools import partial from .utils import make_caller, async_partial, Undefined class BaseMaker: __slots__ = ('_name', '_mediator_factory') def __delete__(self, instance): raise AttributeError('Attribute cannot be deleted') def __set_name__(self, owner, name): self._name = name ...
{ "repo_name": "palankai/baluster", "path": "src/baluster/makers.py", "copies": "1", "size": "4343", "license": "mit", "hash": 296506178279214460, "line_mean": 27.385620915, "line_max": 78, "alpha_frac": 0.5650472024, "autogenerated": false, "ratio": 4.200193423597679, "config_test": false, "h...
from functools import partial from .validator import CerberusValidator from .error import ValidationError def load(schema, validator, update, request): if update is None: update = False if request.method == "PUT" or request.method == "PATCH": update = True v = validator(request=re...
{ "repo_name": "morepath/more.cerberus", "path": "more/cerberus/loader.py", "copies": "1", "size": "1504", "license": "bsd-3-clause", "hash": -6849468244112813000, "line_mean": 36.6, "line_max": 77, "alpha_frac": 0.6914893617, "autogenerated": false, "ratio": 4.372093023255814, "config_test": fa...
from functools import partial from validator import decorator from validator import metadata_helpers @decorator.register_test(tier=1) def test_manifest_json_params(err, xpi_manifest=None): if err.get_resource('has_manifest_json'): validate_required_id(err) validate_required_field(err, 'name', val...
{ "repo_name": "mstriemer/amo-validator", "path": "validator/testcases/manifestjson.py", "copies": "1", "size": "1588", "license": "bsd-3-clause", "hash": -2290752387873787100, "line_mean": 33.5217391304, "line_max": 79, "alpha_frac": 0.6826196474, "autogenerated": false, "ratio": 3.82650602409638...
from functools import partial from validator import decorator from validator import metadata_helpers @decorator.register_test(tier=1) def test_package_json_params(err, xpi_package=None): if err.get_resource('has_package_json'): validate_required_field(err, 'id', validate_id) validate_required_fie...
{ "repo_name": "magopian/amo-validator", "path": "validator/testcases/packagejson.py", "copies": "5", "size": "1116", "license": "bsd-3-clause", "hash": 7636792244210592000, "line_mean": 35, "line_max": 78, "alpha_frac": 0.6872759857, "autogenerated": false, "ratio": 3.86159169550173, "config_te...
from functools import partial from whoosh.qparser import default from whoosh.query import compound, ranges, terms from whoosh.query.wrappers import Not from whoosh.qparser import plugins from sqlalchemy.sql import and_, or_, not_, sqltypes from sqlalchemy.sql.expression import bindparam class ParserError(ValueError...
{ "repo_name": "tehmaze-labs/mountain", "path": "mountain/query/parser.py", "copies": "1", "size": "3467", "license": "mit", "hash": -1435145874483246000, "line_mean": 29.6814159292, "line_max": 77, "alpha_frac": 0.5791750793, "autogenerated": false, "ratio": 4.4335038363171355, "config_test": f...
from functools import partial from wtforms import BooleanField, validators, HiddenField, widgets, StringField, DateField, TextAreaField from wtforms import SelectField as SelectFieldW from wtforms.ext.sqlalchemy.fields import QuerySelectField from wtforms_alchemy import ModelFieldList from dexter.forms import ModelFo...
{ "repo_name": "Code4SA/mma-dexter", "path": "dexter/analysis/forms.py", "copies": "1", "size": "11836", "license": "apache-2.0", "hash": 6784642379375105000, "line_mean": 42.04, "line_max": 149, "alpha_frac": 0.6370395404, "autogenerated": false, "ratio": 3.7754385964912283, "config_test": fals...
from functools import partial from zipline.utils.compat import mappingproxy def _make_metrics_set_core(): """Create a family of metrics sets functions that read from the same metrics set mapping. Returns ------- metrics_sets : mappingproxy The mapping of metrics sets to load functions. ...
{ "repo_name": "quantopian/zipline", "path": "zipline/finance/metrics/core.py", "copies": "1", "size": "2972", "license": "apache-2.0", "hash": -4834133303947294000, "line_mean": 27.0377358491, "line_max": 80, "alpha_frac": 0.5730148048, "autogenerated": false, "ratio": 5.011804384485666, "confi...
from functools import partial import asyncio import theblues.charmstore import theblues.errors class CharmStore: """ Async wrapper around theblues.charmstore.CharmStore """ def __init__(self, loop, cs_timeout=20): self.loop = loop self._cs = theblues.charmstore.CharmStore(timeout=cs_t...
{ "repo_name": "juju/python-libjuju", "path": "juju/charmstore.py", "copies": "1", "size": "1188", "license": "apache-2.0", "hash": -1858997365103037700, "line_mean": 31.1081081081, "line_max": 77, "alpha_frac": 0.5378787879, "autogenerated": false, "ratio": 4.304347826086956, "config_test": fal...