text
stringlengths
0
1.05M
meta
dict
from functools import partial import os import unittest from nose.tools import assert_equal, assert_list_equal, nottest, raises from py_stringmatching.tokenizer.delimiter_tokenizer import DelimiterTokenizer from py_stringmatching.tokenizer.qgram_tokenizer import QgramTokenizer from six import iteritems import pandas a...
{ "repo_name": "anhaidgroup/py_stringsimjoin", "path": "py_stringsimjoin/tests/test_join.py", "copies": "1", "size": "32925", "license": "bsd-3-clause", "hash": 9047506546981536000, "line_mean": 46.3060344828, "line_max": 104, "alpha_frac": 0.5162034928, "autogenerated": false, "ratio": 3.70818785...
from functools import partial import os import unittest import nose import numpy as np try: import matplotlib.pyplot as plt except ImportError: pass from hyperopt import pyll from hyperopt.pyll import scope from hyperopt import Trials from hyperopt.base import miscs_to_idxs_vals, STATUS_OK from hyperopt i...
{ "repo_name": "dallascard/hyperopt", "path": "hyperopt/tests/test_tpe.py", "copies": "7", "size": "23399", "license": "bsd-3-clause", "hash": 512372169384028700, "line_mean": 29.5071707953, "line_max": 78, "alpha_frac": 0.4914312577, "autogenerated": false, "ratio": 3.2399612295762945, "config_...
from functools import partial import os import warnings import numpy as np from scipy import sparse, linalg, stats from numpy.testing import (assert_equal, assert_array_equal, assert_array_almost_equal) from nose.tools import assert_true, assert_raises from mne.parallel import _force_serial...
{ "repo_name": "nicproulx/mne-python", "path": "mne/stats/tests/test_cluster_level.py", "copies": "3", "size": "20846", "license": "bsd-3-clause", "hash": -8897307510832922000, "line_mean": 42.7023060797, "line_max": 95, "alpha_frac": 0.5498416962, "autogenerated": false, "ratio": 3.65078809106830...
from functools import partial import os from django.contrib.auth import get_user_model from django.contrib.sites.models import Site from django.core.urlresolvers import reverse from django.test import TestCase from django.test.utils import override_settings from .factories import UserFactory, VoterFactory, SiteFactor...
{ "repo_name": "caktus/django-opendebates", "path": "opendebates/tests/test_registration.py", "copies": "1", "size": "6816", "license": "apache-2.0", "hash": -6475071851491655000, "line_mean": 38.1724137931, "line_max": 90, "alpha_frac": 0.6132629108, "autogenerated": false, "ratio": 3.88597491448...
from functools import partial import os import cobble from .. import results, lists, zips from .document_xml import read_document_xml_element from .content_types_xml import empty_content_types, read_content_types_xml_element from .relationships_xml import read_relationships_xml_element, Relationships from .numbering_...
{ "repo_name": "mwilliamson/python-mammoth", "path": "mammoth/docx/__init__.py", "copies": "1", "size": "6342", "license": "bsd-2-clause", "hash": 3352100776425140000, "line_mean": 29.9365853659, "line_max": 120, "alpha_frac": 0.6542100284, "autogenerated": false, "ratio": 3.5749718151071024, "c...
from functools import partial import os import numpy as np from six.moves import range from tqdm import tqdm from cloudfiles import CloudFiles, reset_connection_pools, compression from cloudvolume import lib, chunks from cloudvolume.exceptions import AlignmentError from cloudvolume.lib import ( mkdir, clamp, xyzr...
{ "repo_name": "seung-lab/cloud-volume", "path": "cloudvolume/datasource/precomputed/image/tx.py", "copies": "1", "size": "10525", "license": "bsd-3-clause", "hash": 4800593986127833000, "line_mean": 27.3692722372, "line_max": 103, "alpha_frac": 0.6658432304, "autogenerated": false, "ratio": 3.418...
from functools import partial import os import numpy as np from sklearn.preprocessing import LabelEncoder from .. import SDC, NuSDC, Features data_dir = os.path.join(os.path.dirname(__file__), 'data') ################################################################################ # TODO: add *real* tests def _ch...
{ "repo_name": "dougalsutherland/py-sdm", "path": "sdm/tests/test_sdm.py", "copies": "1", "size": "1555", "license": "bsd-3-clause", "hash": -108620780588993180, "line_mean": 30.7346938776, "line_max": 80, "alpha_frac": 0.4655948553, "autogenerated": false, "ratio": 3.684834123222749, "config_te...
from functools import partial import os.path import sys import time from clint.textui import colored, puts import git from blame import is_older_than, Blame class FormatterBase(object): def __init__(self, directory, min_lines, months, stream=sys.stdout): """ Coloring of dates will depend on how...
{ "repo_name": "saucelabs/docrot", "path": "docrot/formatter.py", "copies": "1", "size": "4429", "license": "apache-2.0", "hash": 8005039712178454000, "line_mean": 31.3284671533, "line_max": 77, "alpha_frac": 0.5513659968, "autogenerated": false, "ratio": 3.7438715131022824, "config_test": false...
from functools import partial import os.path def deleteContent(pfile): pfile.seek(0) pfile.truncate() def next_move(bot_x, bot_y, board): is_present = os.path.isfile('bot-building.txt') if is_present: f = open('bot-building.txt', 'r+') else: f = open('bot-building.txt', 'w') ...
{ "repo_name": "spradeepv/dive-into-python", "path": "hackerrank/domain/artificial_intelligence/bot_building/bot_clean_partially_observable.py", "copies": "1", "size": "2274", "license": "mit", "hash": -7391442541459939000, "line_mean": 27.7848101266, "line_max": 71, "alpha_frac": 0.437994723, "auto...
from functools import partial import pandas as pd # the following functions should be easy: # a function that just gets all the component collections it requires. # useful for pandas. # a function that gets the component collections, filtered by the # intersection of entity_id. Useful for Python, not useful for pand...
{ "repo_name": "faassen/secundus", "path": "secundus/registry.py", "copies": "1", "size": "8757", "license": "bsd-3-clause", "hash": 3366596166881506300, "line_mean": 32.9418604651, "line_max": 79, "alpha_frac": 0.6399451867, "autogenerated": false, "ratio": 4.2717073170731705, "config_test": fa...
from functools import partial import pickle import argparse import googlemaps from multiprocessing import Pool def get_arguments(): parser = argparse.ArgumentParser(description='') parser.add_argument('--filtered_photo_metadata', type=str, default="filtered_photo_metadata.pkl") parser.add_argument('--googl...
{ "repo_name": "google/eclipse2017", "path": "src/export_eclipse_dataset/determine_state.py", "copies": "1", "size": "1509", "license": "apache-2.0", "hash": 391825703004229400, "line_mean": 33.2954545455, "line_max": 101, "alpha_frac": 0.6348575215, "autogenerated": false, "ratio": 3.801007556675...
from functools import partial import pprint import click from jarvis_cli import file_helper as fh from jarvis_cli import client, formatting from jarvis_cli.client import log_entry as cle @click.group(name="show") def do_action_show(): """Display a Jarvis resource""" pass def _get_and_show_resource(conn, get_f...
{ "repo_name": "clb6/jarvis-cli", "path": "jarvis_cli/commands/action_show.py", "copies": "1", "size": "1702", "license": "apache-2.0", "hash": 3481766801354754000, "line_mean": 29.9454545455, "line_max": 76, "alpha_frac": 0.678613396, "autogenerated": false, "ratio": 3.1460258780036967, "config...
from functools import partial import pprint import click import jarvis_cli as jc from jarvis_cli import client, config, formatting from jarvis_cli import file_helper as fh from jarvis_cli import interactive as jci from jarvis_cli.client import log_entry as cle @click.group(name="edit") def do_action_edit(): """Ed...
{ "repo_name": "clb6/jarvis-cli", "path": "jarvis_cli/commands/action_edit.py", "copies": "1", "size": "3923", "license": "apache-2.0", "hash": 448289813507053060, "line_mean": 33.4122807018, "line_max": 84, "alpha_frac": 0.645679327, "autogenerated": false, "ratio": 3.5152329749103943, "config_...
from functools import partial import pyecore.ecore as Ecore from pyecore.ecore import * name = 'library' nsURI = 'http://emf.wikipedia.org/2011/Library' nsPrefix = 'lib' eClass = EPackage(name=name, nsURI=nsURI, nsPrefix=nsPrefix) eClassifiers = {} getEClassifier = partial(Ecore.getEClassifier, searchspace=eClassifi...
{ "repo_name": "pyecore/pyecore", "path": "examples/library/library.py", "copies": "4", "size": "2728", "license": "bsd-3-clause", "hash": -7601238010249333000, "line_mean": 29.3111111111, "line_max": 100, "alpha_frac": 0.6257331378, "autogenerated": false, "ratio": 3.8422535211267608, "config_t...
from functools import partial import random from typing import Iterable, Callable from mockfirestore._helpers import generate_random_string, Timestamp from mockfirestore.document import DocumentReference, DocumentSnapshot from mockfirestore.query import Query MAX_ATTEMPTS = 5 _MISSING_ID_TEMPLATE = "The transaction ha...
{ "repo_name": "mdowds/python-mock-firestore", "path": "mockfirestore/transaction.py", "copies": "1", "size": "3794", "license": "mit", "hash": -5158213225358560000, "line_mean": 30.8823529412, "line_max": 106, "alpha_frac": 0.6278334212, "autogenerated": false, "ratio": 4.010570824524313, "conf...
from functools import partial import random import string class DockerBuildCommand(object): """ Generates a `docker build` command to run in a subprocess. """ def __init__(self, docker_repo, tag, dockerfile='Dockerfile', build_args=None): self.docker_repo = docker_repo self.tag = tag ...
{ "repo_name": "dcosson/parallel-ci-runner", "path": "parallel_ci_runner/docker_commands.py", "copies": "1", "size": "4006", "license": "mit", "hash": 4909173378530065000, "line_mean": 37.5192307692, "line_max": 89, "alpha_frac": 0.6095856216, "autogenerated": false, "ratio": 3.7265116279069765, ...
from functools import partial import random from adder.utils import InvalidArgumentError class Node: def __init__(self, state, parent, action, path_cost): self.__state = state self.__parent = parent self.__action = action self.__path_cost = path_cost def __eq__(self, other): ...
{ "repo_name": "NikolaDimitroff/Adder", "path": "adder/problem.py", "copies": "1", "size": "8207", "license": "mit", "hash": -2043770520185591000, "line_mean": 28.6281588448, "line_max": 77, "alpha_frac": 0.5793834531, "autogenerated": false, "ratio": 3.923040152963671, "config_test": true, "h...
from functools import partial import random from typing import Any, Callable, Dict, List, Optional, Set, Tuple, \ Type, TypeVar, Union from unittest import loader, runner from unittest.result import TestResult from django.conf import settings from django.db import connections, ProgrammingError from django.urls.re...
{ "repo_name": "rht/zulip", "path": "zerver/lib/test_runner.py", "copies": "1", "size": "25531", "license": "apache-2.0", "hash": 7287917159464103000, "line_mean": 41.4808652246, "line_max": 135, "alpha_frac": 0.6348360816, "autogenerated": false, "ratio": 4.0551143583227445, "config_test": true...
from functools import partial import random import django import jsonfield from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.models import UserManager from django.contrib.sites.models import Site from django.db import models, connection from django.db.models.field...
{ "repo_name": "maroux/django-relationships", "path": "relationships/models.py", "copies": "1", "size": "12897", "license": "mit", "hash": -7406760327028736000, "line_mean": 34.5289256198, "line_max": 101, "alpha_frac": 0.6138636892, "autogenerated": false, "ratio": 4.253627968337731, "config_te...
from functools import partial import random # better named alias, used as gen.* in templates integer = random.randint choice = random.choice def var_name(n=1): var_names = ['x', 'y', 'z'] if n == 1: return random.choice(var_names) return random.sample(var_names, n) def nested_list(length=2, su...
{ "repo_name": "alexandershov/pydrill", "path": "pydrill/gen.py", "copies": "1", "size": "1772", "license": "mit", "hash": 1411112346630083000, "line_mean": 25.8484848485, "line_max": 95, "alpha_frac": 0.6286681716, "autogenerated": false, "ratio": 3.5228628230616303, "config_test": false, "ha...
from functools import partial import random class GameOverException(Exception): def __init__(self, board): self.score = board.score def board_move(move_func): def wrapper(*args, **kwargs): board = args[0] board.move_count += 1 board_state_before = board.serialize() r...
{ "repo_name": "mamachanko/2048", "path": "p2048.py", "copies": "1", "size": "5068", "license": "mit", "hash": 3673080489496234500, "line_mean": 25.2590673575, "line_max": 79, "alpha_frac": 0.5623520126, "autogenerated": false, "ratio": 4.0414673046252, "config_test": false, "has_no_keywords":...
from functools import partial import re from .exceptions import UnknownFPSError from .ssaevent import SSAEvent from .ssastyle import SSAStyle from .formatbase import FormatBase from .substation import parse_tags from .time import ms_to_frames, frames_to_ms #: Matches a MicroDVD line. MICRODVD_LINE = re.compile(r" *\{ ...
{ "repo_name": "tkarabela/pysubs2", "path": "pysubs2/microdvd.py", "copies": "1", "size": "3786", "license": "mit", "hash": -9045680592102676000, "line_mean": 35.7572815534, "line_max": 88, "alpha_frac": 0.5192815637, "autogenerated": false, "ratio": 3.816532258064516, "config_test": false, "h...
from functools import partial import re from gooey.gui.lang import i18n from gooey.gui.util.filedrop import FileDrop from gooey.gui.util.quoting import maybe_quote __author__ = 'Chris' from abc import ABCMeta, abstractmethod import os import wx import wx.lib.agw.multidirdialog as MDD from gooey.gui.widgets.calender...
{ "repo_name": "lrq3000/pyFileFixity", "path": "pyFileFixity/lib/gooey/gui/widgets/widget_pack.py", "copies": "1", "size": "6102", "license": "mit", "hash": 741055081364891800, "line_mean": 27.3813953488, "line_max": 199, "alpha_frac": 0.6738774172, "autogenerated": false, "ratio": 3.4474576271186...
from functools import partial import re import logging from collections import OrderedDict import io import six SEND = 'SEND' CONNECT = 'CONNECT' MESSAGE = 'MESSAGE' ERROR = 'ERROR' CONNECTED = 'CONNECTED' SUBSCRIBE = 'SUBSCRIBE' UNSUBSCRIBE = 'UNSUBSCRIBE' BEGIN = 'BEGIN' COMMIT = 'COMMIT' ABORT = 'ABORT' ACK = 'ACK...
{ "repo_name": "sekikn/ambari", "path": "ambari-common/src/test/python/coilmq/util/frames.py", "copies": "3", "size": "11110", "license": "apache-2.0", "hash": 7504226794579157000, "line_mean": 29.9470752089, "line_max": 167, "alpha_frac": 0.5883888389, "autogenerated": false, "ratio": 4.003603603...
from functools import partial import re import logging from sets import Set import lib.visit as v import lib.const as C from .. import util from ..meta import methods, classes, class_lookup from ..meta.template import Template from ..meta.clazz import Clazz from ..meta.method import Method, find_formals from ..meta.f...
{ "repo_name": "plum-umd/pasket", "path": "pasket/decode/accessor_uni.py", "copies": "1", "size": "8646", "license": "mit", "hash": 929165180315926700, "line_mean": 31.75, "line_max": 120, "alpha_frac": 0.5931066389, "autogenerated": false, "ratio": 3.136017410228509, "config_test": false, "ha...
from functools import partial import re import logging import lib.visit as v import lib.const as C from .. import util from ..meta import methods, class_lookup from ..meta.template import Template from ..meta.clazz import Clazz from ..meta.method import Method from ..meta.field import Field from ..meta.statement impo...
{ "repo_name": "plum-umd/pasket", "path": "pasket/decode/adapter.py", "copies": "1", "size": "4384", "license": "mit", "hash": -4846524842747567000, "line_mean": 27.6535947712, "line_max": 96, "alpha_frac": 0.6222627737, "autogenerated": false, "ratio": 3.15850144092219, "config_test": false, ...
from functools import partial import re import sys import logging import flatdict import collections import os logger = logging.getLogger(__name__) def resolve_yamls(yaml_templates, environ=os.environ): logger.debug("Merging following yaml_templates: %s" % yaml_templates) logger.debug("Using environ: %s" % env...
{ "repo_name": "armory-io/yaml-tools", "path": "yamltools/resolver.py", "copies": "1", "size": "2057", "license": "apache-2.0", "hash": -3616460210970553000, "line_mean": 36.4, "line_max": 86, "alpha_frac": 0.6217792902, "autogenerated": false, "ratio": 3.7882136279926337, "config_test": false, ...
from functools import partial import re import sys try: import colorama colorama.init() pre = (colorama.Fore.CYAN + colorama.Style.BRIGHT + "AutoImport: " + colorama.Style.NORMAL + colorama.Fore.WHITE) except: pre = "AutoImport: " common_others = {"pd": "pandas", "np": "numpy", "sp": "...
{ "repo_name": "OrangeFlash81/ipython-auto-import", "path": "import_wrapper.py", "copies": "1", "size": "3786", "license": "mit", "hash": -8184834965980081000, "line_mean": 35.0571428571, "line_max": 86, "alpha_frac": 0.4936608558, "autogenerated": false, "ratio": 4.397212543554007, "config_test...
from functools import partial import re import uuid from caliper import metric, reservoir, snapshot from caliper.metric import ( Counter, EWMA, Gauge, Histogram, Meter, Timer, ) from caliper.reservoir import ( ExponentiallyDecayingReservoir, Reservoir, SlidingWindowReservoir, U...
{ "repo_name": "blubber/caliper", "path": "caliper/__init__.py", "copies": "1", "size": "1736", "license": "apache-2.0", "hash": -5077252275924904000, "line_mean": 26.125, "line_max": 87, "alpha_frac": 0.6394009217, "autogenerated": false, "ratio": 3.1853211009174314, "config_test": false, "ha...
from functools import partial import re from streamlink.plugin import Plugin from streamlink.plugin.api import http, validate from streamlink.stream import HDSStream, HLSStream, HTTPStream from streamlink.utils import parse_json, update_scheme class Bloomberg(Plugin): VOD_API_URL = 'https://www.bloomberg.com/api...
{ "repo_name": "javiercantero/streamlink", "path": "src/streamlink/plugins/bloomberg.py", "copies": "1", "size": "5104", "license": "bsd-2-clause", "hash": -8962499869759382000, "line_mean": 34.4444444444, "line_max": 120, "alpha_frac": 0.484130094, "autogenerated": false, "ratio": 3.8318318318318...
from functools import partial import re from streamlink.plugin import Plugin from streamlink.plugin.api import validate from streamlink.stream import HDSStream, HLSStream, HTTPStream from streamlink.utils import parse_json, update_scheme class Bloomberg(Plugin): VOD_API_URL = 'https://www.bloomberg.com/api/embed...
{ "repo_name": "back-to/streamlink", "path": "src/streamlink/plugins/bloomberg.py", "copies": "1", "size": "5163", "license": "bsd-2-clause", "hash": 3650728214076073000, "line_mean": 34.8541666667, "line_max": 120, "alpha_frac": 0.4884756924, "autogenerated": false, "ratio": 3.8244444444444445, ...
from functools import partial import re import iso3166 from schwifty.common import Base from schwifty import registry _bic_re = re.compile(r'[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}(?:[A-Z0-9]{3})?') class BIC(Base): """The BIC object. Examples: You can either create a new BIC object by providing a code as t...
{ "repo_name": "figo-connect/schwifty", "path": "schwifty/bic.py", "copies": "1", "size": "5372", "license": "mit", "hash": 1469489582286984400, "line_mean": 31.3614457831, "line_max": 93, "alpha_frac": 0.5558451229, "autogenerated": false, "ratio": 3.9645756457564576, "config_test": false, "h...
from functools import partial import re import sublime from Vintageous import PluginLogger from Vintageous.state import _init_vintageous from Vintageous.state import State from Vintageous.vi import cmd_base from Vintageous.vi import cmd_defs from Vintageous.vi import mappings from Vintageous.vi import search from Vin...
{ "repo_name": "himacro/Vintageous", "path": "xactions.py", "copies": "5", "size": "97859", "license": "mit", "hash": -3382807985632849400, "line_mean": 33.3124123422, "line_max": 138, "alpha_frac": 0.5296293647, "autogenerated": false, "ratio": 3.83896277117414, "config_test": false, "has_no_...
from functools import partial import re """ This class is used to simulate MIPS. It does several things: 1) Binds variable names to registers 2) Verification of variable bindings 3) simulate the stack in a MIPS processer. """ class RegisterNotDefined(Exception): def __init__(self, register): self.val...
{ "repo_name": "mrForce/VarSPIM", "path": "MIPSMachine.py", "copies": "1", "size": "8972", "license": "mit", "hash": 5394025578687420000, "line_mean": 35.1774193548, "line_max": 214, "alpha_frac": 0.6238296924, "autogenerated": false, "ratio": 4.272380952380952, "config_test": false, "has_no_k...
from functools import partial import requests DEFAULT_ROOT_RES_PATH = '/' class HTTPResponse(object): """ Wrapper around :class:`requests.Response`. Parses ``Content-Type`` header and makes it available as a list of fields in the :attr:`content_type` member. """ def __init__(self, raw_resp...
{ "repo_name": "diranged/python-rightscale-1", "path": "rightscale/httpclient.py", "copies": "1", "size": "3055", "license": "mit", "hash": -6655988466710524000, "line_mean": 32.5714285714, "line_max": 79, "alpha_frac": 0.6, "autogenerated": false, "ratio": 3.99869109947644, "config_test": false...
from functools import partial import sdl2ui import sdl2ui.mixins from meldnafen.config.controls import Controls from .list_roms import ListRoms from .menu import Menu class Emulator(sdl2ui.Component, sdl2ui.mixins.ImmutableMixin): def init(self): self.logger.debug( "Loading emulator %s: %d pl...
{ "repo_name": "cecton/meldnafen", "path": "meldnafen/emulator/__init__.py", "copies": "1", "size": "4391", "license": "mit", "hash": 846114970417691500, "line_mean": 37.1826086957, "line_max": 79, "alpha_frac": 0.5055795946, "autogenerated": false, "ratio": 4.209971236816874, "config_test": tru...
from functools import partial import simplejson as json import os import tempfile from celery.exceptions import RetryTaskError from celery.task import task import pandas as pd from bamboo.lib.async import call_async from bamboo.lib.datetools import recognize_dates from bamboo.lib.schema_builder import filter_schema ...
{ "repo_name": "pld/bamboo", "path": "bamboo/lib/readers.py", "copies": "2", "size": "3579", "license": "bsd-3-clause", "hash": -2309678361377404000, "line_mean": 28.0975609756, "line_max": 78, "alpha_frac": 0.6275495949, "autogenerated": false, "ratio": 4.057823129251701, "config_test": false, ...
from functools import partial import six from django.conf import settings from django.contrib.auth import get_permission_codename from django_auth_ldap.backend import LDAPBackend class NestedLDAPGroupsBackend(LDAPBackend): use_reconnecting_client = getattr( settings, 'BAYA_USE_RECONNECTING_CLIENT', Fals...
{ "repo_name": "counsyl/baya", "path": "baya/backend.py", "copies": "1", "size": "3862", "license": "mit", "hash": -7457249613857194000, "line_mean": 41.4395604396, "line_max": 79, "alpha_frac": 0.6481097877, "autogenerated": false, "ratio": 4.319910514541387, "config_test": false, "has_no_key...
from functools import partial import six from google.appengine.ext import ndb from google.appengine.ext.db import BadArgumentError, Timeout from google.appengine.runtime import DeadlineExceededError from graphql_relay import to_global_id from graphql_relay.connection.connectiontypes import Edge from graphene import A...
{ "repo_name": "graphql-python/graphene-gae", "path": "graphene_gae/ndb/fields.py", "copies": "2", "size": "8224", "license": "bsd-3-clause", "hash": 8032684937732383000, "line_mean": 31.5059288538, "line_max": 151, "alpha_frac": 0.6163667315, "autogenerated": false, "ratio": 3.837610825944937, ...
from functools import partial import StringIO import os import sys DEVNULL = open(os.devnull, 'w') class Record(object): def __init__(self, *fds): self.dupe = StringIO.StringIO() self.them = fds self.fileno = partial(self._dupe, 'fileno') self.flush = partial(self._both...
{ "repo_name": "tehmaze/capture", "path": "capture/__init__.py", "copies": "1", "size": "2984", "license": "mit", "hash": 213223109299858600, "line_mean": 25.407079646, "line_max": 62, "alpha_frac": 0.5733914209, "autogenerated": false, "ratio": 3.7393483709273183, "config_test": false, "has_n...
from functools import partial import subprocess from time import sleep from kivy.clock import Clock from kivy.properties import StringProperty from kivy.uix.stacklayout import StackLayout from service.lib.smbutils import smb_connect __author__ = "Nicklas Boerjesson" import ConfigParser import re from kivy.lib impor...
{ "repo_name": "OptimalBPM/optimal_file_sync", "path": "gui/settings.py", "copies": "1", "size": "7100", "license": "apache-2.0", "hash": 3134778117671585300, "line_mean": 36.9679144385, "line_max": 162, "alpha_frac": 0.5991549296, "autogenerated": false, "ratio": 4.0781160252728315, "config_tes...
from functools import partial import subprocess import tornado.ioloop import tornado.web import tempfile import os import base64 from tornado.log import enable_pretty_logging def execute_cmd(cmd, **kwargs): """ Call given command, yielding output line by line """ kwargs["stdout"] = subprocess.PIPE ...
{ "repo_name": "yuvipanda/paws", "path": "images/deploy-hook/app.py", "copies": "1", "size": "3016", "license": "mit", "hash": 6438394966548442000, "line_mean": 28.8613861386, "line_max": 77, "alpha_frac": 0.5281830239, "autogenerated": false, "ratio": 4.1034013605442174, "config_test": false, ...
from functools import partial import sys from nose.tools import assert_equal, assert_greater from nose import SkipTest import asyncio import time as ttime from bluesky import Msg from bluesky.tests.utils import setup_test_run_engine from bluesky.testing.noseclasses import KnownFailureTest RE = setup_test_run_engine() ...
{ "repo_name": "ericdill/bluesky", "path": "bluesky/tests/test_suspenders.py", "copies": "1", "size": "2625", "license": "bsd-3-clause", "hash": -6982440138003081000, "line_mean": 30.25, "line_max": 79, "alpha_frac": 0.6022857143, "autogenerated": false, "ratio": 3.404669260700389, "config_test"...
from functools import partial import sys from PySide2.QtWidgets import * from nebula_libs.nicon import Icon class onOffPushButton(QPushButton): def __init__(self, parent=None, label=None, checked=False): """ Special pushbutton for internal use only really """ QPushButton.__init__(s...
{ "repo_name": "jamesbdunlop/Nebula", "path": "nebula_ui/nMayaui_core/trsChxBox.py", "copies": "2", "size": "4474", "license": "apache-2.0", "hash": 6241864490265388000, "line_mean": 31.1870503597, "line_max": 134, "alpha_frac": 0.6267322307, "autogenerated": false, "ratio": 3.870242214532872, "...
from functools import partial import sys import cherrypy class HandlerException(Exception): def __init__(self, wrapped_exception): self.wrapped_exception = wrapped_exception def raise_wrapped(self): """ Raises the 'wrapped' exception, preserving the original traceback. This mu...
{ "repo_name": "teamfruit/defend_against_fruit", "path": "pypi_redirect/pypi_redirect/server_app/handler/_exception.py", "copies": "1", "size": "1171", "license": "apache-2.0", "hash": -8181259779215959000, "line_mean": 26.880952381, "line_max": 71, "alpha_frac": 0.6464560205, "autogenerated": false...
from functools import partial import sys import textwrap from .loader import Loader from .parser import Parser, Context, Argument from .executor import Executor from .exceptions import Failure, CollectionNotFound, ParseError from .util import debug, pty_size from ._version import __version__ def depth(name): ret...
{ "repo_name": "alex/invoke", "path": "invoke/cli.py", "copies": "1", "size": "5690", "license": "bsd-2-clause", "hash": -7836632194670063000, "line_mean": 33.2771084337, "line_max": 104, "alpha_frac": 0.5808435852, "autogenerated": false, "ratio": 4.1899852724594995, "config_test": false, "ha...
from functools import partial import sys import textwrap from .vendor import six from .context import Context from .loader import Loader from .parser import Parser, Context as ParserContext, Argument from .executor import Executor from .exceptions import Failure, CollectionNotFound, ParseError from .util import debug...
{ "repo_name": "thedrow/invoke", "path": "invoke/cli.py", "copies": "1", "size": "8712", "license": "bsd-2-clause", "hash": -5722951377510803000, "line_mean": 32.1254752852, "line_max": 92, "alpha_frac": 0.5724288338, "autogenerated": false, "ratio": 4.186448822681403, "config_test": false, "h...
from functools import partial import sys import textwrap from .vendor import six from .loader import Loader from .parser import Parser, Context, Argument from .executor import Executor from .exceptions import Failure, CollectionNotFound, ParseError from .util import debug, pty_size from ._version import __version__ ...
{ "repo_name": "mikewesner-wf/glasshouse", "path": "appengine/lib/invoke/cli.py", "copies": "1", "size": "5726", "license": "apache-2.0", "hash": 84474374618056740, "line_mean": 33.703030303, "line_max": 104, "alpha_frac": 0.5798113867, "autogenerated": false, "ratio": 4.149275362318841, "config...
from functools import partial import sys from filesystems import Path import click import filesystems.click from venvs.common import _FILESYSTEM, _ROOT def run( locator, filesystem, binary=None, directory=None, name=None, existing_only=False, ): """ Find the virtualenv associated wit...
{ "repo_name": "Julian/mkenv", "path": "venvs/find.py", "copies": "1", "size": "2381", "license": "mit", "hash": 3457270083925842400, "line_mean": 22.5742574257, "line_max": 79, "alpha_frac": 0.6396472071, "autogenerated": false, "ratio": 3.90327868852459, "config_test": false, "has_no_keyword...
from functools import partial import sys class SpecCommandInGroups(object): """ Given a spec_command, generates the string of the actual command to execute. This class can append data of the group to run by slicing a statically determined list of specs_to_distribute based on the number of ...
{ "repo_name": "dcosson/parallel-ci-runner", "path": "parallel_ci_runner/shell_commands.py", "copies": "1", "size": "3023", "license": "mit", "hash": -2184408096623241500, "line_mean": 36.7875, "line_max": 100, "alpha_frac": 0.6506781343, "autogenerated": false, "ratio": 3.9158031088082903, "con...
from functools import partial import tensorflow as tf from .. import slmc, batch, collections from ..embedding import bidirectional_id_vector_to_embeddings from ..embedding.embeddings import word_embeddings as _word_embeddings from ..dynamic_length import id_vector_to_length from ..softmax import softmax from ..flags ...
{ "repo_name": "raviqqe/tensorflow-extenteten", "path": "extenteten/_experimental/models/attention_sum_reader.py", "copies": "1", "size": "3242", "license": "unlicense", "hash": 7321345860908866000, "line_mean": 34.2391304348, "line_max": 81, "alpha_frac": 0.6196792104, "autogenerated": false, "ra...
from functools import partial import threading import os from PyQt5.QtCore import Qt, QStandardPaths from PyQt5.QtGui import QImage, QBitmap, qRed, qGreen, qBlue from PyQt5.QtWidgets import QGridLayout, QInputDialog, QPushButton from PyQt5.QtWidgets import QVBoxLayout, QLabel from electroncash_gui.qt.util import * fr...
{ "repo_name": "fyookball/electrum", "path": "plugins/trezor/qt.py", "copies": "1", "size": "32125", "license": "mit", "hash": 4931258013632729000, "line_mean": 42.4709066306, "line_max": 209, "alpha_frac": 0.572233463, "autogenerated": false, "ratio": 4.061314791403287, "config_test": false, ...
from functools import partial import threading from PyQt4.Qt import Qt from PyQt4.Qt import QGridLayout, QInputDialog, QPushButton from PyQt4.Qt import QVBoxLayout, QLabel, SIGNAL from electrum_arg_gui.qt.util import * from .plugin import TIM_NEW, TIM_RECOVER, TIM_MNEMONIC from ..hw_wallet.qt import QtHandlerBase, QtP...
{ "repo_name": "argentumproject/electrum-arg", "path": "plugins/trezor/qt_generic.py", "copies": "1", "size": "24633", "license": "mit", "hash": 7361657130939525000, "line_mean": 40.8928571429, "line_max": 81, "alpha_frac": 0.5902244956, "autogenerated": false, "ratio": 4.037534830355679, "confi...
from functools import partial import threading from PyQt4.Qt import Qt from PyQt4.Qt import QGridLayout, QInputDialog, QPushButton from PyQt4.Qt import QVBoxLayout, QLabel, SIGNAL from electrum_cesc_gui.qt.main_window import StatusBarButton from electrum_cesc_gui.qt.util import * from .plugin import TIM_NEW, TIM_RECOV...
{ "repo_name": "Marcdnd/electrum-cesc", "path": "plugins/trezor/qt_generic.py", "copies": "1", "size": "26552", "license": "mit", "hash": -7655816218707595000, "line_mean": 40.748427673, "line_max": 83, "alpha_frac": 0.5929120217, "autogenerated": false, "ratio": 4.029746547275763, "config_test"...
from functools import partial import threading from PyQt4.Qt import Qt from PyQt4.Qt import QGridLayout, QInputDialog, QPushButton from PyQt4.Qt import QVBoxLayout, QLabel, SIGNAL from electrum_dgb_gui.qt.util import * from .plugin import TIM_NEW, TIM_RECOVER, TIM_MNEMONIC from ..hw_wallet.qt import QtHandlerBase, QtP...
{ "repo_name": "protonn/Electrum-Cash", "path": "plugins/trezor/qt_generic.py", "copies": "1", "size": "24633", "license": "mit", "hash": 1907503434839414500, "line_mean": 40.8928571429, "line_max": 81, "alpha_frac": 0.5902244956, "autogenerated": false, "ratio": 4.03422862757943, "config_test":...
from functools import partial import threading from PyQt4.Qt import Qt from PyQt4.Qt import QGridLayout, QInputDialog, QPushButton from PyQt4.Qt import QVBoxLayout, QLabel, SIGNAL from electrum_gui.qt.main_window import StatusBarButton from electrum_gui.qt.util import * from .plugin import TIM_NEW, TIM_RECOVER, TIM_MN...
{ "repo_name": "parkbyte/electrumparkbyte", "path": "plugins/trezor/qt_generic.py", "copies": "7", "size": "26492", "license": "mit", "hash": -6923197251069930000, "line_mean": 40.6540880503, "line_max": 83, "alpha_frac": 0.5922165182, "autogenerated": false, "ratio": 4.035338918507235, "config_...
from functools import partial import threading from PyQt4.Qt import Qt from PyQt4.Qt import QGridLayout, QInputDialog, QPushButton from PyQt4.Qt import QVBoxLayout, QLabel, SIGNAL from electrum_vtc_gui.qt.util import * from .plugin import TIM_NEW, TIM_RECOVER, TIM_MNEMONIC from ..hw_wallet.qt import QtHandlerBase, QtP...
{ "repo_name": "pknight007/electrum-vtc", "path": "plugins/trezor/qt_generic.py", "copies": "2", "size": "24617", "license": "mit", "hash": 260525715068144600, "line_mean": 40.8656462585, "line_max": 81, "alpha_frac": 0.5901206483, "autogenerated": false, "ratio": 4.032929226736567, "config_test...
from functools import partial import threading from PyQt5.QtCore import Qt, pyqtSignal, QRegExp from PyQt5.QtGui import QRegExpValidator from PyQt5.QtWidgets import (QVBoxLayout, QLabel, QGridLayout, QPushButton, QHBoxLayout, QButtonGroup, QGroupBox, QTextEdit,...
{ "repo_name": "fujicoin/electrum-fjc", "path": "electrum/plugins/safe_t/qt.py", "copies": "1", "size": "21165", "license": "mit", "hash": 8978019974203894000, "line_mean": 41.33, "line_max": 140, "alpha_frac": 0.5860618946, "autogenerated": false, "ratio": 4.07724908495473, "config_test": false...
from functools import partial import threading from PyQt5.QtCore import Qt, QEventLoop, pyqtSignal from PyQt5.QtWidgets import (QVBoxLayout, QLabel, QGridLayout, QPushButton, QHBoxLayout, QButtonGroup, QGroupBox, QDialog, QLineEdit, QRadioButton, QCheckBox, QWi...
{ "repo_name": "fujicoin/electrum-fjc", "path": "electrum/plugins/trezor/qt.py", "copies": "1", "size": "25638", "license": "mit", "hash": -6910710811248882000, "line_mean": 39.8899521531, "line_max": 115, "alpha_frac": 0.5903736641, "autogenerated": false, "ratio": 3.992836006852515, "config_te...
from functools import partial import threading from PyQt5.QtCore import Qt, QEventLoop, pyqtSignal, QRegExp from PyQt5.QtGui import QRegExpValidator from PyQt5.QtWidgets import (QVBoxLayout, QLabel, QGridLayout, QPushButton, QHBoxLayout, QButtonGroup, QGroupBox, QDialog, ...
{ "repo_name": "fujicoin/electrum-fjc", "path": "electrum/plugins/keepkey/qt.py", "copies": "1", "size": "23536", "license": "mit", "hash": 3026895717498574300, "line_mean": 40.2912280702, "line_max": 95, "alpha_frac": 0.5975526852, "autogenerated": false, "ratio": 4.02944701249786, "config_test...
from functools import partial import threading from PyQt5.Qt import Qt from PyQt5.Qt import QGridLayout, QInputDialog, QPushButton from PyQt5.Qt import QVBoxLayout, QLabel from electroncash_gui.qt.util import * from .plugin import TIM_NEW, TIM_RECOVER, TIM_MNEMONIC from ..hw_wallet.qt import QtHandlerBase, QtPluginBa...
{ "repo_name": "molecular/electrum", "path": "plugins/trezor/qt_generic.py", "copies": "1", "size": "24608", "license": "mit", "hash": 7832214086116303000, "line_mean": 40.779286927, "line_max": 81, "alpha_frac": 0.5900926528, "autogenerated": false, "ratio": 4.042049934296978, "config_test": fa...
from functools import partial import threading from PyQt5.Qt import Qt from PyQt5.Qt import QGridLayout, QInputDialog, QPushButton from PyQt5.Qt import QVBoxLayout, QLabel from electrum_gui.qt.util import * from .plugin import TIM_NEW, TIM_RECOVER, TIM_MNEMONIC from ..hw_wallet.qt import QtHandlerBase, QtPluginBase f...
{ "repo_name": "digitalbitbox/electrum", "path": "plugins/trezor/qt_generic.py", "copies": "2", "size": "24554", "license": "mit", "hash": -2981533721715824000, "line_mean": 40.7585034014, "line_max": 81, "alpha_frac": 0.589516983, "autogenerated": false, "ratio": 4.037822726525243, "config_test...
from functools import partial import threading from PyQt5.Qt import Qt from PyQt5.Qt import QGridLayout, QInputDialog, QPushButton from PyQt5.Qt import QVBoxLayout, QLabel from electrum.gui.qt.util import * from electrum.i18n import _ from electrum.plugin import hook, DeviceMgr from electrum.util import PrintError, U...
{ "repo_name": "cryptapus/electrum", "path": "electrum/plugins/keepkey/qt.py", "copies": "1", "size": "24142", "license": "mit", "hash": 4549107230460797000, "line_mean": 39.9881154499, "line_max": 95, "alpha_frac": 0.592701516, "autogenerated": false, "ratio": 4.0263509006004, "config_test": fa...
from functools import partial import threading from PyQt5.Qt import Qt from PyQt5.Qt import QGridLayout, QInputDialog, QPushButton from PyQt5.Qt import QVBoxLayout, QLabel from electrum_gui.qt.util import * from electrum.i18n import _ from electrum.plugins import hook, DeviceMgr from electrum.util import PrintError, ...
{ "repo_name": "kyuupichan/electrum", "path": "plugins/keepkey/qt.py", "copies": "1", "size": "23981", "license": "mit", "hash": 1655156665676835800, "line_mean": 39.9232081911, "line_max": 81, "alpha_frac": 0.5928443351, "autogenerated": false, "ratio": 4.022982721019963, "config_test": false, ...
from functools import partial import tifffile as tiff import numpy as np import time import math import json import sys import os MEM_LIMIT = 1000 MEGABYTE = 1024**2 def load_h(_size, _path, _start): # Start timing now start = time.time() # Load a tile from a path d = tiff.imread(_path) # Get subv...
{ "repo_name": "Rhoana/butterfly", "path": "scripts/h5_tile_test/record_data.py", "copies": "1", "size": "7027", "license": "mit", "hash": -8009274051708467000, "line_mean": 29.2887931034, "line_max": 89, "alpha_frac": 0.5602675395, "autogenerated": false, "ratio": 3.3783653846153845, "config_te...
from functools import partial import time from qcodes.instrument.base import Instrument from qcodes.utils import validators as vals from qcodes.instrument.parameter import ManualParameter class ConversionBoxControl(Instrument): """ This is a meta-instrument for controlling the different switches in the co...
{ "repo_name": "DiCarloLab-Delft/PycQED_py3", "path": "pycqed/instrument_drivers/meta_instrument/conversion_box_control.py", "copies": "1", "size": "5535", "license": "mit", "hash": 6102038624557630000, "line_mean": 37.4375, "line_max": 80, "alpha_frac": 0.5439927733, "autogenerated": false, "rati...
from functools import partial import time from typing import List from flask import Blueprint, Response, render_template, current_app, request from core.job.helpers import expand_nodelist from core.job.models import Job from application.helpers import requires_auth from core.monitoring.models import SENSOR_CLASS_MAP ...
{ "repo_name": "srcc-msu/job_statistics", "path": "modules/job_analyzer/controllers.py", "copies": "1", "size": "1969", "license": "mit", "hash": 8255856397457564000, "line_mean": 28.8333333333, "line_max": 128, "alpha_frac": 0.6978161503, "autogenerated": false, "ratio": 3.186084142394822, "con...
from functools import partial import time from unittest.mock import patch import sublime from unittesting import DeferrableTestCase def run_in_worker(fn, *args, **kwargs): sublime.set_timeout_async(partial(fn, *args, **kwargs)) # When we swap `set_timeout_async` with `set_timeout` we basically run # our progr...
{ "repo_name": "randy3k/UnitTesting", "path": "tests/test_deferred_timing.py", "copies": "1", "size": "2756", "license": "mit", "hash": -2150001579764637000, "line_mean": 33.024691358, "line_max": 77, "alpha_frac": 0.5660377358, "autogenerated": false, "ratio": 3.8491620111731844, "config_test":...
from functools import partial import time from unittest.runner import TextTestRunner, registerResult import warnings import sublime def defer(delay, callback, *args, **kwargs): # Rely on late binding in case a user patches it sublime.set_timeout(partial(callback, *args, **kwargs), delay) DEFAULT_CONDITION_P...
{ "repo_name": "randy3k/UnitTesting", "path": "unittesting/core/st3/runner.py", "copies": "1", "size": "6450", "license": "mit", "hash": 8832128914815190000, "line_mean": 37.622754491, "line_max": 96, "alpha_frac": 0.5190697674, "autogenerated": false, "ratio": 4.942528735632184, "config_test": ...
from functools import partial import time import logging import os.path from copy import copy import os try: from pathlib2 import Path except ImportError: from pathlib import Path from multiprocess import Pool, Manager import yaml from tqdm import tqdm from yass.util import function_path, human_readable_time...
{ "repo_name": "paninski-lab/yass", "path": "src/yass/batch/batch.py", "copies": "1", "size": "26157", "license": "apache-2.0", "hash": 2856288330723249700, "line_mean": 38.2747747748, "line_max": 79, "alpha_frac": 0.5440226326, "autogenerated": false, "ratio": 4.76448087431694, "config_test": f...
from functools import partial import time import timeit import numpy as np from math import sqrt, sin import librosa from os import listdir, getcwd from os.path import isfile, join, dirname, abspath def dft(arr): arr = np.asarray(arr, dtype=float) length = arr.shape[0] n = np.arange(length) k = n.reshape(length, ...
{ "repo_name": "RussGlover/381-module-1", "path": "project/software/src/fft/fft.py", "copies": "1", "size": "5494", "license": "mit", "hash": -1225975298034009600, "line_mean": 32.5, "line_max": 176, "alpha_frac": 0.6989443029, "autogenerated": false, "ratio": 2.707737801872844, "config_test": t...
from functools import partial import time import urllib2 from twitter.common import log from twitter.common.concurrent import defer from twitter.common.http import HttpServer from twitter.common.metrics import ( AtomicGauge, LambdaGauge, Observable) from twitter.common.quantity import Amount, Time class ...
{ "repo_name": "VaybhavSharma/commons", "path": "src/python/twitter/common/examples/pingpong.py", "copies": "14", "size": "1220", "license": "apache-2.0", "hash": -5020698786294054000, "line_mean": 30.2820512821, "line_max": 84, "alpha_frac": 0.6704918033, "autogenerated": false, "ratio": 3.324250...
from functools import partial import time _cached_objects = dict() CACHE_EXPIRY = 60 * 10 def get_cached_object(model, id): """ A very, very simple in-memory cache for ORM objects. No invalidation other than restarting this app or waiting CACHE_EXPIRY seconds. """ lookup = (model, id) cached =...
{ "repo_name": "Open511/open511-server", "path": "open511_server/utils/optimization.py", "copies": "1", "size": "1276", "license": "mit", "hash": -6758023198679847000, "line_mean": 27.3555555556, "line_max": 88, "alpha_frac": 0.5885579937, "autogenerated": false, "ratio": 3.698550724637681, "con...
from functools import partial import time from ukt import KT_NONE from ukt import KyotoTycoon from huey.api import Huey from huey.constants import EmptyData from huey.storage import BaseStorage from huey.utils import decode class KyotoTycoonStorage(BaseStorage): priority = True def __init__(self, name='hue...
{ "repo_name": "coleifer/huey", "path": "huey/contrib/kyototycoon.py", "copies": "2", "size": "3659", "license": "mit", "hash": -7625129882482947000, "line_mean": 28.7479674797, "line_max": 77, "alpha_frac": 0.6132823176, "autogenerated": false, "ratio": 3.3476669716376946, "config_test": false,...
from functools import partial import time import numpy as np import pandas as pd from psi.controller.calibration.calibration import FlatCalibration from psi.token.primitives import ChirpFactory, SilenceFactory from .calibration import InterpCalibration from . import util def chirp_power(engine, ao_channel_name, ai...
{ "repo_name": "bburan/psiexperiment", "path": "psi/controller/calibration/chirp.py", "copies": "1", "size": "5939", "license": "mit", "hash": -2922350778297116000, "line_mean": 35.4355828221, "line_max": 79, "alpha_frac": 0.6433743054, "autogenerated": false, "ratio": 3.5820265379975873, "confi...
from functools import partial import time import numpy as np def acquire(engine, waveform, ao_channel_name, ai_channel_names, gain=0, vrms=1, repetitions=2, min_snr=None, max_thd=None, thd_harmonics=3, trim=0.01, iti=0.01, debug=False): ''' Given a single output, measure response in m...
{ "repo_name": "bburan/psiexperiment", "path": "psi/controller/util.py", "copies": "1", "size": "3209", "license": "mit", "hash": -8515237011269560000, "line_mean": 32.0824742268, "line_max": 81, "alpha_frac": 0.6593954503, "autogenerated": false, "ratio": 3.66324200913242, "config_test": false,...
from functools import partial import tornado.ioloop from tornado.testing import AsyncTestCase from tornado.stack_context import ExceptionStackContext from elasticsearch_tornado import SnapshotClient try: # python 2.6 from unittest2 import TestCase, SkipTest except ImportError: from unittest import T...
{ "repo_name": "hodgesds/elasticsearch_tornado", "path": "tests/test_snapshot.py", "copies": "1", "size": "3451", "license": "apache-2.0", "hash": -5277486742213470000, "line_mean": 24.375, "line_max": 63, "alpha_frac": 0.491161982, "autogenerated": false, "ratio": 4.0174621653084985, "config_te...
from functools import partial import traceback import logging import sys import os import io import aiofiles from datetime import datetime from fable import config class Logger: def __init__(self, path, level=logging.DEBUG): self.path = path self.level = level self.time_format = '%Y-%m-%d %...
{ "repo_name": "yrapop01/fable", "path": "legacy/log/__init__.py", "copies": "1", "size": "2759", "license": "mit", "hash": 117128875137922690, "line_mean": 26.59, "line_max": 64, "alpha_frac": 0.5770206597, "autogenerated": false, "ratio": 3.3442424242424242, "config_test": false, "has_no_key...
from functools import partial import traceback import sys from typing import TYPE_CHECKING from PyQt5.QtCore import QObject, pyqtSignal from PyQt5.QtWidgets import (QHBoxLayout, QLabel, QVBoxLayout) from electrum_ltc.plugin import hook from electrum_ltc.i18n import _ from electrum_ltc.gui.qt.util import ThreadedButto...
{ "repo_name": "pooler/electrum-ltc", "path": "electrum_ltc/plugins/labels/qt.py", "copies": "1", "size": "3637", "license": "mit", "hash": -542284335820490800, "line_mean": 36.8854166667, "line_max": 102, "alpha_frac": 0.6315644762, "autogenerated": false, "ratio": 4.104966139954853, "config_te...
from functools import partial import traceback import sys from PyQt5.QtCore import QObject, pyqtSignal from PyQt5.QtWidgets import (QHBoxLayout, QLabel, QVBoxLayout) from electrum_ltc.plugin import hook from electrum_ltc.i18n import _ from electrum_ltc.gui.qt.util import ThreadedButton, Buttons, EnterButton, WindowMo...
{ "repo_name": "vialectrum/vialectrum", "path": "electrum_ltc/plugins/labels/qt.py", "copies": "1", "size": "2882", "license": "mit", "hash": -1918994567817236500, "line_mean": 35.4810126582, "line_max": 102, "alpha_frac": 0.6276891048, "autogenerated": false, "ratio": 4.182873730043541, "config...
from functools import partial import traceback import sys from PyQt5.QtCore import QObject, pyqtSignal from PyQt5.QtWidgets import (QHBoxLayout, QLabel, QVBoxLayout) from electrum.plugin import hook from electrum.i18n import _ from electrum.gui.qt.util import ThreadedButton, Buttons, EnterButton, WindowModalDialog, O...
{ "repo_name": "neocogent/electrum", "path": "electrum/plugins/labels/qt.py", "copies": "2", "size": "2870", "license": "mit", "hash": 1724453818211666200, "line_mean": 35.3291139241, "line_max": 98, "alpha_frac": 0.6271777003, "autogenerated": false, "ratio": 4.220588235294118, "config_test": f...
from functools import partial import traceback import sys from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import (QHBoxLayout, QLabel, QVBoxLayout) from electrum.plugin import hook from electrum.i18n import _ from electrum.gui.qt import EnterButton from electrum.gui.qt.util import ThreadedBu...
{ "repo_name": "asfin/electrum", "path": "electrum/plugins/labels/qt.py", "copies": "1", "size": "2766", "license": "mit", "hash": -4208618316383455700, "line_mean": 34.4615384615, "line_max": 84, "alpha_frac": 0.6326825741, "autogenerated": false, "ratio": 4.197268588770865, "config_test": fals...
from functools import partial import traceback import sys 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 ThreadedB...
{ "repo_name": "kyuupichan/electrum", "path": "plugins/labels/qt.py", "copies": "1", "size": "2767", "license": "mit", "hash": -7951960494490697000, "line_mean": 34.4743589744, "line_max": 84, "alpha_frac": 0.6328153235, "autogenerated": false, "ratio": 4.198786039453718, "config_test": false, ...
from functools import partial import traceback import dask from dask.base import normalize_token from tlz import valmap, get_in import msgpack from . import pickle from ..utils import has_keyword, typename from .compression import maybe_compress, decompress from .utils import ( unpack_frames, pack_frames_pr...
{ "repo_name": "blaze/distributed", "path": "distributed/protocol/serialize.py", "copies": "1", "size": "20531", "license": "bsd-3-clause", "hash": -7413562569297898000, "line_mean": 28.2881597718, "line_max": 85, "alpha_frac": 0.5752277044, "autogenerated": false, "ratio": 4.138480145132029, "c...
from functools import partial import unittest from scrapy.http import HtmlResponse from scrapy.item import Item, Field from scrapy.loader import ItemLoader from scrapy.loader.processors import (Compose, Identity, Join, MapCompose, SelectJmes, TakeFirst) from scrapy.selector import...
{ "repo_name": "eLRuLL/scrapy", "path": "tests/test_loader.py", "copies": "1", "size": "39747", "license": "bsd-3-clause", "hash": 1280485284570718500, "line_mean": 37.0718390805, "line_max": 105, "alpha_frac": 0.5981835107, "autogenerated": false, "ratio": 3.4948562384595094, "config_test": tru...
from functools import partial import unittest import greenlet import GreenletProfiler def find_func(ystats, name): items = [ yfuncstat for yfuncstat in ystats if yfuncstat.name == name] assert len(items) == 1 return items[0] def assert_children(yfuncstats, names, msg): names = set...
{ "repo_name": "ajdavis/GreenletProfiler", "path": "test/test_greenlet_profiler.py", "copies": "1", "size": "6704", "license": "mit", "hash": 474806279176844860, "line_mean": 30.1813953488, "line_max": 78, "alpha_frac": 0.5305787589, "autogenerated": false, "ratio": 3.583110636023517, "config_te...
from functools import partial import urllib import time from flask import Blueprint, Response, render_template, request, current_app import flask from modules.job_table.model import construct_full_table_query, calculate_job_query_stat from modules.job_table.helpers import extract_string_list, extract_number from core...
{ "repo_name": "srcc-msu/job_statistics", "path": "modules/job_table/controllers.py", "copies": "1", "size": "6779", "license": "mit", "hash": -5307194456881179000, "line_mean": 32.5594059406, "line_max": 137, "alpha_frac": 0.7098392093, "autogenerated": false, "ratio": 3.003544528134692, "confi...
from functools import partial import uuid from engineio import json import pickle from .asyncio_manager import AsyncManager class AsyncPubSubManager(AsyncManager): """Manage a client list attached to a pub/sub backend under asyncio. This is a base class that enables multiple servers to share the list of ...
{ "repo_name": "miguelgrinberg/python-socketio", "path": "src/socketio/asyncio_pubsub_manager.py", "copies": "1", "size": "7448", "license": "mit", "hash": 5029160893386946000, "line_mean": 40.6089385475, "line_max": 79, "alpha_frac": 0.5494092374, "autogenerated": false, "ratio": 4.92918596955658...
from functools import partial import uuid from engineio import json import pickle from .base_manager import BaseManager class PubSubManager(BaseManager): """Manage a client list attached to a pub/sub backend. This is a base class that enables multiple servers to share the list of clients, with the serv...
{ "repo_name": "miguelgrinberg/python-socketio", "path": "src/socketio/pubsub_manager.py", "copies": "1", "size": "7103", "license": "mit", "hash": 4468498407812515000, "line_mean": 40.7823529412, "line_max": 79, "alpha_frac": 0.5524426299, "autogenerated": false, "ratio": 4.815593220338983, "co...
from functools import partial import uuid import json import pickle import six from .asyncio_manager import AsyncManager class AsyncPubSubManager(AsyncManager): """Manage a client list attached to a pub/sub backend under asyncio. This is a base class that enables multiple servers to share the list of c...
{ "repo_name": "quoclieu/codebrew17-starving", "path": "env/lib/python3.5/site-packages/socketio/asyncio_pubsub_manager.py", "copies": "1", "size": "6470", "license": "mit", "hash": -3555862346128636000, "line_mean": 39.4375, "line_max": 79, "alpha_frac": 0.5550231839, "autogenerated": false, "rat...
from functools import partial import uuid import json import pickle import six from .base_manager import BaseManager class PubSubManager(BaseManager): """Manage a client list attached to a pub/sub backend. This is a base class that enables multiple servers to share the list of clients, with the servers...
{ "repo_name": "quoclieu/codebrew17-starving", "path": "env/lib/python3.5/site-packages/socketio/pubsub_manager.py", "copies": "1", "size": "6181", "license": "mit", "hash": 8569691153318626000, "line_mean": 39.9337748344, "line_max": 79, "alpha_frac": 0.5583238958, "autogenerated": false, "ratio"...
from functools import partial import warnings import numpy as np import pandas as pd import bioframe from .lib.common import assign_regions from .lib.numutils import LazyToeplitz import warnings def make_bin_aligned_windows( binsize, chroms, centers_bp, flank_bp=0, region_start_bp=0, ignore_index=False ): "...
{ "repo_name": "open2c/cooltools", "path": "cooltools/snipping.py", "copies": "1", "size": "17927", "license": "mit", "hash": 2384073239127450000, "line_mean": 34.9258517034, "line_max": 88, "alpha_frac": 0.5576504714, "autogenerated": false, "ratio": 3.638522427440633, "config_test": false, "...
from functools import partial import wx from ...tool.box import Dialog, MessageDialog """ Graphical interface for data filters. """ class FilterEditDialog(Dialog): def __init__(self, parent, headings, ok_callback, *args, **kwargs): kwargs['style'] = kwargs.get('style', wx.DEFAULT_DIALOG_STYLE) | wx.RESIZE_BORDER...
{ "repo_name": "0/SpanishAcquisition", "path": "spacq/gui/display/table/filter.py", "copies": "2", "size": "5349", "license": "bsd-2-clause", "hash": -1340728611309488000, "line_mean": 26.2908163265, "line_max": 104, "alpha_frac": 0.7029351281, "autogenerated": false, "ratio": 2.930958904109589, ...
from functools import partial import zlib import json from io import BytesIO import sys import platform from typing import TYPE_CHECKING from PyQt5.QtWidgets import (QComboBox, QGridLayout, QLabel, QPushButton) from electrum_mona.plugin import BasePlugin, hook from electrum_mona.gui.qt.util import WaitingDialog, Ente...
{ "repo_name": "wakiyamap/electrum-mona", "path": "electrum_mona/plugins/audio_modem/qt.py", "copies": "1", "size": "4318", "license": "mit", "hash": -7467821360944945000, "line_mean": 31.223880597, "line_max": 95, "alpha_frac": 0.6194997684, "autogenerated": false, "ratio": 3.7943760984182777, ...
from functools import partial import zlib import json from io import BytesIO import sys import platform from electrum_arg.plugins import BasePlugin, hook from electrum_arg_gui.qt.util import WaitingDialog, EnterButton, WindowModalDialog from electrum_arg.util import print_msg, print_error from electrum_arg.i18n import...
{ "repo_name": "argentumproject/electrum-arg", "path": "plugins/audio_modem/qt.py", "copies": "1", "size": "4102", "license": "mit", "hash": -7214316822654517000, "line_mean": 31.2992125984, "line_max": 82, "alpha_frac": 0.6126279863, "autogenerated": false, "ratio": 3.848030018761726, "config_t...
from functools import partial import zlib import json from io import BytesIO import sys import platform from electrum.plugin import BasePlugin, hook from electrum.gui.qt.util import WaitingDialog, EnterButton, WindowModalDialog from electrum.util import print_msg, print_error from electrum.i18n import _ from PyQt5.Qt...
{ "repo_name": "asfin/electrum", "path": "electrum/plugins/audio_modem/qt.py", "copies": "2", "size": "4199", "license": "mit", "hash": -4981217971730076000, "line_mean": 31.8046875, "line_max": 80, "alpha_frac": 0.6160990712, "autogenerated": false, "ratio": 3.8522935779816514, "config_test": t...
from functools import partial import zlib import json from io import BytesIO import sys import platform from electrum.plugins import BasePlugin, hook from electrum_gui.qt.util import WaitingDialog, EnterButton, WindowModalDialog from electrum.util import print_msg, print_error from electrum.i18n import _ from PyQt5.Q...
{ "repo_name": "romanz/electrum", "path": "plugins/audio_modem/qt.py", "copies": "4", "size": "4200", "license": "mit", "hash": 4611954606743897000, "line_mean": 31.8125, "line_max": 80, "alpha_frac": 0.6161904762, "autogenerated": false, "ratio": 3.853211009174312, "config_test": true, "has_n...
from functools import partial alphacolor = (0,0,0) basecolors = [alphacolor, (127, 178, 56), (247, 233, 163), (199, 199, 199), (255, 0, 0), (160, 160, 255), (167, 167, 167), (0, 124, 0), (255, 255, 255), (164, 168, 184), (151, 109, 77), (112, 112, 112), (64, 64, 255), (143, 119, 72), (255, 252, 245), (216...
{ "repo_name": "spookymushroom/minecraftmap", "path": "minecraftmap/constants.py", "copies": "1", "size": "14870", "license": "mit", "hash": 2770443148253081000, "line_mean": 50.993006993, "line_max": 101, "alpha_frac": 0.4560860794, "autogenerated": false, "ratio": 2.4357084357084355, "config_t...
from functools import partial __author__ = 'jakub.zygmunt' import re import sys try: import splunk.Intersplunk in_splunk = True except (NameError, ImportError): in_splunk = False class MyFormat(object): def formatDigit(self, digit): reversed = digit[::-1] reversed_spaces = re.sub("(....
{ "repo_name": "jakubincloud/splunk-commands", "path": "MyFormat/myformat.py", "copies": "1", "size": "3687", "license": "bsd-2-clause", "hash": -1843594180271813400, "line_mean": 33.1388888889, "line_max": 108, "alpha_frac": 0.5855709249, "autogenerated": false, "ratio": 3.7431472081218273, "co...
from functools import partial class InvalidSpecError(Exception): pass class UnconvertedValue(object): def __init__(self, string, reason): self.string = string self.reason = reason def __nonzero__(self): return False def __str__(self): return "%s, given=%r" % (self.rea...
{ "repo_name": "jeremylowery/stypes", "path": "stypes/util.py", "copies": "1", "size": "1796", "license": "mit", "hash": 6705783758224215000, "line_mean": 29.4406779661, "line_max": 88, "alpha_frac": 0.5985523385, "autogenerated": false, "ratio": 4.072562358276644, "config_test": false, "has_n...