repo stringlengths 7 55 | path stringlengths 4 223 | func_name stringlengths 1 134 | original_string stringlengths 75 104k | language stringclasses 1
value | code stringlengths 75 104k | code_tokens listlengths 19 28.4k | docstring stringlengths 1 46.9k | docstring_tokens listlengths 1 1.97k | sha stringlengths 40 40 | url stringlengths 87 315 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
hsolbrig/PyShEx | pyshex/shape_expressions_language/p5_context.py | DebugContext.print | def print(self, txt: str, hold: bool=False) -> None:
""" Conditionally print txt
:param txt: text to print
:param hold: If true, hang on to the text until another print comes through
:param hold: If true, drop both print statements if another hasn't intervened
:return:
"... | python | def print(self, txt: str, hold: bool=False) -> None:
""" Conditionally print txt
:param txt: text to print
:param hold: If true, hang on to the text until another print comes through
:param hold: If true, drop both print statements if another hasn't intervened
:return:
"... | [
"def",
"print",
"(",
"self",
",",
"txt",
":",
"str",
",",
"hold",
":",
"bool",
"=",
"False",
")",
"->",
"None",
":",
"if",
"hold",
":",
"self",
".",
"held_prints",
"[",
"self",
".",
"trace_depth",
"]",
"=",
"txt",
"elif",
"self",
".",
"held_prints"... | Conditionally print txt
:param txt: text to print
:param hold: If true, hang on to the text until another print comes through
:param hold: If true, drop both print statements if another hasn't intervened
:return: | [
"Conditionally",
"print",
"txt"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p5_context.py#L58-L76 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p5_context.py | Context.reset | def reset(self) -> None:
"""
Reset the context preceeding an evaluation
"""
self.evaluating = set()
self.assumptions = {}
self.known_results = {}
self.current_node = None
self.evaluate_stack = []
self.bnode_map = {} | python | def reset(self) -> None:
"""
Reset the context preceeding an evaluation
"""
self.evaluating = set()
self.assumptions = {}
self.known_results = {}
self.current_node = None
self.evaluate_stack = []
self.bnode_map = {} | [
"def",
"reset",
"(",
"self",
")",
"->",
"None",
":",
"self",
".",
"evaluating",
"=",
"set",
"(",
")",
"self",
".",
"assumptions",
"=",
"{",
"}",
"self",
".",
"known_results",
"=",
"{",
"}",
"self",
".",
"current_node",
"=",
"None",
"self",
".",
"ev... | Reset the context preceeding an evaluation | [
"Reset",
"the",
"context",
"preceeding",
"an",
"evaluation"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p5_context.py#L200-L209 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p5_context.py | Context._gen_schema_xref | def _gen_schema_xref(self, expr: Optional[Union[ShExJ.shapeExprLabel, ShExJ.shapeExpr]]) -> None:
"""
Generate the schema_id_map
:param expr: root shape expression
"""
if expr is not None and not isinstance_(expr, ShExJ.shapeExprLabel) and 'id' in expr and expr.id is not None:
... | python | def _gen_schema_xref(self, expr: Optional[Union[ShExJ.shapeExprLabel, ShExJ.shapeExpr]]) -> None:
"""
Generate the schema_id_map
:param expr: root shape expression
"""
if expr is not None and not isinstance_(expr, ShExJ.shapeExprLabel) and 'id' in expr and expr.id is not None:
... | [
"def",
"_gen_schema_xref",
"(",
"self",
",",
"expr",
":",
"Optional",
"[",
"Union",
"[",
"ShExJ",
".",
"shapeExprLabel",
",",
"ShExJ",
".",
"shapeExpr",
"]",
"]",
")",
"->",
"None",
":",
"if",
"expr",
"is",
"not",
"None",
"and",
"not",
"isinstance_",
"... | Generate the schema_id_map
:param expr: root shape expression | [
"Generate",
"the",
"schema_id_map"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p5_context.py#L211-L228 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p5_context.py | Context._gen_te_xref | def _gen_te_xref(self, expr: Union[ShExJ.tripleExpr, ShExJ.tripleExprLabel]) -> None:
"""
Generate the triple expression map (te_id_map)
:param expr: root triple expression
"""
if expr is not None and not isinstance_(expr, ShExJ.tripleExprLabel) and 'id' in expr and expr.id is ... | python | def _gen_te_xref(self, expr: Union[ShExJ.tripleExpr, ShExJ.tripleExprLabel]) -> None:
"""
Generate the triple expression map (te_id_map)
:param expr: root triple expression
"""
if expr is not None and not isinstance_(expr, ShExJ.tripleExprLabel) and 'id' in expr and expr.id is ... | [
"def",
"_gen_te_xref",
"(",
"self",
",",
"expr",
":",
"Union",
"[",
"ShExJ",
".",
"tripleExpr",
",",
"ShExJ",
".",
"tripleExprLabel",
"]",
")",
"->",
"None",
":",
"if",
"expr",
"is",
"not",
"None",
"and",
"not",
"isinstance_",
"(",
"expr",
",",
"ShExJ"... | Generate the triple expression map (te_id_map)
:param expr: root triple expression | [
"Generate",
"the",
"triple",
"expression",
"map",
"(",
"te_id_map",
")"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p5_context.py#L233-L250 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p5_context.py | Context.tripleExprFor | def tripleExprFor(self, id_: ShExJ.tripleExprLabel) -> ShExJ.tripleExpr:
""" Return the triple expression that corresponds to id """
return self.te_id_map.get(id_) | python | def tripleExprFor(self, id_: ShExJ.tripleExprLabel) -> ShExJ.tripleExpr:
""" Return the triple expression that corresponds to id """
return self.te_id_map.get(id_) | [
"def",
"tripleExprFor",
"(",
"self",
",",
"id_",
":",
"ShExJ",
".",
"tripleExprLabel",
")",
"->",
"ShExJ",
".",
"tripleExpr",
":",
"return",
"self",
".",
"te_id_map",
".",
"get",
"(",
"id_",
")"
] | Return the triple expression that corresponds to id | [
"Return",
"the",
"triple",
"expression",
"that",
"corresponds",
"to",
"id"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p5_context.py#L252-L254 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p5_context.py | Context.shapeExprFor | def shapeExprFor(self, id_: Union[ShExJ.shapeExprLabel, START]) -> Optional[ShExJ.shapeExpr]:
""" Return the shape expression that corresponds to id """
rval = self.schema.start if id_ is START else self.schema_id_map.get(str(id_))
return rval | python | def shapeExprFor(self, id_: Union[ShExJ.shapeExprLabel, START]) -> Optional[ShExJ.shapeExpr]:
""" Return the shape expression that corresponds to id """
rval = self.schema.start if id_ is START else self.schema_id_map.get(str(id_))
return rval | [
"def",
"shapeExprFor",
"(",
"self",
",",
"id_",
":",
"Union",
"[",
"ShExJ",
".",
"shapeExprLabel",
",",
"START",
"]",
")",
"->",
"Optional",
"[",
"ShExJ",
".",
"shapeExpr",
"]",
":",
"rval",
"=",
"self",
".",
"schema",
".",
"start",
"if",
"id_",
"is"... | Return the shape expression that corresponds to id | [
"Return",
"the",
"shape",
"expression",
"that",
"corresponds",
"to",
"id"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p5_context.py#L256-L259 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p5_context.py | Context.visit_shapes | def visit_shapes(self, expr: ShExJ.shapeExpr, f: Callable[[Any, ShExJ.shapeExpr, "Context"], None], arg_cntxt: Any,
visit_center: _VisitorCenter = None, follow_inner_shapes: bool=True) -> None:
"""
Visit expr and all of its "descendant" shapes.
:param expr: root shape expre... | python | def visit_shapes(self, expr: ShExJ.shapeExpr, f: Callable[[Any, ShExJ.shapeExpr, "Context"], None], arg_cntxt: Any,
visit_center: _VisitorCenter = None, follow_inner_shapes: bool=True) -> None:
"""
Visit expr and all of its "descendant" shapes.
:param expr: root shape expre... | [
"def",
"visit_shapes",
"(",
"self",
",",
"expr",
":",
"ShExJ",
".",
"shapeExpr",
",",
"f",
":",
"Callable",
"[",
"[",
"Any",
",",
"ShExJ",
".",
"shapeExpr",
",",
"\"Context\"",
"]",
",",
"None",
"]",
",",
"arg_cntxt",
":",
"Any",
",",
"visit_center",
... | Visit expr and all of its "descendant" shapes.
:param expr: root shape expression
:param f: visitor function
:param arg_cntxt: accompanying context for the visitor function
:param visit_center: Recursive visit context. (Not normally supplied on an external call)
:param follow_i... | [
"Visit",
"expr",
"and",
"all",
"of",
"its",
"descendant",
"shapes",
"."
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p5_context.py#L261-L301 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p5_context.py | Context._visit_shape_te | def _visit_shape_te(self, te: ShExJ.tripleExpr, visit_center: _VisitorCenter) -> None:
"""
Visit a triple expression that was reached through a shape. This, in turn, is used to visit additional shapes
that are referenced by a TripleConstraint
:param te: Triple expression reached through ... | python | def _visit_shape_te(self, te: ShExJ.tripleExpr, visit_center: _VisitorCenter) -> None:
"""
Visit a triple expression that was reached through a shape. This, in turn, is used to visit additional shapes
that are referenced by a TripleConstraint
:param te: Triple expression reached through ... | [
"def",
"_visit_shape_te",
"(",
"self",
",",
"te",
":",
"ShExJ",
".",
"tripleExpr",
",",
"visit_center",
":",
"_VisitorCenter",
")",
"->",
"None",
":",
"if",
"isinstance",
"(",
"te",
",",
"ShExJ",
".",
"TripleConstraint",
")",
"and",
"te",
".",
"valueExpr",... | Visit a triple expression that was reached through a shape. This, in turn, is used to visit additional shapes
that are referenced by a TripleConstraint
:param te: Triple expression reached through a Shape.expression
:param visit_center: context used in shape visitor | [
"Visit",
"a",
"triple",
"expression",
"that",
"was",
"reached",
"through",
"a",
"shape",
".",
"This",
"in",
"turn",
"is",
"used",
"to",
"visit",
"additional",
"shapes",
"that",
"are",
"referenced",
"by",
"a",
"TripleConstraint",
":",
"param",
"te",
":",
"T... | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p5_context.py#L335-L343 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p5_context.py | Context._visit_te_shape | def _visit_te_shape(self, shape: ShExJ.shapeExpr, visit_center: _VisitorCenter) -> None:
"""
Visit a shape expression that was reached through a triple expression. This, in turn, is used to visit
additional triple expressions that are referenced by the Shape
:param shape: Shape reached... | python | def _visit_te_shape(self, shape: ShExJ.shapeExpr, visit_center: _VisitorCenter) -> None:
"""
Visit a shape expression that was reached through a triple expression. This, in turn, is used to visit
additional triple expressions that are referenced by the Shape
:param shape: Shape reached... | [
"def",
"_visit_te_shape",
"(",
"self",
",",
"shape",
":",
"ShExJ",
".",
"shapeExpr",
",",
"visit_center",
":",
"_VisitorCenter",
")",
"->",
"None",
":",
"if",
"isinstance",
"(",
"shape",
",",
"ShExJ",
".",
"Shape",
")",
"and",
"shape",
".",
"expression",
... | Visit a shape expression that was reached through a triple expression. This, in turn, is used to visit
additional triple expressions that are referenced by the Shape
:param shape: Shape reached through triple expression traverse
:param visit_center: context used in shape visitor | [
"Visit",
"a",
"shape",
"expression",
"that",
"was",
"reached",
"through",
"a",
"triple",
"expression",
".",
"This",
"in",
"turn",
"is",
"used",
"to",
"visit",
"additional",
"triple",
"expressions",
"that",
"are",
"referenced",
"by",
"the",
"Shape"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p5_context.py#L345-L354 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p5_context.py | Context.start_evaluating | def start_evaluating(self, n: Node, s: ShExJ.shapeExpr) -> Optional[bool]:
"""Indicate that we are beginning to evaluate n according to shape expression s.
If we are already in the process of evaluating (n,s), as indicated self.evaluating, we return our current
guess as to the result.
:... | python | def start_evaluating(self, n: Node, s: ShExJ.shapeExpr) -> Optional[bool]:
"""Indicate that we are beginning to evaluate n according to shape expression s.
If we are already in the process of evaluating (n,s), as indicated self.evaluating, we return our current
guess as to the result.
:... | [
"def",
"start_evaluating",
"(",
"self",
",",
"n",
":",
"Node",
",",
"s",
":",
"ShExJ",
".",
"shapeExpr",
")",
"->",
"Optional",
"[",
"bool",
"]",
":",
"if",
"not",
"s",
".",
"id",
":",
"s",
".",
"id",
"=",
"str",
"(",
"BNode",
"(",
")",
")",
... | Indicate that we are beginning to evaluate n according to shape expression s.
If we are already in the process of evaluating (n,s), as indicated self.evaluating, we return our current
guess as to the result.
:param n: Node to be evaluated
:param s: expression for node evaluation
... | [
"Indicate",
"that",
"we",
"are",
"beginning",
"to",
"evaluate",
"n",
"according",
"to",
"shape",
"expression",
"s",
".",
"If",
"we",
"are",
"already",
"in",
"the",
"process",
"of",
"evaluating",
"(",
"n",
"s",
")",
"as",
"indicated",
"self",
".",
"evalua... | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p5_context.py#L356-L378 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p5_context.py | Context.done_evaluating | def done_evaluating(self, n: Node, s: ShExJ.shapeExpr, result: bool) -> Tuple[bool, bool]:
"""
Indicate that we have completed an actual evaluation of (n,s). This is only called when start_evaluating
has returned None as the assumed result
:param n: Node that was evaluated
:par... | python | def done_evaluating(self, n: Node, s: ShExJ.shapeExpr, result: bool) -> Tuple[bool, bool]:
"""
Indicate that we have completed an actual evaluation of (n,s). This is only called when start_evaluating
has returned None as the assumed result
:param n: Node that was evaluated
:par... | [
"def",
"done_evaluating",
"(",
"self",
",",
"n",
":",
"Node",
",",
"s",
":",
"ShExJ",
".",
"shapeExpr",
",",
"result",
":",
"bool",
")",
"->",
"Tuple",
"[",
"bool",
",",
"bool",
"]",
":",
"key",
"=",
"(",
"n",
",",
"s",
".",
"id",
")",
"# If we... | Indicate that we have completed an actual evaluation of (n,s). This is only called when start_evaluating
has returned None as the assumed result
:param n: Node that was evaluated
:param s: expression for node evaluation
:param result: result of evaluation
:return: Tuple - first... | [
"Indicate",
"that",
"we",
"have",
"completed",
"an",
"actual",
"evaluation",
"of",
"(",
"n",
"s",
")",
".",
"This",
"is",
"only",
"called",
"when",
"start_evaluating",
"has",
"returned",
"None",
"as",
"the",
"assumed",
"result"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p5_context.py#L380-L406 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p5_context.py | Context.type_last | def type_last(self, obj: JsonObj) -> JsonObj:
""" Move the type identifiers to the end of the object for print purposes """
def _tl_list(v: List) -> List:
return [self.type_last(e) if isinstance(e, JsonObj)
else _tl_list(e) if isinstance(e, list) else e for... | python | def type_last(self, obj: JsonObj) -> JsonObj:
""" Move the type identifiers to the end of the object for print purposes """
def _tl_list(v: List) -> List:
return [self.type_last(e) if isinstance(e, JsonObj)
else _tl_list(e) if isinstance(e, list) else e for... | [
"def",
"type_last",
"(",
"self",
",",
"obj",
":",
"JsonObj",
")",
"->",
"JsonObj",
":",
"def",
"_tl_list",
"(",
"v",
":",
"List",
")",
"->",
"List",
":",
"return",
"[",
"self",
".",
"type_last",
"(",
"e",
")",
"if",
"isinstance",
"(",
"e",
",",
"... | Move the type identifiers to the end of the object for print purposes | [
"Move",
"the",
"type",
"identifiers",
"to",
"the",
"end",
"of",
"the",
"object",
"for",
"print",
"purposes"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p5_context.py#L430-L444 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p5_3_shape_expressions.py | satisfies | def satisfies(cntxt: Context, n: Node, se: ShExJ.shapeExpr) -> bool:
""" `5.3 Shape Expressions <http://shex.io/shex-semantics/#node-constraint-semantics>`_
satisfies: The expression satisfies(n, se, G, m) indicates that a node n and graph G satisfy a shape
expression se with shapeM... | python | def satisfies(cntxt: Context, n: Node, se: ShExJ.shapeExpr) -> bool:
""" `5.3 Shape Expressions <http://shex.io/shex-semantics/#node-constraint-semantics>`_
satisfies: The expression satisfies(n, se, G, m) indicates that a node n and graph G satisfy a shape
expression se with shapeM... | [
"def",
"satisfies",
"(",
"cntxt",
":",
"Context",
",",
"n",
":",
"Node",
",",
"se",
":",
"ShExJ",
".",
"shapeExpr",
")",
"->",
"bool",
":",
"if",
"isinstance",
"(",
"se",
",",
"ShExJ",
".",
"NodeConstraint",
")",
":",
"rval",
"=",
"satisfiesNodeConstra... | `5.3 Shape Expressions <http://shex.io/shex-semantics/#node-constraint-semantics>`_
satisfies: The expression satisfies(n, se, G, m) indicates that a node n and graph G satisfy a shape
expression se with shapeMap m.
satisfies(n, se, G, m) is true if and only if:
... | [
"5",
".",
"3",
"Shape",
"Expressions",
"<http",
":",
"//",
"shex",
".",
"io",
"/",
"shex",
"-",
"semantics",
"/",
"#node",
"-",
"constraint",
"-",
"semantics",
">",
"_"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p5_3_shape_expressions.py#L13-L52 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p5_3_shape_expressions.py | satisifesShapeOr | def satisifesShapeOr(cntxt: Context, n: Node, se: ShExJ.ShapeOr, _: DebugContext) -> bool:
""" Se is a ShapeOr and there is some shape expression se2 in shapeExprs such that satisfies(n, se2, G, m). """
return any(satisfies(cntxt, n, se2) for se2 in se.shapeExprs) | python | def satisifesShapeOr(cntxt: Context, n: Node, se: ShExJ.ShapeOr, _: DebugContext) -> bool:
""" Se is a ShapeOr and there is some shape expression se2 in shapeExprs such that satisfies(n, se2, G, m). """
return any(satisfies(cntxt, n, se2) for se2 in se.shapeExprs) | [
"def",
"satisifesShapeOr",
"(",
"cntxt",
":",
"Context",
",",
"n",
":",
"Node",
",",
"se",
":",
"ShExJ",
".",
"ShapeOr",
",",
"_",
":",
"DebugContext",
")",
"->",
"bool",
":",
"return",
"any",
"(",
"satisfies",
"(",
"cntxt",
",",
"n",
",",
"se2",
"... | Se is a ShapeOr and there is some shape expression se2 in shapeExprs such that satisfies(n, se2, G, m). | [
"Se",
"is",
"a",
"ShapeOr",
"and",
"there",
"is",
"some",
"shape",
"expression",
"se2",
"in",
"shapeExprs",
"such",
"that",
"satisfies",
"(",
"n",
"se2",
"G",
"m",
")",
"."
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p5_3_shape_expressions.py#L61-L63 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p5_3_shape_expressions.py | satisfiesShapeAnd | def satisfiesShapeAnd(cntxt: Context, n: Node, se: ShExJ.ShapeAnd, _: DebugContext) -> bool:
""" Se is a ShapeAnd and for every shape expression se2 in shapeExprs, satisfies(n, se2, G, m) """
return all(satisfies(cntxt, n, se2) for se2 in se.shapeExprs) | python | def satisfiesShapeAnd(cntxt: Context, n: Node, se: ShExJ.ShapeAnd, _: DebugContext) -> bool:
""" Se is a ShapeAnd and for every shape expression se2 in shapeExprs, satisfies(n, se2, G, m) """
return all(satisfies(cntxt, n, se2) for se2 in se.shapeExprs) | [
"def",
"satisfiesShapeAnd",
"(",
"cntxt",
":",
"Context",
",",
"n",
":",
"Node",
",",
"se",
":",
"ShExJ",
".",
"ShapeAnd",
",",
"_",
":",
"DebugContext",
")",
"->",
"bool",
":",
"return",
"all",
"(",
"satisfies",
"(",
"cntxt",
",",
"n",
",",
"se2",
... | Se is a ShapeAnd and for every shape expression se2 in shapeExprs, satisfies(n, se2, G, m) | [
"Se",
"is",
"a",
"ShapeAnd",
"and",
"for",
"every",
"shape",
"expression",
"se2",
"in",
"shapeExprs",
"satisfies",
"(",
"n",
"se2",
"G",
"m",
")"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p5_3_shape_expressions.py#L67-L69 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p5_3_shape_expressions.py | satisfiesShapeNot | def satisfiesShapeNot(cntxt: Context, n: Node, se: ShExJ.ShapeNot, _: DebugContext) -> bool:
""" Se is a ShapeNot and for the shape expression se2 at shapeExpr, notSatisfies(n, se2, G, m) """
return not satisfies(cntxt, n, se.shapeExpr) | python | def satisfiesShapeNot(cntxt: Context, n: Node, se: ShExJ.ShapeNot, _: DebugContext) -> bool:
""" Se is a ShapeNot and for the shape expression se2 at shapeExpr, notSatisfies(n, se2, G, m) """
return not satisfies(cntxt, n, se.shapeExpr) | [
"def",
"satisfiesShapeNot",
"(",
"cntxt",
":",
"Context",
",",
"n",
":",
"Node",
",",
"se",
":",
"ShExJ",
".",
"ShapeNot",
",",
"_",
":",
"DebugContext",
")",
"->",
"bool",
":",
"return",
"not",
"satisfies",
"(",
"cntxt",
",",
"n",
",",
"se",
".",
... | Se is a ShapeNot and for the shape expression se2 at shapeExpr, notSatisfies(n, se2, G, m) | [
"Se",
"is",
"a",
"ShapeNot",
"and",
"for",
"the",
"shape",
"expression",
"se2",
"at",
"shapeExpr",
"notSatisfies",
"(",
"n",
"se2",
"G",
"m",
")"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p5_3_shape_expressions.py#L73-L75 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p5_3_shape_expressions.py | satisfiesExternal | def satisfiesExternal(cntxt: Context, n: Node, se: ShExJ.ShapeExternal, c: DebugContext) -> bool:
""" Se is a ShapeExternal and implementation-specific mechansims not defined in this specification indicate
success.
"""
if c.debug:
print(f"id: {se.id}")
extern_shape = cntxt.external_shape_f... | python | def satisfiesExternal(cntxt: Context, n: Node, se: ShExJ.ShapeExternal, c: DebugContext) -> bool:
""" Se is a ShapeExternal and implementation-specific mechansims not defined in this specification indicate
success.
"""
if c.debug:
print(f"id: {se.id}")
extern_shape = cntxt.external_shape_f... | [
"def",
"satisfiesExternal",
"(",
"cntxt",
":",
"Context",
",",
"n",
":",
"Node",
",",
"se",
":",
"ShExJ",
".",
"ShapeExternal",
",",
"c",
":",
"DebugContext",
")",
"->",
"bool",
":",
"if",
"c",
".",
"debug",
":",
"print",
"(",
"f\"id: {se.id}\"",
")",
... | Se is a ShapeExternal and implementation-specific mechansims not defined in this specification indicate
success. | [
"Se",
"is",
"a",
"ShapeExternal",
"and",
"implementation",
"-",
"specific",
"mechansims",
"not",
"defined",
"in",
"this",
"specification",
"indicate",
"success",
"."
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p5_3_shape_expressions.py#L79-L89 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p5_3_shape_expressions.py | satisfiesShapeExprRef | def satisfiesShapeExprRef(cntxt: Context, n: Node, se: ShExJ.shapeExprLabel, c: DebugContext) -> bool:
""" Se is a shapeExprRef and there exists in the schema a shape expression se2 with that id
and satisfies(n, se2, G, m).
"""
if c.debug:
print(f"id: {se}")
for shape in cntxt.schema.shape... | python | def satisfiesShapeExprRef(cntxt: Context, n: Node, se: ShExJ.shapeExprLabel, c: DebugContext) -> bool:
""" Se is a shapeExprRef and there exists in the schema a shape expression se2 with that id
and satisfies(n, se2, G, m).
"""
if c.debug:
print(f"id: {se}")
for shape in cntxt.schema.shape... | [
"def",
"satisfiesShapeExprRef",
"(",
"cntxt",
":",
"Context",
",",
"n",
":",
"Node",
",",
"se",
":",
"ShExJ",
".",
"shapeExprLabel",
",",
"c",
":",
"DebugContext",
")",
"->",
"bool",
":",
"if",
"c",
".",
"debug",
":",
"print",
"(",
"f\"id: {se}\"",
")"... | Se is a shapeExprRef and there exists in the schema a shape expression se2 with that id
and satisfies(n, se2, G, m). | [
"Se",
"is",
"a",
"shapeExprRef",
"and",
"there",
"exists",
"in",
"the",
"schema",
"a",
"shape",
"expression",
"se2",
"with",
"that",
"id",
"and",
"satisfies",
"(",
"n",
"se2",
"G",
"m",
")",
"."
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p5_3_shape_expressions.py#L93-L103 | train |
gak/pygooglechart | examples/labels.py | cat_proximity | def cat_proximity():
"""Cat proximity graph from http://xkcd.com/231/"""
chart = SimpleLineChart(int(settings.width * 1.5), settings.height)
chart.set_legend(['INTELLIGENCE', 'INSANITY OF STATEMENTS'])
# intelligence
data_index = chart.add_data([100. / y for y in range(1, 15)])
# insanity of s... | python | def cat_proximity():
"""Cat proximity graph from http://xkcd.com/231/"""
chart = SimpleLineChart(int(settings.width * 1.5), settings.height)
chart.set_legend(['INTELLIGENCE', 'INSANITY OF STATEMENTS'])
# intelligence
data_index = chart.add_data([100. / y for y in range(1, 15)])
# insanity of s... | [
"def",
"cat_proximity",
"(",
")",
":",
"chart",
"=",
"SimpleLineChart",
"(",
"int",
"(",
"settings",
".",
"width",
"*",
"1.5",
")",
",",
"settings",
".",
"height",
")",
"chart",
".",
"set_legend",
"(",
"[",
"'INTELLIGENCE'",
",",
"'INSANITY OF STATEMENTS'",
... | Cat proximity graph from http://xkcd.com/231/ | [
"Cat",
"proximity",
"graph",
"from",
"http",
":",
"//",
"xkcd",
".",
"com",
"/",
"231",
"/"
] | 25234bb63127a7e5e057c0b98ab841f3f1d93b21 | https://github.com/gak/pygooglechart/blob/25234bb63127a7e5e057c0b98ab841f3f1d93b21/examples/labels.py#L35-L57 | train |
hsolbrig/PyShEx | pyshex/shex_evaluator.py | normalize_uri | def normalize_uri(u: URI) -> URIRef:
""" Return a URIRef for a str or URIRef """
return u if isinstance(u, URIRef) else URIRef(str(u)) | python | def normalize_uri(u: URI) -> URIRef:
""" Return a URIRef for a str or URIRef """
return u if isinstance(u, URIRef) else URIRef(str(u)) | [
"def",
"normalize_uri",
"(",
"u",
":",
"URI",
")",
"->",
"URIRef",
":",
"return",
"u",
"if",
"isinstance",
"(",
"u",
",",
"URIRef",
")",
"else",
"URIRef",
"(",
"str",
"(",
"u",
")",
")"
] | Return a URIRef for a str or URIRef | [
"Return",
"a",
"URIRef",
"for",
"a",
"str",
"or",
"URIRef"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shex_evaluator.py#L34-L36 | train |
hsolbrig/PyShEx | pyshex/shex_evaluator.py | normalize_uriparm | def normalize_uriparm(p: URIPARM) -> List[URIRef]:
""" Return an optional list of URIRefs for p"""
return normalize_urilist(p) if isinstance(p, List) else \
normalize_urilist([p]) if isinstance(p, (str, URIRef)) else p | python | def normalize_uriparm(p: URIPARM) -> List[URIRef]:
""" Return an optional list of URIRefs for p"""
return normalize_urilist(p) if isinstance(p, List) else \
normalize_urilist([p]) if isinstance(p, (str, URIRef)) else p | [
"def",
"normalize_uriparm",
"(",
"p",
":",
"URIPARM",
")",
"->",
"List",
"[",
"URIRef",
"]",
":",
"return",
"normalize_urilist",
"(",
"p",
")",
"if",
"isinstance",
"(",
"p",
",",
"List",
")",
"else",
"normalize_urilist",
"(",
"[",
"p",
"]",
")",
"if",
... | Return an optional list of URIRefs for p | [
"Return",
"an",
"optional",
"list",
"of",
"URIRefs",
"for",
"p"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shex_evaluator.py#L44-L47 | train |
hsolbrig/PyShEx | pyshex/shex_evaluator.py | normalize_startparm | def normalize_startparm(p: STARTPARM) -> List[Union[type(START), START_TYPE, URIRef]]:
""" Return the startspec for p """
if not isinstance(p, list):
p = [p]
return [normalize_uri(e) if isinstance(e, str) and e is not START else e for e in p] | python | def normalize_startparm(p: STARTPARM) -> List[Union[type(START), START_TYPE, URIRef]]:
""" Return the startspec for p """
if not isinstance(p, list):
p = [p]
return [normalize_uri(e) if isinstance(e, str) and e is not START else e for e in p] | [
"def",
"normalize_startparm",
"(",
"p",
":",
"STARTPARM",
")",
"->",
"List",
"[",
"Union",
"[",
"type",
"(",
"START",
")",
",",
"START_TYPE",
",",
"URIRef",
"]",
"]",
":",
"if",
"not",
"isinstance",
"(",
"p",
",",
"list",
")",
":",
"p",
"=",
"[",
... | Return the startspec for p | [
"Return",
"the",
"startspec",
"for",
"p"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shex_evaluator.py#L50-L54 | train |
hsolbrig/PyShEx | pyshex/shex_evaluator.py | genargs | def genargs(prog: Optional[str] = None) -> ArgumentParser:
"""
Create a command line parser
:return: parser
"""
parser = ArgumentParser(prog)
parser.add_argument("rdf", help="Input RDF file or SPARQL endpoint if slurper or sparql options")
parser.add_argument("shex", help="ShEx specification... | python | def genargs(prog: Optional[str] = None) -> ArgumentParser:
"""
Create a command line parser
:return: parser
"""
parser = ArgumentParser(prog)
parser.add_argument("rdf", help="Input RDF file or SPARQL endpoint if slurper or sparql options")
parser.add_argument("shex", help="ShEx specification... | [
"def",
"genargs",
"(",
"prog",
":",
"Optional",
"[",
"str",
"]",
"=",
"None",
")",
"->",
"ArgumentParser",
":",
"parser",
"=",
"ArgumentParser",
"(",
"prog",
")",
"parser",
".",
"add_argument",
"(",
"\"rdf\"",
",",
"help",
"=",
"\"Input RDF file or SPARQL en... | Create a command line parser
:return: parser | [
"Create",
"a",
"command",
"line",
"parser",
":",
"return",
":",
"parser"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shex_evaluator.py#L264-L289 | train |
hsolbrig/PyShEx | pyshex/shex_evaluator.py | ShExEvaluator.rdf | def rdf(self, rdf: Optional[Union[str, Graph]]) -> None:
""" Set the RDF DataSet to be evaulated. If ``rdf`` is a string, the presence of a return is the
indicator that it is text instead of a location.
:param rdf: File name, URL, representation of rdflib Graph
"""
if isinstanc... | python | def rdf(self, rdf: Optional[Union[str, Graph]]) -> None:
""" Set the RDF DataSet to be evaulated. If ``rdf`` is a string, the presence of a return is the
indicator that it is text instead of a location.
:param rdf: File name, URL, representation of rdflib Graph
"""
if isinstanc... | [
"def",
"rdf",
"(",
"self",
",",
"rdf",
":",
"Optional",
"[",
"Union",
"[",
"str",
",",
"Graph",
"]",
"]",
")",
"->",
"None",
":",
"if",
"isinstance",
"(",
"rdf",
",",
"Graph",
")",
":",
"self",
".",
"g",
"=",
"rdf",
"else",
":",
"self",
".",
... | Set the RDF DataSet to be evaulated. If ``rdf`` is a string, the presence of a return is the
indicator that it is text instead of a location.
:param rdf: File name, URL, representation of rdflib Graph | [
"Set",
"the",
"RDF",
"DataSet",
"to",
"be",
"evaulated",
".",
"If",
"rdf",
"is",
"a",
"string",
"the",
"presence",
"of",
"a",
"return",
"is",
"the",
"indicator",
"that",
"it",
"is",
"text",
"instead",
"of",
"a",
"location",
"."
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shex_evaluator.py#L107-L123 | train |
hsolbrig/PyShEx | pyshex/shex_evaluator.py | ShExEvaluator.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):
... | python | 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",
":",
"self",
".",
"pfx",
"=",
"None",
"if",
"shex",
"is",
"not",
"None",
":",
"if",
"isinstance",
"(",... | Set the schema to be used. Schema can either be a ShExC or ShExJ string or a pre-parsed schema.
:param shex: Schema | [
"Set",
"the",
"schema",
"to",
"be",
"used",
".",
"Schema",
"can",
"either",
"be",
"a",
"ShExC",
"or",
"ShExJ",
"string",
"or",
"a",
"pre",
"-",
"parsed",
"schema",
"."
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shex_evaluator.py#L134-L152 | train |
hsolbrig/PyShEx | pyshex/shex_evaluator.py | ShExEvaluator.focus | 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... | python | 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",
":",
"self",
".",
"_focus",
"=",
"normalize_uriparm",
"(",
"focus",
")",
"if",
"focus",
"else",
"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 URIRefs in the graph otherwise a URI or list of URI's | [
"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",
... | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shex_evaluator.py#L170-L176 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p3_terminology.py | arcsOut | 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))) | python | 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",
":",
"return",
"RDFGraph",
"(",
"G",
".",
"triples",
"(",
"(",
"n",
",",
"None",
",",
"None",
")",
")",
")"
] | arcsOut(G, n) is the set of triples in a graph G with subject n. | [
"arcsOut",
"(",
"G",
"n",
")",
"is",
"the",
"set",
"of",
"triples",
"in",
"a",
"graph",
"G",
"with",
"subject",
"n",
"."
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p3_terminology.py#L18-L20 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p3_terminology.py | predicatesOut | 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)} | python | 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",
"]",
":",
"return",
"{",
"p",
"for",
"p",
",",
"_",
"in",
"G",
".",
"predicate_objects",
"(",
"n",
")",
"}"
] | predicatesOut(G, n) is the set of predicates in arcsOut(G, n). | [
"predicatesOut",
"(",
"G",
"n",
")",
"is",
"the",
"set",
"of",
"predicates",
"in",
"arcsOut",
"(",
"G",
"n",
")",
"."
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p3_terminology.py#L23-L25 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p3_terminology.py | arcsIn | 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))) | python | 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",
":",
"return",
"RDFGraph",
"(",
"G",
".",
"triples",
"(",
"(",
"None",
",",
"None",
",",
"n",
")",
")",
")"
] | arcsIn(G, n) is the set of triples in a graph G with object n. | [
"arcsIn",
"(",
"G",
"n",
")",
"is",
"the",
"set",
"of",
"triples",
"in",
"a",
"graph",
"G",
"with",
"object",
"n",
"."
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p3_terminology.py#L28-L30 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p3_terminology.py | predicatesIn | 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)} | python | 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",
"]",
":",
"return",
"{",
"p",
"for",
"_",
",",
"p",
"in",
"G",
".",
"subject_predicates",
"(",
"n",
")",
"}"
] | predicatesIn(G, n) is the set of predicates in arcsIn(G, n). | [
"predicatesIn",
"(",
"G",
"n",
")",
"is",
"the",
"set",
"of",
"predicates",
"in",
"arcsIn",
"(",
"G",
"n",
")",
"."
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p3_terminology.py#L33-L35 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p3_terminology.py | neigh | 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) | python | 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",
":",
"return",
"arcsOut",
"(",
"G",
",",
"n",
")",
"|",
"arcsIn",
"(",
"G",
",",
"n",
")"
] | neigh(G, n) is the neighbourhood of the node n in the graph G.
neigh(G, n) = arcsOut(G, n) ∪ arcsIn(G, n) | [
"neigh",
"(",
"G",
"n",
")",
"is",
"the",
"neighbourhood",
"of",
"the",
"node",
"n",
"in",
"the",
"graph",
"G",
"."
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p3_terminology.py#L38-L43 | train |
hsolbrig/PyShEx | pyshex/shape_expressions_language/p3_terminology.py | predicates | 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) | python | 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",
"]",
":",
"return",
"predicatesOut",
"(",
"G",
",",
"n",
")",
"|",
"predicatesIn",
"(",
"G",
",",
"n",
")"
] | redicates(G, n) is the set of predicates in neigh(G, n).
predicates(G, n) = predicatesOut(G, n) ∪ predicatesIn(G, n) | [
"redicates",
"(",
"G",
"n",
")",
"is",
"the",
"set",
"of",
"predicates",
"in",
"neigh",
"(",
"G",
"n",
")",
"."
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/shape_expressions_language/p3_terminology.py#L46-L51 | train |
hsolbrig/PyShEx | pyshex/utils/url_utils.py | generate_base | 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'... | python | 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",
":",
"if",
"':'",
"in",
"path",
":",
"parts",
"=",
"urlparse",
"(",
"path",
")",
"parts_dict",
"=",
"parts",
".",
"_asdict",
"(",
")",
"parts_dict",
"[",
"'path'",
"]",
"=",
"os",
"... | 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 | [
"Convert",
"path",
"which",
"can",
"be",
"a",
"URL",
"or",
"a",
"file",
"path",
"into",
"a",
"base",
"URI"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/utils/url_utils.py#L6-L18 | train |
gak/pygooglechart | examples/venn.py | ultimate_power | 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... | python | 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",
"(",
")",
":",
"chart",
"=",
"VennChart",
"(",
"settings",
".",
"width",
",",
"settings",
".",
"height",
")",
"chart",
".",
"add_data",
"(",
"[",
"100",
",",
"100",
",",
"100",
",",
"20",
",",
"20",
",",
"20",
",",
"10",
... | Data from http://indexed.blogspot.com/2007/08/real-ultimate-power.html | [
"Data",
"from",
"http",
":",
"//",
"indexed",
".",
"blogspot",
".",
"com",
"/",
"2007",
"/",
"08",
"/",
"real",
"-",
"ultimate",
"-",
"power",
".",
"html"
] | 25234bb63127a7e5e057c0b98ab841f3f1d93b21 | https://github.com/gak/pygooglechart/blob/25234bb63127a7e5e057c0b98ab841f3f1d93b21/examples/venn.py#L30-L38 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol.split_host_port | 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)
... | python | 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",
")",
":",
"host",
",",
"port",
"=",
"splitport",
"(",
"server",
")",
"if",
"port",
"is",
"None",
":",
"port",
"=",
"11211",
"port",
"=",
"int",
"(",
"port",
")",
"if",
"re",
".",
"search",
"(",
... | 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) | [
"Return",
"(",
"host",
"port",
")",
"from",
"server",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L162-L179 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol._read_socket | 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:
... | python | 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",
")",
":",
"value",
"=",
"b''",
"while",
"len",
"(",
"value",
")",
"<",
"size",
":",
"data",
"=",
"self",
".",
"connection",
".",
"recv",
"(",
"size",
"-",
"len",
"(",
"value",
")",
")",
"if",
"not"... | Reads data from socket.
:param size: Size in bytes to be read.
:return: Data from socket | [
"Reads",
"data",
"from",
"socket",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L181-L199 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol._get_response | 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... | python | 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",
")",
":",
"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... | Get memcached response from socket.
:return: A tuple with binary values from memcached.
:rtype: tuple | [
"Get",
"memcached",
"response",
"from",
"socket",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L201-L233 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol.authenticate | 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... | python | 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",
")",
":",
"self",
".",
"_username",
"=",
"username",
"self",
".",
"_password",
"=",
"password",
"# Reopen the connection with the new credentials.",
"self",
".",
"disconnect",
"(",
")",
"self",
... | 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... | [
"Authenticate",
"user",
"on",
"server",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L245-L263 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol.serialize | 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... | python | 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",
")",
":",
"flags",
"=",
"0",
"if",
"isinstance",
"(",
"value",
",",
"binary_type",
")",
":",
"flags",
"|=",
"self",
".",
"FLAGS",
"[",
"'binary'",
"]",
"elif",
"isin... | 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... | [
"Serializes",
"a",
"value",
"based",
"on",
"its",
"type",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L319-L362 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol.deserialize | 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... | python | 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",
")",
":",
"FLAGS",
"=",
"self",
".",
"FLAGS",
"if",
"flags",
"&",
"FLAGS",
"[",
"'compressed'",
"]",
":",
"# pragma: no branch",
"value",
"=",
"self",
".",
"compression",
".",
"decompress",
"... | 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 | [
"Deserialized",
"values",
"based",
"on",
"flags",
"or",
"just",
"return",
"it",
"if",
"it",
"is",
"not",
"serialized",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L364-L406 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol.get | 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... | python | 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",
")",
":",
"logger",
".",
"debug",
"(",
"'Getting key %s'",
",",
"key",
")",
"data",
"=",
"struct",
".",
"pack",
"(",
"self",
".",
"HEADER_STRUCT",
"+",
"self",
".",
"COMMANDS",
"[",
"'get'",
"]",
"[",
"'struct'"... | 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 | [
"Get",
"a",
"key",
"and",
"its",
"CAS",
"value",
"from",
"server",
".",
"If",
"the",
"value",
"isn",
"t",
"cached",
"return",
"(",
"None",
"None",
")",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L408-L444 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol.noop | 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'],... | python | 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",
")",
":",
"logger",
".",
"debug",
"(",
"'Sending NOOP'",
")",
"data",
"=",
"struct",
".",
"pack",
"(",
"self",
".",
"HEADER_STRUCT",
"+",
"self",
".",
"COMMANDS",
"[",
"'noop'",
"]",
"[",
"'struct'",
"]",
",",
"self",
".",... | Send a NOOP command
:return: Returns the status.
:rtype: int | [
"Send",
"a",
"NOOP",
"command"
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L446-L470 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol.get_multi | 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.... | python | 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",
")",
":",
"# 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",
"["... | 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... | [
"Get",
"multiple",
"keys",
"from",
"server",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L472-L538 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol._set_add_replace | 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... | python | 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",
")",
":",
"time",
"=",
"time",
"if",
"time",
">=",
"0",
"else",
"self",
".",
"MAXIMUM_EXPIRE_TI... | 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 ... | [
"Function",
"to",
"set",
"/",
"add",
"/",
"replace",
"commands",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L540-L585 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol.set | 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.
... | python | 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",
")",
":",
"return",
"self",
".",
"_set_add_replace",
"(",
"'set'",
",",
"key",
",",
"value",
",",
"time",
",",
"compress_level",
"=",
"compress_leve... | 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... | [
"Set",
"a",
"value",
"for",
"a",
"key",
"on",
"server",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L587-L604 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol.cas | 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... | python | 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",
")",
":",
"# The protocol CAS value 0 means \"no cas\". Calling cas() with that value is",
"# probably unintentional. Don't allow it, since it would overwrite... | 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:... | [
"Add",
"a",
"key",
"/",
"value",
"to",
"server",
"ony",
"if",
"it",
"does",
"not",
"exist",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L606-L633 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol.add | 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... | python | 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",
")",
":",
"return",
"self",
".",
"_set_add_replace",
"(",
"'add'",
",",
"key",
",",
"value",
",",
"time",
",",
"compress_level",
"=",
"compress_leve... | 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:... | [
"Add",
"a",
"key",
"/",
"value",
"to",
"server",
"ony",
"if",
"it",
"does",
"not",
"exist",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L635-L652 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol.replace | 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 ... | python | 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",
")",
":",
"return",
"self",
".",
"_set_add_replace",
"(",
"'replace'",
",",
"key",
",",
"value",
",",
"time",
",",
"compress_level",
"=",
"compr... | 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:... | [
"Replace",
"a",
"key",
"/",
"value",
"to",
"server",
"ony",
"if",
"it",
"does",
"exist",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L654-L671 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol.set_multi | 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... | python | 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",
")",
":",
"mappings",
"=",
"mappings",
".",
"items",
"(",
")",
"msg",
"=",
"[",
"]",
"for",
"key",
",",
"value",
"in",
"mappings",
":",... | 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
... | [
"Set",
"multiple",
"keys",
"with",
"its",
"values",
"on",
"server",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L673-L741 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol._incr_decr | 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... | python | 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",
")",
":",
"time",
"=",
"time",
"if",
"time",
">=",
"0",
"else",
"self",
".",
"MAXIMUM_EXPIRE_TIME",
"self",
".",
"_send",
"(",
"struct",
".",
"pa... | 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... | [
"Function",
"which",
"increments",
"and",
"decrements",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L743-L775 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol.incr | 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... | python | 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",
")",
":",
"return",
"self",
".",
"_incr_decr",
"(",
"'incr'",
",",
"key",
",",
"value",
",",
"default",
",",
"time",
")"
] | 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... | [
"Increment",
"a",
"key",
"if",
"it",
"exists",
"returns",
"its",
"actual",
"value",
"if",
"it",
"doesn",
"t",
"return",
"0",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L777-L792 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol.decr | 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
... | python | 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",
")",
":",
"return",
"self",
".",
"_incr_decr",
"(",
"'decr'",
",",
"key",
",",
"value",
",",
"default",
",",
"time",
")"
] | 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 ... | [
"Decrement",
"a",
"key",
"if",
"it",
"exists",
"returns",
"its",
"actual",
"value",
"if",
"it",
"doesn",
"t",
"return",
"0",
".",
"Minimum",
"value",
"of",
"decrement",
"return",
"is",
"0",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L794-L810 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol.delete | 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... | python | 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",
")",
":",
"logger",
".",
"debug",
"(",
"'Deleting key %s'",
",",
"key",
")",
"self",
".",
"_send",
"(",
"struct",
".",
"pack",
"(",
"self",
".",
"HEADER_STRUCT",
"+",
"self",
".",
"COM... | 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... | [
"Delete",
"a",
"key",
"/",
"value",
"from",
"server",
".",
"If",
"key",
"existed",
"and",
"was",
"deleted",
"return",
"True",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L812-L839 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol.delete_multi | 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', ... | python | 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",
")",
":",
"logger",
".",
"debug",
"(",
"'Deleting keys %r'",
",",
"keys",
")",
"if",
"six",
".",
"PY2",
":",
"msg",
"=",
"''",
"else",
":",
"msg",
"=",
"b''",
"for",
"key",
"in",
"keys",
":",
"msg",
... | 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 | [
"Delete",
"multiple",
"keys",
"from",
"server",
"in",
"one",
"command",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L841-L882 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol.flush_all | 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')
... | python | 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",
")",
":",
"logger",
".",
"info",
"(",
"'Flushing memcached'",
")",
"self",
".",
"_send",
"(",
"struct",
".",
"pack",
"(",
"self",
".",
"HEADER_STRUCT",
"+",
"self",
".",
"COMMANDS",
"[",
"'flush'",
"]",
"["... | 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 | [
"Send",
"a",
"command",
"to",
"server",
"flush|delete",
"all",
"keys",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L884-L907 | train |
jaysonsantos/python-binary-memcached | bmemcached/protocol.py | Protocol.stats | 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:
... | python | 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",
")",
":",
"# TODO: Stats with key is not working.",
"if",
"key",
"is",
"not",
"None",
":",
"if",
"isinstance",
"(",
"key",
",",
"text_type",
")",
":",
"key",
"=",
"str_to_bytes",
"(",
"key",
")",
"key... | 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 | [
"Return",
"server",
"stats",
"."
] | 6a792829349c69204d9c5045e5c34b4231216dd6 | https://github.com/jaysonsantos/python-binary-memcached/blob/6a792829349c69204d9c5045e5c34b4231216dd6/bmemcached/protocol.py#L909-L957 | train |
hsolbrig/PyShEx | pyshex/prefixlib.py | PrefixLibrary.add_shex | 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:
... | python | 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\"",
":",
"if",
"'\\n'",
"in",
"schema",
"or",
"'\\r'",
"in",
"schema",
"or",
"' '",
"in",
"schema",
":",
"shex",
"=",
"schema",
"else",
":",
"shex",
"=",
"load_shex_... | Add a ShExC schema to the library
:param schema: ShExC schema text, URL or file name
:return: prefix library object | [
"Add",
"a",
"ShExC",
"schema",
"to",
"the",
"library"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/prefixlib.py#L39-L57 | train |
hsolbrig/PyShEx | pyshex/prefixlib.py | PrefixLibrary.add_bindings | 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 | python | 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\"",
":",
"for",
"prefix",
",",
"namespace",
"in",
"self",
":",
"g",
".",
"bind",
"(",
"prefix",
".",
"lower",
"(",
")",
",",
"namespace",
")",
"return",
"self"
] | Add bindings in the library to the graph
:param g: graph to add prefixes to
:return: PrefixLibrary object | [
"Add",
"bindings",
"in",
"the",
"library",
"to",
"the",
"graph"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/prefixlib.py#L72-L80 | train |
hsolbrig/PyShEx | pyshex/prefixlib.py | PrefixLibrary.add_to_object | 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
"""
... | python | 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",
":",
"nret",
"=",
"0",
"for",
"k",
",",
"v",
"in",
"self",
":",
"key",
"=",
"k",
".",
"upper",
"(",
")",
"exists",
... | 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... | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/prefixlib.py#L82-L98 | train |
hsolbrig/PyShEx | pyshex/prefixlib.py | PrefixLibrary.nsname | 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:
... | python | 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",
":",
"uri",
"=",
"str",
"(",
"uri",
")",
"nsuri",
"=",
"\"\"",
"prefix",
"=",
"None",
"for",
"pfx",
",",
"ns",
"in",
"self",
":",
"nss",
... | Return the 'ns:name' format of URI
:param uri: URI to transform
:return: nsname format of URI or straight URI if no mapping | [
"Return",
"the",
"ns",
":",
"name",
"format",
"of",
"URI"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/prefixlib.py#L100-L115 | train |
stuaxo/vext | vext/conf/__init__.py | open_spec | 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... | python | 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",
")",
":",
"import",
"ruamel",
".",
"yaml",
"as",
"yaml",
"keys",
"=",
"[",
"'modules'",
",",
"'pths'",
",",
"'test_import'",
",",
"'install_hints'",
",",
"'extra_paths'",
"]",
"data",
"=",
"yaml",
".",
"safe_load",
"(",
"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 | [
":",
"param",
"f",
":",
"file",
"object",
"with",
"spec",
"data"
] | fa98a21ecfbbc1c3d1b84085d69ec42defdd2f69 | https://github.com/stuaxo/vext/blob/fa98a21ecfbbc1c3d1b84085d69ec42defdd2f69/vext/conf/__init__.py#L9-L34 | train |
hsolbrig/PyShEx | pyshex/utils/schema_loader.py | SchemaLoader.load | 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
... | python | 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",
":",
"if",
"isinstance",
"(",
"schema_file",
",",
... | 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 | [
"Load",
"a",
"ShEx",
"Schema",
"from",
"schema_location"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/utils/schema_loader.py#L26-L45 | train |
hsolbrig/PyShEx | pyshex/utils/schema_loader.py | SchemaLoader.loads | 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] == '... | python | 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",
":",
"self",
".",
"schema_text",
"=",
"schema_txt",
"if",
"schema_txt",
".",
"strip",
"(",
")",
"[",
"0",
"]",
"==",
"'{'",
":",
"# TODO: figure out how to pro... | 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 | [
"Parse",
"and",
"return",
"schema",
"as",
"a",
"ShExJ",
"Schema"
] | 9d659cc36e808afd66d4a6d60e8ea21cb12eb744 | https://github.com/hsolbrig/PyShEx/blob/9d659cc36e808afd66d4a6d60e8ea21cb12eb744/pyshex/utils/schema_loader.py#L47-L58 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClient.placeOrder | def placeOrder(self, id, contract, order):
"""placeOrder(EClient self, OrderId id, Contract contract, Order order)"""
return _swigibpy.EClient_placeOrder(self, id, contract, order) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClient_placeOrder",
"(",
"self",
",",
"id",
",",
"contract",
",",
"order",
")"
] | placeOrder(EClient self, OrderId id, Contract contract, Order order) | [
"placeOrder",
"(",
"EClient",
"self",
"OrderId",
"id",
"Contract",
"contract",
"Order",
"order",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1125-L1127 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClient.reqMktDepth | 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) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClient_reqMktDepth",
"(",
"self",
",",
"id",
",",
"contract",
",",
"numRows",
",",
"mktDepthOptions",
")"
] | reqMktDepth(EClient self, TickerId id, Contract contract, int numRows, TagValueListSPtr const & mktDepthOptions) | [
"reqMktDepth",
"(",
"EClient",
"self",
"TickerId",
"id",
"Contract",
"contract",
"int",
"numRows",
"TagValueListSPtr",
"const",
"&",
"mktDepthOptions",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1165-L1167 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClient.exerciseOptions | 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,... | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClient_exerciseOptions",
"(",
"self",
",",
"id",
",",
"contract",
",",
... | exerciseOptions(EClient self, TickerId id, Contract contract, int exerciseAction, int exerciseQuantity, IBString const & account, int override) | [
"exerciseOptions",
"(",
"EClient",
"self",
"TickerId",
"id",
"Contract",
"contract",
"int",
"exerciseAction",
"int",
"exerciseQuantity",
"IBString",
"const",
"&",
"account",
"int",
"override",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1220-L1222 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClient.reqScannerSubscription | def reqScannerSubscription(self, tickerId, subscription, scannerSubscriptionOptions):
"""reqScannerSubscription(EClient self, int tickerId, ScannerSubscription subscription, TagValueListSPtr const & scannerSubscriptionOptions)"""
return _swigibpy.EClient_reqScannerSubscription(self, tickerId, subscripti... | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClient_reqScannerSubscription",
"(",
"self",
",",
"tickerId",
",",
"subscription",
",",
"scannerSubscriptionOpt... | reqScannerSubscription(EClient self, int tickerId, ScannerSubscription subscription, TagValueListSPtr const & scannerSubscriptionOptions) | [
"reqScannerSubscription",
"(",
"EClient",
"self",
"int",
"tickerId",
"ScannerSubscription",
"subscription",
"TagValueListSPtr",
"const",
"&",
"scannerSubscriptionOptions",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1250-L1252 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClient.reqFundamentalData | def reqFundamentalData(self, reqId, arg3, reportType):
"""reqFundamentalData(EClient self, TickerId reqId, Contract arg3, IBString const & reportType)"""
return _swigibpy.EClient_reqFundamentalData(self, reqId, arg3, reportType) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClient_reqFundamentalData",
"(",
"self",
",",
"reqId",
",",
"arg3",
",",
"reportType",
")"
] | reqFundamentalData(EClient self, TickerId reqId, Contract arg3, IBString const & reportType) | [
"reqFundamentalData",
"(",
"EClient",
"self",
"TickerId",
"reqId",
"Contract",
"arg3",
"IBString",
"const",
"&",
"reportType",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1260-L1262 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClient.calculateImpliedVolatility | 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) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClient_calculateImpliedVolatility",
"(",
"self",
",",
"reqId",
",",
"contract",
",",
"optionPrice",
",",... | calculateImpliedVolatility(EClient self, TickerId reqId, Contract contract, double optionPrice, double underPrice) | [
"calculateImpliedVolatility",
"(",
"EClient",
"self",
"TickerId",
"reqId",
"Contract",
"contract",
"double",
"optionPrice",
"double",
"underPrice",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1270-L1272 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClient.calculateOptionPrice | 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) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClient_calculateOptionPrice",
"(",
"self",
",",
"reqId",
",",
"contract",
",",
"volatility",
",",
"underPrice... | calculateOptionPrice(EClient self, TickerId reqId, Contract contract, double volatility, double underPrice) | [
"calculateOptionPrice",
"(",
"EClient",
"self",
"TickerId",
"reqId",
"Contract",
"contract",
"double",
"volatility",
"double",
"underPrice",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1275-L1277 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClient.reqAccountSummary | 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) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClient_reqAccountSummary",
"(",
"self",
",",
"reqId",
",",
"groupName",
",",
"tags",
")"
] | reqAccountSummary(EClient self, int reqId, IBString const & groupName, IBString const & tags) | [
"reqAccountSummary",
"(",
"EClient",
"self",
"int",
"reqId",
"IBString",
"const",
"&",
"groupName",
"IBString",
"const",
"&",
"tags",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1310-L1312 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClientSocketBase.eConnect | 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) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClientSocketBase_eConnect",
"(",
"self",
",",
"host",
",",
"port",
",",
"clientId",
",",
"extraAu... | eConnect(EClientSocketBase self, char const * host, unsigned int port, int clientId=0, bool extraAuth=False) -> bool | [
"eConnect",
"(",
"EClientSocketBase",
"self",
"char",
"const",
"*",
"host",
"unsigned",
"int",
"port",
"int",
"clientId",
"=",
"0",
"bool",
"extraAuth",
"=",
"False",
")",
"-",
">",
"bool"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1412-L1414 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClientSocketBase.reqMktData | 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... | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClientSocketBase_reqMktData",
"(",
"self",
",",
"id",
",",
"contract",
",",
"genericTicks",
",",
... | reqMktData(EClientSocketBase self, TickerId id, Contract contract, IBString const & genericTicks, bool snapshot, TagValueListSPtr const & mktDataOptions) | [
"reqMktData",
"(",
"EClientSocketBase",
"self",
"TickerId",
"id",
"Contract",
"contract",
"IBString",
"const",
"&",
"genericTicks",
"bool",
"snapshot",
"TagValueListSPtr",
"const",
"&",
"mktDataOptions",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1452-L1454 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClientSocketBase.placeOrder | def placeOrder(self, id, contract, order):
"""placeOrder(EClientSocketBase self, OrderId id, Contract contract, Order order)"""
return _swigibpy.EClientSocketBase_placeOrder(self, id, contract, order) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClientSocketBase_placeOrder",
"(",
"self",
",",
"id",
",",
"contract",
",",
"order",
")"
] | placeOrder(EClientSocketBase self, OrderId id, Contract contract, Order order) | [
"placeOrder",
"(",
"EClientSocketBase",
"self",
"OrderId",
"id",
"Contract",
"contract",
"Order",
"order",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1462-L1464 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClientSocketBase.reqMktDepth | 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) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClientSocketBase_reqMktDepth",
"(",
"self",
",",
"tickerId",
",",
"contract",
",",
"numRows",
",",
"mktDepthOptio... | reqMktDepth(EClientSocketBase self, TickerId tickerId, Contract contract, int numRows, TagValueListSPtr const & mktDepthOptions) | [
"reqMktDepth",
"(",
"EClientSocketBase",
"self",
"TickerId",
"tickerId",
"Contract",
"contract",
"int",
"numRows",
"TagValueListSPtr",
"const",
"&",
"mktDepthOptions",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1502-L1504 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClientSocketBase.reqHistoricalData | 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... | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClientSocketBase... | 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) | [
"reqHistoricalData",
"(",
"EClientSocketBase",
"self",
"TickerId",
"id",
"Contract",
"contract",
"IBString",
"const",
"&",
"endDateTime",
"IBString",
"const",
"&",
"durationStr",
"IBString",
"const",
"&",
"barSizeSetting",
"IBString",
"const",
"&",
"whatToShow",
"int"... | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1552-L1554 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClientSocketBase.exerciseOptions | 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... | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClientSocketBase_exerciseOptions",
"(",
"self",
",",
"tickerId",
",",
... | exerciseOptions(EClientSocketBase self, TickerId tickerId, Contract contract, int exerciseAction, int exerciseQuantity, IBString const & account, int override) | [
"exerciseOptions",
"(",
"EClientSocketBase",
"self",
"TickerId",
"tickerId",
"Contract",
"contract",
"int",
"exerciseAction",
"int",
"exerciseQuantity",
"IBString",
"const",
"&",
"account",
"int",
"override",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1557-L1559 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClientSocketBase.reqRealTimeBars | 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... | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClientSocketBase_reqRealTimeBars",
"(",
"self",
",",
"id",
",",
"contract",
... | reqRealTimeBars(EClientSocketBase self, TickerId id, Contract contract, int barSize, IBString const & whatToShow, bool useRTH, TagValueListSPtr const & realTimeBarsOptions) | [
"reqRealTimeBars",
"(",
"EClientSocketBase",
"self",
"TickerId",
"id",
"Contract",
"contract",
"int",
"barSize",
"IBString",
"const",
"&",
"whatToShow",
"bool",
"useRTH",
"TagValueListSPtr",
"const",
"&",
"realTimeBarsOptions",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1567-L1569 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClientSocketBase.reqScannerSubscription | def reqScannerSubscription(self, tickerId, subscription, scannerSubscriptionOptions):
"""reqScannerSubscription(EClientSocketBase self, int tickerId, ScannerSubscription subscription, TagValueListSPtr const & scannerSubscriptionOptions)"""
return _swigibpy.EClientSocketBase_reqScannerSubscription(self, ... | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClientSocketBase_reqScannerSubscription",
"(",
"self",
",",
"tickerId",
",",
"subscription",
",",
"scannerSubsc... | reqScannerSubscription(EClientSocketBase self, int tickerId, ScannerSubscription subscription, TagValueListSPtr const & scannerSubscriptionOptions) | [
"reqScannerSubscription",
"(",
"EClientSocketBase",
"self",
"int",
"tickerId",
"ScannerSubscription",
"subscription",
"TagValueListSPtr",
"const",
"&",
"scannerSubscriptionOptions",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1587-L1589 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClientSocketBase.reqFundamentalData | def reqFundamentalData(self, reqId, arg3, reportType):
"""reqFundamentalData(EClientSocketBase self, TickerId reqId, Contract arg3, IBString const & reportType)"""
return _swigibpy.EClientSocketBase_reqFundamentalData(self, reqId, arg3, reportType) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClientSocketBase_reqFundamentalData",
"(",
"self",
",",
"reqId",
",",
"arg3",
",",
"reportType",
")"
] | reqFundamentalData(EClientSocketBase self, TickerId reqId, Contract arg3, IBString const & reportType) | [
"reqFundamentalData",
"(",
"EClientSocketBase",
"self",
"TickerId",
"reqId",
"Contract",
"arg3",
"IBString",
"const",
"&",
"reportType",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1597-L1599 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClientSocketBase.calculateImpliedVolatility | 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... | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClientSocketBase_calculateImpliedVolatility",
"(",
"self",
",",
"reqId",
",",
"contract",
",",
"optionPric... | calculateImpliedVolatility(EClientSocketBase self, TickerId reqId, Contract contract, double optionPrice, double underPrice) | [
"calculateImpliedVolatility",
"(",
"EClientSocketBase",
"self",
"TickerId",
"reqId",
"Contract",
"contract",
"double",
"optionPrice",
"double",
"underPrice",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1607-L1609 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClientSocketBase.calculateOptionPrice | 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) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClientSocketBase_calculateOptionPrice",
"(",
"self",
",",
"reqId",
",",
"contract",
",",
"volatility",
",",
"... | calculateOptionPrice(EClientSocketBase self, TickerId reqId, Contract contract, double volatility, double underPrice) | [
"calculateOptionPrice",
"(",
"EClientSocketBase",
"self",
"TickerId",
"reqId",
"Contract",
"contract",
"double",
"volatility",
"double",
"underPrice",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1612-L1614 | train |
Komnomnomnom/swigibpy | swigibpy.py | EClientSocketBase.reqAccountSummary | 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) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EClientSocketBase_reqAccountSummary",
"(",
"self",
",",
"reqId",
",",
"groupName",
",",
"tags",
")"
] | reqAccountSummary(EClientSocketBase self, int reqId, IBString const & groupName, IBString const & tags) | [
"reqAccountSummary",
"(",
"EClientSocketBase",
"self",
"int",
"reqId",
"IBString",
"const",
"&",
"groupName",
"IBString",
"const",
"&",
"tags",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1647-L1649 | train |
Komnomnomnom/swigibpy | swigibpy.py | TWSPoller._run | 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():
... | python | 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",
")",
":",
"stop",
"=",
"self",
".",
"_stop_evt",
"connected",
"=",
"self",
".",
"_connected_evt",
"tws",
"=",
"self",
".",
"_tws",
"fd",
"=",
"tws",
".",
"fd",
"(",
")",
"pollfd",
"=",
"[",
"fd",
"]",
"while",
"not",
"... | Continually poll TWS | [
"Continually",
"poll",
"TWS"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2059-L2106 | train |
Komnomnomnom/swigibpy | swigibpy.py | EWrapper.tickPrice | 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) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EWrapper_tickPrice",
"(",
"self",
",",
"tickerId",
",",
"field",
",",
"price",
",",
"canAutoExecute",
")"
] | tickPrice(EWrapper self, TickerId tickerId, TickType field, double price, int canAutoExecute) | [
"tickPrice",
"(",
"EWrapper",
"self",
"TickerId",
"tickerId",
"TickType",
"field",
"double",
"price",
"int",
"canAutoExecute",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2421-L2423 | train |
Komnomnomnom/swigibpy | swigibpy.py | EWrapper.tickSize | def tickSize(self, tickerId, field, size):
"""tickSize(EWrapper self, TickerId tickerId, TickType field, int size)"""
return _swigibpy.EWrapper_tickSize(self, tickerId, field, size) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EWrapper_tickSize",
"(",
"self",
",",
"tickerId",
",",
"field",
",",
"size",
")"
] | tickSize(EWrapper self, TickerId tickerId, TickType field, int size) | [
"tickSize",
"(",
"EWrapper",
"self",
"TickerId",
"tickerId",
"TickType",
"field",
"int",
"size",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2426-L2428 | train |
Komnomnomnom/swigibpy | swigibpy.py | EWrapper.tickOptionComputation | 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, ... | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EWrapper_tick... | tickOptionComputation(EWrapper self, TickerId tickerId, TickType tickType, double impliedVol, double delta, double optPrice, double pvDividend, double gamma, double vega, double theta, double undPrice) | [
"tickOptionComputation",
"(",
"EWrapper",
"self",
"TickerId",
"tickerId",
"TickType",
"tickType",
"double",
"impliedVol",
"double",
"delta",
"double",
"optPrice",
"double",
"pvDividend",
"double",
"gamma",
"double",
"vega",
"double",
"theta",
"double",
"undPrice",
")"... | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2431-L2433 | train |
Komnomnomnom/swigibpy | swigibpy.py | EWrapper.tickGeneric | def tickGeneric(self, tickerId, tickType, value):
"""tickGeneric(EWrapper self, TickerId tickerId, TickType tickType, double value)"""
return _swigibpy.EWrapper_tickGeneric(self, tickerId, tickType, value) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EWrapper_tickGeneric",
"(",
"self",
",",
"tickerId",
",",
"tickType",
",",
"value",
")"
] | tickGeneric(EWrapper self, TickerId tickerId, TickType tickType, double value) | [
"tickGeneric",
"(",
"EWrapper",
"self",
"TickerId",
"tickerId",
"TickType",
"tickType",
"double",
"value",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2436-L2438 | train |
Komnomnomnom/swigibpy | swigibpy.py | EWrapper.tickString | def tickString(self, tickerId, tickType, value):
"""tickString(EWrapper self, TickerId tickerId, TickType tickType, IBString const & value)"""
return _swigibpy.EWrapper_tickString(self, tickerId, tickType, value) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EWrapper_tickString",
"(",
"self",
",",
"tickerId",
",",
"tickType",
",",
"value",
")"
] | tickString(EWrapper self, TickerId tickerId, TickType tickType, IBString const & value) | [
"tickString",
"(",
"EWrapper",
"self",
"TickerId",
"tickerId",
"TickType",
"tickType",
"IBString",
"const",
"&",
"value",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2441-L2443 | train |
Komnomnomnom/swigibpy | swigibpy.py | EWrapper.tickEFP | 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... | python | 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",
")",
":",
"return",
"_swigibpy",
".",
... | tickEFP(EWrapper self, TickerId tickerId, TickType tickType, double basisPoints, IBString const & formattedBasisPoints, double totalDividends, int holdDays, IBString const & futureExpiry, double dividendImpact, double dividendsToExpiry) | [
"tickEFP",
"(",
"EWrapper",
"self",
"TickerId",
"tickerId",
"TickType",
"tickType",
"double",
"basisPoints",
"IBString",
"const",
"&",
"formattedBasisPoints",
"double",
"totalDividends",
"int",
"holdDays",
"IBString",
"const",
"&",
"futureExpiry",
"double",
"dividendImp... | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2446-L2448 | train |
Komnomnomnom/swigibpy | swigibpy.py | EWrapper.orderStatus | 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... | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EWrapper_ord... | 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) | [
"orderStatus",
"(",
"EWrapper",
"self",
"OrderId",
"orderId",
"IBString",
"const",
"&",
"status",
"int",
"filled",
"int",
"remaining",
"double",
"avgFillPrice",
"int",
"permId",
"int",
"parentId",
"double",
"lastFillPrice",
"int",
"clientId",
"IBString",
"const",
... | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2451-L2453 | train |
Komnomnomnom/swigibpy | swigibpy.py | EWrapper.openOrder | 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) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EWrapper_openOrder",
"(",
"self",
",",
"orderId",
",",
"arg0",
",",
"arg1",
",",
"arg2",
")"
] | openOrder(EWrapper self, OrderId orderId, Contract arg0, Order arg1, OrderState arg2) | [
"openOrder",
"(",
"EWrapper",
"self",
"OrderId",
"orderId",
"Contract",
"arg0",
"Order",
"arg1",
"OrderState",
"arg2",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2456-L2458 | train |
Komnomnomnom/swigibpy | swigibpy.py | EWrapper.updateAccountValue | 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) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EWrapper_updateAccountValue",
"(",
"self",
",",
"key",
",",
"val",
",",
"currency",
",",
"accountName",
")"
] | updateAccountValue(EWrapper self, IBString const & key, IBString const & val, IBString const & currency, IBString const & accountName) | [
"updateAccountValue",
"(",
"EWrapper",
"self",
"IBString",
"const",
"&",
"key",
"IBString",
"const",
"&",
"val",
"IBString",
"const",
"&",
"currency",
"IBString",
"const",
"&",
"accountName",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2477-L2479 | train |
Komnomnomnom/swigibpy | swigibpy.py | EWrapper.updatePortfolio | 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 &... | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EWrapper_updatePortfolio",
"("... | updatePortfolio(EWrapper self, Contract contract, int position, double marketPrice, double marketValue, double averageCost, double unrealizedPNL, double realizedPNL, IBString const & accountName) | [
"updatePortfolio",
"(",
"EWrapper",
"self",
"Contract",
"contract",
"int",
"position",
"double",
"marketPrice",
"double",
"marketValue",
"double",
"averageCost",
"double",
"unrealizedPNL",
"double",
"realizedPNL",
"IBString",
"const",
"&",
"accountName",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2482-L2484 | train |
Komnomnomnom/swigibpy | swigibpy.py | EWrapper.execDetails | def execDetails(self, reqId, contract, execution):
"""execDetails(EWrapper self, int reqId, Contract contract, Execution execution)"""
return _swigibpy.EWrapper_execDetails(self, reqId, contract, execution) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EWrapper_execDetails",
"(",
"self",
",",
"reqId",
",",
"contract",
",",
"execution",
")"
] | execDetails(EWrapper self, int reqId, Contract contract, Execution execution) | [
"execDetails",
"(",
"EWrapper",
"self",
"int",
"reqId",
"Contract",
"contract",
"Execution",
"execution",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2517-L2519 | train |
Komnomnomnom/swigibpy | swigibpy.py | EWrapper.error | 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
... | python | 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",
")",
":",
"if",
"errorCode",
"==",
"165",
":",
"# Historical data sevice message",
"sys",
".",
"stderr",
".",
"write",
"(",
"\"TWS INFO - %s: %s\\n\"",
"%",
"(",
"errorCode",
",",
... | Error during communication with TWS | [
"Error",
"during",
"communication",
"with",
"TWS"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2527-L2542 | train |
Komnomnomnom/swigibpy | swigibpy.py | EWrapper.updateMktDepth | 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) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EWrapper_updateMktDepth",
"(",
"self",
",",
"id",
",",
"position",
",",
"operation",
",",
"... | updateMktDepth(EWrapper self, TickerId id, int position, int operation, int side, double price, int size) | [
"updateMktDepth",
"(",
"EWrapper",
"self",
"TickerId",
"id",
"int",
"position",
"int",
"operation",
"int",
"side",
"double",
"price",
"int",
"size",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2546-L2548 | train |
Komnomnomnom/swigibpy | swigibpy.py | EWrapper.updateMktDepthL2 | 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... | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EWrapper_updateMktDepthL2",
"(",
"self",
",",
"id",
",",
"position",
",... | updateMktDepthL2(EWrapper self, TickerId id, int position, IBString marketMaker, int operation, int side, double price, int size) | [
"updateMktDepthL2",
"(",
"EWrapper",
"self",
"TickerId",
"id",
"int",
"position",
"IBString",
"marketMaker",
"int",
"operation",
"int",
"side",
"double",
"price",
"int",
"size",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2551-L2553 | train |
Komnomnomnom/swigibpy | swigibpy.py | EWrapper.updateNewsBulletin | 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) | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EWrapper_updateNewsBulletin",
"(",
"self",
",",
"msgId",
",",
"msgType",
",",
"newsMessage",
",",
"originExch",
... | updateNewsBulletin(EWrapper self, int msgId, int msgType, IBString const & newsMessage, IBString const & originExch) | [
"updateNewsBulletin",
"(",
"EWrapper",
"self",
"int",
"msgId",
"int",
"msgType",
"IBString",
"const",
"&",
"newsMessage",
"IBString",
"const",
"&",
"originExch",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2556-L2558 | train |
Komnomnomnom/swigibpy | swigibpy.py | EWrapper.historicalData | 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... | python | 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",
")",
":",
"return",
"_swigibpy",
".",
"EWrapper_historicalData",
"(",
"self",... | historicalData(EWrapper self, TickerId reqId, IBString const & date, double open, double high, double low, double close, int volume, int barCount, double WAP, int 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",
")"
] | cfd307fdbfaffabc69a2dc037538d7e34a8b8daf | https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2571-L2573 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.