Datasets:

function_name
stringlengths
1
63
docstring
stringlengths
50
5.89k
masked_code
stringlengths
50
882k
implementation
stringlengths
169
12.9k
start_line
int32
1
14.6k
end_line
int32
16
14.6k
file_content
stringlengths
274
882k
parse
Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class.
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
@staticmethod def parse(wmsg): """ Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class. """ ## this should already be verified by WampSerial...
884
932
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
__init__
:param request: The request ID of the original `PUBLISH` request. :type request: int :param publication: The publication ID for the published event. :type publication: int
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
def __init__(self, request, publication): """ :param request: The request ID of the original `PUBLISH` request. :type request: int :param publication: The publication ID for the published event. :type publication: int """ assert(type(request) in six.integer_types) ass...
1,177
1,190
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
parse
Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class.
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
@staticmethod def parse(wmsg): """ Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class. """ ## this should already be verified by WampSerial...
1,193
1,215
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
__init__
:param request: The WAMP request ID of this request. :type request: int :param topic: The WAMP or application URI of the PubSub topic to subscribe to. :type topic: unicode :param match: The topic matching method to be used for the subscription. :type match: unicode
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
def __init__(self, request, topic, match = MATCH_EXACT): """ :param request: The WAMP request ID of this request. :type request: int :param topic: The WAMP or application URI of the PubSub topic to subscribe to. :type topic: unicode :param match: The topic matching method to be u...
1,249
1,267
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
parse
Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class.
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
@staticmethod def parse(wmsg): """ Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class. """ ## this should already be verified by WampSerial...
1,270
1,306
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
__init__
:param request: The request ID of the original ``SUBSCRIBE`` request. :type request: int :param subscription: The subscription ID for the subscribed topic (or topic pattern). :type subscription: int
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
def __init__(self, request, subscription): """ :param request: The request ID of the original ``SUBSCRIBE`` request. :type request: int :param subscription: The subscription ID for the subscribed topic (or topic pattern). :type subscription: int """ assert(type(request) in ...
1,341
1,354
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
parse
Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class.
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
@staticmethod def parse(wmsg): """ Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class. """ ## this should already be verified by WampSerial...
1,357
1,379
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
parse
Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class.
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
@staticmethod def parse(wmsg): """ Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class. """ ## this should already be verified by WampSerial...
1,426
1,448
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
parse
Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class.
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
@staticmethod def parse(wmsg): """ Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class. """ ## this should already be verified by WampSerial...
1,490
1,511
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
__init__
:param subscription: The subscription ID this event is dispatched under. :type subscription: int :param publication: The publication ID of the dispatched event. :type publication: int :param args: Positional values for application-defined exception. Must be serializable using any serializers in use. :type args: list...
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
def __init__(self, subscription, publication, args = None, kwargs = None, publisher = None): """ :param subscription: The subscription ID this event is dispatched under. :type subscription: int :param publication: The publication ID of the dispatched event. :type publication: int ...
1,546
1,573
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
parse
Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class.
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
@staticmethod def parse(wmsg): """ Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class. """ ## this should already be verified by WampSerial...
1,576
1,624
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
__init__
:param request: The WAMP request ID of this request. :type request: int :param procedure: The WAMP or application URI of the procedure which should be called. :type procedure: unicode :param args: Positional values for application-defined call arguments. Must be serializable using any serializers in use. :type args:...
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
def __init__(self, request, procedure, args = None, kwargs = None, timeout = None, receive_progress = None, discloseMe = None): """ :param request: The WAMP request ID of this request. :...
1,668
1,712
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
parse
Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class.
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
@staticmethod def parse(wmsg): """ Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class. """ ## this should already be verified by WampSerial...
1,715
1,786
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
__init__
:param request: The WAMP request ID of the original `CALL` to cancel. :type request: int :param mode: Specifies how to cancel the call (``"skip"``, ``"abort"`` or ``"kill"``). :type mode: unicode or None
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
def __init__(self, request, mode = None): """ :param request: The WAMP request ID of the original `CALL` to cancel. :type request: int :param mode: Specifies how to cancel the call (``"skip"``, ``"abort"`` or ``"kill"``). :type mode: unicode or None """ assert(type(request)...
1,837
1,851
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
parse
Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class.
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
@staticmethod def parse(wmsg): """ Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class. """ ## this should already be verified by WampSerial...
1,854
1,891
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
__init__
:param request: The request ID of the original `CALL` request. :type request: int :param args: Positional values for application-defined event payload. Must be serializable using any serializers in use. :type args: list or tuple or None :param kwargs: Keyword values for application-defined event payload. Must be ...
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
def __init__(self, request, args = None, kwargs = None, progress = None): """ :param request: The request ID of the original `CALL` request. :type request: int :param args: Positional values for application-defined event payload. Must be serializable using any serializers in use. ...
1,930
1,954
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
parse
Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class.
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
@staticmethod def parse(wmsg): """ Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class. """ ## this should already be verified by WampSerial...
1,957
2,001
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
__init__
:param request: The WAMP request ID of this request. :type request: int :param procedure: The WAMP or application URI of the RPC endpoint provided. :type procedure: unicode :param pkeys: The endpoint can work for this list of application partition keys. :type pkeys: list of int or None :param discloseCaller: If ``True`...
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
def __init__(self, request, procedure, pkeys = None, discloseCaller = None): """ :param request: The WAMP request ID of this request. :type request: int :param procedure: The WAMP or application URI of the RPC endpoint provided. :type procedure: unicode :param pkeys: The endpoint...
2,041
2,066
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
parse
Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class.
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
@staticmethod def parse(wmsg): """ Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class. """ ## this should already be verified by WampSerial...
2,069
2,116
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
__init__
:param request: The request ID of the original ``REGISTER`` request. :type request: int :param registration: The registration ID for the registered procedure (or procedure pattern). :type registration: int
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
def __init__(self, request, registration): """ :param request: The request ID of the original ``REGISTER`` request. :type request: int :param registration: The registration ID for the registered procedure (or procedure pattern). :type registration: int """ assert(type(reque...
2,154
2,167
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
parse
Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class.
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
@staticmethod def parse(wmsg): """ Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class. """ ## this should already be verified by WampSerial...
2,170
2,192
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
__init__
:param request: The WAMP request ID of this request. :type request: int :param registration: The registration ID for the registration to unregister. :type registration: int
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
def __init__(self, request, registration): """ :param request: The WAMP request ID of this request. :type request: int :param registration: The registration ID for the registration to unregister. :type registration: int """ assert(type(request) in six.integer_types) a...
2,223
2,236
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
parse
Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class.
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
@staticmethod def parse(wmsg): """ Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class. """ ## this should already be verified by WampSerial...
2,239
2,261
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
parse
Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class.
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
@staticmethod def parse(wmsg): """ Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class. """ ## this should already be verified by WampSerial...
2,303
2,324
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
__init__
:param request: The WAMP request ID of this request. :type request: int :param registration: The registration ID of the endpoint to be invoked. :type registration: int :param args: Positional values for application-defined event payload. Must be serializable using any serializers in use. :type args: list or tuple or...
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
def __init__(self, request, registration, args = None, kwargs = None, timeout = None, receive_progress = None, caller = None, authid = None, authrole = None, ...
2,359
2,417
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
__init__
:param request: The WAMP request ID of the original ``INVOCATION`` to interrupt. :type request: int :param mode: Specifies how to interrupt the invocation (``"abort"`` or ``"kill"``). :type mode: unicode or None
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
def __init__(self, request, mode = None): """ :param request: The WAMP request ID of the original ``INVOCATION`` to interrupt. :type request: int :param mode: Specifies how to interrupt the invocation (``"abort"`` or ``"kill"``). :type mode: unicode or None """ assert(type(...
2,580
2,594
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
parse
Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class.
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
@staticmethod def parse(wmsg): """ Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class. """ ## this should already be verified by WampSerial...
2,597
2,634
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
__init__
:param request: The WAMP request ID of the original call. :type request: int :param args: Positional values for application-defined event payload. Must be serializable using any serializers in use. :type args: list or tuple or None :param kwargs: Keyword values for application-defined event payload. Must be seria...
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
def __init__(self, request, args = None, kwargs = None, progress = None): """ :param request: The WAMP request ID of the original call. :type request: int :param args: Positional values for application-defined event payload. Must be serializable using any serializers in use. :...
2,674
2,698
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
parse
Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class.
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
@staticmethod def parse(wmsg): """ Verifies and parses an unserialized raw message into an actual WAMP message instance. :param wmsg: The unserialized raw message. :type wmsg: list :returns: An instance of this class. """ ## this should already be verified by WampSerial...
2,701
2,745
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## h...
_snn_imp
Internal function for fast snn calculation Parameters ---------- ind : int Indices return by kNN. ref_set_ : int, optional (default=10) specifies the number of shared nearest neighbors to create the reference set. Note that ref_set must be smaller than n_neighbors.
# -*- coding: utf-8 -*- """Subspace Outlier Detection (SOD) """ # Author: Yahya Almardeny <almardeny@gmail.com> # License: BSD 2 clause import numpy as np import numba as nb from sklearn.neighbors import NearestNeighbors from sklearn.utils import check_array from ..utils.utility import check_parameter from .base impo...
@nb.njit(parallel=True) def _snn_imp(ind, ref_set_): """Internal function for fast snn calculation Parameters ---------- ind : int Indices return by kNN. ref_set_ : int, optional (default=10) specifies the number of shared nearest neighbors to create the reference set. Note...
16
40
# -*- coding: utf-8 -*- """Subspace Outlier Detection (SOD) """ # Author: Yahya Almardeny <almardeny@gmail.com> # License: BSD 2 clause import numpy as np import numba as nb from sklearn.neighbors import NearestNeighbors from sklearn.utils import check_array from ..utils.utility import check_parameter from .base impo...
fit
Fit detector. y is ignored in unsupervised methods. Parameters ---------- X : numpy array of shape (n_samples, n_features) The input samples. y : Ignored Not used, present for API consistency by convention. Returns ------- self : object Fitted estimator.
# -*- coding: utf-8 -*- """Subspace Outlier Detection (SOD) """ # Author: Yahya Almardeny <almardeny@gmail.com> # License: BSD 2 clause import numpy as np import numba as nb from sklearn.neighbors import NearestNeighbors from sklearn.utils import check_array from ..utils.utility import check_parameter from .base impo...
def fit(self, X, y=None): """Fit detector. y is ignored in unsupervised methods. Parameters ---------- X : numpy array of shape (n_samples, n_features) The input samples. y : Ignored Not used, present for API consistency by convention. Retur...
115
138
# -*- coding: utf-8 -*- """Subspace Outlier Detection (SOD) """ # Author: Yahya Almardeny <almardeny@gmail.com> # License: BSD 2 clause import numpy as np import numba as nb from sklearn.neighbors import NearestNeighbors from sklearn.utils import check_array from ..utils.utility import check_parameter from .base impo...
_snn
This function is called internally to calculate the shared nearest neighbors (SNN). SNN is reported to be more robust than k nearest neighbors. Returns ------- snn_indices : numpy array of shape (n_shared_nearest_neighbors,) The indices of top k shared nearest neighbors for each observation.
# -*- coding: utf-8 -*- """Subspace Outlier Detection (SOD) """ # Author: Yahya Almardeny <almardeny@gmail.com> # License: BSD 2 clause import numpy as np import numba as nb from sklearn.neighbors import NearestNeighbors from sklearn.utils import check_array from ..utils.utility import check_parameter from .base impo...
def _snn(self, X): """This function is called internally to calculate the shared nearest neighbors (SNN). SNN is reported to be more robust than k nearest neighbors. Returns ------- snn_indices : numpy array of shape (n_shared_nearest_neighbors,) The indi...
159
173
# -*- coding: utf-8 -*- """Subspace Outlier Detection (SOD) """ # Author: Yahya Almardeny <almardeny@gmail.com> # License: BSD 2 clause import numpy as np import numba as nb from sklearn.neighbors import NearestNeighbors from sklearn.utils import check_array from ..utils.utility import check_parameter from .base impo...
test_feedback_can_be_filtered_by_all_products_and_versions
Tests product filtering in dashboard 1. Verify that at least one product exists 2. Verify that filtering by product returns results 3. Verify that versions show up when you choose a product 4. Verify that the state of the filters are correct after being applied 5. Verify product and version values in the URL NB: We d...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import pytest from unittestzero import Assert from pages.dashboard import DashboardPage class TestProductFilter(objec...
@pytest.mark.nondestructive def test_feedback_can_be_filtered_by_all_products_and_versions(self, mozwebqa): """Tests product filtering in dashboard 1. Verify that at least one product exists 2. Verify that filtering by product returns results 3. Verify that versions show up when...
12
60
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import pytest from unittestzero import Assert from pages.dashboard import DashboardPage class TestProductFilter(objec...
test_get_significant_states_include_entity
Test if significant states are returned when including entities. We should only get back changes of the media_player.test entity.
"""The tests the History component.""" # pylint: disable=protected-access,invalid-name from datetime import timedelta import json from unittest.mock import patch, sentinel import pytest from pytest import approx from homeassistant.components import history, recorder from homeassistant.components.recorder.history impo...
def test_get_significant_states_include_entity(hass_history): """Test if significant states are returned when including entities. We should only get back changes of the media_player.test entity. """ hass = hass_history zero, four, states = record_states(hass) del states["media_player.test2"] ...
287
308
"""The tests the History component.""" # pylint: disable=protected-access,invalid-name from datetime import timedelta import json from unittest.mock import patch, sentinel import pytest from pytest import approx from homeassistant.components import history, recorder from homeassistant.components.recorder.history impo...
test_get_significant_states_include
Test significant states when including domains and entities. We should only get back changes of the media_player.test entity and the thermostat domain.
"""The tests the History component.""" # pylint: disable=protected-access,invalid-name from datetime import timedelta import json from unittest.mock import patch, sentinel import pytest from pytest import approx from homeassistant.components import history, recorder from homeassistant.components.recorder.history impo...
def test_get_significant_states_include(hass_history): """Test significant states when including domains and entities. We should only get back changes of the media_player.test entity and the thermostat domain. """ hass = hass_history zero, four, states = record_states(hass) del states["medi...
311
334
"""The tests the History component.""" # pylint: disable=protected-access,invalid-name from datetime import timedelta import json from unittest.mock import patch, sentinel import pytest from pytest import approx from homeassistant.components import history, recorder from homeassistant.components.recorder.history impo...
test_get_significant_states_include_exclude_entity
Test if significant states when excluding and including domains. We should not get back any changes since we include only media_player.test but also exclude it.
"""The tests the History component.""" # pylint: disable=protected-access,invalid-name from datetime import timedelta import json from unittest.mock import patch, sentinel import pytest from pytest import approx from homeassistant.components import history, recorder from homeassistant.components.recorder.history impo...
def test_get_significant_states_include_exclude_entity(hass_history): """Test if significant states when excluding and including domains. We should not get back any changes since we include only media_player.test but also exclude it. """ hass = hass_history zero, four, states = record_states(ha...
364
388
"""The tests the History component.""" # pylint: disable=protected-access,invalid-name from datetime import timedelta import json from unittest.mock import patch, sentinel import pytest from pytest import approx from homeassistant.components import history, recorder from homeassistant.components.recorder.history impo...
test_get_significant_states_include_exclude
Test if significant states when in/excluding domains and entities. We should only get back changes of the media_player.test2 entity.
"""The tests the History component.""" # pylint: disable=protected-access,invalid-name from datetime import timedelta import json from unittest.mock import patch, sentinel import pytest from pytest import approx from homeassistant.components import history, recorder from homeassistant.components.recorder.history impo...
def test_get_significant_states_include_exclude(hass_history): """Test if significant states when in/excluding domains and entities. We should only get back changes of the media_player.test2 entity. """ hass = hass_history zero, four, states = record_states(hass) del states["media_player.test"]...
391
418
"""The tests the History component.""" # pylint: disable=protected-access,invalid-name from datetime import timedelta import json from unittest.mock import patch, sentinel import pytest from pytest import approx from homeassistant.components import history, recorder from homeassistant.components.recorder.history impo...
_describe_entity
Describes the given traffic entity as an HTML list. :param entity: An object of an owlready2 class. :return: The HTML-representation of entity.
# Visualizer is for debugging purposes only import logging import math import random import threading import http.server import socketserver import os import re from shapely import wkt import matplotlib.pyplot as plt import mpld3 import screeninfo import tempfile import webbrowser import owlready2 from shapely import ...
def _describe_entity(entity): """ Describes the given traffic entity as an HTML list. :param entity: An object of an owlready2 class. :return: The HTML-representation of entity. """ cls = phenomena_extraction.get_most_specific_classes([entity]) label = "<table class=\"m-2\"><thead><tr><th>In...
579
605
# Visualizer is for debugging purposes only import logging import math import random import threading import http.server import socketserver import os import re from shapely import wkt import matplotlib.pyplot as plt import mpld3 import screeninfo import tempfile import webbrowser import owlready2 from shapely import ...
notas
Função para analisar notas e situação de varios alunos. :param n: Uma ou mais notas dos alunos (aceita varias) :param sit: Valor opcional, indicando se deve ou não adicionar a situação. :return: Dicionario com varias informações sobre a situação da turma.
# MASKED: notas function (lines 1-22) resp = notas(5, 4, 3, sit=True) print(resp)
def notas(*n, sit=False): """ Função para analisar notas e situação de varios alunos. :param n: Uma ou mais notas dos alunos (aceita varias) :param sit: Valor opcional, indicando se deve ou não adicionar a situação. :return: Dicionario com varias informações sobre a situação da turma. """ di...
1
22
def notas(*n, sit=False): """ Função para analisar notas e situação de varios alunos. :param n: Uma ou mais notas dos alunos (aceita varias) :param sit: Valor opcional, indicando se deve ou não adicionar a situação. :return: Dicionario com varias informações sobre a situação da turma. """ di...
getProperty
str getProperty(str, str) This function searches a configFile for a specific property and returns its value Args: configFile: The configuration file to open prop: The property to search for Returns: string: The property value if found or None for no value found
""" This module provides an interface for reading and writing to a HackPSU RaspberryPi Scanner config file Methods: getProperty(configFile, prop) Get a property from a config file by reading the config file until the desired property is found setProperty(configFile, prop, value) Set a property by updating the co...
def getProperty(configFile, prop): """ str getProperty(str, str) This function searches a configFile for a specific property and returns its value Args: configFile: The configuration file to open prop: The property to search for Returns: string: The property value if found or None for no value found ...
65
95
""" This module provides an interface for reading and writing to a HackPSU RaspberryPi Scanner config file Methods: getProperty(configFile, prop) Get a property from a config file by reading the config file until the desired property is found setProperty(configFile, prop, value) Set a property by updating the co...
_get_urls_for_cik
Get all urls for specific company according to CIK. Must match start date, end date, filing_type, and count parameters. Args: cik (str): CIK for company. **kwargs: Anything to be passed to requests when making get request. See keyword arguments accepted for ``secedgar.client._base.AbstractClie...
import asyncio import os import warnings from datetime import date from secedgar.cik_lookup import CIKLookup from secedgar.client import NetworkClient from secedgar.core._base import AbstractFiling from secedgar.core.filing_types import FilingType from secedgar.exceptions import FilingTypeError from secedgar.utils imp...
def _get_urls_for_cik(self, cik, **kwargs): """Get all urls for specific company according to CIK. Must match start date, end date, filing_type, and count parameters. Args: cik (str): CIK for company. **kwargs: Anything to be passed to requests when making get reque...
172
205
import asyncio import os import warnings from datetime import date from secedgar.cik_lookup import CIKLookup from secedgar.client import NetworkClient from secedgar.core._base import AbstractFiling from secedgar.core.filing_types import FilingType from secedgar.exceptions import FilingTypeError from secedgar.utils imp...
get_default_monitors
Returns a default set of typically-used monitors. Args: loss_op: `Tensor`, the loss tensor. This will be printed using `PrintTensor` at the default interval. summary_op: See `SummarySaver`. save_summary_steps: See `SummarySaver`. output_dir: See `SummarySaver`. summary_writer: See `SummarySaver`. Ret...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
def get_default_monitors(loss_op=None, summary_op=None, save_summary_steps=100, output_dir=None, summary_writer=None): """Returns a default set of typically-used monitors. Args: loss_op: `Tensor`, the loss tensor. This will be printed using `PrintTensor` at the default interval...
783
805
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
set_estimator
A setter called automatically by the target estimator. If the estimator is locked, this method does nothing. Args: estimator: the estimator that this monitor monitors. Raises: ValueError: if the estimator is None.
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
def set_estimator(self, estimator): """A setter called automatically by the target estimator. If the estimator is locked, this method does nothing. Args: estimator: the estimator that this monitor monitors. Raises: ValueError: if the estimator is None. """ if self._estimator_loc...
127
143
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
begin
Called at the beginning of training. When called, the default graph is the one we are executing. Args: max_steps: `int`, the maximum global step this training will run until. Raises: ValueError: if we've already begun a run.
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
def begin(self, max_steps=None): """Called at the beginning of training. When called, the default graph is the one we are executing. Args: max_steps: `int`, the maximum global step this training will run until. Raises: ValueError: if we've already begun a run. """ if self._begun...
153
167
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
end
Callback at the end of training/evaluation. Args: session: A `tf.Session` object that can be used to run ops. Raises: ValueError: if we've not begun a run.
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
def end(self, session=None): """Callback at the end of training/evaluation. Args: session: A `tf.Session` object that can be used to run ops. Raises: ValueError: if we've not begun a run. """ _ = session if not self._begun: raise ValueError("end called without begin.") ...
169
182
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
epoch_begin
Begin epoch. Args: epoch: `int`, the epoch number. Raises: ValueError: if we've already begun an epoch, or `epoch` < 0.
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
def epoch_begin(self, epoch): """Begin epoch. Args: epoch: `int`, the epoch number. Raises: ValueError: if we've already begun an epoch, or `epoch` < 0. """ if self._current_epoch is not None: raise ValueError("epoch_begin called twice without epoch_end.") if epoch < 0: ...
184
197
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
epoch_end
End epoch. Args: epoch: `int`, the epoch number. Raises: ValueError: if we've not begun an epoch, or `epoch` number does not match.
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
def epoch_end(self, epoch): """End epoch. Args: epoch: `int`, the epoch number. Raises: ValueError: if we've not begun an epoch, or `epoch` number does not match. """ if self._current_epoch != epoch: raise ValueError( "epoch_end expected %s but got %s.", self._current...
199
211
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
step_begin
Callback before training step begins. You may use this callback to request evaluation of additional tensors in the graph. Args: step: `int`, the current value of the global step. Returns: List of `Tensor` objects or string tensor names to be run. Raises: ValueError: if we've already begun a step, or `step` < ...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
def step_begin(self, step): """Callback before training step begins. You may use this callback to request evaluation of additional tensors in the graph. Args: step: `int`, the current value of the global step. Returns: List of `Tensor` objects or string tensor names to be run. ...
213
233
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
__init__
Initializes an `EveryN` monitor. Args: every_n_steps: `int`, the number of steps to allow between callbacks. first_n_steps: `int`, specifying the number of initial steps during which the callbacks will always be executed, regardless of the value of `every_n_steps`. Note that this value is relative to the g...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
def __init__(self, every_n_steps=100, first_n_steps=1): """Initializes an `EveryN` monitor. Args: every_n_steps: `int`, the number of steps to allow between callbacks. first_n_steps: `int`, specifying the number of initial steps during which the callbacks will always be executed, regardle...
313
329
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
step_begin
Overrides `BaseMonitor.step_begin`. When overriding this method, you must call the super implementation. Args: step: `int`, the current value of the global step. Returns: A `list`, the result of every_n_step_begin, if that was called this step, or an empty list otherwise. Raises: ValueError: if called more t...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
def step_begin(self, step): """Overrides `BaseMonitor.step_begin`. When overriding this method, you must call the super implementation. Args: step: `int`, the current value of the global step. Returns: A `list`, the result of every_n_step_begin, if that was called this step, or an ...
372
393
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
__init__
Create a StopAtStep monitor. This monitor requests stop after either a number of steps have been executed or a last step has been reached. Only of the two options can be specified. if `num_steps` is specified, it indicates the number of steps to execute after `begin()` is called. If instead `last_step` is specified...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
def __init__(self, num_steps=None, last_step=None): """Create a StopAtStep monitor. This monitor requests stop after either a number of steps have been executed or a last step has been reached. Only of the two options can be specified. if `num_steps` is specified, it indicates the number of ste...
430
455
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
__init__
Initializes a PrintTensor monitor. Args: tensor_names: `dict` of tag to tensor names or `iterable` of tensor names (strings). every_n: `int`, print every N steps. See `PrintN.` first_n: `int`, also print the first N steps. See `PrintN.`
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
def __init__(self, tensor_names, every_n=100, first_n=1): """Initializes a PrintTensor monitor. Args: tensor_names: `dict` of tag to tensor names or `iterable` of tensor names (strings). every_n: `int`, print every N steps. See `PrintN.` first_n: `int`, also print the first N step...
482
494
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
__init__
Initializes a `SummarySaver` monitor. Args: summary_op: `Tensor` of type `string`. A serialized `Summary` protocol buffer, as output by TF summary methods like `scalar_summary` or `merge_all_summaries`. save_steps: `int`, save summaries every N steps. See `EveryN`. output_dir: `string`, the directory...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
def __init__(self, summary_op, save_steps=100, output_dir=None, summary_writer=None, scaffold=None): """Initializes a `SummarySaver` monitor. Args: summary_op: `Tensor` of type `string`. A serialized `Summary` protocol ...
553
578
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
__init__
Initializes a ValidationMonitor. Args: x: See `BaseEstimator.evaluate`. y: See `BaseEstimator.evaluate`. input_fn: See `BaseEstimator.evaluate`. batch_size: See `BaseEstimator.evaluate`. eval_steps: See `BaseEstimator.evaluate`. every_n_steps: Check for new checkpoints to evaluate every N steps. If a ...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
def __init__(self, x=None, y=None, input_fn=None, batch_size=None, eval_steps=None, every_n_steps=100, metrics=None, early_stopping_rounds=None, early_stopping_metric="loss", early_stopping_metric_minimize=True, name=None): """Initializes a ValidationMon...
619
671
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
__init__
Initializes a CaptureVariable monitor. Args: var_name: `string`. The variable name, including suffix (typically ":0"). every_n: `int`, print every N steps. See `PrintN.` first_n: `int`, also print the first N steps. See `PrintN.`
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
def __init__(self, var_name, every_n=100, first_n=1): """Initializes a CaptureVariable monitor. Args: var_name: `string`. The variable name, including suffix (typically ":0"). every_n: `int`, print every N steps. See `PrintN.` first_n: `int`, also print the first N steps. See `PrintN.` ...
752
762
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
__init__
Initializes GraphDump monitor. Args: ignore_ops: `list` of `string`. Names of ops to ignore. If None, `GraphDump.IGNORE_OPS` is used.
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
def __init__(self, ignore_ops=None): """Initializes GraphDump monitor. Args: ignore_ops: `list` of `string`. Names of ops to ignore. If None, `GraphDump.IGNORE_OPS` is used. """ super(GraphDump, self).__init__() self._ignore_ops = ignore_ops or GraphDump.IGNORE_OPS self._data ...
817
826
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
__init__
Initialize CheckpointSaver monitor. Args: checkpoint_dir: `str`, base directory for the checkpoint files. save_secs: `int`, save every N secs. save_steps: `int`, save every N steps. saver: `Saver` object, used for saving. checkpoint_basename: `str`, base name for the checkpoint files. scaffold: `Scaffold`,...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
def __init__(self, checkpoint_dir, save_secs=None, save_steps=None, saver=None, checkpoint_basename="model.ckpt", scaffold=None): """Initialize CheckpointSaver monitor. Args: checkpoint_dir: `str`, base directory ...
1,022
1,058
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
__init__
Initializes NanLoss monitor. Args: loss_tensor: `Tensor`, the loss tensor. every_n_steps: `int`, run check every this many steps. fail_on_nan_loss: `bool`, whether to raise exception when loss is NaN.
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
def __init__(self, loss_tensor, every_n_steps=100, fail_on_nan_loss=True): """Initializes NanLoss monitor. Args: loss_tensor: `Tensor`, the loss tensor. every_n_steps: `int`, run check every this many steps. fail_on_nan_loss: `bool`, whether to raise exception when loss is NaN. """ ...
1,148
1,158
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
load_collada
Load a COLLADA (.dae) file into a list of trimesh kwargs. Parameters ---------- file_obj : file object Containing a COLLADA file resolver : trimesh.visual.Resolver or None For loading referenced files, like texture images kwargs : ** Passed to trimesh.Trimesh.__init__ Returns ------- loaded : list of dict kwa...
import io import copy import uuid import numpy as np try: # pip install pycollada import collada except BaseException: collada = None try: import PIL.Image except ImportError: pass from .. import util from .. import visual from ..constants import log # MASKED: load_collada function (lines 24-...
def load_collada(file_obj, resolver=None, **kwargs): """ Load a COLLADA (.dae) file into a list of trimesh kwargs. Parameters ---------- file_obj : file object Containing a COLLADA file resolver : trimesh.visual.Resolver or None For loading referenced files, like texture images ...
24
68
import io import copy import uuid import numpy as np try: # pip install pycollada import collada except BaseException: collada = None try: import PIL.Image except ImportError: pass from .. import util from .. import visual from ..constants import log def load_collada(file_obj, resolver=None, ...
load_zae
Load a ZAE file, which is just a zipped DAE file. Parameters ------------- file_obj : file object Contains ZAE data resolver : trimesh.visual.Resolver Resolver to load additional assets kwargs : dict Passed to load_collada Returns ------------ loaded : dict Results of loading
import io import copy import uuid import numpy as np try: # pip install pycollada import collada except BaseException: collada = None try: import PIL.Image except ImportError: pass from .. import util from .. import visual from ..constants import log def load_collada(file_obj, resolver=None, ...
def load_zae(file_obj, resolver=None, **kwargs): """ Load a ZAE file, which is just a zipped DAE file. Parameters ------------- file_obj : file object Contains ZAE data resolver : trimesh.visual.Resolver Resolver to load additional assets kwargs : dict Passed to load_colla...
367
401
import io import copy import uuid import numpy as np try: # pip install pycollada import collada except BaseException: collada = None try: import PIL.Image except ImportError: pass from .. import util from .. import visual from ..constants import log def load_collada(file_obj, resolver=None, ...
fpredict
--------------------------------------------------------------------------- Computes the prediction. Parameters ---------- L: list List containing the data. It must be a two-dimensional list containing multiple rows. Each row must include as first element the ordered predictor and as nth elements the nth ...
# (c) Copyright [2018-2021] Micro Focus or one of its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # You may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
def fpredict(self, L: list): """ --------------------------------------------------------------------------- Computes the prediction. Parameters ---------- L: list List containing the data. It must be a two-dimensional list containing multiple rows. Each row must includ...
201
312
# (c) Copyright [2018-2021] Micro Focus or one of its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # You may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
test_arraystringreader
here is my test code https://docs.pytest.org/en/stable/getting-started.html#create-your-first-test
import numpy as np from .. import ArrayStringReader # MASKED: test_arraystringreader function (lines 6-19)
def test_arraystringreader(): """here is my test code https://docs.pytest.org/en/stable/getting-started.html#create-your-first-test """ size = 8 sample_array = np.random.rand(size).astype('float32') text = ','.join([str(x) for x in sample_array]) reader = ArrayStringReader() crafted_do...
6
19
import numpy as np from .. import ArrayStringReader def test_arraystringreader(): """here is my test code https://docs.pytest.org/en/stable/getting-started.html#create-your-first-test """ size = 8 sample_array = np.random.rand(size).astype('float32') text = ','.join([str(x) for x in sample_a...
decode_hypothesis
Decode a list of hypotheses into a list of strings. Args: hypotheses_list: List of Hypothesis. Returns: A list of strings.
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
def decode_hypothesis(self, hypotheses_list: List[Hypothesis]) -> List[Union[Hypothesis, NBestHypotheses]]: """ Decode a list of hypotheses into a list of strings. Args: hypotheses_list: List of Hypothesis. Returns: A list of strings. """ for...
198
225
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
__init__
construct me with the given msg and profile active flag Args: msg(str): the message to show if profiling is active profile(bool): True if messages should be shown
''' Created on 2021-08-19 @author: wf ''' from unittest import TestCase import time import getpass import os class BaseTest(TestCase): ''' base test case ''' def setUp(self,debug=False,profile=True): ''' setUp test environment ''' TestCase.setUp(self) self....
def __init__(self,msg,profile=True): ''' construct me with the given msg and profile active flag Args: msg(str): the message to show if profiling is active profile(bool): True if messages should be shown ''' self.msg=msg self.profile=p...
43
55
''' Created on 2021-08-19 @author: wf ''' from unittest import TestCase import time import getpass import os class BaseTest(TestCase): ''' base test case ''' def setUp(self,debug=False,profile=True): ''' setUp test environment ''' TestCase.setUp(self) self....
testFileProxy
[summary] Args: filename ([type]): [description] fs_out (int, optional): [description]. Defaults to 999.
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def testFileProxy(filename,fs_out=999): """[summary] Args: filename ([type]): [description] fs_out (int, optional): [description]. Defaults to 999. """ from mindaffectBCI.decoder.FileProxyHub import FileProxyHub U = FileProxyHub(filename) from sigViewer import sigViewer ...
1,285
1,301
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
testFileProxy2
[summary] Args: filename ([type]): [description]
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def testFileProxy2(filename): """[summary] Args: filename ([type]): [description] """ from mindaffectBCI.decoder.FileProxyHub import FileProxyHub U = FileProxyHub(filename) fs = 200 fs_out = 200 # test with a filter + downsampler ppfn= butterfilt_and_downsample(order=4, ...
1,303
1,341
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
testElectrodeQualities
[summary] Args: X ([type]): [description] fs (int, optional): [description]. Defaults to 200. pktsize (int, optional): [description]. Defaults to 20. Returns: [type]: [description]
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def testElectrodeQualities(X,fs=200,pktsize=20): """[summary] Args: X ([type]): [description] fs (int, optional): [description]. Defaults to 200. pktsize (int, optional): [description]. Defaults to 20. Returns: [type]: [description] """ # recurse if more dims th...
1,350
1,379
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
connect
[make a connection to the utopia host] Args: host ([type], optional): [description]. Defaults to None. port (int, optional): [description]. Defaults to -1. queryifhostnotfound (bool, optional): [description]. Defaults to True. Returns: [type]: [description]
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def connect(self, host=None, port=-1, queryifhostnotfound=True): """[make a connection to the utopia host] Args: host ([type], optional): [description]. Defaults to None. port (int, optional): [description]. Defaults to -1. queryifhostnotfound (bool, optional): [...
92
112
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
initDataRingBuffer
[initialize the data ring buffer, by getting some seed messages and datapackets to get the data sizes etc.] Returns: [type]: [description]
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def initDataRingBuffer(self): """[initialize the data ring buffer, by getting some seed messages and datapackets to get the data sizes etc.] Returns: [type]: [description] """ print("geting some initial data to setup the ring buffer") # get some ...
153
227
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
add_sample_timestamps
add per-sample timestamp information to the data matrix Args: d (np.ndarray): (t,d) the data matrix to attach time stamps to timestamp (float): the timestamp of the last sample of d fs (float): the nomional sample rate of d Returns: np.ndarray: (t,d+1) data matrix with attached time-stamp channel
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def add_sample_timestamps(self,d:np.ndarray,timestamp:float,fs:float): """add per-sample timestamp information to the data matrix Args: d (np.ndarray): (t,d) the data matrix to attach time stamps to timestamp (float): the timestamp of the last sample of d fs (flo...
290
307
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
plot_raw_preproc_data
[debugging function to check the diff between the raw and pre-processed data] Args: d_raw ([type]): [description] d_preproc ([type]): [description] ts ([type]): [description]
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def plot_raw_preproc_data(self, d_raw, d_preproc, ts): """[debugging function to check the diff between the raw and pre-processed data] Args: d_raw ([type]): [description] d_preproc ([type]): [description] ts ([type]): [description] """ ...
309
332
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
update_and_send_ElectrodeQualities
[compute running estimate of electrode qality and stream it] Args: d_raw (np.ndarray): [description] d_preproc (np.ndarray): [description] ts (int): [description]
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def update_and_send_ElectrodeQualities(self, d_raw: np.ndarray, d_preproc: np.ndarray, ts: int): """[compute running estimate of electrode qality and stream it] Args: d_raw (np.ndarray): [description] d_preproc (np.ndarray): [description] ts (int): [description] ...
363
411
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
update_electrode_powers
[track exp-weighted-moving average centered power for 2 input streams] Args: d_raw (np.ndarray): [description] d_preproc (np.ndarray): [description] Returns: [type]: [description]
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def update_electrode_powers(self, d_raw: np.ndarray, d_preproc:np.ndarray): """[track exp-weighted-moving average centered power for 2 input streams] Args: d_raw (np.ndarray): [description] d_preproc (np.ndarray): [description] Returns: [type]: [descript...
413
430
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
extract_msgs_segment
[extract the messages between start/end time stamps] Args: bgn_ts ([type]): [description] end_ts ([type], optional): [description]. Defaults to None. Returns: [type]: [description]
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def extract_msgs_segment(self, bgn_ts, end_ts=None): """[extract the messages between start/end time stamps] Args: bgn_ts ([type]): [description] end_ts ([type], optional): [description]. Defaults to None. Returns: [type]: [description] """ ...
577
597
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
run
[test run the interface forever, just getting and storing data] Args: timeout_ms (int, optional): [description]. Defaults to 30000.
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def run(self, timeout_ms=30000): """[test run the interface forever, just getting and storing data] Args: timeout_ms (int, optional): [description]. Defaults to 30000. """ t0 = self.getTimeStamp() # test getting 5s data tstart = self.data...
599
621
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
fit
[summary] Args: X ([type]): [description] fs (float, optional): [description]. Defaults to None. zi ([type], optional): [description]. Defaults to None. Returns: [type]: [description]
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def fit(self, X, fs:float =None, zi=None): """[summary] Args: X ([type]): [description] fs (float, optional): [description]. Defaults to None. zi ([type], optional): [description]. Defaults to None. Returns: [type]: [description] """ ...
663
704
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
transform
[summary] Args: X ([type]): [description] Y ([type], optional): [description]. Defaults to None. Returns: [type]: [description]
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def transform(self, X, Y=None): """[summary] Args: X ([type]): [description] Y ([type], optional): [description]. Defaults to None. Returns: [type]: [description] """ # propogate the filter coefficients between calls if no...
706
754
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
transform
[transform Stimulus-encoded to brain-encoded] Args: X ([type]): [description] Returns: [type]: [description]
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def transform(self, X): """[transform Stimulus-encoded to brain-encoded] Args: X ([type]): [description] Returns: [type]: [description] """ if X is None: return None # keep old fitler state for the later ...
826
856
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
fit
[summary] Args: X ([type]): [description] Returns: [type]: [description]
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def fit(self,X): """[summary] Args: X ([type]): [description] Returns: [type]: [description] """ self.sX_N = X.shape[0] if self.car and X.shape[-1]>4: X = X.copy() - np.mean(X,-1,keepdims=True) self.sX = np.sum(X,a...
921
936
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
transform
[compute the exponientially weighted centered power of X] Args: X (np.ndarray): [description] Returns: [type]: [description]
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def transform(self, X: np.ndarray): """[compute the exponientially weighted centered power of X] Args: X (np.ndarray): [description] Returns: [type]: [description] """ if self.sX is None: # not fitted yet! return self.fit...
938
963
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
transform
add per-sample timestamp information to the data matrix Args: timestamp (float): the timestamp of the last sample of d nsamp(int): number of samples to interpolate Returns: np.ndarray: (nsamp) the interpolated time-stamps
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def transform(self,timestamp:float,nsamp:int=1): """add per-sample timestamp information to the data matrix Args: timestamp (float): the timestamp of the last sample of d nsamp(int): number of samples to interpolate Returns: np.ndarray: (nsamp) the inter...
1,043
1,083
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
testcase
[summary] Args: npkt (int, optional): [description]. Defaults to 1000. fs (int, optional): [description]. Defaults to 100.
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def testcase(self, npkt=1000, fs=100): """[summary] Args: npkt (int, optional): [description]. Defaults to 1000. fs (int, optional): [description]. Defaults to 100. """ # generate random packet sizes nsamp = np.random.random_integers(0,10,size...
1,085
1,111
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
transform
add per-sample timestamp information to the data matrix Args: X (float): the data to decorrelate nsamp(int): number of samples to interpolate Returns: np.ndarray: the decorrelated data
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def transform(self,X): """add per-sample timestamp information to the data matrix Args: X (float): the data to decorrelate nsamp(int): number of samples to interpolate Returns: np.ndarray: the decorrelated data """ if not hasattr(self,'W_...
1,138
1,153
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
testcase
[summary] Args: dur (int, optional): [description]. Defaults to 3. fs (int, optional): [description]. Defaults to 100. blksize (int, optional): [description]. Defaults to 10.
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def testcase(self, dur=3, fs=100, blksize=10): """[summary] Args: dur (int, optional): [description]. Defaults to 3. fs (int, optional): [description]. Defaults to 100. blksize (int, optional): [description]. Defaults to 10. """ import num...
1,155
1,188
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
transform
add per-sample timestamp information to the data matrix Args: X (float): the data to decorrelate Returns: np.ndarray: the decorrelated data
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def transform(self,X): """add per-sample timestamp information to the data matrix Args: X (float): the data to decorrelate Returns: np.ndarray: the decorrelated data """ if not hasattr(self,'sigma2_'): self.fit(X) X, self.W_ = st...
1,214
1,228
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
testcase
[summary] Args: dur (int, optional): [description]. Defaults to 3. fs (int, optional): [description]. Defaults to 100. blksize (int, optional): [description]. Defaults to 10.
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def testcase(self, dur=3, fs=100, blksize=10): """[summary] Args: dur (int, optional): [description]. Defaults to 3. fs (int, optional): [description]. Defaults to 100. blksize (int, optional): [description]. Defaults to 10. """ import num...
1,230
1,263
#!/usr/bin/env python3 # Copyright (c) 2019 MindAffect B.V. # Author: Jason Farquhar <jason@mindaffect.nl> # This file is part of pymindaffectBCI <https://github.com/mindaffect/pymindaffectBCI>. # # pymindaffectBCI is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
_get_slice_len
Get the number of elements in a slice. Parameters ---------- idx : np.ndarray A (3,) shaped array containing start, stop, step Returns ------- n : int The length of the slice. Examples -------- >>> idx = np.array([5, 15, 5]) >>> _get_slice_len(idx) 2
#pythran export compute_mask(int[:,:], int[:,:]) #runas import numpy as np; coords = np.array([[0, 0, 1, 1, 2, 2]]); indices = np.array([[0, 3, 2]]); compute_mask(coords, indices) import numpy as np def compute_mask(coords, indices): # pragma: no cover """ Gets the mask for the coords given the indices in sli...
def _get_slice_len(idx): """ Get the number of elements in a slice. Parameters ---------- idx : np.ndarray A (3,) shaped array containing start, stop, step Returns ------- n : int The length of the slice. Examples -------- >>> idx = np.array([5, 15, 5]) ...
100
125
#pythran export compute_mask(int[:,:], int[:,:]) #runas import numpy as np; coords = np.array([[0, 0, 1, 1, 2, 2]]); indices = np.array([[0, 3, 2]]); compute_mask(coords, indices) import numpy as np def compute_mask(coords, indices): # pragma: no cover """ Gets the mask for the coords given the indices in sli...
_filter_pairs
Converts all the pairs into a single integer mask, additionally filtering by the indices. Parameters ---------- starts, stops : list[int] The starts and stops to convert into an array. coords : np.ndarray The coordinates to filter by. indices : np.ndarray The indices in the form of slices such that indices...
#pythran export compute_mask(int[:,:], int[:,:]) #runas import numpy as np; coords = np.array([[0, 0, 1, 1, 2, 2]]); indices = np.array([[0, 3, 2]]); compute_mask(coords, indices) import numpy as np def compute_mask(coords, indices): # pragma: no cover """ Gets the mask for the coords given the indices in sli...
def _filter_pairs(starts, stops, coords, indices): # pragma: no cover """ Converts all the pairs into a single integer mask, additionally filtering by the indices. Parameters ---------- starts, stops : list[int] The starts and stops to convert into an array. coords : np.ndarray ...
221
272
#pythran export compute_mask(int[:,:], int[:,:]) #runas import numpy as np; coords = np.array([[0, 0, 1, 1, 2, 2]]); indices = np.array([[0, 3, 2]]); compute_mask(coords, indices) import numpy as np def compute_mask(coords, indices): # pragma: no cover """ Gets the mask for the coords given the indices in sli...
collect_annotations
Collect the annotation information. Args: files (list): The list of tuples (image_file, groundtruth_file) nproc (int): The number of process to collect annotations Returns: images (list): The list of image information dicts
# Copyright (c) OpenMMLab. All rights reserved. import argparse import math import os import os.path as osp import mmcv from mmocr.utils import convert_annotations def collect_files(img_dir, gt_dir): """Collect all images and their corresponding groundtruth files. Args: img_dir (str): The image dir...
def collect_annotations(files, nproc=1): """Collect the annotation information. Args: files (list): The list of tuples (image_file, groundtruth_file) nproc (int): The number of process to collect annotations Returns: images (list): The list of image information dicts """ as...
39
58
# Copyright (c) OpenMMLab. All rights reserved. import argparse import math import os import os.path as osp import mmcv from mmocr.utils import convert_annotations def collect_files(img_dir, gt_dir): """Collect all images and their corresponding groundtruth files. Args: img_dir (str): The image dir...
load_img_info
Load the information of one image. Args: files (tuple): The tuple of (img_file, groundtruth_file) Returns: img_info (dict): The dict of the img and annotation information
# Copyright (c) OpenMMLab. All rights reserved. import argparse import math import os import os.path as osp import mmcv from mmocr.utils import convert_annotations def collect_files(img_dir, gt_dir): """Collect all images and their corresponding groundtruth files. Args: img_dir (str): The image dir...
def load_img_info(files): """Load the information of one image. Args: files (tuple): The tuple of (img_file, groundtruth_file) Returns: img_info (dict): The dict of the img and annotation information """ assert isinstance(files, tuple) img_file, gt_file = files assert osp....
61
89
# Copyright (c) OpenMMLab. All rights reserved. import argparse import math import os import os.path as osp import mmcv from mmocr.utils import convert_annotations def collect_files(img_dir, gt_dir): """Collect all images and their corresponding groundtruth files. Args: img_dir (str): The image dir...
get_x_coordinate
Given the width of the canvas and the index of the current year in the YEARS list, returns the x coordinate of the vertical line associated with that year. Input: width (int): The width of the canvas year_index (int): The index of the current year in the YEARS list Returns: x_coordinate (int): The x coordi...
""" SC101 Baby Names Project Adapted from Nick Parlante's Baby Names assignment by Jerry Liao. YOUR DESCRIPTION HERE """ import tkinter import babynames import babygraphicsgui as gui FILENAMES = [ 'data/full/baby-1900.txt', 'data/full/baby-1910.txt', 'data/full/baby-1920.txt', 'data/full/baby-1930.txt', ...
def get_x_coordinate(width, year_index): """ Given the width of the canvas and the index of the current year in the YEARS list, returns the x coordinate of the vertical line associated with that year. Input: width (int): The width of the canvas year_index (int): The index of the cur...
31
46
""" SC101 Baby Names Project Adapted from Nick Parlante's Baby Names assignment by Jerry Liao. YOUR DESCRIPTION HERE """ import tkinter import babynames import babygraphicsgui as gui FILENAMES = [ 'data/full/baby-1900.txt', 'data/full/baby-1910.txt', 'data/full/baby-1920.txt', 'data/full/baby-1930.txt', ...
draw_fixed_lines
Erases all existing information on the given canvas and then draws the fixed background lines on it. Input: canvas (Tkinter Canvas): The canvas on which we are drawing. Returns: This function does not return any value.
""" SC101 Baby Names Project Adapted from Nick Parlante's Baby Names assignment by Jerry Liao. YOUR DESCRIPTION HERE """ import tkinter import babynames import babygraphicsgui as gui FILENAMES = [ 'data/full/baby-1900.txt', 'data/full/baby-1910.txt', 'data/full/baby-1920.txt', 'data/full/baby-1930.txt', ...
def draw_fixed_lines(canvas): """ Erases all existing information on the given canvas and then draws the fixed background lines on it. Input: canvas (Tkinter Canvas): The canvas on which we are drawing. Returns: This function does not return any value. """ canvas.delete('al...
49
76
""" SC101 Baby Names Project Adapted from Nick Parlante's Baby Names assignment by Jerry Liao. YOUR DESCRIPTION HERE """ import tkinter import babynames import babygraphicsgui as gui FILENAMES = [ 'data/full/baby-1900.txt', 'data/full/baby-1910.txt', 'data/full/baby-1920.txt', 'data/full/baby-1930.txt', ...
draw_names
Given a dict of baby name data and a list of name, plots the historical trend of those names onto the canvas. Input: canvas (Tkinter Canvas): The canvas on which we are drawing. name_data (dict): Dictionary holding baby name data lookup_names (List[str]): A list of names whose data you want to plot Return...
""" SC101 Baby Names Project Adapted from Nick Parlante's Baby Names assignment by Jerry Liao. YOUR DESCRIPTION HERE """ import tkinter import babynames import babygraphicsgui as gui FILENAMES = [ 'data/full/baby-1900.txt', 'data/full/baby-1910.txt', 'data/full/baby-1920.txt', 'data/full/baby-1930.txt', ...
def draw_names(canvas, name_data, lookup_names): """ Given a dict of baby name data and a list of name, plots the historical trend of those names onto the canvas. Input: canvas (Tkinter Canvas): The canvas on which we are drawing. name_data (dict): Dictionary holding baby name data ...
79
125
""" SC101 Baby Names Project Adapted from Nick Parlante's Baby Names assignment by Jerry Liao. YOUR DESCRIPTION HERE """ import tkinter import babynames import babygraphicsgui as gui FILENAMES = [ 'data/full/baby-1900.txt', 'data/full/baby-1910.txt', 'data/full/baby-1920.txt', 'data/full/baby-1930.txt', ...
nick
Change an entity's nick name in a MUC room. See: http://xmpp.org/extensions/xep-0045.html#changenick @param roomJID: The JID of the room. @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} @param nick: The new nick name within the room. @type nick: C{unicode}
# -*- test-case-name: wokkel.test.test_muc -*- # # Copyright (c) Ralph Meijer. # See LICENSE for details. """ XMPP Multi-User Chat protocol. This protocol is specified in U{XEP-0045<http://xmpp.org/extensions/xep-0045.html>}. """ from dateutil.tz import tzutc from zope.interface import implements from twisted.inter...
def nick(self, roomJID, nick): """ Change an entity's nick name in a MUC room. See: http://xmpp.org/extensions/xep-0045.html#changenick @param roomJID: The JID of the room. @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} @param nick: The new nick name...
617
631
# -*- test-case-name: wokkel.test.test_muc -*- # # Copyright (c) Ralph Meijer. # See LICENSE for details. """ XMPP Multi-User Chat protocol. This protocol is specified in U{XEP-0045<http://xmpp.org/extensions/xep-0045.html>}. """ from dateutil.tz import tzutc from zope.interface import implements from twisted.inter...
status
Change user status. See: http://xmpp.org/extensions/xep-0045.html#changepres @param roomJID: The Room JID of the room. @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} @param show: The availability of the entity. Common values are xa, available, etc @type show: C{unicode} @param status: The current...
# -*- test-case-name: wokkel.test.test_muc -*- # # Copyright (c) Ralph Meijer. # See LICENSE for details. """ XMPP Multi-User Chat protocol. This protocol is specified in U{XEP-0045<http://xmpp.org/extensions/xep-0045.html>}. """ from dateutil.tz import tzutc from zope.interface import implements from twisted.inter...
def status(self, roomJID, show=None, status=None): """ Change user status. See: http://xmpp.org/extensions/xep-0045.html#changepres @param roomJID: The Room JID of the room. @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} @param show: The availability...
634
653
# -*- test-case-name: wokkel.test.test_muc -*- # # Copyright (c) Ralph Meijer. # See LICENSE for details. """ XMPP Multi-User Chat protocol. This protocol is specified in U{XEP-0045<http://xmpp.org/extensions/xep-0045.html>}. """ from dateutil.tz import tzutc from zope.interface import implements from twisted.inter...
leave
Leave a MUC room. See: http://xmpp.org/extensions/xep-0045.html#exit @param roomJID: The JID of the room. @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}
# -*- test-case-name: wokkel.test.test_muc -*- # # Copyright (c) Ralph Meijer. # See LICENSE for details. """ XMPP Multi-User Chat protocol. This protocol is specified in U{XEP-0045<http://xmpp.org/extensions/xep-0045.html>}. """ from dateutil.tz import tzutc from zope.interface import implements from twisted.inter...
def leave(self, roomJID): """ Leave a MUC room. See: http://xmpp.org/extensions/xep-0045.html#exit @param roomJID: The JID of the room. @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} """ occupantJID = self._roomOccupantMap[roomJID] pre...
656
669
# -*- test-case-name: wokkel.test.test_muc -*- # # Copyright (c) Ralph Meijer. # See LICENSE for details. """ XMPP Multi-User Chat protocol. This protocol is specified in U{XEP-0045<http://xmpp.org/extensions/xep-0045.html>}. """ from dateutil.tz import tzutc from zope.interface import implements from twisted.inter...
getRegisterForm
Grab the registration form for a MUC room. @param room: The room jabber/xmpp entity id for the requested registration form. @type room: L{JID<twisted.words.protocols.jabber.jid.JID>}
# -*- test-case-name: wokkel.test.test_muc -*- # # Copyright (c) Ralph Meijer. # See LICENSE for details. """ XMPP Multi-User Chat protocol. This protocol is specified in U{XEP-0045<http://xmpp.org/extensions/xep-0045.html>}. """ from dateutil.tz import tzutc from zope.interface import implements from twisted.inter...
def getRegisterForm(self, roomJID): """ Grab the registration form for a MUC room. @param room: The room jabber/xmpp entity id for the requested registration form. @type room: L{JID<twisted.words.protocols.jabber.jid.JID>} """ def cb(response): ...
729
744
# -*- test-case-name: wokkel.test.test_muc -*- # # Copyright (c) Ralph Meijer. # See LICENSE for details. """ XMPP Multi-User Chat protocol. This protocol is specified in U{XEP-0045<http://xmpp.org/extensions/xep-0045.html>}. """ from dateutil.tz import tzutc from zope.interface import implements from twisted.inter...
register
Send a request to register for a room. @param roomJID: The bare JID of the room. @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} @param options: A mapping of field names to values, or C{None} to cancel. @type options: C{dict}
# -*- test-case-name: wokkel.test.test_muc -*- # # Copyright (c) Ralph Meijer. # See LICENSE for details. """ XMPP Multi-User Chat protocol. This protocol is specified in U{XEP-0045<http://xmpp.org/extensions/xep-0045.html>}. """ from dateutil.tz import tzutc from zope.interface import implements from twisted.inter...
def register(self, roomJID, options): """ Send a request to register for a room. @param roomJID: The bare JID of the room. @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} @param options: A mapping of field names to values, or C{None} to cancel. ...
747
761
# -*- test-case-name: wokkel.test.test_muc -*- # # Copyright (c) Ralph Meijer. # See LICENSE for details. """ XMPP Multi-User Chat protocol. This protocol is specified in U{XEP-0045<http://xmpp.org/extensions/xep-0045.html>}. """ from dateutil.tz import tzutc from zope.interface import implements from twisted.inter...
configure
Configure a room. @param roomJID: The room to configure. @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} @param options: A mapping of field names to values, or C{None} to cancel. @type options: C{dict}
# -*- test-case-name: wokkel.test.test_muc -*- # # Copyright (c) Ralph Meijer. # See LICENSE for details. """ XMPP Multi-User Chat protocol. This protocol is specified in U{XEP-0045<http://xmpp.org/extensions/xep-0045.html>}. """ from dateutil.tz import tzutc from zope.interface import implements from twisted.inter...
def configure(self, roomJID, options): """ Configure a room. @param roomJID: The room to configure. @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} @param options: A mapping of field names to values, or C{None} to cancel. @type options: C{d...
834
848
# -*- test-case-name: wokkel.test.test_muc -*- # # Copyright (c) Ralph Meijer. # See LICENSE for details. """ XMPP Multi-User Chat protocol. This protocol is specified in U{XEP-0045<http://xmpp.org/extensions/xep-0045.html>}. """ from dateutil.tz import tzutc from zope.interface import implements from twisted.inter...
modifyAffiliationList
Modify an affiliation list. @param roomJID: The bare JID of the room. @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} @param entities: The list of entities to change for a room. @type entities: C{list} of L{JID<twisted.words.protocols.jabber.jid.JID>} @param affiliation: The affilation to the entit...
# -*- test-case-name: wokkel.test.test_muc -*- # # Copyright (c) Ralph Meijer. # See LICENSE for details. """ XMPP Multi-User Chat protocol. This protocol is specified in U{XEP-0045<http://xmpp.org/extensions/xep-0045.html>}. """ from dateutil.tz import tzutc from zope.interface import implements from twisted.inter...
def modifyAffiliationList(self, roomJID, entities, affiliation, sender=None): """ Modify an affiliation list. @param roomJID: The bare JID of the room. @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} @param entities: The lis...
956
980
# -*- test-case-name: wokkel.test.test_muc -*- # # Copyright (c) Ralph Meijer. # See LICENSE for details. """ XMPP Multi-User Chat protocol. This protocol is specified in U{XEP-0045<http://xmpp.org/extensions/xep-0045.html>}. """ from dateutil.tz import tzutc from zope.interface import implements from twisted.inter...