code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class listenerThread(baseThread): <NEW_LINE> <INDENT> def __init__(self, quiet=False): <NEW_LINE> <INDENT> super().__init__(name='listener', quiet=quiet) <NEW_LINE> self.own_ip = None <NEW_LINE> self.sort = False <NEW_LINE> self.packet_info = dict() <NEW_LINE> <DEDENT> @property <NEW_LINE> def counted_hosts(self): <NEW...
Waits for packets to arrive and decodes them to check for 'ICMP: Port Unreachable'
62598f9e67a9b606de545dad
class EntryApi(ModelViewSet): <NEW_LINE> <INDENT> queryset = Entry.objects.all() <NEW_LINE> serializer_class = EntrySerializer <NEW_LINE> authentication_classes = (BearerTokenAuthentication,) <NEW_LINE> permission_classes = ( IsAuthenticated, )
Convert data to JSON format and vice versa
62598f9e8e71fb1e983bb89a
class Top: <NEW_LINE> <INDENT> def __init__(self, regwidth: int, blocks: Dict[str, IpBlock], instances: Dict[str, str], if_addrs: Dict[Tuple[str, Optional[str]], int], windows: List[Window], attrs: Dict[str, str]): <NEW_LINE> <INDENT> self.regwidth = regwidth <NEW_LINE> self.blocks = blocks <NEW_LINE> self.instances = ...
An object representing the entire chip, as seen by reggen. This contains instances of some blocks (possibly multiple instances of each block), starting at well-defined base addresses. It may also contain some windows. These are memories that don't have their own comportable IP (so aren't defined in a block), but still...
62598f9e7047854f4633f1c7
class Table: <NEW_LINE> <INDENT> PATH = os.path.dirname(os.path.realpath(__file__)) <NEW_LINE> TOP_FILE = PATH + '/table_top.obj' <NEW_LINE> LEGS_FILE = PATH + '/table_legs.obj' <NEW_LINE> TOP_TAG = 'Table_top' <NEW_LINE> LEGS_TAG = 'Table_legs' <NEW_LINE> def __init__(self, magoz, light_source, color): <NEW_LINE> <IND...
A class for displaying a 3D table.
62598f9e07f4c71912baf22f
class TwitterApi(object): <NEW_LINE> <INDENT> def __init__(self, config): <NEW_LINE> <INDENT> self._config = config <NEW_LINE> self._auth = tw.OAuthHandler( self._config['credentials']['consumer_key'], self._config['credentials']['consumer_secret']) <NEW_LINE> self._auth.set_access_token( self._config['credentials']['a...
Twitter auth info
62598f9e38b623060ffa8e76
class DoublePressContext(Subject): <NEW_LINE> <INDENT> __subject_events__ = (u'break_double_press', ) <NEW_LINE> @contextmanager <NEW_LINE> def breaking_double_press(self): <NEW_LINE> <INDENT> self._broke_double_press = False <NEW_LINE> yield <NEW_LINE> if not self._broke_double_press: <NEW_LINE> <INDENT> self.break_do...
Determines the context of double press. Every double press element in the same scope can not be interleaved -- i.e. let buttons B1 and B2, the sequence press(B1), press(B2), press(B1) does not trigger a double press event regardless of how fast it happens.
62598f9e8a43f66fc4bf1f60
@attr.s(auto_attribs=True) <NEW_LINE> class AuthFunctionalUnit: <NEW_LINE> <INDENT> authentication: bool = attr.ib(default=False) <NEW_LINE> @classmethod <NEW_LINE> def from_bytes(cls, _bytes): <NEW_LINE> <INDENT> if len(_bytes) != 2: <NEW_LINE> <INDENT> raise ValueError( f"Authentication Functional Unit data should by...
Consists of 2 bytes. First byte encodes the number of unused bytes in the second byte. So really you just need to set the last bit to 0 to use authentication. In the green book they use the 0x07 as first byte and 0x80 as last byte. We will use this to not make it hard to look up. It is a bit weirdly defined in the Gree...
62598f9e44b2445a339b685f
class BaseController(object): <NEW_LINE> <INDENT> def __init__(self, state, model): <NEW_LINE> <INDENT> self.state = state <NEW_LINE> self.control = self.state.control <NEW_LINE> self.model = model <NEW_LINE> self.init() <NEW_LINE> <DEDENT> def init(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def _update(self):...
Base controller class for the MVC pattern implementation. Shouldn't be instanciated manually but subclassed then registered in a State class. A subclass of BaseController may override the following method: - **init**: called at initialization (default: do nothing) - **is_quit_event**: define what a quit event is...
62598f9e07f4c71912baf230
class SlbDeletePort(Aliyunsdk): <NEW_LINE> <INDENT> def __init__(self,slbIp,listenPort,resultFormat=resultFormat): <NEW_LINE> <INDENT> Aliyunsdk.__init__(self) <NEW_LINE> self.listenPort = int(listenPort) <NEW_LINE> self.resultFormat = resultFormat <NEW_LINE> self.slbIp = slbIp <NEW_LINE> self.slballip = GetSlbIpAll() ...
把要删除的SLB IP和端口作为参数,生成该类的实例 一个实例只删除一个端口,多个端口需要多个实例
62598f9e442bda511e95c240
class User(BaseModel): <NEW_LINE> <INDENT> user_name = models.CharField(max_length=20) <NEW_LINE> user_pass = models.CharField(max_length=100) <NEW_LINE> user_mail = models.CharField(max_length=50) <NEW_LINE> user_addr = models.CharField(max_length=50) <NEW_LINE> user_tele = models.CharField(max_length=11) <NEW_LINE> u...
用户信息模型类
62598f9ea17c0f6771d5c020
class ModuleAwareNodeTransformer(ast.NodeTransformer): <NEW_LINE> <INDENT> def __init__(self, namespaces: Dict[str, Tuple[ast.AST, List[Union[ast.Import, ast.ImportFrom]]]]): <NEW_LINE> <INDENT> super(ModuleAwareNodeTransformer, self).__init__() <NEW_LINE> self.namespaces = namespaces <NEW_LINE> self.module_namespace: ...
Base class for NodeTransformers which need module/global context.
62598f9e6e29344779b00441
class SimpleBoard(AbstractBoard, SEBinaryWorkload): <NEW_LINE> <INDENT> def __init__( self, clk_freq: str, processor: AbstractProcessor, memory: AbstractMemorySystem, cache_hierarchy: AbstractCacheHierarchy, ) -> None: <NEW_LINE> <INDENT> super().__init__( clk_freq=clk_freq, processor=processor, memory=memory, cache_hi...
This is an incredibly simple system. It contains no I/O, and will work only with a classic cache hierarchy setup. **Limitations** * Only supports SE mode You can run a binary executable via the `set_se_binary_workload` function.
62598f9e56b00c62f0fb2696
class IndirectArrayRegion(AbstractBufferRegion): <NEW_LINE> <INDENT> def __init__(self, region, size, component_count, component_stride): <NEW_LINE> <INDENT> self.region = region <NEW_LINE> self.size = size <NEW_LINE> self.count = component_count <NEW_LINE> self.stride = component_stride <NEW_LINE> self.array = self <N...
A mapped region in which data elements are not necessarily contiguous. This region class is used to wrap buffer regions in which the data must be accessed with some stride. For example, in an interleaved buffer this region can be used to access a single interleaved component as if the data was contiguous.
62598f9ed7e4931a7ef3be7e
class FlatteningPathLoader(TemplatePathLoader): <NEW_LINE> <INDENT> def __init__(self, *a, **kw): <NEW_LINE> <INDENT> self.keep_ext = kw.pop('keep_ext', True) <NEW_LINE> super(FlatteningPathLoader, self).__init__(*a, **kw) <NEW_LINE> <DEDENT> def load(self, *a, **kw): <NEW_LINE> <INDENT> tmpl = super(FlatteningPathLoad...
I've seen this mode of using dust templates in a couple places, but really it's lazy and too ambiguous. It increases the chances of silent conflicts and makes it hard to tell which templates refer to which just by looking at the template code.
62598f9e10dbd63aa1c7099b
class ReturnContainer(): <NEW_LINE> <INDENT> def __init__(self, val=None): <NEW_LINE> <INDENT> self.val = val <NEW_LINE> <DEDENT> def seqEval(self): <NEW_LINE> <INDENT> raise ReturnCalled(self.val.staticEval())
Stuctural container of return statement in hdl
62598f9e236d856c2adc932c
class PacketCaptureParameters(Model): <NEW_LINE> <INDENT> _validation = { 'target': {'required': True}, 'storage_location': {'required': True}, } <NEW_LINE> _attribute_map = { 'target': {'key': 'target', 'type': 'str'}, 'bytes_to_capture_per_packet': {'key': 'bytesToCapturePerPacket', 'type': 'int'}, 'total_bytes_per_s...
Parameters that define the create packet capture operation. All required parameters must be populated in order to send to Azure. :param target: Required. The ID of the targeted resource, only VM is currently supported. :type target: str :param bytes_to_capture_per_packet: Number of bytes captured per packet, the re...
62598f9e85dfad0860cbf967
class AlbumForm(ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Album <NEW_LINE> fields = ['title', 'description', 'photos', 'cover', 'published'] <NEW_LINE> <DEDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> username = kwargs.pop('username') <NEW_LINE> super(AlbumForm, self).__in...
Form for an Album.
62598f9e66656f66f7d5a1d7
class TestCows(unittest.TestCase): <NEW_LINE> <INDENT> def __check_zero_free(self, array): <NEW_LINE> <INDENT> for i in range(0, len(array), 2): <NEW_LINE> <INDENT> elem = array[i:i + 2] <NEW_LINE> self.assertNotEqual(bytearray([0, 0]), elem) <NEW_LINE> <DEDENT> <DEDENT> def __create_buffer(self, length): <NEW_LINE> <I...
Tests for the COWS functions.
62598f9e7d847024c075c1b6
@python_2_unicode_compatible <NEW_LINE> class Relationship(models.Model): <NEW_LINE> <INDENT> university_session = models.ForeignKey('mentorships.UniversitySession') <NEW_LINE> mentor = models.ForeignKey( 'mentorships.UserRole', related_name='mentor') <NEW_LINE> mentee = models.ForeignKey( 'mentorships.UserRole', relat...
Allow `User` to have a variety of `Role`s per `UniversitySession`. All `Role` relationships will be recreated each `UniversitySession`.
62598f9e627d3e7fe0e06c90
class InvokerSignature: <NEW_LINE> <INDENT> def __init__(self, invoker_signature, sbus_arguments, sbus_annotations): <NEW_LINE> <INDENT> self.invokerSignature = invoker_signature <NEW_LINE> self.arguments = sbus_arguments <NEW_LINE> self.annotations = sbus_annotations
Contains information about Invoker signature and SBus arguments and annotations. Do not confuse with SBus.Signature.
62598f9ebd1bec0571e14fb6
class MacAddress: <NEW_LINE> <INDENT> def __init__(self, address): <NEW_LINE> <INDENT> self.address = address <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_string(cls, address_string): <NEW_LINE> <INDENT> if not _MAC_REGEX.match(address_string): <NEW_LINE> <INDENT> raise ValueError("'%s' does not appear to be a ...
Class for comparing mac addresses
62598f9ed268445f26639a76
class RungeKutta: <NEW_LINE> <INDENT> def __init__(self, function): <NEW_LINE> <INDENT> self.func = function <NEW_LINE> self.order = 4 <NEW_LINE> <DEDENT> def __call__(self, r, t, h): <NEW_LINE> <INDENT> k1 = h*self.func(r, t) <NEW_LINE> k2 = h*self.func(r + 0.5*k1, t + 0.5*h) <NEW_LINE> k3 = h*self.func(r + 0.5*k2, t ...
This class declares the Runge-Kutta object which can be used to solve systems of ODEs using the fourth order Runge-Kutta method. Symbols and parameters: 'function' is a user-defined function. 'r' is a scalar or vector passed to the Runge-Kutta method. 't' is the time 'h' is the time step
62598f9ed7e4931a7ef3be7f
class RAFT_IMAGE( ctypes.Structure ): <NEW_LINE> <INDENT> _fields_ = [ ( "data", RAFT_MATRIX ), ( "tl_x", ctypes.c_double ), ( "tl_y", ctypes.c_double ), ( "br_x", ctypes.c_double ),( "br_y", ctypes.c_double ) ]
A raft_image from raft:
62598f9e796e427e5384e579
class FileDel(generics.DestroyAPIView): <NEW_LINE> <INDENT> authentication_classes = (SessionAuthentication, BasicAuthentication, TokenAuthentication) <NEW_LINE> permission_classes = (IsAuthenticated, IsOwner) <NEW_LINE> model = UploadedFile <NEW_LINE> serializer_class = UploadedFileSerializer
Delete files by current user
62598f9efbf16365ca793e9f
class GazeboWorldEntryWidget(GenericUserEntryWidget): <NEW_LINE> <INDENT> def __init__(self, browser_button=True, placeholder_text=None, enabled=True, parent=None): <NEW_LINE> <INDENT> super(GazeboWorldEntryWidget, self).__init__("Gazebo world file", False, browser_button, placeholder_text, enabled, parent) <NEW_LINE> ...
Widget specific to the input of a Gazebo's world file
62598f9e004d5f362081eef0
class Algorithm(object): <NEW_LINE> <INDENT> def initialize(self): <NEW_LINE> <INDENT> print('The Algorithm class is deprecated.') <NEW_LINE> self.iter_ = 0 <NEW_LINE> self.current_solution = None <NEW_LINE> <DEDENT> def callback(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def iterate(self, n=1): <NEW_LINE> <IN...
Abstract class to define iterative algorithms. Attributes ---------- niterations : int Current iteration number. Methods ------- initialize : Set variables to initial state. run : performs the optimization until stop_condition is reached or Ctrl-C is pressed. next : perform one iteration and return curr...
62598f9e1f037a2d8b9e3ecd
class User(db.Model): <NEW_LINE> <INDENT> __tablename__ = "user" <NEW_LINE> id = db.Column(db.Integer, primary_key=True, autoincrement=True) <NEW_LINE> email = db.Column(db.String(255), unique=True, nullable=False) <NEW_LINE> registered_on = db.Column(db.DateTime, nullable=False) <NEW_LINE> admin = db.Column(db.Boolean...
User Model for storing user related details
62598f9e851cf427c66b80ae
class HTTPSTestCase(unittest.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> cls.server = HTTPServer(("localhost", 0), Handler) <NEW_LINE> ssl.wrap_socket = sslwrap(ssl.wrap_socket) <NEW_LINE> cls.server.socket = ssl.wrap_socket(cls.server.socket, certfile='./tests/server...
Test case class that starts up a https server and exposes it via the `server` attribute. The testing server is only created in the setUpClass method so that multiple tests can use the same server instance. The server is started in a separate thread and once the tests are completed the server is shutdown and cleaned up...
62598f9e097d151d1a2c0e0e
class ActivityDiagramHandler(xml.sax.ContentHandler): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.CurrentData = "" <NEW_LINE> <DEDENT> def startElement(self, tag, attributes): <NEW_LINE> <INDENT> self.CurrentData = tag <NEW_LINE> if tag == "mxCell": <NEW_LINE> <INDENT> id = attributes.get("id") <NE...
CurentData is the type of tag the parser getting ActivityDiagram is the activity diagram being parsed
62598f9e56ac1b37e6301fd1
class ModifyPersonSampleRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.PersonId = None <NEW_LINE> self.Name = None <NEW_LINE> self.Description = None <NEW_LINE> self.Usages = None <NEW_LINE> self.FaceOperationInfo = None <NEW_LINE> self.TagOperationInfo = None <NEW_LINE> <DEDEN...
ModifyPersonSample请求参数结构体
62598f9e38b623060ffa8e78
class BoundConstraint(Constraint[D.T_memory, D.T_event, D.T_state]): <NEW_LINE> <INDENT> def __init__(self, evaluate_function: Callable[[D.T_memory, D.T_event, Optional[D.T_state]], float], inequality: str, bound: float, depends_on_next_state: bool = True) -> None: <NEW_LINE> <INDENT> self._evaluate_function = evaluate...
A constraint characterized by an evaluation function, an inequality and a bound. # Example A BoundConstraint with inequality '>=' is checked if (and only if) its #BoundConstraint.evaluate() function returns a float greater than or equal to its bound.
62598f9e01c39578d7f12b64
class ManipulationUpdate(PermissionRequiredMixin, UpdateView): <NEW_LINE> <INDENT> model = Manipulation <NEW_LINE> template_name = 'manipulation_form.html' <NEW_LINE> template_object_name = 'process' <NEW_LINE> permission_required = "hypotheses.update_manipulation"
This view is for editing a Manipulation.
62598f9e7b25080760ed728d
class GenerateHamiltonInputUCT(GenerateHamiltonInputEPP): <NEW_LINE> <INDENT> _use_load_config = False <NEW_LINE> csv_column_headers = ['Input Plate', 'Input Well', 'Sample Name', 'Adapter Well'] <NEW_LINE> output_file_name = 'KAPA_MAKE_LIBRARIES.csv' <NEW_LINE> _max_nb_input_containers = 1 <NEW_LINE> _max_nb_output_co...
"Generate a CSV containing the necessary information for the KAPA make libraries method
62598f9ebaa26c4b54d4f094
class ODMcomplexTypeDefinitionCity(object): <NEW_LINE> <INDENT> openapi_types = { 'value': 'str' } <NEW_LINE> attribute_map = { 'value': 'value' } <NEW_LINE> def __init__(self, value=None, local_vars_configuration=None): <NEW_LINE> <INDENT> if local_vars_configuration is None: <NEW_LINE> <INDENT> local_vars_configurati...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually.
62598f9e4527f215b58e9ccb
class ZdSEmailValidator(EmailValidator): <NEW_LINE> <INDENT> message = _("Utilisez une adresse de courriel valide.") <NEW_LINE> def __call__(self, value, check_username_available=True): <NEW_LINE> <INDENT> value = force_text(value) <NEW_LINE> if not value or "@" not in value: <NEW_LINE> <INDENT> raise ValidationError(s...
Based on https://docs.djangoproject.com/en/1.8/_modules/django/core/validators/#EmailValidator Changed : - check if provider is not if blacklisted - check if email is not used by another user - remove whitelist check - add custom errors and translate them into French
62598f9e01c39578d7f12b65
class ServerException(Exception): <NEW_LINE> <INDENT> pass
服务器内部错误
62598f9eac7a0e7691f722f2
class TCPKeepAliveAdapter(SocketOptionsAdapter): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> socket_options = kwargs.pop('socket_options', SocketOptionsAdapter.default_options) <NEW_LINE> idle = kwargs.pop('idle', 60) <NEW_LINE> interval = kwargs.pop('interval', 20) <NEW_LINE> count = kwargs.p...
An adapter for requests that turns on TCP Keep-Alive by default. The adapter sets 4 socket options: - ``SOL_SOCKET`` ``SO_KEEPALIVE`` - This turns on TCP Keep-Alive - ``IPPROTO_TCP`` ``TCP_KEEPINTVL`` 20 - Sets the keep alive interval - ``IPPROTO_TCP`` ``TCP_KEEPCNT`` 5 - Sets the number of keep alive probes - ``IPPR...
62598f9e63d6d428bbee2599
class VersionInfo (object): <NEW_LINE> <INDENT> def __init__ (self, msg): <NEW_LINE> <INDENT> data = msg.data <NEW_LINE> verinfo = struct.unpack ('< 4B 2H I', data[:12]) <NEW_LINE> desc = data[12:].strip ('\x00') <NEW_LINE> (self.v_cpu, self.p_cpu, self.node_y, self.node_x, self.size, self.ver_num, self.time) = veri...
SC&MP/SARK version information as returned by the SVER command.
62598f9e56b00c62f0fb2698
class HelloApiView(APIView): <NEW_LINE> <INDENT> serializer_class = serializers.HelloSerializer <NEW_LINE> def get(self, request, format=None): <NEW_LINE> <INDENT> an_apiview = [ 'Uses HTTP methods as functions (get, post, patch, put, delete)', 'It is similar to a traditional Django View', 'Gives you the most control o...
Test API View.
62598f9e236d856c2adc932d
class SQSEnvelope(MessageBodyParser, MediaTypeAndContentParser): <NEW_LINE> <INDENT> def __init__(self, graph): <NEW_LINE> <INDENT> self.should_validate_md5 = graph.config.sqs_envelope.validate_md5 <NEW_LINE> <DEDENT> def parse_raw_message(self, consumer, raw_message): <NEW_LINE> <INDENT> message_id = self.parse_messag...
Enveloping base class.
62598f9eb7558d5895463416
class StadsdeelViewSet(rest.DatapuntViewSet): <NEW_LINE> <INDENT> metadata_class = ExpansionMetadata <NEW_LINE> queryset = models.Stadsdeel.objects.all().order_by('id') <NEW_LINE> queryset_detail = models.Stadsdeel.objects.select_related( 'gemeente', ) <NEW_LINE> serializer_detail_class = serializers.StadsdeelDetail <N...
Stadsdeel Door de Amsterdamse gemeenteraad vastgestelde begrenzing van een stadsdeel, ressorterend onder een stadsdeelbestuur. [Stelselpedia] (https://www.amsterdam.nl/stelselpedia/gebieden-index/catalogus/stadsdeel/)
62598f9eeab8aa0e5d30bb6d
class Infinitum: <NEW_LINE> <INDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return other is Infinitum or isinstance(other, Infinitum) <NEW_LINE> <DEDENT> def __ne__(self, other): <NEW_LINE> <INDENT> return other is not Infinitum and not isinstance(other, Infinitum)
An OSC "Infinitum" argument, typically referred to as an "Impulse" There is no value for the argument as its presence in an OSC message provides the only semantic meaning.
62598f9ef7d966606f747dcf
class MainHandler(webapp2.RequestHandler): <NEW_LINE> <INDENT> def write_form(self, error_username="",error_password="", error_validation="", error_email="", username="", email=""): <NEW_LINE> <INDENT> self.response.out.write(form % {"error_username": error_username, "error_password": error_password, "error_validation"...
Handles requests coming in to '/' (the root of our site) e.g. www.user-input.com/
62598f9e435de62698e9bbdc
class SVPAlreadyRedeemedException(SalesforceVoucherProxyException): <NEW_LINE> <INDENT> pass
The voucher has already been redeemed.
62598f9e627d3e7fe0e06c92
class _SimpleLayoutBase(Layout): <NEW_LINE> <INDENT> def __init__(self, **config): <NEW_LINE> <INDENT> Layout.__init__(self, **config) <NEW_LINE> self.clients = _ClientList() <NEW_LINE> <DEDENT> def clone(self, group): <NEW_LINE> <INDENT> c = Layout.clone(self, group) <NEW_LINE> c.clients = _ClientList() <NEW_LINE> ret...
Basic layout class for simple layouts, which need to maintain a single list of clients. This class offers full fledged list of clients and focus cycling. Basic Layouts like Max and Matrix are based on this class
62598f9ea8370b77170f01cb
@attrs(frozen=True) <NEW_LINE> class WattSample: <NEW_LINE> <INDENT> watts = attrib(type=float, converter=float) <NEW_LINE> moment = attrib(converter=datetime_coercion) <NEW_LINE> def settlement_period(self, period_class): <NEW_LINE> <INDENT> return period_class(moment=self.moment) <NEW_LINE> <DEDENT> @property <NEW_LI...
A sample of the power being drawn. A measurement, in watts, of electrical power being drawn at a specific moment in time.
62598f9ed268445f26639a77
class MatchFilterError(Exception): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return self.value <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return 'MatchFilterError: ' + self.value
Default error for match-filter errors.
62598f9ea8ecb03325870ff5
class TestThermalSpeedLite: <NEW_LINE> <INDENT> def test_is_jitted(self): <NEW_LINE> <INDENT> assert is_jitted(thermal_speed_lite) <NEW_LINE> <DEDENT> @pytest.mark.parametrize( "inputs", [ dict(T=5 * u.eV, particle=Particle("p"), method="most_probable", ndim=3), dict(T=3000 * u.K, particle=Particle("e"), method="nrl", ...
Test class for `thermal_speed_lite`.
62598f9e2ae34c7f260aaec9
class UENASSigProc(UESigProc): <NEW_LINE> <INDENT> TRACE = True <NEW_LINE> Dom = 'EMM' <NEW_LINE> Type = (2, 0) <NEW_LINE> Filter = None <NEW_LINE> Timer = None <NEW_LINE> Kwargs = {} <NEW_LINE> def __init__(self, ued, **kwargs): <NEW_LINE> <INDENT> self.UE = ued <NEW_LINE> self.MME = self.UE.MME <NEW_LINE> self.Name =...
UE related NAS signalling procedure instance attributes: - Name: procedure name - Dom: procedure domain ('EMM' / 'ESM') - Type: (protocol discriminator, type) of the initiating message - Filter: list of (protocol discriminator, type) expected in response - Timer: name of the timer to be run when a ...
62598f9e1f037a2d8b9e3ecf
class PGSE11Error(PyNanacoError): <NEW_LINE> <INDENT> pass
ご希望のチャージ金額は、チャージ可能限度額を超えています。
62598f9e3539df3088ecc09d
class RoleManager(base.ModelManager): <NEW_LINE> <INDENT> model_class = model.Role <NEW_LINE> foreign_key_name = 'role' <NEW_LINE> user_assoc = model.UserRoleAssociation <NEW_LINE> group_assoc = model.GroupRoleAssociation <NEW_LINE> def get(self, trans: ProvidesUserContext, decoded_role_id): <NEW_LINE> <INDENT> try: <N...
Business logic for roles.
62598f9ef7d966606f747dd0
class NnlsL2nz(NnlsL2): <NEW_LINE> <INDENT> def __call__(self, A, Y, rng=np.random, E=None): <NEW_LINE> <INDENT> sigma = (self.reg * A.max()) * np.sqrt((A > 0).mean(axis=0)) <NEW_LINE> sigma[sigma == 0] = 1 <NEW_LINE> return self._solve(A, Y, rng, E, sigma=sigma)
Non-negative least-squares with L2 regularization on nonzero components. Similar to `.LstsqL2nz`, except the output values are non-negative. If solving for non-negative **weights**, it is important that the intercepts of the post-population are also non-negative, since agents with negative intercepts will never be si...
62598f9e7d43ff24874272f6
class strlist(object): <NEW_LINE> <INDENT> _list = None <NEW_LINE> _str = None <NEW_LINE> def __init__(self, data=""): <NEW_LINE> <INDENT> if type(data) == str: <NEW_LINE> <INDENT> self._str = data <NEW_LINE> self._list = map(ord, self._str) <NEW_LINE> <DEDENT> elif type(data) in (list, tuple): <NEW_LINE> <INDENT> self...
Evaluates and encodes a string for use as part of a DHCP packet.
62598f9e99cbb53fe6830cbb
class DateWidget(Widget): <NEW_LINE> <INDENT> def clean(self, value): <NEW_LINE> <INDENT> if not value: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> return dateparse.parse_datetime(value) <NEW_LINE> <DEDENT> def render(self, value): <NEW_LINE> <INDENT> if not value: <NEW_LINE> <INDENT> return "" <NEW_LINE> <DEDE...
Widget for converting date fields. Takes optional ``format`` parameter.
62598f9e851cf427c66b80b0
class LicenseDialog(QDialog): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> QDialog.__init__(self, parent) <NEW_LINE> self._ui = Ui_LicenseDialog() <NEW_LINE> self._ui.setupUi(self)
Dialog for displaying the license.
62598f9e38b623060ffa8e7a
class VF6_Ofast_autopar_gcc(VF): <NEW_LINE> <INDENT> def __init__(self, model, dx, dt=None, align=None): <NEW_LINE> <INDENT> super(VF6_Ofast_autopar_gcc, self).__init__(model, dx, dt, align) <NEW_LINE> self.fstep = libvf6_Ofast_autopar_gcc.vf6.step
VF6 with auto parallelization.
62598f9e45492302aabfc2c0
class FixedArrayStack(Stack): <NEW_LINE> <INDENT> def __init__(self, capacity=None): <NEW_LINE> <INDENT> self.capacity = capacity if capacity is not None else DEFAULT_CAPACITY <NEW_LINE> self.size = 0 <NEW_LINE> self.items = [] <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> i = 0 <NEW_LINE> while i < len(s...
A list-based LIFO stack that raises a StackException on overflow/underflow.
62598f9e3539df3088ecc09e
class NeutronException(Exception): <NEW_LINE> <INDENT> message = _("An unknown exception occurred.") <NEW_LINE> def __init__(self, message=None, **kwargs): <NEW_LINE> <INDENT> if message: <NEW_LINE> <INDENT> self.message = message <NEW_LINE> <DEDENT> try: <NEW_LINE> <INDENT> self._error_string = self.message % _safe_de...
Base Neutron Exception. To correctly use this class, inherit from it and define a 'message' property. That message will get printf'd with the keyword arguments provided to the constructor.
62598f9e07f4c71912baf233
class MasterOfNature(Feature): <NEW_LINE> <INDENT> name = "Master of Nature" <NEW_LINE> source = "Cleric (Nature Domain)"
At 17th level, you gain the ability to command animals and plant creatures. While creatures are charmed by your Charm Animals and Plants feature, you can take a bonus action on your turn to verbally command what each of those creatures will do on its next turn.
62598f9e55399d3f0562630a
class LinkedQueue: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._queue = DoublyLinkedList() <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> return len(self._queue) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return str(self._queue) <NEW_LINE> <DEDENT> def __repr__(self): <N...
FIFO Queue implementation using a doubly linked list for storage.
62598f9ee5267d203ee6b6f6
class ExhibitionModelFormTests(UserSetUp, TestCase): <NEW_LINE> <INDENT> def test_login(self): <NEW_LINE> <INDENT> form_data = { 'title': 'New exhibition', 'description': 'description goes here', 'released_at': timezone.now(), } <NEW_LINE> form = ExhibitionForm(data=form_data) <NEW_LINE> self.assertTrue(form.is_valid()...
model.ExhibitionForm tests.
62598f9e1b99ca400228f422
@register <NEW_LINE> class Uniform(Initializer): <NEW_LINE> <INDENT> def __init__(self, scale=0.07): <NEW_LINE> <INDENT> super(Uniform, self).__init__(scale=scale) <NEW_LINE> self.scale = scale <NEW_LINE> <DEDENT> def _init_weight(self, _, arr): <NEW_LINE> <INDENT> random.uniform(-self.scale, self.scale, out=arr)
Initializes weights with random values uniformly sampled from a given range. Parameters ---------- scale : float, optional The bound on the range of the generated random values. Values are generated from the range [-`scale`, `scale`]. Default scale is 0.07. Example ------- >>> # Given 'module', an instanc...
62598f9e57b8e32f52508010
class Pubkey(db.Model): <NEW_LINE> <INDENT> __tablename__ = "pubkeys" <NEW_LINE> id = db.Column(db.Integer(), primary_key=True) <NEW_LINE> string = db.Column(db.String()) <NEW_LINE> friends = db.relationship("Friend", backref="pubkey") <NEW_LINE> peers = db.relationship("Peer", backref="pubkey") <NEW_LI...
We track public keys instead of specific remote nodes so people can move their private keys from device to device or network to network like with the cellular internet system and still be generally contactable as part of our friends list.
62598f9e0c0af96317c5616b
class LoginForm(Form): <NEW_LINE> <INDENT> name = StringField('Name', validators=[Required()]) <NEW_LINE> room = HiddenField() <NEW_LINE> submit = SubmitField('Enter Chatroom')
Accepts a nickname and a room.
62598f9eac7a0e7691f722f4
class ArgumentError(Exception): <NEW_LINE> <INDENT> pass
A problem with the supplied arguments to a class or function
62598f9eadb09d7d5dc0a373
class Database: <NEW_LINE> <INDENT> def __init__(self, db_name): <NEW_LINE> <INDENT> self.db = sqlite3.connect(f'{base_dir}/{db_name}') <NEW_LINE> <DEDENT> def add_table(self, table_name, **columns): <NEW_LINE> <INDENT> self.cols = "" <NEW_LINE> for col_name, col_type in columns.items(): <NEW_LINE> <INDENT> self.cols +...
Class used to interact with sqlite database
62598f9eeab8aa0e5d30bb6f
class Directory(FSItem): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> super().__init__(path) <NEW_LINE> if super().isfile(): <NEW_LINE> <INDENT> raise FileSystemError("file with name {0} already exists". format(self.path)) <NEW_LINE> <DEDENT> <DEDENT> def create(self): <NEW_LINE> <INDENT> if os.pat...
Class for working with directories
62598f9e435de62698e9bbdd
class H0_mixed: <NEW_LINE> <INDENT> def __init__(self, Lp, Rp): <NEW_LINE> <INDENT> self.Lp = Lp <NEW_LINE> self.Rp = Rp <NEW_LINE> <DEDENT> def matvec(self, x): <NEW_LINE> <INDENT> x = x.split_legs(['(vL.vR)']) <NEW_LINE> x = npc.tensordot(self.Lp, x, axes=('vR', 'vL')) <NEW_LINE> x = npc.tensordot(x, self.Rp, axes=([...
Class defining the zero site Hamiltonian for Lanczos. Parameters ---------- Lp : :class:`tenpy.linalg.np_conserved.Array` left part of the environment Rp : :class:`tenpy.linalg.np_conserved.Array` right part of the environment Attributes ---------- Lp : :class:`tenpy.linalg.np_conserved.Array` left part o...
62598f9ef7d966606f747dd1
class BrHtmlImprover (HtmlImprover): <NEW_LINE> <INDENT> def _appendLineBreaks (self, text): <NEW_LINE> <INDENT> result = text <NEW_LINE> result = result.replace ("\n", "<br>") <NEW_LINE> opentags = r"[uod]l|hr|h\d|tr|td" <NEW_LINE> closetags = r"li|d[td]|t[rdh]|caption|thead|tfoot|tbody|colgroup|col|h\d" <NEW_LINE> re...
Class replace \n to <br>
62598f9ebe8e80087fbbee48
class Item(object): <NEW_LINE> <INDENT> sprite = "*" <NEW_LINE> def __init__(self, x, y): <NEW_LINE> <INDENT> self.pos_x = x <NEW_LINE> self.pos_y = y <NEW_LINE> <DEDENT> def tick(self): <NEW_LINE> <INDENT> raise NotImplementedError("tick not implemented") <NEW_LINE> <DEDENT> def get_sprite(self): <NEW_LINE> <INDENT> r...
Base class for all elements in game
62598f9ebd1bec0571e14fb8
class ProductFactory(Factory): <NEW_LINE> <INDENT> name = Sequence(lambda n: 'Product {0}'.format(n)) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = models.Product
Product Factory
62598f9e009cb60464d0130e
@Registers.model <NEW_LINE> class DqnCnnPong(DqnCnn): <NEW_LINE> <INDENT> def create_model(self, model_info): <NEW_LINE> <INDENT> state = Input(shape=self.state_dim, dtype="int8") <NEW_LINE> state1 = Lambda(lambda x: K.cast(x, dtype='float32') / 255.)(state) <NEW_LINE> convlayer = Conv2D(32, (8, 8), strides=(4, 4), act...
Docstring for DqnPong.
62598f9e090684286d5935cf
class TestDump(DumpFaster): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> self.test_data_init() <NEW_LINE> <DEDENT> def test_free_space(self, file_path, free_limit): <NEW_LINE> <INDENT> _stat = statvfs(file_path) <NEW_LINE> _gb_free = _stat[0] * _stat[2] / 1024 ** 3 <NEW_LINE> return True ...
move all the testing methods here to cleanup the production dump class
62598f9e24f1403a926857a7
class RunApiGuestUpgrade(RunApi): <NEW_LINE> <INDENT> def __init__(self, step_name: str = None): <NEW_LINE> <INDENT> super().__init__("guestUpgrade", step_name) <NEW_LINE> <DEDENT> def request(self): <NEW_LINE> <INDENT> return ( super() .request() .with_json( { "email": "$email", "password": "$password", "code": "$veri...
Implement api 'guestUpgrade'. Key-value pairs (required): - email: $email (str) - password: $password (str) - code: $verify_code (str) Key-value pairs (optional): - countryCode (str) - acceptMarketingEmail (int) - registerAppVersion (str)
62598f9e4e4d56256637220e
class NestAuth(AuthBase): <NEW_LINE> <INDENT> def __init__(self, token): <NEW_LINE> <INDENT> self.token = token <NEW_LINE> <DEDENT> def __call__(self, r): <NEW_LINE> <INDENT> r.headers={} <NEW_LINE> r.headers['Content-Type'] = 'application/json' <NEW_LINE> r.headers['Authorization'] = 'Bearer {}'.format(self.token) <NE...
Attaches HTTP Pizza Authentication to the given Request object.
62598f9e442bda511e95c245
class ProcessNameParser(LineOnlyReceiver): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.result = '' <NEW_LINE> <DEDENT> def lineReceived(self, line): <NEW_LINE> <INDENT> if line: <NEW_LINE> <INDENT> self.result = line.strip()
Handler for the output lines returned from the cpu time command. After parsing, the ``result`` attribute will contain a dictionary mapping process names to elapsed CPU time. Process names may be truncated. A special process will be added indicating the wallclock time.
62598f9ed268445f26639a78
class BaseNetwork(nn.Module): <NEW_LINE> <INDENT> def __init__(self, cfg): <NEW_LINE> <INDENT> super(BaseNetwork, self).__init__() <NEW_LINE> self.cfg = cfg <NEW_LINE> '''load network blocks''' <NEW_LINE> for phase_name, net_spec in cfg.config['model'].items(): <NEW_LINE> <INDENT> method_name = net_spec['method'] <NEW_...
Base Network Module for other networks
62598f9edd821e528d6d8d1f
class WacomStylus(Structure): <NEW_LINE> <INDENT> _fields_ = [ ("id", c_int), ("name", c_char_p), ("num_buttons", c_int), ("has_eraser", c_bool), ("is_eraser", c_bool), ("has_lens", c_bool), ("has_wheel", c_bool), ("type", c_int), ("axes", c_int) ]
struct _WacomStylus { int id; char *name; int num_buttons; gboolean has_eraser; gboolean is_eraser; gboolean has_lens; gboolean has_wheel; WacomStylusType type; WacomAxisTypeFlags axes; };
62598f9e2c8b7c6e89bd35bb
class Settings(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.screen_width = 1200 <NEW_LINE> self.screen_height = 800 <NEW_LINE> self.bg_color = (230, 230, 230) <NEW_LINE> self.rocket_speed_factor = 1.5
A class to store all settings for Rocket Game.
62598f9e92d797404e388a5b
class RoleWidget(QtWidgets.QComboBox): <NEW_LINE> <INDENT> def __init__(self,name,exptConfigUi,parent=None): <NEW_LINE> <INDENT> super(RoleWidget, self).__init__() <NEW_LINE> self.name = name <NEW_LINE> self.exptConfigUi = exptConfigUi <NEW_LINE> self.onUpdate() <NEW_LINE> self.exptConfigUi.updateRoles.connect(self.onU...
Combo box for selecting what hardware to use for a specific software role
62598f9ed486a94d0ba2bdbf
class ARJoinMappingStruct(Structure): <NEW_LINE> <INDENT> _fields_ = [ ('schemaIndex', c_uint), ('realId', ARInternalId) ]
Join field mapping (ar.h line 5453).
62598f9e63d6d428bbee259c
class DesignNameMetric (Metric): <NEW_LINE> <INDENT> title = "Design Name" <NEW_LINE> align = 'left' <NEW_LINE> width = 25 <NEW_LINE> def load_cell(self, design, verbose=False): <NEW_LINE> <INDENT> name = design['path'][design.rep] <NEW_LINE> design.name = name <NEW_LINE> <DEDENT> def face_value(self, design): <NEW_LIN...
Make a column that just lists the name of each design.
62598f9e656771135c48946d
class Dialog(QObject): <NEW_LINE> <INDENT> show_dialog = pyqtSignal() <NEW_LINE> TOGGLE_DEPS = {} <NEW_LINE> TOGGLE_DEPS_INVERTED = [] <NEW_LINE> VOLATILE_WIDGETS = {} <NEW_LINE> WIDGET_NAMES = {} <NEW_LINE> GRAY = QBrush(Qt.gray) <NEW_LINE> def __init__(self, dialog): <NEW_LINE> <INDENT> QObject.__init__(self) <NEW_LI...
one single dialog
62598f9e851cf427c66b80b2
class Capability(BaseEnum): <NEW_LINE> <INDENT> GET = ProtocolEvent.GET <NEW_LINE> SET = ProtocolEvent.SET <NEW_LINE> START_AUTOSAMPLE = ProtocolEvent.START_AUTOSAMPLE <NEW_LINE> STOP_AUTOSAMPLE = ProtocolEvent.STOP_AUTOSAMPLE <NEW_LINE> ACQUIRE_STATUS = ProtocolEvent.ACQUIRE_STATUS <NEW_LINE> START_LEVELING = Protocol...
Protocol events that should be exposed to users (subset of above).
62598f9e7047854f4633f1cd
class Personaje(object): <NEW_LINE> <INDENT> def __init__(self, nombre, clase, nivel, alineamiento, raza, sexo, edad, altura, peso, pelo, ojos, diox, manobuena, jugador, fue, des, con, intl, sab, car, asp, hon): <NEW_LINE> <INDENT> self.nombre = nombre <NEW_LINE> self.clase = clase <NEW_LINE> self.nivel = nivel <NEW_LI...
Este script crea la clase Personaje, que tendrá los atributos y características básicas comunes a todos los personajes.
62598f9e21a7993f00c65d6d
class DlopenFailedException(CouchbaseException): <NEW_LINE> <INDENT> pass
Failed to open shared object
62598f9e38b623060ffa8e7c
class ModuleTests(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> notify2.init("notify2 test suite") <NEW_LINE> <DEDENT> def test_init_uninit(self): <NEW_LINE> <INDENT> assert notify2.is_initted() <NEW_LINE> self.assertEqual(notify2.get_app_name(), "notify2 test suite") <NEW_LINE> notify2.u...
Test module level functions.
62598f9e596a897236127a65
class itkVTKImageToImageFilterIUL2(itkVTKImageImportPython.itkVTKImageImportIUL2): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") <NEW_LINE> __repr_...
Proxy of C++ itkVTKImageToImageFilterIUL2 class
62598f9e91f36d47f2230d95
class Tabular(): <NEW_LINE> <INDENT> def __init__(self, h, A): <NEW_LINE> <INDENT> self.h = np.asarray(h) <NEW_LINE> self.A = np.asarray(A) <NEW_LINE> self.V = scipy.integrate.cumtrapz(h, A, initial=0.) <NEW_LINE> self.hmax = self.h.max() <NEW_LINE> self.hmin = self.h.min() <NEW_LINE> self.Amax = self.A.max() <NEW_LINE...
Class for computing tabular area/volume-depth relations at superjunctions. Inputs: ------- h : np.ndarray Depth points on depth-area profile (meters) A : np.ndarray Surface areas associated with each depth (square meters)
62598f9e63b5f9789fe84f60
class UnitTests(unittest.TestCase): <NEW_LINE> <INDENT> def test_insert(self): <NEW_LINE> <INDENT> database = MagicMock() <NEW_LINE> target, name, location, epiweek, value = 'ov_noro_broad', 'wiki', 'vi', 201820, 3.14 <NEW_LINE> SensorsTable(database=database).insert(target, name, location, epiweek, value) <NEW_LINE> s...
Basic unit tests.
62598f9e91af0d3eaad39bf5
class AbstractVote(models.Model): <NEW_LINE> <INDENT> review = models.ForeignKey('reviews.ProductReview', related_name='votes') <NEW_LINE> user = models.ForeignKey(AUTH_USER_MODEL, related_name='review_votes') <NEW_LINE> UP, DOWN = 1, -1 <NEW_LINE> VOTE_CHOICES = ( (UP, _("Up")), (DOWN, _("Down")) ) <NEW_LINE> delta = ...
Records user ratings as yes/no vote. * Only signed-in users can vote. * Each user can vote only once.
62598f9ebe8e80087fbbee4a
class Locator(QObject): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> QObject.__init__(self) <NEW_LINE> self._thread = LocateThread() <NEW_LINE> self.connect(self._thread, SIGNAL("finished()"), self._load_results) <NEW_LINE> self.connect(self._thread, SIGNAL("finished()"), self._cleanup) <NEW_LINE> self.c...
This class is used Go To Definition feature.
62598f9e435de62698e9bbe0
class JSONEncoder(_json.JSONEncoder): <NEW_LINE> <INDENT> def default(self, o): <NEW_LINE> <INDENT> if isinstance(o, datetime): <NEW_LINE> <INDENT> return http_date(o) <NEW_LINE> <DEDENT> if isinstance(o, uuid.UUID): <NEW_LINE> <INDENT> return str(o) <NEW_LINE> <DEDENT> if isinstance(o, decimal.Decimal): <NEW_LINE> <IN...
The default Flask JSON encoder. This one extends the default simplejson encoder by also supporting ``datetime`` objects, ``UUID`` as well as ``Markup`` objects which are serialized as RFC 822 datetime strings (same as the HTTP date format). In order to support more data types override the :meth:`default` method.
62598f9e45492302aabfc2c3
class AccountAcc(TypedDict): <NEW_LINE> <INDENT> acc: str <NEW_LINE> pAcc: str <NEW_LINE> uAcc: str <NEW_LINE> name: str <NEW_LINE> level: int <NEW_LINE> subAccs: List[str] <NEW_LINE> status: int
Python representation of a tuple or struct. Solidity compiler output does not include the names of structs that appear in method definitions. A tuple found in an ABI may have been written in Solidity as a literal, anonymous tuple, or it may have been written as a named `struct`:code:, but there is no way to tell from...
62598f9e9b70327d1c57eb8a
class ArrConvertor(object): <NEW_LINE> <INDENT> def __init__(self, size=0, inner_conv=None): <NEW_LINE> <INDENT> self.size = size <NEW_LINE> self.inner_conv = inner_conv <NEW_LINE> <DEDENT> def set_size(self, size): <NEW_LINE> <INDENT> self.size = size <NEW_LINE> <DEDENT> def get_size(self): <NEW_LINE> <INDENT> return ...
classdocs
62598f9e66656f66f7d5a1dd
class TaskParamButton(QPushButton): <NEW_LINE> <INDENT> tp = None <NEW_LINE> def __init__(self, taskName='', parent=None): <NEW_LINE> <INDENT> super(TaskParamButton, self).__init__(parent) <NEW_LINE> name = ctaTaskPool.taskPool.getTask(taskName).setting.get('symbolList','None') <NEW_LINE> self.setText(str(name)) <NEW_L...
查看参数按钮
62598f9e3eb6a72ae038a42d
class HubMixin(HubAccessMixin): <NEW_LINE> <INDENT> hub_model = Hub <NEW_LINE> hub_context_name = 'hub' <NEW_LINE> def get_hub_model(self): <NEW_LINE> <INDENT> return self.hub_model <NEW_LINE> <DEDENT> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> kwargs.update({self.hub_context_name: self.get_hub()}) <NEW_...
Mixin used like a SingleObjectMixin to fetch an hub
62598f9e4e4d562566372210
class PylintQualityReporter(BaseQualityReporter): <NEW_LINE> <INDENT> COMMAND = 'pylint' <NEW_LINE> MODERN_OPTIONS = ['--msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}"'] <NEW_LINE> LEGACY_OPTIONS = ['-f', 'parseable', '--reports=no', '--include-ids=y'] <NEW_LINE> OPTIONS = MODERN_OPTIONS <NEW_LINE> EXT...
Report Pylint violations.
62598f9e097d151d1a2c0e14
class RPCError(Exception): <NEW_LINE> <INDENT> pass
Base class for all excetions thrown by :py:mod:`tinyrpc`.
62598f9e44b2445a339b6863
class VoiceActivityDetector(DataConsumer, DataProducer): <NEW_LINE> <INDENT> def __init__(self, silence_threshold=0.005, context_width=5, onset_threshold=5, ending_threshold=20): <NEW_LINE> <INDENT> super(VoiceActivityDetector, self).__init__() <NEW_LINE> self.silence_threshold=silence_threshold <NEW_LINE> self.context...
A simple voice activity detection processor. Discards silence audio frames and enriches non-silent audio frames with voice activity information.
62598f9e45492302aabfc2c4