text
stringlengths
0
1.05M
meta
dict
from __future__ import absolute_import, division, print_function import functools import sys import traceback from tornado.concurrent import Future from tornado import gen from tornado.httpclient import HTTPError, HTTPRequest from tornado.log import gen_log, app_log from tornado.simple_httpclient import SimpleAsyncHT...
{ "repo_name": "Lancher/tornado", "path": "tornado/test/websocket_test.py", "copies": "2", "size": "23022", "license": "apache-2.0", "hash": -3040779872807273500, "line_mean": 34.4730354391, "line_max": 103, "alpha_frac": 0.6224046564, "autogenerated": false, "ratio": 3.996875, "config_test": tr...
from __future__ import absolute_import, division, print_function import functools import sys import warnings from collections import Mapping, defaultdict from distutils.version import LooseVersion from numbers import Number import numpy as np import pandas as pd import xarray as xr from . import ( alignment, du...
{ "repo_name": "jcmgray/xarray", "path": "xarray/core/dataset.py", "copies": "1", "size": "136388", "license": "apache-2.0", "hash": -8335074243642783000, "line_mean": 37.7796417401, "line_max": 92, "alpha_frac": 0.563429334, "autogenerated": false, "ratio": 4.568806110143374, "config_test": fal...
from __future__ import absolute_import, division, print_function import functools import warnings from distutils.version import LooseVersion from io import BytesIO import numpy as np from .. import Variable from ..core.indexing import NumpyIndexingAdapter from ..core.pycompat import OrderedDict, basestring, iteritem...
{ "repo_name": "jcmgray/xarray", "path": "xarray/backends/scipy_.py", "copies": "1", "size": "9010", "license": "apache-2.0", "hash": -4058955448310679000, "line_mean": 35.7755102041, "line_max": 78, "alpha_frac": 0.584017758, "autogenerated": false, "ratio": 4.2884340790099955, "config_test": f...
from __future__ import absolute_import, division, print_function import functools import warnings import numpy as np import pandas as pd from . import computation, groupby, indexing, ops, resample, rolling, utils from ..plot.plot import _PlotMethods from .accessors import DatetimeAccessor from .alignment import alig...
{ "repo_name": "jcmgray/xarray", "path": "xarray/core/dataarray.py", "copies": "1", "size": "77486", "license": "apache-2.0", "hash": -824658212618687600, "line_mean": 35.3784037559, "line_max": 79, "alpha_frac": 0.573639109, "autogenerated": false, "ratio": 4.540106638542216, "config_test": fal...
from __future__ import absolute_import, division, print_function import functools from ._compat import new_class from ._make import _make_ne _operation_names = {"eq": "==", "lt": "<", "le": "<=", "gt": ">", "ge": ">="} def cmp_using( eq=None, lt=None, le=None, gt=None, ge=None, require_sam...
{ "repo_name": "python-attrs/attrs", "path": "src/attr/_cmp.py", "copies": "2", "size": "4133", "license": "mit", "hash": -8286033524124914000, "line_mean": 26.1907894737, "line_max": 77, "alpha_frac": 0.5831115413, "autogenerated": false, "ratio": 3.8843984962406015, "config_test": false, "ha...
from __future__ import absolute_import, division, print_function import functools from toolz import merge from multipledispatch import Dispatcher from .convert import convert from .append import append from .resource import resource from .utils import ignoring import datashape from datashape import discover from d...
{ "repo_name": "quantopian/odo", "path": "odo/into.py", "copies": "5", "size": "4965", "license": "bsd-3-clause", "hash": 1434546908081121000, "line_mean": 30.6242038217, "line_max": 92, "alpha_frac": 0.6616314199, "autogenerated": false, "ratio": 3.816295157571099, "config_test": false, "has_...
from __future__ import absolute_import, division, print_function import functools import numpy as np import pandas as pd from . import dtypes, duck_array_ops, nputils, ops from .arithmetic import SupportsArithmetic from .combine import concat from .common import ImplementsArrayReduce, ImplementsDatasetReduce from .p...
{ "repo_name": "jcmgray/xarray", "path": "xarray/core/groupby.py", "copies": "1", "size": "25171", "license": "apache-2.0", "hash": 2869993255766389000, "line_mean": 36.7376311844, "line_max": 79, "alpha_frac": 0.5917921418, "autogenerated": false, "ratio": 4.434637068357999, "config_test": fals...
from __future__ import absolute_import, division, print_function import functools import numpy as np from .. import Variable from ..core import indexing from ..core.pycompat import OrderedDict, bytes_type, iteritems, unicode_type from ..core.utils import FrozenOrderedDict, close_on_error from .common import ( HD...
{ "repo_name": "jcmgray/xarray", "path": "xarray/backends/h5netcdf_.py", "copies": "1", "size": "8611", "license": "apache-2.0", "hash": -2122231074646926000, "line_mean": 35.7991452991, "line_max": 79, "alpha_frac": 0.589710835, "autogenerated": false, "ratio": 4.079109426811938, "config_test":...
from __future__ import absolute_import, division, print_function import functools import numpy as np from .. import Variable from ..core import indexing from ..core.utils import Frozen, FrozenOrderedDict from .common import AbstractDataStore, BackendArray, DataStorePickleMixin class NioArrayWrapper(BackendArray): ...
{ "repo_name": "jcmgray/xarray", "path": "xarray/backends/pynio_.py", "copies": "1", "size": "2731", "license": "apache-2.0", "hash": -7227445321616380000, "line_mean": 31.5119047619, "line_max": 76, "alpha_frac": 0.6246796045, "autogenerated": false, "ratio": 3.935158501440922, "config_test": f...
from __future__ import absolute_import, division, print_function import functools import six from rest_framework.response import Response from sentry import analytics, eventstore, search from sentry.api.base import DocSection, EnvironmentMixin from sentry.api.bases.project import ProjectEndpoint, ProjectEventPermiss...
{ "repo_name": "mvaled/sentry", "path": "src/sentry/api/endpoints/project_group_index.py", "copies": "1", "size": "13242", "license": "bsd-3-clause", "hash": -455965934252018700, "line_mean": 42.5592105263, "line_max": 95, "alpha_frac": 0.5752152243, "autogenerated": false, "ratio": 4.801305293691...
from __future__ import absolute_import, division, print_function import gc import io import locale # system locale module, not tornado.locale import logging import operator import textwrap import sys from tornado.httpclient import AsyncHTTPClient from tornado.httpserver import HTTPServer from tornado.ioloop import I...
{ "repo_name": "hhru/tornado", "path": "tornado/test/runtests.py", "copies": "1", "size": "8554", "license": "apache-2.0", "hash": -1016291712964334000, "line_mean": 37.7058823529, "line_max": 92, "alpha_frac": 0.6502221183, "autogenerated": false, "ratio": 4.090865614538498, "config_test": true...
from __future__ import absolute_import, division, print_function import getpass import logging import os import socket from threading import Thread from time import sleep from mentos.subscription import Event, Subscription from mentos.utils import encode_data, run_background from toolz import merge from tornado.ioloo...
{ "repo_name": "Arttii/malefico", "path": "mentos/scheduler.py", "copies": "2", "size": "11355", "license": "apache-2.0", "hash": -4477812888790744000, "line_mean": 31.8179190751, "line_max": 86, "alpha_frac": 0.515896081, "autogenerated": false, "ratio": 4.229050279329609, "config_test": false,...
from __future__ import absolute_import, division, print_function import gym class EnvWrapper: """Wrapper around OpenAI Gym environments allowing for state and reward preprocessing.""" def __init__(self, name, state_filter=None, reward_filter=None): self.name = name self.env = gym.make(na...
{ "repo_name": "domluna/deep_rl", "path": "deep_rl/envs/env_wrapper.py", "copies": "1", "size": "1191", "license": "mit", "hash": 1467084896663312100, "line_mean": 28.775, "line_max": 77, "alpha_frac": 0.6364399664, "autogenerated": false, "ratio": 3.7452830188679247, "config_test": false, "ha...
from __future__ import absolute_import, division, print_function import gzip from datashape import discover, dshape from collections import Iterator from toolz import partial, concat import uuid import os from ..compatibility import unicode from ..chunks import chunks from ..drop import drop from ..temp import Temp f...
{ "repo_name": "cpcloud/odo", "path": "odo/backends/text.py", "copies": "9", "size": "2024", "license": "bsd-3-clause", "hash": 4503148597744755000, "line_mean": 24.9487179487, "line_max": 72, "alpha_frac": 0.6818181818, "autogenerated": false, "ratio": 3.5261324041811846, "config_test": false, ...
from __future__ import absolute_import, division, print_function import h5py import os import datashape from datashape import DataShape, Record, to_numpy, discover from datashape.predicates import isrecord from datashape.dispatch import dispatch import numpy as np from toolz import keyfilter from ..numpy_dtype impor...
{ "repo_name": "cpcloud/odo", "path": "odo/backends/h5py.py", "copies": "9", "size": "8231", "license": "bsd-3-clause", "hash": -6886017480040308000, "line_mean": 29.3726937269, "line_max": 78, "alpha_frac": 0.5713765035, "autogenerated": false, "ratio": 3.374743747437474, "config_test": false, ...
from __future__ import absolute_import, division, print_function import hashlib import linecache import sys import threading import warnings from operator import itemgetter from . import _config from ._compat import ( PY2, isclass, iteritems, metadata_proxy, ordered_dict, set_closure_cell ) from .exceptions impo...
{ "repo_name": "larsbergstrom/servo", "path": "tests/wpt/web-platform-tests/tools/third_party/attrs/src/attr/_make.py", "copies": "41", "size": "55996", "license": "mpl-2.0", "hash": 7017228721665356000, "line_mean": 32.1533451747, "line_max": 79, "alpha_frac": 0.556932638, "autogenerated": false, ...
from __future__ import absolute_import, division, print_function import hashlib import linecache import sys import warnings from operator import itemgetter from . import _config from ._compat import PY2, isclass, iteritems, metadata_proxy, set_closure_cell from .exceptions import ( DefaultAlreadySetError, Frozen...
{ "repo_name": "nparley/mylatitude", "path": "lib/attr/_make.py", "copies": "1", "size": "49291", "license": "mit", "hash": 7896157672638334000, "line_mean": 31.6214427531, "line_max": 79, "alpha_frac": 0.5585603863, "autogenerated": false, "ratio": 4.09495721525297, "config_test": false, "has...
from __future__ import absolute_import, division, print_function import hashlib import linecache import sys from operator import itemgetter from . import _config from ._compat import PY2, isclass, iteritems, metadata_proxy, set_closure_cell from .exceptions import ( DefaultAlreadySetError, FrozenInstanceError, N...
{ "repo_name": "anthgur/servo", "path": "tests/wpt/web-platform-tests/tools/third_party/attrs/src/attr/_make.py", "copies": "12", "size": "46098", "license": "mpl-2.0", "hash": -2407760612302266400, "line_mean": 32.0451612903, "line_max": 79, "alpha_frac": 0.5625189813, "autogenerated": false, "ra...
from __future__ import absolute_import, division, print_function import hashlib import linecache from operator import itemgetter from . import _config from ._compat import PY2, iteritems, isclass, iterkeys, metadata_proxy from .exceptions import ( DefaultAlreadySetError, FrozenInstanceError, NotAnAttrsCl...
{ "repo_name": "whitehorse-io/encarnia", "path": "pyenv/lib/python2.7/site-packages/attr/_make.py", "copies": "2", "size": "35624", "license": "mit", "hash": -3406400153928851000, "line_mean": 32.6392823418, "line_max": 79, "alpha_frac": 0.5631596676, "autogenerated": false, "ratio": 4.08485265451...
from __future__ import absolute_import, division, print_function import hashlib import os.path import pytest from appr import SYSTEM from appr.pack import unpack_kub, ignore TAR_MD5SUM = { 'darwin': "8ccd8af6ef21af7309839f1c521b6354", 'linux': "8ccd8af6ef21af7309839f1c521b6354", 'windows': '20bf57e5d5de...
{ "repo_name": "app-registry/appr", "path": "tests/test_packager.py", "copies": "2", "size": "2742", "license": "apache-2.0", "hash": -4443208371163198500, "line_mean": 28.8043478261, "line_max": 95, "alpha_frac": 0.5882567469, "autogenerated": false, "ratio": 2.8682008368200838, "config_test": ...
from __future__ import absolute_import, division, print_function import heapq import sys import random import numpy as np from .hashfunctions import generate_hashfunctions class CountMinSketch(object): """ Basic Count-Min Sketch """ def __init__(self, delta, epsilon, k): self.nbr_bits = int(np.cei...
{ "repo_name": "Parsely/probably", "path": "probably/countmin.py", "copies": "1", "size": "2109", "license": "mit", "hash": 4714278930368098000, "line_mean": 27.5, "line_max": 81, "alpha_frac": 0.5467045993, "autogenerated": false, "ratio": 3.457377049180328, "config_test": false, "has_no_keyw...
from __future__ import absolute_import, division, print_function import hmac import json import time from collections import OrderedDict from hashlib import sha256 import stripe from stripe import error, util class Webhook(object): DEFAULT_TOLERANCE = 300 @staticmethod def construct_event( payl...
{ "repo_name": "stripe/stripe-python", "path": "stripe/webhook.py", "copies": "1", "size": "2720", "license": "mit", "hash": 8739211386317530000, "line_mean": 29.9090909091, "line_max": 78, "alpha_frac": 0.5878676471, "autogenerated": false, "ratio": 4.51077943615257, "config_test": false, "ha...
from __future__ import absolute_import, division, print_function import inspect from typing import List, Optional, Text import numpy as np import tensorflow as tf from six import string_types from tensorflow_probability.python import distributions as tfd from tensorflow_probability.python.distributions import kullbac...
{ "repo_name": "imito/odin", "path": "odin/bay/distributions/utils.py", "copies": "1", "size": "6375", "license": "mit", "hash": -799079870453626600, "line_mean": 35.4285714286, "line_max": 82, "alpha_frac": 0.6407843137, "autogenerated": false, "ratio": 3.90625, "config_test": false, "has_no_...
from __future__ import absolute_import, division, print_function import inspect import datetime import tempfile import os import shutil import numpy as np from contextlib import contextmanager from multiprocessing.pool import ThreadPool from multipledispatch import Dispatcher from datashape import dshape, Record fr...
{ "repo_name": "cpcloud/odo", "path": "odo/utils.py", "copies": "1", "size": "10214", "license": "bsd-3-clause", "hash": -1521450950646808300, "line_mean": 24.2197530864, "line_max": 80, "alpha_frac": 0.5618758567, "autogenerated": false, "ratio": 3.8427389014296462, "config_test": false, "has...
from __future__ import absolute_import, division, print_function import inspect import io import numbers import os import re import string import tarfile import types import warnings from collections import (Iterable, Iterator, Mapping, OrderedDict, defaultdict, deque) from contextlib import c...
{ "repo_name": "imito/odin", "path": "odin/utils/python_utils.py", "copies": "1", "size": "17126", "license": "mit", "hash": 8634052138890086000, "line_mean": 26.8471544715, "line_max": 79, "alpha_frac": 0.5446105337, "autogenerated": false, "ratio": 3.86329799233025, "config_test": false, "ha...
from __future__ import absolute_import, division, print_function import inspect import json import sys import weakref from collections import namedtuple from copy import copy from functools import partial, wraps from decorator import decorator as decorator from .compat.contextlib import suppress from .exceptions imp...
{ "repo_name": "RazerM/bucketcache", "path": "bucketcache/utilities.py", "copies": "1", "size": "8971", "license": "mit", "hash": 6003223853698706000, "line_mean": 31.6218181818, "line_max": 84, "alpha_frac": 0.5601382232, "autogenerated": false, "ratio": 4.46318407960199, "config_test": false, ...
from __future__ import absolute_import, division, print_function import inspect import os from collections import Mapping from contextlib import contextmanager from six import add_metaclass from six.moves import builtins, cPickle from odin.backend import (keras_callbacks, keras_helpers, losses, metrics, ...
{ "repo_name": "imito/odin", "path": "odin/backend/__init__.py", "copies": "1", "size": "1264", "license": "mit", "hash": -6411751419726807000, "line_mean": 27.0888888889, "line_max": 77, "alpha_frac": 0.6083860759, "autogenerated": false, "ratio": 4.299319727891157, "config_test": false, "has...
from __future__ import absolute_import, division, print_function import inspect import os from typing import Text, Type, Union import numpy as np import tensorflow as tf import tensorflow_addons as tfa import torch from six import string_types from tensorflow.python import keras from odin.backend.maths import (momen...
{ "repo_name": "imito/odin", "path": "odin/backend/alias.py", "copies": "1", "size": "6350", "license": "mit", "hash": -8952101936298481000, "line_mean": 28.3981481481, "line_max": 78, "alpha_frac": 0.5982677165, "autogenerated": false, "ratio": 4.126055880441846, "config_test": false, "has_no...
from __future__ import absolute_import, division, print_function import inspect import os import re from abc import ABCMeta, abstractmethod from collections import Mapping from enum import Enum import numpy as np from six import add_metaclass, string_types from sklearn.base import BaseEstimator, TransformerMixin from...
{ "repo_name": "imito/odin", "path": "odin/preprocessing/base.py", "copies": "1", "size": "26283", "license": "mit", "hash": -7711228074606720000, "line_mean": 33.0453367876, "line_max": 89, "alpha_frac": 0.5666019861, "autogenerated": false, "ratio": 3.835254633007442, "config_test": false, "...
from __future__ import absolute_import, division, print_function import inspect import os import numpy as np import torch from six import add_metaclass from tensorflow.python.keras.utils import conv_utils from torch import nn from torch.nn import functional from odin.backend import (parse_activation, parse_constrain...
{ "repo_name": "imito/odin", "path": "odin/networks_torch/keras_torch.py", "copies": "1", "size": "19521", "license": "mit", "hash": -62344879765102130, "line_mean": 37.0526315789, "line_max": 80, "alpha_frac": 0.5001792941, "autogenerated": false, "ratio": 4.622543215723419, "config_test": fals...
from __future__ import absolute_import, division, print_function import inspect class BasicRegistrationFactory(object): """ Generalized registerable factory type. Widgets (classes) can be registered with an instance of this class. Arguments to the factory's `__call__` method are then passed to a func...
{ "repo_name": "Alex-Ian-Hamilton/sunpy", "path": "sunpy/util/datatype_factory_base.py", "copies": "1", "size": "5197", "license": "bsd-2-clause", "hash": -3293656992309893000, "line_mean": 33.417218543, "line_max": 166, "alpha_frac": 0.6372907447, "autogenerated": false, "ratio": 5.01640926640926...
from __future__ import absolute_import, division, print_function import inspect import numpy as np try: import scipy import scipy.fftpack except ImportError: scipy = None chunk_error = ("Dask array only supports taking an FFT along an axis that \n" "has a single chunk. An FFT operation w...
{ "repo_name": "cpcloud/dask", "path": "dask/array/fft.py", "copies": "1", "size": "5765", "license": "bsd-3-clause", "hash": 8788931798378065000, "line_mean": 26.0657276995, "line_max": 80, "alpha_frac": 0.5396357329, "autogenerated": false, "ratio": 3.2811610700056915, "config_test": false, ...
from __future__ import absolute_import, division, print_function import io import json import os.path from collections import defaultdict from functools import wraps from glob import glob from itertools import chain def gen_dict(func): @wraps(func) def decorated(*args, **kwargs): return dict(func(*ar...
{ "repo_name": "eisensheng/pytest-catchlog", "path": "tests/perf/data.py", "copies": "1", "size": "2916", "license": "mit", "hash": 221081519422123520, "line_mean": 33.3058823529, "line_max": 79, "alpha_frac": 0.6124828532, "autogenerated": false, "ratio": 3.5823095823095823, "config_test": fals...
from __future__ import absolute_import, division, print_function import io import logging import os import re from glob import has_magic # for backwards compat, we export cache things from here too from .caching import ( # noqa: F401 BaseCache, BlockCache, BytesCache, MMapCache, ReadAheadCache, ...
{ "repo_name": "intake/filesystem_spec", "path": "fsspec/core.py", "copies": "1", "size": "21270", "license": "bsd-3-clause", "hash": 7342794919521575000, "line_mean": 31.2761760243, "line_max": 87, "alpha_frac": 0.5740479549, "autogenerated": false, "ratio": 4.148624926857812, "config_test": fa...
from __future__ import absolute_import, division, print_function import io import logging import os.path import sys import pprint from virtualenv.builders.base import BaseBuilder from virtualenv._utils import copyfile from virtualenv._utils import ensure_directory SITE = b"""# -*- encoding: utf-8 -*- import os impor...
{ "repo_name": "ionelmc/virtualenv", "path": "virtualenv/builders/legacy.py", "copies": "1", "size": "14244", "license": "mit", "hash": 9073391720060456000, "line_mean": 37.7065217391, "line_max": 120, "alpha_frac": 0.6378124122, "autogenerated": false, "ratio": 3.8372844827586206, "config_test"...
from __future__ import absolute_import, division, print_function import io import os import sys from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand # Version is defined in biostructmap/__init__.py __version__ = "Undefined" for line in open('biostructmap/__init__.py'): ...
{ "repo_name": "andrewguy/biostructmap", "path": "setup.py", "copies": "1", "size": "2221", "license": "mit", "hash": -8333615552728129000, "line_mean": 30.2816901408, "line_max": 100, "alpha_frac": 0.6240432238, "autogenerated": false, "ratio": 3.8030821917808217, "config_test": true, "has_no...
from __future__ import absolute_import, division, print_function import io import os.path import tarfile import tempfile from requests.utils import urlparse import appr.pack as packager from appr.client import ApprClient class FormatBase(object): media_type = NotImplementedError target = NotImplementedErro...
{ "repo_name": "app-registry/appr", "path": "appr/formats/base.py", "copies": "2", "size": "2847", "license": "apache-2.0", "hash": 8255804244835634000, "line_mean": 28.0510204082, "line_max": 98, "alpha_frac": 0.5753424658, "autogenerated": false, "ratio": 4.3071104387291985, "config_test": fal...
from __future__ import absolute_import, division, print_function import ipaddress import pytest from cryptography.hazmat.backends import default_backend from cryptography.x509 import load_pem_x509_certificate from service_identity import SubjectAltNameWarning from service_identity._common import ( DNS_ID, D...
{ "repo_name": "pyca/service_identity", "path": "tests/test_cryptography.py", "copies": "1", "size": "4109", "license": "mit", "hash": 5848667481885968000, "line_mean": 32.1370967742, "line_max": 78, "alpha_frac": 0.6454125091, "autogenerated": false, "ratio": 3.7286751361161525, "config_test": ...
from __future__ import absolute_import, division, print_function import itertools import copy import numpy as np from horton import * from .fields_generate import Fields from .function_fit import poly_fit,rat_fit, solve def finitefield_ham(ham, lf, obasis, f_order, field, xyz=None): """ This function return b...
{ "repo_name": "fhqgfss/polar", "path": "polar/data_generate.py", "copies": "1", "size": "2615", "license": "mit", "hash": 6013025386175439000, "line_mean": 24.1442307692, "line_max": 100, "alpha_frac": 0.6145315488, "autogenerated": false, "ratio": 3.48202396804261, "config_test": false, "has...
from __future__ import absolute_import, division, print_function import itertools import math from glob import glob import heapq from collections import Iterable, Iterator from toolz import (merge, concat, frequencies, merge_with, take, curry, reduce, join, reduceby, compose, second, valmap, count, map, partit...
{ "repo_name": "PeterDSteinberg/dask", "path": "dask/bag/core.py", "copies": "1", "size": "11192", "license": "bsd-3-clause", "hash": -499842993702536770, "line_mean": 31.6297376093, "line_max": 86, "alpha_frac": 0.5229628306, "autogenerated": false, "ratio": 3.607994842037395, "config_test": tr...
from __future__ import absolute_import, division, print_function import itertools import math import distributed import numpy as np from time import time from toolz import concat, take from .clients import DaskClient, SerialClient from .stencil import RightHandedSimplexStencil class Point(object): __slots__ = ...
{ "repo_name": "eriknw/dask-patternsearch", "path": "dask_patternsearch/search.py", "copies": "1", "size": "15377", "license": "bsd-3-clause", "hash": 1635532030601539600, "line_mean": 41.3608815427, "line_max": 120, "alpha_frac": 0.5785914027, "autogenerated": false, "ratio": 4.238423373759647, ...
from __future__ import absolute_import, division, print_function import itertools import math import tempfile import heapq import inspect import gzip import bz2 import os from glob import glob from collections import Iterable, Iterator, defaultdict from functools import wraps, partial from toolz import (merge, freq...
{ "repo_name": "esc/dask", "path": "dask/bag/core.py", "copies": "1", "size": "29804", "license": "bsd-3-clause", "hash": -2592661406064875000, "line_mean": 29.7574819401, "line_max": 100, "alpha_frac": 0.5401623943, "autogenerated": false, "ratio": 3.6817788758492895, "config_test": true, "ha...
from __future__ import absolute_import, division, print_function import itertools import math import tempfile import inspect import gzip import bz2 import os try: from urllib2 import urlopen except ImportError: from urllib.request import urlopen from glob import glob from collections import Iterable, Iterato...
{ "repo_name": "marianotepper/dask", "path": "dask/bag/core.py", "copies": "1", "size": "30985", "license": "bsd-3-clause", "hash": 6790862722747664000, "line_mean": 29.6175889328, "line_max": 100, "alpha_frac": 0.5421332903, "autogenerated": false, "ratio": 3.6720786916330885, "config_test": tr...
from __future__ import absolute_import, division, print_function import itertools import math import tempfile import inspect import gzip import zlib import bz2 import os import codecs from sys import getdefaultencoding from fnmatch import fnmatchcase from glob import glob from collections import Iterable, Iterator, de...
{ "repo_name": "vikhyat/dask", "path": "dask/bag/core.py", "copies": "1", "size": "40406", "license": "bsd-3-clause", "hash": -7639128239195336000, "line_mean": 31.2216905901, "line_max": 103, "alpha_frac": 0.558803148, "autogenerated": false, "ratio": 3.692406104358951, "config_test": true, "...
from __future__ import absolute_import, division, print_function import itertools import math import tempfile import inspect import gzip import zlib import bz2 import os from fnmatch import fnmatchcase from glob import glob from collections import Iterable, Iterator, defaultdict from functools import wraps, partial f...
{ "repo_name": "jayhetee/dask", "path": "dask/bag/core.py", "copies": "1", "size": "37332", "license": "bsd-3-clause", "hash": -7217649217156482000, "line_mean": 31.0446351931, "line_max": 109, "alpha_frac": 0.5524215151, "autogenerated": false, "ratio": 3.6736862822279077, "config_test": true, ...
from __future__ import absolute_import, division, print_function import itertools import numpy as np from dask_patternsearch.search import RightHandedSimplexStencil from toolz import take import gizeh import moviepy.editor as mpy # DB16 - DawnBringer's 16 Col Palette v1.0 # http://pixeljoint.com/forum/forum_posts.as...
{ "repo_name": "eriknw/dask-patternsearch", "path": "tools/stencilgif.py", "copies": "1", "size": "3471", "license": "bsd-3-clause", "hash": 3038349069889144000, "line_mean": 30.8440366972, "line_max": 105, "alpha_frac": 0.577355229, "autogenerated": false, "ratio": 3.0287958115183247, "config_t...
from __future__ import absolute_import, division, print_function import itertools from datashape import DataShape, iscollection from toolz import curry, concat from .collections import Shift from .core import Node from .expressions import Field, Map, ElemWise, symbol, shape, Coerce from .arithmetic import maxshape, ...
{ "repo_name": "ContinuumIO/blaze", "path": "blaze/expr/broadcast.py", "copies": "3", "size": "4761", "license": "bsd-3-clause", "hash": -5249906757919316000, "line_mean": 28.3888888889, "line_max": 97, "alpha_frac": 0.604494854, "autogenerated": false, "ratio": 3.6821345707656614, "config_test"...
from __future__ import absolute_import, division, print_function import itertools from llvm.core import Constant from .llvm_array import (auto_const_intp, intp_type, store_at, load_at, get_shape_ptr, get_data_ptr, get_strides_ptr, isinteger, ...
{ "repo_name": "aaronmartin0303/blaze", "path": "blaze/compute/llgetitem.py", "copies": "2", "size": "11489", "license": "bsd-3-clause", "hash": -9084881157025577000, "line_mean": 29.2342105263, "line_max": 80, "alpha_frac": 0.598833667, "autogenerated": false, "ratio": 3.35739333722969, "config...
from __future__ import absolute_import, division, print_function import itertools from toolz import curry from datashape import DataShape, iscollection from .collections import Shift from .expressions import Field, Map, ElemWise, symbol, shape, Coerce from .arithmetic import maxshape, UnaryOp, BinOp from .datetime ...
{ "repo_name": "ChinaQuants/blaze", "path": "blaze/expr/broadcast.py", "copies": "1", "size": "4361", "license": "bsd-3-clause", "hash": -1183051264635120400, "line_mean": 27.5032679739, "line_max": 97, "alpha_frac": 0.5941297867, "autogenerated": false, "ratio": 3.6432748538011697, "config_test...
from __future__ import absolute_import, division, print_function import itertools from toolz import curry from datashape import DataShape, iscollection from .expressions import Field, Map, ElemWise, symbol, shape from .arithmetic import maxshape, Arithmetic, UnaryOp from .math import Math from .datetime import Date...
{ "repo_name": "alexmojaki/blaze", "path": "blaze/expr/broadcast.py", "copies": "5", "size": "4159", "license": "bsd-3-clause", "hash": -9201309584324724000, "line_mean": 27.4863013699, "line_max": 97, "alpha_frac": 0.599903823, "autogenerated": false, "ratio": 3.6259808195292065, "config_test":...
from __future__ import absolute_import, division, print_function import itertools import numpy as np _counter = itertools.count() def parameterized(names, params): def decorator(func): func.param_names = names func.params = params return func return decorator def requires_dask(): ...
{ "repo_name": "shoyer/xray", "path": "asv_bench/benchmarks/__init__.py", "copies": "1", "size": "1128", "license": "apache-2.0", "hash": 5933893693757480000, "line_mean": 22.5, "line_max": 66, "alpha_frac": 0.6320921986, "autogenerated": false, "ratio": 3.4922600619195046, "config_test": false,...
from __future__ import absolute_import, division, print_function import json, ijson from itertools import chain def _build_value(data): ''' Build a value (number, array, whatever) from an ijson stream. ''' for (prefix, event, value) in data: if event in ('string', 'null', 'boolean'): r...
{ "repo_name": "openaddresses/machine", "path": "openaddr/sample.py", "copies": "1", "size": "3167", "license": "isc", "hash": -5912728485392540000, "line_mean": 27.7909090909, "line_max": 88, "alpha_frac": 0.5402589201, "autogenerated": false, "ratio": 4.167105263157895, "config_test": false, ...
from __future__ import absolute_import, division, print_function import json from abc import ABCMeta, abstractmethod from functools import partial from tempfile import TemporaryFile import six from represent import autorepr from .compat.contextlib import suppress __all__ = ( 'DefaultKeyMaker', 'StreamingDef...
{ "repo_name": "RazerM/bucketcache", "path": "bucketcache/keymakers.py", "copies": "1", "size": "2836", "license": "mit", "hash": -2068663004951174100, "line_mean": 26.5339805825, "line_max": 80, "alpha_frac": 0.6096614951, "autogenerated": false, "ratio": 4.283987915407855, "config_test": false...
from __future__ import absolute_import, division, print_function import json from base64 import b64decode from flask import Blueprint, current_app, jsonify, request import appr.api.impl.registry from appr.api.app import getvalues, repo_name from appr.exception import ( ApprException, ChannelNotFound, InvalidPara...
{ "repo_name": "app-registry/appr", "path": "appr/api/registry.py", "copies": "2", "size": "9277", "license": "apache-2.0", "hash": 3209186167064203000, "line_mean": 40.0486725664, "line_max": 112, "alpha_frac": 0.7001185728, "autogenerated": false, "ratio": 3.592951200619675, "config_test": fal...
from __future__ import absolute_import, division, print_function import json from base64 import b64encode import pytest import requests import requests_mock import appr from appr.client import DEFAULT_PREFIX, DEFAULT_REGISTRY, ApprClient @pytest.fixture() def channels_data(): return {'dev': {'current': '1.0.0-...
{ "repo_name": "cn-app-registry/cnr-server", "path": "tests/test_registry.py", "copies": "2", "size": "8690", "license": "apache-2.0", "hash": -3619377675580104000, "line_mean": 37.281938326, "line_max": 132, "alpha_frac": 0.6230149597, "autogenerated": false, "ratio": 3.139450867052023, "config...
from __future__ import absolute_import, division, print_function import json from blaze.catalog.blaze_url import split_array_base import dynd from dynd import nd, ndt from dynd.nd import as_numpy from blaze import array class compute_session: def __init__(self, base_url, array_name): session_name, root_di...
{ "repo_name": "markflorisson/blaze-core", "path": "blaze/io/server/compute_session.py", "copies": "7", "size": "7979", "license": "bsd-3-clause", "hash": 3726957083972581000, "line_mean": 37.3605769231, "line_max": 75, "alpha_frac": 0.5354054393, "autogenerated": false, "ratio": 3.850868725868725...
from __future__ import absolute_import, division, print_function import json from cStringIO import StringIO import urllib import bottle from dossier.fc import FeatureCollection import dossier.web.routes as routes from dossier.web.tests import config_local, kvl, store, label_store # noqa def rot14(s): # Use `r...
{ "repo_name": "dossier/dossier.web", "path": "dossier/web/tests/test_routes.py", "copies": "1", "size": "1347", "license": "mit", "hash": -4067338607863798300, "line_mean": 24.9038461538, "line_max": 78, "alpha_frac": 0.6384558278, "autogenerated": false, "ratio": 2.9866962305986697, "config_te...
from __future__ import absolute_import, division, print_function import json from csv import DictReader from io import StringIO from base64 import b64decode from operator import itemgetter from os.path import join, dirname, splitext, relpath from dateutil.parser import parse as parse_datetime from urllib.parse import ...
{ "repo_name": "openaddresses/machine", "path": "openaddr/summarize.py", "copies": "1", "size": "5331", "license": "isc", "hash": 5817250398828652000, "line_mean": 27.8162162162, "line_max": 85, "alpha_frac": 0.6096417183, "autogenerated": false, "ratio": 3.689273356401384, "config_test": false,...
from __future__ import absolute_import, division, print_function import json from toolz.curried import map, take, pipe, pluck, get, concat, filter from collections import Iterator, Iterable import os from contextlib import contextmanager from datashape import discover, var, dshape, Record, DataShape from datashape im...
{ "repo_name": "mrocklin/into", "path": "into/backends/json.py", "copies": "1", "size": "7011", "license": "bsd-3-clause", "hash": 6566293374856239000, "line_mean": 24.4945454545, "line_max": 78, "alpha_frac": 0.6083297675, "autogenerated": false, "ratio": 3.4435166994106092, "config_test": fals...
from __future__ import absolute_import, division, print_function import json import logging import os import os.path from collections import OrderedDict import jsonpatch import yaml from appr.display import print_deploy_result from appr.formats.appr.kub_base import KubBase from appr.platforms.kubernetes import ANNOT...
{ "repo_name": "app-registry/appr", "path": "appr/formats/appr/kub.py", "copies": "2", "size": "7520", "license": "apache-2.0", "hash": 53601803445983910, "line_mean": 36.9797979798, "line_max": 98, "alpha_frac": 0.5199468085, "autogenerated": false, "ratio": 4.460260972716489, "config_test": fa...
from __future__ import absolute_import, division, print_function import json import logging import os import os.path import re import jinja2 import yaml import appr.template_filters as filters from appr.utils import convert_utf8 logger = logging.getLogger(__name__) with open(os.path.join(os.path.dirname(__file__), ...
{ "repo_name": "app-registry/appr", "path": "appr/render_jsonnet.py", "copies": "2", "size": "4262", "license": "apache-2.0", "hash": -7556183672561099000, "line_mean": 37.7454545455, "line_max": 92, "alpha_frac": 0.61238855, "autogenerated": false, "ratio": 3.7222707423580785, "config_test": fa...
from __future__ import absolute_import, division, print_function import json import os import sys import shutil import requests import logging import tempfile import zipfile from subprocess import Popen, PIPE import warnings from .exceptions import CondaException from .utils import shell_out mini_file = "Miniconda-l...
{ "repo_name": "blaze/knit", "path": "knit/env.py", "copies": "2", "size": "8326", "license": "bsd-3-clause", "hash": -689858093141764200, "line_mean": 31.0230769231, "line_max": 80, "alpha_frac": 0.5679798222, "autogenerated": false, "ratio": 4.004810004810005, "config_test": false, "has_no_k...
from __future__ import absolute_import, division, print_function import json import os from appr.exception import Forbidden, PackageAlreadyExists from appr.models.blob_base import BlobBase from appr.models.channel_base import ChannelBase from appr.models.package_base import PackageBase class ApprDB(object): Cha...
{ "repo_name": "cn-app-registry/cnr-server", "path": "appr/models/db_base.py", "copies": "2", "size": "2810", "license": "apache-2.0", "hash": -5053799959045351000, "line_mean": 36.4666666667, "line_max": 119, "alpha_frac": 0.5544483986, "autogenerated": false, "ratio": 4.108187134502924, "confi...
from __future__ import absolute_import, division, print_function import json import os from ..qt.widgets import ScatterWidget, HistogramWidget from ..core import Subset def save_page(page, page_number, label, subset): """ Convert a tab of a glue session into a D3PO page :param page: Tuple of data viewers t...
{ "repo_name": "JudoWill/glue", "path": "glue/plugins/export_d3po.py", "copies": "1", "size": "8773", "license": "bsd-3-clause", "hash": 1987512367408500500, "line_mean": 28.0496688742, "line_max": 121, "alpha_frac": 0.6130172119, "autogenerated": false, "ratio": 3.6938947368421053, "config_test...
from __future__ import absolute_import, division, print_function import json import os.path as op import six import numpy as np import scipy.signal as sig import scipy.io.wavfile as sciwav MAXINT16 = 2**15 - 1 FS = 44100 COEFF_DIR = op.join(op.dirname(op.abspath(__file__)), 'coeffs') def normalize(data, maxamp=1): ...
{ "repo_name": "nicktimko/pots-sim", "path": "potsim/filters.py", "copies": "1", "size": "4324", "license": "mit", "hash": -9061933648046750000, "line_mean": 27.2614379085, "line_max": 79, "alpha_frac": 0.5811748381, "autogenerated": false, "ratio": 3.5794701986754967, "config_test": false, "h...
from __future__ import absolute_import, division, print_function import json import random import numpy as np from stt_utils import calc_feat_dim, spectrogram_from_file from config_util import generate_file_path from log_util import LogUtil from label_util import LabelUtil from stt_bi_graphemes_util import generate_...
{ "repo_name": "arikpoz/mxnet", "path": "example/speech_recognition/stt_datagenerator.py", "copies": "11", "size": "10656", "license": "apache-2.0", "hash": -3992392670688260000, "line_mean": 44.9310344828, "line_max": 112, "alpha_frac": 0.5914039039, "autogenerated": false, "ratio": 3.91908789996...
from __future__ import absolute_import, division, print_function import json import tarfile from os.path import basename def dist_fn(fn): if fn.endswith('.tar'): return fn[:-4] elif fn.endswith('.tar.bz2'): return fn[:-8] else: raise Exception('did not expect filename: %r' % fn) ...
{ "repo_name": "rmcgibbo/conda-build", "path": "conda_build/tarcheck.py", "copies": "8", "size": "1943", "license": "bsd-3-clause", "hash": 429311510727633800, "line_mean": 30.8524590164, "line_max": 87, "alpha_frac": 0.5409161091, "autogenerated": false, "ratio": 3.679924242424242, "config_test...
from __future__ import absolute_import, division, print_function import json import time from workflows.services.common_service import CommonService class SampleConsumer(CommonService): '''An example service building on top of the workflow.services architecture, demonstrating how this architecture can be used...
{ "repo_name": "xia2/workflows", "path": "workflows/services/sample_consumer.py", "copies": "1", "size": "1401", "license": "bsd-3-clause", "hash": 9056505030460099000, "line_mean": 35.8684210526, "line_max": 86, "alpha_frac": 0.6174161313, "autogenerated": false, "ratio": 4.0964912280701755, "c...
from __future__ import absolute_import, division, print_function import json import unittest from io import BytesIO from ..sample import sample_geojson class TestSample (unittest.TestCase): def test_sample(self): geojson_input = b'''{ "type": "FeatureCollection", "features": [ ...
{ "repo_name": "slibby/machine", "path": "openaddr/tests/sample.py", "copies": "1", "size": "2980", "license": "isc", "hash": -8177020759239320000, "line_mean": 57.431372549, "line_max": 271, "alpha_frac": 0.5929530201, "autogenerated": false, "ratio": 3.7064676616915424, "config_test": false, ...
from __future__ import absolute_import, division, print_function import json from blaze.catalog.blaze_url import split_array_base import dynd from dynd import nd from dynd.nd import as_numpy from blaze import array class compute_session: def __init__(self, base_url, array_name): session_name, root_dir =...
{ "repo_name": "xsixing/blaze", "path": "blaze/io/server/compute_session.py", "copies": "3", "size": "7976", "license": "bsd-3-clause", "hash": 8057779961791861000, "line_mean": 36.980952381, "line_max": 75, "alpha_frac": 0.5352306921, "autogenerated": false, "ratio": 3.8531400966183575, "config...
from __future__ import (absolute_import, division, print_function) import json from twisted.internet.protocol import Factory, Protocol, connectionDone from twisted.internet import task, threads, defer from danex import _dane, _tls class DaneDoctorProtocol(Protocol): def dataReceived(self, data): domai...
{ "repo_name": "hynek/tnw", "path": "dane_doctor/protocol.py", "copies": "1", "size": "1597", "license": "mit", "hash": -3885106744660154400, "line_mean": 28.5740740741, "line_max": 77, "alpha_frac": 0.5272385723, "autogenerated": false, "ratio": 4.4484679665738165, "config_test": false, "has_...
from __future__ import absolute_import, division, print_function import json import pytest import stripe class TestListObject(object): @pytest.fixture def list_object(self): return stripe.ListObject.construct_from( {"object": "list", "url": "/my/path", "data": ["foo"]}, "mykey" ...
{ "repo_name": "stripe/stripe-python", "path": "tests/api_resources/test_list_object.py", "copies": "1", "size": "10295", "license": "mit", "hash": 4120485119183714000, "line_mean": 29.0145772595, "line_max": 79, "alpha_frac": 0.4842156387, "autogenerated": false, "ratio": 3.7974917004795277, "c...
from __future__ import absolute_import, division, print_function import json import stripe from stripe import six, util from stripe.stripe_response import StripeResponse, StripeStreamResponse class RequestMock(object): def __init__(self, mocker): self._mocker = mocker self._real_request = strip...
{ "repo_name": "stripe/stripe-python", "path": "tests/request_mock.py", "copies": "1", "size": "7167", "license": "mit", "hash": 9179226620747470000, "line_mean": 34.835, "line_max": 79, "alpha_frac": 0.5826705735, "autogenerated": false, "ratio": 4.223335297583971, "config_test": false, "has_...
from __future__ import absolute_import, division, print_function import json class ManifestError(Exception): """Something is wrong with the manifest format.""" pass def _make_property(name): @property def getter(self): return self._data.get(name) return getter _required_keys = {'qss_f...
{ "repo_name": "zyantific/IDASkins", "path": "plugins/idaskins/thememanifest.py", "copies": "1", "size": "1247", "license": "mit", "hash": -1688466534349475800, "line_mean": 25.5319148936, "line_max": 67, "alpha_frac": 0.5942261427, "autogenerated": false, "ratio": 3.909090909090909, "config_tes...
from __future__ import absolute_import, division, print_function import linecache import logging import os.path import sys def get_exception_source(): '''Returns full file path, file name, line number, function name, and line contents causing the last exception.''' _, _, tb = sys.exc_info() while tb.tb_nex...
{ "repo_name": "xia2/workflows", "path": "workflows/logging/__init__.py", "copies": "1", "size": "2221", "license": "bsd-3-clause", "hash": 7995685854873166000, "line_mean": 33.703125, "line_max": 85, "alpha_frac": 0.7019360648, "autogenerated": false, "ratio": 4.052919708029197, "config_test": ...
from __future__ import absolute_import, division, print_function import linecache import sys import warnings import pytest from characteristic import ( Attribute, NOTHING, PY26, _attrs_to_script, _ensure_attributes, attributes, immutable, with_cmp, with_init, with_repr, ) PY2...
{ "repo_name": "hynek/characteristic", "path": "test_characteristic.py", "copies": "1", "size": "23985", "license": "mit", "hash": 5225856543588228000, "line_mean": 26.3177676538, "line_max": 79, "alpha_frac": 0.5089430894, "autogenerated": false, "ratio": 4.0216297786720325, "config_test": true...
from __future__ import absolute_import, division, print_function import locale import re import os import sys import stat from glob import glob from os.path import (basename, dirname, join, splitext, isdir, isfile, exists, islink, realpath, relpath) try: from os import readlink except ImportEr...
{ "repo_name": "sandhujasmine/conda-build", "path": "conda_build/post.py", "copies": "1", "size": "15124", "license": "bsd-3-clause", "hash": 84291779202404860, "line_mean": 35.798053528, "line_max": 96, "alpha_frac": 0.5717402803, "autogenerated": false, "ratio": 3.6968956245416766, "config_tes...
from __future__ import absolute_import, division, print_function import logging from abc import ABCMeta, abstractmethod from glue.utils import CallbackMixin from glue.core.data_factories import load_data MAX_UNDO = 50 """ The classes in this module allow user actions to be stored as commands, which can be undone/re...
{ "repo_name": "saimn/glue", "path": "glue/core/command.py", "copies": "2", "size": "7773", "license": "bsd-3-clause", "hash": -8640250691673295000, "line_mean": 23.7547770701, "line_max": 83, "alpha_frac": 0.6146918822, "autogenerated": false, "ratio": 4.059007832898172, "config_test": false, ...
from __future__ import absolute_import, division, print_function import logging from abc import ABCMeta, abstractproperty, abstractmethod import numpy as np from matplotlib.cm import gray from glue.external import six from glue.core.exceptions import IncompatibleAttribute from glue.core.layer_artist import Matplotli...
{ "repo_name": "saimn/glue", "path": "glue/viewers/image/layer_artist.py", "copies": "2", "size": "11664", "license": "bsd-3-clause", "hash": 1057277214242277200, "line_mean": 31.7640449438, "line_max": 106, "alpha_frac": 0.5568415638, "autogenerated": false, "ratio": 4.038781163434903, "config_...
from __future__ import absolute_import, division, print_function import logging from contextlib import contextmanager from weakref import WeakKeyDictionary from inspect import getmro from collections import defaultdict from glue.core.exceptions import InvalidSubscriber, InvalidMessage from glue.core.message import Me...
{ "repo_name": "stscieisenhamer/glue", "path": "glue/core/hub.py", "copies": "2", "size": "8577", "license": "bsd-3-clause", "hash": 1125380766443342500, "line_mean": 33.4457831325, "line_max": 79, "alpha_frac": 0.6083712254, "autogenerated": false, "ratio": 4.870528109028961, "config_test": fal...
from __future__ import absolute_import, division, print_function import logging from contextlib import contextmanager import string from itertools import count import numpy as np import pandas as pd from ..external.six.moves import reduce from ..external.six import string_types __all__ = ["identity", "relim", "spl...
{ "repo_name": "JudoWill/glue", "path": "glue/core/util.py", "copies": "1", "size": "10109", "license": "bsd-3-clause", "hash": 7090319416678223000, "line_mean": 27.9656160458, "line_max": 82, "alpha_frac": 0.607280641, "autogenerated": false, "ratio": 3.8716966679433167, "config_test": false, ...
from __future__ import absolute_import, division, print_function import logging from datetime import datetime from errno import ENOTEMPTY from io import BytesIO from fsspec import AbstractFileSystem logger = logging.Logger("fsspec.memoryfs") class MemoryFileSystem(AbstractFileSystem): """A filesystem based on ...
{ "repo_name": "intake/filesystem_spec", "path": "fsspec/implementations/memory.py", "copies": "1", "size": "8484", "license": "bsd-3-clause", "hash": 8873974750892605000, "line_mean": 32.2705882353, "line_max": 86, "alpha_frac": 0.4909240924, "autogenerated": false, "ratio": 4.404984423676012, ...
from __future__ import absolute_import, division, print_function import logging from functools import wraps import numpy as np from ..external.modest_image import extract_matched_slices from ..core.exceptions import IncompatibleAttribute from ..core.data import Data from ..core.subset import Subset, RoiSubsetState f...
{ "repo_name": "JudoWill/glue", "path": "glue/clients/image_client.py", "copies": "1", "size": "26469", "license": "bsd-3-clause", "hash": -8795166618981454000, "line_mean": 29.8856476079, "line_max": 82, "alpha_frac": 0.558464619, "autogenerated": false, "ratio": 3.9850948509485096, "config_tes...
from __future__ import absolute_import, division, print_function import logging from functools import wraps import numpy as np from glue.external.modest_image import extract_matched_slices from glue.core.edit_subset_mode import EditSubsetMode from glue.core.callback_property import ( callback_property, CallbackP...
{ "repo_name": "saimn/glue", "path": "glue/viewers/image/client.py", "copies": "1", "size": "28957", "license": "bsd-3-clause", "hash": 6251882682900647000, "line_mean": 30.1031149302, "line_max": 95, "alpha_frac": 0.5601063646, "autogenerated": false, "ratio": 3.9924169309251343, "config_test":...
from __future__ import absolute_import, division, print_function import logging from functools import wraps import numpy as np # We avoid importing matplotlib up here otherwise Matplotlib and therefore Qt # get imported as soon as glue.utils is imported. from glue.external.axescache import AxesCache from glue.utils...
{ "repo_name": "saimn/glue", "path": "glue/utils/matplotlib.py", "copies": "2", "size": "7665", "license": "bsd-3-clause", "hash": -1435514187026761500, "line_mean": 26.0848056537, "line_max": 79, "alpha_frac": 0.6275277234, "autogenerated": false, "ratio": 3.69041887337506, "config_test": false...
from __future__ import absolute_import, division, print_function import logging from inspect import getmro from collections import defaultdict from glue.core.exceptions import InvalidSubscriber, InvalidMessage from glue.core.message import Message __all__ = ['Hub', 'HubListener'] class Hub(object): """The hu...
{ "repo_name": "saimn/glue", "path": "glue/core/hub.py", "copies": "2", "size": "7787", "license": "bsd-3-clause", "hash": -449945022321079550, "line_mean": 33.9192825112, "line_max": 79, "alpha_frac": 0.6110183639, "autogenerated": false, "ratio": 4.833643699565488, "config_test": false, "has...
from __future__ import absolute_import, division, print_function import logging from inspect import getmro from collections import defaultdict from .message import Message from .exceptions import InvalidSubscriber, InvalidMessage __all__ = ['Hub', 'HubListener'] class Hub(object): """The hub manages communica...
{ "repo_name": "JudoWill/glue", "path": "glue/core/hub.py", "copies": "1", "size": "7741", "license": "bsd-3-clause", "hash": 4333110494248442000, "line_mean": 33.8693693694, "line_max": 79, "alpha_frac": 0.6094819791, "autogenerated": false, "ratio": 4.8654934003771215, "config_test": false, ...
from __future__ import absolute_import, division, print_function import logging from itertools import count from functools import partial import numpy as np import pandas as pd from matplotlib.ticker import AutoLocator, MaxNLocator, LogLocator from matplotlib.ticker import (LogFormatterMathtext, ScalarFormatter, ...
{ "repo_name": "stscieisenhamer/glue", "path": "glue/core/util.py", "copies": "1", "size": "11445", "license": "bsd-3-clause", "hash": -3899604487544298000, "line_mean": 29.6016042781, "line_max": 87, "alpha_frac": 0.5994757536, "autogenerated": false, "ratio": 3.729227761485826, "config_test": ...
from __future__ import absolute_import, division, print_function import logging from time import time import numpy as np from ginga.misc import Bunch from ginga.util import wcsmod from ginga import AstroImage, BaseImage from glue.core.util import split_component_view from glue.core.exceptions import IncompatibleAttr...
{ "repo_name": "saimn/glue", "path": "glue/plugins/ginga_viewer/qt/client.py", "copies": "1", "size": "13126", "license": "bsd-3-clause", "hash": 1973570190032169700, "line_mean": 28.8997722096, "line_max": 111, "alpha_frac": 0.5815937833, "autogenerated": false, "ratio": 3.803535207186323, "con...
from __future__ import absolute_import, division, print_function import logging import docker.errors from urllib3.exceptions import TimeoutError from requests.exceptions import Timeout from ..decorators import retry from ..exceptions import ClipperException logger = logging.getLogger(__name__) def create_network(d...
{ "repo_name": "ucbrise/clipper", "path": "clipper_admin/clipper_admin/docker/docker_api_utils.py", "copies": "1", "size": "2242", "license": "apache-2.0", "hash": -823434625730076000, "line_mean": 33.4923076923, "line_max": 80, "alpha_frac": 0.6601248885, "autogenerated": false, "ratio": 4.025134...
from __future__ import absolute_import, division, print_function import logging import multiprocessing import threading import time import workflows import workflows.frontend.utilization import workflows.services import workflows.transport import workflows.util from workflows.services.common_service import CommonServ...
{ "repo_name": "xia2/workflows", "path": "workflows/frontend/__init__.py", "copies": "1", "size": "16220", "license": "bsd-3-clause", "hash": 1695671499647257000, "line_mean": 40.0632911392, "line_max": 101, "alpha_frac": 0.6411837238, "autogenerated": false, "ratio": 4.43048347446053, "config_t...
from __future__ import absolute_import, division, print_function import logging import numpy import xarray from itertools import groupby from collections import defaultdict, OrderedDict from ..model import GeoBox from ..utils import check_intersect from .query import Query, query_group_by from .core import Datacube, ...
{ "repo_name": "ceos-seo/Data_Cube_v2", "path": "agdc-v2/datacube/api/grid_workflow.py", "copies": "1", "size": "9765", "license": "apache-2.0", "hash": -4582628576569607000, "line_mean": 38.6951219512, "line_max": 118, "alpha_frac": 0.5819764465, "autogenerated": false, "ratio": 4.203616013775290...
from __future__ import absolute_import, division, print_function import logging import operator import numbers import numpy as np from .util import join_component_view from .subset import InequalitySubsetState from .contracts import contract, ContractsMeta from ..external.six import add_metaclass __all__ = ['Compon...
{ "repo_name": "JudoWill/glue", "path": "glue/core/component_link.py", "copies": "1", "size": "12236", "license": "bsd-3-clause", "hash": -8295404549606741000, "line_mean": 32.8011049724, "line_max": 79, "alpha_frac": 0.6052631579, "autogenerated": false, "ratio": 4.0637661906343405, "config_tes...
from __future__ import absolute_import, division, print_function import logging import operator import warnings import numpy as np import pandas as pd from glue.core.subset import (RoiSubsetState, RangeSubsetState, CategoricalROISubsetState, AndState, Categ...
{ "repo_name": "stscieisenhamer/glue", "path": "glue/core/component.py", "copies": "2", "size": "23534", "license": "bsd-3-clause", "hash": -7402596534527506000, "line_mean": 32.8618705036, "line_max": 90, "alpha_frac": 0.5583411235, "autogenerated": false, "ratio": 4.666666666666667, "config_te...
from __future__ import absolute_import, division, print_function import logging import os import re import requests import socket from subprocess import STDOUT try: from subprocess import SubprocessError except ImportError: # pragma: no cover # py2 from subprocess import CalledProcessError as SubprocessEr...
{ "repo_name": "blaze/knit", "path": "knit/yarn_api.py", "copies": "2", "size": "12916", "license": "bsd-3-clause", "hash": -7954509776072803000, "line_mean": 34.2896174863, "line_max": 80, "alpha_frac": 0.5252400124, "autogenerated": false, "ratio": 4.278237827095064, "config_test": false, "h...
from __future__ import absolute_import, division, print_function import logging import os import sys from conda_build.conda_interface import ArgumentParser from conda_build import api from conda_build.index import MAX_THREADS_DEFAULT from conda_build.utils import DEFAULT_SUBDIRS logging.basicConfig(level=logging.IN...
{ "repo_name": "pelson/conda-build", "path": "conda_build/cli/main_index.py", "copies": "2", "size": "2870", "license": "bsd-3-clause", "hash": 8094977412411163000, "line_mean": 30.5384615385, "line_max": 115, "alpha_frac": 0.6229965157, "autogenerated": false, "ratio": 3.953168044077135, "confi...
from __future__ import absolute_import, division, print_function import logging import os import tensorflow as tf from tensorflow.python.saved_model import builder as saved_model_builder from tensorflow.python.saved_model import (signature_constants, tag_constants) def get_optimizer_by_name(optimizer_name, learning_...
{ "repo_name": "tobegit3hub/deep_recommend_system", "path": "util.py", "copies": "1", "size": "3354", "license": "apache-2.0", "hash": 8266081195671842000, "line_mean": 30.641509434, "line_max": 78, "alpha_frac": 0.675313059, "autogenerated": false, "ratio": 3.9182242990654204, "config_test": fa...
from __future__ import absolute_import, division, print_function import logging import os import time import uuid from os import environ as env from threading import Thread from time import sleep from mentos.exceptions import ExecutorException from mentos.subscription import Event, Subscription from mentos.utils impo...
{ "repo_name": "Arttii/malefico", "path": "mentos/executor.py", "copies": "2", "size": "8173", "license": "apache-2.0", "hash": 8053147359128773000, "line_mean": 35.3244444444, "line_max": 80, "alpha_frac": 0.581793711, "autogenerated": false, "ratio": 4.008337420304071, "config_test": false, ...
from __future__ import absolute_import, division, print_function import logging import os import pytest import py.path logger = logging.getLogger(__name__) @pytest.fixture(scope='session', autouse=True) def aws_credentials(): # Handle change in https://github.com/spulec/moto/issues/1924 # Ensure AWS SDK fi...
{ "repo_name": "remind101/stacker", "path": "stacker/tests/conftest.py", "copies": "1", "size": "1230", "license": "bsd-2-clause", "hash": -6445209468204074000, "line_mean": 26.9545454545, "line_max": 74, "alpha_frac": 0.6203252033, "autogenerated": false, "ratio": 3.6070381231671553, "config_te...
from __future__ import absolute_import, division, print_function import logging import pywt import numpy as np from TotalActivation.filters.filter_boundary import filter_boundary_normal, filter_boundary_transpose # from TotalActivation.process.utils import mad logging.basicConfig(format='%(levelname)s:%(message)s'...
{ "repo_name": "mfalkiewicz/pyTotalActivation", "path": "TotalActivation/process/temporal.py", "copies": "2", "size": "4292", "license": "mit", "hash": -7822646072191780000, "line_mean": 33.6129032258, "line_max": 115, "alpha_frac": 0.5775862069, "autogenerated": false, "ratio": 2.9157608695652173...