nwo stringlengths 5 86 | sha stringlengths 40 40 | path stringlengths 4 189 | language stringclasses 1
value | identifier stringlengths 1 94 | parameters stringlengths 2 4.03k | argument_list stringclasses 1
value | return_statement stringlengths 0 11.5k | docstring stringlengths 1 33.2k | docstring_summary stringlengths 0 5.15k | docstring_tokens list | function stringlengths 34 151k | function_tokens list | url stringlengths 90 278 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | wx/lib/docview.py | python | Document.GetDocumentSaved | (self) | return self._savedYet | Returns True if the document has been saved. This method has been
added to wxPython and is not in wxWindows. | Returns True if the document has been saved. This method has been
added to wxPython and is not in wxWindows. | [
"Returns",
"True",
"if",
"the",
"document",
"has",
"been",
"saved",
".",
"This",
"method",
"has",
"been",
"added",
"to",
"wxPython",
"and",
"is",
"not",
"in",
"wxWindows",
"."
] | def GetDocumentSaved(self):
"""
Returns True if the document has been saved. This method has been
added to wxPython and is not in wxWindows.
"""
return self._savedYet | [
"def",
"GetDocumentSaved",
"(",
"self",
")",
":",
"return",
"self",
".",
"_savedYet"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/docview.py#L169-L174 | |
danmar/cppcheck | 78228599da0dfce3763a90a130b14fa2d614ab9f | addons/cppcheckdata.py | python | CppcheckData.configurations | (self) | return list(self.iterconfigurations()) | Return the list of all available Configuration objects. | Return the list of all available Configuration objects. | [
"Return",
"the",
"list",
"of",
"all",
"available",
"Configuration",
"objects",
"."
] | def configurations(self):
"""
Return the list of all available Configuration objects.
"""
return list(self.iterconfigurations()) | [
"def",
"configurations",
"(",
"self",
")",
":",
"return",
"list",
"(",
"self",
".",
"iterconfigurations",
"(",
")",
")"
] | https://github.com/danmar/cppcheck/blob/78228599da0dfce3763a90a130b14fa2d614ab9f/addons/cppcheckdata.py#L1042-L1046 | |
nsnam/ns-3-dev-git | efdb2e21f45c0a87a60b47c547b68fa140a7b686 | bindings/python/rad_util.py | python | float_range | (start, stop=None, step=None) | return l | Return a list containing an arithmetic progression of floats.
Return a list of floats between 0.0 (or start) and stop with an
increment of step.
This is in functionality to python's range() built-in function
but can accept float increments.
As with range(), stop is omitted from the list. | Return a list containing an arithmetic progression of floats. | [
"Return",
"a",
"list",
"containing",
"an",
"arithmetic",
"progression",
"of",
"floats",
"."
] | def float_range(start, stop=None, step=None):
"""Return a list containing an arithmetic progression of floats.
Return a list of floats between 0.0 (or start) and stop with an
increment of step.
This is in functionality to python's range() built-in function
but can accept float increments.
A... | [
"def",
"float_range",
"(",
"start",
",",
"stop",
"=",
"None",
",",
"step",
"=",
"None",
")",
":",
"if",
"stop",
"is",
"None",
":",
"stop",
"=",
"float",
"(",
"start",
")",
"start",
"=",
"0.0",
"if",
"step",
"is",
"None",
":",
"step",
"=",
"1.0",
... | https://github.com/nsnam/ns-3-dev-git/blob/efdb2e21f45c0a87a60b47c547b68fa140a7b686/bindings/python/rad_util.py#L663-L688 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | wx/lib/agw/supertooltip.py | python | SuperToolTip.GetTopGradientColour | (self) | return self._topColour | Returns the top gradient colour. | Returns the top gradient colour. | [
"Returns",
"the",
"top",
"gradient",
"colour",
"."
] | def GetTopGradientColour(self):
""" Returns the top gradient colour. """
return self._topColour | [
"def",
"GetTopGradientColour",
"(",
"self",
")",
":",
"return",
"self",
".",
"_topColour"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/supertooltip.py#L1225-L1228 | |
catboost/catboost | 167f64f237114a4d10b2b4ee42adb4569137debe | contrib/tools/python/src/Parser/asdl.py | python | ASDLParser.p_type_1 | (self, (sum,)) | return Sum(sum) | type ::= sum | type ::= sum | [
"type",
"::",
"=",
"sum"
] | def p_type_1(self, (sum,)):
" type ::= sum "
return Sum(sum) | [
"def",
"p_type_1",
"(",
"self",
",",
"(",
"sum",
",",
")",
")",
":",
"return",
"Sum",
"(",
"sum",
")"
] | https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Parser/asdl.py#L148-L150 | |
MVIG-SJTU/RMPE | 5188c230ec800c12be7369c3619615bc9b020aa4 | scripts/cpp_lint.py | python | _IncludeState.IsInAlphabeticalOrder | (self, clean_lines, linenum, header_path) | return True | Check if a header is in alphabetical order with the previous header.
Args:
clean_lines: A CleansedLines instance containing the file.
linenum: The number of the line to check.
header_path: Canonicalized header to be checked.
Returns:
Returns true if the header is in alphabetical order. | Check if a header is in alphabetical order with the previous header. | [
"Check",
"if",
"a",
"header",
"is",
"in",
"alphabetical",
"order",
"with",
"the",
"previous",
"header",
"."
] | def IsInAlphabeticalOrder(self, clean_lines, linenum, header_path):
"""Check if a header is in alphabetical order with the previous header.
Args:
clean_lines: A CleansedLines instance containing the file.
linenum: The number of the line to check.
header_path: Canonicalized header to be checke... | [
"def",
"IsInAlphabeticalOrder",
"(",
"self",
",",
"clean_lines",
",",
"linenum",
",",
"header_path",
")",
":",
"# If previous section is different from current section, _last_header will",
"# be reset to empty string, so it's always less than current header.",
"#",
"# If previous line ... | https://github.com/MVIG-SJTU/RMPE/blob/5188c230ec800c12be7369c3619615bc9b020aa4/scripts/cpp_lint.py#L612-L631 | |
tensorflow/tensorflow | 419e3a6b650ea4bd1b0cba23c4348f8a69f3272e | tensorflow/lite/python/lite.py | python | TFLiteConverterBase._save_conversion_params_metric | (self,
graph_def=None,
inference_type=None,
inference_input_type=None) | Set conversion parameter metrics. | Set conversion parameter metrics. | [
"Set",
"conversion",
"parameter",
"metrics",
"."
] | def _save_conversion_params_metric(self,
graph_def=None,
inference_type=None,
inference_input_type=None):
"""Set conversion parameter metrics."""
converter_kwargs = self._collected_converter_params
... | [
"def",
"_save_conversion_params_metric",
"(",
"self",
",",
"graph_def",
"=",
"None",
",",
"inference_type",
"=",
"None",
",",
"inference_input_type",
"=",
"None",
")",
":",
"converter_kwargs",
"=",
"self",
".",
"_collected_converter_params",
"converter_kwargs",
".",
... | https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/lite/python/lite.py#L747-L841 | ||
CMU-Perceptual-Computing-Lab/caffe_rtpose | a4778bb1c3eb74d7250402016047216f77b4dba6 | scripts/cpp_lint.py | python | _GetTextInside | (text, start_pattern) | return text[start_position:position - 1] | r"""Retrieves all the text between matching open and close parentheses.
Given a string of lines and a regular expression string, retrieve all the text
following the expression and between opening punctuation symbols like
(, [, or {, and the matching close-punctuation symbol. This properly nested
occurrences of... | r"""Retrieves all the text between matching open and close parentheses. | [
"r",
"Retrieves",
"all",
"the",
"text",
"between",
"matching",
"open",
"and",
"close",
"parentheses",
"."
] | def _GetTextInside(text, start_pattern):
r"""Retrieves all the text between matching open and close parentheses.
Given a string of lines and a regular expression string, retrieve all the text
following the expression and between opening punctuation symbols like
(, [, or {, and the matching close-punctuation sy... | [
"def",
"_GetTextInside",
"(",
"text",
",",
"start_pattern",
")",
":",
"# TODO(sugawarayu): Audit cpplint.py to see what places could be profitably",
"# rewritten to use _GetTextInside (and use inferior regexp matching today).",
"# Give opening punctuations to get the matching close-punctuations.... | https://github.com/CMU-Perceptual-Computing-Lab/caffe_rtpose/blob/a4778bb1c3eb74d7250402016047216f77b4dba6/scripts/cpp_lint.py#L3752-L3805 | |
wlanjie/AndroidFFmpeg | 7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf | tools/fdk-aac-build/x86/toolchain/share/gdb/system-gdbinit/elinos.py | python | get_elinos_environment | () | return result | Return the ELinOS environment.
If the ELinOS environment is properly set up, return a dictionary
which contains:
* The path to the ELinOS project at key 'project';
* The path to the ELinOS CDK at key 'cdk';
* The ELinOS target name at key 'target' (Eg. 'i486-linux');
* A list of Xenomai... | Return the ELinOS environment. | [
"Return",
"the",
"ELinOS",
"environment",
"."
] | def get_elinos_environment():
"""Return the ELinOS environment.
If the ELinOS environment is properly set up, return a dictionary
which contains:
* The path to the ELinOS project at key 'project';
* The path to the ELinOS CDK at key 'cdk';
* The ELinOS target name at key 'target' (Eg. 'i4... | [
"def",
"get_elinos_environment",
"(",
")",
":",
"result",
"=",
"{",
"}",
"for",
"key",
"in",
"(",
"\"project\"",
",",
"\"cdk\"",
",",
"\"target\"",
")",
":",
"var",
"=",
"\"ELINOS_\"",
"+",
"key",
".",
"upper",
"(",
")",
"if",
"var",
"in",
"os",
".",... | https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/share/gdb/system-gdbinit/elinos.py#L27-L55 | |
apple/turicreate | cce55aa5311300e3ce6af93cb45ba791fd1bdf49 | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/internal/python_message.py | python | _AddPropertiesForNonRepeatedScalarField | (field, cls) | Adds a public property for a nonrepeated, scalar protocol message field.
Clients can use this property to get and directly set the value of the field.
Note that when the client sets the value of a field by using this property,
all necessary "has" bits are set as a side-effect, and we also perform
type-checking.... | Adds a public property for a nonrepeated, scalar protocol message field.
Clients can use this property to get and directly set the value of the field.
Note that when the client sets the value of a field by using this property,
all necessary "has" bits are set as a side-effect, and we also perform
type-checking. | [
"Adds",
"a",
"public",
"property",
"for",
"a",
"nonrepeated",
"scalar",
"protocol",
"message",
"field",
".",
"Clients",
"can",
"use",
"this",
"property",
"to",
"get",
"and",
"directly",
"set",
"the",
"value",
"of",
"the",
"field",
".",
"Note",
"that",
"whe... | def _AddPropertiesForNonRepeatedScalarField(field, cls):
"""Adds a public property for a nonrepeated, scalar protocol message field.
Clients can use this property to get and directly set the value of the field.
Note that when the client sets the value of a field by using this property,
all necessary "has" bits ... | [
"def",
"_AddPropertiesForNonRepeatedScalarField",
"(",
"field",
",",
"cls",
")",
":",
"proto_field_name",
"=",
"field",
".",
"name",
"property_name",
"=",
"_PropertyName",
"(",
"proto_field_name",
")",
"type_checker",
"=",
"type_checkers",
".",
"GetTypeChecker",
"(",
... | https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/internal/python_message.py#L630-L683 | ||
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/osx_cocoa/_windows.py | python | PrintDialogData.__init__ | (self, *args) | __init__(self) -> PrintDialogData
__init__(self, PrintData printData) -> PrintDialogData
__init__(self, PrintDialogData printData) -> PrintDialogData | __init__(self) -> PrintDialogData
__init__(self, PrintData printData) -> PrintDialogData
__init__(self, PrintDialogData printData) -> PrintDialogData | [
"__init__",
"(",
"self",
")",
"-",
">",
"PrintDialogData",
"__init__",
"(",
"self",
"PrintData",
"printData",
")",
"-",
">",
"PrintDialogData",
"__init__",
"(",
"self",
"PrintDialogData",
"printData",
")",
"-",
">",
"PrintDialogData"
] | def __init__(self, *args):
"""
__init__(self) -> PrintDialogData
__init__(self, PrintData printData) -> PrintDialogData
__init__(self, PrintDialogData printData) -> PrintDialogData
"""
_windows_.PrintDialogData_swiginit(self,_windows_.new_PrintDialogData(*args)) | [
"def",
"__init__",
"(",
"self",
",",
"*",
"args",
")",
":",
"_windows_",
".",
"PrintDialogData_swiginit",
"(",
"self",
",",
"_windows_",
".",
"new_PrintDialogData",
"(",
"*",
"args",
")",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_windows.py#L5033-L5039 | ||
openvinotoolkit/openvino | dedcbeafa8b84cccdc55ca64b8da516682b381c7 | src/bindings/python/src/compatibility/ngraph/opset1/ops.py | python | lstm_cell | (
X: NodeInput,
initial_hidden_state: NodeInput,
initial_cell_state: NodeInput,
W: NodeInput,
R: NodeInput,
B: NodeInput,
hidden_size: int,
activations: List[str] = None,
activations_alpha: List[float] = None,
activations_beta: List[float] = None,
clip: float = 0.0,
name:... | return _get_node_factory_opset1().create("LSTMCell", node_inputs, attributes) | Return a node which performs LSTMCell operation.
:param X: The input tensor with shape: [batch_size, input_size].
:param initial_hidden_state: The hidden state tensor with shape: [batch_size, hidden_size].
:param initial_cell_state: The cell state tensor with shape: [batch_size, hidden_size].
:param W:... | Return a node which performs LSTMCell operation. | [
"Return",
"a",
"node",
"which",
"performs",
"LSTMCell",
"operation",
"."
] | def lstm_cell(
X: NodeInput,
initial_hidden_state: NodeInput,
initial_cell_state: NodeInput,
W: NodeInput,
R: NodeInput,
B: NodeInput,
hidden_size: int,
activations: List[str] = None,
activations_alpha: List[float] = None,
activations_beta: List[float] = None,
clip: float = 0... | [
"def",
"lstm_cell",
"(",
"X",
":",
"NodeInput",
",",
"initial_hidden_state",
":",
"NodeInput",
",",
"initial_cell_state",
":",
"NodeInput",
",",
"W",
":",
"NodeInput",
",",
"R",
":",
"NodeInput",
",",
"B",
":",
"NodeInput",
",",
"hidden_size",
":",
"int",
... | https://github.com/openvinotoolkit/openvino/blob/dedcbeafa8b84cccdc55ca64b8da516682b381c7/src/bindings/python/src/compatibility/ngraph/opset1/ops.py#L1402-L1462 | |
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Tools/Python/3.7.10/windows/Lib/site-packages/urllib3/poolmanager.py | python | ProxyManager.urlopen | (self, method, url, redirect=True, **kw) | return super(ProxyManager, self).urlopen(method, url, redirect=redirect, **kw) | Same as HTTP(S)ConnectionPool.urlopen, ``url`` must be absolute. | Same as HTTP(S)ConnectionPool.urlopen, ``url`` must be absolute. | [
"Same",
"as",
"HTTP",
"(",
"S",
")",
"ConnectionPool",
".",
"urlopen",
"url",
"must",
"be",
"absolute",
"."
] | def urlopen(self, method, url, redirect=True, **kw):
"Same as HTTP(S)ConnectionPool.urlopen, ``url`` must be absolute."
u = parse_url(url)
if u.scheme == "http":
# For proxied HTTPS requests, httplib sets the necessary headers
# on the CONNECT to the proxy. For HTTP, we'... | [
"def",
"urlopen",
"(",
"self",
",",
"method",
",",
"url",
",",
"redirect",
"=",
"True",
",",
"*",
"*",
"kw",
")",
":",
"u",
"=",
"parse_url",
"(",
"url",
")",
"if",
"u",
".",
"scheme",
"==",
"\"http\"",
":",
"# For proxied HTTPS requests, httplib sets th... | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/urllib3/poolmanager.py#L455-L466 | |
hanpfei/chromium-net | 392cc1fa3a8f92f42e4071ab6e674d8e0482f83f | tools/idl_parser/idl_ppapi_parser.py | python | IDLPPAPIParser.p_PointerType | (self, p) | PointerType : STR_T
| MEM_T
| CSTR_T
| INTERFACE_T
| NULL | PointerType : STR_T
| MEM_T
| CSTR_T
| INTERFACE_T
| NULL | [
"PointerType",
":",
"STR_T",
"|",
"MEM_T",
"|",
"CSTR_T",
"|",
"INTERFACE_T",
"|",
"NULL"
] | def p_PointerType(self, p):
"""PointerType : STR_T
| MEM_T
| CSTR_T
| INTERFACE_T
| NULL"""
p[0] = p[1] | [
"def",
"p_PointerType",
"(",
"self",
",",
"p",
")",
":",
"p",
"[",
"0",
"]",
"=",
"p",
"[",
"1",
"]"
] | https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/tools/idl_parser/idl_ppapi_parser.py#L192-L198 | ||
google/syzygy | 8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5 | third_party/numpy/files/numpy/polynomial/laguerre.py | python | lag2poly | (cs) | Convert a Laguerre series to a polynomial.
Convert an array representing the coefficients of a Laguerre series,
ordered from lowest degree to highest, to an array of the coefficients
of the equivalent polynomial (relative to the "standard" basis) ordered
from lowest to highest degree.
Parameters
... | Convert a Laguerre series to a polynomial. | [
"Convert",
"a",
"Laguerre",
"series",
"to",
"a",
"polynomial",
"."
] | def lag2poly(cs) :
"""
Convert a Laguerre series to a polynomial.
Convert an array representing the coefficients of a Laguerre series,
ordered from lowest degree to highest, to an array of the coefficients
of the equivalent polynomial (relative to the "standard" basis) ordered
from lowest to hi... | [
"def",
"lag2poly",
"(",
"cs",
")",
":",
"from",
"polynomial",
"import",
"polyadd",
",",
"polysub",
",",
"polymulx",
"[",
"cs",
"]",
"=",
"pu",
".",
"as_series",
"(",
"[",
"cs",
"]",
")",
"n",
"=",
"len",
"(",
"cs",
")",
"if",
"n",
"==",
"1",
":... | https://github.com/google/syzygy/blob/8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5/third_party/numpy/files/numpy/polynomial/laguerre.py#L112-L164 | ||
Illumina/manta | 75b5c38d4fcd2f6961197b28a41eb61856f2d976 | src/python/lib/configureUtil.py | python | getConfigSections | (pickleConfigFile) | return pickle.load(open(pickleConfigFile)) | deserialize the config file and return a hash of hashes | deserialize the config file and return a hash of hashes | [
"deserialize",
"the",
"config",
"file",
"and",
"return",
"a",
"hash",
"of",
"hashes"
] | def getConfigSections(pickleConfigFile) :
"""
deserialize the config file and return a hash of hashes
"""
import pickle
if not os.path.isfile(pickleConfigFile) : return {}
return pickle.load(open(pickleConfigFile)) | [
"def",
"getConfigSections",
"(",
"pickleConfigFile",
")",
":",
"import",
"pickle",
"if",
"not",
"os",
".",
"path",
".",
"isfile",
"(",
"pickleConfigFile",
")",
":",
"return",
"{",
"}",
"return",
"pickle",
".",
"load",
"(",
"open",
"(",
"pickleConfigFile",
... | https://github.com/Illumina/manta/blob/75b5c38d4fcd2f6961197b28a41eb61856f2d976/src/python/lib/configureUtil.py#L71-L80 | |
neoml-lib/neoml | a0d370fba05269a1b2258cef126f77bbd2054a3e | NeoML/Python/neoml/Dnn/Lstm.py | python | Lstm.input_weights | (self, blob) | Sets the input hidden layer weights.
The blob size is (4*HiddenSize)x1x1xInputSize. | Sets the input hidden layer weights.
The blob size is (4*HiddenSize)x1x1xInputSize. | [
"Sets",
"the",
"input",
"hidden",
"layer",
"weights",
".",
"The",
"blob",
"size",
"is",
"(",
"4",
"*",
"HiddenSize",
")",
"x1x1xInputSize",
"."
] | def input_weights(self, blob):
"""Sets the input hidden layer weights.
The blob size is (4*HiddenSize)x1x1xInputSize.
"""
if not type(blob) is Blob.Blob:
raise ValueError('The `blob` must be neoml.Blob.')
self._internal.set_input_weights(blob._internal) | [
"def",
"input_weights",
"(",
"self",
",",
"blob",
")",
":",
"if",
"not",
"type",
"(",
"blob",
")",
"is",
"Blob",
".",
"Blob",
":",
"raise",
"ValueError",
"(",
"'The `blob` must be neoml.Blob.'",
")",
"self",
".",
"_internal",
".",
"set_input_weights",
"(",
... | https://github.com/neoml-lib/neoml/blob/a0d370fba05269a1b2258cef126f77bbd2054a3e/NeoML/Python/neoml/Dnn/Lstm.py#L162-L169 | ||
oracle/graaljs | 36a56e8e993d45fc40939a3a4d9c0c24990720f1 | graal-nodejs/tools/inspector_protocol/jinja2/compiler.py | python | CodeGenerator.visit_Include | (self, node, frame) | Handles includes. | Handles includes. | [
"Handles",
"includes",
"."
] | def visit_Include(self, node, frame):
"""Handles includes."""
if node.ignore_missing:
self.writeline('try:')
self.indent()
func_name = 'get_or_select_template'
if isinstance(node.template, nodes.Const):
if isinstance(node.template.value, string_types)... | [
"def",
"visit_Include",
"(",
"self",
",",
"node",
",",
"frame",
")",
":",
"if",
"node",
".",
"ignore_missing",
":",
"self",
".",
"writeline",
"(",
"'try:'",
")",
"self",
".",
"indent",
"(",
")",
"func_name",
"=",
"'get_or_select_template'",
"if",
"isinstan... | https://github.com/oracle/graaljs/blob/36a56e8e993d45fc40939a3a4d9c0c24990720f1/graal-nodejs/tools/inspector_protocol/jinja2/compiler.py#L890-L942 | ||
Mahlet-Inc/hobbits | 071d7a542f1af0a7791bcaab17b08224df9ecd4e | src/hobbits-plugins/analyzers/KaitaiStruct/ksy_py/serialization/msgpack.py | python | Msgpack.is_array_32 | (self) | return self._m_is_array_32 if hasattr(self, '_m_is_array_32') else None | .. seealso::
Source - https://github.com/msgpack/msgpack/blob/master/spec.md#formats-array | .. seealso::
Source - https://github.com/msgpack/msgpack/blob/master/spec.md#formats-array | [
"..",
"seealso",
"::",
"Source",
"-",
"https",
":",
"//",
"github",
".",
"com",
"/",
"msgpack",
"/",
"msgpack",
"/",
"blob",
"/",
"master",
"/",
"spec",
".",
"md#formats",
"-",
"array"
] | def is_array_32(self):
"""
.. seealso::
Source - https://github.com/msgpack/msgpack/blob/master/spec.md#formats-array
"""
if hasattr(self, '_m_is_array_32'):
return self._m_is_array_32 if hasattr(self, '_m_is_array_32') else None
self._m_is_array_32 = self... | [
"def",
"is_array_32",
"(",
"self",
")",
":",
"if",
"hasattr",
"(",
"self",
",",
"'_m_is_array_32'",
")",
":",
"return",
"self",
".",
"_m_is_array_32",
"if",
"hasattr",
"(",
"self",
",",
"'_m_is_array_32'",
")",
"else",
"None",
"self",
".",
"_m_is_array_32",
... | https://github.com/Mahlet-Inc/hobbits/blob/071d7a542f1af0a7791bcaab17b08224df9ecd4e/src/hobbits-plugins/analyzers/KaitaiStruct/ksy_py/serialization/msgpack.py#L148-L157 | |
miyosuda/TensorFlowAndroidDemo | 35903e0221aa5f109ea2dbef27f20b52e317f42d | jni-build/jni/include/tensorflow/contrib/learn/python/learn/datasets/mnist.py | python | DataSet.next_batch | (self, batch_size, fake_data=False) | return self._images[start:end], self._labels[start:end] | Return the next `batch_size` examples from this data set. | Return the next `batch_size` examples from this data set. | [
"Return",
"the",
"next",
"batch_size",
"examples",
"from",
"this",
"data",
"set",
"."
] | def next_batch(self, batch_size, fake_data=False):
"""Return the next `batch_size` examples from this data set."""
if fake_data:
fake_image = [1] * 784
if self.one_hot:
fake_label = [1] + [0] * 9
else:
fake_label = 0
return [fake_image for _ in xrange(batch_size)], [
... | [
"def",
"next_batch",
"(",
"self",
",",
"batch_size",
",",
"fake_data",
"=",
"False",
")",
":",
"if",
"fake_data",
":",
"fake_image",
"=",
"[",
"1",
"]",
"*",
"784",
"if",
"self",
".",
"one_hot",
":",
"fake_label",
"=",
"[",
"1",
"]",
"+",
"[",
"0",... | https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/contrib/learn/python/learn/datasets/mnist.py#L138-L164 | |
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/pycc/decorators.py | python | parse_prototype | (text) | return symbol, functype | Separate the symbol and function-type in a a string with
"symbol function-type" (e.g. "mult float(float, float)")
Returns
---------
(symbol_string, functype_string) | Separate the symbol and function-type in a a string with
"symbol function-type" (e.g. "mult float(float, float)") | [
"Separate",
"the",
"symbol",
"and",
"function",
"-",
"type",
"in",
"a",
"a",
"string",
"with",
"symbol",
"function",
"-",
"type",
"(",
"e",
".",
"g",
".",
"mult",
"float",
"(",
"float",
"float",
")",
")"
] | def parse_prototype(text):
"""Separate the symbol and function-type in a a string with
"symbol function-type" (e.g. "mult float(float, float)")
Returns
---------
(symbol_string, functype_string)
"""
m = re_symbol.match(text)
if not m:
raise ValueError("Invalid function name for ... | [
"def",
"parse_prototype",
"(",
"text",
")",
":",
"m",
"=",
"re_symbol",
".",
"match",
"(",
"text",
")",
"if",
"not",
"m",
":",
"raise",
"ValueError",
"(",
"\"Invalid function name for export prototype\"",
")",
"s",
"=",
"m",
".",
"start",
"(",
"0",
")",
... | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/pycc/decorators.py#L59-L74 | |
catboost/catboost | 167f64f237114a4d10b2b4ee42adb4569137debe | contrib/python/pandas/py3/pandas/core/indexers.py | python | check_key_length | (columns: Index, key, value: DataFrame) | Checks if a key used as indexer has the same length as the columns it is
associated with.
Parameters
----------
columns : Index The columns of the DataFrame to index.
key : A list-like of keys to index with.
value : DataFrame The value to set for the keys.
Raises
------
ValueError:... | Checks if a key used as indexer has the same length as the columns it is
associated with. | [
"Checks",
"if",
"a",
"key",
"used",
"as",
"indexer",
"has",
"the",
"same",
"length",
"as",
"the",
"columns",
"it",
"is",
"associated",
"with",
"."
] | def check_key_length(columns: Index, key, value: DataFrame):
"""
Checks if a key used as indexer has the same length as the columns it is
associated with.
Parameters
----------
columns : Index The columns of the DataFrame to index.
key : A list-like of keys to index with.
value : DataFr... | [
"def",
"check_key_length",
"(",
"columns",
":",
"Index",
",",
"key",
",",
"value",
":",
"DataFrame",
")",
":",
"if",
"columns",
".",
"is_unique",
":",
"if",
"len",
"(",
"value",
".",
"columns",
")",
"!=",
"len",
"(",
"key",
")",
":",
"raise",
"ValueE... | https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/core/indexers.py#L409-L432 | ||
msracver/Deep-Image-Analogy | 632b9287b42552e32dad64922967c8c9ec7fc4d3 | python/caffe/pycaffe.py | python | _Net_batch | (self, blobs) | Batch blob lists according to net's batch size.
Parameters
----------
blobs: Keys blob names and values are lists of blobs (of any length).
Naturally, all the lists should have the same length.
Yields
------
batch: {blob name: list of blobs} dict for a single batch. | Batch blob lists according to net's batch size. | [
"Batch",
"blob",
"lists",
"according",
"to",
"net",
"s",
"batch",
"size",
"."
] | def _Net_batch(self, blobs):
"""
Batch blob lists according to net's batch size.
Parameters
----------
blobs: Keys blob names and values are lists of blobs (of any length).
Naturally, all the lists should have the same length.
Yields
------
batch: {blob name: list of blobs} ... | [
"def",
"_Net_batch",
"(",
"self",
",",
"blobs",
")",
":",
"num",
"=",
"len",
"(",
"six",
".",
"next",
"(",
"six",
".",
"itervalues",
"(",
"blobs",
")",
")",
")",
"batch_size",
"=",
"six",
".",
"next",
"(",
"six",
".",
"itervalues",
"(",
"self",
"... | https://github.com/msracver/Deep-Image-Analogy/blob/632b9287b42552e32dad64922967c8c9ec7fc4d3/python/caffe/pycaffe.py#L262-L293 | ||
facebookincubator/BOLT | 88c70afe9d388ad430cc150cc158641701397f70 | clang/docs/tools/generate_formatted_state.py | python | get_git_revision_short_hash | () | return subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']
).decode(sys.stdout.encoding).strip() | Get the get SHA in short hash form. | Get the get SHA in short hash form. | [
"Get",
"the",
"get",
"SHA",
"in",
"short",
"hash",
"form",
"."
] | def get_git_revision_short_hash():
""" Get the get SHA in short hash form. """
return subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']
).decode(sys.stdout.encoding).strip() | [
"def",
"get_git_revision_short_hash",
"(",
")",
":",
"return",
"subprocess",
".",
"check_output",
"(",
"[",
"'git'",
",",
"'rev-parse'",
",",
"'--short'",
",",
"'HEAD'",
"]",
")",
".",
"decode",
"(",
"sys",
".",
"stdout",
".",
"encoding",
")",
".",
"strip"... | https://github.com/facebookincubator/BOLT/blob/88c70afe9d388ad430cc150cc158641701397f70/clang/docs/tools/generate_formatted_state.py#L11-L14 | |
vusec/vuzzer64 | 2b1b0ed757a3dca114db0192fa4ab1add92348bc | fuzzer-code/runfuzzer.py | python | read_taint | (fpath) | return (alltaintoff,taintOff) | This function read cmp.out file and parses it to extract offsets and coresponding values and returns a tuple(alltaint, dict).
dictionary: with key as offset and values as a set of hex values checked for that offset in the cmp instruction. Currently, we want to extract values s.t. one of the operands of CMP instruct... | This function read cmp.out file and parses it to extract offsets and coresponding values and returns a tuple(alltaint, dict).
dictionary: with key as offset and values as a set of hex values checked for that offset in the cmp instruction. Currently, we want to extract values s.t. one of the operands of CMP instruct... | [
"This",
"function",
"read",
"cmp",
".",
"out",
"file",
"and",
"parses",
"it",
"to",
"extract",
"offsets",
"and",
"coresponding",
"values",
"and",
"returns",
"a",
"tuple",
"(",
"alltaint",
"dict",
")",
".",
"dictionary",
":",
"with",
"key",
"as",
"offset",
... | def read_taint(fpath):
''' This function read cmp.out file and parses it to extract offsets and coresponding values and returns a tuple(alltaint, dict).
dictionary: with key as offset and values as a set of hex values checked for that offset in the cmp instruction. Currently, we want to extract values s.t. one ... | [
"def",
"read_taint",
"(",
"fpath",
")",
":",
"taintOff",
"=",
"dict",
"(",
")",
"#dictionary to keep info about single tainted offsets and values.",
"alltaintoff",
"=",
"set",
"(",
")",
"#it keeps all the offsets (expluding the above case) that were used at a CMP instruction.",
"... | https://github.com/vusec/vuzzer64/blob/2b1b0ed757a3dca114db0192fa4ab1add92348bc/fuzzer-code/runfuzzer.py#L286-L445 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/osx_cocoa/_gdi.py | python | PyLocale.__init__ | (self, *args, **kwargs) | __init__(self, int language=-1, int flags=LOCALE_LOAD_DEFAULT) -> PyLocale | __init__(self, int language=-1, int flags=LOCALE_LOAD_DEFAULT) -> PyLocale | [
"__init__",
"(",
"self",
"int",
"language",
"=",
"-",
"1",
"int",
"flags",
"=",
"LOCALE_LOAD_DEFAULT",
")",
"-",
">",
"PyLocale"
] | def __init__(self, *args, **kwargs):
"""__init__(self, int language=-1, int flags=LOCALE_LOAD_DEFAULT) -> PyLocale"""
_gdi_.PyLocale_swiginit(self,_gdi_.new_PyLocale(*args, **kwargs))
PyLocale._setCallbackInfo(self, self, PyLocale) | [
"def",
"__init__",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"_gdi_",
".",
"PyLocale_swiginit",
"(",
"self",
",",
"_gdi_",
".",
"new_PyLocale",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
")",
"PyLocale",
".",
"_setCallbac... | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_gdi.py#L3144-L3147 | ||
google/syzygy | 8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5 | third_party/numpy/files/numpy/ma/core.py | python | MaskedArray.tolist | (self, fill_value=None) | return result.tolist() | Return the data portion of the masked array as a hierarchical Python list.
Data items are converted to the nearest compatible Python type.
Masked values are converted to `fill_value`. If `fill_value` is None,
the corresponding entries in the output list will be ``None``.
Parameters
... | Return the data portion of the masked array as a hierarchical Python list. | [
"Return",
"the",
"data",
"portion",
"of",
"the",
"masked",
"array",
"as",
"a",
"hierarchical",
"Python",
"list",
"."
] | def tolist(self, fill_value=None):
"""
Return the data portion of the masked array as a hierarchical Python list.
Data items are converted to the nearest compatible Python type.
Masked values are converted to `fill_value`. If `fill_value` is None,
the corresponding entries in th... | [
"def",
"tolist",
"(",
"self",
",",
"fill_value",
"=",
"None",
")",
":",
"_mask",
"=",
"self",
".",
"_mask",
"# No mask ? Just return .data.tolist ?",
"if",
"_mask",
"is",
"nomask",
":",
"return",
"self",
".",
"_data",
".",
"tolist",
"(",
")",
"# Explicit fil... | https://github.com/google/syzygy/blob/8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5/third_party/numpy/files/numpy/ma/core.py#L5248-L5297 | |
NeoGeographyToolkit/StereoPipeline | eedf54a919fb5cce1ab0e280bb0df4050763aa11 | graveyard/ngt_utils/lonlat.py | python | dispatch_cmd | (context, argv) | A helper for building command-line tools. | A helper for building command-line tools. | [
"A",
"helper",
"for",
"building",
"command",
"-",
"line",
"tools",
"."
] | def dispatch_cmd(context, argv):
'''A helper for building command-line tools.'''
commands = {}
for name, value in context.iteritems():
if name.startswith('cmd_') and callable(value):
commands[name[4:]] = value
if len(argv) < 2 or argv[1] not in commands:
if context['__doc__']... | [
"def",
"dispatch_cmd",
"(",
"context",
",",
"argv",
")",
":",
"commands",
"=",
"{",
"}",
"for",
"name",
",",
"value",
"in",
"context",
".",
"iteritems",
"(",
")",
":",
"if",
"name",
".",
"startswith",
"(",
"'cmd_'",
")",
"and",
"callable",
"(",
"valu... | https://github.com/NeoGeographyToolkit/StereoPipeline/blob/eedf54a919fb5cce1ab0e280bb0df4050763aa11/graveyard/ngt_utils/lonlat.py#L106-L120 | ||
wlanjie/AndroidFFmpeg | 7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf | tools/fdk-aac-build/x86/toolchain/lib/python2.7/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py | python | Terminal_Suite_Events.do_script | (self, _object, _attributes={}, **_arguments) | do script: Run a UNIX shell script or command
Required argument: the object for the command
Keyword argument in_: the window in which to execute the command
Keyword argument with_command: data to be passed to the Terminal application as the command line, deprecated, use direct parameter
... | do script: Run a UNIX shell script or command
Required argument: the object for the command
Keyword argument in_: the window in which to execute the command
Keyword argument with_command: data to be passed to the Terminal application as the command line, deprecated, use direct parameter
... | [
"do",
"script",
":",
"Run",
"a",
"UNIX",
"shell",
"script",
"or",
"command",
"Required",
"argument",
":",
"the",
"object",
"for",
"the",
"command",
"Keyword",
"argument",
"in_",
":",
"the",
"window",
"in",
"which",
"to",
"execute",
"the",
"command",
"Keywo... | def do_script(self, _object, _attributes={}, **_arguments):
"""do script: Run a UNIX shell script or command
Required argument: the object for the command
Keyword argument in_: the window in which to execute the command
Keyword argument with_command: data to be passed to the Terminal app... | [
"def",
"do_script",
"(",
"self",
",",
"_object",
",",
"_attributes",
"=",
"{",
"}",
",",
"*",
"*",
"_arguments",
")",
":",
"_code",
"=",
"'core'",
"_subcode",
"=",
"'dosc'",
"aetools",
".",
"keysubst",
"(",
"_arguments",
",",
"self",
".",
"_argmap_do_scr... | https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py#L40-L61 | ||
psnonis/FinBERT | c0c555d833a14e2316a3701e59c0b5156f804b4e | data/prep/tokenization.py | python | WordpieceTokenizer.tokenize | (self, text) | return output_tokens | Tokenizes a piece of text into its word pieces.
This uses a greedy longest-match-first algorithm to perform tokenization
using the given vocabulary.
For example:
input = "unaffable"
output = ["un", "##aff", "##able"]
Args:
text: A single token or whitespace separated tokens. This sh... | Tokenizes a piece of text into its word pieces. | [
"Tokenizes",
"a",
"piece",
"of",
"text",
"into",
"its",
"word",
"pieces",
"."
] | def tokenize(self, text):
"""Tokenizes a piece of text into its word pieces.
This uses a greedy longest-match-first algorithm to perform tokenization
using the given vocabulary.
For example:
input = "unaffable"
output = ["un", "##aff", "##able"]
Args:
text: A single token or whi... | [
"def",
"tokenize",
"(",
"self",
",",
"text",
")",
":",
"text",
"=",
"convert_to_unicode",
"(",
"text",
")",
"output_tokens",
"=",
"[",
"]",
"for",
"token",
"in",
"whitespace_tokenize",
"(",
"text",
")",
":",
"chars",
"=",
"list",
"(",
"token",
")",
"if... | https://github.com/psnonis/FinBERT/blob/c0c555d833a14e2316a3701e59c0b5156f804b4e/data/prep/tokenization.py#L308-L359 | |
tensorflow/minigo | 6d89c202cdceaf449aefc3149ab2110d44f1a6a4 | minigo_model.py | python | write_model_bytes | (model_bytes, metadata, dst_path) | Writes a serialized model & metadata in Minigo format.
Args:
model_bytes: the serialized model.
metadata: a dictionary of metadata to write to file.
dst_path: destination path to write to. | Writes a serialized model & metadata in Minigo format. | [
"Writes",
"a",
"serialized",
"model",
"&",
"metadata",
"in",
"Minigo",
"format",
"."
] | def write_model_bytes(model_bytes, metadata, dst_path):
"""Writes a serialized model & metadata in Minigo format.
Args:
model_bytes: the serialized model.
metadata: a dictionary of metadata to write to file.
dst_path: destination path to write to.
"""
for key, value in metadata.items... | [
"def",
"write_model_bytes",
"(",
"model_bytes",
",",
"metadata",
",",
"dst_path",
")",
":",
"for",
"key",
",",
"value",
"in",
"metadata",
".",
"items",
"(",
")",
":",
"assert",
"isinstance",
"(",
"key",
",",
"str",
")",
",",
"'%s is not a string'",
"%",
... | https://github.com/tensorflow/minigo/blob/6d89c202cdceaf449aefc3149ab2110d44f1a6a4/minigo_model.py#L47-L91 | ||
hanpfei/chromium-net | 392cc1fa3a8f92f42e4071ab6e674d8e0482f83f | third_party/catapult/third_party/apiclient/googleapiclient/http.py | python | MediaUpload.mimetype | (self) | return 'application/octet-stream' | Mime type of the body.
Returns:
Mime type. | Mime type of the body. | [
"Mime",
"type",
"of",
"the",
"body",
"."
] | def mimetype(self):
"""Mime type of the body.
Returns:
Mime type.
"""
return 'application/octet-stream' | [
"def",
"mimetype",
"(",
"self",
")",
":",
"return",
"'application/octet-stream'"
] | https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/apiclient/googleapiclient/http.py#L152-L158 | |
eclipse/sumo | 7132a9b8b6eea734bdec38479026b4d8c4336d03 | tools/traci/_vehicle.py | python | VehicleDomain.getWidth | (self, vehID) | return self._getUniversal(tc.VAR_WIDTH, vehID) | getWidth(string) -> double
Returns the width in m of this vehicle. | getWidth(string) -> double | [
"getWidth",
"(",
"string",
")",
"-",
">",
"double"
] | def getWidth(self, vehID):
"""getWidth(string) -> double
Returns the width in m of this vehicle.
"""
return self._getUniversal(tc.VAR_WIDTH, vehID) | [
"def",
"getWidth",
"(",
"self",
",",
"vehID",
")",
":",
"return",
"self",
".",
"_getUniversal",
"(",
"tc",
".",
"VAR_WIDTH",
",",
"vehID",
")"
] | https://github.com/eclipse/sumo/blob/7132a9b8b6eea734bdec38479026b4d8c4336d03/tools/traci/_vehicle.py#L590-L595 | |
apiaryio/snowcrash | b5b39faa85f88ee17459edf39fdc6fe4fc70d2e3 | tools/gyp/pylib/gyp/generator/ninja.py | python | Target.FinalOutput | (self) | return self.bundle or self.binary or self.actions_stamp | Return the last output of the target, which depends on all prior
steps. | Return the last output of the target, which depends on all prior
steps. | [
"Return",
"the",
"last",
"output",
"of",
"the",
"target",
"which",
"depends",
"on",
"all",
"prior",
"steps",
"."
] | def FinalOutput(self):
"""Return the last output of the target, which depends on all prior
steps."""
return self.bundle or self.binary or self.actions_stamp | [
"def",
"FinalOutput",
"(",
"self",
")",
":",
"return",
"self",
".",
"bundle",
"or",
"self",
".",
"binary",
"or",
"self",
".",
"actions_stamp"
] | https://github.com/apiaryio/snowcrash/blob/b5b39faa85f88ee17459edf39fdc6fe4fc70d2e3/tools/gyp/pylib/gyp/generator/ninja.py#L178-L181 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/osx_carbon/propgrid.py | python | PGEditor.CreateControls | (*args, **kwargs) | return _propgrid.PGEditor_CreateControls(*args, **kwargs) | CreateControls(self, PropertyGrid propgrid, PGProperty property, Point pos,
Size size) -> PGWindowList | CreateControls(self, PropertyGrid propgrid, PGProperty property, Point pos,
Size size) -> PGWindowList | [
"CreateControls",
"(",
"self",
"PropertyGrid",
"propgrid",
"PGProperty",
"property",
"Point",
"pos",
"Size",
"size",
")",
"-",
">",
"PGWindowList"
] | def CreateControls(*args, **kwargs):
"""
CreateControls(self, PropertyGrid propgrid, PGProperty property, Point pos,
Size size) -> PGWindowList
"""
return _propgrid.PGEditor_CreateControls(*args, **kwargs) | [
"def",
"CreateControls",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_propgrid",
".",
"PGEditor_CreateControls",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/propgrid.py#L2661-L2666 | |
facebookresearch/ELF | 1f790173095cd910976d9f651b80beb872ec5d12 | rlpytorch/model_base.py | python | Model.set_volatile | (self, volatile) | Set model to ``volatile``.
Args:
volatile(bool): indicating that the Variable should be used in inference mode, i.e. don't save the history. | Set model to ``volatile``. | [
"Set",
"model",
"to",
"volatile",
"."
] | def set_volatile(self, volatile):
''' Set model to ``volatile``.
Args:
volatile(bool): indicating that the Variable should be used in inference mode, i.e. don't save the history.'''
self.volatile = volatile | [
"def",
"set_volatile",
"(",
"self",
",",
"volatile",
")",
":",
"self",
".",
"volatile",
"=",
"volatile"
] | https://github.com/facebookresearch/ELF/blob/1f790173095cd910976d9f651b80beb872ec5d12/rlpytorch/model_base.py#L44-L49 | ||
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/msw/propgrid.py | python | PropertyGridConstIterator.OneStep | (*args, **kwargs) | return _propgrid.PropertyGridConstIterator_OneStep(*args, **kwargs) | OneStep( state, int flags=PG_ITERATE_DEFAULT, PGProperty property=None,
int dir=1) -> PGProperty | OneStep( state, int flags=PG_ITERATE_DEFAULT, PGProperty property=None,
int dir=1) -> PGProperty | [
"OneStep",
"(",
"state",
"int",
"flags",
"=",
"PG_ITERATE_DEFAULT",
"PGProperty",
"property",
"=",
"None",
"int",
"dir",
"=",
"1",
")",
"-",
">",
"PGProperty"
] | def OneStep(*args, **kwargs):
"""
OneStep( state, int flags=PG_ITERATE_DEFAULT, PGProperty property=None,
int dir=1) -> PGProperty
"""
return _propgrid.PropertyGridConstIterator_OneStep(*args, **kwargs) | [
"def",
"OneStep",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_propgrid",
".",
"PropertyGridConstIterator_OneStep",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/propgrid.py#L1010-L1015 | |
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/targets/imputils.py | python | Registry.lower_setattr | (self, ty, attr) | return decorate | Decorate an implementation of __setattr__ for type *ty* and
the attribute *attr*.
The decorated implementation will have the signature
(context, builder, sig, args). | Decorate an implementation of __setattr__ for type *ty* and
the attribute *attr*. | [
"Decorate",
"an",
"implementation",
"of",
"__setattr__",
"for",
"type",
"*",
"ty",
"*",
"and",
"the",
"attribute",
"*",
"attr",
"*",
"."
] | def lower_setattr(self, ty, attr):
"""
Decorate an implementation of __setattr__ for type *ty* and
the attribute *attr*.
The decorated implementation will have the signature
(context, builder, sig, args).
"""
def decorate(impl):
return self._decorate_... | [
"def",
"lower_setattr",
"(",
"self",
",",
"ty",
",",
"attr",
")",
":",
"def",
"decorate",
"(",
"impl",
")",
":",
"return",
"self",
".",
"_decorate_attr",
"(",
"impl",
",",
"ty",
",",
"attr",
",",
"self",
".",
"setattrs",
",",
"_decorate_setattr",
")",
... | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/targets/imputils.py#L71-L82 | |
metashell/metashell | f4177e4854ea00c8dbc722cadab26ef413d798ea | 3rd/templight/compiler-rt/lib/sanitizer_common/scripts/cpplint.py | python | ExpectingFunctionArgs | (clean_lines, linenum) | return (Match(r'^\s*MOCK_(CONST_)?METHOD\d+(_T)?\(', line) or
(linenum >= 2 and
(Match(r'^\s*MOCK_(?:CONST_)?METHOD\d+(?:_T)?\((?:\S+,)?\s*$',
clean_lines.elided[linenum - 1]) or
Match(r'^\s*MOCK_(?:CONST_)?METHOD\d+(?:_T)?\(\s*$',
clean_lines.elided[... | Checks whether where function type arguments are expected.
Args:
clean_lines: A CleansedLines instance containing the file.
linenum: The number of the line to check.
Returns:
True if the line at 'linenum' is inside something that expects arguments
of function types. | Checks whether where function type arguments are expected. | [
"Checks",
"whether",
"where",
"function",
"type",
"arguments",
"are",
"expected",
"."
] | def ExpectingFunctionArgs(clean_lines, linenum):
"""Checks whether where function type arguments are expected.
Args:
clean_lines: A CleansedLines instance containing the file.
linenum: The number of the line to check.
Returns:
True if the line at 'linenum' is inside something that expects arguments
... | [
"def",
"ExpectingFunctionArgs",
"(",
"clean_lines",
",",
"linenum",
")",
":",
"line",
"=",
"clean_lines",
".",
"elided",
"[",
"linenum",
"]",
"return",
"(",
"Match",
"(",
"r'^\\s*MOCK_(CONST_)?METHOD\\d+(_T)?\\('",
",",
"line",
")",
"or",
"(",
"linenum",
">=",
... | https://github.com/metashell/metashell/blob/f4177e4854ea00c8dbc722cadab26ef413d798ea/3rd/templight/compiler-rt/lib/sanitizer_common/scripts/cpplint.py#L5324-L5343 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/gtk/_gdi.py | python | RendererNative.DrawPushButton | (*args, **kwargs) | return _gdi_.RendererNative_DrawPushButton(*args, **kwargs) | DrawPushButton(self, Window win, DC dc, Rect rect, int flags=0)
Draw a blank button. Flags may be wx.CONTROL_PRESSED, wx.CONTROL_CURRENT and
wx.CONTROL_ISDEFAULT | DrawPushButton(self, Window win, DC dc, Rect rect, int flags=0) | [
"DrawPushButton",
"(",
"self",
"Window",
"win",
"DC",
"dc",
"Rect",
"rect",
"int",
"flags",
"=",
"0",
")"
] | def DrawPushButton(*args, **kwargs):
"""
DrawPushButton(self, Window win, DC dc, Rect rect, int flags=0)
Draw a blank button. Flags may be wx.CONTROL_PRESSED, wx.CONTROL_CURRENT and
wx.CONTROL_ISDEFAULT
"""
return _gdi_.RendererNative_DrawPushButton(*args, **kwargs) | [
"def",
"DrawPushButton",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_gdi_",
".",
"RendererNative_DrawPushButton",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_gdi.py#L7345-L7352 | |
catboost/catboost | 167f64f237114a4d10b2b4ee42adb4569137debe | contrib/python/pandas/py3/pandas/core/frame.py | python | DataFrame.__repr__ | (self) | return buf.getvalue() | Return a string representation for a particular DataFrame. | Return a string representation for a particular DataFrame. | [
"Return",
"a",
"string",
"representation",
"for",
"a",
"particular",
"DataFrame",
"."
] | def __repr__(self) -> str:
"""
Return a string representation for a particular DataFrame.
"""
buf = StringIO("")
if self._info_repr():
self.info(buf=buf)
return buf.getvalue()
max_rows = get_option("display.max_rows")
min_rows = get_option... | [
"def",
"__repr__",
"(",
"self",
")",
"->",
"str",
":",
"buf",
"=",
"StringIO",
"(",
"\"\"",
")",
"if",
"self",
".",
"_info_repr",
"(",
")",
":",
"self",
".",
"info",
"(",
"buf",
"=",
"buf",
")",
"return",
"buf",
".",
"getvalue",
"(",
")",
"max_ro... | https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/core/frame.py#L977-L1005 | |
hughperkins/tf-coriander | 970d3df6c11400ad68405f22b0c42a52374e94ca | tensorflow/contrib/learn/python/learn/dataframe/dataframe.py | python | DataFrame.__getitem__ | (self, key) | Indexing functionality for DataFrames.
Args:
key: a string or an iterable of strings.
Returns:
A Series or list of Series corresponding to the given keys. | Indexing functionality for DataFrames. | [
"Indexing",
"functionality",
"for",
"DataFrames",
"."
] | def __getitem__(self, key):
"""Indexing functionality for DataFrames.
Args:
key: a string or an iterable of strings.
Returns:
A Series or list of Series corresponding to the given keys.
"""
if isinstance(key, str):
return self._columns[key]
elif isinstance(key, collections.It... | [
"def",
"__getitem__",
"(",
"self",
",",
"key",
")",
":",
"if",
"isinstance",
"(",
"key",
",",
"str",
")",
":",
"return",
"self",
".",
"_columns",
"[",
"key",
"]",
"elif",
"isinstance",
"(",
"key",
",",
"collections",
".",
"Iterable",
")",
":",
"for",... | https://github.com/hughperkins/tf-coriander/blob/970d3df6c11400ad68405f22b0c42a52374e94ca/tensorflow/contrib/learn/python/learn/dataframe/dataframe.py#L102-L121 | ||
miyosuda/TensorFlowAndroidMNIST | 7b5a4603d2780a8a2834575706e9001977524007 | jni-build/jni/include/tensorflow/python/ops/array_ops.py | python | _PlaceholderWithDefaultShape | (op) | return [output_shape] | Shape function for the PlaceholderWithDefault op.
This op acts as an identity when it is not fed (passing through a
default value), but allows the user to feed it with tensors of a
possibly less precise shape than its default value.
Args:
op: A PlaceholderWithDefault `Operation`.
Returns:
A single-... | Shape function for the PlaceholderWithDefault op. | [
"Shape",
"function",
"for",
"the",
"PlaceholderWithDefault",
"op",
"."
] | def _PlaceholderWithDefaultShape(op):
"""Shape function for the PlaceholderWithDefault op.
This op acts as an identity when it is not fed (passing through a
default value), but allows the user to feed it with tensors of a
possibly less precise shape than its default value.
Args:
op: A PlaceholderWithDef... | [
"def",
"_PlaceholderWithDefaultShape",
"(",
"op",
")",
":",
"input_shape",
"=",
"op",
".",
"inputs",
"[",
"0",
"]",
".",
"get_shape",
"(",
")",
"output_shape",
"=",
"tensor_shape",
".",
"TensorShape",
"(",
"op",
".",
"get_attr",
"(",
"\"shape\"",
")",
")",... | https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/python/ops/array_ops.py#L2752-L2770 | |
swift/swift | 12d031cf8177fdec0137f9aa7e2912fa23c4416b | 3rdParty/SCons/scons-3.0.1/engine/SCons/SConf.py | python | CheckContext.__init__ | (self, sconf) | Constructor. Pass the corresponding SConf instance. | Constructor. Pass the corresponding SConf instance. | [
"Constructor",
".",
"Pass",
"the",
"corresponding",
"SConf",
"instance",
"."
] | def __init__(self, sconf):
"""Constructor. Pass the corresponding SConf instance."""
self.sconf = sconf
self.did_show_result = 0
# for Conftest.py:
self.vardict = {}
self.havedict = {}
self.headerfilename = None
self.config_h = "" | [
"def",
"__init__",
"(",
"self",
",",
"sconf",
")",
":",
"self",
".",
"sconf",
"=",
"sconf",
"self",
".",
"did_show_result",
"=",
"0",
"# for Conftest.py:",
"self",
".",
"vardict",
"=",
"{",
"}",
"self",
".",
"havedict",
"=",
"{",
"}",
"self",
".",
"h... | https://github.com/swift/swift/blob/12d031cf8177fdec0137f9aa7e2912fa23c4416b/3rdParty/SCons/scons-3.0.1/engine/SCons/SConf.py#L770-L779 | ||
lballabio/quantlib-old | 136336947ed4fea9ecc1da6edad188700e821739 | gensrc/gensrc/addins/addin.py | python | Addin.idStrip | (self, parameterList) | return "" | Return the RuleGroup object named idStrip which was loaded
from the XML rule metadata for this addin.
On platforms where this function is required, it must be overloaded in
derived classes. | Return the RuleGroup object named idStrip which was loaded
from the XML rule metadata for this addin. | [
"Return",
"the",
"RuleGroup",
"object",
"named",
"idStrip",
"which",
"was",
"loaded",
"from",
"the",
"XML",
"rule",
"metadata",
"for",
"this",
"addin",
"."
] | def idStrip(self, parameterList):
"""Return the RuleGroup object named idStrip which was loaded
from the XML rule metadata for this addin.
On platforms where this function is required, it must be overloaded in
derived classes."""
return "" | [
"def",
"idStrip",
"(",
"self",
",",
"parameterList",
")",
":",
"return",
"\"\""
] | https://github.com/lballabio/quantlib-old/blob/136336947ed4fea9ecc1da6edad188700e821739/gensrc/gensrc/addins/addin.py#L112-L118 | |
gwaldron/osgearth | 4c521857d59a69743e4a9cedba00afe570f984e8 | src/third_party/tinygltf/deps/cpplint.py | python | NestingState.InTemplateArgumentList | (self, clean_lines, linenum, pos) | return False | Check if current position is inside template argument list.
Args:
clean_lines: A CleansedLines instance containing the file.
linenum: The number of the line to check.
pos: position just after the suspected template argument.
Returns:
True if (linenum, pos) is inside template arguments. | Check if current position is inside template argument list. | [
"Check",
"if",
"current",
"position",
"is",
"inside",
"template",
"argument",
"list",
"."
] | def InTemplateArgumentList(self, clean_lines, linenum, pos):
"""Check if current position is inside template argument list.
Args:
clean_lines: A CleansedLines instance containing the file.
linenum: The number of the line to check.
pos: position just after the suspected template argument.
... | [
"def",
"InTemplateArgumentList",
"(",
"self",
",",
"clean_lines",
",",
"linenum",
",",
"pos",
")",
":",
"while",
"linenum",
"<",
"clean_lines",
".",
"NumLines",
"(",
")",
":",
"# Find the earliest character that might indicate a template argument",
"line",
"=",
"clean... | https://github.com/gwaldron/osgearth/blob/4c521857d59a69743e4a9cedba00afe570f984e8/src/third_party/tinygltf/deps/cpplint.py#L2266-L2316 | |
oracle/graaljs | 36a56e8e993d45fc40939a3a4d9c0c24990720f1 | graal-nodejs/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py | python | _RuleExpandPath | (path, input_file) | return path | Given the input file to which a rule applied, string substitute a path.
Arguments:
path: a path to string expand
input_file: the file to which the rule applied.
Returns:
The string substituted path. | Given the input file to which a rule applied, string substitute a path. | [
"Given",
"the",
"input",
"file",
"to",
"which",
"a",
"rule",
"applied",
"string",
"substitute",
"a",
"path",
"."
] | def _RuleExpandPath(path, input_file):
"""Given the input file to which a rule applied, string substitute a path.
Arguments:
path: a path to string expand
input_file: the file to which the rule applied.
Returns:
The string substituted path.
"""
path = path.replace(
"$(InputName)", os.... | [
"def",
"_RuleExpandPath",
"(",
"path",
",",
"input_file",
")",
":",
"path",
"=",
"path",
".",
"replace",
"(",
"\"$(InputName)\"",
",",
"os",
".",
"path",
".",
"splitext",
"(",
"os",
".",
"path",
".",
"split",
"(",
"input_file",
")",
"[",
"1",
"]",
")... | https://github.com/oracle/graaljs/blob/36a56e8e993d45fc40939a3a4d9c0c24990720f1/graal-nodejs/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py#L559-L577 | |
Polidea/SiriusObfuscator | b0e590d8130e97856afe578869b83a209e2b19be | SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py | python | SBCompileUnit.GetSupportFileAtIndex | (self, *args) | return _lldb.SBCompileUnit_GetSupportFileAtIndex(self, *args) | GetSupportFileAtIndex(self, uint32_t idx) -> SBFileSpec | GetSupportFileAtIndex(self, uint32_t idx) -> SBFileSpec | [
"GetSupportFileAtIndex",
"(",
"self",
"uint32_t",
"idx",
")",
"-",
">",
"SBFileSpec"
] | def GetSupportFileAtIndex(self, *args):
"""GetSupportFileAtIndex(self, uint32_t idx) -> SBFileSpec"""
return _lldb.SBCompileUnit_GetSupportFileAtIndex(self, *args) | [
"def",
"GetSupportFileAtIndex",
"(",
"self",
",",
"*",
"args",
")",
":",
"return",
"_lldb",
".",
"SBCompileUnit_GetSupportFileAtIndex",
"(",
"self",
",",
"*",
"args",
")"
] | https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py#L2572-L2574 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/msw/xrc.py | python | XmlNode.SetParent | (*args, **kwargs) | return _xrc.XmlNode_SetParent(*args, **kwargs) | SetParent(self, XmlNode parent) | SetParent(self, XmlNode parent) | [
"SetParent",
"(",
"self",
"XmlNode",
"parent",
")"
] | def SetParent(*args, **kwargs):
"""SetParent(self, XmlNode parent)"""
return _xrc.XmlNode_SetParent(*args, **kwargs) | [
"def",
"SetParent",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_xrc",
".",
"XmlNode_SetParent",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/xrc.py#L454-L456 | |
rapidsai/cudf | d5b2448fc69f17509304d594f029d0df56984962 | python/cudf/cudf/io/parquet.py | python | ParquetDatasetWriter.write_table | (self, df) | Write a dataframe to the file/dataset | Write a dataframe to the file/dataset | [
"Write",
"a",
"dataframe",
"to",
"the",
"file",
"/",
"dataset"
] | def write_table(self, df):
"""
Write a dataframe to the file/dataset
"""
(
paths,
metadata_file_paths,
grouped_df,
offsets,
self.filename,
) = _get_partitioned(
df,
self.path,
self.par... | [
"def",
"write_table",
"(",
"self",
",",
"df",
")",
":",
"(",
"paths",
",",
"metadata_file_paths",
",",
"grouped_df",
",",
"offsets",
",",
"self",
".",
"filename",
",",
")",
"=",
"_get_partitioned",
"(",
"df",
",",
"self",
".",
"path",
",",
"self",
".",... | https://github.com/rapidsai/cudf/blob/d5b2448fc69f17509304d594f029d0df56984962/python/cudf/cudf/io/parquet.py#L768-L822 | ||
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/osx_carbon/_gdi.py | python | DC.BlitPointSize | (*args, **kwargs) | return _gdi_.DC_BlitPointSize(*args, **kwargs) | BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
Copy from a source DC to this DC. Parameters specify the destination
coordinates, size of area to copy, source DC, source coordinates,
logi... | BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
bool useMask=False, Point srcPtMask=DefaultPosition) -> bool | [
"BlitPointSize",
"(",
"self",
"Point",
"destPt",
"Size",
"sz",
"DC",
"source",
"Point",
"srcPt",
"int",
"rop",
"=",
"COPY",
"bool",
"useMask",
"=",
"False",
"Point",
"srcPtMask",
"=",
"DefaultPosition",
")",
"-",
">",
"bool"
] | def BlitPointSize(*args, **kwargs):
"""
BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
Copy from a source DC to this DC. Parameters specify the destination
coordinates, size of a... | [
"def",
"BlitPointSize",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_gdi_",
".",
"DC_BlitPointSize",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_gdi.py#L3784-L3794 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/gtk/aui.py | python | AuiManager.Update | (*args, **kwargs) | return _aui.AuiManager_Update(*args, **kwargs) | Update(self) | Update(self) | [
"Update",
"(",
"self",
")"
] | def Update(*args, **kwargs):
"""Update(self)"""
return _aui.AuiManager_Update(*args, **kwargs) | [
"def",
"Update",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_aui",
".",
"AuiManager_Update",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/aui.py#L659-L661 | |
ApolloAuto/apollo-platform | 86d9dc6743b496ead18d597748ebabd34a513289 | ros/ros_comm/rospy/src/rospy/impl/udpros.py | python | UDPROSHandler.__init__ | (self, port=0) | ctor | ctor | [
"ctor"
] | def __init__(self, port=0):
"""
ctor
"""
self.port = port
self.buff_size = get_max_datagram_size() | [
"def",
"__init__",
"(",
"self",
",",
"port",
"=",
"0",
")",
":",
"self",
".",
"port",
"=",
"port",
"self",
".",
"buff_size",
"=",
"get_max_datagram_size",
"(",
")"
] | https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/ros_comm/rospy/src/rospy/impl/udpros.py#L58-L63 | ||
swift/swift | 12d031cf8177fdec0137f9aa7e2912fa23c4416b | 3rdParty/SCons/scons-3.0.1/engine/SCons/Variables/BoolVariable.py | python | BoolVariable | (key, help, default) | return (key, '%s (yes|no)' % help, default,
_validator, _text2bool) | The input parameters describe a boolean option, thus they are
returned with the correct converter and validator appended. The
'help' text will by appended by '(yes|no) to show the valid
valued. The result is usable for input to opts.Add(). | The input parameters describe a boolean option, thus they are
returned with the correct converter and validator appended. The
'help' text will by appended by '(yes|no) to show the valid
valued. The result is usable for input to opts.Add(). | [
"The",
"input",
"parameters",
"describe",
"a",
"boolean",
"option",
"thus",
"they",
"are",
"returned",
"with",
"the",
"correct",
"converter",
"and",
"validator",
"appended",
".",
"The",
"help",
"text",
"will",
"by",
"appended",
"by",
"(",
"yes|no",
")",
"to"... | def BoolVariable(key, help, default):
"""
The input parameters describe a boolean option, thus they are
returned with the correct converter and validator appended. The
'help' text will by appended by '(yes|no) to show the valid
valued. The result is usable for input to opts.Add().
"""
return... | [
"def",
"BoolVariable",
"(",
"key",
",",
"help",
",",
"default",
")",
":",
"return",
"(",
"key",
",",
"'%s (yes|no)'",
"%",
"help",
",",
"default",
",",
"_validator",
",",
"_text2bool",
")"
] | https://github.com/swift/swift/blob/12d031cf8177fdec0137f9aa7e2912fa23c4416b/3rdParty/SCons/scons-3.0.1/engine/SCons/Variables/BoolVariable.py#L75-L83 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/osx_carbon/_controls.py | python | PickerBase.SetInternalMargin | (*args, **kwargs) | return _controls_.PickerBase_SetInternalMargin(*args, **kwargs) | SetInternalMargin(self, int newmargin)
Sets the margin (in pixels) between the picker and the text control. | SetInternalMargin(self, int newmargin) | [
"SetInternalMargin",
"(",
"self",
"int",
"newmargin",
")"
] | def SetInternalMargin(*args, **kwargs):
"""
SetInternalMargin(self, int newmargin)
Sets the margin (in pixels) between the picker and the text control.
"""
return _controls_.PickerBase_SetInternalMargin(*args, **kwargs) | [
"def",
"SetInternalMargin",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_controls_",
".",
"PickerBase_SetInternalMargin",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_controls.py#L6739-L6745 | |
ApolloAuto/apollo-platform | 86d9dc6743b496ead18d597748ebabd34a513289 | ros/third_party/lib_aarch64/python2.7/dist-packages/rospkg/environment.py | python | _resolve_paths | (paths) | return os.pathsep.join([_resolve_path(p) for p in splits]) | Catch-all utility routine for fixing ROS environment variables
that are paths (e.g. ROS_PACKAGE_PATH). Currently this just
expands tildes to home directories, but in the future it may
encode other behaviors.
:param paths: path string with OS-defined separator (i.e. ':' for Linux), ``str`` | Catch-all utility routine for fixing ROS environment variables
that are paths (e.g. ROS_PACKAGE_PATH). Currently this just
expands tildes to home directories, but in the future it may
encode other behaviors. | [
"Catch",
"-",
"all",
"utility",
"routine",
"for",
"fixing",
"ROS",
"environment",
"variables",
"that",
"are",
"paths",
"(",
"e",
".",
"g",
".",
"ROS_PACKAGE_PATH",
")",
".",
"Currently",
"this",
"just",
"expands",
"tildes",
"to",
"home",
"directories",
"but"... | def _resolve_paths(paths):
"""
Catch-all utility routine for fixing ROS environment variables
that are paths (e.g. ROS_PACKAGE_PATH). Currently this just
expands tildes to home directories, but in the future it may
encode other behaviors.
:param paths: path string with OS-defined separator (i.... | [
"def",
"_resolve_paths",
"(",
"paths",
")",
":",
"splits",
"=",
"[",
"p",
"for",
"p",
"in",
"paths",
".",
"split",
"(",
"os",
".",
"pathsep",
")",
"if",
"p",
"]",
"return",
"os",
".",
"pathsep",
".",
"join",
"(",
"[",
"_resolve_path",
"(",
"p",
"... | https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/third_party/lib_aarch64/python2.7/dist-packages/rospkg/environment.py#L68-L78 | |
natanielruiz/android-yolo | 1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f | jni-build/jni/include/tensorflow/python/platform/flags.py | python | _FlagValues.__getattr__ | (self, name) | return self.__dict__['__flags'][name] | Retrieves the 'value' attribute of the flag --name. | Retrieves the 'value' attribute of the flag --name. | [
"Retrieves",
"the",
"value",
"attribute",
"of",
"the",
"flag",
"--",
"name",
"."
] | def __getattr__(self, name):
"""Retrieves the 'value' attribute of the flag --name."""
if not self.__dict__['__parsed']:
self._parse_flags()
if name not in self.__dict__['__flags']:
raise AttributeError(name)
return self.__dict__['__flags'][name] | [
"def",
"__getattr__",
"(",
"self",
",",
"name",
")",
":",
"if",
"not",
"self",
".",
"__dict__",
"[",
"'__parsed'",
"]",
":",
"self",
".",
"_parse_flags",
"(",
")",
"if",
"name",
"not",
"in",
"self",
".",
"__dict__",
"[",
"'__flags'",
"]",
":",
"raise... | https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/python/platform/flags.py#L38-L44 | |
tangzhenyu/Scene-Text-Understanding | 0f7ffc7aea5971a50cdc03d33d0a41075285948b | SynthText_Chinese/synth_utils.py | python | LUT_RGB.set_rgb_lut | (myv_glyph) | Sets the LUT of the Mayavi glyph to RGB-LUT. | Sets the LUT of the Mayavi glyph to RGB-LUT. | [
"Sets",
"the",
"LUT",
"of",
"the",
"Mayavi",
"glyph",
"to",
"RGB",
"-",
"LUT",
"."
] | def set_rgb_lut(myv_glyph):
"""
Sets the LUT of the Mayavi glyph to RGB-LUT.
"""
lut = myv_glyph.module_manager.scalar_lut_manager.lut
lut._vtk_obj.SetTableRange(0, LUT_RGB.__lut__.shape[0])
lut.number_of_colors = LUT_RGB.__lut__.shape[0]
lut.table = LUT_RGB.__lut... | [
"def",
"set_rgb_lut",
"(",
"myv_glyph",
")",
":",
"lut",
"=",
"myv_glyph",
".",
"module_manager",
".",
"scalar_lut_manager",
".",
"lut",
"lut",
".",
"_vtk_obj",
".",
"SetTableRange",
"(",
"0",
",",
"LUT_RGB",
".",
"__lut__",
".",
"shape",
"[",
"0",
"]",
... | https://github.com/tangzhenyu/Scene-Text-Understanding/blob/0f7ffc7aea5971a50cdc03d33d0a41075285948b/SynthText_Chinese/synth_utils.py#L32-L39 | ||
hszhao/PSPNet | cf7e5a99ba37e46118026e96be5821a9bc63bde0 | python/caffe/io.py | python | Transformer.set_transpose | (self, in_, order) | Set the input channel order for e.g. RGB to BGR conversion
as needed for the reference ImageNet model.
Parameters
----------
in_ : which input to assign this channel order
order : the order to transpose the dimensions | Set the input channel order for e.g. RGB to BGR conversion
as needed for the reference ImageNet model. | [
"Set",
"the",
"input",
"channel",
"order",
"for",
"e",
".",
"g",
".",
"RGB",
"to",
"BGR",
"conversion",
"as",
"needed",
"for",
"the",
"reference",
"ImageNet",
"model",
"."
] | def set_transpose(self, in_, order):
"""
Set the input channel order for e.g. RGB to BGR conversion
as needed for the reference ImageNet model.
Parameters
----------
in_ : which input to assign this channel order
order : the order to transpose the dimensions
... | [
"def",
"set_transpose",
"(",
"self",
",",
"in_",
",",
"order",
")",
":",
"self",
".",
"__check_input",
"(",
"in_",
")",
"if",
"len",
"(",
"order",
")",
"!=",
"len",
"(",
"self",
".",
"inputs",
"[",
"in_",
"]",
")",
"-",
"1",
":",
"raise",
"Except... | https://github.com/hszhao/PSPNet/blob/cf7e5a99ba37e46118026e96be5821a9bc63bde0/python/caffe/io.py#L186-L200 | ||
microsoft/ivy | 9f3c7ecc0b2383129fdd0953e10890d98d09a82d | ivy/ivy_parser.py | python | p_lparams_lparam | (p) | lparams : lparam | lparams : lparam | [
"lparams",
":",
"lparam"
] | def p_lparams_lparam(p):
'lparams : lparam'
p[0] = [p[1]] | [
"def",
"p_lparams_lparam",
"(",
"p",
")",
":",
"p",
"[",
"0",
"]",
"=",
"[",
"p",
"[",
"1",
"]",
"]"
] | https://github.com/microsoft/ivy/blob/9f3c7ecc0b2383129fdd0953e10890d98d09a82d/ivy/ivy_parser.py#L2354-L2356 | ||
windystrife/UnrealEngine_NVIDIAGameWorks | b50e6338a7c5b26374d66306ebc7807541ff815e | Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/site-packages/pkg_resources.py | python | get_provider | (moduleOrReq) | return _find_adapter(_provider_factories, loader)(module) | Return an IResourceProvider for the named module or requirement | Return an IResourceProvider for the named module or requirement | [
"Return",
"an",
"IResourceProvider",
"for",
"the",
"named",
"module",
"or",
"requirement"
] | def get_provider(moduleOrReq):
"""Return an IResourceProvider for the named module or requirement"""
if isinstance(moduleOrReq,Requirement):
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
try:
module = sys.modules[moduleOrReq]
except KeyError:
__import__(mod... | [
"def",
"get_provider",
"(",
"moduleOrReq",
")",
":",
"if",
"isinstance",
"(",
"moduleOrReq",
",",
"Requirement",
")",
":",
"return",
"working_set",
".",
"find",
"(",
"moduleOrReq",
")",
"or",
"require",
"(",
"str",
"(",
"moduleOrReq",
")",
")",
"[",
"0",
... | https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/site-packages/pkg_resources.py#L226-L236 | |
Kitware/ParaView | f760af9124ff4634b23ebbeab95a4f56e0261955 | Wrapping/Python/paraview/servermanager.py | python | ConnectionProxyNamespaces.getClass | (self, smproxy) | return ns.findClass(smproxy) | Given a vtkSMProxy returns a `Proxy` class subclass type appropriate for
the proxy. This will atttempt to reuse the class type is already seen,
otherwise a new one will be created. | Given a vtkSMProxy returns a `Proxy` class subclass type appropriate for
the proxy. This will atttempt to reuse the class type is already seen,
otherwise a new one will be created. | [
"Given",
"a",
"vtkSMProxy",
"returns",
"a",
"Proxy",
"class",
"subclass",
"type",
"appropriate",
"for",
"the",
"proxy",
".",
"This",
"will",
"atttempt",
"to",
"reuse",
"the",
"class",
"type",
"is",
"already",
"seen",
"otherwise",
"a",
"new",
"one",
"will",
... | def getClass(self, smproxy):
"""
Given a vtkSMProxy returns a `Proxy` class subclass type appropriate for
the proxy. This will atttempt to reuse the class type is already seen,
otherwise a new one will be created.
"""
for name in self._getNamespaceNames():
ns ... | [
"def",
"getClass",
"(",
"self",
",",
"smproxy",
")",
":",
"for",
"name",
"in",
"self",
".",
"_getNamespaceNames",
"(",
")",
":",
"ns",
"=",
"getattr",
"(",
"self",
",",
"name",
")",
"cls",
"=",
"ns",
".",
"findClass",
"(",
"smproxy",
")",
"if",
"cl... | https://github.com/Kitware/ParaView/blob/f760af9124ff4634b23ebbeab95a4f56e0261955/Wrapping/Python/paraview/servermanager.py#L2777-L2799 | |
tensorflow/tensorflow | 419e3a6b650ea4bd1b0cba23c4348f8a69f3272e | tensorflow/python/ops/linalg_grad.py | python | _MatrixSquareRootGrad | (op, grad) | return array_ops.matrix_transpose(dsqrtm_transpose) | Gradient for MatrixSquareRoot. | Gradient for MatrixSquareRoot. | [
"Gradient",
"for",
"MatrixSquareRoot",
"."
] | def _MatrixSquareRootGrad(op, grad):
"""Gradient for MatrixSquareRoot."""
# Let A be an m x m square matrix (or batch of matrices)
# Let R = sqrtm(A)
# By definition, A = RR
# Take the differential: dA = d(RR) = RdR + dRR
# Solve the resulting Sylvester equation for dR
# Used to find Kronecker products ... | [
"def",
"_MatrixSquareRootGrad",
"(",
"op",
",",
"grad",
")",
":",
"# Let A be an m x m square matrix (or batch of matrices)",
"# Let R = sqrtm(A)",
"# By definition, A = RR",
"# Take the differential: dA = d(RR) = RdR + dRR",
"# Solve the resulting Sylvester equation for dR",
"# Used to fi... | https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/ops/linalg_grad.py#L384-L445 | |
hpi-xnor/BMXNet-v2 | af2b1859eafc5c721b1397cef02f946aaf2ce20d | python/mxnet/symbol/symbol.py | python | Symbol.space_to_depth | (self, *args, **kwargs) | return op.space_to_depth(self, *args, **kwargs) | Convenience fluent method for :py:func:`space_to_depth`.
The arguments are the same as for :py:func:`space_to_depth`, with
this array as data. | Convenience fluent method for :py:func:`space_to_depth`. | [
"Convenience",
"fluent",
"method",
"for",
":",
"py",
":",
"func",
":",
"space_to_depth",
"."
] | def space_to_depth(self, *args, **kwargs):
"""Convenience fluent method for :py:func:`space_to_depth`.
The arguments are the same as for :py:func:`space_to_depth`, with
this array as data.
"""
return op.space_to_depth(self, *args, **kwargs) | [
"def",
"space_to_depth",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"op",
".",
"space_to_depth",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/hpi-xnor/BMXNet-v2/blob/af2b1859eafc5c721b1397cef02f946aaf2ce20d/python/mxnet/symbol/symbol.py#L2182-L2188 | |
hanpfei/chromium-net | 392cc1fa3a8f92f42e4071ab6e674d8e0482f83f | third_party/catapult/third_party/Paste/paste/evalexception/middleware.py | python | get_debug_info | (func) | return debug_info_replacement | A decorator (meant to be used under ``wsgiapp()``) that resolves
the ``debugcount`` variable to a ``DebugInfo`` object (or gives an
error if it can't be found). | A decorator (meant to be used under ``wsgiapp()``) that resolves
the ``debugcount`` variable to a ``DebugInfo`` object (or gives an
error if it can't be found). | [
"A",
"decorator",
"(",
"meant",
"to",
"be",
"used",
"under",
"wsgiapp",
"()",
")",
"that",
"resolves",
"the",
"debugcount",
"variable",
"to",
"a",
"DebugInfo",
"object",
"(",
"or",
"gives",
"an",
"error",
"if",
"it",
"can",
"t",
"be",
"found",
")",
"."... | def get_debug_info(func):
"""
A decorator (meant to be used under ``wsgiapp()``) that resolves
the ``debugcount`` variable to a ``DebugInfo`` object (or gives an
error if it can't be found).
"""
def debug_info_replacement(self, **form):
try:
if 'debugcount' not in form:
... | [
"def",
"get_debug_info",
"(",
"func",
")",
":",
"def",
"debug_info_replacement",
"(",
"self",
",",
"*",
"*",
"form",
")",
":",
"try",
":",
"if",
"'debugcount'",
"not",
"in",
"form",
":",
"raise",
"ValueError",
"(",
"'You must provide a debugcount parameter'",
... | https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/Paste/paste/evalexception/middleware.py#L132-L156 | |
miyosuda/TensorFlowAndroidDemo | 35903e0221aa5f109ea2dbef27f20b52e317f42d | jni-build/jni/include/tensorflow/python/training/proximal_gradient_descent.py | python | ProximalGradientDescentOptimizer.__init__ | (self, learning_rate, l1_regularization_strength=0.0,
l2_regularization_strength=0.0, use_locking=False,
name="ProximalGradientDescent") | Construct a new proximal gradient descent optimizer.
Args:
learning_rate: A Tensor or a floating point value. The learning
rate to use.
l1_regularization_strength: A float value, must be greater than or
equal to zero.
l2_regularization_strength: A float value, must be greater tha... | Construct a new proximal gradient descent optimizer. | [
"Construct",
"a",
"new",
"proximal",
"gradient",
"descent",
"optimizer",
"."
] | def __init__(self, learning_rate, l1_regularization_strength=0.0,
l2_regularization_strength=0.0, use_locking=False,
name="ProximalGradientDescent"):
"""Construct a new proximal gradient descent optimizer.
Args:
learning_rate: A Tensor or a floating point value. The learnin... | [
"def",
"__init__",
"(",
"self",
",",
"learning_rate",
",",
"l1_regularization_strength",
"=",
"0.0",
",",
"l2_regularization_strength",
"=",
"0.0",
",",
"use_locking",
"=",
"False",
",",
"name",
"=",
"\"ProximalGradientDescent\"",
")",
":",
"super",
"(",
"Proximal... | https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/python/training/proximal_gradient_descent.py#L38-L59 | ||
forkineye/ESPixelStick | 22926f1c0d1131f1369fc7cad405689a095ae3cb | dist/bin/pyserial/examples/at_protocol.py | python | ATProtocol.handle_line | (self, line) | Handle input from serial port, check for events. | Handle input from serial port, check for events. | [
"Handle",
"input",
"from",
"serial",
"port",
"check",
"for",
"events",
"."
] | def handle_line(self, line):
"""
Handle input from serial port, check for events.
"""
if line.startswith('+'):
self.events.put(line)
else:
self.responses.put(line) | [
"def",
"handle_line",
"(",
"self",
",",
"line",
")",
":",
"if",
"line",
".",
"startswith",
"(",
"'+'",
")",
":",
"self",
".",
"events",
".",
"put",
"(",
"line",
")",
"else",
":",
"self",
".",
"responses",
".",
"put",
"(",
"line",
")"
] | https://github.com/forkineye/ESPixelStick/blob/22926f1c0d1131f1369fc7cad405689a095ae3cb/dist/bin/pyserial/examples/at_protocol.py#L63-L70 | ||
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Tools/Python/3.7.10/windows/Lib/site-packages/pkg_resources/__init__.py | python | WorkingSet._build_master | (cls) | return ws | Prepare the master working set. | Prepare the master working set. | [
"Prepare",
"the",
"master",
"working",
"set",
"."
] | def _build_master(cls):
"""
Prepare the master working set.
"""
ws = cls()
try:
from __main__ import __requires__
except ImportError:
# The main program does not list any requirements
return ws
# ensure the requirements are met... | [
"def",
"_build_master",
"(",
"cls",
")",
":",
"ws",
"=",
"cls",
"(",
")",
"try",
":",
"from",
"__main__",
"import",
"__requires__",
"except",
"ImportError",
":",
"# The main program does not list any requirements",
"return",
"ws",
"# ensure the requirements are met",
... | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/pkg_resources/__init__.py#L571-L588 | |
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/distlib/_backport/tarfile.py | python | _FileInFile.read | (self, size=None) | return buf | Read data from the file. | Read data from the file. | [
"Read",
"data",
"from",
"the",
"file",
"."
] | def read(self, size=None):
"""Read data from the file.
"""
if size is None:
size = self.size - self.position
else:
size = min(size, self.size - self.position)
buf = b""
while size > 0:
while True:
data, start, stop, off... | [
"def",
"read",
"(",
"self",
",",
"size",
"=",
"None",
")",
":",
"if",
"size",
"is",
"None",
":",
"size",
"=",
"self",
".",
"size",
"-",
"self",
".",
"position",
"else",
":",
"size",
"=",
"min",
"(",
"size",
",",
"self",
".",
"size",
"-",
"self"... | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/distlib/_backport/tarfile.py#L752-L778 | |
aimerykong/Low-Rank-Bilinear-Pooling | 487eb2c857fd9c95357a5166b0c15ad0fe135b28 | caffe-20160312/scripts/cpp_lint.py | python | CleansedLines._CollapseStrings | (elided) | return elided | Collapses strings and chars on a line to simple "" or '' blocks.
We nix strings first so we're not fooled by text like '"http://"'
Args:
elided: The line being processed.
Returns:
The line with collapsed strings. | Collapses strings and chars on a line to simple "" or '' blocks. | [
"Collapses",
"strings",
"and",
"chars",
"on",
"a",
"line",
"to",
"simple",
"or",
"blocks",
"."
] | def _CollapseStrings(elided):
"""Collapses strings and chars on a line to simple "" or '' blocks.
We nix strings first so we're not fooled by text like '"http://"'
Args:
elided: The line being processed.
Returns:
The line with collapsed strings.
"""
if not _RE_PATTERN_INCLUDE.matc... | [
"def",
"_CollapseStrings",
"(",
"elided",
")",
":",
"if",
"not",
"_RE_PATTERN_INCLUDE",
".",
"match",
"(",
"elided",
")",
":",
"# Remove escaped characters first to make quote/single quote collapsing",
"# basic. Things that look like escaped characters shouldn't occur",
"# outside... | https://github.com/aimerykong/Low-Rank-Bilinear-Pooling/blob/487eb2c857fd9c95357a5166b0c15ad0fe135b28/caffe-20160312/scripts/cpp_lint.py#L1209-L1227 | |
bingwin/MicroChat | 81d9a71a212c1cbca5bba497ec42659a7d25dccf | mars/lint/cpplint.py | python | GetPreviousNonBlankLine | (clean_lines, linenum) | return ('', -1) | Return the most recent non-blank line and its line number.
Args:
clean_lines: A CleansedLines instance containing the file contents.
linenum: The number of the line to check.
Returns:
A tuple with two elements. The first element is the contents of the last
non-blank line before the current line, ... | Return the most recent non-blank line and its line number. | [
"Return",
"the",
"most",
"recent",
"non",
"-",
"blank",
"line",
"and",
"its",
"line",
"number",
"."
] | def GetPreviousNonBlankLine(clean_lines, linenum):
"""Return the most recent non-blank line and its line number.
Args:
clean_lines: A CleansedLines instance containing the file contents.
linenum: The number of the line to check.
Returns:
A tuple with two elements. The first element is the contents ... | [
"def",
"GetPreviousNonBlankLine",
"(",
"clean_lines",
",",
"linenum",
")",
":",
"prevlinenum",
"=",
"linenum",
"-",
"1",
"while",
"prevlinenum",
">=",
"0",
":",
"prevline",
"=",
"clean_lines",
".",
"elided",
"[",
"prevlinenum",
"]",
"if",
"not",
"IsBlankLine",... | https://github.com/bingwin/MicroChat/blob/81d9a71a212c1cbca5bba497ec42659a7d25dccf/mars/lint/cpplint.py#L3872-L3892 | |
hanpfei/chromium-net | 392cc1fa3a8f92f42e4071ab6e674d8e0482f83f | tools/grit/grit/format/policy_templates/policy_template_generator.py | python | PolicyTemplateGenerator._ProcessPolicy | (self, policy) | Processes localized message strings in a policy or a group.
Also breaks up the content of 'supported_on' attribute into a list.
Args:
policy: The data structure of the policy or group, that will get message
strings here. | Processes localized message strings in a policy or a group.
Also breaks up the content of 'supported_on' attribute into a list. | [
"Processes",
"localized",
"message",
"strings",
"in",
"a",
"policy",
"or",
"a",
"group",
".",
"Also",
"breaks",
"up",
"the",
"content",
"of",
"supported_on",
"attribute",
"into",
"a",
"list",
"."
] | def _ProcessPolicy(self, policy):
'''Processes localized message strings in a policy or a group.
Also breaks up the content of 'supported_on' attribute into a list.
Args:
policy: The data structure of the policy or group, that will get message
strings here.
'''
policy['desc'] = self.... | [
"def",
"_ProcessPolicy",
"(",
"self",
",",
"policy",
")",
":",
"policy",
"[",
"'desc'",
"]",
"=",
"self",
".",
"_ImportMessage",
"(",
"policy",
"[",
"'desc'",
"]",
")",
"policy",
"[",
"'caption'",
"]",
"=",
"self",
".",
"_ImportMessage",
"(",
"policy",
... | https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/tools/grit/grit/format/policy_templates/policy_template_generator.py#L107-L130 | ||
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Tools/Python/3.7.10/windows/Lib/http/client.py | python | HTTPResponse.getcode | (self) | return self.status | Return the HTTP status code that was sent with the response,
or None if the URL is not an HTTP URL. | Return the HTTP status code that was sent with the response,
or None if the URL is not an HTTP URL. | [
"Return",
"the",
"HTTP",
"status",
"code",
"that",
"was",
"sent",
"with",
"the",
"response",
"or",
"None",
"if",
"the",
"URL",
"is",
"not",
"an",
"HTTP",
"URL",
"."
] | def getcode(self):
'''Return the HTTP status code that was sent with the response,
or None if the URL is not an HTTP URL.
'''
return self.status | [
"def",
"getcode",
"(",
"self",
")",
":",
"return",
"self",
".",
"status"
] | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/http/client.py#L786-L791 | |
wlanjie/AndroidFFmpeg | 7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf | tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/logging/__init__.py | python | setLoggerClass | (klass) | Set the class to be used when instantiating a logger. The class should
define __init__() such that only a name argument is required, and the
__init__() should call Logger.__init__() | Set the class to be used when instantiating a logger. The class should
define __init__() such that only a name argument is required, and the
__init__() should call Logger.__init__() | [
"Set",
"the",
"class",
"to",
"be",
"used",
"when",
"instantiating",
"a",
"logger",
".",
"The",
"class",
"should",
"define",
"__init__",
"()",
"such",
"that",
"only",
"a",
"name",
"argument",
"is",
"required",
"and",
"the",
"__init__",
"()",
"should",
"call... | def setLoggerClass(klass):
"""
Set the class to be used when instantiating a logger. The class should
define __init__() such that only a name argument is required, and the
__init__() should call Logger.__init__()
"""
if klass != Logger:
if not issubclass(klass, Logger):
raise... | [
"def",
"setLoggerClass",
"(",
"klass",
")",
":",
"if",
"klass",
"!=",
"Logger",
":",
"if",
"not",
"issubclass",
"(",
"klass",
",",
"Logger",
")",
":",
"raise",
"TypeError",
"(",
"\"logger not derived from logging.Logger: \"",
"+",
"klass",
".",
"__name__",
")"... | https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/logging/__init__.py#L972-L983 | ||
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/osx_carbon/_windows.py | python | PrePopupTransientWindow | (*args, **kwargs) | return val | PrePopupTransientWindow() -> PopupTransientWindow | PrePopupTransientWindow() -> PopupTransientWindow | [
"PrePopupTransientWindow",
"()",
"-",
">",
"PopupTransientWindow"
] | def PrePopupTransientWindow(*args, **kwargs):
"""PrePopupTransientWindow() -> PopupTransientWindow"""
val = _windows_.new_PrePopupTransientWindow(*args, **kwargs)
return val | [
"def",
"PrePopupTransientWindow",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"val",
"=",
"_windows_",
".",
"new_PrePopupTransientWindow",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"return",
"val"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_windows.py#L2166-L2169 | |
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Tools/Python/3.7.10/windows/Lib/site-packages/pip/_vendor/distlib/_backport/shutil.py | python | ignore_patterns | (*patterns) | return _ignore_patterns | Function that can be used as copytree() ignore parameter.
Patterns is a sequence of glob-style patterns
that are used to exclude files | Function that can be used as copytree() ignore parameter. | [
"Function",
"that",
"can",
"be",
"used",
"as",
"copytree",
"()",
"ignore",
"parameter",
"."
] | def ignore_patterns(*patterns):
"""Function that can be used as copytree() ignore parameter.
Patterns is a sequence of glob-style patterns
that are used to exclude files"""
def _ignore_patterns(path, names):
ignored_names = []
for pattern in patterns:
ignored_names.extend(fn... | [
"def",
"ignore_patterns",
"(",
"*",
"patterns",
")",
":",
"def",
"_ignore_patterns",
"(",
"path",
",",
"names",
")",
":",
"ignored_names",
"=",
"[",
"]",
"for",
"pattern",
"in",
"patterns",
":",
"ignored_names",
".",
"extend",
"(",
"fnmatch",
".",
"filter"... | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/pip/_vendor/distlib/_backport/shutil.py#L155-L165 | |
acado/acado | b4e28f3131f79cadfd1a001e9fff061f361d3a0f | misc/cpplint.py | python | Search | (pattern, s) | return _regexp_compile_cache[pattern].search(s) | Searches the string for the pattern, caching the compiled regexp. | Searches the string for the pattern, caching the compiled regexp. | [
"Searches",
"the",
"string",
"for",
"the",
"pattern",
"caching",
"the",
"compiled",
"regexp",
"."
] | def Search(pattern, s):
"""Searches the string for the pattern, caching the compiled regexp."""
if pattern not in _regexp_compile_cache:
_regexp_compile_cache[pattern] = sre_compile.compile(pattern)
return _regexp_compile_cache[pattern].search(s) | [
"def",
"Search",
"(",
"pattern",
",",
"s",
")",
":",
"if",
"pattern",
"not",
"in",
"_regexp_compile_cache",
":",
"_regexp_compile_cache",
"[",
"pattern",
"]",
"=",
"sre_compile",
".",
"compile",
"(",
"pattern",
")",
"return",
"_regexp_compile_cache",
"[",
"pat... | https://github.com/acado/acado/blob/b4e28f3131f79cadfd1a001e9fff061f361d3a0f/misc/cpplint.py#L535-L539 | |
google/ml-metadata | b60196492d2ea2bcd8e4ddff0f3757e5fd710e4d | ml_metadata/metadata_store/metadata_store.py | python | MetadataStore.put_executions | (self, executions: Sequence[proto.Execution]) | return result | Inserts or updates executions in the database.
If an execution id is specified for an execution, it is an update.
If an execution id is unspecified, it will insert a new execution.
For new executions, type must be specified.
For old executions, type must be unchanged or unspecified.
When the name o... | Inserts or updates executions in the database. | [
"Inserts",
"or",
"updates",
"executions",
"in",
"the",
"database",
"."
] | def put_executions(self, executions: Sequence[proto.Execution]) -> List[int]:
"""Inserts or updates executions in the database.
If an execution id is specified for an execution, it is an update.
If an execution id is unspecified, it will insert a new execution.
For new executions, type must be specifie... | [
"def",
"put_executions",
"(",
"self",
",",
"executions",
":",
"Sequence",
"[",
"proto",
".",
"Execution",
"]",
")",
"->",
"List",
"[",
"int",
"]",
":",
"request",
"=",
"metadata_store_service_pb2",
".",
"PutExecutionsRequest",
"(",
")",
"for",
"x",
"in",
"... | https://github.com/google/ml-metadata/blob/b60196492d2ea2bcd8e4ddff0f3757e5fd710e4d/ml_metadata/metadata_store/metadata_store.py#L332-L361 | |
unsynchronized/gr-amps | 709d48272e7b605f34cfe89a517cc423923245e3 | docs/doxygen/swig_doc.py | python | combine_descriptions | (obj) | return utoascii('\n\n'.join(description)).strip() | Combines the brief and detailed descriptions of an object together. | Combines the brief and detailed descriptions of an object together. | [
"Combines",
"the",
"brief",
"and",
"detailed",
"descriptions",
"of",
"an",
"object",
"together",
"."
] | def combine_descriptions(obj):
"""
Combines the brief and detailed descriptions of an object together.
"""
description = []
bd = obj.brief_description.strip()
dd = obj.detailed_description.strip()
if bd:
description.append(bd)
if dd:
description.append(dd)
return utoa... | [
"def",
"combine_descriptions",
"(",
"obj",
")",
":",
"description",
"=",
"[",
"]",
"bd",
"=",
"obj",
".",
"brief_description",
".",
"strip",
"(",
")",
"dd",
"=",
"obj",
".",
"detailed_description",
".",
"strip",
"(",
")",
"if",
"bd",
":",
"description",
... | https://github.com/unsynchronized/gr-amps/blob/709d48272e7b605f34cfe89a517cc423923245e3/docs/doxygen/swig_doc.py#L73-L84 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/gtk/_windows.py | python | ScrollHelper.EnableScrolling | (*args, **kwargs) | return _windows_.ScrollHelper_EnableScrolling(*args, **kwargs) | EnableScrolling(self, bool x_scrolling, bool y_scrolling) | EnableScrolling(self, bool x_scrolling, bool y_scrolling) | [
"EnableScrolling",
"(",
"self",
"bool",
"x_scrolling",
"bool",
"y_scrolling",
")"
] | def EnableScrolling(*args, **kwargs):
"""EnableScrolling(self, bool x_scrolling, bool y_scrolling)"""
return _windows_.ScrollHelper_EnableScrolling(*args, **kwargs) | [
"def",
"EnableScrolling",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_windows_",
".",
"ScrollHelper_EnableScrolling",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_windows.py#L187-L189 | |
catboost/catboost | 167f64f237114a4d10b2b4ee42adb4569137debe | contrib/python/scikit-learn/py3/sklearn/pipeline.py | python | Pipeline.score_samples | (self, X) | return self.steps[-1][-1].score_samples(Xt) | Apply transforms, and score_samples of the final estimator.
Parameters
----------
X : iterable
Data to predict on. Must fulfill input requirements of first step
of the pipeline.
Returns
-------
y_score : ndarray, shape (n_samples,) | Apply transforms, and score_samples of the final estimator. | [
"Apply",
"transforms",
"and",
"score_samples",
"of",
"the",
"final",
"estimator",
"."
] | def score_samples(self, X):
"""Apply transforms, and score_samples of the final estimator.
Parameters
----------
X : iterable
Data to predict on. Must fulfill input requirements of first step
of the pipeline.
Returns
-------
y_score : nda... | [
"def",
"score_samples",
"(",
"self",
",",
"X",
")",
":",
"Xt",
"=",
"X",
"for",
"_",
",",
"_",
",",
"transformer",
"in",
"self",
".",
"_iter",
"(",
"with_final",
"=",
"False",
")",
":",
"Xt",
"=",
"transformer",
".",
"transform",
"(",
"Xt",
")",
... | https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scikit-learn/py3/sklearn/pipeline.py#L494-L510 | |
krishauser/Klampt | 972cc83ea5befac3f653c1ba20f80155768ad519 | Python/control-examples/leastsq_bounds.py | python | leastsq_bounds2 | ( func, x0, Cfunc, bounds, boundsweight=10, Dfun = None, CDfun = None,**kwargs ) | return leastsq( funcbox, x0, Dfun = myDfun, **kwargs ) | leastsq with bound conatraints lo <= C(p) <= hi
run leastsq with additional constraints to minimize the sum of squares of
[func(p) ...]
+ boundsweight * [max( lo_i - c_i(p), 0, c_i(p) - hi_i ) ...]
Parameters
----------
func() : a function of parameters `p`
Cfunc(): a Rn->Rm functio... | leastsq with bound conatraints lo <= C(p) <= hi
run leastsq with additional constraints to minimize the sum of squares of
[func(p) ...]
+ boundsweight * [max( lo_i - c_i(p), 0, c_i(p) - hi_i ) ...] | [
"leastsq",
"with",
"bound",
"conatraints",
"lo",
"<",
"=",
"C",
"(",
"p",
")",
"<",
"=",
"hi",
"run",
"leastsq",
"with",
"additional",
"constraints",
"to",
"minimize",
"the",
"sum",
"of",
"squares",
"of",
"[",
"func",
"(",
"p",
")",
"...",
"]",
"+",
... | def leastsq_bounds2( func, x0, Cfunc, bounds, boundsweight=10, Dfun = None, CDfun = None,**kwargs ):
""" leastsq with bound conatraints lo <= C(p) <= hi
run leastsq with additional constraints to minimize the sum of squares of
[func(p) ...]
+ boundsweight * [max( lo_i - c_i(p), 0, c_i(p) - hi_i ... | [
"def",
"leastsq_bounds2",
"(",
"func",
",",
"x0",
",",
"Cfunc",
",",
"bounds",
",",
"boundsweight",
"=",
"10",
",",
"Dfun",
"=",
"None",
",",
"CDfun",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"# Example: test_leastsq_bounds.py",
"myDfun",
"=",
"Df... | https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/control-examples/leastsq_bounds.py#L54-L98 | |
apple/turicreate | cce55aa5311300e3ce6af93cb45ba791fd1bdf49 | src/python/turicreate/util/_progress_table_printer.py | python | ProgressTablePrinter.print_row | (self, **kwargs) | keys of kwargs must be the names passed to __init__(...) as `column_names` | keys of kwargs must be the names passed to __init__(...) as `column_names` | [
"keys",
"of",
"kwargs",
"must",
"be",
"the",
"names",
"passed",
"to",
"__init__",
"(",
"...",
")",
"as",
"column_names"
] | def print_row(self, **kwargs):
"""
keys of kwargs must be the names passed to __init__(...) as `column_names`
"""
meta_string = "|"
for key in self.column_names:
float_specifier = ""
if isinstance(kwargs[key], float):
float_specifier = ".3f... | [
"def",
"print_row",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"meta_string",
"=",
"\"|\"",
"for",
"key",
"in",
"self",
".",
"column_names",
":",
"float_specifier",
"=",
"\"\"",
"if",
"isinstance",
"(",
"kwargs",
"[",
"key",
"]",
",",
"float",
")"... | https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/src/python/turicreate/util/_progress_table_printer.py#L28-L41 | ||
eventql/eventql | 7ca0dbb2e683b525620ea30dc40540a22d5eb227 | deps/3rdparty/spidermonkey/mozjs/build/pymake/pymake/data.py | python | Target.ruleswithcommands | (self) | return reduce(lambda i, rule: i + (len(rule.commands) > 0), self.rules, 0) | The number of rules with commands | The number of rules with commands | [
"The",
"number",
"of",
"rules",
"with",
"commands"
] | def ruleswithcommands(self):
"The number of rules with commands"
return reduce(lambda i, rule: i + (len(rule.commands) > 0), self.rules, 0) | [
"def",
"ruleswithcommands",
"(",
"self",
")",
":",
"return",
"reduce",
"(",
"lambda",
"i",
",",
"rule",
":",
"i",
"+",
"(",
"len",
"(",
"rule",
".",
"commands",
")",
">",
"0",
")",
",",
"self",
".",
"rules",
",",
"0",
")"
] | https://github.com/eventql/eventql/blob/7ca0dbb2e683b525620ea30dc40540a22d5eb227/deps/3rdparty/spidermonkey/mozjs/build/pymake/pymake/data.py#L1089-L1091 | |
albertz/openlierox | d316c14a8eb57848ef56e9bfa7b23a56f694a51b | tools/DedicatedServerVideo/gdata/apps/migration/__init__.py | python | MailEntryFromString | (xml_string) | return atom.CreateClassFromXMLString(MailEntry, xml_string) | Parse in the MailEntry from the XML definition. | Parse in the MailEntry from the XML definition. | [
"Parse",
"in",
"the",
"MailEntry",
"from",
"the",
"XML",
"definition",
"."
] | def MailEntryFromString(xml_string):
"""Parse in the MailEntry from the XML definition."""
return atom.CreateClassFromXMLString(MailEntry, xml_string) | [
"def",
"MailEntryFromString",
"(",
"xml_string",
")",
":",
"return",
"atom",
".",
"CreateClassFromXMLString",
"(",
"MailEntry",
",",
"xml_string",
")"
] | https://github.com/albertz/openlierox/blob/d316c14a8eb57848ef56e9bfa7b23a56f694a51b/tools/DedicatedServerVideo/gdata/apps/migration/__init__.py#L133-L136 | |
miyosuda/TensorFlowAndroidMNIST | 7b5a4603d2780a8a2834575706e9001977524007 | jni-build/jni/include/tensorflow/python/framework/common_shapes.py | python | bias_add_shape | (op) | return [output_shape] | Shape function for a BiasAdd op. | Shape function for a BiasAdd op. | [
"Shape",
"function",
"for",
"a",
"BiasAdd",
"op",
"."
] | def bias_add_shape(op):
"""Shape function for a BiasAdd op."""
input_shape = op.inputs[0].get_shape().with_rank_at_least(2)
bias_shape = op.inputs[1].get_shape().with_rank(1)
if input_shape.ndims is not None:
# Output has the same shape as input, and matches the length of
# bias in its bias dimension.
... | [
"def",
"bias_add_shape",
"(",
"op",
")",
":",
"input_shape",
"=",
"op",
".",
"inputs",
"[",
"0",
"]",
".",
"get_shape",
"(",
")",
".",
"with_rank_at_least",
"(",
"2",
")",
"bias_shape",
"=",
"op",
".",
"inputs",
"[",
"1",
"]",
".",
"get_shape",
"(",
... | https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/python/framework/common_shapes.py#L98-L118 | |
mindspore-ai/mindspore | fb8fd3338605bb34fa5cea054e535a8b1d753fab | mindspore/python/mindspore/dataset/vision/validators.py | python | check_normalize_c | (method) | return new_method | A wrapper that wraps a parameter checker around the original function(normalize operation written in C++). | A wrapper that wraps a parameter checker around the original function(normalize operation written in C++). | [
"A",
"wrapper",
"that",
"wraps",
"a",
"parameter",
"checker",
"around",
"the",
"original",
"function",
"(",
"normalize",
"operation",
"written",
"in",
"C",
"++",
")",
"."
] | def check_normalize_c(method):
"""A wrapper that wraps a parameter checker around the original function(normalize operation written in C++)."""
@wraps(method)
def new_method(self, *args, **kwargs):
[mean, std], _ = parse_user_args(method, *args, **kwargs)
check_normalize_c_param(mean, std)
... | [
"def",
"check_normalize_c",
"(",
"method",
")",
":",
"@",
"wraps",
"(",
"method",
")",
"def",
"new_method",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"[",
"mean",
",",
"std",
"]",
",",
"_",
"=",
"parse_user_args",
"(",
"meth... | https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/dataset/vision/validators.py#L382-L392 | |
apple/turicreate | cce55aa5311300e3ce6af93cb45ba791fd1bdf49 | deps/src/libxml2-2.9.1/python/libxml2.py | python | xmlAttr.freePropList | (self) | Free a property and all its siblings, all the children are
freed too. | Free a property and all its siblings, all the children are
freed too. | [
"Free",
"a",
"property",
"and",
"all",
"its",
"siblings",
"all",
"the",
"children",
"are",
"freed",
"too",
"."
] | def freePropList(self):
"""Free a property and all its siblings, all the children are
freed too. """
libxml2mod.xmlFreePropList(self._o) | [
"def",
"freePropList",
"(",
"self",
")",
":",
"libxml2mod",
".",
"xmlFreePropList",
"(",
"self",
".",
"_o",
")"
] | https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/deps/src/libxml2-2.9.1/python/libxml2.py#L5607-L5610 | ||
thalium/icebox | 99d147d5b9269222225443ce171b4fd46d8985d4 | third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2class.py | python | xmlTextReader.ReadAttributeValue | (self) | return ret | Parses an attribute value into one or more Text and
EntityReference nodes. | Parses an attribute value into one or more Text and
EntityReference nodes. | [
"Parses",
"an",
"attribute",
"value",
"into",
"one",
"or",
"more",
"Text",
"and",
"EntityReference",
"nodes",
"."
] | def ReadAttributeValue(self):
"""Parses an attribute value into one or more Text and
EntityReference nodes. """
ret = libxml2mod.xmlTextReaderReadAttributeValue(self._o)
return ret | [
"def",
"ReadAttributeValue",
"(",
"self",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlTextReaderReadAttributeValue",
"(",
"self",
".",
"_o",
")",
"return",
"ret"
] | https://github.com/thalium/icebox/blob/99d147d5b9269222225443ce171b4fd46d8985d4/third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2class.py#L6044-L6048 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/osx_carbon/_misc.py | python | LogBuffer.__init__ | (self, *args, **kwargs) | __init__(self) -> LogBuffer | __init__(self) -> LogBuffer | [
"__init__",
"(",
"self",
")",
"-",
">",
"LogBuffer"
] | def __init__(self, *args, **kwargs):
"""__init__(self) -> LogBuffer"""
_misc_.LogBuffer_swiginit(self,_misc_.new_LogBuffer(*args, **kwargs)) | [
"def",
"__init__",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"_misc_",
".",
"LogBuffer_swiginit",
"(",
"self",
",",
"_misc_",
".",
"new_LogBuffer",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_misc.py#L1828-L1830 | ||
openthread/openthread | 9fcdbed9c526c70f1556d1ed84099c1535c7cd32 | third_party/mbedtls/repo/scripts/assemble_changelog.py | python | check_output | (generated_output_file, main_input_file, merged_files) | Make sanity checks on the generated output.
The intent of these sanity checks is to have reasonable confidence
that no content has been lost.
The sanity check is that every line that is present in an input file
is also present in an output file. This is not perfect but good enough
for now. | Make sanity checks on the generated output. | [
"Make",
"sanity",
"checks",
"on",
"the",
"generated",
"output",
"."
] | def check_output(generated_output_file, main_input_file, merged_files):
"""Make sanity checks on the generated output.
The intent of these sanity checks is to have reasonable confidence
that no content has been lost.
The sanity check is that every line that is present in an input file
is also pres... | [
"def",
"check_output",
"(",
"generated_output_file",
",",
"main_input_file",
",",
"merged_files",
")",
":",
"generated_output",
"=",
"set",
"(",
"open",
"(",
"generated_output_file",
",",
"'rb'",
")",
")",
"for",
"line",
"in",
"open",
"(",
"main_input_file",
","... | https://github.com/openthread/openthread/blob/9fcdbed9c526c70f1556d1ed84099c1535c7cd32/third_party/mbedtls/repo/scripts/assemble_changelog.py#L380-L397 | ||
Polidea/SiriusObfuscator | b0e590d8130e97856afe578869b83a209e2b19be | SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py | python | SBAddress.GetBlock | (self) | return _lldb.SBAddress_GetBlock(self) | GetBlock(self) -> SBBlock | GetBlock(self) -> SBBlock | [
"GetBlock",
"(",
"self",
")",
"-",
">",
"SBBlock"
] | def GetBlock(self):
"""GetBlock(self) -> SBBlock"""
return _lldb.SBAddress_GetBlock(self) | [
"def",
"GetBlock",
"(",
"self",
")",
":",
"return",
"_lldb",
".",
"SBAddress_GetBlock",
"(",
"self",
")"
] | https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py#L940-L942 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/osx_carbon/_windows.py | python | HtmlListBox.OnLinkClicked | (*args, **kwargs) | return _windows_.HtmlListBox_OnLinkClicked(*args, **kwargs) | OnLinkClicked(self, size_t n, wxHtmlLinkInfo link) | OnLinkClicked(self, size_t n, wxHtmlLinkInfo link) | [
"OnLinkClicked",
"(",
"self",
"size_t",
"n",
"wxHtmlLinkInfo",
"link",
")"
] | def OnLinkClicked(*args, **kwargs):
"""OnLinkClicked(self, size_t n, wxHtmlLinkInfo link)"""
return _windows_.HtmlListBox_OnLinkClicked(*args, **kwargs) | [
"def",
"OnLinkClicked",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_windows_",
".",
"HtmlListBox_OnLinkClicked",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_windows.py#L2749-L2751 | |
swift/swift | 12d031cf8177fdec0137f9aa7e2912fa23c4416b | 3rdParty/SCons/scons-3.0.1/engine/SCons/Executor.py | python | Executor.get_build_env | (self) | return build_env | Fetch or create the appropriate build Environment
for this Executor. | Fetch or create the appropriate build Environment
for this Executor. | [
"Fetch",
"or",
"create",
"the",
"appropriate",
"build",
"Environment",
"for",
"this",
"Executor",
"."
] | def get_build_env(self):
"""Fetch or create the appropriate build Environment
for this Executor.
"""
try:
return self._memo['get_build_env']
except KeyError:
pass
# Create the build environment instance with appropriate
# overrides. These... | [
"def",
"get_build_env",
"(",
"self",
")",
":",
"try",
":",
"return",
"self",
".",
"_memo",
"[",
"'get_build_env'",
"]",
"except",
"KeyError",
":",
"pass",
"# Create the build environment instance with appropriate",
"# overrides. These get evaluated against the current",
"#... | https://github.com/swift/swift/blob/12d031cf8177fdec0137f9aa7e2912fa23c4416b/3rdParty/SCons/scons-3.0.1/engine/SCons/Executor.py#L347-L371 | |
psi4/psi4 | be533f7f426b6ccc263904e55122899b16663395 | psi4/driver/wrapper_database.py | python | _tblhead | (tbl_maxrgt, tbl_delimit, ttype) | return tbl_str | r"""Function that prints the header for the changable-width results tables in db().
*tbl_maxrgt* is the number of reagent columns the table must plan for. *tbl_delimit*
is a string of dashes of the correct length to set off the table. *ttype* is 1 for
tables comparing the computed values to the reference or... | r"""Function that prints the header for the changable-width results tables in db().
*tbl_maxrgt* is the number of reagent columns the table must plan for. *tbl_delimit*
is a string of dashes of the correct length to set off the table. *ttype* is 1 for
tables comparing the computed values to the reference or... | [
"r",
"Function",
"that",
"prints",
"the",
"header",
"for",
"the",
"changable",
"-",
"width",
"results",
"tables",
"in",
"db",
"()",
".",
"*",
"tbl_maxrgt",
"*",
"is",
"the",
"number",
"of",
"reagent",
"columns",
"the",
"table",
"must",
"plan",
"for",
"."... | def _tblhead(tbl_maxrgt, tbl_delimit, ttype):
r"""Function that prints the header for the changable-width results tables in db().
*tbl_maxrgt* is the number of reagent columns the table must plan for. *tbl_delimit*
is a string of dashes of the correct length to set off the table. *ttype* is 1 for
tables... | [
"def",
"_tblhead",
"(",
"tbl_maxrgt",
",",
"tbl_delimit",
",",
"ttype",
")",
":",
"tbl_str",
"=",
"''",
"tbl_str",
"+=",
"\"\"\" %s\"\"\"",
"%",
"(",
"tbl_delimit",
")",
"if",
"ttype",
"==",
"1",
":",
"tbl_str",
"+=",
"\"\"\"\\n%23s %19s %21s\"\"\"",
"%",
... | https://github.com/psi4/psi4/blob/be533f7f426b6ccc263904e55122899b16663395/psi4/driver/wrapper_database.py#L615-L641 | |
bigartm/bigartm | 47e37f982de87aa67bfd475ff1f39da696b181b3 | 3rdparty/protobuf-3.0.0/python/google/protobuf/internal/_parameterized.py | python | ParameterizedTestCase.id | (self) | return '%s.%s%s' % (_StrClass(self.__class__),
self._OriginalName(),
self._id_suffix.get(self._testMethodName, '')) | Returns the descriptive ID of the test.
This is used internally by the unittesting framework to get a name
for the test to be used in reports.
Returns:
The test id. | Returns the descriptive ID of the test. | [
"Returns",
"the",
"descriptive",
"ID",
"of",
"the",
"test",
"."
] | def id(self): # pylint: disable=invalid-name
"""Returns the descriptive ID of the test.
This is used internally by the unittesting framework to get a name
for the test to be used in reports.
Returns:
The test id.
"""
return '%s.%s%s' % (_StrClass(self.__class__),
... | [
"def",
"id",
"(",
"self",
")",
":",
"# pylint: disable=invalid-name",
"return",
"'%s.%s%s'",
"%",
"(",
"_StrClass",
"(",
"self",
".",
"__class__",
")",
",",
"self",
".",
"_OriginalName",
"(",
")",
",",
"self",
".",
"_id_suffix",
".",
"get",
"(",
"self",
... | https://github.com/bigartm/bigartm/blob/47e37f982de87aa67bfd475ff1f39da696b181b3/3rdparty/protobuf-3.0.0/python/google/protobuf/internal/_parameterized.py#L398-L409 | |
microsoft/clang | 86d4513d3e0daa4d5a29b0b1de7c854ca15f9fe5 | bindings/python/clang/cindex.py | python | Cursor.get_arguments | (self) | Return an iterator for accessing the arguments of this cursor. | Return an iterator for accessing the arguments of this cursor. | [
"Return",
"an",
"iterator",
"for",
"accessing",
"the",
"arguments",
"of",
"this",
"cursor",
"."
] | def get_arguments(self):
"""Return an iterator for accessing the arguments of this cursor."""
num_args = conf.lib.clang_Cursor_getNumArguments(self)
for i in range(0, num_args):
yield conf.lib.clang_Cursor_getArgument(self, i) | [
"def",
"get_arguments",
"(",
"self",
")",
":",
"num_args",
"=",
"conf",
".",
"lib",
".",
"clang_Cursor_getNumArguments",
"(",
"self",
")",
"for",
"i",
"in",
"range",
"(",
"0",
",",
"num_args",
")",
":",
"yield",
"conf",
".",
"lib",
".",
"clang_Cursor_get... | https://github.com/microsoft/clang/blob/86d4513d3e0daa4d5a29b0b1de7c854ca15f9fe5/bindings/python/clang/cindex.py#L1782-L1786 | ||
stellar-deprecated/stellard | 67eabb2217bdfa9a6ea317f62338fb6bca458c90 | src/protobuf/python/google/protobuf/internal/cpp_message.py | python | ScalarProperty | (cdescriptor) | return property(Getter, Setter) | Returns a scalar property for the given descriptor. | Returns a scalar property for the given descriptor. | [
"Returns",
"a",
"scalar",
"property",
"for",
"the",
"given",
"descriptor",
"."
] | def ScalarProperty(cdescriptor):
"""Returns a scalar property for the given descriptor."""
def Getter(self):
return self._cmsg.GetScalar(cdescriptor)
def Setter(self, value):
self._cmsg.SetScalar(cdescriptor, value)
return property(Getter, Setter) | [
"def",
"ScalarProperty",
"(",
"cdescriptor",
")",
":",
"def",
"Getter",
"(",
"self",
")",
":",
"return",
"self",
".",
"_cmsg",
".",
"GetScalar",
"(",
"cdescriptor",
")",
"def",
"Setter",
"(",
"self",
",",
"value",
")",
":",
"self",
".",
"_cmsg",
".",
... | https://github.com/stellar-deprecated/stellard/blob/67eabb2217bdfa9a6ea317f62338fb6bca458c90/src/protobuf/python/google/protobuf/internal/cpp_message.py#L78-L87 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | contrib/gizmos/msw/gizmos.py | python | TreeListCtrl.IsVisible | (*args, **kwargs) | return _gizmos.TreeListCtrl_IsVisible(*args, **kwargs) | IsVisible(self, TreeItemId item) -> bool | IsVisible(self, TreeItemId item) -> bool | [
"IsVisible",
"(",
"self",
"TreeItemId",
"item",
")",
"-",
">",
"bool"
] | def IsVisible(*args, **kwargs):
"""IsVisible(self, TreeItemId item) -> bool"""
return _gizmos.TreeListCtrl_IsVisible(*args, **kwargs) | [
"def",
"IsVisible",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_gizmos",
".",
"TreeListCtrl_IsVisible",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/contrib/gizmos/msw/gizmos.py#L721-L723 | |
ablab/spades | 3a754192b88540524ce6fb69eef5ea9273a38465 | assembler/ext/src/python_libs/pyyaml3/__init__.py | python | safe_load | (stream) | return load(stream, SafeLoader) | Parse the first YAML document in a stream
and produce the corresponding Python object.
Resolve only basic YAML tags. | Parse the first YAML document in a stream
and produce the corresponding Python object.
Resolve only basic YAML tags. | [
"Parse",
"the",
"first",
"YAML",
"document",
"in",
"a",
"stream",
"and",
"produce",
"the",
"corresponding",
"Python",
"object",
".",
"Resolve",
"only",
"basic",
"YAML",
"tags",
"."
] | def safe_load(stream):
"""
Parse the first YAML document in a stream
and produce the corresponding Python object.
Resolve only basic YAML tags.
"""
return load(stream, SafeLoader) | [
"def",
"safe_load",
"(",
"stream",
")",
":",
"return",
"load",
"(",
"stream",
",",
"SafeLoader",
")"
] | https://github.com/ablab/spades/blob/3a754192b88540524ce6fb69eef5ea9273a38465/assembler/ext/src/python_libs/pyyaml3/__init__.py#L88-L94 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.