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
gimli-org/gimli
17aa2160de9b15ababd9ef99e89b1bc3277bbb23
pygimli/viewer/mpl/boreholes.py
python
BoreHoles.__init__
(self, fnames)
Load a list of bore hole from filenames.
Load a list of bore hole from filenames.
[ "Load", "a", "list", "of", "bore", "hole", "from", "filenames", "." ]
def __init__(self, fnames): """Load a list of bore hole from filenames.""" self._fnames = fnames if len(fnames) > 0: self.boreholes = [BoreHole(f) for f in fnames] else: raise Warning('No filenames specified!')
[ "def", "__init__", "(", "self", ",", "fnames", ")", ":", "self", ".", "_fnames", "=", "fnames", "if", "len", "(", "fnames", ")", ">", "0", ":", "self", ".", "boreholes", "=", "[", "BoreHole", "(", "f", ")", "for", "f", "in", "fnames", "]", "else"...
https://github.com/gimli-org/gimli/blob/17aa2160de9b15ababd9ef99e89b1bc3277bbb23/pygimli/viewer/mpl/boreholes.py#L104-L110
larroy/clearskies_core
3574ddf0edc8555454c7044126e786a6c29444dc
tools/gyp/pylib/gyp/MSVSUserFile.py
python
_FindCommandInPath
(command)
return command
If there are no slashes in the command given, this function searches the PATH env to find the given command, and converts it to an absolute path. We have to do this because MSVS is looking for an actual file to launch a debugger on, not just a command line. Note that this happens at GYP time, so a...
If there are no slashes in the command given, this function searches the PATH env to find the given command, and converts it to an absolute path. We have to do this because MSVS is looking for an actual file to launch a debugger on, not just a command line. Note that this happens at GYP time, so a...
[ "If", "there", "are", "no", "slashes", "in", "the", "command", "given", "this", "function", "searches", "the", "PATH", "env", "to", "find", "the", "given", "command", "and", "converts", "it", "to", "an", "absolute", "path", ".", "We", "have", "to", "do",...
def _FindCommandInPath(command): """If there are no slashes in the command given, this function searches the PATH env to find the given command, and converts it to an absolute path. We have to do this because MSVS is looking for an actual file to launch a debugger on, not just a command line. No...
[ "def", "_FindCommandInPath", "(", "command", ")", ":", "if", "'/'", "in", "command", "or", "'\\\\'", "in", "command", ":", "# If the command already has path elements (either relative or", "# absolute), then assume it is constructed properly.", "return", "command", "else", ":...
https://github.com/larroy/clearskies_core/blob/3574ddf0edc8555454c7044126e786a6c29444dc/tools/gyp/pylib/gyp/MSVSUserFile.py#L17-L36
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
third_party/re2/re2/unicode.py
python
_UInt
(s)
return v
Converts string to Unicode code point ('263A' => 0x263a). Args: s: string to convert Returns: Unicode code point Raises: InputError: the string is not a valid Unicode value.
Converts string to Unicode code point ('263A' => 0x263a).
[ "Converts", "string", "to", "Unicode", "code", "point", "(", "263A", "=", ">", "0x263a", ")", "." ]
def _UInt(s): """Converts string to Unicode code point ('263A' => 0x263a). Args: s: string to convert Returns: Unicode code point Raises: InputError: the string is not a valid Unicode value. """ try: v = int(s, 16) except ValueError: v = -1 if len(s) < 4 or len(s) > 6 or v < 0 or...
[ "def", "_UInt", "(", "s", ")", ":", "try", ":", "v", "=", "int", "(", "s", ",", "16", ")", "except", "ValueError", ":", "v", "=", "-", "1", "if", "len", "(", "s", ")", "<", "4", "or", "len", "(", "s", ")", ">", "6", "or", "v", "<", "0",...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/third_party/re2/re2/unicode.py#L26-L45
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/tools/common/public_api.py
python
PublicAPIVisitor.private_map
(self)
return self._private_map
A map from parents to symbols that should not be included at all. This map can be edited, but it should not be edited once traversal has begun. Returns: The map marking symbols to not include.
A map from parents to symbols that should not be included at all.
[ "A", "map", "from", "parents", "to", "symbols", "that", "should", "not", "be", "included", "at", "all", "." ]
def private_map(self): """A map from parents to symbols that should not be included at all. This map can be edited, but it should not be edited once traversal has begun. Returns: The map marking symbols to not include. """ return self._private_map
[ "def", "private_map", "(", "self", ")", ":", "return", "self", ".", "_private_map" ]
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/tools/common/public_api.py#L78-L87
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/python/ops/gradients_impl.py
python
_hessian_vector_product
(ys, xs, v)
return gradients(elemwise_products, xs)
Multiply the Hessian of `ys` wrt `xs` by `v`. This is an efficient construction that uses a backprop-like approach to compute the product between the Hessian and another vector. The Hessian is usually too large to be explicitly computed or even represented, but this method allows us to at least multiply by it ...
Multiply the Hessian of `ys` wrt `xs` by `v`.
[ "Multiply", "the", "Hessian", "of", "ys", "wrt", "xs", "by", "v", "." ]
def _hessian_vector_product(ys, xs, v): """Multiply the Hessian of `ys` wrt `xs` by `v`. This is an efficient construction that uses a backprop-like approach to compute the product between the Hessian and another vector. The Hessian is usually too large to be explicitly computed or even represented, but this...
[ "def", "_hessian_vector_product", "(", "ys", ",", "xs", ",", "v", ")", ":", "# Validate the input", "length", "=", "len", "(", "xs", ")", "if", "len", "(", "v", ")", "!=", "length", ":", "raise", "ValueError", "(", "\"xs and v must have the same length.\"", ...
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/python/ops/gradients_impl.py#L913-L962
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/nn/probability/distribution/distribution.py
python
Distribution.construct
(self, name, *args, **kwargs)
return raise_not_implemented_util(name, self.name, *args, **kwargs)
Override `construct` in Cell. Note: Names of supported functions include: 'prob', 'log_prob', 'cdf', 'log_cdf', 'survival_function', 'log_survival', 'var', 'sd', 'mode', 'mean', 'entropy', 'kl_loss', 'cross_entropy', 'sample', 'get_dist_args', and 'get_dist_type'...
Override `construct` in Cell.
[ "Override", "construct", "in", "Cell", "." ]
def construct(self, name, *args, **kwargs): """ Override `construct` in Cell. Note: Names of supported functions include: 'prob', 'log_prob', 'cdf', 'log_cdf', 'survival_function', 'log_survival', 'var', 'sd', 'mode', 'mean', 'entropy', 'kl_loss', 'cross_entr...
[ "def", "construct", "(", "self", ",", "name", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "name", "==", "'log_prob'", ":", "return", "self", ".", "_call_log_prob", "(", "*", "args", ",", "*", "*", "kwargs", ")", "if", "name", "==", ...
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/nn/probability/distribution/distribution.py#L754-L802
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python/src/Lib/logging/__init__.py
python
FileHandler.emit
(self, record)
Emit a record. If the stream was not opened because 'delay' was specified in the constructor, open it before calling the superclass's emit.
Emit a record.
[ "Emit", "a", "record", "." ]
def emit(self, record): """ Emit a record. If the stream was not opened because 'delay' was specified in the constructor, open it before calling the superclass's emit. """ if self.stream is None: self.stream = self._open() StreamHandler.emit(self, rec...
[ "def", "emit", "(", "self", ",", "record", ")", ":", "if", "self", ".", "stream", "is", "None", ":", "self", ".", "stream", "=", "self", ".", "_open", "(", ")", "StreamHandler", ".", "emit", "(", "self", ",", "record", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Lib/logging/__init__.py#L955-L964
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/AWSPythonSDK/1.5.8/docutils/nodes.py
python
GenericNodeVisitor.default_departure
(self, node)
Override for generic, uniform traversals.
Override for generic, uniform traversals.
[ "Override", "for", "generic", "uniform", "traversals", "." ]
def default_departure(self, node): """Override for generic, uniform traversals.""" raise NotImplementedError
[ "def", "default_departure", "(", "self", ",", "node", ")", ":", "raise", "NotImplementedError" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/AWSPythonSDK/1.5.8/docutils/nodes.py#L1954-L1956
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
tools/metrics/common/path_util.py
python
GetHistogramsFile
()
return GetInputFile('tools/metrics/histograms/histograms.xml')
Returns the path to histograms.xml. Prefer using this function instead of just open("histograms.xml"), so that scripts work properly even if run from outside the histograms directory.
Returns the path to histograms.xml.
[ "Returns", "the", "path", "to", "histograms", ".", "xml", "." ]
def GetHistogramsFile(): """Returns the path to histograms.xml. Prefer using this function instead of just open("histograms.xml"), so that scripts work properly even if run from outside the histograms directory. """ return GetInputFile('tools/metrics/histograms/histograms.xml')
[ "def", "GetHistogramsFile", "(", ")", ":", "return", "GetInputFile", "(", "'tools/metrics/histograms/histograms.xml'", ")" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/tools/metrics/common/path_util.py#L10-L16
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py
python
SBProcess.AppendEventStateReport
(self, *args)
return _lldb.SBProcess_AppendEventStateReport(self, *args)
AppendEventStateReport(self, SBEvent event, SBCommandReturnObject result)
AppendEventStateReport(self, SBEvent event, SBCommandReturnObject result)
[ "AppendEventStateReport", "(", "self", "SBEvent", "event", "SBCommandReturnObject", "result", ")" ]
def AppendEventStateReport(self, *args): """AppendEventStateReport(self, SBEvent event, SBCommandReturnObject result)""" return _lldb.SBProcess_AppendEventStateReport(self, *args)
[ "def", "AppendEventStateReport", "(", "self", ",", "*", "args", ")", ":", "return", "_lldb", ".", "SBProcess_AppendEventStateReport", "(", "self", ",", "*", "args", ")" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py#L7010-L7012
BestSonny/SSTD
174d452189f6bf9cf4b6957719392008bd974069
python/caffe/coord_map.py
python
compose
(base_map, next_map)
return ax, a1 * a2, a1 * b2 + b1
Compose a base coord map with scale a1, shift b1 with a further coord map with scale a2, shift b2. The scales multiply and the further shift, b2, is scaled by base coord scale a1.
Compose a base coord map with scale a1, shift b1 with a further coord map with scale a2, shift b2. The scales multiply and the further shift, b2, is scaled by base coord scale a1.
[ "Compose", "a", "base", "coord", "map", "with", "scale", "a1", "shift", "b1", "with", "a", "further", "coord", "map", "with", "scale", "a2", "shift", "b2", ".", "The", "scales", "multiply", "and", "the", "further", "shift", "b2", "is", "scaled", "by", ...
def compose(base_map, next_map): """ Compose a base coord map with scale a1, shift b1 with a further coord map with scale a2, shift b2. The scales multiply and the further shift, b2, is scaled by base coord scale a1. """ ax1, a1, b1 = base_map ax2, a2, b2 = next_map if ax1 is None: ...
[ "def", "compose", "(", "base_map", ",", "next_map", ")", ":", "ax1", ",", "a1", ",", "b1", "=", "base_map", "ax2", ",", "a2", ",", "b2", "=", "next_map", "if", "ax1", "is", "None", ":", "ax", "=", "ax2", "elif", "ax2", "is", "None", "or", "ax1", ...
https://github.com/BestSonny/SSTD/blob/174d452189f6bf9cf4b6957719392008bd974069/python/caffe/coord_map.py#L89-L103
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib-tk/turtle.py
python
__methodDict
(cls, _dict)
helper function for Scrolled Canvas
helper function for Scrolled Canvas
[ "helper", "function", "for", "Scrolled", "Canvas" ]
def __methodDict(cls, _dict): """helper function for Scrolled Canvas""" baseList = list(cls.__bases__) baseList.reverse() for _super in baseList: __methodDict(_super, _dict) for key, value in cls.__dict__.items(): if type(value) == types.FunctionType: _dict[key] = value
[ "def", "__methodDict", "(", "cls", ",", "_dict", ")", ":", "baseList", "=", "list", "(", "cls", ".", "__bases__", ")", "baseList", ".", "reverse", "(", ")", "for", "_super", "in", "baseList", ":", "__methodDict", "(", "_super", ",", "_dict", ")", "for"...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib-tk/turtle.py#L308-L316
grpc/grpc
27bc6fe7797e43298dc931b96dc57322d0852a9f
src/python/grpcio/grpc/aio/_base_channel.py
python
Channel.channel_ready
(self)
Creates a coroutine that blocks until the Channel is READY.
Creates a coroutine that blocks until the Channel is READY.
[ "Creates", "a", "coroutine", "that", "blocks", "until", "the", "Channel", "is", "READY", "." ]
async def channel_ready(self) -> None: """Creates a coroutine that blocks until the Channel is READY."""
[ "async", "def", "channel_ready", "(", "self", ")", "->", "None", ":" ]
https://github.com/grpc/grpc/blob/27bc6fe7797e43298dc931b96dc57322d0852a9f/src/python/grpcio/grpc/aio/_base_channel.py#L267-L268
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/timeseries/python/timeseries/input_pipeline.py
python
ReaderBaseTimeSeriesParser.read_full
(self)
return self._process_records(records)
Reads a full epoch of data into memory.
Reads a full epoch of data into memory.
[ "Reads", "a", "full", "epoch", "of", "data", "into", "memory", "." ]
def read_full(self): """Reads a full epoch of data into memory.""" reader = self._get_reader() # Set a hard limit of 2 epochs through self._filenames. If there are any # records available, we should only end up reading the first record in the # second epoch before exiting the while loop and subseque...
[ "def", "read_full", "(", "self", ")", ":", "reader", "=", "self", ".", "_get_reader", "(", ")", "# Set a hard limit of 2 epochs through self._filenames. If there are any", "# records available, we should only end up reading the first record in the", "# second epoch before exiting the w...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/timeseries/python/timeseries/input_pipeline.py#L385-L433
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/math_grad.py
python
_AcosGrad
(op, grad)
Returns grad * -1/sqrt(1-x^2).
Returns grad * -1/sqrt(1-x^2).
[ "Returns", "grad", "*", "-", "1", "/", "sqrt", "(", "1", "-", "x^2", ")", "." ]
def _AcosGrad(op, grad): """Returns grad * -1/sqrt(1-x^2).""" x = op.inputs[0] with ops.control_dependencies([grad]): x = math_ops.conj(x) x2 = math_ops.square(x) one = constant_op.constant(1, dtype=grad.dtype) den = math_ops.sqrt(math_ops.subtract(one, x2)) if compat.forward_compatible(2019, ...
[ "def", "_AcosGrad", "(", "op", ",", "grad", ")", ":", "x", "=", "op", ".", "inputs", "[", "0", "]", "with", "ops", ".", "control_dependencies", "(", "[", "grad", "]", ")", ":", "x", "=", "math_ops", ".", "conj", "(", "x", ")", "x2", "=", "math_...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/math_grad.py#L1034-L1046
InsightSoftwareConsortium/ITK
87acfce9a93d928311c38bc371b666b515b9f19d
Modules/ThirdParty/pygccxml/src/pygccxml/declarations/type_traits_classes.py
python
find_trivial_constructor
(type_)
return None
Returns reference to trivial constructor. Args: type_ (declarations.class_t): the class to be searched. Returns: declarations.constructor_t: the trivial constructor
Returns reference to trivial constructor.
[ "Returns", "reference", "to", "trivial", "constructor", "." ]
def find_trivial_constructor(type_): """ Returns reference to trivial constructor. Args: type_ (declarations.class_t): the class to be searched. Returns: declarations.constructor_t: the trivial constructor """ assert isinstance(type_, class_declaration.class_t) trivial = ...
[ "def", "find_trivial_constructor", "(", "type_", ")", ":", "assert", "isinstance", "(", "type_", ",", "class_declaration", ".", "class_t", ")", "trivial", "=", "type_", ".", "constructors", "(", "lambda", "x", ":", "is_trivial_constructor", "(", "x", ")", ",",...
https://github.com/InsightSoftwareConsortium/ITK/blob/87acfce9a93d928311c38bc371b666b515b9f19d/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/type_traits_classes.py#L111-L131
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/gzip.py
python
decompress
(data)
Decompress a gzip compressed string in one shot. Return the decompressed string.
Decompress a gzip compressed string in one shot. Return the decompressed string.
[ "Decompress", "a", "gzip", "compressed", "string", "in", "one", "shot", ".", "Return", "the", "decompressed", "string", "." ]
def decompress(data): """Decompress a gzip compressed string in one shot. Return the decompressed string. """ with GzipFile(fileobj=io.BytesIO(data)) as f: return f.read()
[ "def", "decompress", "(", "data", ")", ":", "with", "GzipFile", "(", "fileobj", "=", "io", ".", "BytesIO", "(", "data", ")", ")", "as", "f", ":", "return", "f", ".", "read", "(", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/gzip.py#L538-L543
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/Draft/draftguitools/gui_snaps.py
python
ShowSnapBar.GetResources
(self)
return {'Pixmap': 'Draft_Snap', 'MenuText': QT_TRANSLATE_NOOP("Draft_ShowSnapBar","Show snap toolbar"), 'ToolTip': QT_TRANSLATE_NOOP("Draft_ShowSnapBar","Show the snap toolbar if it is hidden.")}
Set icon, menu and tooltip.
Set icon, menu and tooltip.
[ "Set", "icon", "menu", "and", "tooltip", "." ]
def GetResources(self): """Set icon, menu and tooltip.""" return {'Pixmap': 'Draft_Snap', 'MenuText': QT_TRANSLATE_NOOP("Draft_ShowSnapBar","Show snap toolbar"), 'ToolTip': QT_TRANSLATE_NOOP("Draft_ShowSnapBar","Show the snap toolbar if it is hidden.")}
[ "def", "GetResources", "(", "self", ")", ":", "return", "{", "'Pixmap'", ":", "'Draft_Snap'", ",", "'MenuText'", ":", "QT_TRANSLATE_NOOP", "(", "\"Draft_ShowSnapBar\"", ",", "\"Show snap toolbar\"", ")", ",", "'ToolTip'", ":", "QT_TRANSLATE_NOOP", "(", "\"Draft_Show...
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Draft/draftguitools/gui_snaps.py#L585-L590
PaddlePaddle/Paddle
1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c
python/paddle/nn/functional/pooling.py
python
max_unpool3d
(x, indices, kernel_size, stride=None, padding=0, data_format="NCDHW", output_size=None, name=None)
return unpool_out
This API implements max unpooling 3d opereation. `max_unpool3d` accepts the output of `max_pool3d` as input, including the indices of the maximum value and calculate the partial inverse. All non-maximum values ​​are set to zero. - Input: :math:`(N, C, D_{in}, H_{in}, W_{in})` - Output: :math:`(N,...
This API implements max unpooling 3d opereation. `max_unpool3d` accepts the output of `max_pool3d` as input, including the indices of the maximum value and calculate the partial inverse. All non-maximum values ​​are set to zero.
[ "This", "API", "implements", "max", "unpooling", "3d", "opereation", ".", "max_unpool3d", "accepts", "the", "output", "of", "max_pool3d", "as", "input", "including", "the", "indices", "of", "the", "maximum", "value", "and", "calculate", "the", "partial", "invers...
def max_unpool3d(x, indices, kernel_size, stride=None, padding=0, data_format="NCDHW", output_size=None, name=None): """ This API implements max unpooling 3d opereation. `max_unpool3d` acce...
[ "def", "max_unpool3d", "(", "x", ",", "indices", ",", "kernel_size", ",", "stride", "=", "None", ",", "padding", "=", "0", ",", "data_format", "=", "\"NCDHW\"", ",", "output_size", "=", "None", ",", "name", "=", "None", ")", ":", "kernel_size", "=", "u...
https://github.com/PaddlePaddle/Paddle/blob/1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c/python/paddle/nn/functional/pooling.py#L891-L1000
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/propgrid.py
python
PyFontProperty.__init__
(self, *args, **kwargs)
__init__(self, String label=(*wxPGProperty::sm_wxPG_LABEL), String name=(*wxPGProperty::sm_wxPG_LABEL), Font value=wxFont()) -> PyFontProperty
__init__(self, String label=(*wxPGProperty::sm_wxPG_LABEL), String name=(*wxPGProperty::sm_wxPG_LABEL), Font value=wxFont()) -> PyFontProperty
[ "__init__", "(", "self", "String", "label", "=", "(", "*", "wxPGProperty", "::", "sm_wxPG_LABEL", ")", "String", "name", "=", "(", "*", "wxPGProperty", "::", "sm_wxPG_LABEL", ")", "Font", "value", "=", "wxFont", "()", ")", "-", ">", "PyFontProperty" ]
def __init__(self, *args, **kwargs): """ __init__(self, String label=(*wxPGProperty::sm_wxPG_LABEL), String name=(*wxPGProperty::sm_wxPG_LABEL), Font value=wxFont()) -> PyFontProperty """ _propgrid.PyFontProperty_swiginit(self,_propgrid.new_PyFontProperty(*args, **kwargs)) ...
[ "def", "__init__", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "_propgrid", ".", "PyFontProperty_swiginit", "(", "self", ",", "_propgrid", ".", "new_PyFontProperty", "(", "*", "args", ",", "*", "*", "kwargs", ")", ")", "self", "."...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/propgrid.py#L4256-L4262
llvm/llvm-project
ffa6262cb4e2a335d26416fad39a581b4f98c5f4
lldb/third_party/Python/module/pexpect-4.6/pexpect/screen.py
python
screen.cursor_constrain
(self)
This keeps the cursor within the screen area.
This keeps the cursor within the screen area.
[ "This", "keeps", "the", "cursor", "within", "the", "screen", "area", "." ]
def cursor_constrain (self): '''This keeps the cursor within the screen area. ''' self.cur_r = constrain (self.cur_r, 1, self.rows) self.cur_c = constrain (self.cur_c, 1, self.cols)
[ "def", "cursor_constrain", "(", "self", ")", ":", "self", ".", "cur_r", "=", "constrain", "(", "self", ".", "cur_r", ",", "1", ",", "self", ".", "rows", ")", "self", ".", "cur_c", "=", "constrain", "(", "self", ".", "cur_c", ",", "1", ",", "self", ...
https://github.com/llvm/llvm-project/blob/ffa6262cb4e2a335d26416fad39a581b4f98c5f4/lldb/third_party/Python/module/pexpect-4.6/pexpect/screen.py#L273-L278
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/Blast/3rdParty/assimp/port/PyAssimp/scripts/transformations.py
python
orthogonalization_matrix
(lengths, angles)
return numpy.array(( ( a*sinb*math.sqrt(1.0-co*co), 0.0, 0.0, 0.0), (-a*sinb*co, b*sina, 0.0, 0.0), ( a*cosb, b*cosa, c, 0.0), ( 0.0, 0.0, 0.0, 1.0)), dtype=numpy.float64)
Return orthogonalization matrix for crystallographic cell coordinates. Angles are expected in degrees. The de-orthogonalization matrix is the inverse. >>> O = orthogonalization_matrix((10., 10., 10.), (90., 90., 90.)) >>> numpy.allclose(O[:3, :3], numpy.identity(3, float) * 10) True >>> O = o...
Return orthogonalization matrix for crystallographic cell coordinates.
[ "Return", "orthogonalization", "matrix", "for", "crystallographic", "cell", "coordinates", "." ]
def orthogonalization_matrix(lengths, angles): """Return orthogonalization matrix for crystallographic cell coordinates. Angles are expected in degrees. The de-orthogonalization matrix is the inverse. >>> O = orthogonalization_matrix((10., 10., 10.), (90., 90., 90.)) >>> numpy.allclose(O[:3, :3],...
[ "def", "orthogonalization_matrix", "(", "lengths", ",", "angles", ")", ":", "a", ",", "b", ",", "c", "=", "lengths", "angles", "=", "numpy", ".", "radians", "(", "angles", ")", "sina", ",", "sinb", ",", "_", "=", "numpy", ".", "sin", "(", "angles", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/Blast/3rdParty/assimp/port/PyAssimp/scripts/transformations.py#L838-L863
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/urllib3/util/ssl_.py
python
is_ipaddress
(hostname)
return bool(IPV4_RE.match(hostname) or BRACELESS_IPV6_ADDRZ_RE.match(hostname))
Detects whether the hostname given is an IPv4 or IPv6 address. Also detects IPv6 addresses with Zone IDs. :param str hostname: Hostname to examine. :return: True if the hostname is an IP address, False otherwise.
Detects whether the hostname given is an IPv4 or IPv6 address. Also detects IPv6 addresses with Zone IDs.
[ "Detects", "whether", "the", "hostname", "given", "is", "an", "IPv4", "or", "IPv6", "address", ".", "Also", "detects", "IPv6", "addresses", "with", "Zone", "IDs", "." ]
def is_ipaddress(hostname): """Detects whether the hostname given is an IPv4 or IPv6 address. Also detects IPv6 addresses with Zone IDs. :param str hostname: Hostname to examine. :return: True if the hostname is an IP address, False otherwise. """ if not six.PY2 and isinstance(hostname, bytes):...
[ "def", "is_ipaddress", "(", "hostname", ")", ":", "if", "not", "six", ".", "PY2", "and", "isinstance", "(", "hostname", ",", "bytes", ")", ":", "# IDN A-label bytes are ASCII compatible.", "hostname", "=", "hostname", ".", "decode", "(", "\"ascii\"", ")", "ret...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/urllib3/util/ssl_.py#L386-L396
gimli-org/gimli
17aa2160de9b15ababd9ef99e89b1bc3277bbb23
pygimli/meshtools/quality.py
python
_boundaryLengths
(cell)
return np.array( [cell.boundary(i).size() for i in range(cell.boundaryCount())])
Return boundary lengths of a given cell.
Return boundary lengths of a given cell.
[ "Return", "boundary", "lengths", "of", "a", "given", "cell", "." ]
def _boundaryLengths(cell): """Return boundary lengths of a given cell.""" return np.array( [cell.boundary(i).size() for i in range(cell.boundaryCount())])
[ "def", "_boundaryLengths", "(", "cell", ")", ":", "return", "np", ".", "array", "(", "[", "cell", ".", "boundary", "(", "i", ")", ".", "size", "(", ")", "for", "i", "in", "range", "(", "cell", ".", "boundaryCount", "(", ")", ")", "]", ")" ]
https://github.com/gimli-org/gimli/blob/17aa2160de9b15ababd9ef99e89b1bc3277bbb23/pygimli/meshtools/quality.py#L16-L19
pytorch/pytorch
7176c92687d3cc847cc046bf002269c6949a21c2
benchmarks/distributed/rpc/parameter_server/launcher.py
python
run_master
(rank, data, args, extra_configs, rpc_backend_options)
r""" A function that runs the master process in the world. This function obtains remote references to initialized servers, splits the data, runs the trainers, and prints metrics. Args: rank (int): process number in the world data (list): training samples args (parser): benchmark ...
r""" A function that runs the master process in the world. This function obtains remote references to initialized servers, splits the data, runs the trainers, and prints metrics. Args: rank (int): process number in the world data (list): training samples args (parser): benchmark ...
[ "r", "A", "function", "that", "runs", "the", "master", "process", "in", "the", "world", ".", "This", "function", "obtains", "remote", "references", "to", "initialized", "servers", "splits", "the", "data", "runs", "the", "trainers", "and", "prints", "metrics", ...
def run_master(rank, data, args, extra_configs, rpc_backend_options): r""" A function that runs the master process in the world. This function obtains remote references to initialized servers, splits the data, runs the trainers, and prints metrics. Args: rank (int): process number in the wor...
[ "def", "run_master", "(", "rank", ",", "data", ",", "args", ",", "extra_configs", ",", "rpc_backend_options", ")", ":", "world_size", "=", "args", ".", "ntrainer", "+", "args", ".", "ncudatrainer", "+", "args", ".", "nserver", "+", "args", ".", "ncudaserve...
https://github.com/pytorch/pytorch/blob/7176c92687d3cc847cc046bf002269c6949a21c2/benchmarks/distributed/rpc/parameter_server/launcher.py#L254-L299
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/groupby/groupby.py
python
GroupBy.nth
(self, n: Union[int, List[int]], dropna: Optional[str] = None)
return result
Take the nth row from each group if n is an int, or a subset of rows if n is a list of ints. If dropna, will take the nth non-null row, dropna is either 'all' or 'any'; this is equivalent to calling dropna(how=dropna) before the groupby. Parameters ---------- n ...
Take the nth row from each group if n is an int, or a subset of rows if n is a list of ints.
[ "Take", "the", "nth", "row", "from", "each", "group", "if", "n", "is", "an", "int", "or", "a", "subset", "of", "rows", "if", "n", "is", "a", "list", "of", "ints", "." ]
def nth(self, n: Union[int, List[int]], dropna: Optional[str] = None) -> DataFrame: """ Take the nth row from each group if n is an int, or a subset of rows if n is a list of ints. If dropna, will take the nth non-null row, dropna is either 'all' or 'any'; this is equivalent to ...
[ "def", "nth", "(", "self", ",", "n", ":", "Union", "[", "int", ",", "List", "[", "int", "]", "]", ",", "dropna", ":", "Optional", "[", "str", "]", "=", "None", ")", "->", "DataFrame", ":", "valid_containers", "=", "(", "set", ",", "list", ",", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/groupby/groupby.py#L1671-L1839
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib2to3/pgen2/driver.py
python
Driver.parse_tokens
(self, tokens, debug=False)
return p.rootnode
Parse a series of tokens and return the syntax tree.
Parse a series of tokens and return the syntax tree.
[ "Parse", "a", "series", "of", "tokens", "and", "return", "the", "syntax", "tree", "." ]
def parse_tokens(self, tokens, debug=False): """Parse a series of tokens and return the syntax tree.""" # XXX Move the prefix computation into a wrapper around tokenize. p = parse.Parser(self.grammar, self.convert) p.setup() lineno = 1 column = 0 type = value = st...
[ "def", "parse_tokens", "(", "self", ",", "tokens", ",", "debug", "=", "False", ")", ":", "# XXX Move the prefix computation into a wrapper around tokenize.", "p", "=", "parse", ".", "Parser", "(", "self", ".", "grammar", ",", "self", ".", "convert", ")", "p", ...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib2to3/pgen2/driver.py#L38-L84
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/idlelib/pyshell.py
python
PyShell.endexecuting
(self)
Helper for ModifiedInterpreter
Helper for ModifiedInterpreter
[ "Helper", "for", "ModifiedInterpreter" ]
def endexecuting(self): "Helper for ModifiedInterpreter" self.executing = False self.canceled = False self.showprompt()
[ "def", "endexecuting", "(", "self", ")", ":", "self", ".", "executing", "=", "False", "self", ".", "canceled", "=", "False", "self", ".", "showprompt", "(", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/idlelib/pyshell.py#L997-L1001
JarveeLee/SynthText_Chinese_version
4b2cbc7d14741f21d0bb17966a339ab3574b09a8
colorize3_poisson.py
python
FontColor.complement
(self, rgb_color)
return col_comp
return a color which is complementary to the RGB_COLOR.
return a color which is complementary to the RGB_COLOR.
[ "return", "a", "color", "which", "is", "complementary", "to", "the", "RGB_COLOR", "." ]
def complement(self, rgb_color): """ return a color which is complementary to the RGB_COLOR. """ col_hsv = np.squeeze(cv.cvtColor(rgb_color[None,None,:], cv.cv.CV_RGB2HSV)) col_hsv[0] = col_hsv[0] + 128 #uint8 mods to 255 col_comp = np.squeeze(cv.cvtColor(col_hsv[None,Non...
[ "def", "complement", "(", "self", ",", "rgb_color", ")", ":", "col_hsv", "=", "np", ".", "squeeze", "(", "cv", ".", "cvtColor", "(", "rgb_color", "[", "None", ",", "None", ",", ":", "]", ",", "cv", ".", "cv", ".", "CV_RGB2HSV", ")", ")", "col_hsv",...
https://github.com/JarveeLee/SynthText_Chinese_version/blob/4b2cbc7d14741f21d0bb17966a339ab3574b09a8/colorize3_poisson.py#L104-L111
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/multiprocessing/util.py
python
get_logger
()
return _logger
Returns logger used by multiprocessing
Returns logger used by multiprocessing
[ "Returns", "logger", "used", "by", "multiprocessing" ]
def get_logger(): ''' Returns logger used by multiprocessing ''' global _logger import logging, atexit logging._acquireLock() try: if not _logger: _logger = logging.getLogger(LOGGER_NAME) _logger.propagate = 0 logging.addLevelName(SUBDEBUG, 'SUBD...
[ "def", "get_logger", "(", ")", ":", "global", "_logger", "import", "logging", ",", "atexit", "logging", ".", "_acquireLock", "(", ")", "try", ":", "if", "not", "_logger", ":", "_logger", "=", "logging", ".", "getLogger", "(", "LOGGER_NAME", ")", "_logger",...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/multiprocessing/util.py#L83-L110
openthread/openthread
9fcdbed9c526c70f1556d1ed84099c1535c7cd32
tools/otci/otci/otci.py
python
OTCI.udp_bind
(self, ip: str, port: int, netif: NetifIdentifier = NetifIdentifier.THERAD)
Assigns a name (i.e. IPv6 address and port) to the example socket. :param ip: the IPv6 address or the unspecified IPv6 address (::). :param port: the UDP port
Assigns a name (i.e. IPv6 address and port) to the example socket.
[ "Assigns", "a", "name", "(", "i", ".", "e", ".", "IPv6", "address", "and", "port", ")", "to", "the", "example", "socket", "." ]
def udp_bind(self, ip: str, port: int, netif: NetifIdentifier = NetifIdentifier.THERAD): """Assigns a name (i.e. IPv6 address and port) to the example socket. :param ip: the IPv6 address or the unspecified IPv6 address (::). :param port: the UDP port """ bindarg = '' if ...
[ "def", "udp_bind", "(", "self", ",", "ip", ":", "str", ",", "port", ":", "int", ",", "netif", ":", "NetifIdentifier", "=", "NetifIdentifier", ".", "THERAD", ")", ":", "bindarg", "=", "''", "if", "netif", "==", "NetifIdentifier", ".", "UNSPECIFIED", ":", ...
https://github.com/openthread/openthread/blob/9fcdbed9c526c70f1556d1ed84099c1535c7cd32/tools/otci/otci/otci.py#L2184-L2196
google/syzygy
8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5
third_party/numpy/files/numpy/lib/function_base.py
python
_nanop
(op, fill, a, axis=None)
return res
General operation on arrays with not-a-number values. Parameters ---------- op : callable Operation to perform. fill : float NaN values are set to fill before doing the operation. a : array-like Input array. axis : {int, None}, optional Axis along which the opera...
General operation on arrays with not-a-number values.
[ "General", "operation", "on", "arrays", "with", "not", "-", "a", "-", "number", "values", "." ]
def _nanop(op, fill, a, axis=None): """ General operation on arrays with not-a-number values. Parameters ---------- op : callable Operation to perform. fill : float NaN values are set to fill before doing the operation. a : array-like Input array. axis : {int, No...
[ "def", "_nanop", "(", "op", ",", "fill", ",", "a", ",", "axis", "=", "None", ")", ":", "y", "=", "array", "(", "a", ",", "subok", "=", "True", ")", "# We only need to take care of NaN's in floating point arrays", "if", "np", ".", "issubdtype", "(", "y", ...
https://github.com/google/syzygy/blob/8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5/third_party/numpy/files/numpy/lib/function_base.py#L1337-L1380
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/distutils/text_file.py
python
TextFile.__init__
(self, filename=None, file=None, **options)
Construct a new TextFile object. At least one of 'filename' (a string) and 'file' (a file-like object) must be supplied. They keyword argument options are described above and affect the values returned by 'readline()'.
Construct a new TextFile object. At least one of 'filename' (a string) and 'file' (a file-like object) must be supplied. They keyword argument options are described above and affect the values returned by 'readline()'.
[ "Construct", "a", "new", "TextFile", "object", ".", "At", "least", "one", "of", "filename", "(", "a", "string", ")", "and", "file", "(", "a", "file", "-", "like", "object", ")", "must", "be", "supplied", ".", "They", "keyword", "argument", "options", "...
def __init__ (self, filename=None, file=None, **options): """Construct a new TextFile object. At least one of 'filename' (a string) and 'file' (a file-like object) must be supplied. They keyword argument options are described above and affect the values returned by 'readline()'...
[ "def", "__init__", "(", "self", ",", "filename", "=", "None", ",", "file", "=", "None", ",", "*", "*", "options", ")", ":", "if", "filename", "is", "None", "and", "file", "is", "None", ":", "raise", "RuntimeError", ",", "\"you must supply either or both of...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/distutils/text_file.py#L78-L112
ducha-aiki/LSUVinit
a42ecdc0d44c217a29b65e98748d80b90d5c6279
scripts/cpp_lint.py
python
_CppLintState.IncrementErrorCount
(self, category)
Bumps the module's error statistic.
Bumps the module's error statistic.
[ "Bumps", "the", "module", "s", "error", "statistic", "." ]
def IncrementErrorCount(self, category): """Bumps the module's error statistic.""" self.error_count += 1 if self.counting in ('toplevel', 'detailed'): if self.counting != 'detailed': category = category.split('/')[0] if category not in self.errors_by_category: self.errors_by_cate...
[ "def", "IncrementErrorCount", "(", "self", ",", "category", ")", ":", "self", ".", "error_count", "+=", "1", "if", "self", ".", "counting", "in", "(", "'toplevel'", ",", "'detailed'", ")", ":", "if", "self", ".", "counting", "!=", "'detailed'", ":", "cat...
https://github.com/ducha-aiki/LSUVinit/blob/a42ecdc0d44c217a29b65e98748d80b90d5c6279/scripts/cpp_lint.py#L747-L755
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/third_party/lib_x86_64/python2.7/dist-packages/numpy/oldnumeric/ma.py
python
masked_outside
(x, v1, v2, copy=1)
return array(d, mask = m, copy=copy)
x with mask of all values of x that are outside [v1,v2] v1 and v2 can be given in either order.
x with mask of all values of x that are outside [v1,v2] v1 and v2 can be given in either order.
[ "x", "with", "mask", "of", "all", "values", "of", "x", "that", "are", "outside", "[", "v1", "v2", "]", "v1", "and", "v2", "can", "be", "given", "in", "either", "order", "." ]
def masked_outside(x, v1, v2, copy=1): """x with mask of all values of x that are outside [v1,v2] v1 and v2 can be given in either order. """ if v2 < v1: t = v2 v2 = v1 v1 = t d = filled(x, 0) c = umath.logical_or(umath.less(d, v1), umath.greater(d, v2)) m = mask_o...
[ "def", "masked_outside", "(", "x", ",", "v1", ",", "v2", ",", "copy", "=", "1", ")", ":", "if", "v2", "<", "v1", ":", "t", "=", "v2", "v2", "=", "v1", "v1", "=", "t", "d", "=", "filled", "(", "x", ",", "0", ")", "c", "=", "umath", ".", ...
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/third_party/lib_x86_64/python2.7/dist-packages/numpy/oldnumeric/ma.py#L1824-L1835
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/numpy/py2/numpy/polynomial/polyutils.py
python
mapparms
(old, new)
return off, scl
Linear map parameters between domains. Return the parameters of the linear map ``offset + scale*x`` that maps `old` to `new` such that ``old[i] -> new[i]``, ``i = 0, 1``. Parameters ---------- old, new : array_like Domains. Each domain must (successfully) convert to a 1-d array con...
Linear map parameters between domains.
[ "Linear", "map", "parameters", "between", "domains", "." ]
def mapparms(old, new): """ Linear map parameters between domains. Return the parameters of the linear map ``offset + scale*x`` that maps `old` to `new` such that ``old[i] -> new[i]``, ``i = 0, 1``. Parameters ---------- old, new : array_like Domains. Each domain must (successfully...
[ "def", "mapparms", "(", "old", ",", "new", ")", ":", "oldlen", "=", "old", "[", "1", "]", "-", "old", "[", "0", "]", "newlen", "=", "new", "[", "1", "]", "-", "new", "[", "0", "]", "off", "=", "(", "old", "[", "1", "]", "*", "new", "[", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/numpy/py2/numpy/polynomial/polyutils.py#L300-L345
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/python/debug/cli/curses_ui.py
python
CursesUI._on_textbox_keypress
(self, x)
Text box key validator: Callback of key strokes. Handles a user's keypress in the input text box. Translates certain keys to terminator keys for the textbox to allow its edit() method to return. Also handles special key-triggered events such as PgUp/PgDown scrolling of the screen output. Args: ...
Text box key validator: Callback of key strokes.
[ "Text", "box", "key", "validator", ":", "Callback", "of", "key", "strokes", "." ]
def _on_textbox_keypress(self, x): """Text box key validator: Callback of key strokes. Handles a user's keypress in the input text box. Translates certain keys to terminator keys for the textbox to allow its edit() method to return. Also handles special key-triggered events such as PgUp/PgDown scrollin...
[ "def", "_on_textbox_keypress", "(", "self", ",", "x", ")", ":", "if", "not", "isinstance", "(", "x", ",", "int", ")", ":", "raise", "TypeError", "(", "\"Key validator expected type int, received type %s\"", "%", "type", "(", "x", ")", ")", "if", "x", "in", ...
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/python/debug/cli/curses_ui.py#L775-L878
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/Show/Containers.py
python
Container.hasObject
(self, obj)
return obj in self.getAllChildren()
Returns True if the container contains specified object directly.
Returns True if the container contains specified object directly.
[ "Returns", "True", "if", "the", "container", "contains", "specified", "object", "directly", "." ]
def hasObject(self, obj): """Returns True if the container contains specified object directly.""" return obj in self.getAllChildren()
[ "def", "hasObject", "(", "self", ",", "obj", ")", ":", "return", "obj", "in", "self", ".", "getAllChildren", "(", ")" ]
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Show/Containers.py#L148-L150
BlzFans/wke
b0fa21158312e40c5fbd84682d643022b6c34a93
cygwin/lib/python2.6/htmllib.py
python
HTMLParser.__init__
(self, formatter, verbose=0)
Creates an instance of the HTMLParser class. The formatter parameter is the formatter instance associated with the parser.
Creates an instance of the HTMLParser class.
[ "Creates", "an", "instance", "of", "the", "HTMLParser", "class", "." ]
def __init__(self, formatter, verbose=0): """Creates an instance of the HTMLParser class. The formatter parameter is the formatter instance associated with the parser. """ sgmllib.SGMLParser.__init__(self, verbose) self.formatter = formatter
[ "def", "__init__", "(", "self", ",", "formatter", ",", "verbose", "=", "0", ")", ":", "sgmllib", ".", "SGMLParser", ".", "__init__", "(", "self", ",", "verbose", ")", "self", ".", "formatter", "=", "formatter" ]
https://github.com/BlzFans/wke/blob/b0fa21158312e40c5fbd84682d643022b6c34a93/cygwin/lib/python2.6/htmllib.py#L34-L42
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_controls.py
python
ListCtrl.SetImageList
(*args, **kwargs)
return _controls_.ListCtrl_SetImageList(*args, **kwargs)
SetImageList(self, ImageList imageList, int which)
SetImageList(self, ImageList imageList, int which)
[ "SetImageList", "(", "self", "ImageList", "imageList", "int", "which", ")" ]
def SetImageList(*args, **kwargs): """SetImageList(self, ImageList imageList, int which)""" return _controls_.ListCtrl_SetImageList(*args, **kwargs)
[ "def", "SetImageList", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_controls_", ".", "ListCtrl_SetImageList", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_controls.py#L4613-L4615
google/llvm-propeller
45c226984fe8377ebfb2ad7713c680d652ba678d
lldb/third_party/Python/module/pexpect-4.6/pexpect/expect.py
python
searcher_re.search
(self, buffer, freshlen, searchwindowsize=None)
return best_index
This searches 'buffer' for the first occurrence of one of the regular expressions. 'freshlen' must indicate the number of bytes at the end of 'buffer' which have not been searched before. See class spawn for the 'searchwindowsize' argument. If there is a match this returns the index of...
This searches 'buffer' for the first occurrence of one of the regular expressions. 'freshlen' must indicate the number of bytes at the end of 'buffer' which have not been searched before.
[ "This", "searches", "buffer", "for", "the", "first", "occurrence", "of", "one", "of", "the", "regular", "expressions", ".", "freshlen", "must", "indicate", "the", "number", "of", "bytes", "at", "the", "end", "of", "buffer", "which", "have", "not", "been", ...
def search(self, buffer, freshlen, searchwindowsize=None): '''This searches 'buffer' for the first occurrence of one of the regular expressions. 'freshlen' must indicate the number of bytes at the end of 'buffer' which have not been searched before. See class spawn for the 'searchwindow...
[ "def", "search", "(", "self", ",", "buffer", ",", "freshlen", ",", "searchwindowsize", "=", "None", ")", ":", "first_match", "=", "None", "# 'freshlen' doesn't help here -- we cannot predict the", "# length of a match, and the re module provides no help.", "if", "searchwindow...
https://github.com/google/llvm-propeller/blob/45c226984fe8377ebfb2ad7713c680d652ba678d/lldb/third_party/Python/module/pexpect-4.6/pexpect/expect.py#L275-L306
CRYTEK/CRYENGINE
232227c59a220cbbd311576f0fbeba7bb53b2a8c
Editor/Python/windows/Lib/site-packages/setuptools/command/egg_info.py
python
FileList._repair
(self)
Replace self.files with only safe paths Because some owners of FileList manipulate the underlying ``files`` attribute directly, this method must be called to repair those paths.
Replace self.files with only safe paths
[ "Replace", "self", ".", "files", "with", "only", "safe", "paths" ]
def _repair(self): """ Replace self.files with only safe paths Because some owners of FileList manipulate the underlying ``files`` attribute directly, this method must be called to repair those paths. """ self.files = list(filter(self._safe_path, self.files))
[ "def", "_repair", "(", "self", ")", ":", "self", ".", "files", "=", "list", "(", "filter", "(", "self", ".", "_safe_path", ",", "self", ".", "files", ")", ")" ]
https://github.com/CRYTEK/CRYENGINE/blob/232227c59a220cbbd311576f0fbeba7bb53b2a8c/Editor/Python/windows/Lib/site-packages/setuptools/command/egg_info.py#L484-L492
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/ftplib.py
python
FTP.quit
(self)
return resp
Quit, and close the connection.
Quit, and close the connection.
[ "Quit", "and", "close", "the", "connection", "." ]
def quit(self): '''Quit, and close the connection.''' resp = self.voidcmd('QUIT') self.close() return resp
[ "def", "quit", "(", "self", ")", ":", "resp", "=", "self", ".", "voidcmd", "(", "'QUIT'", ")", "self", ".", "close", "(", ")", "return", "resp" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/ftplib.py#L663-L667
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/setuptools/py2/pkg_resources/__init__.py
python
run_script
(dist_spec, script_name)
Locate distribution `dist_spec` and run its `script_name` script
Locate distribution `dist_spec` and run its `script_name` script
[ "Locate", "distribution", "dist_spec", "and", "run", "its", "script_name", "script" ]
def run_script(dist_spec, script_name): """Locate distribution `dist_spec` and run its `script_name` script""" ns = sys._getframe(1).f_globals name = ns['__name__'] ns.clear() ns['__name__'] = name require(dist_spec)[0].run_script(script_name, ns)
[ "def", "run_script", "(", "dist_spec", ",", "script_name", ")", ":", "ns", "=", "sys", ".", "_getframe", "(", "1", ")", ".", "f_globals", "name", "=", "ns", "[", "'__name__'", "]", "ns", ".", "clear", "(", ")", "ns", "[", "'__name__'", "]", "=", "n...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/setuptools/py2/pkg_resources/__init__.py#L463-L469
deepmind/open_spiel
4ca53bea32bb2875c7385d215424048ae92f78c8
open_spiel/python/pytorch/rcfr.py
python
RootStateWrapper.counterfactual_regrets_and_reach_weights
(self, regret_player, reach_weight_player, *sequence_weights)
return regrets, reach_weights
Returns counterfactual regrets and reach weights as a tuple. Args: regret_player: The player for whom counterfactual regrets are computed. reach_weight_player: The player for whom reach weights are computed. *sequence_weights: A list of non-negative sequence weights for each player determ...
Returns counterfactual regrets and reach weights as a tuple.
[ "Returns", "counterfactual", "regrets", "and", "reach", "weights", "as", "a", "tuple", "." ]
def counterfactual_regrets_and_reach_weights(self, regret_player, reach_weight_player, *sequence_weights): """Returns counterfactual regrets and reach weights as a tuple. Args: regret_player: The player for whom...
[ "def", "counterfactual_regrets_and_reach_weights", "(", "self", ",", "regret_player", ",", "reach_weight_player", ",", "*", "sequence_weights", ")", ":", "num_players", "=", "len", "(", "sequence_weights", ")", "regrets", "=", "np", ".", "zeros", "(", "self", ".",...
https://github.com/deepmind/open_spiel/blob/4ca53bea32bb2875c7385d215424048ae92f78c8/open_spiel/python/pytorch/rcfr.py#L263-L381
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/learn/python/learn/learn_runner.py
python
tune
(experiment_fn, tuner)
Tune an experiment with hyper-parameters. It iterates trials by running the Experiment for each trial with the corresponding hyper-parameters. For each trial, it retrieves the hyper-parameters from `tuner`, creates an Experiment by calling experiment_fn, and then reports the measure back to `tuner`. Example...
Tune an experiment with hyper-parameters.
[ "Tune", "an", "experiment", "with", "hyper", "-", "parameters", "." ]
def tune(experiment_fn, tuner): """Tune an experiment with hyper-parameters. It iterates trials by running the Experiment for each trial with the corresponding hyper-parameters. For each trial, it retrieves the hyper-parameters from `tuner`, creates an Experiment by calling experiment_fn, and then reports th...
[ "def", "tune", "(", "experiment_fn", ",", "tuner", ")", ":", "while", "tuner", ".", "next_trial", "(", ")", ":", "tuner", ".", "run_experiment", "(", "_wrapped_experiment_fn_with_uid_check", "(", "experiment_fn", ",", "require_hparams", "=", "True", ")", ")" ]
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/learn/python/learn/learn_runner.py#L229-L262
kushview/Element
1cc16380caa2ab79461246ba758b9de1f46db2a5
waflib/TaskGen.py
python
task_gen.get_hook
(self, node)
Returns the ``@extension`` method to call for a Node of a particular extension. :param node: Input file to process :type node: :py:class:`waflib.Tools.Node.Node` :return: A method able to process the input node by looking at the extension :rtype: function
Returns the ``@extension`` method to call for a Node of a particular extension.
[ "Returns", "the", "@extension", "method", "to", "call", "for", "a", "Node", "of", "a", "particular", "extension", "." ]
def get_hook(self, node): """ Returns the ``@extension`` method to call for a Node of a particular extension. :param node: Input file to process :type node: :py:class:`waflib.Tools.Node.Node` :return: A method able to process the input node by looking at the extension :rtype: function """ name = node.n...
[ "def", "get_hook", "(", "self", ",", "node", ")", ":", "name", "=", "node", ".", "name", "for", "k", "in", "self", ".", "mappings", ":", "try", ":", "if", "name", ".", "endswith", "(", "k", ")", ":", "return", "self", ".", "mappings", "[", "k", ...
https://github.com/kushview/Element/blob/1cc16380caa2ab79461246ba758b9de1f46db2a5/waflib/TaskGen.py#L244-L263
zerollzeng/tiny-tensorrt
e7bdb8f82934342a0f22ce68dfefdb8e15eb72b2
third_party/pybind11/tools/clang/cindex.py
python
Cursor.spelling
(self)
return self._spelling
Return the spelling of the entity pointed at by the cursor.
Return the spelling of the entity pointed at by the cursor.
[ "Return", "the", "spelling", "of", "the", "entity", "pointed", "at", "by", "the", "cursor", "." ]
def spelling(self): """Return the spelling of the entity pointed at by the cursor.""" if not hasattr(self, '_spelling'): self._spelling = conf.lib.clang_getCursorSpelling(self) return self._spelling
[ "def", "spelling", "(", "self", ")", ":", "if", "not", "hasattr", "(", "self", ",", "'_spelling'", ")", ":", "self", ".", "_spelling", "=", "conf", ".", "lib", ".", "clang_getCursorSpelling", "(", "self", ")", "return", "self", ".", "_spelling" ]
https://github.com/zerollzeng/tiny-tensorrt/blob/e7bdb8f82934342a0f22ce68dfefdb8e15eb72b2/third_party/pybind11/tools/clang/cindex.py#L1398-L1403
mongodb/mongo
d8ff665343ad29cf286ee2cf4a1960d29371937b
buildscripts/gdb/mongo_printers.py
python
DecorablePrinter.children
(self)
Children.
Children.
[ "Children", "." ]
def children(self): """Children.""" decoration_data = get_unique_ptr(self.val["_decorations"]["_decorationData"]) for index in range(self.count): descriptor = self.start[index] dindex = int(descriptor["descriptor"]["_index"]) # In order to get the type store...
[ "def", "children", "(", "self", ")", ":", "decoration_data", "=", "get_unique_ptr", "(", "self", ".", "val", "[", "\"_decorations\"", "]", "[", "\"_decorationData\"", "]", ")", "for", "index", "in", "range", "(", "self", ".", "count", ")", ":", "descriptor...
https://github.com/mongodb/mongo/blob/d8ff665343ad29cf286ee2cf4a1960d29371937b/buildscripts/gdb/mongo_printers.py#L297-L323
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/prefdlg.py
python
NetConfigPage._DoLayout
(self)
Layout the controls in the panel
Layout the controls in the panel
[ "Layout", "the", "controls", "in", "the", "panel" ]
def _DoLayout(self): """Layout the controls in the panel""" msizer = wx.BoxSizer(wx.VERTICAL) sboxsz = wx.StaticBoxSizer(wx.StaticBox(self, label=_("Proxy Settings")), wx.VERTICAL) flexg = wx.FlexGridSizer(4, 2, 10, 5) flexg.AddGrowableCol(1, 1...
[ "def", "_DoLayout", "(", "self", ")", ":", "msizer", "=", "wx", ".", "BoxSizer", "(", "wx", ".", "VERTICAL", ")", "sboxsz", "=", "wx", ".", "StaticBoxSizer", "(", "wx", ".", "StaticBox", "(", "self", ",", "label", "=", "_", "(", "\"Proxy Settings\"", ...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/prefdlg.py#L1418-L1474
okex/V3-Open-API-SDK
c5abb0db7e2287718e0055e17e57672ce0ec7fd9
okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_vendor/webencodings/__init__.py
python
ascii_lower
(string)
return string.encode('utf8').lower().decode('utf8')
r"""Transform (only) ASCII letters to lower case: A-Z is mapped to a-z. :param string: An Unicode string. :returns: A new Unicode string. This is used for `ASCII case-insensitive <http://encoding.spec.whatwg.org/#ascii-case-insensitive>`_ matching of encoding labels. The same matching is also ...
r"""Transform (only) ASCII letters to lower case: A-Z is mapped to a-z.
[ "r", "Transform", "(", "only", ")", "ASCII", "letters", "to", "lower", "case", ":", "A", "-", "Z", "is", "mapped", "to", "a", "-", "z", "." ]
def ascii_lower(string): r"""Transform (only) ASCII letters to lower case: A-Z is mapped to a-z. :param string: An Unicode string. :returns: A new Unicode string. This is used for `ASCII case-insensitive <http://encoding.spec.whatwg.org/#ascii-case-insensitive>`_ matching of encoding labels. ...
[ "def", "ascii_lower", "(", "string", ")", ":", "# This turns out to be faster than unicode.translate()", "return", "string", ".", "encode", "(", "'utf8'", ")", ".", "lower", "(", ")", ".", "decode", "(", "'utf8'", ")" ]
https://github.com/okex/V3-Open-API-SDK/blob/c5abb0db7e2287718e0055e17e57672ce0ec7fd9/okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_vendor/webencodings/__init__.py#L35-L58
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/html5lib-python/html5lib/inputstream.py
python
HTMLBinaryInputStream.detectEncodingMeta
(self)
return encoding
Report the encoding declared by the meta element
Report the encoding declared by the meta element
[ "Report", "the", "encoding", "declared", "by", "the", "meta", "element" ]
def detectEncodingMeta(self): """Report the encoding declared by the meta element """ buffer = self.rawStream.read(self.numBytesMeta) assert isinstance(buffer, bytes) parser = EncodingParser(buffer) self.rawStream.seek(0) encoding = parser.getEncoding() i...
[ "def", "detectEncodingMeta", "(", "self", ")", ":", "buffer", "=", "self", ".", "rawStream", ".", "read", "(", "self", ".", "numBytesMeta", ")", "assert", "isinstance", "(", "buffer", ",", "bytes", ")", "parser", "=", "EncodingParser", "(", "buffer", ")", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/html5lib-python/html5lib/inputstream.py#L553-L565
deepmind/open_spiel
4ca53bea32bb2875c7385d215424048ae92f78c8
open_spiel/python/algorithms/adidas_utils/solvers/symmetric/qre.py
python
Solver.record_aux_errors
(self, grads)
Record errors for the auxiliary variables.
Record errors for the auxiliary variables.
[ "Record", "errors", "for", "the", "auxiliary", "variables", "." ]
def record_aux_errors(self, grads): """Record errors for the auxiliary variables.""" grad_y = grads[1] self.aux_errors.append([np.linalg.norm(grad_y)])
[ "def", "record_aux_errors", "(", "self", ",", "grads", ")", ":", "grad_y", "=", "grads", "[", "1", "]", "self", ".", "aux_errors", ".", "append", "(", "[", "np", ".", "linalg", ".", "norm", "(", "grad_y", ")", "]", ")" ]
https://github.com/deepmind/open_spiel/blob/4ca53bea32bb2875c7385d215424048ae92f78c8/open_spiel/python/algorithms/adidas_utils/solvers/symmetric/qre.py#L70-L73
TimoSaemann/caffe-segnet-cudnn5
abcf30dca449245e101bf4ced519f716177f0885
scripts/cpp_lint.py
python
_NestingState.CheckCompletedBlocks
(self, filename, error)
Checks that all classes and namespaces have been completely parsed. Call this when all lines in a file have been processed. Args: filename: The name of the current file. error: The function to call with any errors found.
Checks that all classes and namespaces have been completely parsed.
[ "Checks", "that", "all", "classes", "and", "namespaces", "have", "been", "completely", "parsed", "." ]
def CheckCompletedBlocks(self, filename, error): """Checks that all classes and namespaces have been completely parsed. Call this when all lines in a file have been processed. Args: filename: The name of the current file. error: The function to call with any errors found. """ # Note: Th...
[ "def", "CheckCompletedBlocks", "(", "self", ",", "filename", ",", "error", ")", ":", "# Note: This test can result in false positives if #ifdef constructs", "# get in the way of brace matching. See the testBuildClass test in", "# cpplint_unittest.py for an example of this.", "for", "obj"...
https://github.com/TimoSaemann/caffe-segnet-cudnn5/blob/abcf30dca449245e101bf4ced519f716177f0885/scripts/cpp_lint.py#L2172-L2191
mapsme/omim
1892903b63f2c85b16ed4966d21fe76aba06b9ba
tools/python/maps_generator/generator/generation.py
python
Generation.reset_to_stage
(self, stage_name: AnyStr)
Resets generation state to stage_name. Status files are overwritten new statuses according stage_name. It supposes that stages have next representation: stage1, ..., stage_mwm[country_stage_1, ..., country_stage_M], ..., stageN
Resets generation state to stage_name. Status files are overwritten new statuses according stage_name. It supposes that stages have next representation: stage1, ..., stage_mwm[country_stage_1, ..., country_stage_M], ..., stageN
[ "Resets", "generation", "state", "to", "stage_name", ".", "Status", "files", "are", "overwritten", "new", "statuses", "according", "stage_name", ".", "It", "supposes", "that", "stages", "have", "next", "representation", ":", "stage1", "...", "stage_mwm", "[", "c...
def reset_to_stage(self, stage_name: AnyStr): """ Resets generation state to stage_name. Status files are overwritten new statuses according stage_name. It supposes that stages have next representation: stage1, ..., stage_mwm[country_stage_1, ..., country_stage_M], ..., stageN ...
[ "def", "reset_to_stage", "(", "self", ",", "stage_name", ":", "AnyStr", ")", ":", "high_level_stages", "=", "[", "get_stage_name", "(", "s", ")", "for", "s", "in", "self", ".", "runnable_stages", "]", "if", "not", "(", "stage_name", "in", "high_level_stages"...
https://github.com/mapsme/omim/blob/1892903b63f2c85b16ed4966d21fe76aba06b9ba/tools/python/maps_generator/generator/generation.py#L87-L151
apache/trafodion
8455c839ad6b6d7b6e04edda5715053095b78046
core/sqf/src/seatrans/hbase-trx/src/main/python/thrift1/gen-py/hbase/Hbase.py
python
Iface.getRowsWithColumnsTs
(self, tableName, rows, columns, timestamp, attributes)
Get the specified columns for the specified table and rows at the specified timestamp. Returns an empty list if no rows exist. @return TRowResult containing the rows and map of columns to TCells Parameters: - tableName: name of table - rows: row keys - columns: List of columns to return, nu...
Get the specified columns for the specified table and rows at the specified timestamp. Returns an empty list if no rows exist.
[ "Get", "the", "specified", "columns", "for", "the", "specified", "table", "and", "rows", "at", "the", "specified", "timestamp", ".", "Returns", "an", "empty", "list", "if", "no", "rows", "exist", "." ]
def getRowsWithColumnsTs(self, tableName, rows, columns, timestamp, attributes): """ Get the specified columns for the specified table and rows at the specified timestamp. Returns an empty list if no rows exist. @return TRowResult containing the rows and map of columns to TCells Parameters: -...
[ "def", "getRowsWithColumnsTs", "(", "self", ",", "tableName", ",", "rows", ",", "columns", ",", "timestamp", ",", "attributes", ")", ":", "pass" ]
https://github.com/apache/trafodion/blob/8455c839ad6b6d7b6e04edda5715053095b78046/core/sqf/src/seatrans/hbase-trx/src/main/python/thrift1/gen-py/hbase/Hbase.py#L275-L289
OpenMined/PyDP
a88ee73053aa2bdc1be327a77109dd5907ab41d6
src/pydp/ml/mechanisms/base.py
python
DPMachine.copy
(self)
return copy(self)
Produces a copy of the class. Returns ------- self : class Returns the copy.
Produces a copy of the class. Returns ------- self : class Returns the copy.
[ "Produces", "a", "copy", "of", "the", "class", ".", "Returns", "-------", "self", ":", "class", "Returns", "the", "copy", "." ]
def copy(self): """Produces a copy of the class. Returns ------- self : class Returns the copy. """ return copy(self)
[ "def", "copy", "(", "self", ")", ":", "return", "copy", "(", "self", ")" ]
https://github.com/OpenMined/PyDP/blob/a88ee73053aa2bdc1be327a77109dd5907ab41d6/src/pydp/ml/mechanisms/base.py#L46-L53
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/email/quoprimime.py
python
body_length
(bytearray)
return sum(len(_QUOPRI_BODY_MAP[octet]) for octet in bytearray)
Return a body quoted-printable encoding length. :param bytearray: An array of bytes (a.k.a. octets). :return: The length in bytes of the byte array when it is encoded with quoted-printable for bodies.
Return a body quoted-printable encoding length.
[ "Return", "a", "body", "quoted", "-", "printable", "encoding", "length", "." ]
def body_length(bytearray): """Return a body quoted-printable encoding length. :param bytearray: An array of bytes (a.k.a. octets). :return: The length in bytes of the byte array when it is encoded with quoted-printable for bodies. """ return sum(len(_QUOPRI_BODY_MAP[octet]) for octet in by...
[ "def", "body_length", "(", "bytearray", ")", ":", "return", "sum", "(", "len", "(", "_QUOPRI_BODY_MAP", "[", "octet", "]", ")", "for", "octet", "in", "bytearray", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/email/quoprimime.py#L97-L104
cztomczak/cefpython
5679f28cec18a57a56e298da2927aac8d8f83ad6
examples/pysdl2.py
python
die
(msg)
Helper function to exit application on failed imports etc.
Helper function to exit application on failed imports etc.
[ "Helper", "function", "to", "exit", "application", "on", "failed", "imports", "etc", "." ]
def die(msg): """ Helper function to exit application on failed imports etc. """ sys.stderr.write("%s\n" % msg) sys.exit(1)
[ "def", "die", "(", "msg", ")", ":", "sys", ".", "stderr", ".", "write", "(", "\"%s\\n\"", "%", "msg", ")", "sys", ".", "exit", "(", "1", ")" ]
https://github.com/cztomczak/cefpython/blob/5679f28cec18a57a56e298da2927aac8d8f83ad6/examples/pysdl2.py#L58-L63
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scikit-learn/py2/sklearn/neighbors/kde.py
python
KernelDensity.score
(self, X, y=None)
return np.sum(self.score_samples(X))
Compute the total log probability under the model. Parameters ---------- X : array_like, shape (n_samples, n_features) List of n_features-dimensional data points. Each row corresponds to a single data point. Returns ------- logprob : float ...
Compute the total log probability under the model.
[ "Compute", "the", "total", "log", "probability", "under", "the", "model", "." ]
def score(self, X, y=None): """Compute the total log probability under the model. Parameters ---------- X : array_like, shape (n_samples, n_features) List of n_features-dimensional data points. Each row corresponds to a single data point. Returns ...
[ "def", "score", "(", "self", ",", "X", ",", "y", "=", "None", ")", ":", "return", "np", ".", "sum", "(", "self", ".", "score_samples", "(", "X", ")", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scikit-learn/py2/sklearn/neighbors/kde.py#L161-L175
Tokutek/mongo
0653eabe2c5b9d12b4814617cb7fb2d799937a0f
src/third_party/v8/tools/stats-viewer.py
python
CounterCollection.Counter
(self, index)
return Counter(self.data, 16 + index * self.CounterSize())
Return the index'th counter.
Return the index'th counter.
[ "Return", "the", "index", "th", "counter", "." ]
def Counter(self, index): """Return the index'th counter.""" return Counter(self.data, 16 + index * self.CounterSize())
[ "def", "Counter", "(", "self", ",", "index", ")", ":", "return", "Counter", "(", "self", ".", "data", ",", "16", "+", "index", "*", "self", ".", "CounterSize", "(", ")", ")" ]
https://github.com/Tokutek/mongo/blob/0653eabe2c5b9d12b4814617cb7fb2d799937a0f/src/third_party/v8/tools/stats-viewer.py#L374-L376
ricardoquesada/Spidermonkey
4a75ea2543408bd1b2c515aa95901523eeef7858
toolkit/crashreporter/tools/symbolstore.py
python
VCSFileInfo.GetRoot
(self)
This method should return the unmodified root for the file or 'None' on failure.
This method should return the unmodified root for the file or 'None' on failure.
[ "This", "method", "should", "return", "the", "unmodified", "root", "for", "the", "file", "or", "None", "on", "failure", "." ]
def GetRoot(self): """ This method should return the unmodified root for the file or 'None' on failure. """ raise NotImplementedError
[ "def", "GetRoot", "(", "self", ")", ":", "raise", "NotImplementedError" ]
https://github.com/ricardoquesada/Spidermonkey/blob/4a75ea2543408bd1b2c515aa95901523eeef7858/toolkit/crashreporter/tools/symbolstore.py#L96-L99
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py2/scipy/integrate/quadpack.py
python
nquad
(func, ranges, args=None, opts=None, full_output=False)
return _NQuad(func, ranges, opts, full_output).integrate(*args)
Integration over multiple variables. Wraps `quad` to enable integration over multiple variables. Various options allow improved integration of discontinuous functions, as well as the use of weighted integration, and generally finer control of the integration process. Parameters ---------- ...
Integration over multiple variables.
[ "Integration", "over", "multiple", "variables", "." ]
def nquad(func, ranges, args=None, opts=None, full_output=False): """ Integration over multiple variables. Wraps `quad` to enable integration over multiple variables. Various options allow improved integration of discontinuous functions, as well as the use of weighted integration, and generally fin...
[ "def", "nquad", "(", "func", ",", "ranges", ",", "args", "=", "None", ",", "opts", "=", "None", ",", "full_output", "=", "False", ")", ":", "depth", "=", "len", "(", "ranges", ")", "ranges", "=", "[", "rng", "if", "callable", "(", "rng", ")", "el...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py2/scipy/integrate/quadpack.py#L673-L805
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/seq2seq/python/ops/attention_wrapper.py
python
AttentionWrapper.state_size
(self)
return AttentionWrapperState( cell_state=self._cell.state_size, time=tensor_shape.TensorShape([]), attention=self._attention_layer_size, alignments=self._item_or_tuple( a.alignments_size for a in self._attention_mechanisms), attention_state=self._item_or_tuple( ...
The `state_size` property of `AttentionWrapper`. Returns: An `AttentionWrapperState` tuple containing shapes used by this object.
The `state_size` property of `AttentionWrapper`.
[ "The", "state_size", "property", "of", "AttentionWrapper", "." ]
def state_size(self): """The `state_size` property of `AttentionWrapper`. Returns: An `AttentionWrapperState` tuple containing shapes used by this object. """ return AttentionWrapperState( cell_state=self._cell.state_size, time=tensor_shape.TensorShape([]), attention=self....
[ "def", "state_size", "(", "self", ")", ":", "return", "AttentionWrapperState", "(", "cell_state", "=", "self", ".", "_cell", ".", "state_size", ",", "time", "=", "tensor_shape", ".", "TensorShape", "(", "[", "]", ")", ",", "attention", "=", "self", ".", ...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/seq2seq/python/ops/attention_wrapper.py#L2371-L2387
thalium/icebox
99d147d5b9269222225443ce171b4fd46d8985d4
third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2.py
python
validateName
(value, space)
return ret
Check that a value conforms to the lexical space of Name
Check that a value conforms to the lexical space of Name
[ "Check", "that", "a", "value", "conforms", "to", "the", "lexical", "space", "of", "Name" ]
def validateName(value, space): """Check that a value conforms to the lexical space of Name """ ret = libxml2mod.xmlValidateName(value, space) return ret
[ "def", "validateName", "(", "value", ",", "space", ")", ":", "ret", "=", "libxml2mod", ".", "xmlValidateName", "(", "value", ",", "space", ")", "return", "ret" ]
https://github.com/thalium/icebox/blob/99d147d5b9269222225443ce171b4fd46d8985d4/third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2.py#L1726-L1729
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/prompt-toolkit/py3/prompt_toolkit/buffer.py
python
CompletionState.go_to_index
(self, index: Optional[int])
Create a new :class:`.CompletionState` object with the new index. When `index` is `None` deselect the completion.
Create a new :class:`.CompletionState` object with the new index.
[ "Create", "a", "new", ":", "class", ":", ".", "CompletionState", "object", "with", "the", "new", "index", "." ]
def go_to_index(self, index: Optional[int]) -> None: """ Create a new :class:`.CompletionState` object with the new index. When `index` is `None` deselect the completion. """ if self.completions: assert index is None or 0 <= index < len(self.completions) ...
[ "def", "go_to_index", "(", "self", ",", "index", ":", "Optional", "[", "int", "]", ")", "->", "None", ":", "if", "self", ".", "completions", ":", "assert", "index", "is", "None", "or", "0", "<=", "index", "<", "len", "(", "self", ".", "completions", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/prompt-toolkit/py3/prompt_toolkit/buffer.py#L105-L113
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/http/cookiejar.py
python
domain_match
(A, B)
return True
Return True if domain A domain-matches domain B, according to RFC 2965. A and B may be host domain names or IP addresses. RFC 2965, section 1: Host names can be specified either as an IP address or a HDN string. Sometimes we compare one host name with another. (Such comparisons SHALL be case-ins...
Return True if domain A domain-matches domain B, according to RFC 2965.
[ "Return", "True", "if", "domain", "A", "domain", "-", "matches", "domain", "B", "according", "to", "RFC", "2965", "." ]
def domain_match(A, B): """Return True if domain A domain-matches domain B, according to RFC 2965. A and B may be host domain names or IP addresses. RFC 2965, section 1: Host names can be specified either as an IP address or a HDN string. Sometimes we compare one host name with another. (Such co...
[ "def", "domain_match", "(", "A", ",", "B", ")", ":", "# Note that, if A or B are IP addresses, the only relevant part of the", "# definition of the domain-match algorithm is the direct string-compare.", "A", "=", "A", ".", "lower", "(", ")", "B", "=", "B", ".", "lower", "...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/http/cookiejar.py#L542-L579
PaddlePaddle/Paddle
1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c
python/paddle/fluid/layers/rnn.py
python
BeamSearchDecoder.__init__
(self, cell, start_token, end_token, beam_size, embedding_fn=None, output_fn=None)
Constructor of BeamSearchDecoder. Parameters: cell(RNNCellBase): An instance of `RNNCellBase` or object with the same interface. start_token(int): The start token id. end_token(int): The end token id. beam_size(int): The beam width used in beam search. ...
Constructor of BeamSearchDecoder.
[ "Constructor", "of", "BeamSearchDecoder", "." ]
def __init__(self, cell, start_token, end_token, beam_size, embedding_fn=None, output_fn=None): """ Constructor of BeamSearchDecoder. Parameters: cell(RNNCellBase): An instance of `...
[ "def", "__init__", "(", "self", ",", "cell", ",", "start_token", ",", "end_token", ",", "beam_size", ",", "embedding_fn", "=", "None", ",", "output_fn", "=", "None", ")", ":", "self", ".", "cell", "=", "cell", "self", ".", "embedding_fn", "=", "embedding...
https://github.com/PaddlePaddle/Paddle/blob/1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c/python/paddle/fluid/layers/rnn.py#L907-L935
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/python_gflags/gflags2man.py
python
ProgramInfo.__init__
(self, executable)
Create object with executable. Args: executable Program to execute (string)
Create object with executable. Args: executable Program to execute (string)
[ "Create", "object", "with", "executable", ".", "Args", ":", "executable", "Program", "to", "execute", "(", "string", ")" ]
def __init__(self, executable): """Create object with executable. Args: executable Program to execute (string) """ self.long_name = executable self.name = os.path.basename(executable) # name # Get name without extension (PAR files) (self.short_name, self.ext) = os.path.splitext(self....
[ "def", "__init__", "(", "self", ",", "executable", ")", ":", "self", ".", "long_name", "=", "executable", "self", ".", "name", "=", "os", ".", "path", ".", "basename", "(", "executable", ")", "# name", "# Get name without extension (PAR files)", "(", "self", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/python_gflags/gflags2man.py#L169-L183
forkineye/ESPixelStick
22926f1c0d1131f1369fc7cad405689a095ae3cb
dist/bin/pyserial/serial/urlhandler/protocol_loop.py
python
Serial._update_dtr_state
(self)
Set terminal status line: Data Terminal Ready
Set terminal status line: Data Terminal Ready
[ "Set", "terminal", "status", "line", ":", "Data", "Terminal", "Ready" ]
def _update_dtr_state(self): """Set terminal status line: Data Terminal Ready""" if self.logger: self.logger.info('_update_dtr_state({!r}) -> state of DSR'.format(self._dtr_state))
[ "def", "_update_dtr_state", "(", "self", ")", ":", "if", "self", ".", "logger", ":", "self", ".", "logger", ".", "info", "(", "'_update_dtr_state({!r}) -> state of DSR'", ".", "format", "(", "self", ".", "_dtr_state", ")", ")" ]
https://github.com/forkineye/ESPixelStick/blob/22926f1c0d1131f1369fc7cad405689a095ae3cb/dist/bin/pyserial/serial/urlhandler/protocol_loop.py#L241-L244
snap-stanford/snap-python
d53c51b0a26aa7e3e7400b014cdf728948fde80a
setup/snap.py
python
TNGraph.AddNode
(self, *args)
return _snap.TNGraph_AddNode(self, *args)
AddNode(TNGraph self, int NId=-1) -> int Parameters: NId: int AddNode(TNGraph self) -> int AddNode(TNGraph self, TNGraph::TNodeI const & NodeId) -> int Parameters: NodeId: TNGraph::TNodeI const & AddNode(TNGraph self, int const & NId, TIntV InNIdV, TIn...
AddNode(TNGraph self, int NId=-1) -> int
[ "AddNode", "(", "TNGraph", "self", "int", "NId", "=", "-", "1", ")", "-", ">", "int" ]
def AddNode(self, *args): """ AddNode(TNGraph self, int NId=-1) -> int Parameters: NId: int AddNode(TNGraph self) -> int AddNode(TNGraph self, TNGraph::TNodeI const & NodeId) -> int Parameters: NodeId: TNGraph::TNodeI const & AddNode(TN...
[ "def", "AddNode", "(", "self", ",", "*", "args", ")", ":", "return", "_snap", ".", "TNGraph_AddNode", "(", "self", ",", "*", "args", ")" ]
https://github.com/snap-stanford/snap-python/blob/d53c51b0a26aa7e3e7400b014cdf728948fde80a/setup/snap.py#L3928-L3957
PaddlePaddle/Paddle
1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c
python/paddle/fluid/layers/detection.py
python
detection_map
(detect_res, label, class_num, background_label=0, overlap_threshold=0.3, evaluate_difficult=True, has_state=None, input_states=None, out_states=None, ap_vers...
return map_out
${comment} Args: detect_res: ${detect_res_comment} label: ${label_comment} class_num: ${class_num_comment} background_label: ${background_label_comment} overlap_threshold: ${overlap_threshold_comment} evaluate_difficult: ${evaluate_difficult_comment} has_sta...
${comment}
[ "$", "{", "comment", "}" ]
def detection_map(detect_res, label, class_num, background_label=0, overlap_threshold=0.3, evaluate_difficult=True, has_state=None, input_states=None, out_states=None, ...
[ "def", "detection_map", "(", "detect_res", ",", "label", ",", "class_num", ",", "background_label", "=", "0", ",", "overlap_threshold", "=", "0.3", ",", "evaluate_difficult", "=", "True", ",", "has_state", "=", "None", ",", "input_states", "=", "None", ",", ...
https://github.com/PaddlePaddle/Paddle/blob/1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c/python/paddle/fluid/layers/detection.py#L1231-L1321
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/_pyio.py
python
open
(file, mode="r", buffering=-1, encoding=None, errors=None, newline=None, closefd=True)
return text
r"""Open file and return a stream. Raise IOError upon failure. file is either a text or byte string giving the name (and the path if the file isn't in the current working directory) of the file to be opened or an integer file descriptor of the file to be wrapped. (If a file descriptor is given, it is ...
r"""Open file and return a stream. Raise IOError upon failure.
[ "r", "Open", "file", "and", "return", "a", "stream", ".", "Raise", "IOError", "upon", "failure", "." ]
def open(file, mode="r", buffering=-1, encoding=None, errors=None, newline=None, closefd=True): r"""Open file and return a stream. Raise IOError upon failure. file is either a text or byte string giving the name (and the path if the file isn't in the current working directory) of the fi...
[ "def", "open", "(", "file", ",", "mode", "=", "\"r\"", ",", "buffering", "=", "-", "1", ",", "encoding", "=", "None", ",", "errors", "=", "None", ",", "newline", "=", "None", ",", "closefd", "=", "True", ")", ":", "if", "not", "isinstance", "(", ...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/_pyio.py#L43-L226
networkit/networkit
695b7a786a894a303fa8587597d5ef916e797729
networkit/profiling/multiprocessing_helper.py
python
ThreadPool.__init__
(self, numberOfWorkers, isParallel=True)
constructor Args: numberOfWorkers: number of workers to create isParallel: parallel or sequential task computation
constructor Args: numberOfWorkers: number of workers to create isParallel: parallel or sequential task computation
[ "constructor", "Args", ":", "numberOfWorkers", ":", "number", "of", "workers", "to", "create", "isParallel", ":", "parallel", "or", "sequential", "task", "computation" ]
def __init__(self, numberOfWorkers, isParallel=True): """ constructor Args: numberOfWorkers: number of workers to create isParallel: parallel or sequential task computation """ self.__numberOfTasks = 0 self.__numberOfWorkers = numberOfWorkers self.__isParallel = isParallel if self.__numberOfWorkers ...
[ "def", "__init__", "(", "self", ",", "numberOfWorkers", ",", "isParallel", "=", "True", ")", ":", "self", ".", "__numberOfTasks", "=", "0", "self", ".", "__numberOfWorkers", "=", "numberOfWorkers", "self", ".", "__isParallel", "=", "isParallel", "if", "self", ...
https://github.com/networkit/networkit/blob/695b7a786a894a303fa8587597d5ef916e797729/networkit/profiling/multiprocessing_helper.py#L73-L107
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/_controls.py
python
ListCtrl.Focus
(self, idx)
Focus and show the given item
Focus and show the given item
[ "Focus", "and", "show", "the", "given", "item" ]
def Focus(self, idx): '''Focus and show the given item''' self.SetItemState(idx, wx.LIST_STATE_FOCUSED, wx.LIST_STATE_FOCUSED) self.EnsureVisible(idx)
[ "def", "Focus", "(", "self", ",", "idx", ")", ":", "self", ".", "SetItemState", "(", "idx", ",", "wx", ".", "LIST_STATE_FOCUSED", ",", "wx", ".", "LIST_STATE_FOCUSED", ")", "self", ".", "EnsureVisible", "(", "idx", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_controls.py#L4768-L4771
ricardoquesada/Spidermonkey
4a75ea2543408bd1b2c515aa95901523eeef7858
media/webrtc/trunk/tools/gyp/pylib/gyp/MSVSProject.py
python
Writer.AddFileConfig
(self, path, config, attrs=None, tools=None)
Adds a configuration to a file. Args: path: Relative path to the file. config: Name of configuration to add. attrs: Dict of configuration attributes; may be None. tools: List of tools (strings or Tool objects); may be None. Raises: ValueError: Relative path does not match any fil...
Adds a configuration to a file.
[ "Adds", "a", "configuration", "to", "a", "file", "." ]
def AddFileConfig(self, path, config, attrs=None, tools=None): """Adds a configuration to a file. Args: path: Relative path to the file. config: Name of configuration to add. attrs: Dict of configuration attributes; may be None. tools: List of tools (strings or Tool objects); may be Non...
[ "def", "AddFileConfig", "(", "self", ",", "path", ",", "config", ",", "attrs", "=", "None", ",", "tools", "=", "None", ")", ":", "# Find the file node with the right relative path", "parent", "=", "self", ".", "files_dict", ".", "get", "(", "path", ")", "if"...
https://github.com/ricardoquesada/Spidermonkey/blob/4a75ea2543408bd1b2c515aa95901523eeef7858/media/webrtc/trunk/tools/gyp/pylib/gyp/MSVSProject.py#L166-L186
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/AWSPythonSDK/1.5.8/docutils/utils/math/math2html.py
python
CommandBit.parsetext
(self, pos)
return bracket
Parse a text parameter.
Parse a text parameter.
[ "Parse", "a", "text", "parameter", "." ]
def parsetext(self, pos): "Parse a text parameter." self.factory.clearskipped(pos) if not self.factory.detecttype(Bracket, pos): Trace.error('No text parameter for ' + self.command) return None bracket = Bracket().setfactory(self.factory).parsetext(pos) self.add(bracket) return brack...
[ "def", "parsetext", "(", "self", ",", "pos", ")", ":", "self", ".", "factory", ".", "clearskipped", "(", "pos", ")", "if", "not", "self", ".", "factory", ".", "detecttype", "(", "Bracket", ",", "pos", ")", ":", "Trace", ".", "error", "(", "'No text p...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/AWSPythonSDK/1.5.8/docutils/utils/math/math2html.py#L4177-L4185
devsisters/libquic
8954789a056d8e7d5fcb6452fd1572ca57eb5c4e
src/third_party/protobuf/python/mox.py
python
MockAnything.__getattr__
(self, method_name)
return self._CreateMockMethod(method_name)
Intercept method calls on this object. A new MockMethod is returned that is aware of the MockAnything's state (record or replay). The call will be recorded or replayed by the MockMethod's __call__. Args: # method name: the name of the method being called. method_name: str Returns:...
Intercept method calls on this object.
[ "Intercept", "method", "calls", "on", "this", "object", "." ]
def __getattr__(self, method_name): """Intercept method calls on this object. A new MockMethod is returned that is aware of the MockAnything's state (record or replay). The call will be recorded or replayed by the MockMethod's __call__. Args: # method name: the name of the method being c...
[ "def", "__getattr__", "(", "self", ",", "method_name", ")", ":", "return", "self", ".", "_CreateMockMethod", "(", "method_name", ")" ]
https://github.com/devsisters/libquic/blob/8954789a056d8e7d5fcb6452fd1572ca57eb5c4e/src/third_party/protobuf/python/mox.py#L278-L293
intel/caffe
3f494b442ee3f9d17a07b09ecbd5fa2bbda00836
examples/faster-rcnn/lib/fast_rcnn/train.py
python
get_training_roidb
(imdb)
return imdb.roidb
Returns a roidb (Region of Interest database) for use in training.
Returns a roidb (Region of Interest database) for use in training.
[ "Returns", "a", "roidb", "(", "Region", "of", "Interest", "database", ")", "for", "use", "in", "training", "." ]
def get_training_roidb(imdb): """Returns a roidb (Region of Interest database) for use in training.""" if cfg.TRAIN.USE_FLIPPED: print 'Appending horizontally-flipped training examples...' imdb.append_flipped_images() print 'done' print 'Preparing training data...' rdl_roidb.pre...
[ "def", "get_training_roidb", "(", "imdb", ")", ":", "if", "cfg", ".", "TRAIN", ".", "USE_FLIPPED", ":", "print", "'Appending horizontally-flipped training examples...'", "imdb", ".", "append_flipped_images", "(", ")", "print", "'done'", "print", "'Preparing training dat...
https://github.com/intel/caffe/blob/3f494b442ee3f9d17a07b09ecbd5fa2bbda00836/examples/faster-rcnn/lib/fast_rcnn/train.py#L115-L126
miyosuda/TensorFlowAndroidDemo
35903e0221aa5f109ea2dbef27f20b52e317f42d
jni-build/jni/include/tensorflow/contrib/framework/python/framework/tensor_util.py
python
is_tensor
(x)
return isinstance(x, tensor_types)
Check for tensor types. Check whether an object is a tensor. Equivalent to `isinstance(x, [tf.Tensor, tf.SparseTensor, tf.Variable])`. Args: x: An python object to check. Returns: `True` if `x` is a tensor, `False` if not.
Check for tensor types. Check whether an object is a tensor. Equivalent to `isinstance(x, [tf.Tensor, tf.SparseTensor, tf.Variable])`.
[ "Check", "for", "tensor", "types", ".", "Check", "whether", "an", "object", "is", "a", "tensor", ".", "Equivalent", "to", "isinstance", "(", "x", "[", "tf", ".", "Tensor", "tf", ".", "SparseTensor", "tf", ".", "Variable", "]", ")", "." ]
def is_tensor(x): """Check for tensor types. Check whether an object is a tensor. Equivalent to `isinstance(x, [tf.Tensor, tf.SparseTensor, tf.Variable])`. Args: x: An python object to check. Returns: `True` if `x` is a tensor, `False` if not. """ tensor_types = (ops.Tensor, ops.SparseTensor, va...
[ "def", "is_tensor", "(", "x", ")", ":", "tensor_types", "=", "(", "ops", ".", "Tensor", ",", "ops", ".", "SparseTensor", ",", "variables", ".", "Variable", ")", "return", "isinstance", "(", "x", ",", "tensor_types", ")" ]
https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/contrib/framework/python/framework/tensor_util.py#L219-L231
pmq20/node-packer
12c46c6e44fbc14d9ee645ebd17d5296b324f7e0
lts/tools/gyp/pylib/gyp/mac_tool.py
python
MacTool.ExecMergeInfoPlist
(self, output, *inputs)
Merge multiple .plist files into a single .plist file.
Merge multiple .plist files into a single .plist file.
[ "Merge", "multiple", ".", "plist", "files", "into", "a", "single", ".", "plist", "file", "." ]
def ExecMergeInfoPlist(self, output, *inputs): """Merge multiple .plist files into a single .plist file.""" merged_plist = {} for path in inputs: plist = self._LoadPlistMaybeBinary(path) self._MergePlist(merged_plist, plist) plistlib.writePlist(merged_plist, output)
[ "def", "ExecMergeInfoPlist", "(", "self", ",", "output", ",", "*", "inputs", ")", ":", "merged_plist", "=", "{", "}", "for", "path", "in", "inputs", ":", "plist", "=", "self", ".", "_LoadPlistMaybeBinary", "(", "path", ")", "self", ".", "_MergePlist", "(...
https://github.com/pmq20/node-packer/blob/12c46c6e44fbc14d9ee645ebd17d5296b324f7e0/lts/tools/gyp/pylib/gyp/mac_tool.py#L403-L409
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/botocore/loaders.py
python
create_loader
(search_path_string=None)
return Loader(extra_search_paths=paths)
Create a Loader class. This factory function creates a loader given a search string path. :type search_string_path: str :param search_string_path: The AWS_DATA_PATH value. A string of data path values separated by the ``os.path.pathsep`` value, which is typically ``:`` on POSIX platforms ...
Create a Loader class.
[ "Create", "a", "Loader", "class", "." ]
def create_loader(search_path_string=None): """Create a Loader class. This factory function creates a loader given a search string path. :type search_string_path: str :param search_string_path: The AWS_DATA_PATH value. A string of data path values separated by the ``os.path.pathsep`` value, ...
[ "def", "create_loader", "(", "search_path_string", "=", "None", ")", ":", "if", "search_path_string", "is", "None", ":", "return", "Loader", "(", ")", "paths", "=", "[", "]", "extra_paths", "=", "search_path_string", ".", "split", "(", "os", ".", "pathsep", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/botocore/loaders.py#L178-L199
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/contrib/slim/python/slim/data/parallel_reader.py
python
ParallelReader.num_records_produced
(self, name=None)
return math_ops.add_n(num_records, name=name)
Returns the number of records this reader has produced. Args: name: A name for the operation (optional). Returns: An int64 Tensor.
Returns the number of records this reader has produced.
[ "Returns", "the", "number", "of", "records", "this", "reader", "has", "produced", "." ]
def num_records_produced(self, name=None): """Returns the number of records this reader has produced. Args: name: A name for the operation (optional). Returns: An int64 Tensor. """ num_records = [r.num_records_produced() for r in self._readers] return math_ops.add_n(num_records, n...
[ "def", "num_records_produced", "(", "self", ",", "name", "=", "None", ")", ":", "num_records", "=", "[", "r", ".", "num_records_produced", "(", ")", "for", "r", "in", "self", ".", "_readers", "]", "return", "math_ops", ".", "add_n", "(", "num_records", "...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/contrib/slim/python/slim/data/parallel_reader.py#L139-L150
Slicer/Slicer
ba9fadf332cb0303515b68d8d06a344c82e3e3e5
Modules/Scripted/Endoscopy/Endoscopy.py
python
EndoscopyWidget.enableOrDisableCreateButton
(self)
Connected to both the fiducial and camera node selector. It allows to enable or disable the 'create path' button.
Connected to both the fiducial and camera node selector. It allows to enable or disable the 'create path' button.
[ "Connected", "to", "both", "the", "fiducial", "and", "camera", "node", "selector", ".", "It", "allows", "to", "enable", "or", "disable", "the", "create", "path", "button", "." ]
def enableOrDisableCreateButton(self): """Connected to both the fiducial and camera node selector. It allows to enable or disable the 'create path' button.""" self.createPathButton.enabled = (self.cameraNodeSelector.currentNode() is not None and self.inputFiducialsNodeSelector.currentNode() is not Non...
[ "def", "enableOrDisableCreateButton", "(", "self", ")", ":", "self", ".", "createPathButton", ".", "enabled", "=", "(", "self", ".", "cameraNodeSelector", ".", "currentNode", "(", ")", "is", "not", "None", "and", "self", ".", "inputFiducialsNodeSelector", ".", ...
https://github.com/Slicer/Slicer/blob/ba9fadf332cb0303515b68d8d06a344c82e3e3e5/Modules/Scripted/Endoscopy/Endoscopy.py#L219-L224
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/flatmenu.py
python
FocusHandler.SetMenu
(self, menu)
Sets the listener menu. :param `menu`: an instance of :class:`FlatMenu`.
Sets the listener menu.
[ "Sets", "the", "listener", "menu", "." ]
def SetMenu(self, menu): """ Sets the listener menu. :param `menu`: an instance of :class:`FlatMenu`. """ self._menu = menu
[ "def", "SetMenu", "(", "self", ",", "menu", ")", ":", "self", ".", "_menu", "=", "menu" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/flatmenu.py#L7274-L7281
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py2/scipy/signal/filter_design.py
python
_validate_sos
(sos)
return sos, n_sections
Helper to validate a SOS input
Helper to validate a SOS input
[ "Helper", "to", "validate", "a", "SOS", "input" ]
def _validate_sos(sos): """Helper to validate a SOS input""" sos = np.atleast_2d(sos) if sos.ndim != 2: raise ValueError('sos array must be 2D') n_sections, m = sos.shape if m != 6: raise ValueError('sos array must be shape (n_sections, 6)') if not (sos[:, 3] == 1).all(): ...
[ "def", "_validate_sos", "(", "sos", ")", ":", "sos", "=", "np", ".", "atleast_2d", "(", "sos", ")", "if", "sos", ".", "ndim", "!=", "2", ":", "raise", "ValueError", "(", "'sos array must be 2D'", ")", "n_sections", ",", "m", "=", "sos", ".", "shape", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py2/scipy/signal/filter_design.py#L696-L706
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/s3transfer/upload.py
python
UploadSubmissionTask._submit
(self, client, config, osutil, request_executor, transfer_future, bandwidth_limiter=None)
:param client: The client associated with the transfer manager :type config: s3transfer.manager.TransferConfig :param config: The transfer config associated with the transfer manager :type osutil: s3transfer.utils.OSUtil :param osutil: The os utility associated to the trans...
:param client: The client associated with the transfer manager
[ ":", "param", "client", ":", "The", "client", "associated", "with", "the", "transfer", "manager" ]
def _submit(self, client, config, osutil, request_executor, transfer_future, bandwidth_limiter=None): """ :param client: The client associated with the transfer manager :type config: s3transfer.manager.TransferConfig :param config: The transfer config associated with the...
[ "def", "_submit", "(", "self", ",", "client", ",", "config", ",", "osutil", ",", "request_executor", ",", "transfer_future", ",", "bandwidth_limiter", "=", "None", ")", ":", "upload_input_manager", "=", "self", ".", "_get_upload_input_manager_cls", "(", "transfer_...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/s3transfer/upload.py#L523-L560
BitMEX/api-connectors
37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812
auto-generated/python/swagger_client/models/affiliate.py
python
Affiliate.timestamp
(self, timestamp)
Sets the timestamp of this Affiliate. :param timestamp: The timestamp of this Affiliate. # noqa: E501 :type: datetime
Sets the timestamp of this Affiliate.
[ "Sets", "the", "timestamp", "of", "this", "Affiliate", "." ]
def timestamp(self, timestamp): """Sets the timestamp of this Affiliate. :param timestamp: The timestamp of this Affiliate. # noqa: E501 :type: datetime """ self._timestamp = timestamp
[ "def", "timestamp", "(", "self", ",", "timestamp", ")", ":", "self", ".", "_timestamp", "=", "timestamp" ]
https://github.com/BitMEX/api-connectors/blob/37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812/auto-generated/python/swagger_client/models/affiliate.py#L416-L424
y123456yz/reading-and-annotate-mongodb-3.6
93280293672ca7586dc24af18132aa61e4ed7fcf
mongo/buildscripts/cpplint.py
python
IsDecltype
(clean_lines, linenum, column)
return False
Check if the token ending on (linenum, column) is decltype(). Args: clean_lines: A CleansedLines instance containing the file. linenum: the number of the line to check. column: end column of the token to check. Returns: True if this token is decltype() expression, False otherwise.
Check if the token ending on (linenum, column) is decltype().
[ "Check", "if", "the", "token", "ending", "on", "(", "linenum", "column", ")", "is", "decltype", "()", "." ]
def IsDecltype(clean_lines, linenum, column): """Check if the token ending on (linenum, column) is decltype(). Args: clean_lines: A CleansedLines instance containing the file. linenum: the number of the line to check. column: end column of the token to check. Returns: True if this token is declty...
[ "def", "IsDecltype", "(", "clean_lines", ",", "linenum", ",", "column", ")", ":", "(", "text", ",", "_", ",", "start_col", ")", "=", "ReverseCloseExpression", "(", "clean_lines", ",", "linenum", ",", "column", ")", "if", "start_col", "<", "0", ":", "retu...
https://github.com/y123456yz/reading-and-annotate-mongodb-3.6/blob/93280293672ca7586dc24af18132aa61e4ed7fcf/mongo/buildscripts/cpplint.py#L3393-L3408
tinyobjloader/tinyobjloader
8322e00ae685ea623ab6ac5a6cebcfa2d22fbf93
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/tinyobjloader/tinyobjloader/blob/8322e00ae685ea623ab6ac5a6cebcfa2d22fbf93/deps/cpplint.py#L2266-L2316
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/protobuf/py2/google/protobuf/message.py
python
Message.ListFields
(self)
Returns a list of (FieldDescriptor, value) tuples for present fields. A message field is non-empty if HasField() would return true. A singular primitive field is non-empty if HasField() would return true in proto2 or it is non zero in proto3. A repeated field is non-empty if it contains at least one el...
Returns a list of (FieldDescriptor, value) tuples for present fields.
[ "Returns", "a", "list", "of", "(", "FieldDescriptor", "value", ")", "tuples", "for", "present", "fields", "." ]
def ListFields(self): """Returns a list of (FieldDescriptor, value) tuples for present fields. A message field is non-empty if HasField() would return true. A singular primitive field is non-empty if HasField() would return true in proto2 or it is non zero in proto3. A repeated field is non-empty if it...
[ "def", "ListFields", "(", "self", ")", ":", "raise", "NotImplementedError" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/protobuf/py2/google/protobuf/message.py#L248-L261
apple/turicreate
cce55aa5311300e3ce6af93cb45ba791fd1bdf49
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/internal/python_message.py
python
_AddSerializePartialToStringMethod
(message_descriptor, cls)
Helper for _AddMessageMethods().
Helper for _AddMessageMethods().
[ "Helper", "for", "_AddMessageMethods", "()", "." ]
def _AddSerializePartialToStringMethod(message_descriptor, cls): """Helper for _AddMessageMethods().""" def SerializePartialToString(self): out = BytesIO() self._InternalSerialize(out.write) return out.getvalue() cls.SerializePartialToString = SerializePartialToString def InternalSerialize(self, w...
[ "def", "_AddSerializePartialToStringMethod", "(", "message_descriptor", ",", "cls", ")", ":", "def", "SerializePartialToString", "(", "self", ")", ":", "out", "=", "BytesIO", "(", ")", "self", ".", "_InternalSerialize", "(", "out", ".", "write", ")", "return", ...
https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/internal/python_message.py#L1040-L1055
microsoft/TSS.MSR
0f2516fca2cd9929c31d5450e39301c9bde43688
TSS.Py/src/TpmTypes.py
python
TPMS_AES_SYM_DETAILS.__init__
(self)
Custom data structure representing an empty element (i.e. the one with no data to marshal) for selector algorithm TPM_ALG_AES for the union TPMU_SYM_DETAILS
Custom data structure representing an empty element (i.e. the one with no data to marshal) for selector algorithm TPM_ALG_AES for the union TPMU_SYM_DETAILS
[ "Custom", "data", "structure", "representing", "an", "empty", "element", "(", "i", ".", "e", ".", "the", "one", "with", "no", "data", "to", "marshal", ")", "for", "selector", "algorithm", "TPM_ALG_AES", "for", "the", "union", "TPMU_SYM_DETAILS" ]
def __init__(self): """ Custom data structure representing an empty element (i.e. the one with no data to marshal) for selector algorithm TPM_ALG_AES for the union TPMU_SYM_DETAILS """ pass
[ "def", "__init__", "(", "self", ")", ":", "pass" ]
https://github.com/microsoft/TSS.MSR/blob/0f2516fca2cd9929c31d5450e39301c9bde43688/TSS.Py/src/TpmTypes.py#L5628-L5634
apple/swift-lldb
d74be846ef3e62de946df343e8c234bde93a8912
scripts/Python/static-binding/lldb.py
python
SBAttachInfo.GetResumeCount
(self)
return _lldb.SBAttachInfo_GetResumeCount(self)
GetResumeCount(SBAttachInfo self) -> uint32_t
GetResumeCount(SBAttachInfo self) -> uint32_t
[ "GetResumeCount", "(", "SBAttachInfo", "self", ")", "-", ">", "uint32_t" ]
def GetResumeCount(self): """GetResumeCount(SBAttachInfo self) -> uint32_t""" return _lldb.SBAttachInfo_GetResumeCount(self)
[ "def", "GetResumeCount", "(", "self", ")", ":", "return", "_lldb", ".", "SBAttachInfo_GetResumeCount", "(", "self", ")" ]
https://github.com/apple/swift-lldb/blob/d74be846ef3e62de946df343e8c234bde93a8912/scripts/Python/static-binding/lldb.py#L1102-L1104
TimoSaemann/caffe-segnet-cudnn5
abcf30dca449245e101bf4ced519f716177f0885
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/TimoSaemann/caffe-segnet-cudnn5/blob/abcf30dca449245e101bf4ced519f716177f0885/python/caffe/io.py#L187-L201
PX4/PX4-Autopilot
0b9f60a0370be53d683352c63fd92db3d6586e18
Tools/mavlink_px4.py
python
MAVLink.change_operator_control_encode
(self, target_system, control_request, version, passkey)
return msg
Request to control this MAV target_system : System the GCS requests control for (uint8_t) control_request : 0: request control of this MAV, 1: Release control of this MAV (uint8_t) version : 0: key as plaintext, 1-255: future, diff...
Request to control this MAV
[ "Request", "to", "control", "this", "MAV" ]
def change_operator_control_encode(self, target_system, control_request, version, passkey): ''' Request to control this MAV target_system : System the GCS requests control for (uint8_t) control_request : 0: request control of this MA...
[ "def", "change_operator_control_encode", "(", "self", ",", "target_system", ",", "control_request", ",", "version", ",", "passkey", ")", ":", "msg", "=", "MAVLink_change_operator_control_message", "(", "target_system", ",", "control_request", ",", "version", ",", "pas...
https://github.com/PX4/PX4-Autopilot/blob/0b9f60a0370be53d683352c63fd92db3d6586e18/Tools/mavlink_px4.py#L2561-L2573
rdkit/rdkit
ede860ae316d12d8568daf5ee800921c3389c84e
rdkit/sping/PDF/pdfdoc.py
python
PDFDocument.setSubject
(self, subject)
embeds in PDF file
embeds in PDF file
[ "embeds", "in", "PDF", "file" ]
def setSubject(self, subject): "embeds in PDF file" self.info.subject = subject
[ "def", "setSubject", "(", "self", ",", "subject", ")", ":", "self", ".", "info", ".", "subject", "=", "subject" ]
https://github.com/rdkit/rdkit/blob/ede860ae316d12d8568daf5ee800921c3389c84e/rdkit/sping/PDF/pdfdoc.py#L124-L126
apple/swift-lldb
d74be846ef3e62de946df343e8c234bde93a8912
scripts/Python/static-binding/lldb.py
python
SBTypeCategory.AddTypeSummary
(self, arg2, arg3)
return _lldb.SBTypeCategory_AddTypeSummary(self, arg2, arg3)
AddTypeSummary(SBTypeCategory self, SBTypeNameSpecifier arg2, SBTypeSummary arg3) -> bool
AddTypeSummary(SBTypeCategory self, SBTypeNameSpecifier arg2, SBTypeSummary arg3) -> bool
[ "AddTypeSummary", "(", "SBTypeCategory", "self", "SBTypeNameSpecifier", "arg2", "SBTypeSummary", "arg3", ")", "-", ">", "bool" ]
def AddTypeSummary(self, arg2, arg3): """AddTypeSummary(SBTypeCategory self, SBTypeNameSpecifier arg2, SBTypeSummary arg3) -> bool""" return _lldb.SBTypeCategory_AddTypeSummary(self, arg2, arg3)
[ "def", "AddTypeSummary", "(", "self", ",", "arg2", ",", "arg3", ")", ":", "return", "_lldb", ".", "SBTypeCategory_AddTypeSummary", "(", "self", ",", "arg2", ",", "arg3", ")" ]
https://github.com/apple/swift-lldb/blob/d74be846ef3e62de946df343e8c234bde93a8912/scripts/Python/static-binding/lldb.py#L13177-L13179
epam/Indigo
30e40b4b1eb9bae0207435a26cfcb81ddcc42be1
api/python/indigo/__init__.py
python
IndigoObject.findSGroups
(self, prop, val)
return self.dispatcher.IndigoObject( self.dispatcher, self.dispatcher._checkResult( Indigo._lib.indigoFindSGroups( self.id, prop.encode(ENCODE_ENCODING), val.encode(ENCODE_ENCODING), ) ), ...
Molecule method finds SGroup by property and value Args: prop (str): property string val (str): value string Returns: IndigoObject: SGroup iterator
Molecule method finds SGroup by property and value
[ "Molecule", "method", "finds", "SGroup", "by", "property", "and", "value" ]
def findSGroups(self, prop, val): """Molecule method finds SGroup by property and value Args: prop (str): property string val (str): value string Returns: IndigoObject: SGroup iterator """ self.dispatcher._setSessionId() return self.d...
[ "def", "findSGroups", "(", "self", ",", "prop", ",", "val", ")", ":", "self", ".", "dispatcher", ".", "_setSessionId", "(", ")", "return", "self", ".", "dispatcher", ".", "IndigoObject", "(", "self", ".", "dispatcher", ",", "self", ".", "dispatcher", "."...
https://github.com/epam/Indigo/blob/30e40b4b1eb9bae0207435a26cfcb81ddcc42be1/api/python/indigo/__init__.py#L2085-L2105
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_core.py
python
Window.GetCapture
(*args, **kwargs)
return _core_.Window_GetCapture(*args, **kwargs)
GetCapture() -> Window Returns the window which currently captures the mouse or None
GetCapture() -> Window
[ "GetCapture", "()", "-", ">", "Window" ]
def GetCapture(*args, **kwargs): """ GetCapture() -> Window Returns the window which currently captures the mouse or None """ return _core_.Window_GetCapture(*args, **kwargs)
[ "def", "GetCapture", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "Window_GetCapture", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_core.py#L10648-L10654