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
eclipse/sumo
7132a9b8b6eea734bdec38479026b4d8c4336d03
tools/traci/_chargingstation.py
python
ChargingStationDomain.getName
(self, stopID)
return self._getUniversal(tc.VAR_NAME, stopID)
getName(string) -> string Returns the name of this stop
getName(string) -> string
[ "getName", "(", "string", ")", "-", ">", "string" ]
def getName(self, stopID): """getName(string) -> string Returns the name of this stop """ return self._getUniversal(tc.VAR_NAME, stopID)
[ "def", "getName", "(", "self", ",", "stopID", ")", ":", "return", "self", ".", "_getUniversal", "(", "tc", ".", "VAR_NAME", ",", "stopID", ")" ]
https://github.com/eclipse/sumo/blob/7132a9b8b6eea734bdec38479026b4d8c4336d03/tools/traci/_chargingstation.py#L51-L56
ElvishArtisan/rivendell
153d9f73acb9735f3ce94c10b5dca069dec66fcf
apis/pypad/api/pypad.py
python
Update.startDateTimeString
(self,pad_type)
return self.__fields['padUpdate'][pad_type]['startDateTime']
Returns the start date-time of the specified PAD type in ISO 8601 format (string). Takes one argument: pad_type - The type of PAD value. Valid values are: pypad.TYPE_NOW - Now playing data pypad.TYPE_NEXT - Next to play data
Returns the start date-time of the specified PAD type in ISO 8601 format (string).
[ "Returns", "the", "start", "date", "-", "time", "of", "the", "specified", "PAD", "type", "in", "ISO", "8601", "format", "(", "string", ")", "." ]
def startDateTimeString(self,pad_type): """ Returns the start date-time of the specified PAD type in ISO 8601 format (string). Takes one argument: pad_type - The type of PAD value. Valid values are: pypad.TYPE_NOW - Now playing data ...
[ "def", "startDateTimeString", "(", "self", ",", "pad_type", ")", ":", "return", "self", ".", "__fields", "[", "'padUpdate'", "]", "[", "pad_type", "]", "[", "'startDateTime'", "]" ]
https://github.com/ElvishArtisan/rivendell/blob/153d9f73acb9735f3ce94c10b5dca069dec66fcf/apis/pypad/api/pypad.py#L438-L449
llvm/llvm-project
ffa6262cb4e2a335d26416fad39a581b4f98c5f4
mlir/utils/mbr/mbr/main.py
python
main
(top_level_path, stop_on_error)
return benchmark_dicts
Top level function called when the CLI is invoked.
Top level function called when the CLI is invoked.
[ "Top", "level", "function", "called", "when", "the", "CLI", "is", "invoked", "." ]
def main(top_level_path, stop_on_error): """Top level function called when the CLI is invoked. """ if "::" in top_level_path: if top_level_path.count("::") > 1: raise AssertionError(f"Invalid path {top_level_path}") top_level_path, benchmark_function_name = top_level_path.split("...
[ "def", "main", "(", "top_level_path", ",", "stop_on_error", ")", ":", "if", "\"::\"", "in", "top_level_path", ":", "if", "top_level_path", ".", "count", "(", "\"::\"", ")", ">", "1", ":", "raise", "AssertionError", "(", "f\"Invalid path {top_level_path}\"", ")",...
https://github.com/llvm/llvm-project/blob/ffa6262cb4e2a335d26416fad39a581b4f98c5f4/mlir/utils/mbr/mbr/main.py#L14-L110
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/extern/aui/framemanager.py
python
FindOppositeDocks
(docks, dock_direction)
return arr
This is an internal function that returns a list of docks which is related to the opposite direction. :param `docks`: a list of :class:`AuiDockInfo`; :param integer `dock_direction`: the :class:`AuiDockInfo` docking direction to analyze;
This is an internal function that returns a list of docks which is related to the opposite direction.
[ "This", "is", "an", "internal", "function", "that", "returns", "a", "list", "of", "docks", "which", "is", "related", "to", "the", "opposite", "direction", "." ]
def FindOppositeDocks(docks, dock_direction): """ This is an internal function that returns a list of docks which is related to the opposite direction. :param `docks`: a list of :class:`AuiDockInfo`; :param integer `dock_direction`: the :class:`AuiDockInfo` docking direction to analyze; """ ...
[ "def", "FindOppositeDocks", "(", "docks", ",", "dock_direction", ")", ":", "if", "dock_direction", "==", "AUI_DOCK_LEFT", ":", "arr", "=", "FindDocks", "(", "docks", ",", "AUI_DOCK_RIGHT", ",", "-", "1", ",", "-", "1", ")", "elif", "dock_direction", "==", ...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/extern/aui/framemanager.py#L3678-L3696
tfwu/FaceDetection-ConvNet-3D
f9251c48eb40c5aec8fba7455115c355466555be
python/mxnet/model.py
python
load_checkpoint
(prefix, epoch)
return (symbol, arg_params, aux_params)
Load model checkpoint from file. Parameters ---------- prefix : str Prefix of model name. epoch : int Epoch number of model we would like to load. Returns ------- symbol : Symbol The symbol configuration of computation network. arg_params : dict of str to NDArray ...
Load model checkpoint from file. Parameters ---------- prefix : str Prefix of model name. epoch : int Epoch number of model we would like to load. Returns ------- symbol : Symbol The symbol configuration of computation network. arg_params : dict of str to NDArray ...
[ "Load", "model", "checkpoint", "from", "file", ".", "Parameters", "----------", "prefix", ":", "str", "Prefix", "of", "model", "name", ".", "epoch", ":", "int", "Epoch", "number", "of", "model", "we", "would", "like", "to", "load", ".", "Returns", "-------...
def load_checkpoint(prefix, epoch): """Load model checkpoint from file. Parameters ---------- prefix : str Prefix of model name. epoch : int Epoch number of model we would like to load. Returns ------- symbol : Symbol The symbol configuration of computation networ...
[ "def", "load_checkpoint", "(", "prefix", ",", "epoch", ")", ":", "symbol", "=", "sym", ".", "load", "(", "'%s-symbol.json'", "%", "prefix", ")", "save_dict", "=", "nd", ".", "load", "(", "'%s-%04d.params'", "%", "(", "prefix", ",", "epoch", ")", ")", "...
https://github.com/tfwu/FaceDetection-ConvNet-3D/blob/f9251c48eb40c5aec8fba7455115c355466555be/python/mxnet/model.py#L341-L372
SequoiaDB/SequoiaDB
2894ed7e5bd6fe57330afc900cf76d0ff0df9f64
tools/server/php_linux/libxml2/lib/python2.4/site-packages/libxml2.py
python
xmlNode.unsetNsProp
(self, ns, name)
return ret
Remove an attribute carried by a node.
Remove an attribute carried by a node.
[ "Remove", "an", "attribute", "carried", "by", "a", "node", "." ]
def unsetNsProp(self, ns, name): """Remove an attribute carried by a node. """ if ns is None: ns__o = None else: ns__o = ns._o ret = libxml2mod.xmlUnsetNsProp(self._o, ns__o, name) return ret
[ "def", "unsetNsProp", "(", "self", ",", "ns", ",", "name", ")", ":", "if", "ns", "is", "None", ":", "ns__o", "=", "None", "else", ":", "ns__o", "=", "ns", ".", "_o", "ret", "=", "libxml2mod", ".", "xmlUnsetNsProp", "(", "self", ".", "_o", ",", "n...
https://github.com/SequoiaDB/SequoiaDB/blob/2894ed7e5bd6fe57330afc900cf76d0ff0df9f64/tools/server/php_linux/libxml2/lib/python2.4/site-packages/libxml2.py#L3576-L3581
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/_pydecimal.py
python
Decimal.__sub__
(self, other, context=None)
return self.__add__(other.copy_negate(), context=context)
Return self - other
Return self - other
[ "Return", "self", "-", "other" ]
def __sub__(self, other, context=None): """Return self - other""" other = _convert_other(other) if other is NotImplemented: return other if self._is_special or other._is_special: ans = self._check_nans(other, context=context) if ans: r...
[ "def", "__sub__", "(", "self", ",", "other", ",", "context", "=", "None", ")", ":", "other", "=", "_convert_other", "(", "other", ")", "if", "other", "is", "NotImplemented", ":", "return", "other", "if", "self", ".", "_is_special", "or", "other", ".", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/_pydecimal.py#L1245-L1257
rapidsai/cudf
d5b2448fc69f17509304d594f029d0df56984962
python/dask_cudf/dask_cudf/_version.py
python
get_keywords
()
return keywords
Get the keywords needed to look up the version information.
Get the keywords needed to look up the version information.
[ "Get", "the", "keywords", "needed", "to", "look", "up", "the", "version", "information", "." ]
def get_keywords(): """Get the keywords needed to look up the version information.""" # these strings will be replaced by git during git-archive. # setup.py/versioneer.py will grep for the variable names, so they must # each be defined on a line of their own. _version.py will just call # get_keyword...
[ "def", "get_keywords", "(", ")", ":", "# these strings will be replaced by git during git-archive.", "# setup.py/versioneer.py will grep for the variable names, so they must", "# each be defined on a line of their own. _version.py will just call", "# get_keywords().", "git_refnames", "=", "\"$...
https://github.com/rapidsai/cudf/blob/d5b2448fc69f17509304d594f029d0df56984962/python/dask_cudf/dask_cudf/_version.py#L19-L29
BlzFans/wke
b0fa21158312e40c5fbd84682d643022b6c34a93
cygwin/lib/python2.6/asynchat.py
python
async_chat.set_terminator
(self, term)
Set the input delimiter. Can be a fixed string of any length, an integer, or None
Set the input delimiter. Can be a fixed string of any length, an integer, or None
[ "Set", "the", "input", "delimiter", ".", "Can", "be", "a", "fixed", "string", "of", "any", "length", "an", "integer", "or", "None" ]
def set_terminator (self, term): "Set the input delimiter. Can be a fixed string of any length, an integer, or None" self.terminator = term
[ "def", "set_terminator", "(", "self", ",", "term", ")", ":", "self", ".", "terminator", "=", "term" ]
https://github.com/BlzFans/wke/blob/b0fa21158312e40c5fbd84682d643022b6c34a93/cygwin/lib/python2.6/asynchat.py#L95-L97
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/ultimatelistctrl.py
python
UltimateListItem.GetWidth
(self)
return self._width
Returns the column width. :note: This method is meaningful only for column headers in report mode.
Returns the column width.
[ "Returns", "the", "column", "width", "." ]
def GetWidth(self): """ Returns the column width. :note: This method is meaningful only for column headers in report mode. """ return self._width
[ "def", "GetWidth", "(", "self", ")", ":", "return", "self", ".", "_width" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/ultimatelistctrl.py#L1769-L1776
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/trace.py
python
Trace.globaltrace_trackcallers
(self, frame, why, arg)
Handler for call events. Adds information about who called who to the self._callers dict.
Handler for call events.
[ "Handler", "for", "call", "events", "." ]
def globaltrace_trackcallers(self, frame, why, arg): """Handler for call events. Adds information about who called who to the self._callers dict. """ if why == 'call': # XXX Should do a better job of identifying methods this_func = self.file_module_function_of(fr...
[ "def", "globaltrace_trackcallers", "(", "self", ",", "frame", ",", "why", ",", "arg", ")", ":", "if", "why", "==", "'call'", ":", "# XXX Should do a better job of identifying methods", "this_func", "=", "self", ".", "file_module_function_of", "(", "frame", ")", "p...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/trace.py#L570-L579
intel/caffe
3f494b442ee3f9d17a07b09ecbd5fa2bbda00836
scripts/cpp_lint.py
python
ParseArguments
(args)
return filenames
Parses the command line arguments. This may set the output format and verbosity level as side-effects. Args: args: The command line arguments: Returns: The list of filenames to lint.
Parses the command line arguments.
[ "Parses", "the", "command", "line", "arguments", "." ]
def ParseArguments(args): """Parses the command line arguments. This may set the output format and verbosity level as side-effects. Args: args: The command line arguments: Returns: The list of filenames to lint. """ try: (opts, filenames) = getopt.getopt(args, '', ['help', 'output=', 'verbose...
[ "def", "ParseArguments", "(", "args", ")", ":", "try", ":", "(", "opts", ",", "filenames", ")", "=", "getopt", ".", "getopt", "(", "args", ",", "''", ",", "[", "'help'", ",", "'output='", ",", "'verbose='", ",", "'counting='", ",", "'filter='", ",", ...
https://github.com/intel/caffe/blob/3f494b442ee3f9d17a07b09ecbd5fa2bbda00836/scripts/cpp_lint.py#L4783-L4850
pytorch/pytorch
7176c92687d3cc847cc046bf002269c6949a21c2
torch/cuda/memory.py
python
memory_summary
(device: Union[Device, int] = None, abbreviated: bool = False)
return "|" + "|\n|".join(lines).format(**fmt_dict) + "|\n"
r"""Returns a human-readable printout of the current memory allocator statistics for a given device. This can be useful to display periodically during training, or when handling out-of-memory exceptions. Args: device (torch.device or int, optional): selected device. Returns printou...
r"""Returns a human-readable printout of the current memory allocator statistics for a given device.
[ "r", "Returns", "a", "human", "-", "readable", "printout", "of", "the", "current", "memory", "allocator", "statistics", "for", "a", "given", "device", "." ]
def memory_summary(device: Union[Device, int] = None, abbreviated: bool = False) -> str: r"""Returns a human-readable printout of the current memory allocator statistics for a given device. This can be useful to display periodically during training, or when handling out-of-memory exceptions. Args:...
[ "def", "memory_summary", "(", "device", ":", "Union", "[", "Device", ",", "int", "]", "=", "None", ",", "abbreviated", ":", "bool", "=", "False", ")", "->", "str", ":", "device", "=", "_get_device_index", "(", "device", ",", "optional", "=", "True", ")...
https://github.com/pytorch/pytorch/blob/7176c92687d3cc847cc046bf002269c6949a21c2/torch/cuda/memory.py#L411-L532
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/genpy/src/genpy/rostime.py
python
TVal.is_zero
(self)
return self.secs == 0 and self.nsecs == 0
:returns: ``True`` if time is zero (secs and nsecs are zero), ``bool``
:returns: ``True`` if time is zero (secs and nsecs are zero), ``bool``
[ ":", "returns", ":", "True", "if", "time", "is", "zero", "(", "secs", "and", "nsecs", "are", "zero", ")", "bool" ]
def is_zero(self): """ :returns: ``True`` if time is zero (secs and nsecs are zero), ``bool`` """ return self.secs == 0 and self.nsecs == 0
[ "def", "is_zero", "(", "self", ")", ":", "return", "self", ".", "secs", "==", "0", "and", "self", ".", "nsecs", "==", "0" ]
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/genpy/src/genpy/rostime.py#L80-L84
quarnster/boxeebox-xbmc
7209547d3d247a4082de956f4d9a765086d96985
tools/EventClients/Clients/PS3 Sixaxis Controller/ps3d.py
python
ZeroconfThread.stop
(self)
return
Stop the zeroconf browser
Stop the zeroconf browser
[ "Stop", "the", "zeroconf", "browser" ]
def stop(self): """ Stop the zeroconf browser """ try: self._zbrowser.stop() except: pass return
[ "def", "stop", "(", "self", ")", ":", "try", ":", "self", ".", "_zbrowser", ".", "stop", "(", ")", "except", ":", "pass", "return" ]
https://github.com/quarnster/boxeebox-xbmc/blob/7209547d3d247a4082de956f4d9a765086d96985/tools/EventClients/Clients/PS3 Sixaxis Controller/ps3d.py#L286-L294
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/python/ops/math_ops.py
python
_neg
(x, name=None)
return negative(x, name)
Computes numerical negative value element-wise. I.e., \\(y = -x\\). Args: x: A `Tensor` or `SparseTensor`. Must be one of the following types: `half`, `float32`, `float64`, `int32`, `int64`, `complex64`, `complex128`. name: A name for the operation (optional). Returns: A `Tensor` or `SparseTe...
Computes numerical negative value element-wise.
[ "Computes", "numerical", "negative", "value", "element", "-", "wise", "." ]
def _neg(x, name=None): """Computes numerical negative value element-wise. I.e., \\(y = -x\\). Args: x: A `Tensor` or `SparseTensor`. Must be one of the following types: `half`, `float32`, `float64`, `int32`, `int64`, `complex64`, `complex128`. name: A name for the operation (optional). Returns...
[ "def", "_neg", "(", "x", ",", "name", "=", "None", ")", ":", "return", "negative", "(", "x", ",", "name", ")" ]
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/python/ops/math_ops.py#L379-L392
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py
python
Variable.trace_vinfo
(self)
return [self._tk.splitlist(x) for x in self._tk.splitlist( self._tk.call("trace", "vinfo", self._name))]
Return all trace callback information. This deprecated method wraps a deprecated Tcl method that will likely be removed in the future. Use trace_info() instead.
Return all trace callback information.
[ "Return", "all", "trace", "callback", "information", "." ]
def trace_vinfo(self): """Return all trace callback information. This deprecated method wraps a deprecated Tcl method that will likely be removed in the future. Use trace_info() instead. """ # TODO: Add deprecation warning return [self._tk.splitlist(x) for x in self._tk...
[ "def", "trace_vinfo", "(", "self", ")", ":", "# TODO: Add deprecation warning", "return", "[", "self", ".", "_tk", ".", "splitlist", "(", "x", ")", "for", "x", "in", "self", ".", "_tk", ".", "splitlist", "(", "self", ".", "_tk", ".", "call", "(", "\"tr...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py#L448-L456
swift/swift
12d031cf8177fdec0137f9aa7e2912fa23c4416b
3rdParty/SCons/scons-3.0.1/engine/SCons/Node/Alias.py
python
AliasNodeInfo.__getstate__
(self)
return state
Return all fields that shall be pickled. Walk the slots in the class hierarchy and add those to the state dictionary. If a '__dict__' slot is available, copy all entries to the dictionary. Also include the version id, which is fixed for all instances of a class.
Return all fields that shall be pickled. Walk the slots in the class hierarchy and add those to the state dictionary. If a '__dict__' slot is available, copy all entries to the dictionary. Also include the version id, which is fixed for all instances of a class.
[ "Return", "all", "fields", "that", "shall", "be", "pickled", ".", "Walk", "the", "slots", "in", "the", "class", "hierarchy", "and", "add", "those", "to", "the", "state", "dictionary", ".", "If", "a", "__dict__", "slot", "is", "available", "copy", "all", ...
def __getstate__(self): """ Return all fields that shall be pickled. Walk the slots in the class hierarchy and add those to the state dictionary. If a '__dict__' slot is available, copy all entries to the dictionary. Also include the version id, which is fixed for all instances o...
[ "def", "__getstate__", "(", "self", ")", ":", "state", "=", "getattr", "(", "self", ",", "'__dict__'", ",", "{", "}", ")", ".", "copy", "(", ")", "for", "obj", "in", "type", "(", "self", ")", ".", "mro", "(", ")", ":", "for", "name", "in", "get...
https://github.com/swift/swift/blob/12d031cf8177fdec0137f9aa7e2912fa23c4416b/3rdParty/SCons/scons-3.0.1/engine/SCons/Node/Alias.py#L65-L84
hughperkins/tf-coriander
970d3df6c11400ad68405f22b0c42a52374e94ca
tensorflow/python/ops/gradient_checker.py
python
compute_gradient_error
(x, x_shape, y, y_shape, x_init_value=None, delta=1e-3, init_targets=None)
return error
Computes the gradient error. Computes the maximum error for dy/dx between the computed Jacobian and the numerically estimated Jacobian. This function will modify the tensors passed in as it adds more operations and hence changing the consumers of the operations of the input tensors. This function adds oper...
Computes the gradient error.
[ "Computes", "the", "gradient", "error", "." ]
def compute_gradient_error(x, x_shape, y, y_shape, x_init_value=None, delta=1e-3, init_targets=None): """Computes the gradient error. Computes the maximu...
[ "def", "compute_gradient_error", "(", "x", ",", "x_shape", ",", "y", ",", "y_shape", ",", "x_init_value", "=", "None", ",", "delta", "=", "1e-3", ",", "init_targets", "=", "None", ")", ":", "grad", "=", "compute_gradient", "(", "x", ",", "x_shape", ",", ...
https://github.com/hughperkins/tf-coriander/blob/970d3df6c11400ad68405f22b0c42a52374e94ca/tensorflow/python/ops/gradient_checker.py#L293-L338
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/debug/cli/curses_ui.py
python
CursesUI._scroll_output
(self, direction, line_index=None)
Scroll the output pad. Args: direction: _SCROLL_REFRESH, _SCROLL_UP, _SCROLL_DOWN, _SCROLL_UP_A_LINE, _SCROLL_DOWN_A_LINE, _SCROLL_HOME, _SCROLL_END, _SCROLL_TO_LINE_INDEX line_index: (int) Specifies the zero-based line index to scroll to. Applicable only if direction is _SCROLL_TO_LINE...
Scroll the output pad.
[ "Scroll", "the", "output", "pad", "." ]
def _scroll_output(self, direction, line_index=None): """Scroll the output pad. Args: direction: _SCROLL_REFRESH, _SCROLL_UP, _SCROLL_DOWN, _SCROLL_UP_A_LINE, _SCROLL_DOWN_A_LINE, _SCROLL_HOME, _SCROLL_END, _SCROLL_TO_LINE_INDEX line_index: (int) Specifies the zero-based line index to scrol...
[ "def", "_scroll_output", "(", "self", ",", "direction", ",", "line_index", "=", "None", ")", ":", "if", "not", "self", ".", "_output_pad", ":", "# No output pad is present. Do nothing.", "return", "if", "direction", "==", "_SCROLL_REFRESH", ":", "pass", "elif", ...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/debug/cli/curses_ui.py#L1311-L1386
fatih/subvim
241b6d170597857105da219c9b7d36059e9f11fb
vim/base/YouCompleteMe/third_party/jedi/jedi/builtin.py
python
_parse_function_doc
(func)
return param_str, ret
Takes a function and returns the params and return value as a tuple. This is nothing more than a docstring parser.
Takes a function and returns the params and return value as a tuple. This is nothing more than a docstring parser.
[ "Takes", "a", "function", "and", "returns", "the", "params", "and", "return", "value", "as", "a", "tuple", ".", "This", "is", "nothing", "more", "than", "a", "docstring", "parser", "." ]
def _parse_function_doc(func): """ Takes a function and returns the params and return value as a tuple. This is nothing more than a docstring parser. """ # TODO: things like utime(path, (atime, mtime)) and a(b [, b]) -> None doc = inspect.getdoc(func) if doc is None: return '', 'pas...
[ "def", "_parse_function_doc", "(", "func", ")", ":", "# TODO: things like utime(path, (atime, mtime)) and a(b [, b]) -> None", "doc", "=", "inspect", ".", "getdoc", "(", "func", ")", "if", "doc", "is", "None", ":", "return", "''", ",", "'pass'", "# get full string, pa...
https://github.com/fatih/subvim/blob/241b6d170597857105da219c9b7d36059e9f11fb/vim/base/YouCompleteMe/third_party/jedi/jedi/builtin.py#L342-L406
arangodb/arangodb
0d658689c7d1b721b314fa3ca27d38303e1570c8
3rdParty/V8/gyp/generator/analyzer.py
python
_ResolveParent
(path, base_path_components)
return '/'.join(base_path_components[0:len(base_path_components) - depth]) + \ '/' + path
Resolves |path|, which starts with at least one '../'. Returns an empty string if the path shouldn't be considered. See _AddSources() for a description of |base_path_components|.
Resolves |path|, which starts with at least one '../'. Returns an empty string if the path shouldn't be considered. See _AddSources() for a description of |base_path_components|.
[ "Resolves", "|path|", "which", "starts", "with", "at", "least", "one", "..", "/", ".", "Returns", "an", "empty", "string", "if", "the", "path", "shouldn", "t", "be", "considered", ".", "See", "_AddSources", "()", "for", "a", "description", "of", "|base_pat...
def _ResolveParent(path, base_path_components): """Resolves |path|, which starts with at least one '../'. Returns an empty string if the path shouldn't be considered. See _AddSources() for a description of |base_path_components|.""" depth = 0 while path.startswith('../'): depth += 1 path = path[3:] ...
[ "def", "_ResolveParent", "(", "path", ",", "base_path_components", ")", ":", "depth", "=", "0", "while", "path", ".", "startswith", "(", "'../'", ")", ":", "depth", "+=", "1", "path", "=", "path", "[", "3", ":", "]", "# Relative includes may go outside the s...
https://github.com/arangodb/arangodb/blob/0d658689c7d1b721b314fa3ca27d38303e1570c8/3rdParty/V8/gyp/generator/analyzer.py#L120-L135
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/klampt/robotsim.py
python
WidgetSet.remove
(self, subwidget: "Widget")
return _robotsim.WidgetSet_remove(self, subwidget)
r""" Args: subwidget (:class:`~klampt.Widget`)
r""" Args: subwidget (:class:`~klampt.Widget`)
[ "r", "Args", ":", "subwidget", "(", ":", "class", ":", "~klampt", ".", "Widget", ")" ]
def remove(self, subwidget: "Widget") ->None: r""" Args: subwidget (:class:`~klampt.Widget`) """ return _robotsim.WidgetSet_remove(self, subwidget)
[ "def", "remove", "(", "self", ",", "subwidget", ":", "\"Widget\"", ")", "->", "None", ":", "return", "_robotsim", ".", "WidgetSet_remove", "(", "self", ",", "subwidget", ")" ]
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/klampt/robotsim.py#L3400-L3405
Xilinx/XRT
dd071c90309df61d3ecdd92dca39f43804915c99
src/python/xrt_binding.py
python
xclGetBOProperties
(handle, boHandle, properties)
return _valueOrError(libcore.xclGetBOProperties(handle, boHandle, properties))
Obtain xclBOProperties struct for a BO :param handle: (xclDeviceHandle) device handle :param boHandle: (unsigned int) BO handle :param properties: BO properties struct pointer :return: 0 on success
Obtain xclBOProperties struct for a BO
[ "Obtain", "xclBOProperties", "struct", "for", "a", "BO" ]
def xclGetBOProperties(handle, boHandle, properties): """ Obtain xclBOProperties struct for a BO :param handle: (xclDeviceHandle) device handle :param boHandle: (unsigned int) BO handle :param properties: BO properties struct pointer :return: 0 on success """ _xclDeprecation(sys._getfra...
[ "def", "xclGetBOProperties", "(", "handle", ",", "boHandle", ",", "properties", ")", ":", "_xclDeprecation", "(", "sys", ".", "_getframe", "(", ")", ".", "f_code", ".", "co_name", ")", "libcore", ".", "xclGetBOProperties", ".", "restype", "=", "ctypes", ".",...
https://github.com/Xilinx/XRT/blob/dd071c90309df61d3ecdd92dca39f43804915c99/src/python/xrt_binding.py#L562-L574
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/AWSPythonSDK/1.5.8/s3transfer/compat.py
python
readable
(fileobj)
return hasattr(fileobj, 'read')
Determines whether or not a file-like object is readable. :param fileobj: The file-like object to determine if readable :returns: True, if readable. False otherwise.
Determines whether or not a file-like object is readable.
[ "Determines", "whether", "or", "not", "a", "file", "-", "like", "object", "is", "readable", "." ]
def readable(fileobj): """Determines whether or not a file-like object is readable. :param fileobj: The file-like object to determine if readable :returns: True, if readable. False otherwise. """ if hasattr(fileobj, 'readable'): return fileobj.readable() return hasattr(fileobj, 'read'...
[ "def", "readable", "(", "fileobj", ")", ":", "if", "hasattr", "(", "fileobj", ",", "'readable'", ")", ":", "return", "fileobj", ".", "readable", "(", ")", "return", "hasattr", "(", "fileobj", ",", "'read'", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/AWSPythonSDK/1.5.8/s3transfer/compat.py#L81-L91
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py3/scipy/stats/_distn_infrastructure.py
python
rv_generic.mean
(self, *args, **kwds)
return res
Mean of the distribution. Parameters ---------- arg1, arg2, arg3,... : array_like The shape parameter(s) for the distribution (see docstring of the instance object for more information) loc : array_like, optional location parameter (default=0) ...
Mean of the distribution.
[ "Mean", "of", "the", "distribution", "." ]
def mean(self, *args, **kwds): """ Mean of the distribution. Parameters ---------- arg1, arg2, arg3,... : array_like The shape parameter(s) for the distribution (see docstring of the instance object for more information) loc : array_like, optional...
[ "def", "mean", "(", "self", ",", "*", "args", ",", "*", "*", "kwds", ")", ":", "kwds", "[", "'moments'", "]", "=", "'m'", "res", "=", "self", ".", "stats", "(", "*", "args", ",", "*", "*", "kwds", ")", "if", "isinstance", "(", "res", ",", "nd...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py3/scipy/stats/_distn_infrastructure.py#L1196-L1220
oracle/graaljs
36a56e8e993d45fc40939a3a4d9c0c24990720f1
graal-nodejs/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py
python
XmlToString
(content, encoding="utf-8", pretty=False)
return "".join(xml_parts)
Writes the XML content to disk, touching the file only if it has changed. Visual Studio files have a lot of pre-defined structures. This function makes it easy to represent these structures as Python data structures, instead of having to create a lot of function calls. Each XML element of the content is repr...
Writes the XML content to disk, touching the file only if it has changed.
[ "Writes", "the", "XML", "content", "to", "disk", "touching", "the", "file", "only", "if", "it", "has", "changed", "." ]
def XmlToString(content, encoding="utf-8", pretty=False): """ Writes the XML content to disk, touching the file only if it has changed. Visual Studio files have a lot of pre-defined structures. This function makes it easy to represent these structures as Python data structures, instead of having to create a...
[ "def", "XmlToString", "(", "content", ",", "encoding", "=", "\"utf-8\"", ",", "pretty", "=", "False", ")", ":", "# We create a huge list of all the elements of the file.", "xml_parts", "=", "[", "'<?xml version=\"1.0\" encoding=\"%s\"?>'", "%", "encoding", "]", "if", "p...
https://github.com/oracle/graaljs/blob/36a56e8e993d45fc40939a3a4d9c0c24990720f1/graal-nodejs/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py#L12-L57
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/ipython/py3/IPython/utils/generics.py
python
inspect_object
(obj)
Called when you do obj?
Called when you do obj?
[ "Called", "when", "you", "do", "obj?" ]
def inspect_object(obj): """Called when you do obj?""" raise TryNext
[ "def", "inspect_object", "(", "obj", ")", ":", "raise", "TryNext" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/ipython/py3/IPython/utils/generics.py#L10-L12
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/asyncio/transports.py
python
WriteTransport.get_write_buffer_size
(self)
Return the current size of the write buffer.
Return the current size of the write buffer.
[ "Return", "the", "current", "size", "of", "the", "write", "buffer", "." ]
def get_write_buffer_size(self): """Return the current size of the write buffer.""" raise NotImplementedError
[ "def", "get_write_buffer_size", "(", "self", ")", ":", "raise", "NotImplementedError" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/asyncio/transports.py#L92-L94
eclipse/sumo
7132a9b8b6eea734bdec38479026b4d8c4336d03
tools/traci/_vehicle.py
python
_readNeighbors
(result)
return tuple(neighs)
result has structure: byte(TYPE_COMPOUND) | length(neighList) | Per list entry: string(vehID) | double(dist)
result has structure: byte(TYPE_COMPOUND) | length(neighList) | Per list entry: string(vehID) | double(dist)
[ "result", "has", "structure", ":", "byte", "(", "TYPE_COMPOUND", ")", "|", "length", "(", "neighList", ")", "|", "Per", "list", "entry", ":", "string", "(", "vehID", ")", "|", "double", "(", "dist", ")" ]
def _readNeighbors(result): """ result has structure: byte(TYPE_COMPOUND) | length(neighList) | Per list entry: string(vehID) | double(dist) """ num = result.readInt() # length of the vehicle list neighs = [] for _ in range(num): vehID = result.readString() dist = result.readDou...
[ "def", "_readNeighbors", "(", "result", ")", ":", "num", "=", "result", ".", "readInt", "(", ")", "# length of the vehicle list", "neighs", "=", "[", "]", "for", "_", "in", "range", "(", "num", ")", ":", "vehID", "=", "result", ".", "readString", "(", ...
https://github.com/eclipse/sumo/blob/7132a9b8b6eea734bdec38479026b4d8c4336d03/tools/traci/_vehicle.py#L160-L170
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Source/ThirdParty/CEF3/pristine/cef_source/tools/automate/automate-git.py
python
create_directory
(path)
Creates a directory if it doesn't already exist.
Creates a directory if it doesn't already exist.
[ "Creates", "a", "directory", "if", "it", "doesn", "t", "already", "exist", "." ]
def create_directory(path): """ Creates a directory if it doesn't already exist. """ if not os.path.exists(path): msg("Creating directory %s" % (path)); if not options.dryrun: os.makedirs(path)
[ "def", "create_directory", "(", "path", ")", ":", "if", "not", "os", ".", "path", ".", "exists", "(", "path", ")", ":", "msg", "(", "\"Creating directory %s\"", "%", "(", "path", ")", ")", "if", "not", "options", ".", "dryrun", ":", "os", ".", "maked...
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Source/ThirdParty/CEF3/pristine/cef_source/tools/automate/automate-git.py#L61-L66
LiquidPlayer/LiquidCore
9405979363f2353ac9a71ad8ab59685dd7f919c9
deps/node-10.15.3/tools/jinja2/runtime.py
python
Context.get_all
(self)
return dict(self.parent, **self.vars)
Return the complete context as dict including the exported variables. For optimizations reasons this might not return an actual copy so be careful with using it.
Return the complete context as dict including the exported variables. For optimizations reasons this might not return an actual copy so be careful with using it.
[ "Return", "the", "complete", "context", "as", "dict", "including", "the", "exported", "variables", ".", "For", "optimizations", "reasons", "this", "might", "not", "return", "an", "actual", "copy", "so", "be", "careful", "with", "using", "it", "." ]
def get_all(self): """Return the complete context as dict including the exported variables. For optimizations reasons this might not return an actual copy so be careful with using it. """ if not self.vars: return self.parent if not self.parent: re...
[ "def", "get_all", "(", "self", ")", ":", "if", "not", "self", ".", "vars", ":", "return", "self", ".", "parent", "if", "not", "self", ".", "parent", ":", "return", "self", ".", "vars", "return", "dict", "(", "self", ".", "parent", ",", "*", "*", ...
https://github.com/LiquidPlayer/LiquidCore/blob/9405979363f2353ac9a71ad8ab59685dd7f919c9/deps/node-10.15.3/tools/jinja2/runtime.py#L223-L232
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/xrc.py
python
XmlResource.LoadObjectRecursively
(*args, **kwargs)
return _xrc.XmlResource_LoadObjectRecursively(*args, **kwargs)
LoadObjectRecursively(self, Window parent, String name, String classname) -> Object
LoadObjectRecursively(self, Window parent, String name, String classname) -> Object
[ "LoadObjectRecursively", "(", "self", "Window", "parent", "String", "name", "String", "classname", ")", "-", ">", "Object" ]
def LoadObjectRecursively(*args, **kwargs): """LoadObjectRecursively(self, Window parent, String name, String classname) -> Object""" return _xrc.XmlResource_LoadObjectRecursively(*args, **kwargs)
[ "def", "LoadObjectRecursively", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_xrc", ".", "XmlResource_LoadObjectRecursively", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/xrc.py#L167-L169
francinexue/xuefu
b6ff79747a42e020588c0c0a921048e08fe4680c
ctpx/ctp2/ctptd.py
python
CtpTd.onErrRtnQuoteInsert
(self, InputQuoteField, RspInfoField)
报价录入错误回报
报价录入错误回报
[ "报价录入错误回报" ]
def onErrRtnQuoteInsert(self, InputQuoteField, RspInfoField): """报价录入错误回报""" pass
[ "def", "onErrRtnQuoteInsert", "(", "self", ",", "InputQuoteField", ",", "RspInfoField", ")", ":", "pass" ]
https://github.com/francinexue/xuefu/blob/b6ff79747a42e020588c0c0a921048e08fe4680c/ctpx/ctp2/ctptd.py#L403-L405
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib-tk/Tkinter.py
python
Canvas.insert
(self, *args)
Insert TEXT in item TAGORID at position POS. ARGS must be TAGORID POS TEXT.
Insert TEXT in item TAGORID at position POS. ARGS must be TAGORID POS TEXT.
[ "Insert", "TEXT", "in", "item", "TAGORID", "at", "position", "POS", ".", "ARGS", "must", "be", "TAGORID", "POS", "TEXT", "." ]
def insert(self, *args): """Insert TEXT in item TAGORID at position POS. ARGS must be TAGORID POS TEXT.""" self.tk.call((self._w, 'insert') + args)
[ "def", "insert", "(", "self", ",", "*", "args", ")", ":", "self", ".", "tk", ".", "call", "(", "(", "self", ".", "_w", ",", "'insert'", ")", "+", "args", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib-tk/Tkinter.py#L2334-L2337
domino-team/openwrt-cc
8b181297c34d14d3ca521cc9f31430d561dbc688
package/gli-pub/openwrt-node-packages-master/node/node-v6.9.1/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py
python
_VerifySourcesExist
(sources, root_dir)
return missing_sources
Verifies that all source files exist on disk. Checks that all regular source files, i.e. not created at run time, exist on disk. Missing files cause needless recompilation but no otherwise visible errors. Arguments: sources: A recursive list of Filter/file names. root_dir: The root directory for the ...
Verifies that all source files exist on disk.
[ "Verifies", "that", "all", "source", "files", "exist", "on", "disk", "." ]
def _VerifySourcesExist(sources, root_dir): """Verifies that all source files exist on disk. Checks that all regular source files, i.e. not created at run time, exist on disk. Missing files cause needless recompilation but no otherwise visible errors. Arguments: sources: A recursive list of Filter/file...
[ "def", "_VerifySourcesExist", "(", "sources", ",", "root_dir", ")", ":", "missing_sources", "=", "[", "]", "for", "source", "in", "sources", ":", "if", "isinstance", "(", "source", ",", "MSVSProject", ".", "Filter", ")", ":", "missing_sources", ".", "extend"...
https://github.com/domino-team/openwrt-cc/blob/8b181297c34d14d3ca521cc9f31430d561dbc688/package/gli-pub/openwrt-node-packages-master/node/node-v6.9.1/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py#L3095-L3117
psi4/psi4
be533f7f426b6ccc263904e55122899b16663395
psi4/driver/qcdb/libmintscoordentry.py
python
ZMatrixEntry.print_in_input_format
(self)
return text
Prints the updated geometry, in the format provided by the user
Prints the updated geometry, in the format provided by the user
[ "Prints", "the", "updated", "geometry", "in", "the", "format", "provided", "by", "the", "user" ]
def print_in_input_format(self): """Prints the updated geometry, in the format provided by the user""" text = "" if self.rto is None and self.ato is None and self.dto is None: # The first atom text += "\n" elif self.ato is None and self.dto is None: # ...
[ "def", "print_in_input_format", "(", "self", ")", ":", "text", "=", "\"\"", "if", "self", ".", "rto", "is", "None", "and", "self", ".", "ato", "is", "None", "and", "self", ".", "dto", "is", "None", ":", "# The first atom", "text", "+=", "\"\\n\"", "eli...
https://github.com/psi4/psi4/blob/be533f7f426b6ccc263904e55122899b16663395/psi4/driver/qcdb/libmintscoordentry.py#L466-L494
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/indexes/base.py
python
Index.duplicated
(self, keep="first")
return super().duplicated(keep=keep)
Indicate duplicate index values. Duplicated values are indicated as ``True`` values in the resulting array. Either all duplicates, all except the first, or all except the last occurrence of duplicates can be indicated. Parameters ---------- keep : {'first', 'last', Fals...
Indicate duplicate index values.
[ "Indicate", "duplicate", "index", "values", "." ]
def duplicated(self, keep="first"): """ Indicate duplicate index values. Duplicated values are indicated as ``True`` values in the resulting array. Either all duplicates, all except the first, or all except the last occurrence of duplicates can be indicated. Parameters ...
[ "def", "duplicated", "(", "self", ",", "keep", "=", "\"first\"", ")", ":", "return", "super", "(", ")", ".", "duplicated", "(", "keep", "=", "keep", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/indexes/base.py#L2025-L2079
kushview/Element
1cc16380caa2ab79461246ba758b9de1f46db2a5
waflib/Task.py
python
set_precedence_constraints
(tasks)
Updates the ``run_after`` attribute of all tasks based on the after/before/ext_out/ext_in attributes :param tasks: tasks :type tasks: list of :py:class:`waflib.Task.Task`
Updates the ``run_after`` attribute of all tasks based on the after/before/ext_out/ext_in attributes
[ "Updates", "the", "run_after", "attribute", "of", "all", "tasks", "based", "on", "the", "after", "/", "before", "/", "ext_out", "/", "ext_in", "attributes" ]
def set_precedence_constraints(tasks): """ Updates the ``run_after`` attribute of all tasks based on the after/before/ext_out/ext_in attributes :param tasks: tasks :type tasks: list of :py:class:`waflib.Task.Task` """ cstr_groups = Utils.defaultdict(list) for x in tasks: h = x.hash_constraints() cstr_groups...
[ "def", "set_precedence_constraints", "(", "tasks", ")", ":", "cstr_groups", "=", "Utils", ".", "defaultdict", "(", "list", ")", "for", "x", "in", "tasks", ":", "h", "=", "x", ".", "hash_constraints", "(", ")", "cstr_groups", "[", "h", "]", ".", "append",...
https://github.com/kushview/Element/blob/1cc16380caa2ab79461246ba758b9de1f46db2a5/waflib/Task.py#L998-L1038
moderngl/moderngl
32fe79927e02b0fa893b3603d677bdae39771e14
moderngl/texture.py
python
Texture.glo
(self)
return self._glo
int: The internal OpenGL object. This values is provided for debug purposes only.
int: The internal OpenGL object. This values is provided for debug purposes only.
[ "int", ":", "The", "internal", "OpenGL", "object", ".", "This", "values", "is", "provided", "for", "debug", "purposes", "only", "." ]
def glo(self) -> int: ''' int: The internal OpenGL object. This values is provided for debug purposes only. ''' return self._glo
[ "def", "glo", "(", "self", ")", "->", "int", ":", "return", "self", ".", "_glo" ]
https://github.com/moderngl/moderngl/blob/32fe79927e02b0fa893b3603d677bdae39771e14/moderngl/texture.py#L301-L307
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/third_party/lib_aarch64/python2.7/dist-packages/geographic_msgs/msg/_WayPoint.py
python
WayPoint.serialize_numpy
(self, buff, numpy)
serialize message with numpy array types into buffer :param buff: buffer, ``StringIO`` :param numpy: numpy python module
serialize message with numpy array types into buffer :param buff: buffer, ``StringIO`` :param numpy: numpy python module
[ "serialize", "message", "with", "numpy", "array", "types", "into", "buffer", ":", "param", "buff", ":", "buffer", "StringIO", ":", "param", "numpy", ":", "numpy", "python", "module" ]
def serialize_numpy(self, buff, numpy): """ serialize message with numpy array types into buffer :param buff: buffer, ``StringIO`` :param numpy: numpy python module """ try: _x = self.id.uuid # - if encoded as a list instead, serialize as bytes instead of string if type(_x) in ...
[ "def", "serialize_numpy", "(", "self", ",", "buff", ",", "numpy", ")", ":", "try", ":", "_x", "=", "self", ".", "id", ".", "uuid", "# - if encoded as a list instead, serialize as bytes instead of string", "if", "type", "(", "_x", ")", "in", "[", "list", ",", ...
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/third_party/lib_aarch64/python2.7/dist-packages/geographic_msgs/msg/_WayPoint.py#L182-L219
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqtinterfaces/mantidqtinterfaces/HFIR_4Circle_Reduction/reduce4circleControl.py
python
CWSCDReductionControl.save_scan_survey
(self, file_name)
return
Save scan-survey's result to a csv file :param file_name: :return:
Save scan-survey's result to a csv file :param file_name: :return:
[ "Save", "scan", "-", "survey", "s", "result", "to", "a", "csv", "file", ":", "param", "file_name", ":", ":", "return", ":" ]
def save_scan_survey(self, file_name): """ Save scan-survey's result to a csv file :param file_name: :return: """ # Check requirements assert isinstance(file_name, str) assert len(self._scanSummaryList) > 0 # Sort self._scanSummaryList.sor...
[ "def", "save_scan_survey", "(", "self", ",", "file_name", ")", ":", "# Check requirements", "assert", "isinstance", "(", "file_name", ",", "str", ")", "assert", "len", "(", "self", ".", "_scanSummaryList", ")", ">", "0", "# Sort", "self", ".", "_scanSummaryLis...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqtinterfaces/mantidqtinterfaces/HFIR_4Circle_Reduction/reduce4circleControl.py#L3341-L3374
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/python/summary/impl/gcs.py
python
ListRecursively
(top)
return tuples
Walks a directory tree, yielding (dir_path, file_paths) tuples. For each top |top| and its subdirectories, yields a tuple containing the path to the directory and the path to each of the contained files. Note that unlike os.Walk()/gfile.Walk(), this does not list subdirectories and the file paths are all abso...
Walks a directory tree, yielding (dir_path, file_paths) tuples.
[ "Walks", "a", "directory", "tree", "yielding", "(", "dir_path", "file_paths", ")", "tuples", "." ]
def ListRecursively(top): """Walks a directory tree, yielding (dir_path, file_paths) tuples. For each top |top| and its subdirectories, yields a tuple containing the path to the directory and the path to each of the contained files. Note that unlike os.Walk()/gfile.Walk(), this does not list subdirectories an...
[ "def", "ListRecursively", "(", "top", ")", ":", "if", "top", ".", "endswith", "(", "'/'", ")", ":", "wildcard", "=", "top", "+", "'**'", "else", ":", "wildcard", "=", "top", "+", "'/**'", "tuples", "=", "[", "]", "try", ":", "file_paths", "=", "Lis...
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/python/summary/impl/gcs.py#L56-L86
wywu/LAB
4b6debd302ae109fd104d4dd04dccc3418ae7471
examples/pycaffe/tools.py
python
SimpleTransformer.preprocess
(self, im)
return im
preprocess() emulate the pre-processing occurring in the vgg16 caffe prototxt.
preprocess() emulate the pre-processing occurring in the vgg16 caffe prototxt.
[ "preprocess", "()", "emulate", "the", "pre", "-", "processing", "occurring", "in", "the", "vgg16", "caffe", "prototxt", "." ]
def preprocess(self, im): """ preprocess() emulate the pre-processing occurring in the vgg16 caffe prototxt. """ im = np.float32(im) im = im[:, :, ::-1] # change to BGR im -= self.mean im *= self.scale im = im.transpose((2, 0, 1)) return...
[ "def", "preprocess", "(", "self", ",", "im", ")", ":", "im", "=", "np", ".", "float32", "(", "im", ")", "im", "=", "im", "[", ":", ",", ":", ",", ":", ":", "-", "1", "]", "# change to BGR", "im", "-=", "self", ".", "mean", "im", "*=", "self",...
https://github.com/wywu/LAB/blob/4b6debd302ae109fd104d4dd04dccc3418ae7471/examples/pycaffe/tools.py#L27-L39
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/propgrid.py
python
PGArrayEditorDialog.OnEndLabelEdit
(*args, **kwargs)
return _propgrid.PGArrayEditorDialog_OnEndLabelEdit(*args, **kwargs)
OnEndLabelEdit(self, ListEvent event)
OnEndLabelEdit(self, ListEvent event)
[ "OnEndLabelEdit", "(", "self", "ListEvent", "event", ")" ]
def OnEndLabelEdit(*args, **kwargs): """OnEndLabelEdit(self, ListEvent event)""" return _propgrid.PGArrayEditorDialog_OnEndLabelEdit(*args, **kwargs)
[ "def", "OnEndLabelEdit", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_propgrid", ".", "PGArrayEditorDialog_OnEndLabelEdit", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/propgrid.py#L3225-L3227
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/feature_column/sequence_feature_column.py
python
sequence_categorical_column_with_hash_bucket
( key, hash_bucket_size, dtype=dtypes.string)
return fc.SequenceCategoricalColumn( fc.categorical_column_with_hash_bucket( key=key, hash_bucket_size=hash_bucket_size, dtype=dtype))
A sequence of categorical terms where ids are set by hashing. Pass this to `embedding_column` or `indicator_column` to convert sequence categorical data into dense representation for input to sequence NN, such as RNN. Example: ```python tokens = sequence_categorical_column_with_hash_bucket( 'tokens...
A sequence of categorical terms where ids are set by hashing.
[ "A", "sequence", "of", "categorical", "terms", "where", "ids", "are", "set", "by", "hashing", "." ]
def sequence_categorical_column_with_hash_bucket( key, hash_bucket_size, dtype=dtypes.string): """A sequence of categorical terms where ids are set by hashing. Pass this to `embedding_column` or `indicator_column` to convert sequence categorical data into dense representation for input to sequence NN, such a...
[ "def", "sequence_categorical_column_with_hash_bucket", "(", "key", ",", "hash_bucket_size", ",", "dtype", "=", "dtypes", ".", "string", ")", ":", "return", "fc", ".", "SequenceCategoricalColumn", "(", "fc", ".", "categorical_column_with_hash_bucket", "(", "key", "=", ...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/feature_column/sequence_feature_column.py#L256-L298
ome/openmicroscopy
17d0a38493571540815074bfbf06932526fc3349
examples/Training/python/Read_Data.py
python
print_obj
(obj, indent=0)
Helper method to display info about OMERO objects. Not all objects will have a "name" or owner field.
Helper method to display info about OMERO objects. Not all objects will have a "name" or owner field.
[ "Helper", "method", "to", "display", "info", "about", "OMERO", "objects", ".", "Not", "all", "objects", "will", "have", "a", "name", "or", "owner", "field", "." ]
def print_obj(obj, indent=0): """ Helper method to display info about OMERO objects. Not all objects will have a "name" or owner field. """ print("""%s%s:%s Name:"%s" (owner=%s)""" % ( " " * indent, obj.OMERO_CLASS, obj.getId(), obj.getName(), obj.getOwnerOme...
[ "def", "print_obj", "(", "obj", ",", "indent", "=", "0", ")", ":", "print", "(", "\"\"\"%s%s:%s Name:\"%s\" (owner=%s)\"\"\"", "%", "(", "\" \"", "*", "indent", ",", "obj", ".", "OMERO_CLASS", ",", "obj", ".", "getId", "(", ")", ",", "obj", ".", "getNam...
https://github.com/ome/openmicroscopy/blob/17d0a38493571540815074bfbf06932526fc3349/examples/Training/python/Read_Data.py#L33-L43
mapnik/mapnik
f3da900c355e1d15059c4a91b00203dcc9d9f0ef
scons/scons-local-4.1.0/SCons/Node/__init__.py
python
Node.is_conftest
(self)
return True
Returns true if this node is an conftest node
Returns true if this node is an conftest node
[ "Returns", "true", "if", "this", "node", "is", "an", "conftest", "node" ]
def is_conftest(self): """ Returns true if this node is an conftest node""" try: self.attributes.conftest_node except AttributeError: return False return True
[ "def", "is_conftest", "(", "self", ")", ":", "try", ":", "self", ".", "attributes", ".", "conftest_node", "except", "AttributeError", ":", "return", "False", "return", "True" ]
https://github.com/mapnik/mapnik/blob/f3da900c355e1d15059c4a91b00203dcc9d9f0ef/scons/scons-local-4.1.0/SCons/Node/__init__.py#L942-L948
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/pstats.py
python
Stats.get_sort_arg_defs
(self)
return self.sort_arg_dict
Expand all abbreviations that are unique.
Expand all abbreviations that are unique.
[ "Expand", "all", "abbreviations", "that", "are", "unique", "." ]
def get_sort_arg_defs(self): """Expand all abbreviations that are unique.""" if not self.sort_arg_dict: self.sort_arg_dict = dict = {} bad_list = {} for word, tup in self.sort_arg_dict_default.iteritems(): fragment = word while fragment...
[ "def", "get_sort_arg_defs", "(", "self", ")", ":", "if", "not", "self", ".", "sort_arg_dict", ":", "self", ".", "sort_arg_dict", "=", "dict", "=", "{", "}", "bad_list", "=", "{", "}", "for", "word", ",", "tup", "in", "self", ".", "sort_arg_dict_default",...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/pstats.py#L190-L207
rdkit/rdkit
ede860ae316d12d8568daf5ee800921c3389c84e
External/pymol/modules/pymol/rpc.py
python
launch_XMLRPC
(hostname='', port=_xmlPort, nToTry=_nPortsToTry)
launches the xmlrpc server into a separate thread Arguments: hostname: (OPTIONAL) name of the host for the server (defaults to be the name of the localhost) port: (OPTIONAL) the first port to try for the server nToTry: (OPTIONAL) the number of possible ports to try (in case the ...
launches the xmlrpc server into a separate thread Arguments: hostname: (OPTIONAL) name of the host for the server (defaults to be the name of the localhost) port: (OPTIONAL) the first port to try for the server nToTry: (OPTIONAL) the number of possible ports to try (in case the ...
[ "launches", "the", "xmlrpc", "server", "into", "a", "separate", "thread", "Arguments", ":", "hostname", ":", "(", "OPTIONAL", ")", "name", "of", "the", "host", "for", "the", "server", "(", "defaults", "to", "be", "the", "name", "of", "the", "localhost", ...
def launch_XMLRPC(hostname='', port=_xmlPort, nToTry=_nPortsToTry): """ launches the xmlrpc server into a separate thread Arguments: hostname: (OPTIONAL) name of the host for the server (defaults to be the name of the localhost) port: (OPTIONAL) the first port to try for the server nT...
[ "def", "launch_XMLRPC", "(", "hostname", "=", "''", ",", "port", "=", "_xmlPort", ",", "nToTry", "=", "_nPortsToTry", ")", ":", "if", "not", "hostname", ":", "import", "os", "hostname", "=", "os", ".", "environ", ".", "get", "(", "'PYMOL_RPCHOST'", ",", ...
https://github.com/rdkit/rdkit/blob/ede860ae316d12d8568daf5ee800921c3389c84e/External/pymol/modules/pymol/rpc.py#L573-L640
PaddlePaddle/Anakin
5fd68a6cc4c4620cd1a30794c1bf06eebd3f4730
tools/external_converter_v2/parser/onnx/med_trans_util.py
python
MedTransAK.Activation
(self, med_attr, param)
grt act param :param med_attr: :param param: :return:
grt act param :param med_attr: :param param: :return:
[ "grt", "act", "param", ":", "param", "med_attr", ":", ":", "param", "param", ":", ":", "return", ":" ]
def Activation(self, med_attr, param): """ grt act param :param med_attr: :param param: :return: """ param.type = med_attr['type'] if med_attr['type'] == 'PReLU': if med_attr.get('channel_shared') is None: param.channel_shared =...
[ "def", "Activation", "(", "self", ",", "med_attr", ",", "param", ")", ":", "param", ".", "type", "=", "med_attr", "[", "'type'", "]", "if", "med_attr", "[", "'type'", "]", "==", "'PReLU'", ":", "if", "med_attr", ".", "get", "(", "'channel_shared'", ")"...
https://github.com/PaddlePaddle/Anakin/blob/5fd68a6cc4c4620cd1a30794c1bf06eebd3f4730/tools/external_converter_v2/parser/onnx/med_trans_util.py#L158-L171
arangodb/arangodb
0d658689c7d1b721b314fa3ca27d38303e1570c8
3rdParty/V8/gyp/NinjaWriter.py
python
NinjaWriter._WriteActionsRulesCopies
(self, spec, extra_sources, prebuild, mac_bundle_depends)
return stamp
Write out the Actions, Rules, and Copies steps. Return a path representing the outputs of these steps.
Write out the Actions, Rules, and Copies steps. Return a path representing the outputs of these steps.
[ "Write", "out", "the", "Actions", "Rules", "and", "Copies", "steps", ".", "Return", "a", "path", "representing", "the", "outputs", "of", "these", "steps", "." ]
def _WriteActionsRulesCopies(self, spec, extra_sources, prebuild, mac_bundle_depends): """Write out the Actions, Rules, and Copies steps. Return a path representing the outputs of these steps.""" outputs = [] if self.is_mac_bundle: mac_bundle_resources = spec.get('mac_bundle_resources', [])[:] ...
[ "def", "_WriteActionsRulesCopies", "(", "self", ",", "spec", ",", "extra_sources", ",", "prebuild", ",", "mac_bundle_depends", ")", ":", "outputs", "=", "[", "]", "if", "self", ".", "is_mac_bundle", ":", "mac_bundle_resources", "=", "spec", ".", "get", "(", ...
https://github.com/arangodb/arangodb/blob/0d658689c7d1b721b314fa3ca27d38303e1570c8/3rdParty/V8/gyp/NinjaWriter.py#L310-L340
dgobbi/vtk-dicom
9078df24cfeceead466a785d675b7a4afa034bba
Utilities/chartables.py
python
removesegs
(table, x, y=0)
Remove the final segments from a table, to allow mapping of replacement code 0xFFFD as if it were a normal code.
Remove the final segments from a table, to allow mapping of replacement code 0xFFFD as if it were a normal code.
[ "Remove", "the", "final", "segments", "from", "a", "table", "to", "allow", "mapping", "of", "replacement", "code", "0xFFFD", "as", "if", "it", "were", "a", "normal", "code", "." ]
def removesegs(table, x, y=0): """Remove the final segments from a table, to allow mapping of replacement code 0xFFFD as if it were a normal code.""" m = table[0] + 1 n = table[m] table[m] = n-x m += 1 table[m+n-x-y:m+n-y] = [] table[m+2*(n-x)-y:m+n-x+n-y] = [] table[m+3*(n-x)-y:m+2*...
[ "def", "removesegs", "(", "table", ",", "x", ",", "y", "=", "0", ")", ":", "m", "=", "table", "[", "0", "]", "+", "1", "n", "=", "table", "[", "m", "]", "table", "[", "m", "]", "=", "n", "-", "x", "m", "+=", "1", "table", "[", "m", "+",...
https://github.com/dgobbi/vtk-dicom/blob/9078df24cfeceead466a785d675b7a4afa034bba/Utilities/chartables.py#L749-L758
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/sysconfig.py
python
_parse_makefile
(filename, vars=None)
return vars
Parse a Makefile-style file. A dictionary containing name/value pairs is returned. If an optional dictionary is passed in as the second argument, it is used instead of a new dictionary.
Parse a Makefile-style file.
[ "Parse", "a", "Makefile", "-", "style", "file", "." ]
def _parse_makefile(filename, vars=None): """Parse a Makefile-style file. A dictionary containing name/value pairs is returned. If an optional dictionary is passed in as the second argument, it is used instead of a new dictionary. """ # Regexes needed for parsing Makefile (and similar syntaxes...
[ "def", "_parse_makefile", "(", "filename", ",", "vars", "=", "None", ")", ":", "# Regexes needed for parsing Makefile (and similar syntaxes,", "# like old-style Setup files).", "import", "re", "_variable_rx", "=", "re", ".", "compile", "(", "r\"([a-zA-Z][a-zA-Z0-9_]+)\\s*=\\s...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/sysconfig.py#L209-L330
hughperkins/tf-coriander
970d3df6c11400ad68405f22b0c42a52374e94ca
tensorflow/contrib/training/python/training/sampling_ops.py
python
_conditional_batch
(tensors, accept_prob, batch_size, queue_threads=10)
return out_tensor
Conditionally enqueue tensors based on accept_prob. Specifically, enqueue the element if accept_prob > rand_unif([0, 1]). Args: tensors: List of tensors to enqueue. accept_prob: Acceptance probability per example. batch_size: Size of batch. queue_threads: Number of threads enqueuing in the...
Conditionally enqueue tensors based on accept_prob.
[ "Conditionally", "enqueue", "tensors", "based", "on", "accept_prob", "." ]
def _conditional_batch(tensors, accept_prob, batch_size, queue_threads=10): """Conditionally enqueue tensors based on accept_prob. Specifically, enqueue the element if accept_prob > rand_unif([0, 1]). Args: tensors: List of tensors to enqueue. accept_prob: Acceptance probability per example. b...
[ "def", "_conditional_batch", "(", "tensors", ",", "accept_prob", ",", "batch_size", ",", "queue_threads", "=", "10", ")", ":", "accept_prob", ".", "get_shape", "(", ")", ".", "assert_has_rank", "(", "0", ")", "# Determine shapes and types of to-be-enqueued-tensors.", ...
https://github.com/hughperkins/tf-coriander/blob/970d3df6c11400ad68405f22b0c42a52374e94ca/tensorflow/contrib/training/python/training/sampling_ops.py#L377-L426
microsoft/CNTK
e9396480025b9ca457d26b6f33dd07c474c6aa04
bindings/python/cntk/ops/__init__.py
python
pow
(base, exponent, name='')
return pow(base, exponent, name)
Computes `base` raised to the power of `exponent`. It supports broadcasting. This is well defined if `base` is non-negative or `exponent` is an integer. Otherwise the result is NaN. The gradient with respect to the base is well defined if the forward operation is well defined. The gradient with respect ...
Computes `base` raised to the power of `exponent`. It supports broadcasting. This is well defined if `base` is non-negative or `exponent` is an integer. Otherwise the result is NaN. The gradient with respect to the base is well defined if the forward operation is well defined. The gradient with respect ...
[ "Computes", "base", "raised", "to", "the", "power", "of", "exponent", ".", "It", "supports", "broadcasting", ".", "This", "is", "well", "defined", "if", "base", "is", "non", "-", "negative", "or", "exponent", "is", "an", "integer", ".", "Otherwise", "the",...
def pow(base, exponent, name=''): ''' Computes `base` raised to the power of `exponent`. It supports broadcasting. This is well defined if `base` is non-negative or `exponent` is an integer. Otherwise the result is NaN. The gradient with respect to the base is well defined if the forward operation ...
[ "def", "pow", "(", "base", ",", "exponent", ",", "name", "=", "''", ")", ":", "from", "cntk", ".", "cntk_py", "import", "pow", "dtype", "=", "get_data_type", "(", "base", ",", "exponent", ")", "base", "=", "sanitize_input", "(", "base", ",", "dtype", ...
https://github.com/microsoft/CNTK/blob/e9396480025b9ca457d26b6f33dd07c474c6aa04/bindings/python/cntk/ops/__init__.py#L958-L987
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/third_party/lib_x86_64/python2.7/dist-packages/numpy/ma/core.py
python
MaskedArray.shrink_mask
(self)
return self
Reduce a mask to nomask when possible. Parameters ---------- None Returns ------- None Examples -------- >>> x = np.ma.array([[1,2 ], [3, 4]], mask=[0]*4) >>> x.mask array([[False, False], [False, False]], dtype=bo...
Reduce a mask to nomask when possible.
[ "Reduce", "a", "mask", "to", "nomask", "when", "possible", "." ]
def shrink_mask(self): """ Reduce a mask to nomask when possible. Parameters ---------- None Returns ------- None Examples -------- >>> x = np.ma.array([[1,2 ], [3, 4]], mask=[0]*4) >>> x.mask array([[False, False...
[ "def", "shrink_mask", "(", "self", ")", ":", "m", "=", "self", ".", "_mask", "if", "m", ".", "ndim", "and", "not", "m", ".", "any", "(", ")", ":", "self", ".", "_mask", "=", "nomask", "return", "self" ]
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/third_party/lib_x86_64/python2.7/dist-packages/numpy/ma/core.py#L3274-L3300
SGL-UT/GPSTk
2340ec1cbdbd0b80a204920127798697bc616b30
swig/doxy2swig.py
python
Doxy2SWIG.get_specific_nodes
(self, node, names)
return dict(nodes)
Given a node and a sequence of strings in `names`, return a dictionary containing the names as keys and child `ELEMENT_NODEs`, that have a `tagName` equal to the name.
Given a node and a sequence of strings in `names`, return a dictionary containing the names as keys and child `ELEMENT_NODEs`, that have a `tagName` equal to the name.
[ "Given", "a", "node", "and", "a", "sequence", "of", "strings", "in", "names", "return", "a", "dictionary", "containing", "the", "names", "as", "keys", "and", "child", "ELEMENT_NODEs", "that", "have", "a", "tagName", "equal", "to", "the", "name", "." ]
def get_specific_nodes(self, node, names): """Given a node and a sequence of strings in `names`, return a dictionary containing the names as keys and child `ELEMENT_NODEs`, that have a `tagName` equal to the name. """ nodes = [(x.tagName, x) for x in node.childNodes \ ...
[ "def", "get_specific_nodes", "(", "self", ",", "node", ",", "names", ")", ":", "nodes", "=", "[", "(", "x", ".", "tagName", ",", "x", ")", "for", "x", "in", "node", ".", "childNodes", "if", "x", ".", "nodeType", "==", "x", ".", "ELEMENT_NODE", "and...
https://github.com/SGL-UT/GPSTk/blob/2340ec1cbdbd0b80a204920127798697bc616b30/swig/doxy2swig.py#L157-L166
apple/turicreate
cce55aa5311300e3ce6af93cb45ba791fd1bdf49
deps/src/libxml2-2.9.1/python/libxml2class.py
python
schemaNewParserCtxt
(URL)
return SchemaParserCtxt(_obj=ret)
Create an XML Schemas parse context for that file/resource expected to contain an XML Schemas file.
Create an XML Schemas parse context for that file/resource expected to contain an XML Schemas file.
[ "Create", "an", "XML", "Schemas", "parse", "context", "for", "that", "file", "/", "resource", "expected", "to", "contain", "an", "XML", "Schemas", "file", "." ]
def schemaNewParserCtxt(URL): """Create an XML Schemas parse context for that file/resource expected to contain an XML Schemas file. """ ret = libxml2mod.xmlSchemaNewParserCtxt(URL) if ret is None:raise parserError('xmlSchemaNewParserCtxt() failed') return SchemaParserCtxt(_obj=ret)
[ "def", "schemaNewParserCtxt", "(", "URL", ")", ":", "ret", "=", "libxml2mod", ".", "xmlSchemaNewParserCtxt", "(", "URL", ")", "if", "ret", "is", "None", ":", "raise", "parserError", "(", "'xmlSchemaNewParserCtxt() failed'", ")", "return", "SchemaParserCtxt", "(", ...
https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/deps/src/libxml2-2.9.1/python/libxml2class.py#L1215-L1220
pytorch/glow
15baf2376f7ebff7d4e75ccb094624a9c1e9a089
utils/compilation_filter.py
python
DottyPrinter.dump_graph
(self, dottyFile: str)
Visits the graph and generates the dotty information.
Visits the graph and generates the dotty information.
[ "Visits", "the", "graph", "and", "generates", "the", "dotty", "information", "." ]
def dump_graph(self, dottyFile: str) -> None: """Visits the graph and generates the dotty information.""" self.visit_nodes() self.visit_edges() with open(f"transformations_{dottyFile}.dot", "w") as f: print( f"\nWriting DAG info into dotty file transformation...
[ "def", "dump_graph", "(", "self", ",", "dottyFile", ":", "str", ")", "->", "None", ":", "self", ".", "visit_nodes", "(", ")", "self", ".", "visit_edges", "(", ")", "with", "open", "(", "f\"transformations_{dottyFile}.dot\"", ",", "\"w\"", ")", "as", "f", ...
https://github.com/pytorch/glow/blob/15baf2376f7ebff7d4e75ccb094624a9c1e9a089/utils/compilation_filter.py#L128-L142
Slicer/Slicer
ba9fadf332cb0303515b68d8d06a344c82e3e3e5
Base/Python/slicer/util.py
python
loadScalarOverlay
(filename, modelNodeID, returnNode=False)
return loadNodeFromFile(filename, 'ScalarOverlayFile', {'modelNodeId': modelNodeID }, returnNode)
Load node from file. :param filename: full path of the file to load. :param returnNode: Deprecated. :return: loaded node (if multiple nodes are loaded then a list of nodes). If returnNode is True then a status flag and loaded node are returned.
Load node from file.
[ "Load", "node", "from", "file", "." ]
def loadScalarOverlay(filename, modelNodeID, returnNode=False): """Load node from file. :param filename: full path of the file to load. :param returnNode: Deprecated. :return: loaded node (if multiple nodes are loaded then a list of nodes). If returnNode is True then a status flag and loaded node are retur...
[ "def", "loadScalarOverlay", "(", "filename", ",", "modelNodeID", ",", "returnNode", "=", "False", ")", ":", "return", "loadNodeFromFile", "(", "filename", ",", "'ScalarOverlayFile'", ",", "{", "'modelNodeId'", ":", "modelNodeID", "}", ",", "returnNode", ")" ]
https://github.com/Slicer/Slicer/blob/ba9fadf332cb0303515b68d8d06a344c82e3e3e5/Base/Python/slicer/util.py#L772-L780
emscripten-core/emscripten
0d413d3c5af8b28349682496edc14656f5700c2f
third_party/WebIDL.py
python
Parser.p_UnsignedIntegerTypeUnsigned
(self, p)
UnsignedIntegerType : UNSIGNED IntegerType
UnsignedIntegerType : UNSIGNED IntegerType
[ "UnsignedIntegerType", ":", "UNSIGNED", "IntegerType" ]
def p_UnsignedIntegerTypeUnsigned(self, p): """ UnsignedIntegerType : UNSIGNED IntegerType """ p[0] = p[2] + 1
[ "def", "p_UnsignedIntegerTypeUnsigned", "(", "self", ",", "p", ")", ":", "p", "[", "0", "]", "=", "p", "[", "2", "]", "+", "1" ]
https://github.com/emscripten-core/emscripten/blob/0d413d3c5af8b28349682496edc14656f5700c2f/third_party/WebIDL.py#L4749-L4753
Tencent/CMONGO
c40380caa14e05509f46993aa8b8da966b09b0b5
buildscripts/cpplint.py
python
_BlockInfo.CheckBegin
(self, filename, clean_lines, linenum, error)
Run checks that applies to text up to the opening brace. This is mostly for checking the text after the class identifier and the "{", usually where the base class is specified. For other blocks, there isn't much to check, so we always pass. Args: filename: The name of the current file. cl...
Run checks that applies to text up to the opening brace.
[ "Run", "checks", "that", "applies", "to", "text", "up", "to", "the", "opening", "brace", "." ]
def CheckBegin(self, filename, clean_lines, linenum, error): """Run checks that applies to text up to the opening brace. This is mostly for checking the text after the class identifier and the "{", usually where the base class is specified. For other blocks, there isn't much to check, so we always pas...
[ "def", "CheckBegin", "(", "self", ",", "filename", ",", "clean_lines", ",", "linenum", ",", "error", ")", ":", "pass" ]
https://github.com/Tencent/CMONGO/blob/c40380caa14e05509f46993aa8b8da966b09b0b5/buildscripts/cpplint.py#L2012-L2025
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib-tk/Tkinter.py
python
Spinbox.delete
(self, first, last=None)
return self.tk.call(self._w, 'delete', first, last)
Delete one or more elements of the spinbox. First is the index of the first character to delete, and last is the index of the character just after the last one to delete. If last isn't specified it defaults to first+1, i.e. a single character is deleted. This command returns an...
Delete one or more elements of the spinbox.
[ "Delete", "one", "or", "more", "elements", "of", "the", "spinbox", "." ]
def delete(self, first, last=None): """Delete one or more elements of the spinbox. First is the index of the first character to delete, and last is the index of the character just after the last one to delete. If last isn't specified it defaults to first+1, i.e. a single charact...
[ "def", "delete", "(", "self", ",", "first", ",", "last", "=", "None", ")", ":", "return", "self", ".", "tk", ".", "call", "(", "self", ".", "_w", ",", "'delete'", ",", "first", ",", "last", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib-tk/Tkinter.py#L3416-L3425
intel/llvm
e6d0547e9d99b5a56430c4749f6c7e328bf221ab
llvm/bindings/python/llvm/object.py
python
ObjectFile.__init__
(self, filename=None, contents=None)
Construct an instance from a filename or binary data. filename must be a path to a file that can be opened with open(). contents can be either a native Python buffer type (like str) or a llvm.core.MemoryBuffer instance.
Construct an instance from a filename or binary data.
[ "Construct", "an", "instance", "from", "a", "filename", "or", "binary", "data", "." ]
def __init__(self, filename=None, contents=None): """Construct an instance from a filename or binary data. filename must be a path to a file that can be opened with open(). contents can be either a native Python buffer type (like str) or a llvm.core.MemoryBuffer instance. """ ...
[ "def", "__init__", "(", "self", ",", "filename", "=", "None", ",", "contents", "=", "None", ")", ":", "if", "contents", ":", "assert", "isinstance", "(", "contents", ",", "MemoryBuffer", ")", "if", "filename", "is", "not", "None", ":", "contents", "=", ...
https://github.com/intel/llvm/blob/e6d0547e9d99b5a56430c4749f6c7e328bf221ab/llvm/bindings/python/llvm/object.py#L102-L120
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/help/inspector.py
python
list_modules_in_package
(package, module_filters=_default_module_filters)
Yield all modules in a given package. Recursively walks the package tree.
Yield all modules in a given package.
[ "Yield", "all", "modules", "in", "a", "given", "package", "." ]
def list_modules_in_package(package, module_filters=_default_module_filters): """Yield all modules in a given package. Recursively walks the package tree. """ onerror_ignore = lambda _: None prefix = package.__name__ + "." package_walker = pkgutil.walk_packages( package.__path__, ...
[ "def", "list_modules_in_package", "(", "package", ",", "module_filters", "=", "_default_module_filters", ")", ":", "onerror_ignore", "=", "lambda", "_", ":", "None", "prefix", "=", "package", ".", "__name__", "+", "\".\"", "package_walker", "=", "pkgutil", ".", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/help/inspector.py#L151-L200
panda3d/panda3d
833ad89ebad58395d0af0b7ec08538e5e4308265
contrib/src/sceneeditor/seParticlePanel.py
python
ParticlePanel.createInterface
(self)
# Avoid for now forceMenu.add_command(label = 'Add Linear User Defined Force', command = self.addLinearUserDefinedForce)
# Avoid for now forceMenu.add_command(label = 'Add Linear User Defined Force', command = self.addLinearUserDefinedForce)
[ "#", "Avoid", "for", "now", "forceMenu", ".", "add_command", "(", "label", "=", "Add", "Linear", "User", "Defined", "Force", "command", "=", "self", ".", "addLinearUserDefinedForce", ")" ]
def createInterface(self): # Handle to the toplevels hull interior = self.interior() # Create particle panel menu items ## MENUBAR ENTRIES ## # FILE MENU # Get a handle on the file menu so commands can be inserted # before quit item fileMenu = self.menuB...
[ "def", "createInterface", "(", "self", ")", ":", "# Handle to the toplevels hull", "interior", "=", "self", ".", "interior", "(", ")", "# Create particle panel menu items", "## MENUBAR ENTRIES ##", "# FILE MENU", "# Get a handle on the file menu so commands can be inserted", "# b...
https://github.com/panda3d/panda3d/blob/833ad89ebad58395d0af0b7ec08538e5e4308265/contrib/src/sceneeditor/seParticlePanel.py#L88-L734
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pexpect/pexpect/utils.py
python
is_executable_file
(path)
return os.access(fpath, os.X_OK)
Checks that path is an executable regular file, or a symlink towards one. This is roughly ``os.path isfile(path) and os.access(path, os.X_OK)``.
Checks that path is an executable regular file, or a symlink towards one.
[ "Checks", "that", "path", "is", "an", "executable", "regular", "file", "or", "a", "symlink", "towards", "one", "." ]
def is_executable_file(path): """Checks that path is an executable regular file, or a symlink towards one. This is roughly ``os.path isfile(path) and os.access(path, os.X_OK)``. """ # follow symlinks, fpath = os.path.realpath(path) if not os.path.isfile(fpath): # non-files (directories...
[ "def", "is_executable_file", "(", "path", ")", ":", "# follow symlinks,", "fpath", "=", "os", ".", "path", ".", "realpath", "(", "path", ")", "if", "not", "os", ".", "path", ".", "isfile", "(", "fpath", ")", ":", "# non-files (directories, fifo, etc.)", "ret...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pexpect/pexpect/utils.py#L20-L45
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/ops/_op_impl/tbe/erf_ds.py
python
_erf_ds_op_tbe
()
return
Erf TBE register
Erf TBE register
[ "Erf", "TBE", "register" ]
def _erf_ds_op_tbe(): """Erf TBE register""" return
[ "def", "_erf_ds_op_tbe", "(", ")", ":", "return" ]
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/ops/_op_impl/tbe/erf_ds.py#L36-L38
Samsung/veles
95ed733c2e49bc011ad98ccf2416ecec23fbf352
veles/external/pydot.py
python
Graph.get_subgraph
(self, name)
return match
Retrieved a subgraph from the graph. Given a subgraph's name the corresponding Subgraph instance will be returned. If one or more subgraphs exist with the same name, a list of Subgraph instances is returned. An empty list is returned otherwise.
Retrieved a subgraph from the graph. Given a subgraph's name the corresponding Subgraph instance will be returned. If one or more subgraphs exist with the same name, a list of Subgraph instances is returned. An empty list is returned otherwise.
[ "Retrieved", "a", "subgraph", "from", "the", "graph", ".", "Given", "a", "subgraph", "s", "name", "the", "corresponding", "Subgraph", "instance", "will", "be", "returned", ".", "If", "one", "or", "more", "subgraphs", "exist", "with", "the", "same", "name", ...
def get_subgraph(self, name): """Retrieved a subgraph from the graph. Given a subgraph's name the corresponding Subgraph instance will be returned. If one or more subgraphs exist with the same name, a list of Subgraph instances is returned. An empty list...
[ "def", "get_subgraph", "(", "self", ",", "name", ")", ":", "match", "=", "list", "(", ")", "if", "name", "in", "self", ".", "obj_dict", "[", "'subgraphs'", "]", ":", "sgraphs_obj_dict", "=", "self", ".", "obj_dict", "[", "'subgraphs'", "]", ".", "get",...
https://github.com/Samsung/veles/blob/95ed733c2e49bc011ad98ccf2416ecec23fbf352/veles/external/pydot.py#L1502-L1523
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_windows.py
python
Frame.Create
(*args, **kwargs)
return _windows_.Frame_Create(*args, **kwargs)
Create(self, Window parent, int id=-1, String title=EmptyString, Point pos=DefaultPosition, Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> bool
Create(self, Window parent, int id=-1, String title=EmptyString, Point pos=DefaultPosition, Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> bool
[ "Create", "(", "self", "Window", "parent", "int", "id", "=", "-", "1", "String", "title", "=", "EmptyString", "Point", "pos", "=", "DefaultPosition", "Size", "size", "=", "DefaultSize", "long", "style", "=", "DEFAULT_FRAME_STYLE", "String", "name", "=", "Fra...
def Create(*args, **kwargs): """ Create(self, Window parent, int id=-1, String title=EmptyString, Point pos=DefaultPosition, Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> bool """ return _windows_.Frame_Create(*args, **kwarg...
[ "def", "Create", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_windows_", ".", "Frame_Create", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_windows.py#L583-L589
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/lib-tk/Tkinter.py
python
OptionMenu.__init__
(self, master, variable, value, *values, **kwargs)
Construct an optionmenu widget with the parent MASTER, with the resource textvariable set to VARIABLE, the initially selected value VALUE, the other menu values VALUES and an additional keyword argument command.
Construct an optionmenu widget with the parent MASTER, with the resource textvariable set to VARIABLE, the initially selected value VALUE, the other menu values VALUES and an additional keyword argument command.
[ "Construct", "an", "optionmenu", "widget", "with", "the", "parent", "MASTER", "with", "the", "resource", "textvariable", "set", "to", "VARIABLE", "the", "initially", "selected", "value", "VALUE", "the", "other", "menu", "values", "VALUES", "and", "an", "addition...
def __init__(self, master, variable, value, *values, **kwargs): """Construct an optionmenu widget with the parent MASTER, with the resource textvariable set to VARIABLE, the initially selected value VALUE, the other menu values VALUES and an additional keyword argument command.""" ...
[ "def", "__init__", "(", "self", ",", "master", ",", "variable", ",", "value", ",", "*", "values", ",", "*", "*", "kwargs", ")", ":", "kw", "=", "{", "\"borderwidth\"", ":", "2", ",", "\"textvariable\"", ":", "variable", ",", "\"indicatoron\"", ":", "1"...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/lib-tk/Tkinter.py#L3204-L3227
nasa/astrobee
9241e67e6692810d6e275abb3165b6d02f4ca5ef
scripts/git/cpplint.py
python
ProcessFile
(filename, vlevel, extra_check_functions=[])
Does google-lint on a single file. Args: filename: The name of the file to parse. vlevel: The level of errors to report. Every error of confidence >= verbose_level will be reported. 0 is a good default. extra_check_functions: An array of additional check functions that will be ...
Does google-lint on a single file.
[ "Does", "google", "-", "lint", "on", "a", "single", "file", "." ]
def ProcessFile(filename, vlevel, extra_check_functions=[]): """Does google-lint on a single file. Args: filename: The name of the file to parse. vlevel: The level of errors to report. Every error of confidence >= verbose_level will be reported. 0 is a good default. extra_check_func...
[ "def", "ProcessFile", "(", "filename", ",", "vlevel", ",", "extra_check_functions", "=", "[", "]", ")", ":", "_SetVerboseLevel", "(", "vlevel", ")", "_BackupFilters", "(", ")", "if", "not", "ProcessConfigOverrides", "(", "filename", ")", ":", "_RestoreFilters", ...
https://github.com/nasa/astrobee/blob/9241e67e6692810d6e275abb3165b6d02f4ca5ef/scripts/git/cpplint.py#L6844-L6940
oracle/graaljs
36a56e8e993d45fc40939a3a4d9c0c24990720f1
graal-nodejs/deps/v8/tools/sanitizers/sancov_merger.py
python
merge_two
(args)
Merge two sancov files. Called trough multiprocessing pool. The args are expected to unpack to: swarming_output_dir: Folder where to find the new file. coverage_dir: Folder where to find the existing file. f: File name of the file to be merged.
Merge two sancov files.
[ "Merge", "two", "sancov", "files", "." ]
def merge_two(args): """Merge two sancov files. Called trough multiprocessing pool. The args are expected to unpack to: swarming_output_dir: Folder where to find the new file. coverage_dir: Folder where to find the existing file. f: File name of the file to be merged. """ swarming_output_dir, cover...
[ "def", "merge_two", "(", "args", ")", ":", "swarming_output_dir", ",", "coverage_dir", ",", "f", "=", "args", "input_file", "=", "os", ".", "path", ".", "join", "(", "swarming_output_dir", ",", "f", ")", "output_file", "=", "os", ".", "path", ".", "join"...
https://github.com/oracle/graaljs/blob/36a56e8e993d45fc40939a3a4d9c0c24990720f1/graal-nodejs/deps/v8/tools/sanitizers/sancov_merger.py#L160-L179
google/llvm-propeller
45c226984fe8377ebfb2ad7713c680d652ba678d
lldb/examples/python/gdbremote.py
python
RegisterInfo.byte_size
(self)
return self.bit_size() / 8
Get the size in bytes of the register.
Get the size in bytes of the register.
[ "Get", "the", "size", "in", "bytes", "of", "the", "register", "." ]
def byte_size(self): '''Get the size in bytes of the register.''' return self.bit_size() / 8
[ "def", "byte_size", "(", "self", ")", ":", "return", "self", ".", "bit_size", "(", ")", "/", "8" ]
https://github.com/google/llvm-propeller/blob/45c226984fe8377ebfb2ad7713c680d652ba678d/lldb/examples/python/gdbremote.py#L362-L364
eclipse/sumo
7132a9b8b6eea734bdec38479026b4d8c4336d03
tools/contributed/sumopy/coremodules/simulation/results.py
python
TripresultReader.__init__
(self, trips, element, sumo, attrsconfigs_cumulative, attrsconfigs_average)
element is "lane" or "edge" or "tripinfo" or "personinfo" attrnames is a list of attribute names to read.
element is "lane" or "edge" or "tripinfo" or "personinfo" attrnames is a list of attribute names to read.
[ "element", "is", "lane", "or", "edge", "or", "tripinfo", "or", "personinfo", "attrnames", "is", "a", "list", "of", "attribute", "names", "to", "read", "." ]
def __init__(self, trips, element, sumo, attrsconfigs_cumulative, attrsconfigs_average): """ element is "lane" or "edge" or "tripinfo" or "personinfo" attrnames is a list of attribute names to read. """ self._trips = trips #IntervalAvReader2.__init__(self, element,sumo, ...
[ "def", "__init__", "(", "self", ",", "trips", ",", "element", ",", "sumo", ",", "attrsconfigs_cumulative", ",", "attrsconfigs_average", ")", ":", "self", ".", "_trips", "=", "trips", "#IntervalAvReader2.__init__(self, element,sumo, attrsconfigs_cumulative, attrsconfigs_ave...
https://github.com/eclipse/sumo/blob/7132a9b8b6eea734bdec38479026b4d8c4336d03/tools/contributed/sumopy/coremodules/simulation/results.py#L2190-L2216
pmq20/node-packer
12c46c6e44fbc14d9ee645ebd17d5296b324f7e0
current/tools/gyp/pylib/gyp/generator/make.py
python
Sourceify
(path)
return srcdir_prefix + path
Convert a path to its source directory form.
Convert a path to its source directory form.
[ "Convert", "a", "path", "to", "its", "source", "directory", "form", "." ]
def Sourceify(path): """Convert a path to its source directory form.""" if '$(' in path: return path if os.path.isabs(path): return path return srcdir_prefix + path
[ "def", "Sourceify", "(", "path", ")", ":", "if", "'$('", "in", "path", ":", "return", "path", "if", "os", ".", "path", ".", "isabs", "(", "path", ")", ":", "return", "path", "return", "srcdir_prefix", "+", "path" ]
https://github.com/pmq20/node-packer/blob/12c46c6e44fbc14d9ee645ebd17d5296b324f7e0/current/tools/gyp/pylib/gyp/generator/make.py#L640-L646
hcdth011/ROS-Hydro-SLAM
629448eecd2c9a3511158115fa53ea9e4ae41359
rpg_vikit/vikit_py/src/vikit_py/transformations.py
python
identity_matrix
()
return numpy.identity(4, dtype=numpy.float64)
Return 4x4 identity/unit matrix. >>> I = identity_matrix() >>> numpy.allclose(I, numpy.dot(I, I)) True >>> numpy.sum(I), numpy.trace(I) (4.0, 4.0) >>> numpy.allclose(I, numpy.identity(4, dtype=numpy.float64)) True
Return 4x4 identity/unit matrix.
[ "Return", "4x4", "identity", "/", "unit", "matrix", "." ]
def identity_matrix(): """Return 4x4 identity/unit matrix. >>> I = identity_matrix() >>> numpy.allclose(I, numpy.dot(I, I)) True >>> numpy.sum(I), numpy.trace(I) (4.0, 4.0) >>> numpy.allclose(I, numpy.identity(4, dtype=numpy.float64)) True """ return numpy.identity(4, dtype=num...
[ "def", "identity_matrix", "(", ")", ":", "return", "numpy", ".", "identity", "(", "4", ",", "dtype", "=", "numpy", ".", "float64", ")" ]
https://github.com/hcdth011/ROS-Hydro-SLAM/blob/629448eecd2c9a3511158115fa53ea9e4ae41359/rpg_vikit/vikit_py/src/vikit_py/transformations.py#L180-L192
apple/swift-lldb
d74be846ef3e62de946df343e8c234bde93a8912
scripts/Python/static-binding/lldb.py
python
SBThread.GetCurrentException
(self)
return _lldb.SBThread_GetCurrentException(self)
Returns an SBValue object represeting the current exception for the thread, if there is any. Currently, this works for Obj-C code and returns an SBValue representing the NSException object at the throw site or that's currently being processes.
[]
def GetCurrentException(self): """ Returns an SBValue object represeting the current exception for the thread, if there is any. Currently, this works for Obj-C code and returns an SBValue representing the NSException object at the throw site or that's currently being processes. ...
[ "def", "GetCurrentException", "(", "self", ")", ":", "return", "_lldb", ".", "SBThread_GetCurrentException", "(", "self", ")" ]
https://github.com/apple/swift-lldb/blob/d74be846ef3e62de946df343e8c234bde93a8912/scripts/Python/static-binding/lldb.py#L11912-L11920
hughperkins/tf-coriander
970d3df6c11400ad68405f22b0c42a52374e94ca
tensorflow/contrib/specs/python/specs_ops.py
python
Shared.funcall
(self, x)
Apply the shared operator to an input. This wraps a variable scope around the creation of the subnet. Args: x: The input argument on which the subnet is invoked. Returns: The output tensor from invoking the subnet constructor.
Apply the shared operator to an input.
[ "Apply", "the", "shared", "operator", "to", "an", "input", "." ]
def funcall(self, x): """Apply the shared operator to an input. This wraps a variable scope around the creation of the subnet. Args: x: The input argument on which the subnet is invoked. Returns: The output tensor from invoking the subnet constructor. """ if self.scope is None...
[ "def", "funcall", "(", "self", ",", "x", ")", ":", "if", "self", ".", "scope", "is", "None", ":", "with", "tf", ".", "variable_scope", "(", "self", ".", "name", ",", "values", "=", "[", "x", "]", ")", "as", "scope", ":", "self", ".", "scope", "...
https://github.com/hughperkins/tf-coriander/blob/970d3df6c11400ad68405f22b0c42a52374e94ca/tensorflow/contrib/specs/python/specs_ops.py#L220-L237
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/python/summary/impl/directory_watcher.py
python
DirectoryWatcher._HasOOOWrite
(self, path)
Returns whether the path has had an out-of-order write.
Returns whether the path has had an out-of-order write.
[ "Returns", "whether", "the", "path", "has", "had", "an", "out", "-", "of", "-", "order", "write", "." ]
def _HasOOOWrite(self, path): """Returns whether the path has had an out-of-order write.""" # Check the sizes of each path before the current one. size = io_wrapper.Size(path) old_size = self._finalized_sizes.get(path, None) if size != old_size: if old_size is None: logging.error('File...
[ "def", "_HasOOOWrite", "(", "self", ",", "path", ")", ":", "# Check the sizes of each path before the current one.", "size", "=", "io_wrapper", ".", "Size", "(", "path", ")", "old_size", "=", "self", ".", "_finalized_sizes", ".", "get", "(", "path", ",", "None",...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/python/summary/impl/directory_watcher.py#L207-L221
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/contrib/graph_editor/select.py
python
filter_ts
(ops, positive_filter)
return ts
Get all the tensors which are input or output of an op in ops. Args: ops: an object convertible to a list of `tf.Operation`. positive_filter: a function deciding whether to keep a tensor or not. If `True`, all the tensors are returned. Returns: A list of `tf.Tensor`. Raises: TypeError: if o...
Get all the tensors which are input or output of an op in ops.
[ "Get", "all", "the", "tensors", "which", "are", "input", "or", "output", "of", "an", "op", "in", "ops", "." ]
def filter_ts(ops, positive_filter): """Get all the tensors which are input or output of an op in ops. Args: ops: an object convertible to a list of `tf.Operation`. positive_filter: a function deciding whether to keep a tensor or not. If `True`, all the tensors are returned. Returns: A list of ...
[ "def", "filter_ts", "(", "ops", ",", "positive_filter", ")", ":", "ops", "=", "util", ".", "make_list_of_op", "(", "ops", ")", "ts", "=", "_get_input_ts", "(", "ops", ")", "util", ".", "concatenate_unique", "(", "ts", ",", "_get_output_ts", "(", "ops", "...
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/contrib/graph_editor/select.py#L115-L132
arangodb/arangodb
0d658689c7d1b721b314fa3ca27d38303e1570c8
3rdParty/V8/gyp/msvs_emulation.py
python
_GetEnvironment
(arch, vs)
return env
This function will run the VC environment setup script, retrieve variables, and also the path on cl.exe. It will then try to cache the values to disk, and on next run will try to lookup the cache. The cache key is the path to the setup script (which is embedded within each Visual Studio installed instance) + it...
This function will run the VC environment setup script, retrieve variables, and also the path on cl.exe. It will then try to cache the values to disk, and on next run will try to lookup the cache. The cache key is the path to the setup script (which is embedded within each Visual Studio installed instance) + it...
[ "This", "function", "will", "run", "the", "VC", "environment", "setup", "script", "retrieve", "variables", "and", "also", "the", "path", "on", "cl", ".", "exe", ".", "It", "will", "then", "try", "to", "cache", "the", "values", "to", "disk", "and", "on", ...
def _GetEnvironment(arch, vs): """ This function will run the VC environment setup script, retrieve variables, and also the path on cl.exe. It will then try to cache the values to disk, and on next run will try to lookup the cache. The cache key is the path to the setup script (which is embedded within each...
[ "def", "_GetEnvironment", "(", "arch", ",", "vs", ")", ":", "args", "=", "vs", ".", "SetupScript", "(", "arch", ")", "args", ".", "extend", "(", "(", "'&&'", ",", "'set'", ",", "'&&'", ",", "'where'", ",", "'cl.exe'", ")", ")", "args_slug", "=", "'...
https://github.com/arangodb/arangodb/blob/0d658689c7d1b721b314fa3ca27d38303e1570c8/3rdParty/V8/gyp/msvs_emulation.py#L948-L1003
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/numpy/array_ops.py
python
dsplit
(x, indices_or_sections)
return split(x, indices_or_sections, 2)
Splits a tensor into multiple sub-tensors along the 3rd axis (depth). It is equivalent to split with :math:`axis=2` (default), the array is always split along the third axis regardless of the array dimension. Args: x (Tensor): A Tensor to be divided. indices_or_sections (Union[int, tuple(in...
Splits a tensor into multiple sub-tensors along the 3rd axis (depth). It is equivalent to split with :math:`axis=2` (default), the array is always split along the third axis regardless of the array dimension.
[ "Splits", "a", "tensor", "into", "multiple", "sub", "-", "tensors", "along", "the", "3rd", "axis", "(", "depth", ")", ".", "It", "is", "equivalent", "to", "split", "with", ":", "math", ":", "axis", "=", "2", "(", "default", ")", "the", "array", "is",...
def dsplit(x, indices_or_sections): """ Splits a tensor into multiple sub-tensors along the 3rd axis (depth). It is equivalent to split with :math:`axis=2` (default), the array is always split along the third axis regardless of the array dimension. Args: x (Tensor): A Tensor to be divided. ...
[ "def", "dsplit", "(", "x", ",", "indices_or_sections", ")", ":", "return", "split", "(", "x", ",", "indices_or_sections", ",", "2", ")" ]
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/numpy/array_ops.py#L1567-L1609
pmq20/node-packer
12c46c6e44fbc14d9ee645ebd17d5296b324f7e0
current/tools/gyp/pylib/gyp/xcode_emulation.py
python
GetStdoutQuiet
(cmdlist)
return out.rstrip('\n')
Returns the content of standard output returned by invoking |cmdlist|. Ignores the stderr. Raises |GypError| if the command return with a non-zero return code.
Returns the content of standard output returned by invoking |cmdlist|. Ignores the stderr. Raises |GypError| if the command return with a non-zero return code.
[ "Returns", "the", "content", "of", "standard", "output", "returned", "by", "invoking", "|cmdlist|", ".", "Ignores", "the", "stderr", ".", "Raises", "|GypError|", "if", "the", "command", "return", "with", "a", "non", "-", "zero", "return", "code", "." ]
def GetStdoutQuiet(cmdlist): """Returns the content of standard output returned by invoking |cmdlist|. Ignores the stderr. Raises |GypError| if the command return with a non-zero return code.""" job = subprocess.Popen(cmdlist, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out = job....
[ "def", "GetStdoutQuiet", "(", "cmdlist", ")", ":", "job", "=", "subprocess", ".", "Popen", "(", "cmdlist", ",", "stdout", "=", "subprocess", ".", "PIPE", ",", "stderr", "=", "subprocess", ".", "PIPE", ")", "out", "=", "job", ".", "communicate", "(", ")...
https://github.com/pmq20/node-packer/blob/12c46c6e44fbc14d9ee645ebd17d5296b324f7e0/current/tools/gyp/pylib/gyp/xcode_emulation.py#L1449-L1460
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/email/_header_value_parser.py
python
get_quoted_string
(value)
return quoted_string, value
quoted-string = [CFWS] <bare-quoted-string> [CFWS] 'bare-quoted-string' is an intermediate class defined by this parser and not by the RFC grammar. It is the quoted string without any attached CFWS.
quoted-string = [CFWS] <bare-quoted-string> [CFWS]
[ "quoted", "-", "string", "=", "[", "CFWS", "]", "<bare", "-", "quoted", "-", "string", ">", "[", "CFWS", "]" ]
def get_quoted_string(value): """quoted-string = [CFWS] <bare-quoted-string> [CFWS] 'bare-quoted-string' is an intermediate class defined by this parser and not by the RFC grammar. It is the quoted string without any attached CFWS. """ quoted_string = QuotedString() if value and value[0] i...
[ "def", "get_quoted_string", "(", "value", ")", ":", "quoted_string", "=", "QuotedString", "(", ")", "if", "value", "and", "value", "[", "0", "]", "in", "CFWS_LEADER", ":", "token", ",", "value", "=", "get_cfws", "(", "value", ")", "quoted_string", ".", "...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/email/_header_value_parser.py#L1276-L1292
microsoft/TSS.MSR
0f2516fca2cd9929c31d5450e39301c9bde43688
TSS.Py/src/Tpm.py
python
Tpm.NV_Certify
(self, signHandle, authHandle, nvIndex, qualifyingData, inScheme, size, offset)
return self.processResponse(respBuf, NV_CertifyResponse)
The purpose of this command is to certify the contents of an NV Index or portion of an NV Index. Args: signHandle (TPM_HANDLE): Handle of the key used to sign the attestation structure Auth Index: 1 Auth Role: USER authHandle (TPM_...
The purpose of this command is to certify the contents of an NV Index or portion of an NV Index.
[ "The", "purpose", "of", "this", "command", "is", "to", "certify", "the", "contents", "of", "an", "NV", "Index", "or", "portion", "of", "an", "NV", "Index", "." ]
def NV_Certify(self, signHandle, authHandle, nvIndex, qualifyingData, inScheme, size, offset): """ The purpose of this command is to certify the contents of an NV Index or portion of an NV Index. Args: signHandle (TPM_HANDLE): Handle of the key used to sign the attes...
[ "def", "NV_Certify", "(", "self", ",", "signHandle", ",", "authHandle", ",", "nvIndex", ",", "qualifyingData", ",", "inScheme", ",", "size", ",", "offset", ")", ":", "req", "=", "TPM2_NV_Certify_REQUEST", "(", "signHandle", ",", "authHandle", ",", "nvIndex", ...
https://github.com/microsoft/TSS.MSR/blob/0f2516fca2cd9929c31d5450e39301c9bde43688/TSS.Py/src/Tpm.py#L2467-L2501
ricardoquesada/Spidermonkey
4a75ea2543408bd1b2c515aa95901523eeef7858
python/mozbuild/mozpack/path.py
python
split
(path)
return normsep(path).split('/')
Return the normalized path as a list of its components. split('foo/bar/baz') returns ['foo', 'bar', 'baz']
Return the normalized path as a list of its components. split('foo/bar/baz') returns ['foo', 'bar', 'baz']
[ "Return", "the", "normalized", "path", "as", "a", "list", "of", "its", "components", ".", "split", "(", "foo", "/", "bar", "/", "baz", ")", "returns", "[", "foo", "bar", "baz", "]" ]
def split(path): ''' Return the normalized path as a list of its components. split('foo/bar/baz') returns ['foo', 'bar', 'baz'] ''' return normsep(path).split('/')
[ "def", "split", "(", "path", ")", ":", "return", "normsep", "(", "path", ")", ".", "split", "(", "'/'", ")" ]
https://github.com/ricardoquesada/Spidermonkey/blob/4a75ea2543408bd1b2c515aa95901523eeef7858/python/mozbuild/mozpack/path.py#L59-L64
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py
python
to_filename
(name)
return name.replace('-', '_')
Convert a project or version name to its filename-escaped form Any '-' characters are currently replaced with '_'.
Convert a project or version name to its filename-escaped form
[ "Convert", "a", "project", "or", "version", "name", "to", "its", "filename", "-", "escaped", "form" ]
def to_filename(name): """Convert a project or version name to its filename-escaped form Any '-' characters are currently replaced with '_'. """ return name.replace('-', '_')
[ "def", "to_filename", "(", "name", ")", ":", "return", "name", ".", "replace", "(", "'-'", ",", "'_'", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py#L2691-L2701
intel/caffe
3f494b442ee3f9d17a07b09ecbd5fa2bbda00836
examples/faster-rcnn/lib/roi_data_layer/layer.py
python
RoIDataLayer._get_next_minibatch
(self)
Return the blobs to be used for the next minibatch. If cfg.TRAIN.USE_PREFETCH is True, then blobs will be computed in a separate process and made available through self._blob_queue.
Return the blobs to be used for the next minibatch.
[ "Return", "the", "blobs", "to", "be", "used", "for", "the", "next", "minibatch", "." ]
def _get_next_minibatch(self): """Return the blobs to be used for the next minibatch. If cfg.TRAIN.USE_PREFETCH is True, then blobs will be computed in a separate process and made available through self._blob_queue. """ if cfg.TRAIN.USE_PREFETCH: return self._blob_qu...
[ "def", "_get_next_minibatch", "(", "self", ")", ":", "if", "cfg", ".", "TRAIN", ".", "USE_PREFETCH", ":", "return", "self", ".", "_blob_queue", ".", "get", "(", ")", "else", ":", "db_inds", "=", "self", ".", "_get_next_minibatch_inds", "(", ")", "minibatch...
https://github.com/intel/caffe/blob/3f494b442ee3f9d17a07b09ecbd5fa2bbda00836/examples/faster-rcnn/lib/roi_data_layer/layer.py#L52-L63
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/grid.py
python
Grid.SetRowLabelSize
(*args, **kwargs)
return _grid.Grid_SetRowLabelSize(*args, **kwargs)
SetRowLabelSize(self, int width)
SetRowLabelSize(self, int width)
[ "SetRowLabelSize", "(", "self", "int", "width", ")" ]
def SetRowLabelSize(*args, **kwargs): """SetRowLabelSize(self, int width)""" return _grid.Grid_SetRowLabelSize(*args, **kwargs)
[ "def", "SetRowLabelSize", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_grid", ".", "Grid_SetRowLabelSize", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/grid.py#L1538-L1540
okex/V3-Open-API-SDK
c5abb0db7e2287718e0055e17e57672ce0ec7fd9
okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_vendor/appdirs.py
python
user_log_dir
(appname=None, appauthor=None, version=None, opinion=True)
return path
r"""Return full path to the user-specific log dir for this application. "appname" is the name of application. If None, just the system directory is returned. "appauthor" (only used on Windows) is the name of the appauthor or distributing body for this application. Typically ...
r"""Return full path to the user-specific log dir for this application.
[ "r", "Return", "full", "path", "to", "the", "user", "-", "specific", "log", "dir", "for", "this", "application", "." ]
def user_log_dir(appname=None, appauthor=None, version=None, opinion=True): r"""Return full path to the user-specific log dir for this application. "appname" is the name of application. If None, just the system directory is returned. "appauthor" (only used on Windows) is the name of the...
[ "def", "user_log_dir", "(", "appname", "=", "None", ",", "appauthor", "=", "None", ",", "version", "=", "None", ",", "opinion", "=", "True", ")", ":", "if", "system", "==", "\"darwin\"", ":", "path", "=", "os", ".", "path", ".", "join", "(", "os", ...
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/appdirs.py#L356-L404
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
Framework/PythonInterface/plugins/functions/Porod.py
python
Porod.functionDeriv1D
(self, xvals, jacobian)
Evaluate the first derivatives @param xvals: numpy array of q-values @param jacobian: Jacobian object
Evaluate the first derivatives
[ "Evaluate", "the", "first", "derivatives" ]
def functionDeriv1D(self, xvals, jacobian): """ Evaluate the first derivatives @param xvals: numpy array of q-values @param jacobian: Jacobian object """ i = 0 for x in xvals: jacobian.set(i, 0, math.pow(x, -4)) jacobian.set(i, ...
[ "def", "functionDeriv1D", "(", "self", ",", "xvals", ",", "jacobian", ")", ":", "i", "=", "0", "for", "x", "in", "xvals", ":", "jacobian", ".", "set", "(", "i", ",", "0", ",", "math", ".", "pow", "(", "x", ",", "-", "4", ")", ")", "jacobian", ...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/Framework/PythonInterface/plugins/functions/Porod.py#L39-L49
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/richtext.py
python
RichTextObject.SetMargins
(*args, **kwargs)
return _richtext.RichTextObject_SetMargins(*args, **kwargs)
SetMargins(self, int leftMargin, int rightMargin, int topMargin, int bottomMargin)
SetMargins(self, int leftMargin, int rightMargin, int topMargin, int bottomMargin)
[ "SetMargins", "(", "self", "int", "leftMargin", "int", "rightMargin", "int", "topMargin", "int", "bottomMargin", ")" ]
def SetMargins(*args, **kwargs): """SetMargins(self, int leftMargin, int rightMargin, int topMargin, int bottomMargin)""" return _richtext.RichTextObject_SetMargins(*args, **kwargs)
[ "def", "SetMargins", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_richtext", ".", "RichTextObject_SetMargins", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/richtext.py#L1333-L1335
SFTtech/openage
d6a08c53c48dc1e157807471df92197f6ca9e04d
openage/convert/entity_object/conversion/aoc/genie_unit.py
python
GenieGameEntityGroup.has_projectile
(self, projectile_id, civ_id=-1)
return projectile_id in (projectile_id_0, projectile_id_1)
Checks if units shoot a projectile with this ID. :param projectile_id: The ID of the projectile unit. :type projectile_id: int :param civ_id: Test if the property is true for unit lines of the civ with this ID: :type civ_id: int :returns: True if the train...
Checks if units shoot a projectile with this ID.
[ "Checks", "if", "units", "shoot", "a", "projectile", "with", "this", "ID", "." ]
def has_projectile(self, projectile_id, civ_id=-1): """ Checks if units shoot a projectile with this ID. :param projectile_id: The ID of the projectile unit. :type projectile_id: int :param civ_id: Test if the property is true for unit lines of the civ wit...
[ "def", "has_projectile", "(", "self", ",", "projectile_id", ",", "civ_id", "=", "-", "1", ")", ":", "head_unit", "=", "self", ".", "get_head_unit", "(", ")", "if", "civ_id", "!=", "-", "1", ":", "head_unit", "=", "self", ".", "data", ".", "civ_groups",...
https://github.com/SFTtech/openage/blob/d6a08c53c48dc1e157807471df92197f6ca9e04d/openage/convert/entity_object/conversion/aoc/genie_unit.py#L233-L253
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqt/mantidqt/widgets/sliceviewer/lineplots.py
python
LinePlots._remove_line_plots
(self)
Remove the attached cut plots and restore the image axes to the central axes position
Remove the attached cut plots and restore the image axes to the central axes position
[ "Remove", "the", "attached", "cut", "plots", "and", "restore", "the", "image", "axes", "to", "the", "central", "axes", "position" ]
def _remove_line_plots(self): """ Remove the attached cut plots and restore the image axes to the central axes position """ image_axes = self._im_ax self.delete_line_plot_lines() all_axes = self._fig.axes # The order is defined by the order of the add_sub...
[ "def", "_remove_line_plots", "(", "self", ")", ":", "image_axes", "=", "self", ".", "_im_ax", "self", ".", "delete_line_plot_lines", "(", ")", "all_axes", "=", "self", ".", "_fig", ".", "axes", "# The order is defined by the order of the add_subplot calls so we always w...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqt/mantidqt/widgets/sliceviewer/lineplots.py#L175-L198
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/ipython/py2/IPython/utils/_tokenize_py3.py
python
tokenize
(readline)
return _tokenize(chain(consumed, rl_gen, empty).__next__, encoding)
The tokenize() generator requires one argment, readline, which must be a callable object which provides the same interface as the readline() method of built-in file objects. Each call to the function should return one line of input as bytes. Alternately, readline can be a callable function terminating...
The tokenize() generator requires one argment, readline, which must be a callable object which provides the same interface as the readline() method of built-in file objects. Each call to the function should return one line of input as bytes. Alternately, readline can be a callable function terminating...
[ "The", "tokenize", "()", "generator", "requires", "one", "argment", "readline", "which", "must", "be", "a", "callable", "object", "which", "provides", "the", "same", "interface", "as", "the", "readline", "()", "method", "of", "built", "-", "in", "file", "obj...
def tokenize(readline): """ The tokenize() generator requires one argment, readline, which must be a callable object which provides the same interface as the readline() method of built-in file objects. Each call to the function should return one line of input as bytes. Alternately, readline ca...
[ "def", "tokenize", "(", "readline", ")", ":", "# This import is here to avoid problems when the itertools module is not", "# built yet and tokenize is imported.", "from", "itertools", "import", "chain", ",", "repeat", "encoding", ",", "consumed", "=", "detect_encoding", "(", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/ipython/py2/IPython/utils/_tokenize_py3.py#L390-L415
albertz/openlierox
d316c14a8eb57848ef56e9bfa7b23a56f694a51b
tools/DedicatedServerVideo/gdata/health/service.py
python
HealthService.SendNotice
(self, subject, body=None, content_type='html', ccr=None, profile_id=None)
return self.Post(entry, query.ToUri(), converter=gdata.health.ProfileEntryFromString)
Sends (posts) a notice to the user's Google Health profile. Args: subject: A string representing the message's subject line. body: string (optional) The message body. content_type: string (optional) The content type of the notice message body. This parameter is only honored when a mess...
Sends (posts) a notice to the user's Google Health profile.
[ "Sends", "(", "posts", ")", "a", "notice", "to", "the", "user", "s", "Google", "Health", "profile", "." ]
def SendNotice(self, subject, body=None, content_type='html', ccr=None, profile_id=None): """Sends (posts) a notice to the user's Google Health profile. Args: subject: A string representing the message's subject line. body: string (optional) The message body. content_type: st...
[ "def", "SendNotice", "(", "self", ",", "subject", ",", "body", "=", "None", ",", "content_type", "=", "'html'", ",", "ccr", "=", "None", ",", "profile_id", "=", "None", ")", ":", "if", "body", ":", "content", "=", "atom", ".", "Content", "(", "conten...
https://github.com/albertz/openlierox/blob/d316c14a8eb57848ef56e9bfa7b23a56f694a51b/tools/DedicatedServerVideo/gdata/health/service.py#L114-L145
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/contrib/quantization/tools/quantize_graph.py
python
GraphRewriter.round_nodes_recursively
(self, current_node)
The entry point for simple rounding quantization.
The entry point for simple rounding quantization.
[ "The", "entry", "point", "for", "simple", "rounding", "quantization", "." ]
def round_nodes_recursively(self, current_node): """The entry point for simple rounding quantization.""" for input_node_name in current_node.input: input_node_name = node_name_from_input(input_node_name) if input_node_name in self.already_visited: continue input_node = self.nodes_map[i...
[ "def", "round_nodes_recursively", "(", "self", ",", "current_node", ")", ":", "for", "input_node_name", "in", "current_node", ".", "input", ":", "input_node_name", "=", "node_name_from_input", "(", "input_node_name", ")", "if", "input_node_name", "in", "self", ".", ...
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/contrib/quantization/tools/quantize_graph.py#L351-L380
cyberbotics/webots
af7fa7d68dcf7b4550f1f2e132092b41e83698fc
projects/samples/robotbenchmark/square_path/controllers/square_path_supervisor/square_path_metric.py
python
SquarePathMetric.getPerformance
(self)
return performance
Return the overall performance.
Return the overall performance.
[ "Return", "the", "overall", "performance", "." ]
def getPerformance(self): """Return the overall performance.""" performance = 0 # For each segment, adds the grade to the total, and displays # corresponding label. for i in range(0, 4): performance = performance + self.segments[i].getPerformance() # Compute...
[ "def", "getPerformance", "(", "self", ")", ":", "performance", "=", "0", "# For each segment, adds the grade to the total, and displays", "# corresponding label.", "for", "i", "in", "range", "(", "0", ",", "4", ")", ":", "performance", "=", "performance", "+", "self...
https://github.com/cyberbotics/webots/blob/af7fa7d68dcf7b4550f1f2e132092b41e83698fc/projects/samples/robotbenchmark/square_path/controllers/square_path_supervisor/square_path_metric.py#L150-L162