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
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py3/scipy/stats/_multivariate.py
python
multivariate_normal_gen.logcdf
(self, x, mean=None, cov=1, allow_singular=False, maxpts=None, abseps=1e-5, releps=1e-5)
return out
Log of the multivariate normal cumulative distribution function. Parameters ---------- x : array_like Quantiles, with the last axis of `x` denoting the components. %(_mvn_doc_default_callparams)s maxpts: integer, optional The maximum number of points to u...
Log of the multivariate normal cumulative distribution function.
[ "Log", "of", "the", "multivariate", "normal", "cumulative", "distribution", "function", "." ]
def logcdf(self, x, mean=None, cov=1, allow_singular=False, maxpts=None, abseps=1e-5, releps=1e-5): """ Log of the multivariate normal cumulative distribution function. Parameters ---------- x : array_like Quantiles, with the last axis of `x` denoting ...
[ "def", "logcdf", "(", "self", ",", "x", ",", "mean", "=", "None", ",", "cov", "=", "1", ",", "allow_singular", "=", "False", ",", "maxpts", "=", "None", ",", "abseps", "=", "1e-5", ",", "releps", "=", "1e-5", ")", ":", "dim", ",", "mean", ",", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py3/scipy/stats/_multivariate.py#L557-L594
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/customtreectrl.py
python
CustomTreeCtrl.SetStateImageList
(self, imageList)
Sets the state image list for :class:`CustomTreeCtrl` (from which application-defined state images are taken). :param `imageList`: an instance of :class:`ImageList`.
Sets the state image list for :class:`CustomTreeCtrl` (from which application-defined state images are taken).
[ "Sets", "the", "state", "image", "list", "for", ":", "class", ":", "CustomTreeCtrl", "(", "from", "which", "application", "-", "defined", "state", "images", "are", "taken", ")", "." ]
def SetStateImageList(self, imageList): """ Sets the state image list for :class:`CustomTreeCtrl` (from which application-defined state images are taken). :param `imageList`: an instance of :class:`ImageList`. """ if self._ownsImageListState: del sel...
[ "def", "SetStateImageList", "(", "self", ",", "imageList", ")", ":", "if", "self", ".", "_ownsImageListState", ":", "del", "self", ".", "_imageListState", "self", ".", "_imageListState", "=", "imageList", "self", ".", "_ownsImageListState", "=", "False" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/customtreectrl.py#L6114-L6126
forkineye/ESPixelStick
22926f1c0d1131f1369fc7cad405689a095ae3cb
dist/bin/esptool/serial/serialcli.py
python
Serial.cts
(self)
return self._port_handle.CtsHolding
Read terminal status line: Clear To Send
Read terminal status line: Clear To Send
[ "Read", "terminal", "status", "line", ":", "Clear", "To", "Send" ]
def cts(self): """Read terminal status line: Clear To Send""" if not self.is_open: raise portNotOpenError return self._port_handle.CtsHolding
[ "def", "cts", "(", "self", ")", ":", "if", "not", "self", ".", "is_open", ":", "raise", "portNotOpenError", "return", "self", ".", "_port_handle", ".", "CtsHolding" ]
https://github.com/forkineye/ESPixelStick/blob/22926f1c0d1131f1369fc7cad405689a095ae3cb/dist/bin/esptool/serial/serialcli.py#L222-L226
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/datetime.py
python
tzinfo.utcoffset
(self, dt)
datetime -> timedelta, positive for east of UTC, negative for west of UTC
datetime -> timedelta, positive for east of UTC, negative for west of UTC
[ "datetime", "-", ">", "timedelta", "positive", "for", "east", "of", "UTC", "negative", "for", "west", "of", "UTC" ]
def utcoffset(self, dt): "datetime -> timedelta, positive for east of UTC, negative for west of UTC" raise NotImplementedError("tzinfo subclass must override utcoffset()")
[ "def", "utcoffset", "(", "self", ",", "dt", ")", ":", "raise", "NotImplementedError", "(", "\"tzinfo subclass must override utcoffset()\"", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/datetime.py#L1103-L1105
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/pipes.py
python
Template.open
(self, file, rw)
t.open(file, rw) returns a pipe or file object open for reading or writing; the file is the other end of the pipeline.
t.open(file, rw) returns a pipe or file object open for reading or writing; the file is the other end of the pipeline.
[ "t", ".", "open", "(", "file", "rw", ")", "returns", "a", "pipe", "or", "file", "object", "open", "for", "reading", "or", "writing", ";", "the", "file", "is", "the", "other", "end", "of", "the", "pipeline", "." ]
def open(self, file, rw): """t.open(file, rw) returns a pipe or file object open for reading or writing; the file is the other end of the pipeline.""" if rw == 'r': return self.open_r(file) if rw == 'w': return self.open_w(file) raise ValueError, \ ...
[ "def", "open", "(", "self", ",", "file", ",", "rw", ")", ":", "if", "rw", "==", "'r'", ":", "return", "self", ".", "open_r", "(", "file", ")", "if", "rw", "==", "'w'", ":", "return", "self", ".", "open_w", "(", "file", ")", "raise", "ValueError",...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/pipes.py#L152-L160
martinmoene/lest
f3e9dfe4a66c3e60dfdac7a3d3e4ddc0dcf06b26
script/create-vcpkg.py
python
createControl
( args )
Create vcpkg CONTROL file
Create vcpkg CONTROL file
[ "Create", "vcpkg", "CONTROL", "file" ]
def createControl( args ): """Create vcpkg CONTROL file""" output = tpl_vcpkg_control.format( prj=args.project, ver=args.version, desc=args.description ) if args.verbose: print( "Creating control file '{f}':".format( f=control_path( args ) ) ) if args.verbose > 1: print( output ...
[ "def", "createControl", "(", "args", ")", ":", "output", "=", "tpl_vcpkg_control", ".", "format", "(", "prj", "=", "args", ".", "project", ",", "ver", "=", "args", ".", "version", ",", "desc", "=", "args", ".", "description", ")", "if", "args", ".", ...
https://github.com/martinmoene/lest/blob/f3e9dfe4a66c3e60dfdac7a3d3e4ddc0dcf06b26/script/create-vcpkg.py#L100-L110
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/_pydecimal.py
python
Context.compare_total
(self, a, b)
return a.compare_total(b)
Compares two operands using their abstract representation. This is not like the standard compare, which use their numerical value. Note that a total ordering is defined for all possible abstract representations. >>> ExtendedContext.compare_total(Decimal('12.73'), Decimal('127.9')) ...
Compares two operands using their abstract representation.
[ "Compares", "two", "operands", "using", "their", "abstract", "representation", "." ]
def compare_total(self, a, b): """Compares two operands using their abstract representation. This is not like the standard compare, which use their numerical value. Note that a total ordering is defined for all possible abstract representations. >>> ExtendedContext.compare_tota...
[ "def", "compare_total", "(", "self", ",", "a", ",", "b", ")", ":", "a", "=", "_convert_other", "(", "a", ",", "raiseit", "=", "True", ")", "return", "a", ".", "compare_total", "(", "b", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/_pydecimal.py#L4258-L4285
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/botocore/docs/params.py
python
BaseParamsDocumenter.document_params
(self, section, shape, include=None, exclude=None)
Fills out the documentation for a section given a model shape. :param section: The section to write the documentation to. :param shape: The shape of the operation. :type include: Dictionary where keys are parameter names and values are the shapes of the parameter names. :p...
Fills out the documentation for a section given a model shape.
[ "Fills", "out", "the", "documentation", "for", "a", "section", "given", "a", "model", "shape", "." ]
def document_params(self, section, shape, include=None, exclude=None): """Fills out the documentation for a section given a model shape. :param section: The section to write the documentation to. :param shape: The shape of the operation. :type include: Dictionary where keys are parame...
[ "def", "document_params", "(", "self", ",", "section", ",", "shape", ",", "include", "=", "None", ",", "exclude", "=", "None", ")", ":", "history", "=", "[", "]", "self", ".", "traverse_and_document_shape", "(", "section", "=", "section", ",", "shape", "...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/botocore/docs/params.py#L18-L36
wy1iu/LargeMargin_Softmax_Loss
c3e9f20e4f16e2b4daf7d358a614366b9b39a6ec
python/caffe/coord_map.py
python
conv_params
(fn)
return (axis, np.array(params.get('stride', 1), ndmin=1), (ks - 1) * dilation + 1, np.array(params.get('pad', 0), ndmin=1))
Extract the spatial parameters that determine the coordinate mapping: kernel size, stride, padding, and dilation. Implementation detail: Convolution, Deconvolution, and Im2col layers define these in the convolution_param message, while Pooling has its own fields in pooling_param. This method deals with...
Extract the spatial parameters that determine the coordinate mapping: kernel size, stride, padding, and dilation.
[ "Extract", "the", "spatial", "parameters", "that", "determine", "the", "coordinate", "mapping", ":", "kernel", "size", "stride", "padding", "and", "dilation", "." ]
def conv_params(fn): """ Extract the spatial parameters that determine the coordinate mapping: kernel size, stride, padding, and dilation. Implementation detail: Convolution, Deconvolution, and Im2col layers define these in the convolution_param message, while Pooling has its own fields in pool...
[ "def", "conv_params", "(", "fn", ")", ":", "params", "=", "fn", ".", "params", ".", "get", "(", "'convolution_param'", ",", "fn", ".", "params", ")", "axis", "=", "params", ".", "get", "(", "'axis'", ",", "1", ")", "ks", "=", "np", ".", "array", ...
https://github.com/wy1iu/LargeMargin_Softmax_Loss/blob/c3e9f20e4f16e2b4daf7d358a614366b9b39a6ec/python/caffe/coord_map.py#L18-L37
bumptop/BumpTop
466d23597a07ae738f4265262fa01087fc6e257c
trunk/win/Source/bin/jinja2/runtime.py
python
Context.get
(self, key, default=None)
Returns an item from the template context, if it doesn't exist `default` is returned.
Returns an item from the template context, if it doesn't exist `default` is returned.
[ "Returns", "an", "item", "from", "the", "template", "context", "if", "it", "doesn", "t", "exist", "default", "is", "returned", "." ]
def get(self, key, default=None): """Returns an item from the template context, if it doesn't exist `default` is returned. """ try: return self[key] except KeyError: return default
[ "def", "get", "(", "self", ",", "key", ",", "default", "=", "None", ")", ":", "try", ":", "return", "self", "[", "key", "]", "except", "KeyError", ":", "return", "default" ]
https://github.com/bumptop/BumpTop/blob/466d23597a07ae738f4265262fa01087fc6e257c/trunk/win/Source/bin/jinja2/runtime.py#L136-L143
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/_core.py
python
MenuBar.EnableTop
(*args, **kwargs)
return _core_.MenuBar_EnableTop(*args, **kwargs)
EnableTop(self, size_t pos, bool enable)
EnableTop(self, size_t pos, bool enable)
[ "EnableTop", "(", "self", "size_t", "pos", "bool", "enable", ")" ]
def EnableTop(*args, **kwargs): """EnableTop(self, size_t pos, bool enable)""" return _core_.MenuBar_EnableTop(*args, **kwargs)
[ "def", "EnableTop", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "MenuBar_EnableTop", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_core.py#L12292-L12294
PX4/PX4-Autopilot
0b9f60a0370be53d683352c63fd92db3d6586e18
platforms/nuttx/NuttX/tools/kconfiglib.py
python
load_allconfig
(kconf, filename)
Helper for all*config. Loads (merges) the configuration file specified by KCONFIG_ALLCONFIG, if any. See Documentation/kbuild/kconfig.txt in the Linux kernel. Disables warnings for duplicated assignments within configuration files for the duration of the call (disable_override_warnings() + disable_...
Helper for all*config. Loads (merges) the configuration file specified by KCONFIG_ALLCONFIG, if any. See Documentation/kbuild/kconfig.txt in the Linux kernel.
[ "Helper", "for", "all", "*", "config", ".", "Loads", "(", "merges", ")", "the", "configuration", "file", "specified", "by", "KCONFIG_ALLCONFIG", "if", "any", ".", "See", "Documentation", "/", "kbuild", "/", "kconfig", ".", "txt", "in", "the", "Linux", "ker...
def load_allconfig(kconf, filename): """ Helper for all*config. Loads (merges) the configuration file specified by KCONFIG_ALLCONFIG, if any. See Documentation/kbuild/kconfig.txt in the Linux kernel. Disables warnings for duplicated assignments within configuration files for the duration of the...
[ "def", "load_allconfig", "(", "kconf", ",", "filename", ")", ":", "def", "std_msg", "(", "e", ")", ":", "# \"Upcasts\" a _KconfigIOError to an IOError, removing the custom", "# __str__() message. The standard message is better here.", "return", "IOError", "(", "e", ".", "er...
https://github.com/PX4/PX4-Autopilot/blob/0b9f60a0370be53d683352c63fd92db3d6586e18/platforms/nuttx/NuttX/tools/kconfiglib.py#L5729-L5782
hakuna-m/wubiuefi
caec1af0a09c78fd5a345180ada1fe45e0c63493
src/pypack/modulegraph/util.py
python
imp_walk
(name)
yields namepart, tuple_or_importer for each path item raise ImportError if a name can not be found.
yields namepart, tuple_or_importer for each path item
[ "yields", "namepart", "tuple_or_importer", "for", "each", "path", "item" ]
def imp_walk(name): """ yields namepart, tuple_or_importer for each path item raise ImportError if a name can not be found. """ if name in sys.builtin_module_names: yield name, (None, None, ("", "", imp.C_BUILTIN)) return paths = sys.path res = None for namepart in name....
[ "def", "imp_walk", "(", "name", ")", ":", "if", "name", "in", "sys", ".", "builtin_module_names", ":", "yield", "name", ",", "(", "None", ",", "None", ",", "(", "\"\"", ",", "\"\"", ",", "imp", ".", "C_BUILTIN", ")", ")", "return", "paths", "=", "s...
https://github.com/hakuna-m/wubiuefi/blob/caec1af0a09c78fd5a345180ada1fe45e0c63493/src/pypack/modulegraph/util.py#L38-L60
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/telnetlib.py
python
Telnet.rawq_getchar
(self)
return c
Get next char from raw queue. Block if no data is immediately available. Raise EOFError when connection is closed.
Get next char from raw queue.
[ "Get", "next", "char", "from", "raw", "queue", "." ]
def rawq_getchar(self): """Get next char from raw queue. Block if no data is immediately available. Raise EOFError when connection is closed. """ if not self.rawq: self.fill_rawq() if self.eof: raise EOFError c = self.rawq[self.i...
[ "def", "rawq_getchar", "(", "self", ")", ":", "if", "not", "self", ".", "rawq", ":", "self", ".", "fill_rawq", "(", ")", "if", "self", ".", "eof", ":", "raise", "EOFError", "c", "=", "self", ".", "rawq", "[", "self", ".", "irawq", ":", "self", "....
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/telnetlib.py#L494-L510
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/contrib/learn/python/learn/estimators/state_saving_rnn_estimator.py
python
_get_state_name
(i)
return '{}_{}'.format(rnn_common.RNNKeys.STATE_PREFIX, i)
Constructs the name string for state component `i`.
Constructs the name string for state component `i`.
[ "Constructs", "the", "name", "string", "for", "state", "component", "i", "." ]
def _get_state_name(i): """Constructs the name string for state component `i`.""" return '{}_{}'.format(rnn_common.RNNKeys.STATE_PREFIX, i)
[ "def", "_get_state_name", "(", "i", ")", ":", "return", "'{}_{}'", ".", "format", "(", "rnn_common", ".", "RNNKeys", ".", "STATE_PREFIX", ",", "i", ")" ]
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/contrib/learn/python/learn/estimators/state_saving_rnn_estimator.py#L300-L302
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/propgrid.py
python
PropertyGrid.HasInternalFlag
(*args, **kwargs)
return _propgrid.PropertyGrid_HasInternalFlag(*args, **kwargs)
HasInternalFlag(self, long flag) -> bool
HasInternalFlag(self, long flag) -> bool
[ "HasInternalFlag", "(", "self", "long", "flag", ")", "-", ">", "bool" ]
def HasInternalFlag(*args, **kwargs): """HasInternalFlag(self, long flag) -> bool""" return _propgrid.PropertyGrid_HasInternalFlag(*args, **kwargs)
[ "def", "HasInternalFlag", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_propgrid", ".", "PropertyGrid_HasInternalFlag", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/propgrid.py#L2403-L2405
panda3d/panda3d
833ad89ebad58395d0af0b7ec08538e5e4308265
direct/src/distributed/ClientRepositoryBase.py
python
ClientRepositoryBase.setDeferInterval
(self, deferInterval)
Specifies the minimum amount of time, in seconds, that must elapse before generating any two DistributedObjects whose class type is marked "deferrable". Set this to 0 to indicate no deferring will occur.
Specifies the minimum amount of time, in seconds, that must elapse before generating any two DistributedObjects whose class type is marked "deferrable". Set this to 0 to indicate no deferring will occur.
[ "Specifies", "the", "minimum", "amount", "of", "time", "in", "seconds", "that", "must", "elapse", "before", "generating", "any", "two", "DistributedObjects", "whose", "class", "type", "is", "marked", "deferrable", ".", "Set", "this", "to", "0", "to", "indicate...
def setDeferInterval(self, deferInterval): """Specifies the minimum amount of time, in seconds, that must elapse before generating any two DistributedObjects whose class type is marked "deferrable". Set this to 0 to indicate no deferring will occur.""" self.deferInterval = defe...
[ "def", "setDeferInterval", "(", "self", ",", "deferInterval", ")", ":", "self", ".", "deferInterval", "=", "deferInterval", "self", ".", "setHandleCUpdates", "(", "self", ".", "deferInterval", "==", "0", ")", "if", "self", ".", "deferredGenerates", ":", "taskM...
https://github.com/panda3d/panda3d/blob/833ad89ebad58395d0af0b7ec08538e5e4308265/direct/src/distributed/ClientRepositoryBase.py#L80-L91
seqan/seqan
f5f658343c366c9c3d44ba358ffc9317e78a09ed
util/py_lib/seqan/dddoc/html.py
python
HtmlHelper.pageLink
(self, txt=None, arr=None, node=None)
return '<a href="%s"%s>%s</a>' % (pyratemp.escape(filename), dead_attr, title)
The link can be given as text or as a path. If it is given as text then also HTTP/FTP links are allowed, otherwise, it can only be a link to an entity in the tree.
The link can be given as text or as a path.
[ "The", "link", "can", "be", "given", "as", "text", "or", "as", "a", "path", "." ]
def pageLink(self, txt=None, arr=None, node=None): """The link can be given as text or as a path. If it is given as text then also HTTP/FTP links are allowed, otherwise, it can only be a link to an entity in the tree. """ # Compute source file name and line. location_can...
[ "def", "pageLink", "(", "self", ",", "txt", "=", "None", ",", "arr", "=", "None", ",", "node", "=", "None", ")", ":", "# Compute source file name and line.", "location_candidates", "=", "[", "]", "if", "node", "and", "node", ".", "entry", ":", "for", "en...
https://github.com/seqan/seqan/blob/f5f658343c366c9c3d44ba358ffc9317e78a09ed/util/py_lib/seqan/dddoc/html.py#L577-L636
ComputationalRadiationPhysics/picongpu
59e9b53605f9a5c1bf271eeb055bc74370a99052
lib/python/picongpu/plugins/plot_mpl/base_visualizer.py
python
Visualizer._check_and_fix_run_dirs
(self, run_directories)
return run_directories
Check variable type for the run_directories and change to list of tuples if necessary. This can be overridden in derived classes to e.g. restrict to single simulation visualization. Returns ------- a list of tuples, each of the form (simulation_label, path_to_sim...
Check variable type for the run_directories and change to list of tuples if necessary. This can be overridden in derived classes to e.g. restrict to single simulation visualization.
[ "Check", "variable", "type", "for", "the", "run_directories", "and", "change", "to", "list", "of", "tuples", "if", "necessary", ".", "This", "can", "be", "overridden", "in", "derived", "classes", "to", "e", ".", "g", ".", "restrict", "to", "single", "simul...
def _check_and_fix_run_dirs(self, run_directories): """ Check variable type for the run_directories and change to list of tuples if necessary. This can be overridden in derived classes to e.g. restrict to single simulation visualization. Returns ------- a...
[ "def", "_check_and_fix_run_dirs", "(", "self", ",", "run_directories", ")", ":", "# silently convert str to list of length 1", "if", "not", "isinstance", "(", "run_directories", ",", "list", ")", ":", "run_directories", "=", "[", "run_directories", "]", "if", "len", ...
https://github.com/ComputationalRadiationPhysics/picongpu/blob/59e9b53605f9a5c1bf271eeb055bc74370a99052/lib/python/picongpu/plugins/plot_mpl/base_visualizer.py#L122-L147
nasa/trick
7b85aa66329d62fe8816462627c09a353aac8299
share/trick/pymods/trick/variable_server.py
python
find_simulation
(host=None, port=None, user=None, pid=None, version=None, sim_directory=None, s_main=None, input_file=None, tag=None, timeout=None)
Listen for simulations on the multicast channel over which all sims broadcast their existence. Connect to the one that matches the provided arguments that are not None. If there are multiple matches, connect to the first one we happen to find. If all arguments are None, connect to the first sim we happ...
Listen for simulations on the multicast channel over which all sims broadcast their existence. Connect to the one that matches the provided arguments that are not None.
[ "Listen", "for", "simulations", "on", "the", "multicast", "channel", "over", "which", "all", "sims", "broadcast", "their", "existence", ".", "Connect", "to", "the", "one", "that", "matches", "the", "provided", "arguments", "that", "are", "not", "None", "." ]
def find_simulation(host=None, port=None, user=None, pid=None, version=None, sim_directory=None, s_main=None, input_file=None, tag=None, timeout=None): """ Listen for simulations on the multicast channel over which all sims broadcast their existence. Connect to the one ...
[ "def", "find_simulation", "(", "host", "=", "None", ",", "port", "=", "None", ",", "user", "=", "None", ",", "pid", "=", "None", ",", "version", "=", "None", ",", "sim_directory", "=", "None", ",", "s_main", "=", "None", ",", "input_file", "=", "None...
https://github.com/nasa/trick/blob/7b85aa66329d62fe8816462627c09a353aac8299/share/trick/pymods/trick/variable_server.py#L1035-L1127
bulletphysics/bullet3
f0f2a952e146f016096db6f85cf0c44ed75b0b9a
examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur.py
python
Minitaur.GetControlLatency
(self)
return self._control_latency
Get the control latency. Returns: The latency (in seconds) between when the motor command is sent and when the sensor measurements are reported back to the controller.
Get the control latency.
[ "Get", "the", "control", "latency", "." ]
def GetControlLatency(self): """Get the control latency. Returns: The latency (in seconds) between when the motor command is sent and when the sensor measurements are reported back to the controller. """ return self._control_latency
[ "def", "GetControlLatency", "(", "self", ")", ":", "return", "self", ".", "_control_latency" ]
https://github.com/bulletphysics/bullet3/blob/f0f2a952e146f016096db6f85cf0c44ed75b0b9a/examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur.py#L895-L902
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py3/pandas/core/generic.py
python
NDFrame._drop_axis
( self: FrameOrSeries, labels, axis, level=None, errors: str = "raise" )
return result
Drop labels from specified axis. Used in the ``drop`` method internally. Parameters ---------- labels : single label or list-like axis : int or axis name level : int or level name, default None For MultiIndex errors : {'ignore', 'raise'}, default 'rai...
Drop labels from specified axis. Used in the ``drop`` method internally.
[ "Drop", "labels", "from", "specified", "axis", ".", "Used", "in", "the", "drop", "method", "internally", "." ]
def _drop_axis( self: FrameOrSeries, labels, axis, level=None, errors: str = "raise" ) -> FrameOrSeries: """ Drop labels from specified axis. Used in the ``drop`` method internally. Parameters ---------- labels : single label or list-like axis : int o...
[ "def", "_drop_axis", "(", "self", ":", "FrameOrSeries", ",", "labels", ",", "axis", ",", "level", "=", "None", ",", "errors", ":", "str", "=", "\"raise\"", ")", "->", "FrameOrSeries", ":", "axis", "=", "self", ".", "_get_axis_number", "(", "axis", ")", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/core/generic.py#L4158-L4221
google/syzygy
8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5
third_party/numpy/files/numpy/oldnumeric/ma.py
python
MaskedArray.__float__
(self)
return float(self.data.item())
Convert self to float.
Convert self to float.
[ "Convert", "self", "to", "float", "." ]
def __float__(self): "Convert self to float." self.unmask() if self._mask is not nomask: raise MAError, 'Cannot convert masked element to a Python float.' return float(self.data.item())
[ "def", "__float__", "(", "self", ")", ":", "self", ".", "unmask", "(", ")", "if", "self", ".", "_mask", "is", "not", "nomask", ":", "raise", "MAError", ",", "'Cannot convert masked element to a Python float.'", "return", "float", "(", "self", ".", "data", "....
https://github.com/google/syzygy/blob/8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5/third_party/numpy/files/numpy/oldnumeric/ma.py#L785-L790
google/orbit
7c0a530f402f0c3753d0bc52f8e3eb620f65d017
third_party/include-what-you-use/fix_includes.py
python
_NextNondeletedLine
(file_lines, line_number)
return None
Returns the line number of the next not-deleted line, or None.
Returns the line number of the next not-deleted line, or None.
[ "Returns", "the", "line", "number", "of", "the", "next", "not", "-", "deleted", "line", "or", "None", "." ]
def _NextNondeletedLine(file_lines, line_number): """Returns the line number of the next not-deleted line, or None.""" for line_number in range(line_number + 1, len(file_lines)): if not file_lines[line_number].deleted: return line_number return None
[ "def", "_NextNondeletedLine", "(", "file_lines", ",", "line_number", ")", ":", "for", "line_number", "in", "range", "(", "line_number", "+", "1", ",", "len", "(", "file_lines", ")", ")", ":", "if", "not", "file_lines", "[", "line_number", "]", ".", "delete...
https://github.com/google/orbit/blob/7c0a530f402f0c3753d0bc52f8e3eb620f65d017/third_party/include-what-you-use/fix_includes.py#L818-L823
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/lite/python/convert.py
python
toco_convert_impl
(input_data, input_tensors, output_tensors, enable_mlir_converter, *args, **kwargs)
return data
Convert a model using TOCO. Typically this function is used to convert from TensorFlow GraphDef to TFLite. Conversion can be customized by providing arguments that are forwarded to `build_toco_convert_protos` (see documentation for details). Args: input_data: Input data (i.e. often `sess.graph_def`), ...
Convert a model using TOCO.
[ "Convert", "a", "model", "using", "TOCO", "." ]
def toco_convert_impl(input_data, input_tensors, output_tensors, enable_mlir_converter, *args, **kwargs): """"Convert a model using TOCO. Typically this function is used to convert from TensorFlow GraphDef to TFLite. Conversion can be customized by providing arguments that are forwarded to ...
[ "def", "toco_convert_impl", "(", "input_data", ",", "input_tensors", ",", "output_tensors", ",", "enable_mlir_converter", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "model_flags", ",", "toco_flags", ",", "debug_info", "=", "build_toco_convert_protos", "(...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/lite/python/convert.py#L416-L450
oracle/graaljs
36a56e8e993d45fc40939a3a4d9c0c24990720f1
graal-nodejs/tools/cpplint.py
python
PrintCategories
()
Prints a list of all the error-categories used by error messages. These are the categories used to filter messages via --filter.
Prints a list of all the error-categories used by error messages.
[ "Prints", "a", "list", "of", "all", "the", "error", "-", "categories", "used", "by", "error", "messages", "." ]
def PrintCategories(): """Prints a list of all the error-categories used by error messages. These are the categories used to filter messages via --filter. """ sys.stderr.write(''.join(' %s\n' % cat for cat in _ERROR_CATEGORIES)) sys.exit(0)
[ "def", "PrintCategories", "(", ")", ":", "sys", ".", "stderr", ".", "write", "(", "''", ".", "join", "(", "' %s\\n'", "%", "cat", "for", "cat", "in", "_ERROR_CATEGORIES", ")", ")", "sys", ".", "exit", "(", "0", ")" ]
https://github.com/oracle/graaljs/blob/36a56e8e993d45fc40939a3a4d9c0c24990720f1/graal-nodejs/tools/cpplint.py#L6803-L6809
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python/src/Lib/distutils/dist.py
python
Distribution._set_command_options
(self, command_obj, option_dict=None)
Set the options for 'command_obj' from 'option_dict'. Basically this means copying elements of a dictionary ('option_dict') to attributes of an instance ('command'). 'command_obj' must be a Command instance. If 'option_dict' is not supplied, uses the standard option dictionary for thi...
Set the options for 'command_obj' from 'option_dict'. Basically this means copying elements of a dictionary ('option_dict') to attributes of an instance ('command').
[ "Set", "the", "options", "for", "command_obj", "from", "option_dict", ".", "Basically", "this", "means", "copying", "elements", "of", "a", "dictionary", "(", "option_dict", ")", "to", "attributes", "of", "an", "instance", "(", "command", ")", "." ]
def _set_command_options(self, command_obj, option_dict=None): """Set the options for 'command_obj' from 'option_dict'. Basically this means copying elements of a dictionary ('option_dict') to attributes of an instance ('command'). 'command_obj' must be a Command instance. If 'option_...
[ "def", "_set_command_options", "(", "self", ",", "command_obj", ",", "option_dict", "=", "None", ")", ":", "command_name", "=", "command_obj", ".", "get_command_name", "(", ")", "if", "option_dict", "is", "None", ":", "option_dict", "=", "self", ".", "get_opti...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Lib/distutils/dist.py#L860-L901
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scikit-learn/py2/sklearn/metrics/pairwise.py
python
euclidean_distances
(X, Y=None, Y_norm_squared=None, squared=False, X_norm_squared=None)
return distances if squared else np.sqrt(distances, out=distances)
Considering the rows of X (and Y=X) as vectors, compute the distance matrix between each pair of vectors. For efficiency reasons, the euclidean distance between a pair of row vector x and y is computed as:: dist(x, y) = sqrt(dot(x, x) - 2 * dot(x, y) + dot(y, y)) This formulation has two adva...
Considering the rows of X (and Y=X) as vectors, compute the distance matrix between each pair of vectors.
[ "Considering", "the", "rows", "of", "X", "(", "and", "Y", "=", "X", ")", "as", "vectors", "compute", "the", "distance", "matrix", "between", "each", "pair", "of", "vectors", "." ]
def euclidean_distances(X, Y=None, Y_norm_squared=None, squared=False, X_norm_squared=None): """ Considering the rows of X (and Y=X) as vectors, compute the distance matrix between each pair of vectors. For efficiency reasons, the euclidean distance between a pair of row vec...
[ "def", "euclidean_distances", "(", "X", ",", "Y", "=", "None", ",", "Y_norm_squared", "=", "None", ",", "squared", "=", "False", ",", "X_norm_squared", "=", "None", ")", ":", "X", ",", "Y", "=", "check_pairwise_arrays", "(", "X", ",", "Y", ")", "if", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scikit-learn/py2/sklearn/metrics/pairwise.py#L162-L256
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/distribute/coordinator/cluster_coordinator.py
python
Cluster.__init__
(self, strategy)
Initializes the cluster instance.
Initializes the cluster instance.
[ "Initializes", "the", "cluster", "instance", "." ]
def __init__(self, strategy): """Initializes the cluster instance.""" self._num_workers = strategy._num_workers self._num_ps = strategy._num_ps # Ignore PS failures reported by workers due to transient connection errors. # Transient connectivity issues between workers and PS are relayed by the ...
[ "def", "__init__", "(", "self", ",", "strategy", ")", ":", "self", ".", "_num_workers", "=", "strategy", ".", "_num_workers", "self", ".", "_num_ps", "=", "strategy", ".", "_num_ps", "# Ignore PS failures reported by workers due to transient connection errors.", "# Tran...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/distribute/coordinator/cluster_coordinator.py#L812-L854
pytorch/pytorch
7176c92687d3cc847cc046bf002269c6949a21c2
torch/ao/quantization/_dbr/quantization_state.py
python
AutoQuantizationState._get_packed_param_name
(self, seen_q_op_info: SeenQOpInfo)
return self.idx_to_packed_weight_name.get(seen_q_op_info.idx, None)
If the op in seen_q_op_info has a quantized packed param, returns it. Otherwise, returns None.
If the op in seen_q_op_info has a quantized packed param, returns it. Otherwise, returns None.
[ "If", "the", "op", "in", "seen_q_op_info", "has", "a", "quantized", "packed", "param", "returns", "it", ".", "Otherwise", "returns", "None", "." ]
def _get_packed_param_name(self, seen_q_op_info: SeenQOpInfo) -> Optional[str]: """ If the op in seen_q_op_info has a quantized packed param, returns it. Otherwise, returns None. """ return self.idx_to_packed_weight_name.get(seen_q_op_info.idx, None)
[ "def", "_get_packed_param_name", "(", "self", ",", "seen_q_op_info", ":", "SeenQOpInfo", ")", "->", "Optional", "[", "str", "]", ":", "return", "self", ".", "idx_to_packed_weight_name", ".", "get", "(", "seen_q_op_info", ".", "idx", ",", "None", ")" ]
https://github.com/pytorch/pytorch/blob/7176c92687d3cc847cc046bf002269c6949a21c2/torch/ao/quantization/_dbr/quantization_state.py#L594-L599
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/math_ops.py
python
equal
(x, y, name=None)
return gen_math_ops.equal(x, y, name=name)
Returns the truth value of (x == y) element-wise. Usage: ```python x = tf.constant([2, 4]) y = tf.constant(2) tf.math.equal(x, y) ==> array([True, False]) x = tf.constant([2, 4]) y = tf.constant([2, 4]) tf.math.equal(x, y) ==> array([True, True]) ``` **NOTE**: `Equal` supports broadcasting. Mor...
Returns the truth value of (x == y) element-wise.
[ "Returns", "the", "truth", "value", "of", "(", "x", "==", "y", ")", "element", "-", "wise", "." ]
def equal(x, y, name=None): """Returns the truth value of (x == y) element-wise. Usage: ```python x = tf.constant([2, 4]) y = tf.constant(2) tf.math.equal(x, y) ==> array([True, False]) x = tf.constant([2, 4]) y = tf.constant([2, 4]) tf.math.equal(x, y) ==> array([True, True]) ``` **NOTE**: `...
[ "def", "equal", "(", "x", ",", "y", ",", "name", "=", "None", ")", ":", "return", "gen_math_ops", ".", "equal", "(", "x", ",", "y", ",", "name", "=", "name", ")" ]
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/math_ops.py#L1280-L1306
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/html2.py
python
WebView.IsBusy
(*args, **kwargs)
return _html2.WebView_IsBusy(*args, **kwargs)
IsBusy(self) -> bool
IsBusy(self) -> bool
[ "IsBusy", "(", "self", ")", "-", ">", "bool" ]
def IsBusy(*args, **kwargs): """IsBusy(self) -> bool""" return _html2.WebView_IsBusy(*args, **kwargs)
[ "def", "IsBusy", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_html2", ".", "WebView_IsBusy", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/html2.py#L171-L173
apache/incubator-mxnet
f03fb23f1d103fec9541b5ae59ee06b1734a51d9
python/mxnet/_ctypes/symbol.py
python
SymbolBase._set_handle
(self, handle)
Set handle.
Set handle.
[ "Set", "handle", "." ]
def _set_handle(self, handle): """Set handle.""" self.handle = handle
[ "def", "_set_handle", "(", "self", ",", "handle", ")", ":", "self", ".", "handle", "=", "handle" ]
https://github.com/apache/incubator-mxnet/blob/f03fb23f1d103fec9541b5ae59ee06b1734a51d9/python/mxnet/_ctypes/symbol.py#L107-L109
crosslife/OpenBird
9e0198a1a2295f03fa1e8676e216e22c9c7d380b
cocos2d/tools/bindings-generator/clang/cindex.py
python
Cursor.is_bitfield
(self)
return conf.lib.clang_Cursor_isBitField(self)
Check if the field is a bitfield.
Check if the field is a bitfield.
[ "Check", "if", "the", "field", "is", "a", "bitfield", "." ]
def is_bitfield(self): """ Check if the field is a bitfield. """ return conf.lib.clang_Cursor_isBitField(self)
[ "def", "is_bitfield", "(", "self", ")", ":", "return", "conf", ".", "lib", ".", "clang_Cursor_isBitField", "(", "self", ")" ]
https://github.com/crosslife/OpenBird/blob/9e0198a1a2295f03fa1e8676e216e22c9c7d380b/cocos2d/tools/bindings-generator/clang/cindex.py#L1483-L1487
arangodb/arangodb
0d658689c7d1b721b314fa3ca27d38303e1570c8
3rdParty/V8/gyp/buildtime_helpers/mac_tool.py
python
MacTool.ExecFlock
(self, lockfile, *cmd_list)
return subprocess.call(cmd_list)
Emulates the most basic behavior of Linux's flock(1).
Emulates the most basic behavior of Linux's flock(1).
[ "Emulates", "the", "most", "basic", "behavior", "of", "Linux", "s", "flock", "(", "1", ")", "." ]
def ExecFlock(self, lockfile, *cmd_list): """Emulates the most basic behavior of Linux's flock(1).""" # Rely on exception handling to report errors. fd = os.open(lockfile, os.O_RDONLY|os.O_NOCTTY|os.O_CREAT, 0o666) fcntl.flock(fd, fcntl.LOCK_EX) return subprocess.call(cmd_list)
[ "def", "ExecFlock", "(", "self", ",", "lockfile", ",", "*", "cmd_list", ")", ":", "# Rely on exception handling to report errors.", "fd", "=", "os", ".", "open", "(", "lockfile", ",", "os", ".", "O_RDONLY", "|", "os", ".", "O_NOCTTY", "|", "os", ".", "O_CR...
https://github.com/arangodb/arangodb/blob/0d658689c7d1b721b314fa3ca27d38303e1570c8/3rdParty/V8/gyp/buildtime_helpers/mac_tool.py#L248-L253
qgis/QGIS
15a77662d4bb712184f6aa60d0bd663010a76a75
python/plugins/db_manager/db_plugins/oracle/connector.py
python
OracleDBConnector.getTableGeomTypes
(self, table, geomCol)
return geomtypes, srids
Return all the wkbTypes for a table by requesting geometry column.
Return all the wkbTypes for a table by requesting geometry column.
[ "Return", "all", "the", "wkbTypes", "for", "a", "table", "by", "requesting", "geometry", "column", "." ]
def getTableGeomTypes(self, table, geomCol): """Return all the wkbTypes for a table by requesting geometry column. """ estimated = u"" if self.useEstimatedMetadata: estimated = u"AND ROWNUM < 100" # Grab all of geometry types from the layer query = u...
[ "def", "getTableGeomTypes", "(", "self", ",", "table", ",", "geomCol", ")", ":", "estimated", "=", "u\"\"", "if", "self", ".", "useEstimatedMetadata", ":", "estimated", "=", "u\"AND ROWNUM < 100\"", "# Grab all of geometry types from the layer", "query", "=", "u\"\"\"...
https://github.com/qgis/QGIS/blob/15a77662d4bb712184f6aa60d0bd663010a76a75/python/plugins/db_manager/db_plugins/oracle/connector.py#L752-L795
klzgrad/naiveproxy
ed2c513637c77b18721fe428d7ed395b4d284c83
src/tools/grit/grit/gather/skeleton_gatherer.py
python
SkeletonGatherer.Escape
(self, text)
return text
Subclasses can override. Base impl is identity.
Subclasses can override. Base impl is identity.
[ "Subclasses", "can", "override", ".", "Base", "impl", "is", "identity", "." ]
def Escape(self, text): '''Subclasses can override. Base impl is identity. ''' return text
[ "def", "Escape", "(", "self", ",", "text", ")", ":", "return", "text" ]
https://github.com/klzgrad/naiveproxy/blob/ed2c513637c77b18721fe428d7ed395b4d284c83/src/tools/grit/grit/gather/skeleton_gatherer.py#L49-L52
sfzhang15/RefineDet
52b6fe23dc1a160fe710b7734576dca509bf4fae
scripts/cpp_lint.py
python
RemoveMultiLineComments
(filename, lines, error)
Removes multiline (c-style) comments from lines.
Removes multiline (c-style) comments from lines.
[ "Removes", "multiline", "(", "c", "-", "style", ")", "comments", "from", "lines", "." ]
def RemoveMultiLineComments(filename, lines, error): """Removes multiline (c-style) comments from lines.""" lineix = 0 while lineix < len(lines): lineix_begin = FindNextMultiLineCommentStart(lines, lineix) if lineix_begin >= len(lines): return lineix_end = FindNextMultiLineCommentEnd(lines, line...
[ "def", "RemoveMultiLineComments", "(", "filename", ",", "lines", ",", "error", ")", ":", "lineix", "=", "0", "while", "lineix", "<", "len", "(", "lines", ")", ":", "lineix_begin", "=", "FindNextMultiLineCommentStart", "(", "lines", ",", "lineix", ")", "if", ...
https://github.com/sfzhang15/RefineDet/blob/52b6fe23dc1a160fe710b7734576dca509bf4fae/scripts/cpp_lint.py#L1151-L1164
apache/trafodion
8455c839ad6b6d7b6e04edda5715053095b78046
core/sqf/src/seatrans/hbase-trx/src/main/python/thrift2/gen-py/hbase/THBaseService.py
python
Client.closeScanner
(self, scannerId)
Closes the scanner. Should be called if you need to close the Scanner before all results are read. Exhausted scanners are closed automatically. Parameters: - scannerId: the Id of the Scanner to close *
Closes the scanner. Should be called if you need to close the Scanner before all results are read.
[ "Closes", "the", "scanner", ".", "Should", "be", "called", "if", "you", "need", "to", "close", "the", "Scanner", "before", "all", "results", "are", "read", "." ]
def closeScanner(self, scannerId): """ Closes the scanner. Should be called if you need to close the Scanner before all results are read. Exhausted scanners are closed automatically. Parameters: - scannerId: the Id of the Scanner to close * """ self.send_closeScanner(scannerId) se...
[ "def", "closeScanner", "(", "self", ",", "scannerId", ")", ":", "self", ".", "send_closeScanner", "(", "scannerId", ")", "self", ".", "recv_closeScanner", "(", ")" ]
https://github.com/apache/trafodion/blob/8455c839ad6b6d7b6e04edda5715053095b78046/core/sqf/src/seatrans/hbase-trx/src/main/python/thrift2/gen-py/hbase/THBaseService.py#L681-L692
jsupancic/deep_hand_pose
22cbeae1a8410ff5d37c060c7315719d0a5d608f
scripts/cpp_lint.py
python
FileInfo.RepositoryName
(self)
return fullname
FullName after removing the local path to the repository. If we have a real absolute path name here we can try to do something smart: detecting the root of the checkout and truncating /path/to/checkout from the name so that we get header guards that don't include things like "C:\Documents and Settings\...
FullName after removing the local path to the repository.
[ "FullName", "after", "removing", "the", "local", "path", "to", "the", "repository", "." ]
def RepositoryName(self): """FullName after removing the local path to the repository. If we have a real absolute path name here we can try to do something smart: detecting the root of the checkout and truncating /path/to/checkout from the name so that we get header guards that don't include things lik...
[ "def", "RepositoryName", "(", "self", ")", ":", "fullname", "=", "self", ".", "FullName", "(", ")", "if", "os", ".", "path", ".", "exists", "(", "fullname", ")", ":", "project_dir", "=", "os", ".", "path", ".", "dirname", "(", "fullname", ")", "if", ...
https://github.com/jsupancic/deep_hand_pose/blob/22cbeae1a8410ff5d37c060c7315719d0a5d608f/scripts/cpp_lint.py#L885-L928
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/lzma.py
python
LZMAFile.seekable
(self)
return self.readable() and self._buffer.seekable()
Return whether the file supports seeking.
Return whether the file supports seeking.
[ "Return", "whether", "the", "file", "supports", "seeking", "." ]
def seekable(self): """Return whether the file supports seeking.""" return self.readable() and self._buffer.seekable()
[ "def", "seekable", "(", "self", ")", ":", "return", "self", ".", "readable", "(", ")", "and", "self", ".", "_buffer", ".", "seekable", "(", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/lzma.py#L168-L170
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/protobuf/py2/google/protobuf/text_format.py
python
_ConsumeUint32
(tokenizer)
return _ConsumeInteger(tokenizer, is_signed=False, is_long=False)
Consumes an unsigned 32bit integer number from tokenizer. Args: tokenizer: A tokenizer used to parse the number. Returns: The integer parsed. Raises: ParseError: If an unsigned 32bit integer couldn't be consumed.
Consumes an unsigned 32bit integer number from tokenizer.
[ "Consumes", "an", "unsigned", "32bit", "integer", "number", "from", "tokenizer", "." ]
def _ConsumeUint32(tokenizer): """Consumes an unsigned 32bit integer number from tokenizer. Args: tokenizer: A tokenizer used to parse the number. Returns: The integer parsed. Raises: ParseError: If an unsigned 32bit integer couldn't be consumed. """ return _ConsumeInteger(tokenizer, is_signe...
[ "def", "_ConsumeUint32", "(", "tokenizer", ")", ":", "return", "_ConsumeInteger", "(", "tokenizer", ",", "is_signed", "=", "False", ",", "is_long", "=", "False", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/protobuf/py2/google/protobuf/text_format.py#L1592-L1604
Cisco-Talos/moflow
ed71dfb0540d9e0d7a4c72f0881b58958d573728
BAP-0.7-moflow/libtracewrap/libtrace/protobuf/python/stubout.py
python
StubOutForTesting.SmartUnsetAll
(self)
Reverses all the SmartSet() calls, restoring things to their original definition. Its okay to call SmartUnsetAll() repeatedly, as later calls have no effect if no SmartSet() calls have been made.
Reverses all the SmartSet() calls, restoring things to their original definition. Its okay to call SmartUnsetAll() repeatedly, as later calls have no effect if no SmartSet() calls have been made.
[ "Reverses", "all", "the", "SmartSet", "()", "calls", "restoring", "things", "to", "their", "original", "definition", ".", "Its", "okay", "to", "call", "SmartUnsetAll", "()", "repeatedly", "as", "later", "calls", "have", "no", "effect", "if", "no", "SmartSet", ...
def SmartUnsetAll(self): """Reverses all the SmartSet() calls, restoring things to their original definition. Its okay to call SmartUnsetAll() repeatedly, as later calls have no effect if no SmartSet() calls have been made. """ self.stubs.reverse() for args in self.stubs: setattr(*args)...
[ "def", "SmartUnsetAll", "(", "self", ")", ":", "self", ".", "stubs", ".", "reverse", "(", ")", "for", "args", "in", "self", ".", "stubs", ":", "setattr", "(", "*", "args", ")", "self", ".", "stubs", "=", "[", "]" ]
https://github.com/Cisco-Talos/moflow/blob/ed71dfb0540d9e0d7a4c72f0881b58958d573728/BAP-0.7-moflow/libtracewrap/libtrace/protobuf/python/stubout.py#L96-L107
PlatformLab/RAMCloud
b1866af19124325a6dfd8cbc267e2e3ef1f965d1
scripts/log.py
python
createDir
(top, log_exists=False)
return subdir
Given a top-level log directory, create a subdirectory within that directory to use for log files for a particular run of an application, and make a symbolic link from "latest" to that subdirectory. Return the path to the subdirectory.
Given a top-level log directory, create a subdirectory within that directory to use for log files for a particular run of an application, and make a symbolic link from "latest" to that subdirectory. Return the path to the subdirectory.
[ "Given", "a", "top", "-", "level", "log", "directory", "create", "a", "subdirectory", "within", "that", "directory", "to", "use", "for", "log", "files", "for", "a", "particular", "run", "of", "an", "application", "and", "make", "a", "symbolic", "link", "fr...
def createDir(top, log_exists=False): """ Given a top-level log directory, create a subdirectory within that directory to use for log files for a particular run of an application, and make a symbolic link from "latest" to that subdirectory. Return the path to the subdirectory. """ try: ...
[ "def", "createDir", "(", "top", ",", "log_exists", "=", "False", ")", ":", "try", ":", "os", ".", "mkdir", "(", "top", ")", "except", ":", "pass", "# when a new server is started after the clusterperf test is started,", "# it uses a new cluster object but is still part of...
https://github.com/PlatformLab/RAMCloud/blob/b1866af19124325a6dfd8cbc267e2e3ef1f965d1/scripts/log.py#L27-L58
tangzhenyu/Scene-Text-Understanding
0f7ffc7aea5971a50cdc03d33d0a41075285948b
SynthText_Chinese/colorize3_poisson.py
python
Colorize.color_border
(self, col_text, col_bg)
return np.squeeze(cv.cvtColor(col_text[None,None,:],cv.cv.CV_HSV2RGB))
Decide on a color for the border: - could be the same as text-color but lower/higher 'VALUE' component. - could be the same as bg-color but lower/higher 'VALUE'. - could be 'mid-way' color b/w text & bg colors.
Decide on a color for the border: - could be the same as text-color but lower/higher 'VALUE' component. - could be the same as bg-color but lower/higher 'VALUE'. - could be 'mid-way' color b/w text & bg colors.
[ "Decide", "on", "a", "color", "for", "the", "border", ":", "-", "could", "be", "the", "same", "as", "text", "-", "color", "but", "lower", "/", "higher", "VALUE", "component", ".", "-", "could", "be", "the", "same", "as", "bg", "-", "color", "but", ...
def color_border(self, col_text, col_bg): """ Decide on a color for the border: - could be the same as text-color but lower/higher 'VALUE' component. - could be the same as bg-color but lower/higher 'VALUE'. - could be 'mid-way' color b/w text & bg colors. """...
[ "def", "color_border", "(", "self", ",", "col_text", ",", "col_bg", ")", ":", "choice", "=", "np", ".", "random", ".", "choice", "(", "3", ")", "col_text", "=", "cv", ".", "cvtColor", "(", "col_text", ",", "cv", ".", "cv", ".", "CV_RGB2HSV", ")", "...
https://github.com/tangzhenyu/Scene-Text-Understanding/blob/0f7ffc7aea5971a50cdc03d33d0a41075285948b/SynthText_Chinese/colorize3_poisson.py#L247-L288
tensorflow/deepmath
b5b721f54de1d5d6a02d78f5da5995237f9995f9
deepmath/deephol/prover_util.py
python
ProverTaskGenerator.emit_error
(self, error_msg, *args)
Stores error messages for later processing.
Stores error messages for later processing.
[ "Stores", "error", "messages", "for", "later", "processing", "." ]
def emit_error(self, error_msg, *args): """Stores error messages for later processing.""" self.errors.append('%s for log %d' % (error_msg % args, self.count_logs)) self.count_errors[error_msg] = self.count_errors.get(error_msg, 0) + 1
[ "def", "emit_error", "(", "self", ",", "error_msg", ",", "*", "args", ")", ":", "self", ".", "errors", ".", "append", "(", "'%s for log %d'", "%", "(", "error_msg", "%", "args", ",", "self", ".", "count_logs", ")", ")", "self", ".", "count_errors", "["...
https://github.com/tensorflow/deepmath/blob/b5b721f54de1d5d6a02d78f5da5995237f9995f9/deepmath/deephol/prover_util.py#L290-L293
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/Jinja2/py2/jinja2/environment.py
python
Environment.extend
(self, **attributes)
Add the items to the instance of the environment if they do not exist yet. This is used by :ref:`extensions <writing-extensions>` to register callbacks and configuration values without breaking inheritance.
Add the items to the instance of the environment if they do not exist yet. This is used by :ref:`extensions <writing-extensions>` to register callbacks and configuration values without breaking inheritance.
[ "Add", "the", "items", "to", "the", "instance", "of", "the", "environment", "if", "they", "do", "not", "exist", "yet", ".", "This", "is", "used", "by", ":", "ref", ":", "extensions", "<writing", "-", "extensions", ">", "to", "register", "callbacks", "and...
def extend(self, **attributes): """Add the items to the instance of the environment if they do not exist yet. This is used by :ref:`extensions <writing-extensions>` to register callbacks and configuration values without breaking inheritance. """ for key, value in iteritems(attri...
[ "def", "extend", "(", "self", ",", "*", "*", "attributes", ")", ":", "for", "key", ",", "value", "in", "iteritems", "(", "attributes", ")", ":", "if", "not", "hasattr", "(", "self", ",", "key", ")", ":", "setattr", "(", "self", ",", "key", ",", "...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/Jinja2/py2/jinja2/environment.py#L376-L383
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/pstats.py
python
add_func_stats
(target, source)
return (cc+t_cc, nc+t_nc, tt+t_tt, ct+t_ct, add_callers(t_callers, callers))
Add together all the stats for two profile entries.
Add together all the stats for two profile entries.
[ "Add", "together", "all", "the", "stats", "for", "two", "profile", "entries", "." ]
def add_func_stats(target, source): """Add together all the stats for two profile entries.""" cc, nc, tt, ct, callers = source t_cc, t_nc, t_tt, t_ct, t_callers = target return (cc+t_cc, nc+t_nc, tt+t_tt, ct+t_ct, add_callers(t_callers, callers))
[ "def", "add_func_stats", "(", "target", ",", "source", ")", ":", "cc", ",", "nc", ",", "tt", ",", "ct", ",", "callers", "=", "source", "t_cc", ",", "t_nc", ",", "t_tt", ",", "t_ct", ",", "t_callers", "=", "target", "return", "(", "cc", "+", "t_cc",...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/pstats.py#L499-L504
hpi-xnor/BMXNet
ed0b201da6667887222b8e4b5f997c4f6b61943d
python/mxnet/ndarray/ndarray.py
python
NDArray.copyto
(self, other)
Copies the value of this array to another array. If ``other`` is a ``NDArray`` object, then ``other.shape`` and ``self.shape`` should be the same. This function copies the value from ``self`` to ``other``. If ``other`` is a context, a new ``NDArray`` will be first created on th...
Copies the value of this array to another array.
[ "Copies", "the", "value", "of", "this", "array", "to", "another", "array", "." ]
def copyto(self, other): """Copies the value of this array to another array. If ``other`` is a ``NDArray`` object, then ``other.shape`` and ``self.shape`` should be the same. This function copies the value from ``self`` to ``other``. If ``other`` is a context, a new ``NDArray``...
[ "def", "copyto", "(", "self", ",", "other", ")", ":", "if", "isinstance", "(", "other", ",", "NDArray", ")", ":", "if", "other", ".", "handle", "is", "self", ".", "handle", ":", "warnings", ".", "warn", "(", "'You are attempting to copy an array to itself'",...
https://github.com/hpi-xnor/BMXNet/blob/ed0b201da6667887222b8e4b5f997c4f6b61943d/python/mxnet/ndarray/ndarray.py#L1837-L1881
microsoft/TSS.MSR
0f2516fca2cd9929c31d5450e39301c9bde43688
TSS.Py/src/TpmTypes.py
python
TPML_PCR_SELECTION.toTpm
(self, buf)
TpmMarshaller method
TpmMarshaller method
[ "TpmMarshaller", "method" ]
def toTpm(self, buf): """ TpmMarshaller method """ buf.writeObjArr(self.pcrSelections)
[ "def", "toTpm", "(", "self", ",", "buf", ")", ":", "buf", ".", "writeObjArr", "(", "self", ".", "pcrSelections", ")" ]
https://github.com/microsoft/TSS.MSR/blob/0f2516fca2cd9929c31d5450e39301c9bde43688/TSS.Py/src/TpmTypes.py#L4676-L4678
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/mapreduce/mapreduce/handlers.py
python
StartJobHandler._start_map
(cls, name, mapper_spec, mapreduce_params, queue_name, eta=None, countdown=None, hooks_class_name=None, _app=None, in_xg_transaction=False)
return mapreduce_id
See control.start_map. Requirements for this method: 1. The request that invokes this method can either be regular or from taskqueue. So taskqueue specific headers can not be used. 2. Each invocation transactionally starts an isolated mapreduce job with a unique id. MapreduceState should be i...
See control.start_map.
[ "See", "control", ".", "start_map", "." ]
def _start_map(cls, name, mapper_spec, mapreduce_params, queue_name, eta=None, countdown=None, hooks_class_name=None, _app=None, in_xg_transaction=False): # pylint...
[ "def", "_start_map", "(", "cls", ",", "name", ",", "mapper_spec", ",", "mapreduce_params", ",", "queue_name", ",", "eta", "=", "None", ",", "countdown", "=", "None", ",", "hooks_class_name", "=", "None", ",", "_app", "=", "None", ",", "in_xg_transaction", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/mapreduce/mapreduce/handlers.py#L1701-L1763
microsoft/TSS.MSR
0f2516fca2cd9929c31d5450e39301c9bde43688
TSS.Py/src/TpmTypes.py
python
HMACResponse.initFromTpm
(self, buf)
TpmMarshaller method
TpmMarshaller method
[ "TpmMarshaller", "method" ]
def initFromTpm(self, buf): """ TpmMarshaller method """ self.outHMAC = buf.readSizedByteBuf()
[ "def", "initFromTpm", "(", "self", ",", "buf", ")", ":", "self", ".", "outHMAC", "=", "buf", ".", "readSizedByteBuf", "(", ")" ]
https://github.com/microsoft/TSS.MSR/blob/0f2516fca2cd9929c31d5450e39301c9bde43688/TSS.Py/src/TpmTypes.py#L11703-L11705
apache/incubator-mxnet
f03fb23f1d103fec9541b5ae59ee06b1734a51d9
python/mxnet/ndarray/ndarray.py
python
NDArray.__gt__
(self, other)
return greater(self, other)
x.__gt__(y) <=> x>y <=> mx.nd.greater(x, y)
x.__gt__(y) <=> x>y <=> mx.nd.greater(x, y)
[ "x", ".", "__gt__", "(", "y", ")", "<", "=", ">", "x", ">", "y", "<", "=", ">", "mx", ".", "nd", ".", "greater", "(", "x", "y", ")" ]
def __gt__(self, other): """x.__gt__(y) <=> x>y <=> mx.nd.greater(x, y) """ return greater(self, other)
[ "def", "__gt__", "(", "self", ",", "other", ")", ":", "return", "greater", "(", "self", ",", "other", ")" ]
https://github.com/apache/incubator-mxnet/blob/f03fb23f1d103fec9541b5ae59ee06b1734a51d9/python/mxnet/ndarray/ndarray.py#L433-L435
SoarGroup/Soar
a1c5e249499137a27da60533c72969eef3b8ab6b
scons/scons-local-4.1.0/SCons/Tool/ilink32.py
python
generate
(env)
Add Builders and construction variables for Borland ilink to an Environment.
Add Builders and construction variables for Borland ilink to an Environment.
[ "Add", "Builders", "and", "construction", "variables", "for", "Borland", "ilink", "to", "an", "Environment", "." ]
def generate(env): """Add Builders and construction variables for Borland ilink to an Environment.""" SCons.Tool.createSharedLibBuilder(env) SCons.Tool.createProgBuilder(env) env['LINK'] = '$CC' env['LINKFLAGS'] = SCons.Util.CLVar('') env['LINKCOM'] = '$LINK -q $LINKFLAGS -e$TA...
[ "def", "generate", "(", "env", ")", ":", "SCons", ".", "Tool", ".", "createSharedLibBuilder", "(", "env", ")", "SCons", ".", "Tool", ".", "createProgBuilder", "(", "env", ")", "env", "[", "'LINK'", "]", "=", "'$CC'", "env", "[", "'LINKFLAGS'", "]", "="...
https://github.com/SoarGroup/Soar/blob/a1c5e249499137a27da60533c72969eef3b8ab6b/scons/scons-local-4.1.0/SCons/Tool/ilink32.py#L36-L48
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/ops/composite/multitype_ops/mul_impl.py
python
_scalar_mul_tensor
(x, y)
return F.tensor_mul(x, y)
Returns x * y where x is a scalar and y is a tensor. x and y have same dtype. Outputs: Tensor, has the same dtype as x.
Returns x * y where x is a scalar and y is a tensor. x and y have same dtype.
[ "Returns", "x", "*", "y", "where", "x", "is", "a", "scalar", "and", "y", "is", "a", "tensor", ".", "x", "and", "y", "have", "same", "dtype", "." ]
def _scalar_mul_tensor(x, y): """ Returns x * y where x is a scalar and y is a tensor. x and y have same dtype. Outputs: Tensor, has the same dtype as x. """ return F.tensor_mul(x, y)
[ "def", "_scalar_mul_tensor", "(", "x", ",", "y", ")", ":", "return", "F", ".", "tensor_mul", "(", "x", ",", "y", ")" ]
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/ops/composite/multitype_ops/mul_impl.py#L77-L84
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/core/computation/scope.py
python
Scope.ntemps
(self)
return len(self.temps)
The number of temporary variables in this scope
The number of temporary variables in this scope
[ "The", "number", "of", "temporary", "variables", "in", "this", "scope" ]
def ntemps(self) -> int: """The number of temporary variables in this scope""" return len(self.temps)
[ "def", "ntemps", "(", "self", ")", "->", "int", ":", "return", "len", "(", "self", ".", "temps", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/core/computation/scope.py#L298-L300
D-X-Y/caffe-faster-rcnn
eb50c97ff48f3df115d0e85fe0a32b0c7e2aa4cb
examples/pycaffe/layers/pascal_multilabel_datalayers.py
python
BatchLoader.load_next_image
(self)
return self.transformer.preprocess(im), multilabel
Load the next image in a batch.
Load the next image in a batch.
[ "Load", "the", "next", "image", "in", "a", "batch", "." ]
def load_next_image(self): """ Load the next image in a batch. """ # Did we finish an epoch? if self._cur == len(self.indexlist): self._cur = 0 shuffle(self.indexlist) # Load an image index = self.indexlist[self._cur] # Get the image inde...
[ "def", "load_next_image", "(", "self", ")", ":", "# Did we finish an epoch?", "if", "self", ".", "_cur", "==", "len", "(", "self", ".", "indexlist", ")", ":", "self", ".", "_cur", "=", "0", "shuffle", "(", "self", ".", "indexlist", ")", "# Load an image", ...
https://github.com/D-X-Y/caffe-faster-rcnn/blob/eb50c97ff48f3df115d0e85fe0a32b0c7e2aa4cb/examples/pycaffe/layers/pascal_multilabel_datalayers.py#L106-L137
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Source/ThirdParty/CEF3/pristine/cef_source/tools/file_util.py
python
backup_file
(name)
Rename the file to a name that includes the current time stamp.
Rename the file to a name that includes the current time stamp.
[ "Rename", "the", "file", "to", "a", "name", "that", "includes", "the", "current", "time", "stamp", "." ]
def backup_file(name): """ Rename the file to a name that includes the current time stamp. """ move_file(name, name+'.'+time.strftime('%Y-%m-%d-%H-%M-%S'))
[ "def", "backup_file", "(", "name", ")", ":", "move_file", "(", "name", ",", "name", "+", "'.'", "+", "time", ".", "strftime", "(", "'%Y-%m-%d-%H-%M-%S'", ")", ")" ]
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Source/ThirdParty/CEF3/pristine/cef_source/tools/file_util.py#L43-L45
google/iree
1224bbdbe65b0d1fdf40e7324f60f68beeaf7c76
integrations/tensorflow/iree-dialects/python/iree/compiler/dialects/iree_pydm/importer/importer.py
python
ExpressionImporter.get_call_result
(self, args: Sequence[ir.Value])
Perfoms a call against the expression result, returning the value.
Perfoms a call against the expression result, returning the value.
[ "Perfoms", "a", "call", "against", "the", "expression", "result", "returning", "the", "value", "." ]
def get_call_result(self, args: Sequence[ir.Value]) -> ir.Value: """Perfoms a call against the expression result, returning the value.""" if isinstance(self._result, ir.Value): return self.fctx.ic.abort( f"TODO: User defined function call not supported") else: # Intrinsic. return...
[ "def", "get_call_result", "(", "self", ",", "args", ":", "Sequence", "[", "ir", ".", "Value", "]", ")", "->", "ir", ".", "Value", ":", "if", "isinstance", "(", "self", ".", "_result", ",", "ir", ".", "Value", ")", ":", "return", "self", ".", "fctx"...
https://github.com/google/iree/blob/1224bbdbe65b0d1fdf40e7324f60f68beeaf7c76/integrations/tensorflow/iree-dialects/python/iree/compiler/dialects/iree_pydm/importer/importer.py#L506-L513
facebook/redex
fac189a289bca2647061f9e364016afc1096500d
tools/python/file_extract.py
python
FileExtract.get_sint8
(self, fail_value=0)
return self._unpack("b", s) if s else fail_value
Extract a int8_t from the current file position.
Extract a int8_t from the current file position.
[ "Extract", "a", "int8_t", "from", "the", "current", "file", "position", "." ]
def get_sint8(self, fail_value=0): """Extract a int8_t from the current file position.""" s = self.read_size(1) return self._unpack("b", s) if s else fail_value
[ "def", "get_sint8", "(", "self", ",", "fail_value", "=", "0", ")", ":", "s", "=", "self", ".", "read_size", "(", "1", ")", "return", "self", ".", "_unpack", "(", "\"b\"", ",", "s", ")", "if", "s", "else", "fail_value" ]
https://github.com/facebook/redex/blob/fac189a289bca2647061f9e364016afc1096500d/tools/python/file_extract.py#L318-L321
microsoft/checkedc-clang
a173fefde5d7877b7750e7ce96dd08cf18baebf2
compiler-rt/lib/sanitizer_common/scripts/cpplint.py
python
CheckMakePairUsesDeduction
(filename, clean_lines, linenum, error)
Check that make_pair's template arguments are deduced. G++ 4.6 in C++11 mode fails badly if make_pair's template arguments are specified explicitly, and such use isn't intended in any case. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linen...
Check that make_pair's template arguments are deduced.
[ "Check", "that", "make_pair", "s", "template", "arguments", "are", "deduced", "." ]
def CheckMakePairUsesDeduction(filename, clean_lines, linenum, error): """Check that make_pair's template arguments are deduced. G++ 4.6 in C++11 mode fails badly if make_pair's template arguments are specified explicitly, and such use isn't intended in any case. Args: filename: The name of the current fi...
[ "def", "CheckMakePairUsesDeduction", "(", "filename", ",", "clean_lines", ",", "linenum", ",", "error", ")", ":", "line", "=", "clean_lines", ".", "elided", "[", "linenum", "]", "match", "=", "_RE_PATTERN_EXPLICIT_MAKEPAIR", ".", "search", "(", "line", ")", "i...
https://github.com/microsoft/checkedc-clang/blob/a173fefde5d7877b7750e7ce96dd08cf18baebf2/compiler-rt/lib/sanitizer_common/scripts/cpplint.py#L5600-L5618
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/examples/learn/text_classification.py
python
estimator_spec_for_softmax_classification
( logits, labels, mode)
return tf.estimator.EstimatorSpec( mode=mode, loss=loss, eval_metric_ops=eval_metric_ops)
Returns EstimatorSpec instance for softmax classification.
Returns EstimatorSpec instance for softmax classification.
[ "Returns", "EstimatorSpec", "instance", "for", "softmax", "classification", "." ]
def estimator_spec_for_softmax_classification( logits, labels, mode): """Returns EstimatorSpec instance for softmax classification.""" predicted_classes = tf.argmax(logits, 1) if mode == tf.estimator.ModeKeys.PREDICT: return tf.estimator.EstimatorSpec( mode=mode, predictions={ ...
[ "def", "estimator_spec_for_softmax_classification", "(", "logits", ",", "labels", ",", "mode", ")", ":", "predicted_classes", "=", "tf", ".", "argmax", "(", "logits", ",", "1", ")", "if", "mode", "==", "tf", ".", "estimator", ".", "ModeKeys", ".", "PREDICT",...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/examples/learn/text_classification.py#L37-L62
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
native_client_sdk/src/build_tools/make_nacl_tools.py
python
Install
(options, tools=[], runtimes=[])
Install the NaCl tools and runtimes into the SDK staging area. Assumes that all necessary artifacts are built into the NaCl scons-out/staging directory, and copies them from there into the SDK staging area under toolchain. Args: options: The build options object. This is populated from command-line ...
Install the NaCl tools and runtimes into the SDK staging area.
[ "Install", "the", "NaCl", "tools", "and", "runtimes", "into", "the", "SDK", "staging", "area", "." ]
def Install(options, tools=[], runtimes=[]): '''Install the NaCl tools and runtimes into the SDK staging area. Assumes that all necessary artifacts are built into the NaCl scons-out/staging directory, and copies them from there into the SDK staging area under toolchain. Args: options: The build options ...
[ "def", "Install", "(", "options", ",", "tools", "=", "[", "]", ",", "runtimes", "=", "[", "]", ")", ":", "# TODO(bradnelson): add an 'install' alias to the main build for this.", "nacl_dir", "=", "os", ".", "path", ".", "join", "(", "options", ".", "nacl_dir", ...
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/native_client_sdk/src/build_tools/make_nacl_tools.py#L86-L143
CRYTEK/CRYENGINE
232227c59a220cbbd311576f0fbeba7bb53b2a8c
Editor/Python/windows/Lib/site-packages/setuptools/_vendor/six.py
python
remove_move
(name)
Remove item from six.moves.
Remove item from six.moves.
[ "Remove", "item", "from", "six", ".", "moves", "." ]
def remove_move(name): """Remove item from six.moves.""" try: delattr(_MovedItems, name) except AttributeError: try: del moves.__dict__[name] except KeyError: raise AttributeError("no such move, %r" % (name,))
[ "def", "remove_move", "(", "name", ")", ":", "try", ":", "delattr", "(", "_MovedItems", ",", "name", ")", "except", "AttributeError", ":", "try", ":", "del", "moves", ".", "__dict__", "[", "name", "]", "except", "KeyError", ":", "raise", "AttributeError", ...
https://github.com/CRYTEK/CRYENGINE/blob/232227c59a220cbbd311576f0fbeba7bb53b2a8c/Editor/Python/windows/Lib/site-packages/setuptools/_vendor/six.py#L491-L499
ros-perception/image_pipeline
cd4aa7ab38726d88e8e0144aa0d45ad2f236535a
camera_calibration/src/camera_calibration/calibrator.py
python
_get_circles
(img, board, pattern)
return (ok, corners)
Get circle centers for a symmetric or asymmetric grid
Get circle centers for a symmetric or asymmetric grid
[ "Get", "circle", "centers", "for", "a", "symmetric", "or", "asymmetric", "grid" ]
def _get_circles(img, board, pattern): """ Get circle centers for a symmetric or asymmetric grid """ h = img.shape[0] w = img.shape[1] if len(img.shape) == 3 and img.shape[2] == 3: mono = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) else: mono = img flag = cv2.CALIB_CB_SYMMETRI...
[ "def", "_get_circles", "(", "img", ",", "board", ",", "pattern", ")", ":", "h", "=", "img", ".", "shape", "[", "0", "]", "w", "=", "img", ".", "shape", "[", "1", "]", "if", "len", "(", "img", ".", "shape", ")", "==", "3", "and", "img", ".", ...
https://github.com/ros-perception/image_pipeline/blob/cd4aa7ab38726d88e8e0144aa0d45ad2f236535a/camera_calibration/src/camera_calibration/calibrator.py#L265-L288
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
third_party/markdown/treeprocessors.py
python
PrettifyTreeprocessor._prettifyETree
(self, elem)
Recursively add linebreaks to ElementTree children.
Recursively add linebreaks to ElementTree children.
[ "Recursively", "add", "linebreaks", "to", "ElementTree", "children", "." ]
def _prettifyETree(self, elem): """ Recursively add linebreaks to ElementTree children. """ i = "\n" if util.isBlockLevel(elem.tag) and elem.tag not in ['code', 'pre']: if (not elem.text or not elem.text.strip()) \ and len(elem) and util.isBlockLevel(elem[0].tag)...
[ "def", "_prettifyETree", "(", "self", ",", "elem", ")", ":", "i", "=", "\"\\n\"", "if", "util", ".", "isBlockLevel", "(", "elem", ".", "tag", ")", "and", "elem", ".", "tag", "not", "in", "[", "'code'", ",", "'pre'", "]", ":", "if", "(", "not", "e...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/third_party/markdown/treeprocessors.py#L360-L374
NVIDIA/thrust
627dccb359a635afdd69e95a6cc59698f23f70e2
internal/benchmark/compare_benchmark_results.py
python
sample_variance
(X, u = None)
return sum(imap(lambda X_i: (X_i - u) ** 2, X)) / (len(X) - 1)
Computes the sample variance of the sequence `X`. Let: * `n = len(X)`. * `u` denote the arithmetic mean of `X`. * `s` denote the sample standard deviation of `X`. .. math:: v = \frac{\sum_{i = 0}^{n - 1} (X_i - u)^2}{n - 1} Args: X (`Iterable`) : The sequence of values. u (number) ...
Computes the sample variance of the sequence `X`.
[ "Computes", "the", "sample", "variance", "of", "the", "sequence", "X", "." ]
def sample_variance(X, u = None): """Computes the sample variance of the sequence `X`. Let: * `n = len(X)`. * `u` denote the arithmetic mean of `X`. * `s` denote the sample standard deviation of `X`. .. math:: v = \frac{\sum_{i = 0}^{n - 1} (X_i - u)^2}{n - 1} Args: X (`Iterable`) : The...
[ "def", "sample_variance", "(", "X", ",", "u", "=", "None", ")", ":", "if", "u", "is", "None", ":", "u", "=", "arithmetic_mean", "(", "X", ")", "return", "sum", "(", "imap", "(", "lambda", "X_i", ":", "(", "X_i", "-", "u", ")", "**", "2", ",", ...
https://github.com/NVIDIA/thrust/blob/627dccb359a635afdd69e95a6cc59698f23f70e2/internal/benchmark/compare_benchmark_results.py#L356-L374
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
tools/site_compare/command_line.py
python
Command.ParseNextArgument
(self)
Find the next argument in the command line and parse it.
Find the next argument in the command line and parse it.
[ "Find", "the", "next", "argument", "in", "the", "command", "line", "and", "parse", "it", "." ]
def ParseNextArgument(self): """Find the next argument in the command line and parse it.""" arg = None value = None argstr = self.cmdline.rargs.pop(0) # First check: is this a literal argument? if argstr.lower() in self.arg_dict: arg = self.arg_dict[argstr.lower()] if arg.type in Co...
[ "def", "ParseNextArgument", "(", "self", ")", ":", "arg", "=", "None", "value", "=", "None", "argstr", "=", "self", ".", "cmdline", ".", "rargs", ".", "pop", "(", "0", ")", "# First check: is this a literal argument?", "if", "argstr", ".", "lower", "(", ")...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/tools/site_compare/command_line.py#L339-L408
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/_core.py
python
AcceleratorEntry.GetFlags
(*args, **kwargs)
return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
GetFlags(self) -> int Get the AcceleratorEntry's flags.
GetFlags(self) -> int
[ "GetFlags", "(", "self", ")", "-", ">", "int" ]
def GetFlags(*args, **kwargs): """ GetFlags(self) -> int Get the AcceleratorEntry's flags. """ return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
[ "def", "GetFlags", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "AcceleratorEntry_GetFlags", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_core.py#L8932-L8938
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/floatcanvas/FloatCanvas.py
python
ScaledBitmap2._DrawEntireBitmap
(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc)
this is pretty much the old code Scales and Draws the entire bitmap.
this is pretty much the old code
[ "this", "is", "pretty", "much", "the", "old", "code" ]
def _DrawEntireBitmap(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc): """ this is pretty much the old code Scales and Draws the entire bitmap. """ XY = WorldToPixel(self.XY) H = int(round(ScaleWorldToPixel(self.Height)[0])) W = int(round(H * (self.bmpWidth / ...
[ "def", "_DrawEntireBitmap", "(", "self", ",", "dc", ",", "WorldToPixel", ",", "ScaleWorldToPixel", ",", "HTdc", ")", ":", "XY", "=", "WorldToPixel", "(", "self", ".", "XY", ")", "H", "=", "int", "(", "round", "(", "ScaleWorldToPixel", "(", "self", ".", ...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/floatcanvas/FloatCanvas.py#L2085-L2111
thalium/icebox
99d147d5b9269222225443ce171b4fd46d8985d4
third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2class.py
python
loadACatalog
(filename)
return catalog(_obj=ret)
Load the catalog and build the associated data structures. This can be either an XML Catalog or an SGML Catalog It will recurse in SGML CATALOG entries. On the other hand XML Catalogs are not handled recursively.
Load the catalog and build the associated data structures. This can be either an XML Catalog or an SGML Catalog It will recurse in SGML CATALOG entries. On the other hand XML Catalogs are not handled recursively.
[ "Load", "the", "catalog", "and", "build", "the", "associated", "data", "structures", ".", "This", "can", "be", "either", "an", "XML", "Catalog", "or", "an", "SGML", "Catalog", "It", "will", "recurse", "in", "SGML", "CATALOG", "entries", ".", "On", "the", ...
def loadACatalog(filename): """Load the catalog and build the associated data structures. This can be either an XML Catalog or an SGML Catalog It will recurse in SGML CATALOG entries. On the other hand XML Catalogs are not handled recursively. """ ret = libxml2mod.xmlLoadACatalog(filename) ...
[ "def", "loadACatalog", "(", "filename", ")", ":", "ret", "=", "libxml2mod", ".", "xmlLoadACatalog", "(", "filename", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "(", "'xmlLoadACatalog() failed'", ")", "return", "catalog", "(", "_obj", "=", "re...
https://github.com/thalium/icebox/blob/99d147d5b9269222225443ce171b4fd46d8985d4/third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2class.py#L189-L196
apache/qpid-proton
6bcdfebb55ea3554bc29b1901422532db331a591
python/proton/_endpoints.py
python
Connection.user
(self)
return utf82unicode(pn_connection_get_user(self._impl))
The authentication username for a client connection. It is necessary to set the username and password before binding the connection to a transport and it isn't allowed to change after the binding. If not set then no authentication will be negotiated unless the client sasl layer...
The authentication username for a client connection.
[ "The", "authentication", "username", "for", "a", "client", "connection", "." ]
def user(self) -> Optional[str]: """The authentication username for a client connection. It is necessary to set the username and password before binding the connection to a transport and it isn't allowed to change after the binding. If not set then no authentication will be neg...
[ "def", "user", "(", "self", ")", "->", "Optional", "[", "str", "]", ":", "return", "utf82unicode", "(", "pn_connection_get_user", "(", "self", ".", "_impl", ")", ")" ]
https://github.com/apache/qpid-proton/blob/6bcdfebb55ea3554bc29b1901422532db331a591/python/proton/_endpoints.py#L243-L255
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
Framework/PythonInterface/mantid/fitfunctions.py
python
FunctionWrapper.constrain
(self, expressions)
Add constraints :param expressions: string of tie expressions
Add constraints
[ "Add", "constraints" ]
def constrain(self, expressions): """ Add constraints :param expressions: string of tie expressions """ self.fun.addConstraints( expressions )
[ "def", "constrain", "(", "self", ",", "expressions", ")", ":", "self", ".", "fun", ".", "addConstraints", "(", "expressions", ")" ]
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/Framework/PythonInterface/mantid/fitfunctions.py#L320-L326
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/uuid.py
python
_windll_getnode
()
Get the hardware address on Windows using ctypes.
Get the hardware address on Windows using ctypes.
[ "Get", "the", "hardware", "address", "on", "Windows", "using", "ctypes", "." ]
def _windll_getnode(): """Get the hardware address on Windows using ctypes.""" _buffer = ctypes.create_string_buffer(16) if _UuidCreate(_buffer) == 0: return UUID(bytes=_buffer.raw).node
[ "def", "_windll_getnode", "(", ")", ":", "_buffer", "=", "ctypes", ".", "create_string_buffer", "(", "16", ")", "if", "_UuidCreate", "(", "_buffer", ")", "==", "0", ":", "return", "UUID", "(", "bytes", "=", "_buffer", ".", "raw", ")", ".", "node" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/uuid.py#L448-L452
ROCmSoftwarePlatform/hipCaffe
4ec5d482515cce532348553b6db6d00d015675d5
python/caffe/classifier.py
python
Classifier.predict
(self, inputs, oversample=True)
return predictions
Predict classification probabilities of inputs. Parameters ---------- inputs : iterable of (H x W x K) input ndarrays. oversample : boolean average predictions across center, corners, and mirrors when True (default). Center-only prediction when False. Re...
Predict classification probabilities of inputs.
[ "Predict", "classification", "probabilities", "of", "inputs", "." ]
def predict(self, inputs, oversample=True): """ Predict classification probabilities of inputs. Parameters ---------- inputs : iterable of (H x W x K) input ndarrays. oversample : boolean average predictions across center, corners, and mirrors whe...
[ "def", "predict", "(", "self", ",", "inputs", ",", "oversample", "=", "True", ")", ":", "# Scale to standardize input dimensions.", "input_", "=", "np", ".", "zeros", "(", "(", "len", "(", "inputs", ")", ",", "self", ".", "image_dims", "[", "0", "]", ","...
https://github.com/ROCmSoftwarePlatform/hipCaffe/blob/4ec5d482515cce532348553b6db6d00d015675d5/python/caffe/classifier.py#L47-L98
moderngl/moderngl
32fe79927e02b0fa893b3603d677bdae39771e14
moderngl/program.py
python
Program.geometry_output
(self)
return self._geom[1]
int: The geometry output primitive. The GeometryShader's output primitive if the GeometryShader exists. This can only be ``POINTS``, ``LINE_STRIP`` and ``TRIANGLE_STRIP`` (from ``layout(output_primitive​, max_vertices = vert_count) out;``)
int: The geometry output primitive.
[ "int", ":", "The", "geometry", "output", "primitive", "." ]
def geometry_output(self) -> int: ''' int: The geometry output primitive. The GeometryShader's output primitive if the GeometryShader exists. This can only be ``POINTS``, ``LINE_STRIP`` and ``TRIANGLE_STRIP`` (from ``layout(output_primitive​, max_vertices = vert_...
[ "def", "geometry_output", "(", "self", ")", "->", "int", ":", "return", "self", ".", "_geom", "[", "1", "]" ]
https://github.com/moderngl/moderngl/blob/32fe79927e02b0fa893b3603d677bdae39771e14/moderngl/program.py#L167-L176
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/ribbon/panel.py
python
RibbonPanel.GetBestSizeForParentSize
(self, parentSize)
return self.GetSize()
Finds the best width and height given the parent's width and height.
Finds the best width and height given the parent's width and height.
[ "Finds", "the", "best", "width", "and", "height", "given", "the", "parent", "s", "width", "and", "height", "." ]
def GetBestSizeForParentSize(self, parentSize): """ Finds the best width and height given the parent's width and height. """ if len(self.GetChildren()) == 1: win = self.GetChildren()[0] if isinstance(win, RibbonControl): temp_dc = wx.ClientDC(self) ...
[ "def", "GetBestSizeForParentSize", "(", "self", ",", "parentSize", ")", ":", "if", "len", "(", "self", ".", "GetChildren", "(", ")", ")", "==", "1", ":", "win", "=", "self", ".", "GetChildren", "(", ")", "[", "0", "]", "if", "isinstance", "(", "win",...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/ribbon/panel.py#L493-L506
hughperkins/tf-coriander
970d3df6c11400ad68405f22b0c42a52374e94ca
tensorflow/contrib/layers/python/layers/layers.py
python
flatten
(inputs, outputs_collections=None, scope=None)
Flattens the input while maintaining the batch_size. Assumes that the first dimension represents the batch. Args: inputs: a tensor of size [batch_size, ...]. outputs_collections: collection to add the outputs. scope: Optional scope for name_scope. Returns: a flattened tensor with shape [batch...
Flattens the input while maintaining the batch_size.
[ "Flattens", "the", "input", "while", "maintaining", "the", "batch_size", "." ]
def flatten(inputs, outputs_collections=None, scope=None): """Flattens the input while maintaining the batch_size. Assumes that the first dimension represents the batch. Args: inputs: a tensor of size [batch_size, ...]. outputs_collections: collection to add the outputs. sc...
[ "def", "flatten", "(", "inputs", ",", "outputs_collections", "=", "None", ",", "scope", "=", "None", ")", ":", "with", "ops", ".", "name_scope", "(", "scope", ",", "'Flatten'", ",", "[", "inputs", "]", ")", "as", "sc", ":", "inputs", "=", "ops", ".",...
https://github.com/hughperkins/tf-coriander/blob/970d3df6c11400ad68405f22b0c42a52374e94ca/tensorflow/contrib/layers/python/layers/layers.py#L751-L779
microsoft/CNTK
e9396480025b9ca457d26b6f33dd07c474c6aa04
bindings/python/cntk/device.py
python
cpu
()
return cntk_py.DeviceDescriptor.cpu_device()
Returns CPU device descriptor Returns: :class:`~cntk.device.DeviceDescriptor`: CPU device descriptor
Returns CPU device descriptor
[ "Returns", "CPU", "device", "descriptor" ]
def cpu(): ''' Returns CPU device descriptor Returns: :class:`~cntk.device.DeviceDescriptor`: CPU device descriptor ''' return cntk_py.DeviceDescriptor.cpu_device()
[ "def", "cpu", "(", ")", ":", "return", "cntk_py", ".", "DeviceDescriptor", ".", "cpu_device", "(", ")" ]
https://github.com/microsoft/CNTK/blob/e9396480025b9ca457d26b6f33dd07c474c6aa04/bindings/python/cntk/device.py#L78-L85
smilehao/xlua-framework
a03801538be2b0e92d39332d445b22caca1ef61f
ConfigData/trunk/tools/protobuf-2.5.0/protobuf-2.5.0/python/stubout.py
python
StubOutForTesting.SmartUnsetAll
(self)
Reverses all the SmartSet() calls, restoring things to their original definition. Its okay to call SmartUnsetAll() repeatedly, as later calls have no effect if no SmartSet() calls have been made.
Reverses all the SmartSet() calls, restoring things to their original definition. Its okay to call SmartUnsetAll() repeatedly, as later calls have no effect if no SmartSet() calls have been made.
[ "Reverses", "all", "the", "SmartSet", "()", "calls", "restoring", "things", "to", "their", "original", "definition", ".", "Its", "okay", "to", "call", "SmartUnsetAll", "()", "repeatedly", "as", "later", "calls", "have", "no", "effect", "if", "no", "SmartSet", ...
def SmartUnsetAll(self): """Reverses all the SmartSet() calls, restoring things to their original definition. Its okay to call SmartUnsetAll() repeatedly, as later calls have no effect if no SmartSet() calls have been made. """ self.stubs.reverse() for args in self.stubs: setattr(*args)...
[ "def", "SmartUnsetAll", "(", "self", ")", ":", "self", ".", "stubs", ".", "reverse", "(", ")", "for", "args", "in", "self", ".", "stubs", ":", "setattr", "(", "*", "args", ")", "self", ".", "stubs", "=", "[", "]" ]
https://github.com/smilehao/xlua-framework/blob/a03801538be2b0e92d39332d445b22caca1ef61f/ConfigData/trunk/tools/protobuf-2.5.0/protobuf-2.5.0/python/stubout.py#L96-L107
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/ipython/py3/IPython/core/display.py
python
_display_mimetype
(mimetype, objs, raw=False, metadata=None)
internal implementation of all display_foo methods Parameters ---------- mimetype : str The mimetype to be published (e.g. 'image/png') *objs : object The Python objects to display, or if raw=True raw text data to display. raw : bool Are the data objects raw data or ...
internal implementation of all display_foo methods
[ "internal", "implementation", "of", "all", "display_foo", "methods" ]
def _display_mimetype(mimetype, objs, raw=False, metadata=None): """internal implementation of all display_foo methods Parameters ---------- mimetype : str The mimetype to be published (e.g. 'image/png') *objs : object The Python objects to display, or if raw=True raw text data to ...
[ "def", "_display_mimetype", "(", "mimetype", ",", "objs", ",", "raw", "=", "False", ",", "metadata", "=", "None", ")", ":", "if", "metadata", ":", "metadata", "=", "{", "mimetype", ":", "metadata", "}", "if", "raw", ":", "# turn list of pngdata into list of ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/ipython/py3/IPython/core/display.py#L53-L74
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
Framework/DataObjects/scripts/analysis.py
python
plot_results_with_slope
(results, x_field, y_field, x_scale=1.)
Function to plot Y vs X of anything. It accesses the members of "results" to plot them. other_field is used to separate by another field, and make separate line plots for each @param x_scale :: multiply x by this amount
Function to plot Y vs X of anything. It accesses the members of "results" to plot them. other_field is used to separate by another field, and make separate line plots for each
[ "Function", "to", "plot", "Y", "vs", "X", "of", "anything", ".", "It", "accesses", "the", "members", "of", "results", "to", "plot", "them", ".", "other_field", "is", "used", "to", "separate", "by", "another", "field", "and", "make", "separate", "line", "...
def plot_results_with_slope(results, x_field, y_field, x_scale=1.): """ Function to plot Y vs X of anything. It accesses the members of "results" to plot them. other_field is used to separate by another field, and make separate line plots for each @param x_scale :: multiply x by this amount """ fig...
[ "def", "plot_results_with_slope", "(", "results", ",", "x_field", ",", "y_field", ",", "x_scale", "=", "1.", ")", ":", "figure", "(", ")", "data", "=", "[", "]", "for", "_", "in", "results", ":", "x", "=", "eval", "(", "'par.%s'", "%", "x_field", ")"...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/Framework/DataObjects/scripts/analysis.py#L67-L93
ceph/ceph
959663007321a369c83218414a29bd9dbc8bda3a
qa/tasks/exec_on_cleanup.py
python
task
(ctx, config)
Execute commands on a given role tasks: - ceph: - kclient: [client.a] - exec: client.a: - "echo 'module libceph +p' > /sys/kernel/debug/dynamic_debug/control" - "echo 'module ceph +p' > /sys/kernel/debug/dynamic_debug/control" - interactiv...
Execute commands on a given role
[ "Execute", "commands", "on", "a", "given", "role" ]
def task(ctx, config): """ Execute commands on a given role tasks: - ceph: - kclient: [client.a] - exec: client.a: - "echo 'module libceph +p' > /sys/kernel/debug/dynamic_debug/control" - "echo 'module ceph +p' > /sys/kernel/debug/dynamic_...
[ "def", "task", "(", "ctx", ",", "config", ")", ":", "try", ":", "yield", "finally", ":", "log", ".", "info", "(", "'Executing custom commands...'", ")", "assert", "isinstance", "(", "config", ",", "dict", ")", ",", "\"task exec got invalid config\"", "testdir"...
https://github.com/ceph/ceph/blob/959663007321a369c83218414a29bd9dbc8bda3a/qa/tasks/exec_on_cleanup.py#L12-L60
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/_checkparam.py
python
Validator.check_equal_int
(arg_value, value, arg_name=None, prim_name=None)
return check_number(arg_value, value, Rel.EQ, int, arg_name, prim_name)
Checks input integer value `arg_value` compare to `value`. Usage: - number = check_int(number, 0, Rel.GE, "number", None) # number >= 0
Checks input integer value `arg_value` compare to `value`.
[ "Checks", "input", "integer", "value", "arg_value", "compare", "to", "value", "." ]
def check_equal_int(arg_value, value, arg_name=None, prim_name=None): """ Checks input integer value `arg_value` compare to `value`. Usage: - number = check_int(number, 0, Rel.GE, "number", None) # number >= 0 """ return check_number(arg_value, value, Rel.EQ, int, arg_na...
[ "def", "check_equal_int", "(", "arg_value", ",", "value", ",", "arg_name", "=", "None", ",", "prim_name", "=", "None", ")", ":", "return", "check_number", "(", "arg_value", ",", "value", ",", "Rel", ".", "EQ", ",", "int", ",", "arg_name", ",", "prim_name...
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/_checkparam.py#L253-L260
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/dtypes/cast.py
python
construct_1d_object_array_from_listlike
(values)
return result
Transform any list-like object in a 1-dimensional numpy array of object dtype. Parameters ---------- values : any iterable which has a len() Raises ------ TypeError * If `values` does not have a len() Returns ------- 1-dimensional numpy array of dtype object
Transform any list-like object in a 1-dimensional numpy array of object dtype.
[ "Transform", "any", "list", "-", "like", "object", "in", "a", "1", "-", "dimensional", "numpy", "array", "of", "object", "dtype", "." ]
def construct_1d_object_array_from_listlike(values): """ Transform any list-like object in a 1-dimensional numpy array of object dtype. Parameters ---------- values : any iterable which has a len() Raises ------ TypeError * If `values` does not have a len() Returns ...
[ "def", "construct_1d_object_array_from_listlike", "(", "values", ")", ":", "# numpy will try to interpret nested lists as further dimensions, hence", "# making a 1D array that contains list-likes is a bit tricky:", "result", "=", "np", ".", "empty", "(", "len", "(", "values", ")", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/dtypes/cast.py#L1458-L1480
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/multiprocessing/managers.py
python
Server.create
(self, c, typeid, *args, **kwds)
Create a new shared object and return its id
Create a new shared object and return its id
[ "Create", "a", "new", "shared", "object", "and", "return", "its", "id" ]
def create(self, c, typeid, *args, **kwds): ''' Create a new shared object and return its id ''' self.mutex.acquire() try: callable, exposed, method_to_typeid, proxytype = \ self.registry[typeid] if callable is None: ...
[ "def", "create", "(", "self", ",", "c", ",", "typeid", ",", "*", "args", ",", "*", "*", "kwds", ")", ":", "self", ".", "mutex", ".", "acquire", "(", ")", "try", ":", "callable", ",", "exposed", ",", "method_to_typeid", ",", "proxytype", "=", "self"...
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/multiprocessing/managers.py#L373-L409
LiquidPlayer/LiquidCore
9405979363f2353ac9a71ad8ab59685dd7f919c9
deps/node-10.15.3/tools/gyp/pylib/gyp/xcode_emulation.py
python
XcodeSettings.GetInstallNameBase
(self)
return install_base
Return DYLIB_INSTALL_NAME_BASE for this target.
Return DYLIB_INSTALL_NAME_BASE for this target.
[ "Return", "DYLIB_INSTALL_NAME_BASE", "for", "this", "target", "." ]
def GetInstallNameBase(self): """Return DYLIB_INSTALL_NAME_BASE for this target.""" # Xcode sets this for shared_libraries, and for nonbundled loadable_modules. if (self.spec['type'] != 'shared_library' and (self.spec['type'] != 'loadable_module' or self._IsBundle())): return None install_...
[ "def", "GetInstallNameBase", "(", "self", ")", ":", "# Xcode sets this for shared_libraries, and for nonbundled loadable_modules.", "if", "(", "self", ".", "spec", "[", "'type'", "]", "!=", "'shared_library'", "and", "(", "self", ".", "spec", "[", "'type'", "]", "!=...
https://github.com/LiquidPlayer/LiquidCore/blob/9405979363f2353ac9a71ad8ab59685dd7f919c9/deps/node-10.15.3/tools/gyp/pylib/gyp/xcode_emulation.py#L756-L765
gwaldron/osgearth
4c521857d59a69743e4a9cedba00afe570f984e8
src/third_party/tinygltf/deps/cpplint.py
python
Search
(pattern, s)
return _regexp_compile_cache[pattern].search(s)
Searches the string for the pattern, caching the compiled regexp.
Searches the string for the pattern, caching the compiled regexp.
[ "Searches", "the", "string", "for", "the", "pattern", "caching", "the", "compiled", "regexp", "." ]
def Search(pattern, s): """Searches the string for the pattern, caching the compiled regexp.""" if pattern not in _regexp_compile_cache: _regexp_compile_cache[pattern] = sre_compile.compile(pattern) return _regexp_compile_cache[pattern].search(s)
[ "def", "Search", "(", "pattern", ",", "s", ")", ":", "if", "pattern", "not", "in", "_regexp_compile_cache", ":", "_regexp_compile_cache", "[", "pattern", "]", "=", "sre_compile", ".", "compile", "(", "pattern", ")", "return", "_regexp_compile_cache", "[", "pat...
https://github.com/gwaldron/osgearth/blob/4c521857d59a69743e4a9cedba00afe570f984e8/src/third_party/tinygltf/deps/cpplint.py#L585-L589
gnina/gnina
b9ae032f52fc7a8153987bde09c0efa3620d8bb6
caffe/python/caffe/io.py
python
Transformer.set_input_scale
(self, in_, scale)
Set the scale of preprocessed inputs s.t. the blob = blob * scale. N.B. input_scale is done AFTER mean subtraction and other preprocessing while raw_scale is done BEFORE. Parameters ---------- in_ : which input to assign this scale factor scale : scale coefficient
Set the scale of preprocessed inputs s.t. the blob = blob * scale. N.B. input_scale is done AFTER mean subtraction and other preprocessing while raw_scale is done BEFORE.
[ "Set", "the", "scale", "of", "preprocessed", "inputs", "s", ".", "t", ".", "the", "blob", "=", "blob", "*", "scale", ".", "N", ".", "B", ".", "input_scale", "is", "done", "AFTER", "mean", "subtraction", "and", "other", "preprocessing", "while", "raw_scal...
def set_input_scale(self, in_, scale): """ Set the scale of preprocessed inputs s.t. the blob = blob * scale. N.B. input_scale is done AFTER mean subtraction and other preprocessing while raw_scale is done BEFORE. Parameters ---------- in_ : which input to assign...
[ "def", "set_input_scale", "(", "self", ",", "in_", ",", "scale", ")", ":", "self", ".", "__check_input", "(", "in_", ")", "self", ".", "input_scale", "[", "in_", "]", "=", "scale" ]
https://github.com/gnina/gnina/blob/b9ae032f52fc7a8153987bde09c0efa3620d8bb6/caffe/python/caffe/io.py#L277-L289
RoboJackets/robocup-software
bce13ce53ddb2ecb9696266d980722c34617dc15
util/run-clang-tidy.py
python
get_tidy_invocation
( f, clang_tidy_binary, checks, tmpdir, build_path, header_filter, allow_enabling_alpha_checkers, extra_arg, extra_arg_before, quiet, config, )
return start
Gets a command line for clang-tidy.
Gets a command line for clang-tidy.
[ "Gets", "a", "command", "line", "for", "clang", "-", "tidy", "." ]
def get_tidy_invocation( f, clang_tidy_binary, checks, tmpdir, build_path, header_filter, allow_enabling_alpha_checkers, extra_arg, extra_arg_before, quiet, config, ): """Gets a command line for clang-tidy.""" start = [clang_tidy_binary] if allow_enabling_alpha_ch...
[ "def", "get_tidy_invocation", "(", "f", ",", "clang_tidy_binary", ",", "checks", ",", "tmpdir", ",", "build_path", ",", "header_filter", ",", "allow_enabling_alpha_checkers", ",", "extra_arg", ",", "extra_arg_before", ",", "quiet", ",", "config", ",", ")", ":", ...
https://github.com/RoboJackets/robocup-software/blob/bce13ce53ddb2ecb9696266d980722c34617dc15/util/run-clang-tidy.py#L83-L121
SoarGroup/Soar
a1c5e249499137a27da60533c72969eef3b8ab6b
scons/scons-local-4.1.0/SCons/Action.py
python
CommandAction._get_implicit_deps_lightweight
(self, target, source, env, executor)
return res
Lightweight dependency scanning involves only scanning the first entry in an action string, even if it contains &&.
Lightweight dependency scanning involves only scanning the first entry in an action string, even if it contains &&.
[ "Lightweight", "dependency", "scanning", "involves", "only", "scanning", "the", "first", "entry", "in", "an", "action", "string", "even", "if", "it", "contains", "&&", "." ]
def _get_implicit_deps_lightweight(self, target, source, env, executor): """ Lightweight dependency scanning involves only scanning the first entry in an action string, even if it contains &&. """ from SCons.Subst import SUBST_SIG if executor: cmd_list = env.s...
[ "def", "_get_implicit_deps_lightweight", "(", "self", ",", "target", ",", "source", ",", "env", ",", "executor", ")", ":", "from", "SCons", ".", "Subst", "import", "SUBST_SIG", "if", "executor", ":", "cmd_list", "=", "env", ".", "subst_list", "(", "self", ...
https://github.com/SoarGroup/Soar/blob/a1c5e249499137a27da60533c72969eef3b8ab6b/scons/scons-local-4.1.0/SCons/Action.py#L988-L1008
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/io/excel/_util.py
python
_maybe_convert_usecols
(usecols)
return usecols
Convert `usecols` into a compatible format for parsing in `parsers.py`. Parameters ---------- usecols : object The use-columns object to potentially convert. Returns ------- converted : object The compatible format of `usecols`.
Convert `usecols` into a compatible format for parsing in `parsers.py`.
[ "Convert", "usecols", "into", "a", "compatible", "format", "for", "parsing", "in", "parsers", ".", "py", "." ]
def _maybe_convert_usecols(usecols): """ Convert `usecols` into a compatible format for parsing in `parsers.py`. Parameters ---------- usecols : object The use-columns object to potentially convert. Returns ------- converted : object The compatible format of `usecols`. ...
[ "def", "_maybe_convert_usecols", "(", "usecols", ")", ":", "if", "usecols", "is", "None", ":", "return", "usecols", "if", "is_integer", "(", "usecols", ")", ":", "raise", "ValueError", "(", "\"Passing an integer for `usecols` is no longer supported. \"", "\"Please pass...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/io/excel/_util.py#L119-L146
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/AWSPythonSDK/1.5.8/docutils/examples.py
python
html_body
(input_string, source_path=None, destination_path=None, input_encoding='unicode', output_encoding='unicode', doctitle=True, initial_header_level=1)
return fragment
Given an input string, returns an HTML fragment as a string. The return value is the contents of the <body> element. Parameters (see `html_parts()` for the remainder): - `output_encoding`: The desired encoding of the output. If a Unicode string is desired, use the default value of "unicode" .
Given an input string, returns an HTML fragment as a string.
[ "Given", "an", "input", "string", "returns", "an", "HTML", "fragment", "as", "a", "string", "." ]
def html_body(input_string, source_path=None, destination_path=None, input_encoding='unicode', output_encoding='unicode', doctitle=True, initial_header_level=1): """ Given an input string, returns an HTML fragment as a string. The return value is the contents of the <body> eleme...
[ "def", "html_body", "(", "input_string", ",", "source_path", "=", "None", ",", "destination_path", "=", "None", ",", "input_encoding", "=", "'unicode'", ",", "output_encoding", "=", "'unicode'", ",", "doctitle", "=", "True", ",", "initial_header_level", "=", "1"...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/AWSPythonSDK/1.5.8/docutils/examples.py#L52-L73
sfzhang15/FaceBoxes
b52cc92f9362d3adc08d54666aeb9ebb62fdb7da
python/caffe/net_spec.py
python
param_name_dict
()
return dict(zip(param_type_names, param_names))
Find out the correspondence between layer names and parameter names.
Find out the correspondence between layer names and parameter names.
[ "Find", "out", "the", "correspondence", "between", "layer", "names", "and", "parameter", "names", "." ]
def param_name_dict(): """Find out the correspondence between layer names and parameter names.""" layer = caffe_pb2.LayerParameter() # get all parameter names (typically underscore case) and corresponding # type names (typically camel case), which contain the layer names # (note that not all parame...
[ "def", "param_name_dict", "(", ")", ":", "layer", "=", "caffe_pb2", ".", "LayerParameter", "(", ")", "# get all parameter names (typically underscore case) and corresponding", "# type names (typically camel case), which contain the layer names", "# (note that not all parameters correspon...
https://github.com/sfzhang15/FaceBoxes/blob/b52cc92f9362d3adc08d54666aeb9ebb62fdb7da/python/caffe/net_spec.py#L28-L40
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/klampt/robotsim.py
python
RobotPoser.setActiveDofs
(self, dofs: IntArray)
return _robotsim.RobotPoser_setActiveDofs(self, dofs)
r""" Args: dofs (:obj:`list of int`)
r""" Args: dofs (:obj:`list of int`)
[ "r", "Args", ":", "dofs", "(", ":", "obj", ":", "list", "of", "int", ")" ]
def setActiveDofs(self, dofs: IntArray) ->None: r""" Args: dofs (:obj:`list of int`) """ return _robotsim.RobotPoser_setActiveDofs(self, dofs)
[ "def", "setActiveDofs", "(", "self", ",", "dofs", ":", "IntArray", ")", "->", "None", ":", "return", "_robotsim", ".", "RobotPoser_setActiveDofs", "(", "self", ",", "dofs", ")" ]
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/klampt/robotsim.py#L3579-L3584
klzgrad/naiveproxy
ed2c513637c77b18721fe428d7ed395b4d284c83
src/build/lacros/lacros_resource_sizes.py
python
_visit_paths
(base_dir, paths)
Itemizes files specified by a list of paths. Args: base_dir: Base directory for all elements in |paths|. paths: A list of filenames or directory names to specify files whose sizes to be counted. Directories are recursed. There's no de-duping effort. Non-existing files or directories are ignored (...
Itemizes files specified by a list of paths.
[ "Itemizes", "files", "specified", "by", "a", "list", "of", "paths", "." ]
def _visit_paths(base_dir, paths): """Itemizes files specified by a list of paths. Args: base_dir: Base directory for all elements in |paths|. paths: A list of filenames or directory names to specify files whose sizes to be counted. Directories are recursed. There's no de-duping effort. Non-exi...
[ "def", "_visit_paths", "(", "base_dir", ",", "paths", ")", ":", "for", "path", "in", "paths", ":", "full_path", "=", "os", ".", "path", ".", "join", "(", "base_dir", ",", "path", ")", "if", "os", ".", "path", ".", "exists", "(", "full_path", ")", "...
https://github.com/klzgrad/naiveproxy/blob/ed2c513637c77b18721fe428d7ed395b4d284c83/src/build/lacros/lacros_resource_sizes.py#L118-L137
miyosuda/TensorFlowAndroidDemo
35903e0221aa5f109ea2dbef27f20b52e317f42d
jni-build/jni/include/tensorflow/contrib/learn/python/learn/estimators/estimator.py
python
BaseEstimator._get_train_ops
(self, features, targets)
Method that builds model graph and returns trainer ops. Expected to be overriden by sub-classes that require custom support. Args: features: `Tensor` or `dict` of `Tensor` objects. targets: `Tensor` or `dict` of `Tensor` objects. Returns: Tuple of train `Operation` and loss `Tensor`.
Method that builds model graph and returns trainer ops.
[ "Method", "that", "builds", "model", "graph", "and", "returns", "trainer", "ops", "." ]
def _get_train_ops(self, features, targets): """Method that builds model graph and returns trainer ops. Expected to be overriden by sub-classes that require custom support. Args: features: `Tensor` or `dict` of `Tensor` objects. targets: `Tensor` or `dict` of `Tensor` objects. Returns: ...
[ "def", "_get_train_ops", "(", "self", ",", "features", ",", "targets", ")", ":", "pass" ]
https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/contrib/learn/python/learn/estimators/estimator.py#L351-L363
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_misc.py
python
DateTime.SetToNextWeekDay
(*args, **kwargs)
return _misc_.DateTime_SetToNextWeekDay(*args, **kwargs)
SetToNextWeekDay(self, int weekday) -> DateTime
SetToNextWeekDay(self, int weekday) -> DateTime
[ "SetToNextWeekDay", "(", "self", "int", "weekday", ")", "-", ">", "DateTime" ]
def SetToNextWeekDay(*args, **kwargs): """SetToNextWeekDay(self, int weekday) -> DateTime""" return _misc_.DateTime_SetToNextWeekDay(*args, **kwargs)
[ "def", "SetToNextWeekDay", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_misc_", ".", "DateTime_SetToNextWeekDay", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_misc.py#L3853-L3855
microsoft/TSS.MSR
0f2516fca2cd9929c31d5450e39301c9bde43688
TSS.Py/src/TpmTypes.py
python
TPM2_CertifyCreation_REQUEST.fromTpm
(buf)
return buf.createObj(TPM2_CertifyCreation_REQUEST)
Returns new TPM2_CertifyCreation_REQUEST object constructed from its marshaled representation in the given TpmBuffer buffer
Returns new TPM2_CertifyCreation_REQUEST object constructed from its marshaled representation in the given TpmBuffer buffer
[ "Returns", "new", "TPM2_CertifyCreation_REQUEST", "object", "constructed", "from", "its", "marshaled", "representation", "in", "the", "given", "TpmBuffer", "buffer" ]
def fromTpm(buf): """ Returns new TPM2_CertifyCreation_REQUEST object constructed from its marshaled representation in the given TpmBuffer buffer """ return buf.createObj(TPM2_CertifyCreation_REQUEST)
[ "def", "fromTpm", "(", "buf", ")", ":", "return", "buf", ".", "createObj", "(", "TPM2_CertifyCreation_REQUEST", ")" ]
https://github.com/microsoft/TSS.MSR/blob/0f2516fca2cd9929c31d5450e39301c9bde43688/TSS.Py/src/TpmTypes.py#L12563-L12567
etotheipi/BitcoinArmory
2a6fc5355bb0c6fe26e387ccba30a5baafe8cd98
qt4reactor.py
python
QtEventReactor.iterate
(self, delay=None)
See twisted.internet.interfaces.IReactorCore.iterate.
See twisted.internet.interfaces.IReactorCore.iterate.
[ "See", "twisted", ".", "internet", ".", "interfaces", ".", "IReactorCore", ".", "iterate", "." ]
def iterate(self, delay=None): """See twisted.internet.interfaces.IReactorCore.iterate. """ self.runUntilCurrent() self.doEvents() self.doIteration(delay)
[ "def", "iterate", "(", "self", ",", "delay", "=", "None", ")", ":", "self", ".", "runUntilCurrent", "(", ")", "self", ".", "doEvents", "(", ")", "self", ".", "doIteration", "(", "delay", ")" ]
https://github.com/etotheipi/BitcoinArmory/blob/2a6fc5355bb0c6fe26e387ccba30a5baafe8cd98/qt4reactor.py#L326-L331