text
stringlengths
0
1.05M
meta
dict
"""AMQPStorm Channel.Basic.""" import logging import math from pamqp import body as pamqp_body from pamqp import header as pamqp_header from pamqp import specification from amqpstorm import compatibility from amqpstorm.base import FRAME_MAX from amqpstorm.base import Handler from amqpstorm.exception import AMQPChann...
{ "repo_name": "fake-name/ReadableWebProxy", "path": "amqpstorm/basic.py", "copies": "1", "size": "18540", "license": "bsd-3-clause", "hash": 7578447197183806000, "line_mean": 42.1162790698, "line_max": 79, "alpha_frac": 0.5933117584, "autogenerated": false, "ratio": 4.8243559718969555, "config_...
"""AMQPStorm Channel.Exchange.""" import logging from pamqp.specification import Exchange as pamqp_exchange from amqpstorm import compatibility from amqpstorm.base import Handler from amqpstorm.exception import AMQPInvalidArgument LOGGER = logging.getLogger(__name__) class Exchange(Handler): """RabbitMQ Excha...
{ "repo_name": "eandersson/amqp-storm", "path": "amqpstorm/exchange.py", "copies": "3", "size": "6025", "license": "mit", "hash": -2984598828133813000, "line_mean": 42.9781021898, "line_max": 77, "alpha_frac": 0.6074688797, "autogenerated": false, "ratio": 5.050293378038559, "config_test": false...
"""AMQPStorm Channel.Queue.""" import logging from pamqp.specification import Queue as pamqp_queue from amqpstorm import compatibility from amqpstorm.base import Handler from amqpstorm.exception import AMQPInvalidArgument LOGGER = logging.getLogger(__name__) class Queue(Handler): """RabbitMQ Queue Operations....
{ "repo_name": "fake-name/ReadableWebProxy", "path": "amqpstorm/queue.py", "copies": "3", "size": "6702", "license": "bsd-3-clause", "hash": -3405905930285609000, "line_mean": 41.1509433962, "line_max": 77, "alpha_frac": 0.6072814085, "autogenerated": false, "ratio": 4.838989169675091, "config_t...
"""AMQPStorm Channel.Tx.""" import logging from pamqp import specification from amqpstorm.base import Handler LOGGER = logging.getLogger(__name__) class Tx(Handler): """RabbitMQ Transactions. Server local transactions, in which the server will buffer published messages until the client commit...
{ "repo_name": "eandersson/amqpstorm", "path": "amqpstorm/tx.py", "copies": "3", "size": "2299", "license": "mit", "hash": -3979623476653379000, "line_mean": 27.0365853659, "line_max": 76, "alpha_frac": 0.5989560679, "autogenerated": false, "ratio": 4.912393162393163, "config_test": false, "ha...
"""AMQPStorm Connection.Channel0.""" import logging import platform from pamqp import specification from pamqp.heartbeat import Heartbeat from amqpstorm import __version__ from amqpstorm.base import LOCALE from amqpstorm.base import MAX_CHANNELS from amqpstorm.base import MAX_FRAME_SIZE from amqpstorm.base import St...
{ "repo_name": "eandersson/amqpstorm", "path": "amqpstorm/channel0.py", "copies": "1", "size": "7724", "license": "mit", "hash": 5893251624002830000, "line_mean": 31.3179916318, "line_max": 78, "alpha_frac": 0.5730191611, "autogenerated": false, "ratio": 4.195545898967953, "config_test": false, ...
"""AMQPStorm Connection.Channel.""" import logging from time import sleep from pamqp import specification from pamqp.header import ContentHeader from amqpstorm import compatibility from amqpstorm.base import BaseChannel from amqpstorm.base import BaseMessage from amqpstorm.base import IDLE_WAIT from amqpstorm.basic ...
{ "repo_name": "eandersson/amqpstorm", "path": "amqpstorm/channel.py", "copies": "1", "size": "17179", "license": "mit", "hash": 6366719290298589000, "line_mean": 32.2926356589, "line_max": 79, "alpha_frac": 0.5610338204, "autogenerated": false, "ratio": 4.5231700895208, "config_test": false, ...
"""AMQPStorm Connection.Channel.""" import logging import multiprocessing from time import sleep from time import time from pamqp import specification from pamqp.header import ContentHeader from amqpstorm import compatibility from amqpstorm.base import BaseChannel from amqpstorm.base import IDLE_WAIT from amqpstorm....
{ "repo_name": "fake-name/ReadableWebProxy", "path": "amqpstorm/channel.py", "copies": "1", "size": "16286", "license": "bsd-3-clause", "hash": 5366229071167194000, "line_mean": 32.1690427699, "line_max": 91, "alpha_frac": 0.5612796267, "autogenerated": false, "ratio": 4.454595185995624, "config...
"""AMQPStorm Connection.Heartbeat.""" import logging import threading from amqpstorm.exception import AMQPConnectionError LOGGER = logging.getLogger(__name__) class Heartbeat(object): """Internal Heartbeat handler.""" def __init__(self, interval, send_heartbeat_impl, timer=threading.Timer): self.s...
{ "repo_name": "eandersson/amqpstorm", "path": "amqpstorm/heartbeat.py", "copies": "2", "size": "3825", "license": "mit", "hash": 6891961886189270000, "line_mean": 27.3333333333, "line_max": 77, "alpha_frac": 0.5432679739, "autogenerated": false, "ratio": 4.548156956004756, "config_test": false,...
"""AMQPStorm Connection.IO.""" import logging import select import socket import threading from errno import EAGAIN from errno import EINTR from errno import EWOULDBLOCK from time import sleep from amqpstorm import compatibility from amqpstorm.base import FRAME_MAX from amqpstorm.base import IDLE_WAIT from amqpstorm....
{ "repo_name": "fake-name/ReadableWebProxy", "path": "amqpstorm/io.py", "copies": "1", "size": "8123", "license": "bsd-3-clause", "hash": -3202010493154554000, "line_mean": 30.0038167939, "line_max": 78, "alpha_frac": 0.5378554721, "autogenerated": false, "ratio": 4.566048341765036, "config_test...
"""AMQPStorm Connection.IO.""" import logging import select import socket import threading from errno import EAGAIN from errno import EINTR from errno import EWOULDBLOCK from amqpstorm import compatibility from amqpstorm.base import MAX_FRAME_SIZE from amqpstorm.compatibility import ssl from amqpstorm.exception impor...
{ "repo_name": "eandersson/amqpstorm", "path": "amqpstorm/io.py", "copies": "1", "size": "9623", "license": "mit", "hash": -384970358472185600, "line_mean": 31.0766666667, "line_max": 77, "alpha_frac": 0.5395406838, "autogenerated": false, "ratio": 4.5412930627654555, "config_test": false, "ha...
"""AMQPStorm Connection.""" import logging import time from time import sleep from pamqp import exceptions as pamqp_exception from pamqp import frame as pamqp_frame from pamqp import header as pamqp_header from pamqp import specification from amqpstorm import compatibility from amqpstorm.base import IDLE_WAIT from a...
{ "repo_name": "eandersson/amqpstorm", "path": "amqpstorm/connection.py", "copies": "1", "size": "13696", "license": "mit", "hash": 4662499689783107000, "line_mean": 32.7339901478, "line_max": 79, "alpha_frac": 0.597473715, "autogenerated": false, "ratio": 4.331435800126502, "config_test": false...
"""AMQPStorm Exception.""" AMQP_ERROR_MAPPING = { 311: ('CONTENT-TOO-LARGE', 'The client attempted to transfer content larger than the ' 'server could accept at the present time. The client may ' 'retry at a later time.'), 312: ('NO-ROUTE', 'Undocumented AMQP Soft Error'), 31...
{ "repo_name": "eandersson/amqpstorm", "path": "amqpstorm/exception.py", "copies": "1", "size": "4732", "license": "mit", "hash": -420688496893749400, "line_mean": 36.856, "line_max": 76, "alpha_frac": 0.6234150465, "autogenerated": false, "ratio": 4.221231043710972, "config_test": false, "has...
"""AMQPStorm Message.""" import json import uuid from datetime import datetime from amqpstorm.base import BaseMessage from amqpstorm.compatibility import try_utf8_decode from amqpstorm.exception import AMQPMessageError class Message(BaseMessage): """RabbitMQ Message. e.g. :: # Message Properti...
{ "repo_name": "eandersson/amqpstorm", "path": "amqpstorm/message.py", "copies": "1", "size": "13383", "license": "mit", "hash": 8884527123634994000, "line_mean": 27.1747368421, "line_max": 77, "alpha_frac": 0.5699768363, "autogenerated": false, "ratio": 4.480415132239705, "config_test": false, ...
"""AMQPStorm Rpc.""" import threading import time from uuid import uuid4 from amqpstorm.base import IDLE_WAIT from amqpstorm.exception import AMQPChannelError class Rpc(object): """Internal RPC handler.""" def __init__(self, default_adapter, timeout=360): """ :param object default_adapter: ...
{ "repo_name": "fake-name/ReadableWebProxy", "path": "amqpstorm/rpc.py", "copies": "1", "size": "4323", "license": "bsd-3-clause", "hash": 3750009546240662000, "line_mean": 27.2549019608, "line_max": 73, "alpha_frac": 0.5466111497, "autogenerated": false, "ratio": 4.323, "config_test": false, ...
"""AMQPStorm Uri wrapper for Connection.""" import logging from amqpstorm import compatibility from amqpstorm.compatibility import ssl from amqpstorm.compatibility import urlparse from amqpstorm.connection import Connection from amqpstorm.connection import DEFAULT_HEARTBEAT_INTERVAL from amqpstorm.connection import D...
{ "repo_name": "eandersson/amqp-storm", "path": "amqpstorm/uri_connection.py", "copies": "1", "size": "5033", "license": "mit", "hash": -5888291019807490000, "line_mean": 35.7372262774, "line_max": 79, "alpha_frac": 0.5549374131, "autogenerated": false, "ratio": 4.550632911392405, "config_test":...
"""AMQP Table Encoding/Decoding""" import struct import decimal import calendar from datetime import datetime from pika import exceptions from pika.compat import unicode_type, PY2, long, as_bytes def encode_short_string(pieces, value): """Encode a string value as short string and append it to pieces list ret...
{ "repo_name": "CODEiverse/SassyMQ-OpenSourceTools", "path": "PySassyMQ/SassyMQ/SassyMQ/OSTL/pika/data.py", "copies": "13", "size": "8916", "license": "mpl-2.0", "hash": 2099263809362065000, "line_mean": 29.6391752577, "line_max": 80, "alpha_frac": 0.5902871243, "autogenerated": false, "ratio": 4....
"""AMQP Table Encoding/Decoding""" import struct import decimal import calendar from datetime import datetime from pika import exceptions def encode_table(pieces, table): """Encode a dict as an AMQP table appending the encded table to the pieces list passed in. :param list pieces: Already encoded frame ...
{ "repo_name": "suthat/signal", "path": "vendor/python-pika/pika/data.py", "copies": "1", "size": "7028", "license": "apache-2.0", "hash": 3407282808409613300, "line_mean": 28.4058577406, "line_max": 76, "alpha_frac": 0.5710017075, "autogenerated": false, "ratio": 4.020594965675057, "config_test...
"""AMQP Table Encoding/Decoding""" import struct import decimal import calendar from datetime import datetime from servicebus.pika import exceptions from servicebus.pika.compat import unicode_type, PY2, long, as_bytes def encode_short_string(pieces, value): """Encode a string value as short string and append it ...
{ "repo_name": "blacktear23/py-servicebus", "path": "servicebus/pika/data.py", "copies": "1", "size": "8938", "license": "bsd-3-clause", "hash": -8873681770464543000, "line_mean": 29.7147766323, "line_max": 80, "alpha_frac": 0.5910718281, "autogenerated": false, "ratio": 4.00268696820421, "confi...
"""AMQP Table Encoding/Decoding""" import struct import decimal import calendar import warnings from datetime import datetime from pika import exceptions from pika.compat import PY2, PY3 from pika.compat import unicode_type, long, as_bytes def encode_short_string(pieces, value): """Encode a string value as shor...
{ "repo_name": "vitaly-krugl/pika", "path": "pika/data.py", "copies": "1", "size": "9803", "license": "bsd-3-clause", "hash": 9072892460309541000, "line_mean": 29.4440993789, "line_max": 80, "alpha_frac": 0.5816586759, "autogenerated": false, "ratio": 4.0608947804473905, "config_test": false, ...
"""AMQP Table Encoding/Decoding""" import struct import decimal import calendar from datetime import datetime from pika import exceptions from pika.compat import PY2, basestring from pika.compat import unicode_type, long, as_bytes def encode_short_string(pieces, value): """Encode a string value as short string ...
{ "repo_name": "pika/pika", "path": "pika/data.py", "copies": "1", "size": "9746", "license": "bsd-3-clause", "hash": -2882227536693071400, "line_mean": 29.2670807453, "line_max": 80, "alpha_frac": 0.5896778165, "autogenerated": false, "ratio": 4.002464065708419, "config_test": false, "has_no_...
from paho.mqtt import publish as pub from paho.mqtt import subscribe as sub from datetime import datetime import threading as thrd CYBER_MSGFMT = "CYBERTIME [%s]" CYBER_TOPIC = "cyberman" CYBER_MQTTMSGFMT = "dup:%s, info:%s, mid:%s, payload:[%s], qos:%s, retain:%s, state:%s, timestamp:%s, topic:[%s]" def on_message(c...
{ "repo_name": "Zex/neural-node", "path": "optm/mqttpub.py", "copies": "1", "size": "1282", "license": "mit", "hash": -8280347771877716000, "line_mean": 27.4888888889, "line_max": 122, "alpha_frac": 0.6521060842, "autogenerated": false, "ratio": 3.0669856459330145, "config_test": false, "has_n...
#Amram Menu Items. import sys, os, math, json, operator from os.path import dirname, abspath, join, normpath, isfile sys.path.append(abspath(join(dirname(__file__), 'Amram_Script_Data', '..', 'log'))) sys.path.append(abspath(join(dirname(__file__), 'Magazine_Generator_Module'))) #script data in, well, script data, ...
{ "repo_name": "gcblue/gcblue", "path": "scripts/Menu.py", "copies": "1", "size": "98539", "license": "bsd-3-clause", "hash": -8114457774402351000, "line_mean": 45.6351159489, "line_max": 353, "alpha_frac": 0.5520149382, "autogenerated": false, "ratio": 3.7481551920882463, "config_test": false, ...
#Amram Menu Items. import sys, os, math from os.path import dirname, abspath, join, normpath sys.path.append(abspath(join(dirname(__file__), 'Amram_Script_Data'))) sys.path.append(abspath(join(dirname(__file__), 'Magazine_Generator_Module'))) from UnitCommands import * from Amram_Utilities import * from Amram_AI_Weapon...
{ "repo_name": "gcblue/gcblue", "path": "scripts/Amram_Menu.py", "copies": "1", "size": "61502", "license": "bsd-3-clause", "hash": 5542169269511476000, "line_mean": 46.3092307692, "line_max": 290, "alpha_frac": 0.562567071, "autogenerated": false, "ratio": 3.7325969533288825, "config_test": fal...
"""ams2 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based...
{ "repo_name": "icists/ams2", "path": "django/ams2/urls.py", "copies": "1", "size": "1849", "license": "mit", "hash": -2693601423335726000, "line_mean": 37.5208333333, "line_max": 79, "alpha_frac": 0.7030827474, "autogenerated": false, "ratio": 3.5833333333333335, "config_test": false, "has_no...
"""AMSGrad for TensorFlow.""" from tensorflow.python.eager import context from tensorflow.python.framework import ops from tensorflow.python.ops import control_flow_ops from tensorflow.python.ops import math_ops from tensorflow.python.ops import resource_variable_ops from tensorflow.python.ops import state_ops from te...
{ "repo_name": "ytworks/LinearMotor", "path": "Custom/amsgrad.py", "copies": "1", "size": "17666", "license": "mit", "hash": -8364744821384024000, "line_mean": 47.9362880886, "line_max": 115, "alpha_frac": 0.6618929016, "autogenerated": false, "ratio": 3.4707269155206286, "config_test": false, ...
'''amsrp.py - azurerm functions for the Microsoft.Media resource provider and AMS Rest Interface.''' import json import urllib from .restfns import do_get, do_put, do_post, do_delete, do_ams_auth, do_ams_get, \ do_ams_post, do_ams_put, do_ams_delete, do_ams_patch, do_ams_sto_put from .settings import get_rm_endpoint, ...
{ "repo_name": "gbowerman/azurerm", "path": "azurerm/amsrp.py", "copies": "1", "size": "32553", "license": "mit", "hash": -186929182190088960, "line_mean": 32.944734098, "line_max": 764, "alpha_frac": 0.623721316, "autogenerated": false, "ratio": 3.770326615705351, "config_test": false, "has_n...
# amsrp.py - azurerm functions for the Microsoft.Media resource provider from .restfns import do_get, do_post, do_put, do_delete from .settings import azure_rm_endpoint, MEDIA_API # check_name_availability of a media service name(access_token, subscription_id, rgname) # check the media service name availability in a...
{ "repo_name": "pjshi23/mcazurerm", "path": "mcazurerm/amsrp.py", "copies": "1", "size": "3487", "license": "mit", "hash": -6634484624796264000, "line_mean": 51.0447761194, "line_max": 269, "alpha_frac": 0.639231431, "autogenerated": false, "ratio": 4.049941927990709, "config_test": false, "ha...
"""A MTCCN face detector based on the `mtcnn` module. """ # standard imports import logging # third party imports import numpy as np import mtcnn # toolbox imports from ..base.meta import Metadata from ..base.image import BoundingBox from ..tool.face.detector import Detector as FaceDetector from ..tool.face.landmark...
{ "repo_name": "Petr-By/qtpyvis", "path": "dltb/thirdparty/mtcnn.py", "copies": "1", "size": "6722", "license": "mit", "hash": -1372180060426876200, "line_mean": 38.0813953488, "line_max": 112, "alpha_frac": 0.6331448974, "autogenerated": false, "ratio": 4.049397590361446, "config_test": false, ...
#Amtrak Recursive ROute Writer (ARROW) #cont- does not write initial .npz file, relies on existing partials def main(newdata=False, cont=False, newredund=False, arrive=True): import json import numpy as np import os import route_builder import glob import find_redunda...
{ "repo_name": "capecchi/capecchi.github.io", "path": "posts/AmericaByTrain/arrow.py", "copies": "1", "size": "9138", "license": "mit", "hash": 7426214630669958000, "line_mean": 36.2979591837, "line_max": 90, "alpha_frac": 0.5170715693, "autogenerated": false, "ratio": 3.25311498754005, "config_...
# A much less convoluted reverse shell dropper # Intended to be made into a binary wirh py2app or similar plist = '''\ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <str...
{ "repo_name": "modalexii/shells", "path": "osx/ReverseShellSvc2/osxsvct.py", "copies": "1", "size": "1190", "license": "unlicense", "hash": 5028755704255827000, "line_mean": 22.8, "line_max": 102, "alpha_frac": 0.6554621849, "autogenerated": false, "ratio": 2.5265392781316347, "config_test": fa...
"a multi-instance stack class" class error(Exception): pass class Stack: def __init__(self, start = []): self._stack = [] for x in start: self.push(x) self._stack.reverse() def push(self, obj): self._stack = [obj] + self._stack def pop(...
{ "repo_name": "ordinary-developer/lin_education", "path": "books/techno/python/programming_python_4_ed_m_lutz/code/chapter_18/02_a_stack_class/stack2.py", "copies": "1", "size": "1122", "license": "mit", "hash": 419534197565438660, "line_mean": 19.5769230769, "line_max": 52, "alpha_frac": 0.508912656...
"""A MultiKernelManager for use in the notebook webserver - raises HTTPErrors - creates REST API models """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import os from tornado import web from IPython.kernel.multikernelmanager import MultiKernelManager from IP...
{ "repo_name": "mattvonrocketstein/smash", "path": "smashlib/ipy3x/html/services/kernels/kernelmanager.py", "copies": "1", "size": "4839", "license": "mit", "hash": 1100685495472677200, "line_mean": 37.712, "line_max": 86, "alpha_frac": 0.5875180822, "autogenerated": false, "ratio": 4.259683098591...
"""A MultiKernelManager for use in the notebook webserver - raises HTTPErrors - creates REST API models """ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import os from tornado import gen, web from tornado.concurrent import Future from tornado.ioloop import IOL...
{ "repo_name": "ammarkhann/FinalSeniorCode", "path": "lib/python2.7/site-packages/notebook/services/kernels/kernelmanager.py", "copies": "3", "size": "8668", "license": "mit", "hash": 6961702675689375000, "line_mean": 37.1850220264, "line_max": 86, "alpha_frac": 0.5981772035, "autogenerated": false,...
"""A multi-layer perceptron for classification of MNIST handwritten digits.""" from __future__ import absolute_import, division from __future__ import print_function import autograd.numpy as np import autograd.numpy.random as npr from autograd.scipy.special import logsumexp from autograd import grad from autograd.misc....
{ "repo_name": "HIPS/autograd", "path": "examples/neural_net.py", "copies": "2", "size": "3201", "license": "mit", "hash": 6495802075801888000, "line_mean": 37.1071428571, "line_max": 85, "alpha_frac": 0.6569821931, "autogenerated": false, "ratio": 3.5805369127516777, "config_test": true, "has...
# A multi-node scalability test. We put an http proxy on the head node and spin # up 20 nodes and put as many replicas as possible on the cluster, and run a # stress test. # # Test will measure latency and throughput under a high load using `wrk` # running on each node. # # Results for node 1 of 21: # Running 10s test ...
{ "repo_name": "richardliaw/ray", "path": "python/ray/serve/benchmarks/scalability.py", "copies": "1", "size": "3686", "license": "apache-2.0", "hash": -5582490230572066000, "line_mean": 29.974789916, "line_max": 79, "alpha_frac": 0.6516549105, "autogenerated": false, "ratio": 3.1858254105445116, ...
"""A multi-producer, multi-consumer queue.""" class Empty(Exception): "Exception raised by Queue.get(block=0)/get_nowait()." pass class Full(Exception): "Exception raised by Queue.put(block=0)/put_nowait()." pass class Queue: def __init__(self, maxsize=0): """Initialize a queue object wit...
{ "repo_name": "MalloyPower/parsing-python", "path": "front-end/testsuite-python-lib/Python-2.1/Lib/Queue.py", "copies": "5", "size": "3869", "license": "mit", "hash": -2920650705264481000, "line_mean": 28.3106060606, "line_max": 74, "alpha_frac": 0.5820625485, "autogenerated": false, "ratio": 4.1...
"""A multi-producer, multi-consumer queue.""" from _pydev_imps._pydev_time import time as _time from _pydev_imps import _pydev_thread try: from _pydev_imps import _pydev_threading as _threading except ImportError: import dummy_threading as _threading from collections import deque import heapq __all__ = ['Empt...
{ "repo_name": "ArcherSys/ArcherSys", "path": "eclipse/plugins/org.python.pydev_4.5.5.201603221110/pysrc/_pydev_imps/_pydev_Queue.py", "copies": "1", "size": "8720", "license": "mit", "hash": 1139036729043760600, "line_mean": 34.5918367347, "line_max": 85, "alpha_frac": 0.5917431193, "autogenerated"...
"""A multi-producer, multi-consumer queue.""" from _pydev_imps._pydev_time import time as _time from _pydev_imps import _pydev_thread try: import _pydev_threading as _threading except ImportError: import dummy_threading as _threading from collections import deque import heapq __all__ = ['Empty', 'Full', 'Queu...
{ "repo_name": "petteyg/intellij-community", "path": "python/helpers/pydev/_pydev_imps/_pydev_Queue.py", "copies": "53", "size": "8637", "license": "apache-2.0", "hash": 5139297138554177000, "line_mean": 34.2530612245, "line_max": 85, "alpha_frac": 0.5900196828, "autogenerated": false, "ratio": 4....
"""A multi-producer, multi-consumer queue.""" from _pydev_time import time as _time try: import _pydev_threading as _threading except ImportError: import dummy_threading as _threading from collections import deque import heapq __all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue'] class Empty(Exc...
{ "repo_name": "romankagan/DDBWorkbench", "path": "python/helpers/pydev/_pydev_Queue.py", "copies": "3", "size": "8575", "license": "apache-2.0", "hash": 2628795723053190000, "line_mean": 34.143442623, "line_max": 85, "alpha_frac": 0.5885714286, "autogenerated": false, "ratio": 4.413278435409161, ...
"""A multi-producer, multi-consumer queue.""" from time import time as _time from collections import deque __all__ = ['Empty', 'Full', 'Queue'] class Empty(Exception): "Exception raised by Queue.get(block=0)/get_nowait()." pass class Full(Exception): "Exception raised by Queue.put(block=0)/put_nowait()....
{ "repo_name": "youdonghai/intellij-community", "path": "python/lib/Lib/Queue.py", "copies": "90", "size": "7758", "license": "apache-2.0", "hash": -3515473677668488000, "line_mean": 35.0837209302, "line_max": 81, "alpha_frac": 0.5849445733, "autogenerated": false, "ratio": 4.582398109864147, "c...
"""A multi-producer, multi-consumer queue.""" from time import time as _time from collections import deque __all__ = ['Empty', 'Full', 'Queue'] class Empty(Exception): "Exception raised by Queue.get(block=0)/get_nowait()." pass class Full(Exception): "Exception raised by Queue.put(block=0)/put_nowait()...
{ "repo_name": "sumpfgottheit/pdu1800_data_provider", "path": "pygame64/pygame/threads/Py25Queue.py", "copies": "25", "size": "7759", "license": "mit", "hash": -5838520437558548000, "line_mean": 34.9212962963, "line_max": 81, "alpha_frac": 0.5848691842, "autogenerated": false, "ratio": 4.580283353...
"""A multi-producer, multi-consumer queue.""" from time import time as _time import dummy_threading as _threading from collections import deque import heapq __all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue'] class Empty(Exception): "Exception raised by Queue.get(block=0)/get_nowait()." pass ...
{ "repo_name": "perkinslr/pypyjs", "path": "addedLibraries/Queue.py", "copies": "1", "size": "8514", "license": "mit", "hash": -3228419903237354500, "line_mean": 34.1818181818, "line_max": 85, "alpha_frac": 0.5876203899, "autogenerated": false, "ratio": 4.404552509053285, "config_test": false, ...
"""A multi-producer, multi-consumer queue.""" from time import time as _time try: import threading as _threading except ImportError: import dummy_threading as _threading from collections import deque import heapq __all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue'] class Empty(Exception): ...
{ "repo_name": "la0rg/Genum", "path": "GenumCore/vendor/Queue.py", "copies": "1", "size": "8582", "license": "mit", "hash": -3691937434828466700, "line_mean": 33.4658634538, "line_max": 85, "alpha_frac": 0.5883243999, "autogenerated": false, "ratio": 4.410071942446043, "config_test": false, "h...
"""A multi-producer, multi-consumer queue.""" from time import time as _time try: import threading as _threading except ImportError: import dummy_threading as _threading from collections import deque import heapq __all__ = ['Empty', 'Full', 'Duplicate', 'Seen', 'ThreadedFrameQueue'] class Empty(Exception): ...
{ "repo_name": "meggers/pyflix", "path": "client/ThreadedFrameQueue.py", "copies": "1", "size": "6955", "license": "mit", "hash": 3334621382346044000, "line_mean": 35.2239583333, "line_max": 81, "alpha_frac": 0.6103522646, "autogenerated": false, "ratio": 4.317194289261328, "config_test": false,...
"""A multi-producer, multi-consumer queue.""" from time import time as _time #try: import threading as _threading #except ImportError: # import dummy_threading as _threading from collections import deque import heapq __all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue'] class Empty(Exception): "E...
{ "repo_name": "m4ns0ur/grumpy", "path": "third_party/stdlib/Queue.py", "copies": "5", "size": "8584", "license": "apache-2.0", "hash": -1442671795651346200, "line_mean": 34.1803278689, "line_max": 85, "alpha_frac": 0.5888863001, "autogenerated": false, "ratio": 4.399794976934905, "config_test":...
"""A multi-producer, multi-consumer queue.""" from time import time as _time, sleep as _sleep __all__ = ['Empty', 'Full', 'Queue'] class Empty(Exception): "Exception raised by Queue.get(block=0)/get_nowait()." pass class Full(Exception): "Exception raised by Queue.put(block=0)/put_nowait()." pass c...
{ "repo_name": "MalloyPower/parsing-python", "path": "front-end/testsuite-python-lib/Python-2.3/Lib/Queue.py", "copies": "3", "size": "7834", "license": "mit", "hash": -5666351161145824000, "line_mean": 37.0291262136, "line_max": 81, "alpha_frac": 0.5573142711, "autogenerated": false, "ratio": 4.4...
'''A multi-producer, multi-consumer queue.''' import threading from collections import deque from heapq import heappush, heappop from time import monotonic as time try: from _queue import SimpleQueue except ImportError: SimpleQueue = None __all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue', 'Sim...
{ "repo_name": "kikocorreoso/brython", "path": "www/src/Lib/queue.py", "copies": "11", "size": "11356", "license": "bsd-3-clause", "hash": -2853323015562525000, "line_mean": 34.3769470405, "line_max": 85, "alpha_frac": 0.608224727, "autogenerated": false, "ratio": 4.492088607594937, "config_test...
'''A multi-producer, multi-consumer queue.''' try: import threading except ImportError: import dummy_threading as threading from collections import deque from heapq import heappush, heappop from time import monotonic as time __all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue'] class Empty(Excep...
{ "repo_name": "Reflexe/doc_to_pdf", "path": "Windows/program/python-core-3.5.0/lib/queue.py", "copies": "19", "size": "8780", "license": "mpl-2.0", "hash": 4417901278239382000, "line_mean": 34.6910569106, "line_max": 85, "alpha_frac": 0.5987471526, "autogenerated": false, "ratio": 4.4933469805527...
'''A multi-producer, multi-consumer queue.''' try: import threading except ImportError: import dummy_threading as threading from collections import deque from heapq import heappush, heappop try: from time import monotonic as time except ImportError: from time import time __all__ = ['Empty', 'Full', 'Q...
{ "repo_name": "MalloyPower/parsing-python", "path": "front-end/testsuite-python-lib/Python-3.3.0/Lib/queue.py", "copies": "13", "size": "8819", "license": "mit", "hash": 5464932770845604000, "line_mean": 34.4176706827, "line_max": 85, "alpha_frac": 0.5990475111, "autogenerated": false, "ratio": 4...
"""A multi-producer, multi-consumer queue.""" class Empty(Exception): "Exception raised by Queue.get(block=0)/get_nowait()." pass class Full(Exception): "Exception raised by Queue.put(block=0)/put_nowait()." pass class Queue: def __init__(self, maxsize=0): """Initialize a queu...
{ "repo_name": "ai-ku/langvis", "path": "jython-2.1/Lib/Queue.py", "copies": "4", "size": "4001", "license": "mit", "hash": -7894369959905430000, "line_mean": 28.3106060606, "line_max": 74, "alpha_frac": 0.5628592852, "autogenerated": false, "ratio": 4.33008658008658, "config_test": false, "ha...
"""A multi-producer, multi-consumer queue.""" from time import time as _time from collections import deque import heapq __all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue'] class Empty(Exception): "Exception raised by Queue.get(block=0)/get_nowait()." pass class Full(Exception): ...
{ "repo_name": "diegocortassa/TACTIC", "path": "src/context/client/tactic-api-python-4.0.api04/Lib/Queue.py", "copies": "8", "size": "8818", "license": "epl-1.0", "hash": -5692779706526594000, "line_mean": 34.1393442623, "line_max": 85, "alpha_frac": 0.5699705149, "autogenerated": false, "ratio": ...
"""A multi-producer, multi-consumer queue.""" from time import time as _time from collections import deque __all__ = ['Empty', 'Full', 'Queue'] class Empty(Exception): "Exception raised by Queue.get(block=0)/get_nowait()." pass class Full(Exception): "Exception raised by Queue.put(block=0)/p...
{ "repo_name": "ericlink/adms-server", "path": "playframework-dist/1.1-src/python/Lib/Queue.py", "copies": "2", "size": "7973", "license": "mit", "hash": -174156535030812380, "line_mean": 35.0837209302, "line_max": 81, "alpha_frac": 0.569170952, "autogenerated": false, "ratio": 4.706611570247934, ...
"""A multi-producer, multi-consumer queue.""" from time import time as _time from collections import deque __all__ = ['Empty', 'Full', 'Queue'] class Empty(Exception): "Exception raised by Queue.get(block=0)/get_nowait()." pass class Full(Exception): "Exception raised by Queue.put(block=0)...
{ "repo_name": "JRock007/boxxy", "path": "dist/Boxxy.app/Contents/Resources/lib/python2.7/pygame/threads/Py25Queue.py", "copies": "10", "size": "7975", "license": "mit", "hash": -8021034446204869000, "line_mean": 34.9212962963, "line_max": 81, "alpha_frac": 0.5690282132, "autogenerated": false, "r...
"""A multi-producer, multi-consumer queue.""" from time import time as _time try: import threading as _threading except ImportError: import dummy_threading as _threading from collections import deque import heapq __all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue'] class Empty(Excep...
{ "repo_name": "Jeff-Tian/mybnb", "path": "Python27/Lib/Queue.py", "copies": "7", "size": "8821", "license": "apache-2.0", "hash": 100512327558125390, "line_mean": 34.1516393443, "line_max": 85, "alpha_frac": 0.5723840834, "autogenerated": false, "ratio": 4.525910723447922, "config_test": false,...
'''A multi-producer, multi-consumer queue.''' try: import threading except ImportError: import dummy_threading as threading from collections import deque from heapq import heappush, heappop from time import monotonic as time __all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue'] class...
{ "repo_name": "Suwmlee/XX-Net", "path": "Python3/lib/queue.py", "copies": "2", "size": "9026", "license": "bsd-2-clause", "hash": 668093780169450600, "line_mean": 34.6910569106, "line_max": 85, "alpha_frac": 0.5824285398, "autogenerated": false, "ratio": 4.609805924412666, "config_test": false,...
"""A multi-scale, smooth version of the classic Lorenz-96. This is an implementation of "Model III" of `bib.lorenz2005designing`. Similar to `dapper.mods.LorenzUV` this model is designed to contain two different scales. However, in "Model III" the two scales are not kept separate, but superimposed, and the large scal...
{ "repo_name": "nansencenter/DAPPER", "path": "dapper/mods/LorenzIII/__init__.py", "copies": "1", "size": "7517", "license": "mit", "hash": 7727640981308793000, "line_mean": 35.4902912621, "line_max": 88, "alpha_frac": 0.6052946654, "autogenerated": false, "ratio": 3.193288020390824, "config_tes...
"""A MultiTerminalManager for use in the notebook webserver - raises HTTPErrors - creates REST API models """ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import warnings from datetime import timedelta from notebook._tz import utcnow, isoformat from terminado i...
{ "repo_name": "sserrot/champion_relationships", "path": "venv/Lib/site-packages/notebook/terminal/terminalmanager.py", "copies": "1", "size": "6303", "license": "mit", "hash": -909579986255001200, "line_mean": 40.7417218543, "line_max": 120, "alpha_frac": 0.6054259876, "autogenerated": false, "ra...
""" A multithreaded, keep-alive HTTP/1.1 client object that can handle multiple connections. """ import socket import select try: from urllib.parse import urlencode, quote except ImportError: from urllib import urlencode, quote from atavism import __version__ from atavism.http11.objects import HttpRequest...
{ "repo_name": "zathras777/atavism", "path": "atavism/http11/client.py", "copies": "1", "size": "7740", "license": "unlicense", "hash": 5187530142344715000, "line_mean": 33.7085201794, "line_max": 117, "alpha_frac": 0.5572351421, "autogenerated": false, "ratio": 4.255085211654755, "config_test":...
""" A multithreaded proxy checker Given a file containing proxies, per line, in the form of ip:port, will attempt to establish a connection through each proxy to a provided URL. Duration of connection attempts is governed by a passed in timeout value. Additionally, spins off a number of daemon threads to speed up proc...
{ "repo_name": "maxpalpal/permanrkee", "path": "svma.py", "copies": "1", "size": "5486", "license": "mit", "hash": -5173113095806544000, "line_mean": 33.2875, "line_max": 79, "alpha_frac": 0.657127233, "autogenerated": false, "ratio": 4.350515463917525, "config_test": true, "has_no_keywords": ...
""" a multithreaded UUID converter """ from multiprocessing import Pool import sys import os import math import urllib2 import json import time import shutil import uuid from nbt import nbt def chunks(l, n): """ Yield successive n-sized chunks from l. """ for i in xrange(0, len(l), n): yield l[...
{ "repo_name": "lukeroge/multithreaded_uuid_converter", "path": "convert.py", "copies": "1", "size": "2111", "license": "cc0-1.0", "hash": 8016012145342574000, "line_mean": 23.5465116279, "line_max": 79, "alpha_frac": 0.6603505448, "autogenerated": false, "ratio": 3.5658783783783785, "config_tes...
"""A Multivariate Normal Distribution.""" __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" __email__ = "pylearn-dev@googlegroups" import warnings try: from scipy.linalg import choles...
{ "repo_name": "skearnes/pylearn2", "path": "pylearn2/distributions/mnd.py", "copies": "49", "size": "4113", "license": "bsd-3-clause", "hash": -1307722034890113000, "line_mean": 25.535483871, "line_max": 83, "alpha_frac": 0.537563822, "autogenerated": false, "ratio": 3.7221719457013576, "config...
''' A music pad application for tablets ''' from kivy.app import App from kivy.uix.button import Button from kivy.properties import NumericProperty, StringProperty, BooleanProperty from ConfigParser import SafeConfigParser from json import JSONDecoder from kivy.core.audio import SoundLoader from kivy.animation import A...
{ "repo_name": "tshirtman/music_pad", "path": "main.py", "copies": "1", "size": "3485", "license": "mit", "hash": -5218807446825476000, "line_mean": 26.88, "line_max": 108, "alpha_frac": 0.5451936872, "autogenerated": false, "ratio": 3.808743169398907, "config_test": true, "has_no_keywords": f...
'''A musr analysis class Notes starts from init, the rest is operated by gui ipywidgets output for linux; Popen _xterm_ and tail -f /tmp/mujpy_pipe then self.console(string) takes care of writing strings to pipe Jupyterlab provides a way of writing stderr to console description_tooltip in ipywidget...
{ "repo_name": "RDeRenzi/mujpy", "path": "mujpy/mugui.py", "copies": "1", "size": "236692", "license": "mit", "hash": 6559061560280544000, "line_mean": 52.5740153916, "line_max": 346, "alpha_frac": 0.4828932359, "autogenerated": false, "ratio": 4.024108266177021, "config_test": false, "has_no_...
"""A `MutableModule` implement the `BaseModule` API, and allows input shape varying with training iterations. If shapes vary, executors will rebind, using shared arrays from the initial module binded with maximum shape. """ import logging from mxnet import context as ctx from mxnet.initializer import Uniform from mxn...
{ "repo_name": "rishita/mxnet", "path": "example/rcnn/rcnn/core/module.py", "copies": "1", "size": "8553", "license": "apache-2.0", "hash": -9072279401289331000, "line_mean": 38.7813953488, "line_max": 106, "alpha_frac": 0.6221208933, "autogenerated": false, "ratio": 4.100191754554171, "config_t...
"""AMV Scanner for Plex via animemusicvideos.org """ import re import urllib # We try and exclusively query google to avoid thrashing animemusicvideos.org GOOGLE_JSON_AMVS = 'http://ajax.googleapis.com/ajax/services/search/web'\ '?v=1.0&rsz=large&q="site:animemusicvideos.org"+video+information+%s' AMV_SEARCH_URL...
{ "repo_name": "Alphadelta14/plex-amv-scanner", "path": "Contents/Code/__init__.py", "copies": "1", "size": "8104", "license": "mit", "hash": -5806113004705428000, "line_mean": 35.1785714286, "line_max": 117, "alpha_frac": 0.5112290227, "autogenerated": false, "ratio": 4.269757639620654, "config...
"""A mypy_ plugin for managing a number of platform-specific annotations. Its functionality can be split into three distinct parts: * Assigning the (platform-dependent) precisions of certain `~numpy.number` subclasses, including the likes of `~numpy.int_`, `~numpy.intp` and `~numpy.longlong`. See the documentation...
{ "repo_name": "mhvk/numpy", "path": "numpy/typing/mypy_plugin.py", "copies": "3", "size": "6432", "license": "bsd-3-clause", "hash": 3533040986491539000, "line_mean": 32.1546391753, "line_max": 88, "alpha_frac": 0.6044776119, "autogenerated": false, "ratio": 3.6524701873935266, "config_test": f...
"""amy URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based vie...
{ "repo_name": "pbanaszkiewicz/amy", "path": "config/urls.py", "copies": "1", "size": "6369", "license": "mit", "hash": 1496936952880223000, "line_mean": 46.1777777778, "line_max": 153, "alpha_frac": 0.6927304129, "autogenerated": false, "ratio": 3.7619610159480215, "config_test": false, "has_...
a = { 0: set([1, 14, 16, 17, 19, 20, 21, 22]), 1: set([2]), 2: set([]), 14: set([15]), 15: set([]), 16: set([18]), 17: set([]), 18: set([]), 19: set([]), 20: set([]), 21: set([]), 22: set([]) } def lookup(lis, table): cset = table[lis.pop(0)] ckey = None for x...
{ "repo_name": "fiddlerwoaroof/sandbox", "path": "unsorted/pythonsnippets_0029.py", "copies": "1", "size": "2263", "license": "bsd-3-clause", "hash": 3588468806163364400, "line_mean": 26.950617284, "line_max": 78, "alpha_frac": 0.4838709677, "autogenerated": false, "ratio": 3.7716666666666665, "...
# An abbreviation of a word follows the form <first letter><number><last letter>. Below are some examples of word # abbreviations: # # a) it --> it (no abbreviation) # # 1 # b) d|o|g --> d1g # # 1 1 1 # 1---5----0----5--8 # c) i|nternationalizatio|n --> i18n # # 1 # 1---5-...
{ "repo_name": "jigarkb/Programming", "path": "LeetCode/288-M-UniqueWordAbbreviation.py", "copies": "2", "size": "1637", "license": "mit", "hash": 776828445031962600, "line_mean": 24.9841269841, "line_max": 125, "alpha_frac": 0.5558949297, "autogenerated": false, "ratio": 3.3204868154158214, "co...
"""An Abstract API for predictions used by the action generator. Predictions splits the input batches into pieces of max batch size and concatenates the output arrays if necessary. """ from __future__ import absolute_import from __future__ import division # Import Type Annotations from __future__ import print_functio...
{ "repo_name": "tensorflow/deepmath", "path": "deepmath/deephol/predictions.py", "copies": "1", "size": "8865", "license": "apache-2.0", "hash": 2582280205359596500, "line_mean": 35.7842323651, "line_max": 80, "alpha_frac": 0.659108855, "autogenerated": false, "ratio": 3.636177194421657, "config...
"""An abstract base class for all Dakota interfaces.""" from abc import ABCMeta, abstractmethod import os class InterfaceBase(object): """Describe features common to all Dakota interfaces.""" __metaclass__ = ABCMeta @abstractmethod def __init__( self, interface="direct", id...
{ "repo_name": "csdms/dakota", "path": "dakotathon/interface/base.py", "copies": "1", "size": "3769", "license": "mit", "hash": -8581185375368591000, "line_mean": 30.6722689076, "line_max": 71, "alpha_frac": 0.5802600159, "autogenerated": false, "ratio": 4.875808538163001, "config_test": false, ...
"""An abstract base class for all Dakota responses.""" from abc import ABCMeta, abstractmethod class ResponsesBase(object): """Describe features common to all Dakota responses.""" __metaclass__ = ABCMeta @abstractmethod def __init__( self, responses="response_functions", re...
{ "repo_name": "csdms/dakota", "path": "dakotathon/responses/base.py", "copies": "1", "size": "1835", "license": "mit", "hash": -8851943866412050000, "line_mean": 27.671875, "line_max": 74, "alpha_frac": 0.5918256131, "autogenerated": false, "ratio": 4.816272965879265, "config_test": false, "h...
"""An abstract base class for all Dakota variable types.""" from abc import ABCMeta, abstractmethod from ..utils import to_iterable class VariablesBase(object): """Describe features common to all Dakota variable types.""" __metaclass__ = ABCMeta @abstractmethod def __init__(self, variables="contin...
{ "repo_name": "csdms/dakota", "path": "dakotathon/variables/base.py", "copies": "1", "size": "1662", "license": "mit", "hash": -7277707720879771, "line_mean": 28.6785714286, "line_max": 84, "alpha_frac": 0.5896510229, "autogenerated": false, "ratio": 4.748571428571428, "config_test": false, "...
# an 'abstract' base class for a template, seems like a good idea for now #import StringIO import cStringIO as StringIO import spitfire.runtime.filters import spitfire.runtime.repeater from spitfire.runtime.udn import ( _resolve_from_search_list, UnresolvedPlaceholder) # NOTE: in some instances, this is faster th...
{ "repo_name": "eklitzke/spitfire", "path": "spitfire/runtime/template.py", "copies": "1", "size": "2584", "license": "bsd-3-clause", "hash": 533414386481137400, "line_mean": 31.3, "line_max": 96, "alpha_frac": 0.7267801858, "autogenerated": false, "ratio": 3.921092564491654, "config_test": fals...
"""An abstract base class for console-type widgets.""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from functools import partial import os import os.path import re import sys from textwrap import dedent import time from unicodedata import category import webbro...
{ "repo_name": "sserrot/champion_relationships", "path": "venv/Lib/site-packages/qtconsole/console_widget.py", "copies": "1", "size": "100089", "license": "mit", "hash": 5033363951694882000, "line_mean": 39.7196908055, "line_max": 107, "alpha_frac": 0.564487606, "autogenerated": false, "ratio": 4....
"""An abstract base class for console-type widgets.""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import os import os.path import re import sys from textwrap import dedent import time from unicodedata import category import webbrowser from qtconsole.qt import...
{ "repo_name": "nitin-cherian/LifeLongLearning", "path": "Python/PythonProgrammingLanguage/Encapsulation/encap_env/lib/python3.5/site-packages/qtconsole/console_widget.py", "copies": "1", "size": "90081", "license": "mit", "hash": -7067056055203237000, "line_mean": 39.908719346, "line_max": 103, "alph...
"""An abstract base class for console-type widgets.""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import os.path import re import sys from textwrap import dedent import time from unicodedata import category import webbrowser from qtconsole.qt import QtCore, Q...
{ "repo_name": "fzheng/codejam", "path": "lib/python2.7/site-packages/qtconsole/console_widget.py", "copies": "7", "size": "87125", "license": "mit", "hash": 802642854427056000, "line_mean": 39.7507015903, "line_max": 103, "alpha_frac": 0.5654404591, "autogenerated": false, "ratio": 4.624223767315...
""" An abstract base class for console-type widgets. """ # FIXME: This file and the others in this directory have been ripped, more or # less intact, out of IPython. At some point we should figure out a more # maintainable solution. #-----------------------------------------------------------------------...
{ "repo_name": "pankajp/pyface", "path": "pyface/ui/qt4/console/console_widget.py", "copies": "2", "size": "74758", "license": "bsd-3-clause", "hash": -8505472155044098000, "line_mean": 38.977540107, "line_max": 80, "alpha_frac": 0.556743091, "autogenerated": false, "ratio": 4.656078724464375, "...
""" An abstract base class for console-type widgets. """ #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- # Standard library imports import os.path import re import sys from textwrap import dedent fro...
{ "repo_name": "sodafree/backend", "path": "build/ipython/IPython/frontend/qt/console/console_widget.py", "copies": "3", "size": "78506", "license": "bsd-3-clause", "hash": 7261474641960255000, "line_mean": 39.8459937565, "line_max": 100, "alpha_frac": 0.5657784118, "autogenerated": false, "ratio"...
"""An abstract base class for load balancer. Load balancers track an underlying server set, and return a sink to service a request. """ from abc import abstractmethod import functools import logging import random import gevent from gevent.event import Event from ..asynchronous import AsyncResult from ..constants impo...
{ "repo_name": "steveniemitz/scales", "path": "scales/loadbalancer/base.py", "copies": "1", "size": "6357", "license": "mit", "hash": -1930885630400194000, "line_mean": 31.4336734694, "line_max": 89, "alpha_frac": 0.6724870222, "autogenerated": false, "ratio": 3.943548387096774, "config_test": f...
"""An abstract class common to all Bond entities.""" from abc import abstractmethod from asyncio import Lock, TimeoutError as AsyncIOTimeoutError from datetime import timedelta import logging from typing import Any, Dict, Optional from aiohttp import ClientError from bond_api import BPUPSubscriptions from homeassista...
{ "repo_name": "turbokongen/home-assistant", "path": "homeassistant/components/bond/entity.py", "copies": "1", "size": "5629", "license": "apache-2.0", "hash": -4086932219503283000, "line_mean": 33.1151515152, "line_max": 90, "alpha_frac": 0.6011724996, "autogenerated": false, "ratio": 4.040918880...
"""An abstract class common to all Bond entities.""" from abc import abstractmethod from asyncio import TimeoutError as AsyncIOTimeoutError import logging from typing import Any, Dict, Optional from aiohttp import ClientError from homeassistant.const import ATTR_NAME from homeassistant.helpers.entity import Entity f...
{ "repo_name": "mezz64/home-assistant", "path": "homeassistant/components/bond/entity.py", "copies": "6", "size": "2793", "license": "apache-2.0", "hash": 827650178792911500, "line_mean": 33.4814814815, "line_max": 90, "alpha_frac": 0.619763695, "autogenerated": false, "ratio": 4.219033232628399, ...
"""An abstract class common to all Bond entities.""" from __future__ import annotations from abc import abstractmethod from asyncio import Lock, TimeoutError as AsyncIOTimeoutError from datetime import timedelta import logging from typing import Any from aiohttp import ClientError from bond_api import BPUPSubscriptio...
{ "repo_name": "sander76/home-assistant", "path": "homeassistant/components/bond/entity.py", "copies": "3", "size": "6018", "license": "apache-2.0", "hash": -4802596488727780000, "line_mean": 33.988372093, "line_max": 90, "alpha_frac": 0.5987038883, "autogenerated": false, "ratio": 3.9986710963455...
"""An abstract class for Batch Learning Agents""" from .Agent import Agent import numpy as np __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = ["Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How"] __license__ = "BSD 3-Clause" __author...
{ "repo_name": "imanolarrieta/RL", "path": "rlpy/Agents/BatchAgent.py", "copies": "1", "size": "2445", "license": "bsd-3-clause", "hash": 5377796474676594000, "line_mean": 36.6153846154, "line_max": 97, "alpha_frac": 0.609406953, "autogenerated": false, "ratio": 3.6492537313432836, "config_test"...
"""An abstract class for Batch Learning Agents""" from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import super from future import standard_library standard_library.install_aliases() from .Agent import Agen...
{ "repo_name": "rlpy/rlpy", "path": "rlpy/Agents/BatchAgent.py", "copies": "1", "size": "2680", "license": "bsd-3-clause", "hash": 217358220730196540, "line_mean": 36.7464788732, "line_max": 97, "alpha_frac": 0.6429104478, "autogenerated": false, "ratio": 3.66120218579235, "config_test": false, ...
"""An abstract class for entities.""" from abc import ABC import asyncio from datetime import datetime, timedelta import functools as ft import logging from timeit import default_timer as timer from typing import Any, Awaitable, Dict, Iterable, List, Optional from homeassistant.config import DATA_CUSTOMIZE from homeas...
{ "repo_name": "tchellomello/home-assistant", "path": "homeassistant/helpers/entity.py", "copies": "1", "size": "23198", "license": "apache-2.0", "hash": 8435125646816458000, "line_mean": 31.9517045455, "line_max": 133, "alpha_frac": 0.6056125528, "autogenerated": false, "ratio": 4.295130531383077...
"""An abstract class for entities.""" from abc import ABC import asyncio from datetime import datetime, timedelta import logging import functools as ft from timeit import default_timer as timer from typing import Any, Dict, Iterable, List, Optional, Union from homeassistant.const import ( ATTR_ASSUMED_STATE, A...
{ "repo_name": "joopert/home-assistant", "path": "homeassistant/helpers/entity.py", "copies": "2", "size": "19726", "license": "apache-2.0", "hash": -5773284281456958000, "line_mean": 30.8675282714, "line_max": 134, "alpha_frac": 0.6050897293, "autogenerated": false, "ratio": 4.291993037423847, ...
"""An abstract class for entities.""" from datetime import timedelta import logging import functools as ft from timeit import default_timer as timer from typing import Optional, List, Iterable from homeassistant.const import ( ATTR_ASSUMED_STATE, ATTR_FRIENDLY_NAME, ATTR_HIDDEN, ATTR_ICON, ATTR_UNIT_OF_MEASURE...
{ "repo_name": "tinloaf/home-assistant", "path": "homeassistant/helpers/entity.py", "copies": "1", "size": "15062", "license": "apache-2.0", "hash": 5708169136893880000, "line_mean": 30.9787685775, "line_max": 79, "alpha_frac": 0.5986588766, "autogenerated": false, "ratio": 4.303428571428571, "c...
"""An abstract class for entities.""" from __future__ import annotations from abc import ABC import asyncio from collections.abc import Awaitable, Iterable, Mapping from datetime import datetime, timedelta import functools as ft import logging import math import sys from timeit import default_timer as timer from typin...
{ "repo_name": "kennedyshead/home-assistant", "path": "homeassistant/helpers/entity.py", "copies": "1", "size": "27352", "license": "apache-2.0", "hash": 3486859608159590000, "line_mean": 32.7262638718, "line_max": 133, "alpha_frac": 0.6125329044, "autogenerated": false, "ratio": 4.252487562189055...
"""An abstract class for entities.""" import asyncio from datetime import timedelta import logging import functools as ft from timeit import default_timer as timer from typing import Optional, List, Iterable from homeassistant.const import ( ATTR_ASSUMED_STATE, ATTR_FRIENDLY_NAME, ATTR_HIDDEN, ATTR_ICON, ATTR_...
{ "repo_name": "persandstrom/home-assistant", "path": "homeassistant/helpers/entity.py", "copies": "1", "size": "14974", "license": "apache-2.0", "hash": 7422458306169801000, "line_mean": 30.9275053305, "line_max": 79, "alpha_frac": 0.5985708562, "autogenerated": false, "ratio": 4.31278801843318, ...
"""An abstract class for entities.""" import asyncio import logging from timeit import default_timer as timer from typing import Any, Optional, List, Dict from homeassistant.const import ( ATTR_ASSUMED_STATE, ATTR_FRIENDLY_NAME, ATTR_HIDDEN, ATTR_ICON, ATTR_UNIT_OF_MEASUREMENT, DEVICE_DEFAULT_NAME, STATE_OFF,...
{ "repo_name": "srcLurker/home-assistant", "path": "homeassistant/helpers/entity.py", "copies": "1", "size": "11293", "license": "mit", "hash": 2901897533483803600, "line_mean": 30.5446927374, "line_max": 79, "alpha_frac": 0.5980696006, "autogenerated": false, "ratio": 4.250282273240497, "config...
"""An abstract class for entities.""" import asyncio import logging import functools as ft from timeit import default_timer as timer from typing import Any, Optional, List, Dict from homeassistant.const import ( ATTR_ASSUMED_STATE, ATTR_FRIENDLY_NAME, ATTR_HIDDEN, ATTR_ICON, ATTR_UNIT_OF_MEASUREMENT, DEVICE_D...
{ "repo_name": "oandrew/home-assistant", "path": "homeassistant/helpers/entity.py", "copies": "2", "size": "11936", "license": "mit", "hash": 1790653583396841500, "line_mean": 30.9144385027, "line_max": 79, "alpha_frac": 0.5996146113, "autogenerated": false, "ratio": 4.21617802896503, "config_te...
"""An abstract class for entities.""" import asyncio import logging import functools as ft from timeit import default_timer as timer from typing import Optional, List from homeassistant.const import ( ATTR_ASSUMED_STATE, ATTR_FRIENDLY_NAME, ATTR_HIDDEN, ATTR_ICON, ATTR_UNIT_OF_MEASUREMENT, DEVICE_DEFAULT_NAME...
{ "repo_name": "ewandor/home-assistant", "path": "homeassistant/helpers/entity.py", "copies": "1", "size": "13042", "license": "apache-2.0", "hash": 619603748386947700, "line_mean": 31.2024691358, "line_max": 79, "alpha_frac": 0.5951541175, "autogenerated": false, "ratio": 4.255138662316476, "co...
"""An abstract class for entities.""" import asyncio import logging from typing import Any, Optional, List, Dict from homeassistant.const import ( ATTR_ASSUMED_STATE, ATTR_FRIENDLY_NAME, ATTR_HIDDEN, ATTR_ICON, ATTR_UNIT_OF_MEASUREMENT, DEVICE_DEFAULT_NAME, STATE_OFF, STATE_ON, STATE_UNAVAILABLE, STATE_UN...
{ "repo_name": "betrisey/home-assistant", "path": "homeassistant/helpers/entity.py", "copies": "1", "size": "10234", "license": "mit", "hash": 320749594929966850, "line_mean": 30.8816199377, "line_max": 79, "alpha_frac": 0.609341411, "autogenerated": false, "ratio": 4.230673832162051, "config_te...
"""An abstract class for entities.""" import logging import re from homeassistant.const import ( ATTR_ASSUMED_STATE, ATTR_FRIENDLY_NAME, ATTR_HIDDEN, ATTR_ICON, ATTR_UNIT_OF_MEASUREMENT, DEVICE_DEFAULT_NAME, STATE_OFF, STATE_ON, STATE_UNAVAILABLE, STATE_UNKNOWN, TEMP_CELSIUS, TEMP_FAHRENHEIT, ATTR_ENTI...
{ "repo_name": "Julian/home-assistant", "path": "homeassistant/helpers/entity.py", "copies": "4", "size": "7581", "license": "mit", "hash": -5009298625016828000, "line_mean": 28.4980544747, "line_max": 79, "alpha_frac": 0.6112650046, "autogenerated": false, "ratio": 4.202328159645233, "config_te...
"""An abstract class for entities.""" import logging import re from typing import Any, Optional, List, Dict from homeassistant.const import ( ATTR_ASSUMED_STATE, ATTR_FRIENDLY_NAME, ATTR_HIDDEN, ATTR_ICON, ATTR_UNIT_OF_MEASUREMENT, DEVICE_DEFAULT_NAME, STATE_OFF, STATE_ON, STATE_UNAVAILABLE, STATE_UNKNOWN...
{ "repo_name": "devdelay/home-assistant", "path": "homeassistant/helpers/entity.py", "copies": "1", "size": "8103", "license": "mit", "hash": 7584446987980322000, "line_mean": 29.5773584906, "line_max": 79, "alpha_frac": 0.6106380353, "autogenerated": false, "ratio": 4.14052120592744, "config_te...
"""An abstract class for entities.""" import logging from typing import Any, Optional, List, Dict from homeassistant.const import ( ATTR_ASSUMED_STATE, ATTR_FRIENDLY_NAME, ATTR_HIDDEN, ATTR_ICON, ATTR_UNIT_OF_MEASUREMENT, DEVICE_DEFAULT_NAME, STATE_OFF, STATE_ON, STATE_UNAVAILABLE, STATE_UNKNOWN, TEMP_CEL...
{ "repo_name": "jawilson/home-assistant", "path": "homeassistant/helpers/entity.py", "copies": "1", "size": "7830", "license": "mit", "hash": -1016577403098156400, "line_mean": 29.8267716535, "line_max": 79, "alpha_frac": 0.6107279693, "autogenerated": false, "ratio": 4.209677419354839, "config_...
"""An abstract class for entities.""" import re from collections import defaultdict from blumate.const import ( ATTR_ASSUMED_STATE, ATTR_FRIENDLY_NAME, ATTR_HIDDEN, ATTR_ICON, ATTR_UNIT_OF_MEASUREMENT, DEVICE_DEFAULT_NAME, STATE_OFF, STATE_ON, STATE_UNAVAILABLE, STATE_UNKNOWN, TEMP_CELSIUS, TEMP_FAHRENHEIT...
{ "repo_name": "bdfoster/blumate", "path": "blumate/helpers/entity.py", "copies": "1", "size": "7561", "license": "mit", "hash": 6689434160667894000, "line_mean": 29.003968254, "line_max": 79, "alpha_frac": 0.6069303002, "autogenerated": false, "ratio": 4.161254815630159, "config_test": false, ...
"""An abstract class for entities.""" import re from collections import defaultdict from homeassistant.const import ( ATTR_ASSUMED_STATE, ATTR_FRIENDLY_NAME, ATTR_HIDDEN, ATTR_ICON, ATTR_UNIT_OF_MEASUREMENT, DEVICE_DEFAULT_NAME, STATE_OFF, STATE_ON, STATE_UNAVAILABLE, STATE_UNKNOWN, TEMP_CELCIUS, TEMP_FAHR...
{ "repo_name": "aoakeson/home-assistant", "path": "homeassistant/helpers/entity.py", "copies": "2", "size": "7553", "license": "mit", "hash": -7225056888498693000, "line_mean": 28.9722222222, "line_max": 79, "alpha_frac": 0.6067787634, "autogenerated": false, "ratio": 4.17292817679558, "config_t...
"""An abstract class for entities.""" import asyncio from datetime import datetime, timedelta import logging import functools as ft from timeit import default_timer as timer from typing import Any, Dict, Iterable, List, Optional, Union from homeassistant.const import ( ATTR_ASSUMED_STATE, ATTR_FRIENDLY_NAME, ...
{ "repo_name": "Cinntax/home-assistant", "path": "homeassistant/helpers/entity.py", "copies": "1", "size": "19240", "license": "apache-2.0", "hash": -5979522851131839000, "line_mean": 30.8543046358, "line_max": 134, "alpha_frac": 0.6048856549, "autogenerated": false, "ratio": 4.2822167816603605, ...