partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
train
ShExEvaluator.schema
Set the schema to be used. Schema can either be a ShExC or ShExJ string or a pre-parsed schema. :param shex: Schema
pyshex/shex_evaluator.py
def schema(self, shex: Optional[Union[str, ShExJ.Schema]]) -> None: """ Set the schema to be used. Schema can either be a ShExC or ShExJ string or a pre-parsed schema. :param shex: Schema """ self.pfx = None if shex is not None: if isinstance(shex, ShExJ.Schema): ...
def schema(self, shex: Optional[Union[str, ShExJ.Schema]]) -> None: """ Set the schema to be used. Schema can either be a ShExC or ShExJ string or a pre-parsed schema. :param shex: Schema """ self.pfx = None if shex is not None: if isinstance(shex, ShExJ.Schema): ...
[ "Set", "the", "schema", "to", "be", "used", ".", "Schema", "can", "either", "be", "a", "ShExC", "or", "ShExJ", "string", "or", "a", "pre", "-", "parsed", "schema", "." ]
hsolbrig/PyShEx
python
https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shex_evaluator.py#L134-L152
[ "def", "schema", "(", "self", ",", "shex", ":", "Optional", "[", "Union", "[", "str", ",", "ShExJ", ".", "Schema", "]", "]", ")", "->", "None", ":", "self", ".", "pfx", "=", "None", "if", "shex", "is", "not", "None", ":", "if", "isinstance", "(",...
9d659cc36e808afd66d4a6d60e8ea21cb12eb744
train
ShExEvaluator.focus
Set the focus node(s). If no focus node is specified, the evaluation will occur for all non-BNode graph subjects. Otherwise it can be a string, a URIRef or a list of string/URIRef combinations :param focus: None if focus should be all URIRefs in the graph otherwise a URI or list of URI's
pyshex/shex_evaluator.py
def focus(self, focus: Optional[URIPARM]) -> None: """ Set the focus node(s). If no focus node is specified, the evaluation will occur for all non-BNode graph subjects. Otherwise it can be a string, a URIRef or a list of string/URIRef combinations :param focus: None if focus should be all URI...
def focus(self, focus: Optional[URIPARM]) -> None: """ Set the focus node(s). If no focus node is specified, the evaluation will occur for all non-BNode graph subjects. Otherwise it can be a string, a URIRef or a list of string/URIRef combinations :param focus: None if focus should be all URI...
[ "Set", "the", "focus", "node", "(", "s", ")", ".", "If", "no", "focus", "node", "is", "specified", "the", "evaluation", "will", "occur", "for", "all", "non", "-", "BNode", "graph", "subjects", ".", "Otherwise", "it", "can", "be", "a", "string", "a", ...
hsolbrig/PyShEx
python
https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shex_evaluator.py#L170-L176
[ "def", "focus", "(", "self", ",", "focus", ":", "Optional", "[", "URIPARM", "]", ")", "->", "None", ":", "self", ".", "_focus", "=", "normalize_uriparm", "(", "focus", ")", "if", "focus", "else", "None" ]
9d659cc36e808afd66d4a6d60e8ea21cb12eb744
train
arcsOut
arcsOut(G, n) is the set of triples in a graph G with subject n.
pyshex/shape_expressions_language/p3_terminology.py
def arcsOut(G: Graph, n: Node) -> RDFGraph: """ arcsOut(G, n) is the set of triples in a graph G with subject n. """ return RDFGraph(G.triples((n, None, None)))
def arcsOut(G: Graph, n: Node) -> RDFGraph: """ arcsOut(G, n) is the set of triples in a graph G with subject n. """ return RDFGraph(G.triples((n, None, None)))
[ "arcsOut", "(", "G", "n", ")", "is", "the", "set", "of", "triples", "in", "a", "graph", "G", "with", "subject", "n", "." ]
hsolbrig/PyShEx
python
https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p3_terminology.py#L18-L20
[ "def", "arcsOut", "(", "G", ":", "Graph", ",", "n", ":", "Node", ")", "->", "RDFGraph", ":", "return", "RDFGraph", "(", "G", ".", "triples", "(", "(", "n", ",", "None", ",", "None", ")", ")", ")" ]
9d659cc36e808afd66d4a6d60e8ea21cb12eb744
train
predicatesOut
predicatesOut(G, n) is the set of predicates in arcsOut(G, n).
pyshex/shape_expressions_language/p3_terminology.py
def predicatesOut(G: Graph, n: Node) -> Set[TriplePredicate]: """ predicatesOut(G, n) is the set of predicates in arcsOut(G, n). """ return {p for p, _ in G.predicate_objects(n)}
def predicatesOut(G: Graph, n: Node) -> Set[TriplePredicate]: """ predicatesOut(G, n) is the set of predicates in arcsOut(G, n). """ return {p for p, _ in G.predicate_objects(n)}
[ "predicatesOut", "(", "G", "n", ")", "is", "the", "set", "of", "predicates", "in", "arcsOut", "(", "G", "n", ")", "." ]
hsolbrig/PyShEx
python
https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p3_terminology.py#L23-L25
[ "def", "predicatesOut", "(", "G", ":", "Graph", ",", "n", ":", "Node", ")", "->", "Set", "[", "TriplePredicate", "]", ":", "return", "{", "p", "for", "p", ",", "_", "in", "G", ".", "predicate_objects", "(", "n", ")", "}" ]
9d659cc36e808afd66d4a6d60e8ea21cb12eb744
train
arcsIn
arcsIn(G, n) is the set of triples in a graph G with object n.
pyshex/shape_expressions_language/p3_terminology.py
def arcsIn(G: Graph, n: Node) -> RDFGraph: """ arcsIn(G, n) is the set of triples in a graph G with object n. """ return RDFGraph(G.triples((None, None, n)))
def arcsIn(G: Graph, n: Node) -> RDFGraph: """ arcsIn(G, n) is the set of triples in a graph G with object n. """ return RDFGraph(G.triples((None, None, n)))
[ "arcsIn", "(", "G", "n", ")", "is", "the", "set", "of", "triples", "in", "a", "graph", "G", "with", "object", "n", "." ]
hsolbrig/PyShEx
python
https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p3_terminology.py#L28-L30
[ "def", "arcsIn", "(", "G", ":", "Graph", ",", "n", ":", "Node", ")", "->", "RDFGraph", ":", "return", "RDFGraph", "(", "G", ".", "triples", "(", "(", "None", ",", "None", ",", "n", ")", ")", ")" ]
9d659cc36e808afd66d4a6d60e8ea21cb12eb744
train
predicatesIn
predicatesIn(G, n) is the set of predicates in arcsIn(G, n).
pyshex/shape_expressions_language/p3_terminology.py
def predicatesIn(G: Graph, n: Node) -> Set[TriplePredicate]: """ predicatesIn(G, n) is the set of predicates in arcsIn(G, n). """ return {p for _, p in G.subject_predicates(n)}
def predicatesIn(G: Graph, n: Node) -> Set[TriplePredicate]: """ predicatesIn(G, n) is the set of predicates in arcsIn(G, n). """ return {p for _, p in G.subject_predicates(n)}
[ "predicatesIn", "(", "G", "n", ")", "is", "the", "set", "of", "predicates", "in", "arcsIn", "(", "G", "n", ")", "." ]
hsolbrig/PyShEx
python
https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p3_terminology.py#L33-L35
[ "def", "predicatesIn", "(", "G", ":", "Graph", ",", "n", ":", "Node", ")", "->", "Set", "[", "TriplePredicate", "]", ":", "return", "{", "p", "for", "_", ",", "p", "in", "G", ".", "subject_predicates", "(", "n", ")", "}" ]
9d659cc36e808afd66d4a6d60e8ea21cb12eb744
train
neigh
neigh(G, n) is the neighbourhood of the node n in the graph G. neigh(G, n) = arcsOut(G, n) ∪ arcsIn(G, n)
pyshex/shape_expressions_language/p3_terminology.py
def neigh(G: Graph, n: Node) -> RDFGraph: """ neigh(G, n) is the neighbourhood of the node n in the graph G. neigh(G, n) = arcsOut(G, n) ∪ arcsIn(G, n) """ return arcsOut(G, n) | arcsIn(G, n)
def neigh(G: Graph, n: Node) -> RDFGraph: """ neigh(G, n) is the neighbourhood of the node n in the graph G. neigh(G, n) = arcsOut(G, n) ∪ arcsIn(G, n) """ return arcsOut(G, n) | arcsIn(G, n)
[ "neigh", "(", "G", "n", ")", "is", "the", "neighbourhood", "of", "the", "node", "n", "in", "the", "graph", "G", "." ]
hsolbrig/PyShEx
python
https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p3_terminology.py#L38-L43
[ "def", "neigh", "(", "G", ":", "Graph", ",", "n", ":", "Node", ")", "->", "RDFGraph", ":", "return", "arcsOut", "(", "G", ",", "n", ")", "|", "arcsIn", "(", "G", ",", "n", ")" ]
9d659cc36e808afd66d4a6d60e8ea21cb12eb744
train
predicates
redicates(G, n) is the set of predicates in neigh(G, n). predicates(G, n) = predicatesOut(G, n) ∪ predicatesIn(G, n)
pyshex/shape_expressions_language/p3_terminology.py
def predicates(G: Graph, n: Node) -> Set[TriplePredicate]: """ redicates(G, n) is the set of predicates in neigh(G, n). predicates(G, n) = predicatesOut(G, n) ∪ predicatesIn(G, n) """ return predicatesOut(G, n) | predicatesIn(G, n)
def predicates(G: Graph, n: Node) -> Set[TriplePredicate]: """ redicates(G, n) is the set of predicates in neigh(G, n). predicates(G, n) = predicatesOut(G, n) ∪ predicatesIn(G, n) """ return predicatesOut(G, n) | predicatesIn(G, n)
[ "redicates", "(", "G", "n", ")", "is", "the", "set", "of", "predicates", "in", "neigh", "(", "G", "n", ")", "." ]
hsolbrig/PyShEx
python
https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p3_terminology.py#L46-L51
[ "def", "predicates", "(", "G", ":", "Graph", ",", "n", ":", "Node", ")", "->", "Set", "[", "TriplePredicate", "]", ":", "return", "predicatesOut", "(", "G", ",", "n", ")", "|", "predicatesIn", "(", "G", ",", "n", ")" ]
9d659cc36e808afd66d4a6d60e8ea21cb12eb744
train
generate_base
Convert path, which can be a URL or a file path into a base URI :param path: file location or url :return: file location or url sans actual name
pyshex/utils/url_utils.py
def generate_base(path: str) -> str: """ Convert path, which can be a URL or a file path into a base URI :param path: file location or url :return: file location or url sans actual name """ if ':' in path: parts = urlparse(path) parts_dict = parts._asdict() parts_dict['path'...
def generate_base(path: str) -> str: """ Convert path, which can be a URL or a file path into a base URI :param path: file location or url :return: file location or url sans actual name """ if ':' in path: parts = urlparse(path) parts_dict = parts._asdict() parts_dict['path'...
[ "Convert", "path", "which", "can", "be", "a", "URL", "or", "a", "file", "path", "into", "a", "base", "URI" ]
hsolbrig/PyShEx
python
https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/utils/url_utils.py#L6-L18
[ "def", "generate_base", "(", "path", ":", "str", ")", "->", "str", ":", "if", "':'", "in", "path", ":", "parts", "=", "urlparse", "(", "path", ")", "parts_dict", "=", "parts", ".", "_asdict", "(", ")", "parts_dict", "[", "'path'", "]", "=", "os", "...
9d659cc36e808afd66d4a6d60e8ea21cb12eb744
train
ultimate_power
Data from http://indexed.blogspot.com/2007/08/real-ultimate-power.html
examples/venn.py
def ultimate_power(): """ Data from http://indexed.blogspot.com/2007/08/real-ultimate-power.html """ chart = VennChart(settings.width, settings.height) chart.add_data([100, 100, 100, 20, 20, 20, 10]) chart.set_title('Ninjas or God') chart.set_legend(['unseen agents', 'super powerful', 'secre...
def ultimate_power(): """ Data from http://indexed.blogspot.com/2007/08/real-ultimate-power.html """ chart = VennChart(settings.width, settings.height) chart.add_data([100, 100, 100, 20, 20, 20, 10]) chart.set_title('Ninjas or God') chart.set_legend(['unseen agents', 'super powerful', 'secre...
[ "Data", "from", "http", ":", "//", "indexed", ".", "blogspot", ".", "com", "/", "2007", "/", "08", "/", "real", "-", "ultimate", "-", "power", ".", "html" ]
gak/pygooglechart
python
https://github.com/gak/pygooglechart/blob/25234bb63127a7e5e057c0b98ab841f3f1d93b21/examples/venn.py#L30-L38
[ "def", "ultimate_power", "(", ")", ":", "chart", "=", "VennChart", "(", "settings", ".", "width", ",", "settings", ".", "height", ")", "chart", ".", "add_data", "(", "[", "100", ",", "100", ",", "100", ",", "20", ",", "20", ",", "20", ",", "10", ...
25234bb63127a7e5e057c0b98ab841f3f1d93b21
train
Protocol.split_host_port
Return (host, port) from server. Port defaults to 11211. >>> split_host_port('127.0.0.1:11211') ('127.0.0.1', 11211) >>> split_host_port('127.0.0.1') ('127.0.0.1', 11211)
bmemcached/protocol.py
def split_host_port(cls, server): """ Return (host, port) from server. Port defaults to 11211. >>> split_host_port('127.0.0.1:11211') ('127.0.0.1', 11211) >>> split_host_port('127.0.0.1') ('127.0.0.1', 11211) """ host, port = splitport(server) ...
def split_host_port(cls, server): """ Return (host, port) from server. Port defaults to 11211. >>> split_host_port('127.0.0.1:11211') ('127.0.0.1', 11211) >>> split_host_port('127.0.0.1') ('127.0.0.1', 11211) """ host, port = splitport(server) ...
[ "Return", "(", "host", "port", ")", "from", "server", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L162-L179
[ "def", "split_host_port", "(", "cls", ",", "server", ")", ":", "host", ",", "port", "=", "splitport", "(", "server", ")", "if", "port", "is", "None", ":", "port", "=", "11211", "port", "=", "int", "(", "port", ")", "if", "re", ".", "search", "(", ...
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol._read_socket
Reads data from socket. :param size: Size in bytes to be read. :return: Data from socket
bmemcached/protocol.py
def _read_socket(self, size): """ Reads data from socket. :param size: Size in bytes to be read. :return: Data from socket """ value = b'' while len(value) < size: data = self.connection.recv(size - len(value)) if not data: ...
def _read_socket(self, size): """ Reads data from socket. :param size: Size in bytes to be read. :return: Data from socket """ value = b'' while len(value) < size: data = self.connection.recv(size - len(value)) if not data: ...
[ "Reads", "data", "from", "socket", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L181-L199
[ "def", "_read_socket", "(", "self", ",", "size", ")", ":", "value", "=", "b''", "while", "len", "(", "value", ")", "<", "size", ":", "data", "=", "self", ".", "connection", ".", "recv", "(", "size", "-", "len", "(", "value", ")", ")", "if", "not"...
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol._get_response
Get memcached response from socket. :return: A tuple with binary values from memcached. :rtype: tuple
bmemcached/protocol.py
def _get_response(self): """ Get memcached response from socket. :return: A tuple with binary values from memcached. :rtype: tuple """ try: self._open_connection() if self.connection is None: # The connection wasn't opened, which m...
def _get_response(self): """ Get memcached response from socket. :return: A tuple with binary values from memcached. :rtype: tuple """ try: self._open_connection() if self.connection is None: # The connection wasn't opened, which m...
[ "Get", "memcached", "response", "from", "socket", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L201-L233
[ "def", "_get_response", "(", "self", ")", ":", "try", ":", "self", ".", "_open_connection", "(", ")", "if", "self", ".", "connection", "is", "None", ":", "# The connection wasn't opened, which means we're deferring a reconnection attempt.", "# Raise a socket.error, so we'll...
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol.authenticate
Authenticate user on server. :param username: Username used to be authenticated. :type username: six.string_types :param password: Password used to be authenticated. :type password: six.string_types :return: True if successful. :raises: InvalidCredentials, Authentication...
bmemcached/protocol.py
def authenticate(self, username, password): """ Authenticate user on server. :param username: Username used to be authenticated. :type username: six.string_types :param password: Password used to be authenticated. :type password: six.string_types :return: True if...
def authenticate(self, username, password): """ Authenticate user on server. :param username: Username used to be authenticated. :type username: six.string_types :param password: Password used to be authenticated. :type password: six.string_types :return: True if...
[ "Authenticate", "user", "on", "server", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L245-L263
[ "def", "authenticate", "(", "self", ",", "username", ",", "password", ")", ":", "self", ".", "_username", "=", "username", "self", ".", "_password", "=", "password", "# Reopen the connection with the new credentials.", "self", ".", "disconnect", "(", ")", "self", ...
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol.serialize
Serializes a value based on its type. :param value: Something to be serialized :type value: six.string_types, int, long, object :param compress_level: How much to compress. 0 = no compression, 1 = fastest, 9 = slowest but best, -1 = default compression level. :ty...
bmemcached/protocol.py
def serialize(self, value, compress_level=-1): """ Serializes a value based on its type. :param value: Something to be serialized :type value: six.string_types, int, long, object :param compress_level: How much to compress. 0 = no compression, 1 = fastest, 9 = slowes...
def serialize(self, value, compress_level=-1): """ Serializes a value based on its type. :param value: Something to be serialized :type value: six.string_types, int, long, object :param compress_level: How much to compress. 0 = no compression, 1 = fastest, 9 = slowes...
[ "Serializes", "a", "value", "based", "on", "its", "type", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L319-L362
[ "def", "serialize", "(", "self", ",", "value", ",", "compress_level", "=", "-", "1", ")", ":", "flags", "=", "0", "if", "isinstance", "(", "value", ",", "binary_type", ")", ":", "flags", "|=", "self", ".", "FLAGS", "[", "'binary'", "]", "elif", "isin...
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol.deserialize
Deserialized values based on flags or just return it if it is not serialized. :param value: Serialized or not value. :type value: six.string_types, int :param flags: Value flags :type flags: int :return: Deserialized value :rtype: six.string_types|int
bmemcached/protocol.py
def deserialize(self, value, flags): """ Deserialized values based on flags or just return it if it is not serialized. :param value: Serialized or not value. :type value: six.string_types, int :param flags: Value flags :type flags: int :return: Deserialized value...
def deserialize(self, value, flags): """ Deserialized values based on flags or just return it if it is not serialized. :param value: Serialized or not value. :type value: six.string_types, int :param flags: Value flags :type flags: int :return: Deserialized value...
[ "Deserialized", "values", "based", "on", "flags", "or", "just", "return", "it", "if", "it", "is", "not", "serialized", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L364-L406
[ "def", "deserialize", "(", "self", ",", "value", ",", "flags", ")", ":", "FLAGS", "=", "self", ".", "FLAGS", "if", "flags", "&", "FLAGS", "[", "'compressed'", "]", ":", "# pragma: no branch", "value", "=", "self", ".", "compression", ".", "decompress", "...
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol.get
Get a key and its CAS value from server. If the value isn't cached, return (None, None). :param key: Key's name :type key: six.string_types :return: Returns (value, cas). :rtype: object
bmemcached/protocol.py
def get(self, key): """ Get a key and its CAS value from server. If the value isn't cached, return (None, None). :param key: Key's name :type key: six.string_types :return: Returns (value, cas). :rtype: object """ logger.debug('Getting key %s', k...
def get(self, key): """ Get a key and its CAS value from server. If the value isn't cached, return (None, None). :param key: Key's name :type key: six.string_types :return: Returns (value, cas). :rtype: object """ logger.debug('Getting key %s', k...
[ "Get", "a", "key", "and", "its", "CAS", "value", "from", "server", ".", "If", "the", "value", "isn", "t", "cached", "return", "(", "None", "None", ")", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L408-L444
[ "def", "get", "(", "self", ",", "key", ")", ":", "logger", ".", "debug", "(", "'Getting key %s'", ",", "key", ")", "data", "=", "struct", ".", "pack", "(", "self", ".", "HEADER_STRUCT", "+", "self", ".", "COMMANDS", "[", "'get'", "]", "[", "'struct'"...
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol.noop
Send a NOOP command :return: Returns the status. :rtype: int
bmemcached/protocol.py
def noop(self): """ Send a NOOP command :return: Returns the status. :rtype: int """ logger.debug('Sending NOOP') data = struct.pack(self.HEADER_STRUCT + self.COMMANDS['noop']['struct'], self.MAGIC['request'],...
def noop(self): """ Send a NOOP command :return: Returns the status. :rtype: int """ logger.debug('Sending NOOP') data = struct.pack(self.HEADER_STRUCT + self.COMMANDS['noop']['struct'], self.MAGIC['request'],...
[ "Send", "a", "NOOP", "command" ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L446-L470
[ "def", "noop", "(", "self", ")", ":", "logger", ".", "debug", "(", "'Sending NOOP'", ")", "data", "=", "struct", ".", "pack", "(", "self", ".", "HEADER_STRUCT", "+", "self", ".", "COMMANDS", "[", "'noop'", "]", "[", "'struct'", "]", ",", "self", ".",...
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol.get_multi
Get multiple keys from server. Since keys are converted to b'' when six.PY3 the keys need to be decoded back into string . e.g key='test' is read as b'test' and then decoded back to 'test' This encode/decode does not work when key is already a six.binary_type hence this function remembe...
bmemcached/protocol.py
def get_multi(self, keys): """ Get multiple keys from server. Since keys are converted to b'' when six.PY3 the keys need to be decoded back into string . e.g key='test' is read as b'test' and then decoded back to 'test' This encode/decode does not work when key is already a six....
def get_multi(self, keys): """ Get multiple keys from server. Since keys are converted to b'' when six.PY3 the keys need to be decoded back into string . e.g key='test' is read as b'test' and then decoded back to 'test' This encode/decode does not work when key is already a six....
[ "Get", "multiple", "keys", "from", "server", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L472-L538
[ "def", "get_multi", "(", "self", ",", "keys", ")", ":", "# pipeline N-1 getkq requests, followed by a regular getk to uncork the", "# server", "o_keys", "=", "keys", "keys", ",", "last", "=", "keys", "[", ":", "-", "1", "]", ",", "str_to_bytes", "(", "keys", "["...
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol._set_add_replace
Function to set/add/replace commands. :param key: Key's name :type key: six.string_types :param value: A value to be stored on server. :type value: object :param time: Time in seconds that your key will expire. :type time: int :param cas: The CAS value that must ...
bmemcached/protocol.py
def _set_add_replace(self, command, key, value, time, cas=0, compress_level=-1): """ Function to set/add/replace commands. :param key: Key's name :type key: six.string_types :param value: A value to be stored on server. :type value: object :param time: Time in se...
def _set_add_replace(self, command, key, value, time, cas=0, compress_level=-1): """ Function to set/add/replace commands. :param key: Key's name :type key: six.string_types :param value: A value to be stored on server. :type value: object :param time: Time in se...
[ "Function", "to", "set", "/", "add", "/", "replace", "commands", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L540-L585
[ "def", "_set_add_replace", "(", "self", ",", "command", ",", "key", ",", "value", ",", "time", ",", "cas", "=", "0", ",", "compress_level", "=", "-", "1", ")", ":", "time", "=", "time", "if", "time", ">=", "0", "else", "self", ".", "MAXIMUM_EXPIRE_TI...
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol.set
Set a value for a key on server. :param key: Key's name :type key: six.string_types :param value: A value to be stored on server. :type value: object :param time: Time in seconds that your key will expire. :type time: int :param compress_level: How much to compre...
bmemcached/protocol.py
def set(self, key, value, time, compress_level=-1): """ Set a value for a key on server. :param key: Key's name :type key: six.string_types :param value: A value to be stored on server. :type value: object :param time: Time in seconds that your key will expire. ...
def set(self, key, value, time, compress_level=-1): """ Set a value for a key on server. :param key: Key's name :type key: six.string_types :param value: A value to be stored on server. :type value: object :param time: Time in seconds that your key will expire. ...
[ "Set", "a", "value", "for", "a", "key", "on", "server", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L587-L604
[ "def", "set", "(", "self", ",", "key", ",", "value", ",", "time", ",", "compress_level", "=", "-", "1", ")", ":", "return", "self", ".", "_set_add_replace", "(", "'set'", ",", "key", ",", "value", ",", "time", ",", "compress_level", "=", "compress_leve...
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol.cas
Add a key/value to server ony if it does not exist. :param key: Key's name :type key: six.string_types :param value: A value to be stored on server. :type value: object :param time: Time in seconds that your key will expire. :type time: int :param compress_level:...
bmemcached/protocol.py
def cas(self, key, value, cas, time, compress_level=-1): """ Add a key/value to server ony if it does not exist. :param key: Key's name :type key: six.string_types :param value: A value to be stored on server. :type value: object :param time: Time in seconds that...
def cas(self, key, value, cas, time, compress_level=-1): """ Add a key/value to server ony if it does not exist. :param key: Key's name :type key: six.string_types :param value: A value to be stored on server. :type value: object :param time: Time in seconds that...
[ "Add", "a", "key", "/", "value", "to", "server", "ony", "if", "it", "does", "not", "exist", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L606-L633
[ "def", "cas", "(", "self", ",", "key", ",", "value", ",", "cas", ",", "time", ",", "compress_level", "=", "-", "1", ")", ":", "# The protocol CAS value 0 means \"no cas\". Calling cas() with that value is", "# probably unintentional. Don't allow it, since it would overwrite...
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol.add
Add a key/value to server ony if it does not exist. :param key: Key's name :type key: six.string_types :param value: A value to be stored on server. :type value: object :param time: Time in seconds that your key will expire. :type time: int :param compress_level:...
bmemcached/protocol.py
def add(self, key, value, time, compress_level=-1): """ Add a key/value to server ony if it does not exist. :param key: Key's name :type key: six.string_types :param value: A value to be stored on server. :type value: object :param time: Time in seconds that your...
def add(self, key, value, time, compress_level=-1): """ Add a key/value to server ony if it does not exist. :param key: Key's name :type key: six.string_types :param value: A value to be stored on server. :type value: object :param time: Time in seconds that your...
[ "Add", "a", "key", "/", "value", "to", "server", "ony", "if", "it", "does", "not", "exist", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L635-L652
[ "def", "add", "(", "self", ",", "key", ",", "value", ",", "time", ",", "compress_level", "=", "-", "1", ")", ":", "return", "self", ".", "_set_add_replace", "(", "'add'", ",", "key", ",", "value", ",", "time", ",", "compress_level", "=", "compress_leve...
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol.replace
Replace a key/value to server ony if it does exist. :param key: Key's name :type key: six.string_types :param value: A value to be stored on server. :type value: object :param time: Time in seconds that your key will expire. :type time: int :param compress_level:...
bmemcached/protocol.py
def replace(self, key, value, time, compress_level=-1): """ Replace a key/value to server ony if it does exist. :param key: Key's name :type key: six.string_types :param value: A value to be stored on server. :type value: object :param time: Time in seconds that ...
def replace(self, key, value, time, compress_level=-1): """ Replace a key/value to server ony if it does exist. :param key: Key's name :type key: six.string_types :param value: A value to be stored on server. :type value: object :param time: Time in seconds that ...
[ "Replace", "a", "key", "/", "value", "to", "server", "ony", "if", "it", "does", "exist", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L654-L671
[ "def", "replace", "(", "self", ",", "key", ",", "value", ",", "time", ",", "compress_level", "=", "-", "1", ")", ":", "return", "self", ".", "_set_add_replace", "(", "'replace'", ",", "key", ",", "value", ",", "time", ",", "compress_level", "=", "compr...
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol.set_multi
Set multiple keys with its values on server. If a key is a (key, cas) tuple, insert as if cas(key, value, cas) had been called. :param mappings: A dict with keys/values :type mappings: dict :param time: Time in seconds that your key will expire. :type time: int ...
bmemcached/protocol.py
def set_multi(self, mappings, time=100, compress_level=-1): """ Set multiple keys with its values on server. If a key is a (key, cas) tuple, insert as if cas(key, value, cas) had been called. :param mappings: A dict with keys/values :type mappings: dict :param t...
def set_multi(self, mappings, time=100, compress_level=-1): """ Set multiple keys with its values on server. If a key is a (key, cas) tuple, insert as if cas(key, value, cas) had been called. :param mappings: A dict with keys/values :type mappings: dict :param t...
[ "Set", "multiple", "keys", "with", "its", "values", "on", "server", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L673-L741
[ "def", "set_multi", "(", "self", ",", "mappings", ",", "time", "=", "100", ",", "compress_level", "=", "-", "1", ")", ":", "mappings", "=", "mappings", ".", "items", "(", ")", "msg", "=", "[", "]", "for", "key", ",", "value", "in", "mappings", ":",...
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol._incr_decr
Function which increments and decrements. :param key: Key's name :type key: six.string_types :param value: Number to be (de|in)cremented :type value: int :param default: Default value if key does not exist. :type default: int :param time: Time in seconds to expir...
bmemcached/protocol.py
def _incr_decr(self, command, key, value, default, time): """ Function which increments and decrements. :param key: Key's name :type key: six.string_types :param value: Number to be (de|in)cremented :type value: int :param default: Default value if key does not e...
def _incr_decr(self, command, key, value, default, time): """ Function which increments and decrements. :param key: Key's name :type key: six.string_types :param value: Number to be (de|in)cremented :type value: int :param default: Default value if key does not e...
[ "Function", "which", "increments", "and", "decrements", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L743-L775
[ "def", "_incr_decr", "(", "self", ",", "command", ",", "key", ",", "value", ",", "default", ",", "time", ")", ":", "time", "=", "time", "if", "time", ">=", "0", "else", "self", ".", "MAXIMUM_EXPIRE_TIME", "self", ".", "_send", "(", "struct", ".", "pa...
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol.incr
Increment a key, if it exists, returns its actual value, if it doesn't, return 0. :param key: Key's name :type key: six.string_types :param value: Number to be incremented :type value: int :param default: Default value if key does not exist. :type default: int :p...
bmemcached/protocol.py
def incr(self, key, value, default=0, time=1000000): """ Increment a key, if it exists, returns its actual value, if it doesn't, return 0. :param key: Key's name :type key: six.string_types :param value: Number to be incremented :type value: int :param default: D...
def incr(self, key, value, default=0, time=1000000): """ Increment a key, if it exists, returns its actual value, if it doesn't, return 0. :param key: Key's name :type key: six.string_types :param value: Number to be incremented :type value: int :param default: D...
[ "Increment", "a", "key", "if", "it", "exists", "returns", "its", "actual", "value", "if", "it", "doesn", "t", "return", "0", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L777-L792
[ "def", "incr", "(", "self", ",", "key", ",", "value", ",", "default", "=", "0", ",", "time", "=", "1000000", ")", ":", "return", "self", ".", "_incr_decr", "(", "'incr'", ",", "key", ",", "value", ",", "default", ",", "time", ")" ]
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol.decr
Decrement a key, if it exists, returns its actual value, if it doesn't, return 0. Minimum value of decrement return is 0. :param key: Key's name :type key: six.string_types :param value: Number to be decremented :type value: int :param default: Default value if key does ...
bmemcached/protocol.py
def decr(self, key, value, default=0, time=100): """ Decrement a key, if it exists, returns its actual value, if it doesn't, return 0. Minimum value of decrement return is 0. :param key: Key's name :type key: six.string_types :param value: Number to be decremented ...
def decr(self, key, value, default=0, time=100): """ Decrement a key, if it exists, returns its actual value, if it doesn't, return 0. Minimum value of decrement return is 0. :param key: Key's name :type key: six.string_types :param value: Number to be decremented ...
[ "Decrement", "a", "key", "if", "it", "exists", "returns", "its", "actual", "value", "if", "it", "doesn", "t", "return", "0", ".", "Minimum", "value", "of", "decrement", "return", "is", "0", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L794-L810
[ "def", "decr", "(", "self", ",", "key", ",", "value", ",", "default", "=", "0", ",", "time", "=", "100", ")", ":", "return", "self", ".", "_incr_decr", "(", "'decr'", ",", "key", ",", "value", ",", "default", ",", "time", ")" ]
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol.delete
Delete a key/value from server. If key existed and was deleted, return True. :param key: Key's name to be deleted :type key: six.string_types :param cas: If set, only delete the key if its CAS value matches. :type cas: int :return: True in case o success and False in case of fai...
bmemcached/protocol.py
def delete(self, key, cas=0): """ Delete a key/value from server. If key existed and was deleted, return True. :param key: Key's name to be deleted :type key: six.string_types :param cas: If set, only delete the key if its CAS value matches. :type cas: int :retur...
def delete(self, key, cas=0): """ Delete a key/value from server. If key existed and was deleted, return True. :param key: Key's name to be deleted :type key: six.string_types :param cas: If set, only delete the key if its CAS value matches. :type cas: int :retur...
[ "Delete", "a", "key", "/", "value", "from", "server", ".", "If", "key", "existed", "and", "was", "deleted", "return", "True", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L812-L839
[ "def", "delete", "(", "self", ",", "key", ",", "cas", "=", "0", ")", ":", "logger", ".", "debug", "(", "'Deleting key %s'", ",", "key", ")", "self", ".", "_send", "(", "struct", ".", "pack", "(", "self", ".", "HEADER_STRUCT", "+", "self", ".", "COM...
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol.delete_multi
Delete multiple keys from server in one command. :param keys: A list of keys to be deleted :type keys: list :return: True in case of success and False in case of failure. :rtype: bool
bmemcached/protocol.py
def delete_multi(self, keys): """ Delete multiple keys from server in one command. :param keys: A list of keys to be deleted :type keys: list :return: True in case of success and False in case of failure. :rtype: bool """ logger.debug('Deleting keys %r', ...
def delete_multi(self, keys): """ Delete multiple keys from server in one command. :param keys: A list of keys to be deleted :type keys: list :return: True in case of success and False in case of failure. :rtype: bool """ logger.debug('Deleting keys %r', ...
[ "Delete", "multiple", "keys", "from", "server", "in", "one", "command", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L841-L882
[ "def", "delete_multi", "(", "self", ",", "keys", ")", ":", "logger", ".", "debug", "(", "'Deleting keys %r'", ",", "keys", ")", "if", "six", ".", "PY2", ":", "msg", "=", "''", "else", ":", "msg", "=", "b''", "for", "key", "in", "keys", ":", "msg", ...
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol.flush_all
Send a command to server flush|delete all keys. :param time: Time to wait until flush in seconds. :type time: int :return: True in case of success, False in case of failure :rtype: bool
bmemcached/protocol.py
def flush_all(self, time): """ Send a command to server flush|delete all keys. :param time: Time to wait until flush in seconds. :type time: int :return: True in case of success, False in case of failure :rtype: bool """ logger.info('Flushing memcached') ...
def flush_all(self, time): """ Send a command to server flush|delete all keys. :param time: Time to wait until flush in seconds. :type time: int :return: True in case of success, False in case of failure :rtype: bool """ logger.info('Flushing memcached') ...
[ "Send", "a", "command", "to", "server", "flush|delete", "all", "keys", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L884-L907
[ "def", "flush_all", "(", "self", ",", "time", ")", ":", "logger", ".", "info", "(", "'Flushing memcached'", ")", "self", ".", "_send", "(", "struct", ".", "pack", "(", "self", ".", "HEADER_STRUCT", "+", "self", ".", "COMMANDS", "[", "'flush'", "]", "["...
6a792829349c69204d9c5045e5c34b4231216dd6
train
Protocol.stats
Return server stats. :param key: Optional if you want status from a key. :type key: six.string_types :return: A dict with server stats :rtype: dict
bmemcached/protocol.py
def stats(self, key=None): """ Return server stats. :param key: Optional if you want status from a key. :type key: six.string_types :return: A dict with server stats :rtype: dict """ # TODO: Stats with key is not working. if key is not None: ...
def stats(self, key=None): """ Return server stats. :param key: Optional if you want status from a key. :type key: six.string_types :return: A dict with server stats :rtype: dict """ # TODO: Stats with key is not working. if key is not None: ...
[ "Return", "server", "stats", "." ]
jaysonsantos/python-binary-memcached
python
https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L909-L957
[ "def", "stats", "(", "self", ",", "key", "=", "None", ")", ":", "# TODO: Stats with key is not working.", "if", "key", "is", "not", "None", ":", "if", "isinstance", "(", "key", ",", "text_type", ")", ":", "key", "=", "str_to_bytes", "(", "key", ")", "key...
6a792829349c69204d9c5045e5c34b4231216dd6
train
PrefixLibrary.add_shex
Add a ShExC schema to the library :param schema: ShExC schema text, URL or file name :return: prefix library object
pyshex/prefixlib.py
def add_shex(self, schema: str) -> "PrefixLibrary": """ Add a ShExC schema to the library :param schema: ShExC schema text, URL or file name :return: prefix library object """ if '\n' in schema or '\r' in schema or ' ' in schema: shex = schema else: ...
def add_shex(self, schema: str) -> "PrefixLibrary": """ Add a ShExC schema to the library :param schema: ShExC schema text, URL or file name :return: prefix library object """ if '\n' in schema or '\r' in schema or ' ' in schema: shex = schema else: ...
[ "Add", "a", "ShExC", "schema", "to", "the", "library" ]
hsolbrig/PyShEx
python
https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/prefixlib.py#L39-L57
[ "def", "add_shex", "(", "self", ",", "schema", ":", "str", ")", "->", "\"PrefixLibrary\"", ":", "if", "'\\n'", "in", "schema", "or", "'\\r'", "in", "schema", "or", "' '", "in", "schema", ":", "shex", "=", "schema", "else", ":", "shex", "=", "load_shex_...
9d659cc36e808afd66d4a6d60e8ea21cb12eb744
train
PrefixLibrary.add_bindings
Add bindings in the library to the graph :param g: graph to add prefixes to :return: PrefixLibrary object
pyshex/prefixlib.py
def add_bindings(self, g: Graph) -> "PrefixLibrary": """ Add bindings in the library to the graph :param g: graph to add prefixes to :return: PrefixLibrary object """ for prefix, namespace in self: g.bind(prefix.lower(), namespace) return self
def add_bindings(self, g: Graph) -> "PrefixLibrary": """ Add bindings in the library to the graph :param g: graph to add prefixes to :return: PrefixLibrary object """ for prefix, namespace in self: g.bind(prefix.lower(), namespace) return self
[ "Add", "bindings", "in", "the", "library", "to", "the", "graph" ]
hsolbrig/PyShEx
python
https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/prefixlib.py#L72-L80
[ "def", "add_bindings", "(", "self", ",", "g", ":", "Graph", ")", "->", "\"PrefixLibrary\"", ":", "for", "prefix", ",", "namespace", "in", "self", ":", "g", ".", "bind", "(", "prefix", ".", "lower", "(", ")", ",", "namespace", ")", "return", "self" ]
9d659cc36e808afd66d4a6d60e8ea21cb12eb744
train
PrefixLibrary.add_to_object
Add the bindings to the target object :param target: target to add to :param override: override existing bindings if they are of type Namespace :return: number of items actually added
pyshex/prefixlib.py
def add_to_object(self, target: object, override: bool = False) -> int: """ Add the bindings to the target object :param target: target to add to :param override: override existing bindings if they are of type Namespace :return: number of items actually added """ ...
def add_to_object(self, target: object, override: bool = False) -> int: """ Add the bindings to the target object :param target: target to add to :param override: override existing bindings if they are of type Namespace :return: number of items actually added """ ...
[ "Add", "the", "bindings", "to", "the", "target", "object", ":", "param", "target", ":", "target", "to", "add", "to", ":", "param", "override", ":", "override", "existing", "bindings", "if", "they", "are", "of", "type", "Namespace", ":", "return", ":", "n...
hsolbrig/PyShEx
python
https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/prefixlib.py#L82-L98
[ "def", "add_to_object", "(", "self", ",", "target", ":", "object", ",", "override", ":", "bool", "=", "False", ")", "->", "int", ":", "nret", "=", "0", "for", "k", ",", "v", "in", "self", ":", "key", "=", "k", ".", "upper", "(", ")", "exists", ...
9d659cc36e808afd66d4a6d60e8ea21cb12eb744
train
PrefixLibrary.nsname
Return the 'ns:name' format of URI :param uri: URI to transform :return: nsname format of URI or straight URI if no mapping
pyshex/prefixlib.py
def nsname(self, uri: Union[str, URIRef]) -> str: """ Return the 'ns:name' format of URI :param uri: URI to transform :return: nsname format of URI or straight URI if no mapping """ uri = str(uri) nsuri = "" prefix = None for pfx, ns in self: ...
def nsname(self, uri: Union[str, URIRef]) -> str: """ Return the 'ns:name' format of URI :param uri: URI to transform :return: nsname format of URI or straight URI if no mapping """ uri = str(uri) nsuri = "" prefix = None for pfx, ns in self: ...
[ "Return", "the", "ns", ":", "name", "format", "of", "URI" ]
hsolbrig/PyShEx
python
https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/prefixlib.py#L100-L115
[ "def", "nsname", "(", "self", ",", "uri", ":", "Union", "[", "str", ",", "URIRef", "]", ")", "->", "str", ":", "uri", "=", "str", "(", "uri", ")", "nsuri", "=", "\"\"", "prefix", "=", "None", "for", "pfx", ",", "ns", "in", "self", ":", "nss", ...
9d659cc36e808afd66d4a6d60e8ea21cb12eb744
train
open_spec
:param f: file object with spec data spec file is a yaml document that specifies which modules can be loaded. modules - list of base modules that can be loaded pths - list of .pth files to load
vext/conf/__init__.py
def open_spec(f): """ :param f: file object with spec data spec file is a yaml document that specifies which modules can be loaded. modules - list of base modules that can be loaded pths - list of .pth files to load """ import ruamel.yaml as yaml keys = ['modules', 'pths', 'tes...
def open_spec(f): """ :param f: file object with spec data spec file is a yaml document that specifies which modules can be loaded. modules - list of base modules that can be loaded pths - list of .pth files to load """ import ruamel.yaml as yaml keys = ['modules', 'pths', 'tes...
[ ":", "param", "f", ":", "file", "object", "with", "spec", "data" ]
stuaxo/vext
python
https://github.com/stuaxo/vext/blob/fa98a21ecfbbc1c3d1b84085d69ec42defdd2f69/vext/conf/__init__.py#L9-L34
[ "def", "open_spec", "(", "f", ")", ":", "import", "ruamel", ".", "yaml", "as", "yaml", "keys", "=", "[", "'modules'", ",", "'pths'", ",", "'test_import'", ",", "'install_hints'", ",", "'extra_paths'", "]", "data", "=", "yaml", ".", "safe_load", "(", "f",...
fa98a21ecfbbc1c3d1b84085d69ec42defdd2f69
train
SchemaLoader.load
Load a ShEx Schema from schema_location :param schema_file: name or file-like object to deserialize :param schema_location: URL or file name of schema. Used to create the base_location :return: ShEx Schema represented by schema_location
pyshex/utils/schema_loader.py
def load(self, schema_file: Union[str, TextIO], schema_location: Optional[str]=None) -> ShExJ.Schema: """ Load a ShEx Schema from schema_location :param schema_file: name or file-like object to deserialize :param schema_location: URL or file name of schema. Used to create the base_location ...
def load(self, schema_file: Union[str, TextIO], schema_location: Optional[str]=None) -> ShExJ.Schema: """ Load a ShEx Schema from schema_location :param schema_file: name or file-like object to deserialize :param schema_location: URL or file name of schema. Used to create the base_location ...
[ "Load", "a", "ShEx", "Schema", "from", "schema_location" ]
hsolbrig/PyShEx
python
https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/utils/schema_loader.py#L26-L45
[ "def", "load", "(", "self", ",", "schema_file", ":", "Union", "[", "str", ",", "TextIO", "]", ",", "schema_location", ":", "Optional", "[", "str", "]", "=", "None", ")", "->", "ShExJ", ".", "Schema", ":", "if", "isinstance", "(", "schema_file", ",", ...
9d659cc36e808afd66d4a6d60e8ea21cb12eb744
train
SchemaLoader.loads
Parse and return schema as a ShExJ Schema :param schema_txt: ShExC or ShExJ representation of a ShEx Schema :return: ShEx Schema representation of schema
pyshex/utils/schema_loader.py
def loads(self, schema_txt: str) -> ShExJ.Schema: """ Parse and return schema as a ShExJ Schema :param schema_txt: ShExC or ShExJ representation of a ShEx Schema :return: ShEx Schema representation of schema """ self.schema_text = schema_txt if schema_txt.strip()[0] == '...
def loads(self, schema_txt: str) -> ShExJ.Schema: """ Parse and return schema as a ShExJ Schema :param schema_txt: ShExC or ShExJ representation of a ShEx Schema :return: ShEx Schema representation of schema """ self.schema_text = schema_txt if schema_txt.strip()[0] == '...
[ "Parse", "and", "return", "schema", "as", "a", "ShExJ", "Schema" ]
hsolbrig/PyShEx
python
https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/utils/schema_loader.py#L47-L58
[ "def", "loads", "(", "self", ",", "schema_txt", ":", "str", ")", "->", "ShExJ", ".", "Schema", ":", "self", ".", "schema_text", "=", "schema_txt", "if", "schema_txt", ".", "strip", "(", ")", "[", "0", "]", "==", "'{'", ":", "# TODO: figure out how to pro...
9d659cc36e808afd66d4a6d60e8ea21cb12eb744
train
EClient.placeOrder
placeOrder(EClient self, OrderId id, Contract contract, Order order)
swigibpy.py
def placeOrder(self, id, contract, order): """placeOrder(EClient self, OrderId id, Contract contract, Order order)""" return _swigibpy.EClient_placeOrder(self, id, contract, order)
def placeOrder(self, id, contract, order): """placeOrder(EClient self, OrderId id, Contract contract, Order order)""" return _swigibpy.EClient_placeOrder(self, id, contract, order)
[ "placeOrder", "(", "EClient", "self", "OrderId", "id", "Contract", "contract", "Order", "order", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1125-L1127
[ "def", "placeOrder", "(", "self", ",", "id", ",", "contract", ",", "order", ")", ":", "return", "_swigibpy", ".", "EClient_placeOrder", "(", "self", ",", "id", ",", "contract", ",", "order", ")" ]
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EClient.reqMktDepth
reqMktDepth(EClient self, TickerId id, Contract contract, int numRows, TagValueListSPtr const & mktDepthOptions)
swigibpy.py
def reqMktDepth(self, id, contract, numRows, mktDepthOptions): """reqMktDepth(EClient self, TickerId id, Contract contract, int numRows, TagValueListSPtr const & mktDepthOptions)""" return _swigibpy.EClient_reqMktDepth(self, id, contract, numRows, mktDepthOptions)
def reqMktDepth(self, id, contract, numRows, mktDepthOptions): """reqMktDepth(EClient self, TickerId id, Contract contract, int numRows, TagValueListSPtr const & mktDepthOptions)""" return _swigibpy.EClient_reqMktDepth(self, id, contract, numRows, mktDepthOptions)
[ "reqMktDepth", "(", "EClient", "self", "TickerId", "id", "Contract", "contract", "int", "numRows", "TagValueListSPtr", "const", "&", "mktDepthOptions", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1165-L1167
[ "def", "reqMktDepth", "(", "self", ",", "id", ",", "contract", ",", "numRows", ",", "mktDepthOptions", ")", ":", "return", "_swigibpy", ".", "EClient_reqMktDepth", "(", "self", ",", "id", ",", "contract", ",", "numRows", ",", "mktDepthOptions", ")" ]
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EClient.exerciseOptions
exerciseOptions(EClient self, TickerId id, Contract contract, int exerciseAction, int exerciseQuantity, IBString const & account, int override)
swigibpy.py
def exerciseOptions(self, id, contract, exerciseAction, exerciseQuantity, account, override): """exerciseOptions(EClient self, TickerId id, Contract contract, int exerciseAction, int exerciseQuantity, IBString const & account, int override)""" return _swigibpy.EClient_exerciseOptions(self, id, contract,...
def exerciseOptions(self, id, contract, exerciseAction, exerciseQuantity, account, override): """exerciseOptions(EClient self, TickerId id, Contract contract, int exerciseAction, int exerciseQuantity, IBString const & account, int override)""" return _swigibpy.EClient_exerciseOptions(self, id, contract,...
[ "exerciseOptions", "(", "EClient", "self", "TickerId", "id", "Contract", "contract", "int", "exerciseAction", "int", "exerciseQuantity", "IBString", "const", "&", "account", "int", "override", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1220-L1222
[ "def", "exerciseOptions", "(", "self", ",", "id", ",", "contract", ",", "exerciseAction", ",", "exerciseQuantity", ",", "account", ",", "override", ")", ":", "return", "_swigibpy", ".", "EClient_exerciseOptions", "(", "self", ",", "id", ",", "contract", ",", ...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EClient.reqScannerSubscription
reqScannerSubscription(EClient self, int tickerId, ScannerSubscription subscription, TagValueListSPtr const & scannerSubscriptionOptions)
swigibpy.py
def reqScannerSubscription(self, tickerId, subscription, scannerSubscriptionOptions): """reqScannerSubscription(EClient self, int tickerId, ScannerSubscription subscription, TagValueListSPtr const & scannerSubscriptionOptions)""" return _swigibpy.EClient_reqScannerSubscription(self, tickerId, subscripti...
def reqScannerSubscription(self, tickerId, subscription, scannerSubscriptionOptions): """reqScannerSubscription(EClient self, int tickerId, ScannerSubscription subscription, TagValueListSPtr const & scannerSubscriptionOptions)""" return _swigibpy.EClient_reqScannerSubscription(self, tickerId, subscripti...
[ "reqScannerSubscription", "(", "EClient", "self", "int", "tickerId", "ScannerSubscription", "subscription", "TagValueListSPtr", "const", "&", "scannerSubscriptionOptions", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1250-L1252
[ "def", "reqScannerSubscription", "(", "self", ",", "tickerId", ",", "subscription", ",", "scannerSubscriptionOptions", ")", ":", "return", "_swigibpy", ".", "EClient_reqScannerSubscription", "(", "self", ",", "tickerId", ",", "subscription", ",", "scannerSubscriptionOpt...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EClient.reqFundamentalData
reqFundamentalData(EClient self, TickerId reqId, Contract arg3, IBString const & reportType)
swigibpy.py
def reqFundamentalData(self, reqId, arg3, reportType): """reqFundamentalData(EClient self, TickerId reqId, Contract arg3, IBString const & reportType)""" return _swigibpy.EClient_reqFundamentalData(self, reqId, arg3, reportType)
def reqFundamentalData(self, reqId, arg3, reportType): """reqFundamentalData(EClient self, TickerId reqId, Contract arg3, IBString const & reportType)""" return _swigibpy.EClient_reqFundamentalData(self, reqId, arg3, reportType)
[ "reqFundamentalData", "(", "EClient", "self", "TickerId", "reqId", "Contract", "arg3", "IBString", "const", "&", "reportType", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1260-L1262
[ "def", "reqFundamentalData", "(", "self", ",", "reqId", ",", "arg3", ",", "reportType", ")", ":", "return", "_swigibpy", ".", "EClient_reqFundamentalData", "(", "self", ",", "reqId", ",", "arg3", ",", "reportType", ")" ]
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EClient.calculateImpliedVolatility
calculateImpliedVolatility(EClient self, TickerId reqId, Contract contract, double optionPrice, double underPrice)
swigibpy.py
def calculateImpliedVolatility(self, reqId, contract, optionPrice, underPrice): """calculateImpliedVolatility(EClient self, TickerId reqId, Contract contract, double optionPrice, double underPrice)""" return _swigibpy.EClient_calculateImpliedVolatility(self, reqId, contract, optionPrice, underPrice)
def calculateImpliedVolatility(self, reqId, contract, optionPrice, underPrice): """calculateImpliedVolatility(EClient self, TickerId reqId, Contract contract, double optionPrice, double underPrice)""" return _swigibpy.EClient_calculateImpliedVolatility(self, reqId, contract, optionPrice, underPrice)
[ "calculateImpliedVolatility", "(", "EClient", "self", "TickerId", "reqId", "Contract", "contract", "double", "optionPrice", "double", "underPrice", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1270-L1272
[ "def", "calculateImpliedVolatility", "(", "self", ",", "reqId", ",", "contract", ",", "optionPrice", ",", "underPrice", ")", ":", "return", "_swigibpy", ".", "EClient_calculateImpliedVolatility", "(", "self", ",", "reqId", ",", "contract", ",", "optionPrice", ",",...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EClient.calculateOptionPrice
calculateOptionPrice(EClient self, TickerId reqId, Contract contract, double volatility, double underPrice)
swigibpy.py
def calculateOptionPrice(self, reqId, contract, volatility, underPrice): """calculateOptionPrice(EClient self, TickerId reqId, Contract contract, double volatility, double underPrice)""" return _swigibpy.EClient_calculateOptionPrice(self, reqId, contract, volatility, underPrice)
def calculateOptionPrice(self, reqId, contract, volatility, underPrice): """calculateOptionPrice(EClient self, TickerId reqId, Contract contract, double volatility, double underPrice)""" return _swigibpy.EClient_calculateOptionPrice(self, reqId, contract, volatility, underPrice)
[ "calculateOptionPrice", "(", "EClient", "self", "TickerId", "reqId", "Contract", "contract", "double", "volatility", "double", "underPrice", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1275-L1277
[ "def", "calculateOptionPrice", "(", "self", ",", "reqId", ",", "contract", ",", "volatility", ",", "underPrice", ")", ":", "return", "_swigibpy", ".", "EClient_calculateOptionPrice", "(", "self", ",", "reqId", ",", "contract", ",", "volatility", ",", "underPrice...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EClient.reqAccountSummary
reqAccountSummary(EClient self, int reqId, IBString const & groupName, IBString const & tags)
swigibpy.py
def reqAccountSummary(self, reqId, groupName, tags): """reqAccountSummary(EClient self, int reqId, IBString const & groupName, IBString const & tags)""" return _swigibpy.EClient_reqAccountSummary(self, reqId, groupName, tags)
def reqAccountSummary(self, reqId, groupName, tags): """reqAccountSummary(EClient self, int reqId, IBString const & groupName, IBString const & tags)""" return _swigibpy.EClient_reqAccountSummary(self, reqId, groupName, tags)
[ "reqAccountSummary", "(", "EClient", "self", "int", "reqId", "IBString", "const", "&", "groupName", "IBString", "const", "&", "tags", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1310-L1312
[ "def", "reqAccountSummary", "(", "self", ",", "reqId", ",", "groupName", ",", "tags", ")", ":", "return", "_swigibpy", ".", "EClient_reqAccountSummary", "(", "self", ",", "reqId", ",", "groupName", ",", "tags", ")" ]
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EClientSocketBase.eConnect
eConnect(EClientSocketBase self, char const * host, unsigned int port, int clientId=0, bool extraAuth=False) -> bool
swigibpy.py
def eConnect(self, host, port, clientId=0, extraAuth=False): """eConnect(EClientSocketBase self, char const * host, unsigned int port, int clientId=0, bool extraAuth=False) -> bool""" return _swigibpy.EClientSocketBase_eConnect(self, host, port, clientId, extraAuth)
def eConnect(self, host, port, clientId=0, extraAuth=False): """eConnect(EClientSocketBase self, char const * host, unsigned int port, int clientId=0, bool extraAuth=False) -> bool""" return _swigibpy.EClientSocketBase_eConnect(self, host, port, clientId, extraAuth)
[ "eConnect", "(", "EClientSocketBase", "self", "char", "const", "*", "host", "unsigned", "int", "port", "int", "clientId", "=", "0", "bool", "extraAuth", "=", "False", ")", "-", ">", "bool" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1412-L1414
[ "def", "eConnect", "(", "self", ",", "host", ",", "port", ",", "clientId", "=", "0", ",", "extraAuth", "=", "False", ")", ":", "return", "_swigibpy", ".", "EClientSocketBase_eConnect", "(", "self", ",", "host", ",", "port", ",", "clientId", ",", "extraAu...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EClientSocketBase.reqMktData
reqMktData(EClientSocketBase self, TickerId id, Contract contract, IBString const & genericTicks, bool snapshot, TagValueListSPtr const & mktDataOptions)
swigibpy.py
def reqMktData(self, id, contract, genericTicks, snapshot, mktDataOptions): """reqMktData(EClientSocketBase self, TickerId id, Contract contract, IBString const & genericTicks, bool snapshot, TagValueListSPtr const & mktDataOptions)""" return _swigibpy.EClientSocketBase_reqMktData(self, id, contract, ge...
def reqMktData(self, id, contract, genericTicks, snapshot, mktDataOptions): """reqMktData(EClientSocketBase self, TickerId id, Contract contract, IBString const & genericTicks, bool snapshot, TagValueListSPtr const & mktDataOptions)""" return _swigibpy.EClientSocketBase_reqMktData(self, id, contract, ge...
[ "reqMktData", "(", "EClientSocketBase", "self", "TickerId", "id", "Contract", "contract", "IBString", "const", "&", "genericTicks", "bool", "snapshot", "TagValueListSPtr", "const", "&", "mktDataOptions", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1452-L1454
[ "def", "reqMktData", "(", "self", ",", "id", ",", "contract", ",", "genericTicks", ",", "snapshot", ",", "mktDataOptions", ")", ":", "return", "_swigibpy", ".", "EClientSocketBase_reqMktData", "(", "self", ",", "id", ",", "contract", ",", "genericTicks", ",", ...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EClientSocketBase.placeOrder
placeOrder(EClientSocketBase self, OrderId id, Contract contract, Order order)
swigibpy.py
def placeOrder(self, id, contract, order): """placeOrder(EClientSocketBase self, OrderId id, Contract contract, Order order)""" return _swigibpy.EClientSocketBase_placeOrder(self, id, contract, order)
def placeOrder(self, id, contract, order): """placeOrder(EClientSocketBase self, OrderId id, Contract contract, Order order)""" return _swigibpy.EClientSocketBase_placeOrder(self, id, contract, order)
[ "placeOrder", "(", "EClientSocketBase", "self", "OrderId", "id", "Contract", "contract", "Order", "order", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1462-L1464
[ "def", "placeOrder", "(", "self", ",", "id", ",", "contract", ",", "order", ")", ":", "return", "_swigibpy", ".", "EClientSocketBase_placeOrder", "(", "self", ",", "id", ",", "contract", ",", "order", ")" ]
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EClientSocketBase.reqMktDepth
reqMktDepth(EClientSocketBase self, TickerId tickerId, Contract contract, int numRows, TagValueListSPtr const & mktDepthOptions)
swigibpy.py
def reqMktDepth(self, tickerId, contract, numRows, mktDepthOptions): """reqMktDepth(EClientSocketBase self, TickerId tickerId, Contract contract, int numRows, TagValueListSPtr const & mktDepthOptions)""" return _swigibpy.EClientSocketBase_reqMktDepth(self, tickerId, contract, numRows, mktDepthOptions)
def reqMktDepth(self, tickerId, contract, numRows, mktDepthOptions): """reqMktDepth(EClientSocketBase self, TickerId tickerId, Contract contract, int numRows, TagValueListSPtr const & mktDepthOptions)""" return _swigibpy.EClientSocketBase_reqMktDepth(self, tickerId, contract, numRows, mktDepthOptions)
[ "reqMktDepth", "(", "EClientSocketBase", "self", "TickerId", "tickerId", "Contract", "contract", "int", "numRows", "TagValueListSPtr", "const", "&", "mktDepthOptions", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1502-L1504
[ "def", "reqMktDepth", "(", "self", ",", "tickerId", ",", "contract", ",", "numRows", ",", "mktDepthOptions", ")", ":", "return", "_swigibpy", ".", "EClientSocketBase_reqMktDepth", "(", "self", ",", "tickerId", ",", "contract", ",", "numRows", ",", "mktDepthOptio...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EClientSocketBase.reqHistoricalData
reqHistoricalData(EClientSocketBase self, TickerId id, Contract contract, IBString const & endDateTime, IBString const & durationStr, IBString const & barSizeSetting, IBString const & whatToShow, int useRTH, int formatDate, TagValueListSPtr const & chartOptions)
swigibpy.py
def reqHistoricalData(self, id, contract, endDateTime, durationStr, barSizeSetting, whatToShow, useRTH, formatDate, chartOptions): """reqHistoricalData(EClientSocketBase self, TickerId id, Contract contract, IBString const & endDateTime, IBString const & durationStr, IBString const & barSizeSetting, IBString co...
def reqHistoricalData(self, id, contract, endDateTime, durationStr, barSizeSetting, whatToShow, useRTH, formatDate, chartOptions): """reqHistoricalData(EClientSocketBase self, TickerId id, Contract contract, IBString const & endDateTime, IBString const & durationStr, IBString const & barSizeSetting, IBString co...
[ "reqHistoricalData", "(", "EClientSocketBase", "self", "TickerId", "id", "Contract", "contract", "IBString", "const", "&", "endDateTime", "IBString", "const", "&", "durationStr", "IBString", "const", "&", "barSizeSetting", "IBString", "const", "&", "whatToShow", "int"...
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1552-L1554
[ "def", "reqHistoricalData", "(", "self", ",", "id", ",", "contract", ",", "endDateTime", ",", "durationStr", ",", "barSizeSetting", ",", "whatToShow", ",", "useRTH", ",", "formatDate", ",", "chartOptions", ")", ":", "return", "_swigibpy", ".", "EClientSocketBase...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EClientSocketBase.exerciseOptions
exerciseOptions(EClientSocketBase self, TickerId tickerId, Contract contract, int exerciseAction, int exerciseQuantity, IBString const & account, int override)
swigibpy.py
def exerciseOptions(self, tickerId, contract, exerciseAction, exerciseQuantity, account, override): """exerciseOptions(EClientSocketBase self, TickerId tickerId, Contract contract, int exerciseAction, int exerciseQuantity, IBString const & account, int override)""" return _swigibpy.EClientSocketBase_exe...
def exerciseOptions(self, tickerId, contract, exerciseAction, exerciseQuantity, account, override): """exerciseOptions(EClientSocketBase self, TickerId tickerId, Contract contract, int exerciseAction, int exerciseQuantity, IBString const & account, int override)""" return _swigibpy.EClientSocketBase_exe...
[ "exerciseOptions", "(", "EClientSocketBase", "self", "TickerId", "tickerId", "Contract", "contract", "int", "exerciseAction", "int", "exerciseQuantity", "IBString", "const", "&", "account", "int", "override", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1557-L1559
[ "def", "exerciseOptions", "(", "self", ",", "tickerId", ",", "contract", ",", "exerciseAction", ",", "exerciseQuantity", ",", "account", ",", "override", ")", ":", "return", "_swigibpy", ".", "EClientSocketBase_exerciseOptions", "(", "self", ",", "tickerId", ",", ...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EClientSocketBase.reqRealTimeBars
reqRealTimeBars(EClientSocketBase self, TickerId id, Contract contract, int barSize, IBString const & whatToShow, bool useRTH, TagValueListSPtr const & realTimeBarsOptions)
swigibpy.py
def reqRealTimeBars(self, id, contract, barSize, whatToShow, useRTH, realTimeBarsOptions): """reqRealTimeBars(EClientSocketBase self, TickerId id, Contract contract, int barSize, IBString const & whatToShow, bool useRTH, TagValueListSPtr const & realTimeBarsOptions)""" return _swigibpy.EClientSocketBase...
def reqRealTimeBars(self, id, contract, barSize, whatToShow, useRTH, realTimeBarsOptions): """reqRealTimeBars(EClientSocketBase self, TickerId id, Contract contract, int barSize, IBString const & whatToShow, bool useRTH, TagValueListSPtr const & realTimeBarsOptions)""" return _swigibpy.EClientSocketBase...
[ "reqRealTimeBars", "(", "EClientSocketBase", "self", "TickerId", "id", "Contract", "contract", "int", "barSize", "IBString", "const", "&", "whatToShow", "bool", "useRTH", "TagValueListSPtr", "const", "&", "realTimeBarsOptions", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1567-L1569
[ "def", "reqRealTimeBars", "(", "self", ",", "id", ",", "contract", ",", "barSize", ",", "whatToShow", ",", "useRTH", ",", "realTimeBarsOptions", ")", ":", "return", "_swigibpy", ".", "EClientSocketBase_reqRealTimeBars", "(", "self", ",", "id", ",", "contract", ...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EClientSocketBase.reqScannerSubscription
reqScannerSubscription(EClientSocketBase self, int tickerId, ScannerSubscription subscription, TagValueListSPtr const & scannerSubscriptionOptions)
swigibpy.py
def reqScannerSubscription(self, tickerId, subscription, scannerSubscriptionOptions): """reqScannerSubscription(EClientSocketBase self, int tickerId, ScannerSubscription subscription, TagValueListSPtr const & scannerSubscriptionOptions)""" return _swigibpy.EClientSocketBase_reqScannerSubscription(self, ...
def reqScannerSubscription(self, tickerId, subscription, scannerSubscriptionOptions): """reqScannerSubscription(EClientSocketBase self, int tickerId, ScannerSubscription subscription, TagValueListSPtr const & scannerSubscriptionOptions)""" return _swigibpy.EClientSocketBase_reqScannerSubscription(self, ...
[ "reqScannerSubscription", "(", "EClientSocketBase", "self", "int", "tickerId", "ScannerSubscription", "subscription", "TagValueListSPtr", "const", "&", "scannerSubscriptionOptions", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1587-L1589
[ "def", "reqScannerSubscription", "(", "self", ",", "tickerId", ",", "subscription", ",", "scannerSubscriptionOptions", ")", ":", "return", "_swigibpy", ".", "EClientSocketBase_reqScannerSubscription", "(", "self", ",", "tickerId", ",", "subscription", ",", "scannerSubsc...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EClientSocketBase.reqFundamentalData
reqFundamentalData(EClientSocketBase self, TickerId reqId, Contract arg3, IBString const & reportType)
swigibpy.py
def reqFundamentalData(self, reqId, arg3, reportType): """reqFundamentalData(EClientSocketBase self, TickerId reqId, Contract arg3, IBString const & reportType)""" return _swigibpy.EClientSocketBase_reqFundamentalData(self, reqId, arg3, reportType)
def reqFundamentalData(self, reqId, arg3, reportType): """reqFundamentalData(EClientSocketBase self, TickerId reqId, Contract arg3, IBString const & reportType)""" return _swigibpy.EClientSocketBase_reqFundamentalData(self, reqId, arg3, reportType)
[ "reqFundamentalData", "(", "EClientSocketBase", "self", "TickerId", "reqId", "Contract", "arg3", "IBString", "const", "&", "reportType", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1597-L1599
[ "def", "reqFundamentalData", "(", "self", ",", "reqId", ",", "arg3", ",", "reportType", ")", ":", "return", "_swigibpy", ".", "EClientSocketBase_reqFundamentalData", "(", "self", ",", "reqId", ",", "arg3", ",", "reportType", ")" ]
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EClientSocketBase.calculateImpliedVolatility
calculateImpliedVolatility(EClientSocketBase self, TickerId reqId, Contract contract, double optionPrice, double underPrice)
swigibpy.py
def calculateImpliedVolatility(self, reqId, contract, optionPrice, underPrice): """calculateImpliedVolatility(EClientSocketBase self, TickerId reqId, Contract contract, double optionPrice, double underPrice)""" return _swigibpy.EClientSocketBase_calculateImpliedVolatility(self, reqId, contract, optionPr...
def calculateImpliedVolatility(self, reqId, contract, optionPrice, underPrice): """calculateImpliedVolatility(EClientSocketBase self, TickerId reqId, Contract contract, double optionPrice, double underPrice)""" return _swigibpy.EClientSocketBase_calculateImpliedVolatility(self, reqId, contract, optionPr...
[ "calculateImpliedVolatility", "(", "EClientSocketBase", "self", "TickerId", "reqId", "Contract", "contract", "double", "optionPrice", "double", "underPrice", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1607-L1609
[ "def", "calculateImpliedVolatility", "(", "self", ",", "reqId", ",", "contract", ",", "optionPrice", ",", "underPrice", ")", ":", "return", "_swigibpy", ".", "EClientSocketBase_calculateImpliedVolatility", "(", "self", ",", "reqId", ",", "contract", ",", "optionPric...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EClientSocketBase.calculateOptionPrice
calculateOptionPrice(EClientSocketBase self, TickerId reqId, Contract contract, double volatility, double underPrice)
swigibpy.py
def calculateOptionPrice(self, reqId, contract, volatility, underPrice): """calculateOptionPrice(EClientSocketBase self, TickerId reqId, Contract contract, double volatility, double underPrice)""" return _swigibpy.EClientSocketBase_calculateOptionPrice(self, reqId, contract, volatility, underPrice)
def calculateOptionPrice(self, reqId, contract, volatility, underPrice): """calculateOptionPrice(EClientSocketBase self, TickerId reqId, Contract contract, double volatility, double underPrice)""" return _swigibpy.EClientSocketBase_calculateOptionPrice(self, reqId, contract, volatility, underPrice)
[ "calculateOptionPrice", "(", "EClientSocketBase", "self", "TickerId", "reqId", "Contract", "contract", "double", "volatility", "double", "underPrice", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1612-L1614
[ "def", "calculateOptionPrice", "(", "self", ",", "reqId", ",", "contract", ",", "volatility", ",", "underPrice", ")", ":", "return", "_swigibpy", ".", "EClientSocketBase_calculateOptionPrice", "(", "self", ",", "reqId", ",", "contract", ",", "volatility", ",", "...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EClientSocketBase.reqAccountSummary
reqAccountSummary(EClientSocketBase self, int reqId, IBString const & groupName, IBString const & tags)
swigibpy.py
def reqAccountSummary(self, reqId, groupName, tags): """reqAccountSummary(EClientSocketBase self, int reqId, IBString const & groupName, IBString const & tags)""" return _swigibpy.EClientSocketBase_reqAccountSummary(self, reqId, groupName, tags)
def reqAccountSummary(self, reqId, groupName, tags): """reqAccountSummary(EClientSocketBase self, int reqId, IBString const & groupName, IBString const & tags)""" return _swigibpy.EClientSocketBase_reqAccountSummary(self, reqId, groupName, tags)
[ "reqAccountSummary", "(", "EClientSocketBase", "self", "int", "reqId", "IBString", "const", "&", "groupName", "IBString", "const", "&", "tags", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1647-L1649
[ "def", "reqAccountSummary", "(", "self", ",", "reqId", ",", "groupName", ",", "tags", ")", ":", "return", "_swigibpy", ".", "EClientSocketBase_reqAccountSummary", "(", "self", ",", "reqId", ",", "groupName", ",", "tags", ")" ]
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
TWSPoller._run
Continually poll TWS
swigibpy.py
def _run(self): '''Continually poll TWS''' stop = self._stop_evt connected = self._connected_evt tws = self._tws fd = tws.fd() pollfd = [fd] while not stop.is_set(): while (not connected.is_set() or not tws.isConnected()) and not stop.is_set(): ...
def _run(self): '''Continually poll TWS''' stop = self._stop_evt connected = self._connected_evt tws = self._tws fd = tws.fd() pollfd = [fd] while not stop.is_set(): while (not connected.is_set() or not tws.isConnected()) and not stop.is_set(): ...
[ "Continually", "poll", "TWS" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2059-L2106
[ "def", "_run", "(", "self", ")", ":", "stop", "=", "self", ".", "_stop_evt", "connected", "=", "self", ".", "_connected_evt", "tws", "=", "self", ".", "_tws", "fd", "=", "tws", ".", "fd", "(", ")", "pollfd", "=", "[", "fd", "]", "while", "not", "...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.tickPrice
tickPrice(EWrapper self, TickerId tickerId, TickType field, double price, int canAutoExecute)
swigibpy.py
def tickPrice(self, tickerId, field, price, canAutoExecute): """tickPrice(EWrapper self, TickerId tickerId, TickType field, double price, int canAutoExecute)""" return _swigibpy.EWrapper_tickPrice(self, tickerId, field, price, canAutoExecute)
def tickPrice(self, tickerId, field, price, canAutoExecute): """tickPrice(EWrapper self, TickerId tickerId, TickType field, double price, int canAutoExecute)""" return _swigibpy.EWrapper_tickPrice(self, tickerId, field, price, canAutoExecute)
[ "tickPrice", "(", "EWrapper", "self", "TickerId", "tickerId", "TickType", "field", "double", "price", "int", "canAutoExecute", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2421-L2423
[ "def", "tickPrice", "(", "self", ",", "tickerId", ",", "field", ",", "price", ",", "canAutoExecute", ")", ":", "return", "_swigibpy", ".", "EWrapper_tickPrice", "(", "self", ",", "tickerId", ",", "field", ",", "price", ",", "canAutoExecute", ")" ]
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.tickSize
tickSize(EWrapper self, TickerId tickerId, TickType field, int size)
swigibpy.py
def tickSize(self, tickerId, field, size): """tickSize(EWrapper self, TickerId tickerId, TickType field, int size)""" return _swigibpy.EWrapper_tickSize(self, tickerId, field, size)
def tickSize(self, tickerId, field, size): """tickSize(EWrapper self, TickerId tickerId, TickType field, int size)""" return _swigibpy.EWrapper_tickSize(self, tickerId, field, size)
[ "tickSize", "(", "EWrapper", "self", "TickerId", "tickerId", "TickType", "field", "int", "size", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2426-L2428
[ "def", "tickSize", "(", "self", ",", "tickerId", ",", "field", ",", "size", ")", ":", "return", "_swigibpy", ".", "EWrapper_tickSize", "(", "self", ",", "tickerId", ",", "field", ",", "size", ")" ]
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.tickOptionComputation
tickOptionComputation(EWrapper self, TickerId tickerId, TickType tickType, double impliedVol, double delta, double optPrice, double pvDividend, double gamma, double vega, double theta, double undPrice)
swigibpy.py
def tickOptionComputation(self, tickerId, tickType, impliedVol, delta, optPrice, pvDividend, gamma, vega, theta, undPrice): """tickOptionComputation(EWrapper self, TickerId tickerId, TickType tickType, double impliedVol, double delta, double optPrice, double pvDividend, double gamma, double vega, double theta, ...
def tickOptionComputation(self, tickerId, tickType, impliedVol, delta, optPrice, pvDividend, gamma, vega, theta, undPrice): """tickOptionComputation(EWrapper self, TickerId tickerId, TickType tickType, double impliedVol, double delta, double optPrice, double pvDividend, double gamma, double vega, double theta, ...
[ "tickOptionComputation", "(", "EWrapper", "self", "TickerId", "tickerId", "TickType", "tickType", "double", "impliedVol", "double", "delta", "double", "optPrice", "double", "pvDividend", "double", "gamma", "double", "vega", "double", "theta", "double", "undPrice", ")"...
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2431-L2433
[ "def", "tickOptionComputation", "(", "self", ",", "tickerId", ",", "tickType", ",", "impliedVol", ",", "delta", ",", "optPrice", ",", "pvDividend", ",", "gamma", ",", "vega", ",", "theta", ",", "undPrice", ")", ":", "return", "_swigibpy", ".", "EWrapper_tick...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.tickGeneric
tickGeneric(EWrapper self, TickerId tickerId, TickType tickType, double value)
swigibpy.py
def tickGeneric(self, tickerId, tickType, value): """tickGeneric(EWrapper self, TickerId tickerId, TickType tickType, double value)""" return _swigibpy.EWrapper_tickGeneric(self, tickerId, tickType, value)
def tickGeneric(self, tickerId, tickType, value): """tickGeneric(EWrapper self, TickerId tickerId, TickType tickType, double value)""" return _swigibpy.EWrapper_tickGeneric(self, tickerId, tickType, value)
[ "tickGeneric", "(", "EWrapper", "self", "TickerId", "tickerId", "TickType", "tickType", "double", "value", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2436-L2438
[ "def", "tickGeneric", "(", "self", ",", "tickerId", ",", "tickType", ",", "value", ")", ":", "return", "_swigibpy", ".", "EWrapper_tickGeneric", "(", "self", ",", "tickerId", ",", "tickType", ",", "value", ")" ]
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.tickString
tickString(EWrapper self, TickerId tickerId, TickType tickType, IBString const & value)
swigibpy.py
def tickString(self, tickerId, tickType, value): """tickString(EWrapper self, TickerId tickerId, TickType tickType, IBString const & value)""" return _swigibpy.EWrapper_tickString(self, tickerId, tickType, value)
def tickString(self, tickerId, tickType, value): """tickString(EWrapper self, TickerId tickerId, TickType tickType, IBString const & value)""" return _swigibpy.EWrapper_tickString(self, tickerId, tickType, value)
[ "tickString", "(", "EWrapper", "self", "TickerId", "tickerId", "TickType", "tickType", "IBString", "const", "&", "value", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2441-L2443
[ "def", "tickString", "(", "self", ",", "tickerId", ",", "tickType", ",", "value", ")", ":", "return", "_swigibpy", ".", "EWrapper_tickString", "(", "self", ",", "tickerId", ",", "tickType", ",", "value", ")" ]
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.tickEFP
tickEFP(EWrapper self, TickerId tickerId, TickType tickType, double basisPoints, IBString const & formattedBasisPoints, double totalDividends, int holdDays, IBString const & futureExpiry, double dividendImpact, double dividendsToExpiry)
swigibpy.py
def tickEFP(self, tickerId, tickType, basisPoints, formattedBasisPoints, totalDividends, holdDays, futureExpiry, dividendImpact, dividendsToExpiry): """tickEFP(EWrapper self, TickerId tickerId, TickType tickType, double basisPoints, IBString const & formattedBasisPoints, double totalDividends, int holdDays, IBS...
def tickEFP(self, tickerId, tickType, basisPoints, formattedBasisPoints, totalDividends, holdDays, futureExpiry, dividendImpact, dividendsToExpiry): """tickEFP(EWrapper self, TickerId tickerId, TickType tickType, double basisPoints, IBString const & formattedBasisPoints, double totalDividends, int holdDays, IBS...
[ "tickEFP", "(", "EWrapper", "self", "TickerId", "tickerId", "TickType", "tickType", "double", "basisPoints", "IBString", "const", "&", "formattedBasisPoints", "double", "totalDividends", "int", "holdDays", "IBString", "const", "&", "futureExpiry", "double", "dividendImp...
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2446-L2448
[ "def", "tickEFP", "(", "self", ",", "tickerId", ",", "tickType", ",", "basisPoints", ",", "formattedBasisPoints", ",", "totalDividends", ",", "holdDays", ",", "futureExpiry", ",", "dividendImpact", ",", "dividendsToExpiry", ")", ":", "return", "_swigibpy", ".", ...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.orderStatus
orderStatus(EWrapper self, OrderId orderId, IBString const & status, int filled, int remaining, double avgFillPrice, int permId, int parentId, double lastFillPrice, int clientId, IBString const & whyHeld)
swigibpy.py
def orderStatus(self, orderId, status, filled, remaining, avgFillPrice, permId, parentId, lastFillPrice, clientId, whyHeld): """orderStatus(EWrapper self, OrderId orderId, IBString const & status, int filled, int remaining, double avgFillPrice, int permId, int parentId, double lastFillPrice, int clientId, IBStr...
def orderStatus(self, orderId, status, filled, remaining, avgFillPrice, permId, parentId, lastFillPrice, clientId, whyHeld): """orderStatus(EWrapper self, OrderId orderId, IBString const & status, int filled, int remaining, double avgFillPrice, int permId, int parentId, double lastFillPrice, int clientId, IBStr...
[ "orderStatus", "(", "EWrapper", "self", "OrderId", "orderId", "IBString", "const", "&", "status", "int", "filled", "int", "remaining", "double", "avgFillPrice", "int", "permId", "int", "parentId", "double", "lastFillPrice", "int", "clientId", "IBString", "const", ...
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2451-L2453
[ "def", "orderStatus", "(", "self", ",", "orderId", ",", "status", ",", "filled", ",", "remaining", ",", "avgFillPrice", ",", "permId", ",", "parentId", ",", "lastFillPrice", ",", "clientId", ",", "whyHeld", ")", ":", "return", "_swigibpy", ".", "EWrapper_ord...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.openOrder
openOrder(EWrapper self, OrderId orderId, Contract arg0, Order arg1, OrderState arg2)
swigibpy.py
def openOrder(self, orderId, arg0, arg1, arg2): """openOrder(EWrapper self, OrderId orderId, Contract arg0, Order arg1, OrderState arg2)""" return _swigibpy.EWrapper_openOrder(self, orderId, arg0, arg1, arg2)
def openOrder(self, orderId, arg0, arg1, arg2): """openOrder(EWrapper self, OrderId orderId, Contract arg0, Order arg1, OrderState arg2)""" return _swigibpy.EWrapper_openOrder(self, orderId, arg0, arg1, arg2)
[ "openOrder", "(", "EWrapper", "self", "OrderId", "orderId", "Contract", "arg0", "Order", "arg1", "OrderState", "arg2", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2456-L2458
[ "def", "openOrder", "(", "self", ",", "orderId", ",", "arg0", ",", "arg1", ",", "arg2", ")", ":", "return", "_swigibpy", ".", "EWrapper_openOrder", "(", "self", ",", "orderId", ",", "arg0", ",", "arg1", ",", "arg2", ")" ]
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.updateAccountValue
updateAccountValue(EWrapper self, IBString const & key, IBString const & val, IBString const & currency, IBString const & accountName)
swigibpy.py
def updateAccountValue(self, key, val, currency, accountName): """updateAccountValue(EWrapper self, IBString const & key, IBString const & val, IBString const & currency, IBString const & accountName)""" return _swigibpy.EWrapper_updateAccountValue(self, key, val, currency, accountName)
def updateAccountValue(self, key, val, currency, accountName): """updateAccountValue(EWrapper self, IBString const & key, IBString const & val, IBString const & currency, IBString const & accountName)""" return _swigibpy.EWrapper_updateAccountValue(self, key, val, currency, accountName)
[ "updateAccountValue", "(", "EWrapper", "self", "IBString", "const", "&", "key", "IBString", "const", "&", "val", "IBString", "const", "&", "currency", "IBString", "const", "&", "accountName", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2477-L2479
[ "def", "updateAccountValue", "(", "self", ",", "key", ",", "val", ",", "currency", ",", "accountName", ")", ":", "return", "_swigibpy", ".", "EWrapper_updateAccountValue", "(", "self", ",", "key", ",", "val", ",", "currency", ",", "accountName", ")" ]
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.updatePortfolio
updatePortfolio(EWrapper self, Contract contract, int position, double marketPrice, double marketValue, double averageCost, double unrealizedPNL, double realizedPNL, IBString const & accountName)
swigibpy.py
def updatePortfolio(self, contract, position, marketPrice, marketValue, averageCost, unrealizedPNL, realizedPNL, accountName): """updatePortfolio(EWrapper self, Contract contract, int position, double marketPrice, double marketValue, double averageCost, double unrealizedPNL, double realizedPNL, IBString const &...
def updatePortfolio(self, contract, position, marketPrice, marketValue, averageCost, unrealizedPNL, realizedPNL, accountName): """updatePortfolio(EWrapper self, Contract contract, int position, double marketPrice, double marketValue, double averageCost, double unrealizedPNL, double realizedPNL, IBString const &...
[ "updatePortfolio", "(", "EWrapper", "self", "Contract", "contract", "int", "position", "double", "marketPrice", "double", "marketValue", "double", "averageCost", "double", "unrealizedPNL", "double", "realizedPNL", "IBString", "const", "&", "accountName", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2482-L2484
[ "def", "updatePortfolio", "(", "self", ",", "contract", ",", "position", ",", "marketPrice", ",", "marketValue", ",", "averageCost", ",", "unrealizedPNL", ",", "realizedPNL", ",", "accountName", ")", ":", "return", "_swigibpy", ".", "EWrapper_updatePortfolio", "("...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.execDetails
execDetails(EWrapper self, int reqId, Contract contract, Execution execution)
swigibpy.py
def execDetails(self, reqId, contract, execution): """execDetails(EWrapper self, int reqId, Contract contract, Execution execution)""" return _swigibpy.EWrapper_execDetails(self, reqId, contract, execution)
def execDetails(self, reqId, contract, execution): """execDetails(EWrapper self, int reqId, Contract contract, Execution execution)""" return _swigibpy.EWrapper_execDetails(self, reqId, contract, execution)
[ "execDetails", "(", "EWrapper", "self", "int", "reqId", "Contract", "contract", "Execution", "execution", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2517-L2519
[ "def", "execDetails", "(", "self", ",", "reqId", ",", "contract", ",", "execution", ")", ":", "return", "_swigibpy", ".", "EWrapper_execDetails", "(", "self", ",", "reqId", ",", "contract", ",", "execution", ")" ]
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.error
Error during communication with TWS
swigibpy.py
def error(self, id, errorCode, errorString): '''Error during communication with TWS''' if errorCode == 165: # Historical data sevice message sys.stderr.write("TWS INFO - %s: %s\n" % (errorCode, errorString)) elif errorCode >= 501 and errorCode < 600: # Socket read failed ...
def error(self, id, errorCode, errorString): '''Error during communication with TWS''' if errorCode == 165: # Historical data sevice message sys.stderr.write("TWS INFO - %s: %s\n" % (errorCode, errorString)) elif errorCode >= 501 and errorCode < 600: # Socket read failed ...
[ "Error", "during", "communication", "with", "TWS" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2527-L2542
[ "def", "error", "(", "self", ",", "id", ",", "errorCode", ",", "errorString", ")", ":", "if", "errorCode", "==", "165", ":", "# Historical data sevice message", "sys", ".", "stderr", ".", "write", "(", "\"TWS INFO - %s: %s\\n\"", "%", "(", "errorCode", ",", ...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.updateMktDepth
updateMktDepth(EWrapper self, TickerId id, int position, int operation, int side, double price, int size)
swigibpy.py
def updateMktDepth(self, id, position, operation, side, price, size): """updateMktDepth(EWrapper self, TickerId id, int position, int operation, int side, double price, int size)""" return _swigibpy.EWrapper_updateMktDepth(self, id, position, operation, side, price, size)
def updateMktDepth(self, id, position, operation, side, price, size): """updateMktDepth(EWrapper self, TickerId id, int position, int operation, int side, double price, int size)""" return _swigibpy.EWrapper_updateMktDepth(self, id, position, operation, side, price, size)
[ "updateMktDepth", "(", "EWrapper", "self", "TickerId", "id", "int", "position", "int", "operation", "int", "side", "double", "price", "int", "size", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2546-L2548
[ "def", "updateMktDepth", "(", "self", ",", "id", ",", "position", ",", "operation", ",", "side", ",", "price", ",", "size", ")", ":", "return", "_swigibpy", ".", "EWrapper_updateMktDepth", "(", "self", ",", "id", ",", "position", ",", "operation", ",", "...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.updateMktDepthL2
updateMktDepthL2(EWrapper self, TickerId id, int position, IBString marketMaker, int operation, int side, double price, int size)
swigibpy.py
def updateMktDepthL2(self, id, position, marketMaker, operation, side, price, size): """updateMktDepthL2(EWrapper self, TickerId id, int position, IBString marketMaker, int operation, int side, double price, int size)""" return _swigibpy.EWrapper_updateMktDepthL2(self, id, position, marketMaker, operati...
def updateMktDepthL2(self, id, position, marketMaker, operation, side, price, size): """updateMktDepthL2(EWrapper self, TickerId id, int position, IBString marketMaker, int operation, int side, double price, int size)""" return _swigibpy.EWrapper_updateMktDepthL2(self, id, position, marketMaker, operati...
[ "updateMktDepthL2", "(", "EWrapper", "self", "TickerId", "id", "int", "position", "IBString", "marketMaker", "int", "operation", "int", "side", "double", "price", "int", "size", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2551-L2553
[ "def", "updateMktDepthL2", "(", "self", ",", "id", ",", "position", ",", "marketMaker", ",", "operation", ",", "side", ",", "price", ",", "size", ")", ":", "return", "_swigibpy", ".", "EWrapper_updateMktDepthL2", "(", "self", ",", "id", ",", "position", ",...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.updateNewsBulletin
updateNewsBulletin(EWrapper self, int msgId, int msgType, IBString const & newsMessage, IBString const & originExch)
swigibpy.py
def updateNewsBulletin(self, msgId, msgType, newsMessage, originExch): """updateNewsBulletin(EWrapper self, int msgId, int msgType, IBString const & newsMessage, IBString const & originExch)""" return _swigibpy.EWrapper_updateNewsBulletin(self, msgId, msgType, newsMessage, originExch)
def updateNewsBulletin(self, msgId, msgType, newsMessage, originExch): """updateNewsBulletin(EWrapper self, int msgId, int msgType, IBString const & newsMessage, IBString const & originExch)""" return _swigibpy.EWrapper_updateNewsBulletin(self, msgId, msgType, newsMessage, originExch)
[ "updateNewsBulletin", "(", "EWrapper", "self", "int", "msgId", "int", "msgType", "IBString", "const", "&", "newsMessage", "IBString", "const", "&", "originExch", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2556-L2558
[ "def", "updateNewsBulletin", "(", "self", ",", "msgId", ",", "msgType", ",", "newsMessage", ",", "originExch", ")", ":", "return", "_swigibpy", ".", "EWrapper_updateNewsBulletin", "(", "self", ",", "msgId", ",", "msgType", ",", "newsMessage", ",", "originExch", ...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.historicalData
historicalData(EWrapper self, TickerId reqId, IBString const & date, double open, double high, double low, double close, int volume, int barCount, double WAP, int hasGaps)
swigibpy.py
def historicalData(self, reqId, date, open, high, low, close, volume, barCount, WAP, hasGaps): """historicalData(EWrapper self, TickerId reqId, IBString const & date, double open, double high, double low, double close, int volume, int barCount, double WAP, int hasGaps)""" return _swigibpy.EWrapper_histo...
def historicalData(self, reqId, date, open, high, low, close, volume, barCount, WAP, hasGaps): """historicalData(EWrapper self, TickerId reqId, IBString const & date, double open, double high, double low, double close, int volume, int barCount, double WAP, int hasGaps)""" return _swigibpy.EWrapper_histo...
[ "historicalData", "(", "EWrapper", "self", "TickerId", "reqId", "IBString", "const", "&", "date", "double", "open", "double", "high", "double", "low", "double", "close", "int", "volume", "int", "barCount", "double", "WAP", "int", "hasGaps", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2571-L2573
[ "def", "historicalData", "(", "self", ",", "reqId", ",", "date", ",", "open", ",", "high", ",", "low", ",", "close", ",", "volume", ",", "barCount", ",", "WAP", ",", "hasGaps", ")", ":", "return", "_swigibpy", ".", "EWrapper_historicalData", "(", "self",...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.scannerData
scannerData(EWrapper self, int reqId, int rank, ContractDetails contractDetails, IBString const & distance, IBString const & benchmark, IBString const & projection, IBString const & legsStr)
swigibpy.py
def scannerData(self, reqId, rank, contractDetails, distance, benchmark, projection, legsStr): """scannerData(EWrapper self, int reqId, int rank, ContractDetails contractDetails, IBString const & distance, IBString const & benchmark, IBString const & projection, IBString const & legsStr)""" return _swig...
def scannerData(self, reqId, rank, contractDetails, distance, benchmark, projection, legsStr): """scannerData(EWrapper self, int reqId, int rank, ContractDetails contractDetails, IBString const & distance, IBString const & benchmark, IBString const & projection, IBString const & legsStr)""" return _swig...
[ "scannerData", "(", "EWrapper", "self", "int", "reqId", "int", "rank", "ContractDetails", "contractDetails", "IBString", "const", "&", "distance", "IBString", "const", "&", "benchmark", "IBString", "const", "&", "projection", "IBString", "const", "&", "legsStr", "...
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2581-L2583
[ "def", "scannerData", "(", "self", ",", "reqId", ",", "rank", ",", "contractDetails", ",", "distance", ",", "benchmark", ",", "projection", ",", "legsStr", ")", ":", "return", "_swigibpy", ".", "EWrapper_scannerData", "(", "self", ",", "reqId", ",", "rank", ...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.realtimeBar
realtimeBar(EWrapper self, TickerId reqId, long time, double open, double high, double low, double close, long volume, double wap, int count)
swigibpy.py
def realtimeBar(self, reqId, time, open, high, low, close, volume, wap, count): """realtimeBar(EWrapper self, TickerId reqId, long time, double open, double high, double low, double close, long volume, double wap, int count)""" return _swigibpy.EWrapper_realtimeBar(self, reqId, time, open, high, low, cl...
def realtimeBar(self, reqId, time, open, high, low, close, volume, wap, count): """realtimeBar(EWrapper self, TickerId reqId, long time, double open, double high, double low, double close, long volume, double wap, int count)""" return _swigibpy.EWrapper_realtimeBar(self, reqId, time, open, high, low, cl...
[ "realtimeBar", "(", "EWrapper", "self", "TickerId", "reqId", "long", "time", "double", "open", "double", "high", "double", "low", "double", "close", "long", "volume", "double", "wap", "int", "count", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2591-L2593
[ "def", "realtimeBar", "(", "self", ",", "reqId", ",", "time", ",", "open", ",", "high", ",", "low", ",", "close", ",", "volume", ",", "wap", ",", "count", ")", ":", "return", "_swigibpy", ".", "EWrapper_realtimeBar", "(", "self", ",", "reqId", ",", "...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.position
position(EWrapper self, IBString const & account, Contract contract, int position, double avgCost)
swigibpy.py
def position(self, account, contract, position, avgCost): """position(EWrapper self, IBString const & account, Contract contract, int position, double avgCost)""" return _swigibpy.EWrapper_position(self, account, contract, position, avgCost)
def position(self, account, contract, position, avgCost): """position(EWrapper self, IBString const & account, Contract contract, int position, double avgCost)""" return _swigibpy.EWrapper_position(self, account, contract, position, avgCost)
[ "position", "(", "EWrapper", "self", "IBString", "const", "&", "account", "Contract", "contract", "int", "position", "double", "avgCost", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2626-L2628
[ "def", "position", "(", "self", ",", "account", ",", "contract", ",", "position", ",", "avgCost", ")", ":", "return", "_swigibpy", ".", "EWrapper_position", "(", "self", ",", "account", ",", "contract", ",", "position", ",", "avgCost", ")" ]
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.accountSummary
accountSummary(EWrapper self, int reqId, IBString const & account, IBString const & tag, IBString const & value, IBString const & curency)
swigibpy.py
def accountSummary(self, reqId, account, tag, value, curency): """accountSummary(EWrapper self, int reqId, IBString const & account, IBString const & tag, IBString const & value, IBString const & curency)""" return _swigibpy.EWrapper_accountSummary(self, reqId, account, tag, value, curency)
def accountSummary(self, reqId, account, tag, value, curency): """accountSummary(EWrapper self, int reqId, IBString const & account, IBString const & tag, IBString const & value, IBString const & curency)""" return _swigibpy.EWrapper_accountSummary(self, reqId, account, tag, value, curency)
[ "accountSummary", "(", "EWrapper", "self", "int", "reqId", "IBString", "const", "&", "account", "IBString", "const", "&", "tag", "IBString", "const", "&", "value", "IBString", "const", "&", "curency", ")" ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2636-L2638
[ "def", "accountSummary", "(", "self", ",", "reqId", ",", "account", ",", "tag", ",", "value", ",", "curency", ")", ":", "return", "_swigibpy", ".", "EWrapper_accountSummary", "(", "self", ",", "reqId", ",", "account", ",", "tag", ",", "value", ",", "cure...
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
EWrapper.pyError
Handles an error thrown during invocation of an EWrapper method. Arguments are those provided by sys.exc_info()
swigibpy.py
def pyError(self, type, value, traceback): '''Handles an error thrown during invocation of an EWrapper method. Arguments are those provided by sys.exc_info() ''' sys.stderr.write("Exception thrown during EWrapper method dispatch:\n") print_exception(type, value, traceback)
def pyError(self, type, value, traceback): '''Handles an error thrown during invocation of an EWrapper method. Arguments are those provided by sys.exc_info() ''' sys.stderr.write("Exception thrown during EWrapper method dispatch:\n") print_exception(type, value, traceback)
[ "Handles", "an", "error", "thrown", "during", "invocation", "of", "an", "EWrapper", "method", "." ]
Komnomnomnom/swigibpy
python
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2666-L2672
[ "def", "pyError", "(", "self", ",", "type", ",", "value", ",", "traceback", ")", ":", "sys", ".", "stderr", ".", "write", "(", "\"Exception thrown during EWrapper method dispatch:\\n\"", ")", "print_exception", "(", "type", ",", "value", ",", "traceback", ")" ]
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
train
HdrPayload.init_counts
Called after instantiating with a compressed payload Params: counts_len counts size to use based on decoded settings in the header
hdrh/codec.py
def init_counts(self, counts_len): '''Called after instantiating with a compressed payload Params: counts_len counts size to use based on decoded settings in the header ''' assert self._data and counts_len and self.counts_len == 0 self.counts_len = counts_len ...
def init_counts(self, counts_len): '''Called after instantiating with a compressed payload Params: counts_len counts size to use based on decoded settings in the header ''' assert self._data and counts_len and self.counts_len == 0 self.counts_len = counts_len ...
[ "Called", "after", "instantiating", "with", "a", "compressed", "payload", "Params", ":", "counts_len", "counts", "size", "to", "use", "based", "on", "decoded", "settings", "in", "the", "header" ]
HdrHistogram/HdrHistogram_py
python
https://github.com/HdrHistogram/HdrHistogram_py/blob/cb99981b0564a62e1aa02bd764efa6445923f8f7/hdrh/codec.py#L156-L169
[ "def", "init_counts", "(", "self", ",", "counts_len", ")", ":", "assert", "self", ".", "_data", "and", "counts_len", "and", "self", ".", "counts_len", "==", "0", "self", ".", "counts_len", "=", "counts_len", "self", ".", "_init_counts", "(", ")", "results"...
cb99981b0564a62e1aa02bd764efa6445923f8f7
train
HdrPayload._decompress
Decompress a compressed payload into this payload wrapper. Note that the decompressed buffer is saved in self._data and the counts array is not yet allocated. Args: compressed_payload (string) a payload in zlib compressed form Exception: HdrCookieException: ...
hdrh/codec.py
def _decompress(self, compressed_payload): '''Decompress a compressed payload into this payload wrapper. Note that the decompressed buffer is saved in self._data and the counts array is not yet allocated. Args: compressed_payload (string) a payload in zlib compressed form ...
def _decompress(self, compressed_payload): '''Decompress a compressed payload into this payload wrapper. Note that the decompressed buffer is saved in self._data and the counts array is not yet allocated. Args: compressed_payload (string) a payload in zlib compressed form ...
[ "Decompress", "a", "compressed", "payload", "into", "this", "payload", "wrapper", ".", "Note", "that", "the", "decompressed", "buffer", "is", "saved", "in", "self", ".", "_data", "and", "the", "counts", "array", "is", "not", "yet", "allocated", "." ]
HdrHistogram/HdrHistogram_py
python
https://github.com/HdrHistogram/HdrHistogram_py/blob/cb99981b0564a62e1aa02bd764efa6445923f8f7/hdrh/codec.py#L174-L211
[ "def", "_decompress", "(", "self", ",", "compressed_payload", ")", ":", "# make sure this instance is pristine", "if", "self", ".", "_data", ":", "raise", "RuntimeError", "(", "'Cannot decompress to an instance with payload'", ")", "# Here it is important to keep a reference to...
cb99981b0564a62e1aa02bd764efa6445923f8f7
train
HdrPayload.compress
Compress this payload instance Args: counts_limit how many counters should be encoded starting from index 0 (can be 0), Return: the compressed payload (python string)
hdrh/codec.py
def compress(self, counts_limit): '''Compress this payload instance Args: counts_limit how many counters should be encoded starting from index 0 (can be 0), Return: the compressed payload (python string) ''' if self.payload: ...
def compress(self, counts_limit): '''Compress this payload instance Args: counts_limit how many counters should be encoded starting from index 0 (can be 0), Return: the compressed payload (python string) ''' if self.payload: ...
[ "Compress", "this", "payload", "instance", "Args", ":", "counts_limit", "how", "many", "counters", "should", "be", "encoded", "starting", "from", "index", "0", "(", "can", "be", "0", ")", "Return", ":", "the", "compressed", "payload", "(", "python", "string"...
HdrHistogram/HdrHistogram_py
python
https://github.com/HdrHistogram/HdrHistogram_py/blob/cb99981b0564a62e1aa02bd764efa6445923f8f7/hdrh/codec.py#L213-L241
[ "def", "compress", "(", "self", ",", "counts_limit", ")", ":", "if", "self", ".", "payload", ":", "# worst case varint encoded length is when each counter is at the maximum value", "# in this case 1 more byte per counter is needed due to the more bits", "varint_len", "=", "counts_l...
cb99981b0564a62e1aa02bd764efa6445923f8f7
train
HdrHistogramEncoder.encode
Compress the associated encodable payload, prepend the header then encode with base64 if requested Returns: the b64 encoded wire encoding of the histogram (as a string) or the compressed payload (as a string, if b64 wrappinb is disabled)
hdrh/codec.py
def encode(self): '''Compress the associated encodable payload, prepend the header then encode with base64 if requested Returns: the b64 encoded wire encoding of the histogram (as a string) or the compressed payload (as a string, if b64 wrappinb is disabled) ''' ...
def encode(self): '''Compress the associated encodable payload, prepend the header then encode with base64 if requested Returns: the b64 encoded wire encoding of the histogram (as a string) or the compressed payload (as a string, if b64 wrappinb is disabled) ''' ...
[ "Compress", "the", "associated", "encodable", "payload", "prepend", "the", "header", "then", "encode", "with", "base64", "if", "requested" ]
HdrHistogram/HdrHistogram_py
python
https://github.com/HdrHistogram/HdrHistogram_py/blob/cb99981b0564a62e1aa02bd764efa6445923f8f7/hdrh/codec.py#L290-L310
[ "def", "encode", "(", "self", ")", ":", "# only compress the first non zero buckets", "# if histogram is empty we do not encode any counter", "if", "self", ".", "histogram", ".", "total_count", ":", "relevant_length", "=", "self", ".", "histogram", ".", "get_counts_array_in...
cb99981b0564a62e1aa02bd764efa6445923f8f7
train
HdrHistogramEncoder.decode
Decode a wire histogram encoding into a read-only Hdr Payload instance Args: encoded_histogram a string containing the wire encoding of a histogram such as one returned from encode() Returns: an hdr_payload instance with all the decoded/uncompressed ...
hdrh/codec.py
def decode(encoded_histogram, b64_wrap=True): '''Decode a wire histogram encoding into a read-only Hdr Payload instance Args: encoded_histogram a string containing the wire encoding of a histogram such as one returned from encode() Returns: a...
def decode(encoded_histogram, b64_wrap=True): '''Decode a wire histogram encoding into a read-only Hdr Payload instance Args: encoded_histogram a string containing the wire encoding of a histogram such as one returned from encode() Returns: a...
[ "Decode", "a", "wire", "histogram", "encoding", "into", "a", "read", "-", "only", "Hdr", "Payload", "instance", "Args", ":", "encoded_histogram", "a", "string", "containing", "the", "wire", "encoding", "of", "a", "histogram", "such", "as", "one", "returned", ...
HdrHistogram/HdrHistogram_py
python
https://github.com/HdrHistogram/HdrHistogram_py/blob/cb99981b0564a62e1aa02bd764efa6445923f8f7/hdrh/codec.py#L313-L356
[ "def", "decode", "(", "encoded_histogram", ",", "b64_wrap", "=", "True", ")", ":", "if", "b64_wrap", ":", "b64decode", "=", "base64", ".", "b64decode", "(", "encoded_histogram", ")", "# this string has 2 parts in it: the header (raw) and the payload (compressed)", "b64dec...
cb99981b0564a62e1aa02bd764efa6445923f8f7
train
HdrHistogram.record_value
Record a new value into the histogram Args: value: the value to record (must be in the valid range) count: incremental count (defaults to 1)
hdrh/histogram.py
def record_value(self, value, count=1): '''Record a new value into the histogram Args: value: the value to record (must be in the valid range) count: incremental count (defaults to 1) ''' if value < 0: return False counts_index = self._counts_...
def record_value(self, value, count=1): '''Record a new value into the histogram Args: value: the value to record (must be in the valid range) count: incremental count (defaults to 1) ''' if value < 0: return False counts_index = self._counts_...
[ "Record", "a", "new", "value", "into", "the", "histogram" ]
HdrHistogram/HdrHistogram_py
python
https://github.com/HdrHistogram/HdrHistogram_py/blob/cb99981b0564a62e1aa02bd764efa6445923f8f7/hdrh/histogram.py#L175-L191
[ "def", "record_value", "(", "self", ",", "value", ",", "count", "=", "1", ")", ":", "if", "value", "<", "0", ":", "return", "False", "counts_index", "=", "self", ".", "_counts_index_for", "(", "value", ")", "if", "(", "counts_index", "<", "0", ")", "...
cb99981b0564a62e1aa02bd764efa6445923f8f7
train
HdrHistogram.record_corrected_value
Record a new value into the histogram and correct for coordinated omission if needed Args: value: the value to record (must be in the valid range) expected_interval: the expected interval between 2 value samples count: incremental count (defaults to 1)
hdrh/histogram.py
def record_corrected_value(self, value, expected_interval, count=1): '''Record a new value into the histogram and correct for coordinated omission if needed Args: value: the value to record (must be in the valid range) expected_interval: the expected interval between 2 v...
def record_corrected_value(self, value, expected_interval, count=1): '''Record a new value into the histogram and correct for coordinated omission if needed Args: value: the value to record (must be in the valid range) expected_interval: the expected interval between 2 v...
[ "Record", "a", "new", "value", "into", "the", "histogram", "and", "correct", "for", "coordinated", "omission", "if", "needed" ]
HdrHistogram/HdrHistogram_py
python
https://github.com/HdrHistogram/HdrHistogram_py/blob/cb99981b0564a62e1aa02bd764efa6445923f8f7/hdrh/histogram.py#L194-L208
[ "def", "record_corrected_value", "(", "self", ",", "value", ",", "expected_interval", ",", "count", "=", "1", ")", ":", "while", "True", ":", "if", "not", "self", ".", "record_value", "(", "value", ",", "count", ")", ":", "return", "False", "if", "value"...
cb99981b0564a62e1aa02bd764efa6445923f8f7
train
HdrHistogram.get_value_at_percentile
Get the value for a given percentile Args: percentile: a float in [0.0..100.0] Returns: the value for the given percentile
hdrh/histogram.py
def get_value_at_percentile(self, percentile): '''Get the value for a given percentile Args: percentile: a float in [0.0..100.0] Returns: the value for the given percentile ''' count_at_percentile = self.get_target_count_at_percentile(percentile) ...
def get_value_at_percentile(self, percentile): '''Get the value for a given percentile Args: percentile: a float in [0.0..100.0] Returns: the value for the given percentile ''' count_at_percentile = self.get_target_count_at_percentile(percentile) ...
[ "Get", "the", "value", "for", "a", "given", "percentile" ]
HdrHistogram/HdrHistogram_py
python
https://github.com/HdrHistogram/HdrHistogram_py/blob/cb99981b0564a62e1aa02bd764efa6445923f8f7/hdrh/histogram.py#L268-L285
[ "def", "get_value_at_percentile", "(", "self", ",", "percentile", ")", ":", "count_at_percentile", "=", "self", ".", "get_target_count_at_percentile", "(", "percentile", ")", "total", "=", "0", "for", "index", "in", "range", "(", "self", ".", "counts_len", ")", ...
cb99981b0564a62e1aa02bd764efa6445923f8f7
train
HdrHistogram.get_percentile_to_value_dict
A faster alternative to query values for a list of percentiles. Args: percentile_list: a list of percentiles in any order, dups will be ignored each element in the list must be a float value in [0.0 .. 100.0] Returns: a dict of percentile values indexed by the percen...
hdrh/histogram.py
def get_percentile_to_value_dict(self, percentile_list): '''A faster alternative to query values for a list of percentiles. Args: percentile_list: a list of percentiles in any order, dups will be ignored each element in the list must be a float value in [0.0 .. 100.0] Re...
def get_percentile_to_value_dict(self, percentile_list): '''A faster alternative to query values for a list of percentiles. Args: percentile_list: a list of percentiles in any order, dups will be ignored each element in the list must be a float value in [0.0 .. 100.0] Re...
[ "A", "faster", "alternative", "to", "query", "values", "for", "a", "list", "of", "percentiles", "." ]
HdrHistogram/HdrHistogram_py
python
https://github.com/HdrHistogram/HdrHistogram_py/blob/cb99981b0564a62e1aa02bd764efa6445923f8f7/hdrh/histogram.py#L287-L326
[ "def", "get_percentile_to_value_dict", "(", "self", ",", "percentile_list", ")", ":", "result", "=", "{", "}", "total", "=", "0", "percentile_list_index", "=", "0", "count_at_percentile", "=", "0", "# remove dups and sort", "percentile_list", "=", "list", "(", "se...
cb99981b0564a62e1aa02bd764efa6445923f8f7
train
HdrHistogram.values_are_equivalent
Check whether 2 values are equivalent (meaning they are in the same bucket/range) Returns: true if the 2 values are equivalent
hdrh/histogram.py
def values_are_equivalent(self, val1, val2): '''Check whether 2 values are equivalent (meaning they are in the same bucket/range) Returns: true if the 2 values are equivalent ''' return self.get_lowest_equivalent_value(val1) == self.get_lowest_equivalent_value(val2)
def values_are_equivalent(self, val1, val2): '''Check whether 2 values are equivalent (meaning they are in the same bucket/range) Returns: true if the 2 values are equivalent ''' return self.get_lowest_equivalent_value(val1) == self.get_lowest_equivalent_value(val2)
[ "Check", "whether", "2", "values", "are", "equivalent", "(", "meaning", "they", "are", "in", "the", "same", "bucket", "/", "range", ")" ]
HdrHistogram/HdrHistogram_py
python
https://github.com/HdrHistogram/HdrHistogram_py/blob/cb99981b0564a62e1aa02bd764efa6445923f8f7/hdrh/histogram.py#L335-L342
[ "def", "values_are_equivalent", "(", "self", ",", "val1", ",", "val2", ")", ":", "return", "self", ".", "get_lowest_equivalent_value", "(", "val1", ")", "==", "self", ".", "get_lowest_equivalent_value", "(", "val2", ")" ]
cb99981b0564a62e1aa02bd764efa6445923f8f7
train
HdrHistogram.reset
Reset the histogram to a pristine state
hdrh/histogram.py
def reset(self): '''Reset the histogram to a pristine state ''' for index in range(self.counts_len): self.counts[index] = 0 self.total_count = 0 self.min_value = sys.maxsize self.max_value = 0 self.start_time_stamp_msec = sys.maxsize self.end_t...
def reset(self): '''Reset the histogram to a pristine state ''' for index in range(self.counts_len): self.counts[index] = 0 self.total_count = 0 self.min_value = sys.maxsize self.max_value = 0 self.start_time_stamp_msec = sys.maxsize self.end_t...
[ "Reset", "the", "histogram", "to", "a", "pristine", "state" ]
HdrHistogram/HdrHistogram_py
python
https://github.com/HdrHistogram/HdrHistogram_py/blob/cb99981b0564a62e1aa02bd764efa6445923f8f7/hdrh/histogram.py#L386-L395
[ "def", "reset", "(", "self", ")", ":", "for", "index", "in", "range", "(", "self", ".", "counts_len", ")", ":", "self", ".", "counts", "[", "index", "]", "=", "0", "self", ".", "total_count", "=", "0", "self", ".", "min_value", "=", "sys", ".", "...
cb99981b0564a62e1aa02bd764efa6445923f8f7
train
HdrHistogram.adjust_internal_tacking_values
Called during decoding and add to adjust the new min/max value and total count Args: min_non_zero_index min nonzero index of all added counts (-1 if none) max_index max index of all added counts (-1 if none)
hdrh/histogram.py
def adjust_internal_tacking_values(self, min_non_zero_index, max_index, total_added): '''Called during decoding and add to adjust the new min/max value and total count Args: ...
def adjust_internal_tacking_values(self, min_non_zero_index, max_index, total_added): '''Called during decoding and add to adjust the new min/max value and total count Args: ...
[ "Called", "during", "decoding", "and", "add", "to", "adjust", "the", "new", "min", "/", "max", "value", "and", "total", "count" ]
HdrHistogram/HdrHistogram_py
python
https://github.com/HdrHistogram/HdrHistogram_py/blob/cb99981b0564a62e1aa02bd764efa6445923f8f7/hdrh/histogram.py#L424-L441
[ "def", "adjust_internal_tacking_values", "(", "self", ",", "min_non_zero_index", ",", "max_index", ",", "total_added", ")", ":", "if", "max_index", ">=", "0", ":", "max_value", "=", "self", ".", "get_highest_equivalent_value", "(", "self", ".", "get_value_from_index...
cb99981b0564a62e1aa02bd764efa6445923f8f7
train
HdrHistogram.set_internal_tacking_values
Called during decoding and add to adjust the new min/max value and total count Args: min_non_zero_index min nonzero index of all added counts (-1 if none) max_index max index of all added counts (-1 if none)
hdrh/histogram.py
def set_internal_tacking_values(self, min_non_zero_index, max_index, total_added): '''Called during decoding and add to adjust the new min/max value and total count Args: min_...
def set_internal_tacking_values(self, min_non_zero_index, max_index, total_added): '''Called during decoding and add to adjust the new min/max value and total count Args: min_...
[ "Called", "during", "decoding", "and", "add", "to", "adjust", "the", "new", "min", "/", "max", "value", "and", "total", "count" ]
HdrHistogram/HdrHistogram_py
python
https://github.com/HdrHistogram/HdrHistogram_py/blob/cb99981b0564a62e1aa02bd764efa6445923f8f7/hdrh/histogram.py#L443-L458
[ "def", "set_internal_tacking_values", "(", "self", ",", "min_non_zero_index", ",", "max_index", ",", "total_added", ")", ":", "if", "max_index", ">=", "0", ":", "self", ".", "max_value", "=", "self", ".", "get_highest_equivalent_value", "(", "self", ".", "get_va...
cb99981b0564a62e1aa02bd764efa6445923f8f7
train
HdrHistogram.get_counts_array_index
Return the index in the counts array for a given value
hdrh/histogram.py
def get_counts_array_index(self, value): '''Return the index in the counts array for a given value ''' if value < 0: raise ValueError("Histogram recorded value cannot be negative.") bucket_index = self._get_bucket_index(value) sub_bucket_index = self._get_sub_bucket_...
def get_counts_array_index(self, value): '''Return the index in the counts array for a given value ''' if value < 0: raise ValueError("Histogram recorded value cannot be negative.") bucket_index = self._get_bucket_index(value) sub_bucket_index = self._get_sub_bucket_...
[ "Return", "the", "index", "in", "the", "counts", "array", "for", "a", "given", "value" ]
HdrHistogram/HdrHistogram_py
python
https://github.com/HdrHistogram/HdrHistogram_py/blob/cb99981b0564a62e1aa02bd764efa6445923f8f7/hdrh/histogram.py#L460-L475
[ "def", "get_counts_array_index", "(", "self", ",", "value", ")", ":", "if", "value", "<", "0", ":", "raise", "ValueError", "(", "\"Histogram recorded value cannot be negative.\"", ")", "bucket_index", "=", "self", ".", "_get_bucket_index", "(", "value", ")", "sub_...
cb99981b0564a62e1aa02bd764efa6445923f8f7
train
HdrHistogram.decode_and_add
Decode an encoded histogram and add it to this histogram Args: encoded_histogram (string) an encoded histogram following the V1 format, such as one returned by the encode() method Exception: TypeError in case of base64 decode error HdrCookieException: ...
hdrh/histogram.py
def decode_and_add(self, encoded_histogram): '''Decode an encoded histogram and add it to this histogram Args: encoded_histogram (string) an encoded histogram following the V1 format, such as one returned by the encode() method Exception: TypeError in case...
def decode_and_add(self, encoded_histogram): '''Decode an encoded histogram and add it to this histogram Args: encoded_histogram (string) an encoded histogram following the V1 format, such as one returned by the encode() method Exception: TypeError in case...
[ "Decode", "an", "encoded", "histogram", "and", "add", "it", "to", "this", "histogram", "Args", ":", "encoded_histogram", "(", "string", ")", "an", "encoded", "histogram", "following", "the", "V1", "format", "such", "as", "one", "returned", "by", "the", "enco...
HdrHistogram/HdrHistogram_py
python
https://github.com/HdrHistogram/HdrHistogram_py/blob/cb99981b0564a62e1aa02bd764efa6445923f8f7/hdrh/histogram.py#L530-L547
[ "def", "decode_and_add", "(", "self", ",", "encoded_histogram", ")", ":", "other_hist", "=", "HdrHistogram", ".", "decode", "(", "encoded_histogram", ",", "self", ".", "b64_wrap", ")", "self", ".", "add", "(", "other_hist", ")" ]
cb99981b0564a62e1aa02bd764efa6445923f8f7
train
HdrHistogram.decode
Decode an encoded histogram and return a new histogram instance that has been initialized with the decoded content Return: a new histogram instance representing the decoded content Exception: TypeError in case of base64 decode error HdrCookieException: ...
hdrh/histogram.py
def decode(encoded_histogram, b64_wrap=True): '''Decode an encoded histogram and return a new histogram instance that has been initialized with the decoded content Return: a new histogram instance representing the decoded content Exception: TypeError in case of ba...
def decode(encoded_histogram, b64_wrap=True): '''Decode an encoded histogram and return a new histogram instance that has been initialized with the decoded content Return: a new histogram instance representing the decoded content Exception: TypeError in case of ba...
[ "Decode", "an", "encoded", "histogram", "and", "return", "a", "new", "histogram", "instance", "that", "has", "been", "initialized", "with", "the", "decoded", "content", "Return", ":", "a", "new", "histogram", "instance", "representing", "the", "decoded", "conten...
HdrHistogram/HdrHistogram_py
python
https://github.com/HdrHistogram/HdrHistogram_py/blob/cb99981b0564a62e1aa02bd764efa6445923f8f7/hdrh/histogram.py#L550-L572
[ "def", "decode", "(", "encoded_histogram", ",", "b64_wrap", "=", "True", ")", ":", "hdr_payload", "=", "HdrHistogramEncoder", ".", "decode", "(", "encoded_histogram", ",", "b64_wrap", ")", "payload", "=", "hdr_payload", ".", "payload", "histogram", "=", "HdrHist...
cb99981b0564a62e1aa02bd764efa6445923f8f7
train
JsonValidator._validate_json
Validate JSON according to JSONSchema *Args*:\n _checked_json_: validated JSON. _schema_: schema that used for validation.
src/JsonValidator.py
def _validate_json(self, checked_json, schema): """ Validate JSON according to JSONSchema *Args*:\n _checked_json_: validated JSON. _schema_: schema that used for validation. """ try: jsonschema.validate(checked_json, schema) except jsonschema.Validat...
def _validate_json(self, checked_json, schema): """ Validate JSON according to JSONSchema *Args*:\n _checked_json_: validated JSON. _schema_: schema that used for validation. """ try: jsonschema.validate(checked_json, schema) except jsonschema.Validat...
[ "Validate", "JSON", "according", "to", "JSONSchema" ]
peterservice-rnd/robotframework-jsonvalidator
python
https://github.com/peterservice-rnd/robotframework-jsonvalidator/blob/acde5045c04d0a7b9079f22707c3e71a5d3fa724/src/JsonValidator.py#L75-L95
[ "def", "_validate_json", "(", "self", ",", "checked_json", ",", "schema", ")", ":", "try", ":", "jsonschema", ".", "validate", "(", "checked_json", ",", "schema", ")", "except", "jsonschema", ".", "ValidationError", "as", "e", ":", "print", "(", "\"\"\"Faile...
acde5045c04d0a7b9079f22707c3e71a5d3fa724
train
JsonValidator.validate_jsonschema_from_file
Validate JSON according to schema, loaded from a file. *Args:*\n _json_string_ - JSON string;\n _path_to_schema_ - path to file with JSON schema; *Raises:*\n JsonValidatorError *Example:*\n | *Settings* | *Value* | | Library | JsonValidator | ...
src/JsonValidator.py
def validate_jsonschema_from_file(self, json_string, path_to_schema): """ Validate JSON according to schema, loaded from a file. *Args:*\n _json_string_ - JSON string;\n _path_to_schema_ - path to file with JSON schema; *Raises:*\n JsonValidatorError *E...
def validate_jsonschema_from_file(self, json_string, path_to_schema): """ Validate JSON according to schema, loaded from a file. *Args:*\n _json_string_ - JSON string;\n _path_to_schema_ - path to file with JSON schema; *Raises:*\n JsonValidatorError *E...
[ "Validate", "JSON", "according", "to", "schema", "loaded", "from", "a", "file", "." ]
peterservice-rnd/robotframework-jsonvalidator
python
https://github.com/peterservice-rnd/robotframework-jsonvalidator/blob/acde5045c04d0a7b9079f22707c3e71a5d3fa724/src/JsonValidator.py#L97-L122
[ "def", "validate_jsonschema_from_file", "(", "self", ",", "json_string", ",", "path_to_schema", ")", ":", "schema", "=", "open", "(", "path_to_schema", ")", ".", "read", "(", ")", "load_input_json", "=", "self", ".", "string_to_json", "(", "json_string", ")", ...
acde5045c04d0a7b9079f22707c3e71a5d3fa724
train
JsonValidator.validate_jsonschema
Validate JSON according to schema. *Args:*\n _json_string_ - JSON string;\n _input_schema_ - schema in string format; *Raises:*\n JsonValidatorError *Example:*\n | *Settings* | *Value* | | Library | JsonValidator | | Library | OperatingSys...
src/JsonValidator.py
def validate_jsonschema(self, json_string, input_schema): """ Validate JSON according to schema. *Args:*\n _json_string_ - JSON string;\n _input_schema_ - schema in string format; *Raises:*\n JsonValidatorError *Example:*\n | *Settings* | *Value...
def validate_jsonschema(self, json_string, input_schema): """ Validate JSON according to schema. *Args:*\n _json_string_ - JSON string;\n _input_schema_ - schema in string format; *Raises:*\n JsonValidatorError *Example:*\n | *Settings* | *Value...
[ "Validate", "JSON", "according", "to", "schema", "." ]
peterservice-rnd/robotframework-jsonvalidator
python
https://github.com/peterservice-rnd/robotframework-jsonvalidator/blob/acde5045c04d0a7b9079f22707c3e71a5d3fa724/src/JsonValidator.py#L124-L150
[ "def", "validate_jsonschema", "(", "self", ",", "json_string", ",", "input_schema", ")", ":", "load_input_json", "=", "self", ".", "string_to_json", "(", "json_string", ")", "try", ":", "load_schema", "=", "json", ".", "loads", "(", "input_schema", ")", "excep...
acde5045c04d0a7b9079f22707c3e71a5d3fa724