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/tools/python3/src/Lib/smtplib.py
python
SMTP.auth_cram_md5
(self, challenge=None)
return self.user + " " + hmac.HMAC( self.password.encode('ascii'), challenge, 'md5').hexdigest()
Authobject to use with CRAM-MD5 authentication. Requires self.user and self.password to be set.
Authobject to use with CRAM-MD5 authentication. Requires self.user and self.password to be set.
[ "Authobject", "to", "use", "with", "CRAM", "-", "MD5", "authentication", ".", "Requires", "self", ".", "user", "and", "self", ".", "password", "to", "be", "set", "." ]
def auth_cram_md5(self, challenge=None): """ Authobject to use with CRAM-MD5 authentication. Requires self.user and self.password to be set.""" # CRAM-MD5 does not support initial-response. if challenge is None: return None return self.user + " " + hmac.HMAC( ...
[ "def", "auth_cram_md5", "(", "self", ",", "challenge", "=", "None", ")", ":", "# CRAM-MD5 does not support initial-response.", "if", "challenge", "is", "None", ":", "return", "None", "return", "self", ".", "user", "+", "\" \"", "+", "hmac", ".", "HMAC", "(", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python3/src/Lib/smtplib.py#L664-L671
albertz/openlierox
d316c14a8eb57848ef56e9bfa7b23a56f694a51b
tools/DedicatedServerVideo/gdata/tlslite/TLSRecordLayer.py
python
TLSRecordLayer.getCipherImplementation
(self)
return self._writeState.encContext.implementation
Get the name of the cipher implementation used with this connection. @rtype: str @return: The name of the cipher implementation used with this connection. Either 'python', 'cryptlib', 'openssl', or 'pycrypto'.
Get the name of the cipher implementation used with this connection.
[ "Get", "the", "name", "of", "the", "cipher", "implementation", "used", "with", "this", "connection", "." ]
def getCipherImplementation(self): """Get the name of the cipher implementation used with this connection. @rtype: str @return: The name of the cipher implementation used with this connection. Either 'python', 'cryptlib', 'openssl', or 'pycrypto'. """ if...
[ "def", "getCipherImplementation", "(", "self", ")", ":", "if", "not", "self", ".", "_writeState", ".", "encContext", ":", "return", "None", "return", "self", ".", "_writeState", ".", "encContext", ".", "implementation" ]
https://github.com/albertz/openlierox/blob/d316c14a8eb57848ef56e9bfa7b23a56f694a51b/tools/DedicatedServerVideo/gdata/tlslite/TLSRecordLayer.py#L354-L365
francinexue/xuefu
b6ff79747a42e020588c0c0a921048e08fe4680c
ctpx/ctp2/ctptd.py
python
CtpTd.onRspQryBrokerTradingAlgos
(self, BrokerTradingAlgosField, RspInfoField, requestId, final)
请求查询经纪公司交易算法响应
请求查询经纪公司交易算法响应
[ "请求查询经纪公司交易算法响应" ]
def onRspQryBrokerTradingAlgos(self, BrokerTradingAlgosField, RspInfoField, requestId, final): """请求查询经纪公司交易算法响应""" pass
[ "def", "onRspQryBrokerTradingAlgos", "(", "self", ",", "BrokerTradingAlgosField", ",", "RspInfoField", ",", "requestId", ",", "final", ")", ":", "pass" ]
https://github.com/francinexue/xuefu/blob/b6ff79747a42e020588c0c0a921048e08fe4680c/ctpx/ctp2/ctptd.py#L451-L453
may0324/DeepCompression-caffe
0aff6c1287bda4cfc7f378ed8a16524e1afabd8c
python/caffe/draw.py
python
choose_color_by_layertype
(layertype)
return color
Define colors for nodes based on the layer type.
Define colors for nodes based on the layer type.
[ "Define", "colors", "for", "nodes", "based", "on", "the", "layer", "type", "." ]
def choose_color_by_layertype(layertype): """Define colors for nodes based on the layer type. """ color = '#6495ED' # Default if layertype == 'Convolution' or layertype == 'Deconvolution': color = '#FF5050' elif layertype == 'Pooling': color = '#FF9900' elif layertype == 'InnerP...
[ "def", "choose_color_by_layertype", "(", "layertype", ")", ":", "color", "=", "'#6495ED'", "# Default", "if", "layertype", "==", "'Convolution'", "or", "layertype", "==", "'Deconvolution'", ":", "color", "=", "'#FF5050'", "elif", "layertype", "==", "'Pooling'", ":...
https://github.com/may0324/DeepCompression-caffe/blob/0aff6c1287bda4cfc7f378ed8a16524e1afabd8c/python/caffe/draw.py#L117-L127
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/codecs.py
python
IncrementalDecoder.reset
(self)
Resets the decoder to the initial state.
Resets the decoder to the initial state.
[ "Resets", "the", "decoder", "to", "the", "initial", "state", "." ]
def reset(self): """ Resets the decoder to the initial state. """
[ "def", "reset", "(", "self", ")", ":" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/codecs.py#L251-L254
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/fsspec/utils.py
python
stringify_path
(filepath)
return filepath
Attempt to convert a path-like object to a string. Parameters ---------- filepath: object to be converted Returns ------- filepath_str: maybe a string version of the object Notes ----- Objects supporting the fspath protocol (Python 3.6+) are coerced according to its __fspath__...
Attempt to convert a path-like object to a string.
[ "Attempt", "to", "convert", "a", "path", "-", "like", "object", "to", "a", "string", "." ]
def stringify_path(filepath): """ Attempt to convert a path-like object to a string. Parameters ---------- filepath: object to be converted Returns ------- filepath_str: maybe a string version of the object Notes ----- Objects supporting the fspath protocol (Python 3.6+) are c...
[ "def", "stringify_path", "(", "filepath", ")", ":", "if", "hasattr", "(", "filepath", ",", "\"__fspath__\"", ")", ":", "return", "filepath", ".", "__fspath__", "(", ")", "elif", "isinstance", "(", "filepath", ",", "pathlib", ".", "Path", ")", ":", "return"...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/fsspec/utils.py#L281-L307
psi4/psi4
be533f7f426b6ccc263904e55122899b16663395
psi4/driver/procrouting/proc.py
python
run_scf_gradient
(name, **kwargs)
return ref_wfn
Function encoding sequence of PSI module calls for a SCF gradient calculation.
Function encoding sequence of PSI module calls for a SCF gradient calculation.
[ "Function", "encoding", "sequence", "of", "PSI", "module", "calls", "for", "a", "SCF", "gradient", "calculation", "." ]
def run_scf_gradient(name, **kwargs): """Function encoding sequence of PSI module calls for a SCF gradient calculation. """ dft_func = False if "dft_functional" in kwargs: dft_func = True optstash = proc_util.scf_set_reference_local(name, is_dft=dft_func) # Bypass the scf call if...
[ "def", "run_scf_gradient", "(", "name", ",", "*", "*", "kwargs", ")", ":", "dft_func", "=", "False", "if", "\"dft_functional\"", "in", "kwargs", ":", "dft_func", "=", "True", "optstash", "=", "proc_util", ".", "scf_set_reference_local", "(", "name", ",", "is...
https://github.com/psi4/psi4/blob/be533f7f426b6ccc263904e55122899b16663395/psi4/driver/procrouting/proc.py#L2475-L2553
giuspen/cherrytree
84712f206478fcf9acf30174009ad28c648c6344
pygtk2/modules/core.py
python
CherryTree.anchor_edit_dialog
(self, pixbuf, iter_insert, iter_bound=None)
Anchor Edit Dialog
Anchor Edit Dialog
[ "Anchor", "Edit", "Dialog" ]
def anchor_edit_dialog(self, pixbuf, iter_insert, iter_bound=None): """Anchor Edit Dialog""" if "anchor" in dir (pixbuf): anchor_curr_name = pixbuf.anchor dialog_title = _("Edit Anchor") else: anchor_curr_name = "" dialog_title = _("Insert Anchor")...
[ "def", "anchor_edit_dialog", "(", "self", ",", "pixbuf", ",", "iter_insert", ",", "iter_bound", "=", "None", ")", ":", "if", "\"anchor\"", "in", "dir", "(", "pixbuf", ")", ":", "anchor_curr_name", "=", "pixbuf", ".", "anchor", "dialog_title", "=", "_", "("...
https://github.com/giuspen/cherrytree/blob/84712f206478fcf9acf30174009ad28c648c6344/pygtk2/modules/core.py#L3830-L3847
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/bsddb/dbtables.py
python
bsdTableDB.ListTableColumns
(self, table)
Return a list of columns in the given table. [] if the table doesn't exist.
Return a list of columns in the given table. [] if the table doesn't exist.
[ "Return", "a", "list", "of", "columns", "in", "the", "given", "table", ".", "[]", "if", "the", "table", "doesn", "t", "exist", "." ]
def ListTableColumns(self, table): """Return a list of columns in the given table. [] if the table doesn't exist. """ assert isinstance(table, str) if contains_metastrings(table): raise ValueError, "bad table name: contains reserved metastrings" columnlist_ke...
[ "def", "ListTableColumns", "(", "self", ",", "table", ")", ":", "assert", "isinstance", "(", "table", ",", "str", ")", "if", "contains_metastrings", "(", "table", ")", ":", "raise", "ValueError", ",", "\"bad table name: contains reserved metastrings\"", "columnlist_...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/bsddb/dbtables.py#L357-L373
CRYTEK/CRYENGINE
232227c59a220cbbd311576f0fbeba7bb53b2a8c
Code/Tools/waf-1.7.13/crywaflib/compile_settings_windows.py
python
load_release_windows_settings
(conf)
Setup all compiler and linker settings shared over all windows configurations for the 'debug' configuration
Setup all compiler and linker settings shared over all windows configurations for the 'debug' configuration
[ "Setup", "all", "compiler", "and", "linker", "settings", "shared", "over", "all", "windows", "configurations", "for", "the", "debug", "configuration" ]
def load_release_windows_settings(conf): """ Setup all compiler and linker settings shared over all windows configurations for the 'debug' configuration """ v = conf.env conf.load_windows_common_settings()
[ "def", "load_release_windows_settings", "(", "conf", ")", ":", "v", "=", "conf", ".", "env", "conf", ".", "load_windows_common_settings", "(", ")" ]
https://github.com/CRYTEK/CRYENGINE/blob/232227c59a220cbbd311576f0fbeba7bb53b2a8c/Code/Tools/waf-1.7.13/crywaflib/compile_settings_windows.py#L50-L56
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
tools/Pylint/run_pylint.py
python
create_dir_if_required
(path)
Create the given directory if it doesn't exist Arguments: path (str): Absolute path to a directory
Create the given directory if it doesn't exist
[ "Create", "the", "given", "directory", "if", "it", "doesn", "t", "exist" ]
def create_dir_if_required(path): """ Create the given directory if it doesn't exist Arguments: path (str): Absolute path to a directory """ if path and not os.path.exists(path): os.makedirs(path)
[ "def", "create_dir_if_required", "(", "path", ")", ":", "if", "path", "and", "not", "os", ".", "path", ".", "exists", "(", "path", ")", ":", "os", ".", "makedirs", "(", "path", ")" ]
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/tools/Pylint/run_pylint.py#L230-L238
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py2/pandas/core/indexes/base.py
python
Index._reset_identity
(self)
return self
Initializes or resets ``_id`` attribute with new object.
Initializes or resets ``_id`` attribute with new object.
[ "Initializes", "or", "resets", "_id", "attribute", "with", "new", "object", "." ]
def _reset_identity(self): """ Initializes or resets ``_id`` attribute with new object. """ self._id = _Identity() return self
[ "def", "_reset_identity", "(", "self", ")", ":", "self", ".", "_id", "=", "_Identity", "(", ")", "return", "self" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py2/pandas/core/indexes/base.py#L633-L638
mapsme/omim
1892903b63f2c85b16ed4966d21fe76aba06b9ba
tools/python/stylesheet/webcolors/webcolors.py
python
rgb_to_rgb_percent
(rgb_triplet)
return tuple(map(lambda d: specials.get(d, '%.02f%%' % ((d / 255.0) * 100)), rgb_triplet))
Convert a 3-tuple of integers, suitable for use in an ``rgb()`` color triplet, to a 3-tuple of percentages suitable for use in representing that color. This function makes some trade-offs in terms of the accuracy of the final representation; for some common integer values, special-case logic is use...
Convert a 3-tuple of integers, suitable for use in an ``rgb()`` color triplet, to a 3-tuple of percentages suitable for use in representing that color.
[ "Convert", "a", "3", "-", "tuple", "of", "integers", "suitable", "for", "use", "in", "an", "rgb", "()", "color", "triplet", "to", "a", "3", "-", "tuple", "of", "percentages", "suitable", "for", "use", "in", "representing", "that", "color", "." ]
def rgb_to_rgb_percent(rgb_triplet): """ Convert a 3-tuple of integers, suitable for use in an ``rgb()`` color triplet, to a 3-tuple of percentages suitable for use in representing that color. This function makes some trade-offs in terms of the accuracy of the final representation; for some com...
[ "def", "rgb_to_rgb_percent", "(", "rgb_triplet", ")", ":", "# In order to maintain precision for common values,", "# 256 / 2**n is special-cased for values of n", "# from 0 through 4, as well as 0 itself.", "specials", "=", "{", "255", ":", "'100%'", ",", "128", ":", "'50%'", "...
https://github.com/mapsme/omim/blob/1892903b63f2c85b16ed4966d21fe76aba06b9ba/tools/python/stylesheet/webcolors/webcolors.py#L722-L754
BVLC/caffe
9b891540183ddc834a02b2bd81b31afae71b2153
scripts/cpp_lint.py
python
RemoveMultiLineCommentsFromRange
(lines, begin, end)
Clears a range of lines for multi-line comments.
Clears a range of lines for multi-line comments.
[ "Clears", "a", "range", "of", "lines", "for", "multi", "-", "line", "comments", "." ]
def RemoveMultiLineCommentsFromRange(lines, begin, end): """Clears a range of lines for multi-line comments.""" # Having // dummy comments makes the lines non-empty, so we will not get # unnecessary blank line warnings later in the code. for i in range(begin, end): lines[i] = '// dummy'
[ "def", "RemoveMultiLineCommentsFromRange", "(", "lines", ",", "begin", ",", "end", ")", ":", "# Having // dummy comments makes the lines non-empty, so we will not get", "# unnecessary blank line warnings later in the code.", "for", "i", "in", "range", "(", "begin", ",", "end", ...
https://github.com/BVLC/caffe/blob/9b891540183ddc834a02b2bd81b31afae71b2153/scripts/cpp_lint.py#L1147-L1152
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/lib/nanfunctions.py
python
nanprod
(a, axis=None, dtype=None, out=None, keepdims=np._NoValue)
return np.prod(a, axis=axis, dtype=dtype, out=out, keepdims=keepdims)
Return the product of array elements over a given axis treating Not a Numbers (NaNs) as ones. One is returned for slices that are all-NaN or empty. .. versionadded:: 1.10.0 Parameters ---------- a : array_like Array containing numbers whose product is desired. If `a` is not an ...
Return the product of array elements over a given axis treating Not a Numbers (NaNs) as ones.
[ "Return", "the", "product", "of", "array", "elements", "over", "a", "given", "axis", "treating", "Not", "a", "Numbers", "(", "NaNs", ")", "as", "ones", "." ]
def nanprod(a, axis=None, dtype=None, out=None, keepdims=np._NoValue): """ Return the product of array elements over a given axis treating Not a Numbers (NaNs) as ones. One is returned for slices that are all-NaN or empty. .. versionadded:: 1.10.0 Parameters ---------- a : array_like ...
[ "def", "nanprod", "(", "a", ",", "axis", "=", "None", ",", "dtype", "=", "None", ",", "out", "=", "None", ",", "keepdims", "=", "np", ".", "_NoValue", ")", ":", "a", ",", "mask", "=", "_replace_nan", "(", "a", ",", "1", ")", "return", "np", "."...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/lib/nanfunctions.py#L658-L720
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/glcanvas.py
python
GLCanvas.SetupPalette
(*args, **kwargs)
return _glcanvas.GLCanvas_SetupPalette(*args, **kwargs)
SetupPalette(self, Palette palette)
SetupPalette(self, Palette palette)
[ "SetupPalette", "(", "self", "Palette", "palette", ")" ]
def SetupPalette(*args, **kwargs): """SetupPalette(self, Palette palette)""" return _glcanvas.GLCanvas_SetupPalette(*args, **kwargs)
[ "def", "SetupPalette", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_glcanvas", ".", "GLCanvas_SetupPalette", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/glcanvas.py#L142-L144
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
tools/telemetry/third_party/pyserial/serial/serialutil.py
python
SerialBase.getBaudrate
(self)
return self._baudrate
Get the current baud rate setting.
Get the current baud rate setting.
[ "Get", "the", "current", "baud", "rate", "setting", "." ]
def getBaudrate(self): """Get the current baud rate setting.""" return self._baudrate
[ "def", "getBaudrate", "(", "self", ")", ":", "return", "self", ".", "_baudrate" ]
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/tools/telemetry/third_party/pyserial/serial/serialutil.py#L347-L349
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/python/training/saver.py
python
Saver.set_last_checkpoints_with_time
(self, last_checkpoints_with_time)
Sets the list of old checkpoint filenames and timestamps. Args: last_checkpoints_with_time: A list of tuples of checkpoint filenames and timestamps. Raises: AssertionError: If last_checkpoints_with_time is not a list.
Sets the list of old checkpoint filenames and timestamps.
[ "Sets", "the", "list", "of", "old", "checkpoint", "filenames", "and", "timestamps", "." ]
def set_last_checkpoints_with_time(self, last_checkpoints_with_time): """Sets the list of old checkpoint filenames and timestamps. Args: last_checkpoints_with_time: A list of tuples of checkpoint filenames and timestamps. Raises: AssertionError: If last_checkpoints_with_time is not a l...
[ "def", "set_last_checkpoints_with_time", "(", "self", ",", "last_checkpoints_with_time", ")", ":", "assert", "isinstance", "(", "last_checkpoints_with_time", ",", "list", ")", "self", ".", "_last_checkpoints", "=", "last_checkpoints_with_time" ]
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/python/training/saver.py#L1464-L1475
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py2/scipy/io/mmio.py
python
mmwrite
(target, a, comment='', field=None, precision=None, symmetry=None)
Writes the sparse or dense array `a` to Matrix Market file-like `target`. Parameters ---------- target : str or file-like Matrix Market filename (extension .mtx) or open file-like object. a : array like Sparse or dense 2D array. comment : str, optional Comments to be prepend...
Writes the sparse or dense array `a` to Matrix Market file-like `target`.
[ "Writes", "the", "sparse", "or", "dense", "array", "a", "to", "Matrix", "Market", "file", "-", "like", "target", "." ]
def mmwrite(target, a, comment='', field=None, precision=None, symmetry=None): """ Writes the sparse or dense array `a` to Matrix Market file-like `target`. Parameters ---------- target : str or file-like Matrix Market filename (extension .mtx) or open file-like object. a : array like ...
[ "def", "mmwrite", "(", "target", ",", "a", ",", "comment", "=", "''", ",", "field", "=", "None", ",", "precision", "=", "None", ",", "symmetry", "=", "None", ")", ":", "MMFile", "(", ")", ".", "write", "(", "target", ",", "a", ",", "comment", ","...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py2/scipy/io/mmio.py#L80-L101
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/python/summary/event_accumulator.py
python
_Remap
(x, x0, x1, y0, y1)
return y0 + (x - x0) * float(y1 - y0) / (x1 - x0)
Linearly map from [x0, x1] unto [y0, y1].
Linearly map from [x0, x1] unto [y0, y1].
[ "Linearly", "map", "from", "[", "x0", "x1", "]", "unto", "[", "y0", "y1", "]", "." ]
def _Remap(x, x0, x1, y0, y1): """Linearly map from [x0, x1] unto [y0, y1].""" return y0 + (x - x0) * float(y1 - y0) / (x1 - x0)
[ "def", "_Remap", "(", "x", ",", "x0", ",", "x1", ",", "y0", ",", "y1", ")", ":", "return", "y0", "+", "(", "x", "-", "x0", ")", "*", "float", "(", "y1", "-", "y0", ")", "/", "(", "x1", "-", "x0", ")" ]
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/python/summary/event_accumulator.py#L661-L663
facebookincubator/BOLT
88c70afe9d388ad430cc150cc158641701397f70
mlir/python/mlir/dialects/linalg/opdsl/ops/core_named_ops.py
python
conv_1d_nwc_wcf
( I=TensorDef(T1, S.N, S.OW * S.SW + S.KW * S.DW, S.C), K=TensorDef(T2, S.KW, S.C, S.F), O=TensorDef(U, S.N, S.OW, S.F, output=True), strides=IndexAttrDef(S.SW), dilations=IndexAttrDef(S.DW))
Performs 1-D convolution. Numeric casting is performed on the operands to the inner multiply, promoting them to the same data type as the accumulator/output.
Performs 1-D convolution.
[ "Performs", "1", "-", "D", "convolution", "." ]
def conv_1d_nwc_wcf( I=TensorDef(T1, S.N, S.OW * S.SW + S.KW * S.DW, S.C), K=TensorDef(T2, S.KW, S.C, S.F), O=TensorDef(U, S.N, S.OW, S.F, output=True), strides=IndexAttrDef(S.SW), dilations=IndexAttrDef(S.DW)): """Performs 1-D convolution. Numeric casting is performed on the operands to the in...
[ "def", "conv_1d_nwc_wcf", "(", "I", "=", "TensorDef", "(", "T1", ",", "S", ".", "N", ",", "S", ".", "OW", "*", "S", ".", "SW", "+", "S", ".", "KW", "*", "S", ".", "DW", ",", "S", ".", "C", ")", ",", "K", "=", "TensorDef", "(", "T2", ",", ...
https://github.com/facebookincubator/BOLT/blob/88c70afe9d388ad430cc150cc158641701397f70/mlir/python/mlir/dialects/linalg/opdsl/ops/core_named_ops.py#L223-L238
apiaryio/snowcrash
b5b39faa85f88ee17459edf39fdc6fe4fc70d2e3
tools/gyp/pylib/gyp/msvs_emulation.py
python
MsvsSettings.HasExplicitAsmRules
(self, spec)
return self._HasExplicitRuleForExtension(spec, 'asm')
Determine if there's an explicit rule for asm files. When there isn't we need to generate implicit rules to assemble .asm files.
Determine if there's an explicit rule for asm files. When there isn't we need to generate implicit rules to assemble .asm files.
[ "Determine", "if", "there", "s", "an", "explicit", "rule", "for", "asm", "files", ".", "When", "there", "isn", "t", "we", "need", "to", "generate", "implicit", "rules", "to", "assemble", ".", "asm", "files", "." ]
def HasExplicitAsmRules(self, spec): """Determine if there's an explicit rule for asm files. When there isn't we need to generate implicit rules to assemble .asm files.""" return self._HasExplicitRuleForExtension(spec, 'asm')
[ "def", "HasExplicitAsmRules", "(", "self", ",", "spec", ")", ":", "return", "self", ".", "_HasExplicitRuleForExtension", "(", "spec", ",", "'asm'", ")" ]
https://github.com/apiaryio/snowcrash/blob/b5b39faa85f88ee17459edf39fdc6fe4fc70d2e3/tools/gyp/pylib/gyp/msvs_emulation.py#L835-L838
turi-code/SFrame
796b9bdfb2fa1b881d82080754643c7e68629cd2
oss_src/unity/python/sframe/util/cloudpickle.py
python
CloudPickler.save_function
(self, obj, name=None)
Registered with the dispatch to handle all function types. Determines what kind of function obj is (e.g. lambda, defined at interactive prompt, etc) and handles the pickling appropriately.
Registered with the dispatch to handle all function types.
[ "Registered", "with", "the", "dispatch", "to", "handle", "all", "function", "types", "." ]
def save_function(self, obj, name=None): """ Registered with the dispatch to handle all function types. Determines what kind of function obj is (e.g. lambda, defined at interactive prompt, etc) and handles the pickling appropriately. """ write = self.write if name is No...
[ "def", "save_function", "(", "self", ",", "obj", ",", "name", "=", "None", ")", ":", "write", "=", "self", ".", "write", "if", "name", "is", "None", ":", "name", "=", "obj", ".", "__name__", "modname", "=", "pickle", ".", "whichmodule", "(", "obj", ...
https://github.com/turi-code/SFrame/blob/796b9bdfb2fa1b881d82080754643c7e68629cd2/oss_src/unity/python/sframe/util/cloudpickle.py#L162-L211
SFTtech/openage
d6a08c53c48dc1e157807471df92197f6ca9e04d
openage/convert/service/debug_info.py
python
debug_game_version
(debugdir, loglevel, args)
Create debug output for the detected game version. :param debugdir: Output directory for the debug info. :type debugdir: Directory :param loglevel: Determines how detailed the output is. :type loglevel: int :param args: CLI arguments. :type args: Namespace
Create debug output for the detected game version.
[ "Create", "debug", "output", "for", "the", "detected", "game", "version", "." ]
def debug_game_version(debugdir, loglevel, args): """ Create debug output for the detected game version. :param debugdir: Output directory for the debug info. :type debugdir: Directory :param loglevel: Determines how detailed the output is. :type loglevel: int :param args: CLI arguments. ...
[ "def", "debug_game_version", "(", "debugdir", ",", "loglevel", ",", "args", ")", ":", "if", "loglevel", "<", "2", ":", "return", "# Log game version", "logfile", "=", "debugdir", ".", "joinpath", "(", "\"init/\"", ")", "[", "\"game_version\"", "]", "logtext", ...
https://github.com/SFTtech/openage/blob/d6a08c53c48dc1e157807471df92197f6ca9e04d/openage/convert/service/debug_info.py#L54-L86
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/mapreduce/mapreduce/shuffler.py
python
_MergingReader.from_json
(cls, json)
return cls(json["offsets"], json["max_values_count"], json["max_values_size"])
Restore reader from json state.
Restore reader from json state.
[ "Restore", "reader", "from", "json", "state", "." ]
def from_json(cls, json): """Restore reader from json state.""" return cls(json["offsets"], json["max_values_count"], json["max_values_size"])
[ "def", "from_json", "(", "cls", ",", "json", ")", ":", "return", "cls", "(", "json", "[", "\"offsets\"", "]", ",", "json", "[", "\"max_values_count\"", "]", ",", "json", "[", "\"max_values_size\"", "]", ")" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/mapreduce/mapreduce/shuffler.py#L373-L377
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/eager/wrap_function.py
python
_lift_single_variable
(old_variable, graph, variable_holder)
return new_variable
Lifts `old_variable` out of the `FuncGraph` `graph`.
Lifts `old_variable` out of the `FuncGraph` `graph`.
[ "Lifts", "old_variable", "out", "of", "the", "FuncGraph", "graph", "." ]
def _lift_single_variable(old_variable, graph, variable_holder): """Lifts `old_variable` out of the `FuncGraph` `graph`.""" new_variable = resource_variable_ops.UninitializedVariable( shape=old_variable.shape, dtype=old_variable.dtype, name=old_variable.op.name, trainable=old_variable.traina...
[ "def", "_lift_single_variable", "(", "old_variable", ",", "graph", ",", "variable_holder", ")", ":", "new_variable", "=", "resource_variable_ops", ".", "UninitializedVariable", "(", "shape", "=", "old_variable", ".", "shape", ",", "dtype", "=", "old_variable", ".", ...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/eager/wrap_function.py#L122-L142
vslavik/poedit
f7a9daa0a10037e090aa0a86f5ce0f24ececdf6a
deps/boost/tools/build/src/build/generators.py
python
Generator.target_types
(self)
return self.target_types_
Returns the list of target types that this generator produces. It is assumed to be always the same -- i.e. it cannot change depending list of sources.
Returns the list of target types that this generator produces. It is assumed to be always the same -- i.e. it cannot change depending list of sources.
[ "Returns", "the", "list", "of", "target", "types", "that", "this", "generator", "produces", ".", "It", "is", "assumed", "to", "be", "always", "the", "same", "--", "i", ".", "e", ".", "it", "cannot", "change", "depending", "list", "of", "sources", "." ]
def target_types (self): """ Returns the list of target types that this generator produces. It is assumed to be always the same -- i.e. it cannot change depending list of sources. """ return self.target_types_
[ "def", "target_types", "(", "self", ")", ":", "return", "self", ".", "target_types_" ]
https://github.com/vslavik/poedit/blob/f7a9daa0a10037e090aa0a86f5ce0f24ececdf6a/deps/boost/tools/build/src/build/generators.py#L286-L291
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/distutils/command/config.py
python
dump_file
(filename, head=None)
Dumps a file content into log.info. If head is not None, will be dumped before the file content.
Dumps a file content into log.info.
[ "Dumps", "a", "file", "content", "into", "log", ".", "info", "." ]
def dump_file(filename, head=None): """Dumps a file content into log.info. If head is not None, will be dumped before the file content. """ if head is None: log.info('%s' % filename) else: log.info(head) file = open(filename) try: log.info(file.read()) finally: ...
[ "def", "dump_file", "(", "filename", ",", "head", "=", "None", ")", ":", "if", "head", "is", "None", ":", "log", ".", "info", "(", "'%s'", "%", "filename", ")", "else", ":", "log", ".", "info", "(", "head", ")", "file", "=", "open", "(", "filenam...
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/distutils/command/config.py#L344-L357
NVIDIA/DALI
bf16cc86ba8f091b145f91962f21fe1b6aff243d
docs/examples/use_cases/tensorflow/efficientdet/pipeline/anchors_utils/argmax_matcher.py
python
ArgMaxMatcher._set_values_using_indicator
(self, x, indicator, val)
return x * (1 - indicator) + val * indicator
Set the indicated fields of x to val. Args: x: tensor. indicator: boolean with same shape as x. val: scalar with value to set. Returns: modified tensor.
Set the indicated fields of x to val.
[ "Set", "the", "indicated", "fields", "of", "x", "to", "val", "." ]
def _set_values_using_indicator(self, x, indicator, val): """Set the indicated fields of x to val. Args: x: tensor. indicator: boolean with same shape as x. val: scalar with value to set. Returns: modified tensor. """ indicator = tf.cast(...
[ "def", "_set_values_using_indicator", "(", "self", ",", "x", ",", "indicator", ",", "val", ")", ":", "indicator", "=", "tf", ".", "cast", "(", "indicator", ",", "x", ".", "dtype", ")", "return", "x", "*", "(", "1", "-", "indicator", ")", "+", "val", ...
https://github.com/NVIDIA/DALI/blob/bf16cc86ba8f091b145f91962f21fe1b6aff243d/docs/examples/use_cases/tensorflow/efficientdet/pipeline/anchors_utils/argmax_matcher.py#L206-L218
alibaba/weex_js_engine
2bdf4b6f020c1fc99c63f649718f6faf7e27fdde
jni/v8core/v8/build/gyp/pylib/gyp/generator/android.py
python
AndroidMkWriter.NormalizeLdFlags
(self, ld_flags)
return clean_ldflags
Clean up ldflags from gyp file. Remove any ldflags that contain android_top_dir. Args: ld_flags: ldflags from gyp files. Returns: clean ldflags
Clean up ldflags from gyp file. Remove any ldflags that contain android_top_dir.
[ "Clean", "up", "ldflags", "from", "gyp", "file", ".", "Remove", "any", "ldflags", "that", "contain", "android_top_dir", "." ]
def NormalizeLdFlags(self, ld_flags): """ Clean up ldflags from gyp file. Remove any ldflags that contain android_top_dir. Args: ld_flags: ldflags from gyp files. Returns: clean ldflags """ clean_ldflags = [] for flag in ld_flags: if self.android_top_dir in flag: ...
[ "def", "NormalizeLdFlags", "(", "self", ",", "ld_flags", ")", ":", "clean_ldflags", "=", "[", "]", "for", "flag", "in", "ld_flags", ":", "if", "self", ".", "android_top_dir", "in", "flag", ":", "continue", "clean_ldflags", ".", "append", "(", "flag", ")", ...
https://github.com/alibaba/weex_js_engine/blob/2bdf4b6f020c1fc99c63f649718f6faf7e27fdde/jni/v8core/v8/build/gyp/pylib/gyp/generator/android.py#L672-L687
nucleic/atom
9f0cb2a8101dd63c354a98ebc7489b2c616dc82a
atom/atom.py
python
Atom.__getstate__
(self)
return state
The base implementation of the pickle getstate protocol. This base class implementation handles the generic case where the object and all of its state are pickable. This includes state stored in Atom members, as well as any instance dict or slot attributes. Subclasses which require furt...
The base implementation of the pickle getstate protocol.
[ "The", "base", "implementation", "of", "the", "pickle", "getstate", "protocol", "." ]
def __getstate__(self): """The base implementation of the pickle getstate protocol. This base class implementation handles the generic case where the object and all of its state are pickable. This includes state stored in Atom members, as well as any instance dict or slot attrib...
[ "def", "__getstate__", "(", "self", ")", ":", "state", "=", "{", "}", "state", ".", "update", "(", "getattr", "(", "self", ",", "\"__dict__\"", ",", "{", "}", ")", ")", "slots", "=", "copyreg", ".", "_slotnames", "(", "type", "(", "self", ")", ")",...
https://github.com/nucleic/atom/blob/9f0cb2a8101dd63c354a98ebc7489b2c616dc82a/atom/atom.py#L513-L532
ricardoquesada/Spidermonkey
4a75ea2543408bd1b2c515aa95901523eeef7858
python/configobj/validate.py
python
is_option
(value, *options)
return value
This check matches the value to any of a set of options. >>> vtor.check('option("yoda", "jedi")', 'yoda') 'yoda' >>> vtor.check('option("yoda", "jedi")', 'jed') Traceback (most recent call last): VdtValueError: the value "jed" is unacceptable. >>> vtor.check('option("yoda", "jedi")', 0) ...
This check matches the value to any of a set of options. >>> vtor.check('option("yoda", "jedi")', 'yoda') 'yoda' >>> vtor.check('option("yoda", "jedi")', 'jed') Traceback (most recent call last): VdtValueError: the value "jed" is unacceptable. >>> vtor.check('option("yoda", "jedi")', 0) ...
[ "This", "check", "matches", "the", "value", "to", "any", "of", "a", "set", "of", "options", ".", ">>>", "vtor", ".", "check", "(", "option", "(", "yoda", "jedi", ")", "yoda", ")", "yoda", ">>>", "vtor", ".", "check", "(", "option", "(", "yoda", "je...
def is_option(value, *options): """ This check matches the value to any of a set of options. >>> vtor.check('option("yoda", "jedi")', 'yoda') 'yoda' >>> vtor.check('option("yoda", "jedi")', 'jed') Traceback (most recent call last): VdtValueError: the value "jed" is unacceptable. >>>...
[ "def", "is_option", "(", "value", ",", "*", "options", ")", ":", "if", "not", "isinstance", "(", "value", ",", "basestring", ")", ":", "raise", "VdtTypeError", "(", "value", ")", "if", "not", "value", "in", "options", ":", "raise", "VdtValueError", "(", ...
https://github.com/ricardoquesada/Spidermonkey/blob/4a75ea2543408bd1b2c515aa95901523eeef7858/python/configobj/validate.py#L1299-L1316
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/models/image/cifar10/cifar10_input.py
python
inputs
(eval_data, data_dir, batch_size)
return _generate_image_and_label_batch(float_image, read_input.label, min_queue_examples, batch_size, shuffle=False)
Construct input for CIFAR evaluation using the Reader ops. Args: eval_data: bool, indicating if one should use the train or eval data set. data_dir: Path to the CIFAR-10 data directory. batch_size: Number of images per batch. Returns: images: Images. 4D tensor of [batch_size, IMAGE_SIZE, IMAGE_SIZ...
Construct input for CIFAR evaluation using the Reader ops.
[ "Construct", "input", "for", "CIFAR", "evaluation", "using", "the", "Reader", "ops", "." ]
def inputs(eval_data, data_dir, batch_size): """Construct input for CIFAR evaluation using the Reader ops. Args: eval_data: bool, indicating if one should use the train or eval data set. data_dir: Path to the CIFAR-10 data directory. batch_size: Number of images per batch. Returns: images: Image...
[ "def", "inputs", "(", "eval_data", ",", "data_dir", ",", "batch_size", ")", ":", "if", "not", "eval_data", ":", "filenames", "=", "[", "os", ".", "path", ".", "join", "(", "data_dir", ",", "'data_batch_%d.bin'", "%", "i", ")", "for", "i", "in", "xrange...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/models/image/cifar10/cifar10_input.py#L197-L247
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/fitting_widgets/tf_asymmetry_fitting/tf_asymmetry_fitting_model.py
python
TFAsymmetryFittingModel._update_tf_asymmetry_single_fit_functions_after_sequential
(self, workspaces: list, functions: list)
Updates the TF single fit functions after a sequential fit has been run on the Sequential fitting tab.
Updates the TF single fit functions after a sequential fit has been run on the Sequential fitting tab.
[ "Updates", "the", "TF", "single", "fit", "functions", "after", "a", "sequential", "fit", "has", "been", "run", "on", "the", "Sequential", "fitting", "tab", "." ]
def _update_tf_asymmetry_single_fit_functions_after_sequential(self, workspaces: list, functions: list) -> None: """Updates the TF single fit functions after a sequential fit has been run on the Sequential fitting tab.""" dataset_names = self.fitting_context.dataset_names for workspace_index, w...
[ "def", "_update_tf_asymmetry_single_fit_functions_after_sequential", "(", "self", ",", "workspaces", ":", "list", ",", "functions", ":", "list", ")", "->", "None", ":", "dataset_names", "=", "self", ".", "fitting_context", ".", "dataset_names", "for", "workspace_index...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/fitting_widgets/tf_asymmetry_fitting/tf_asymmetry_fitting_model.py#L891-L898
chromiumembedded/cef
80caf947f3fe2210e5344713c5281d8af9bdc295
tools/make_distrib.py
python
create_tar_archive
(input_dir, format)
Creates a tar archive of the specified input directory.
Creates a tar archive of the specified input directory.
[ "Creates", "a", "tar", "archive", "of", "the", "specified", "input", "directory", "." ]
def create_tar_archive(input_dir, format): """ Creates a tar archive of the specified input directory. """ # Supported formats include "gz" and "bz2". tar_file = input_dir + '.tar.' + format tf = tarfile.open(tar_file, "w:" + format) # The default tar format changed from GNU_FORMAT to PAX_FORMAT in Python 3.8...
[ "def", "create_tar_archive", "(", "input_dir", ",", "format", ")", ":", "# Supported formats include \"gz\" and \"bz2\".", "tar_file", "=", "input_dir", "+", "'.tar.'", "+", "format", "tf", "=", "tarfile", ".", "open", "(", "tar_file", ",", "\"w:\"", "+", "format"...
https://github.com/chromiumembedded/cef/blob/80caf947f3fe2210e5344713c5281d8af9bdc295/tools/make_distrib.py#L42-L52
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/distutils/file_util.py
python
move_file
(src, dst, verbose=1, dry_run=0)
return dst
Move a file 'src' to 'dst'. If 'dst' is a directory, the file will be moved into it with the same name; otherwise, 'src' is just renamed to 'dst'. Return the new full name of the file. Handles cross-device moves on Unix using 'copy_file()'. What about other systems???
Move a file 'src' to 'dst'.
[ "Move", "a", "file", "src", "to", "dst", "." ]
def move_file (src, dst, verbose=1, dry_run=0): """Move a file 'src' to 'dst'. If 'dst' is a directory, the file will be moved into it with the same name; otherwise, 'src' is just renamed to 'dst'. Return the new full name of the file. Handles cross-device moves on Unix using 'copy_file()'. What...
[ "def", "move_file", "(", "src", ",", "dst", ",", "verbose", "=", "1", ",", "dry_run", "=", "0", ")", ":", "from", "os", ".", "path", "import", "exists", ",", "isfile", ",", "isdir", ",", "basename", ",", "dirname", "import", "errno", "if", "verbose",...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/distutils/file_util.py#L162-L219
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py3/scipy/stats/_multivariate.py
python
dirichlet_gen.var
(self, alpha)
return _squeeze_output(out)
Compute the variance of the dirichlet distribution. Parameters ---------- %(_dirichlet_doc_default_callparams)s Returns ------- v : ndarray or scalar Variance of the Dirichlet distribution.
Compute the variance of the dirichlet distribution.
[ "Compute", "the", "variance", "of", "the", "dirichlet", "distribution", "." ]
def var(self, alpha): """ Compute the variance of the dirichlet distribution. Parameters ---------- %(_dirichlet_doc_default_callparams)s Returns ------- v : ndarray or scalar Variance of the Dirichlet distribution. """ alph...
[ "def", "var", "(", "self", ",", "alpha", ")", ":", "alpha", "=", "_dirichlet_check_parameters", "(", "alpha", ")", "alpha0", "=", "np", ".", "sum", "(", "alpha", ")", "out", "=", "(", "alpha", "*", "(", "alpha0", "-", "alpha", ")", ")", "/", "(", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py3/scipy/stats/_multivariate.py#L1495-L1514
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/vision_opencv/image_geometry/src/image_geometry/cameramodels.py
python
PinholeCameraModel.getDeltaX
(self, deltaU, Z)
return Z * deltaU / fx
:param deltaU: delta u in pixels :type deltaU: float :param Z: Z, in cartesian space :type Z: float :rtype: float Compute delta X, given Z in cartesian space and delta u in pixels. For given Z, this is the i...
:param deltaU: delta u in pixels :type deltaU: float :param Z: Z, in cartesian space :type Z: float :rtype: float
[ ":", "param", "deltaU", ":", "delta", "u", "in", "pixels", ":", "type", "deltaU", ":", "float", ":", "param", "Z", ":", "Z", "in", "cartesian", "space", ":", "type", "Z", ":", "float", ":", "rtype", ":", "float" ]
def getDeltaX(self, deltaU, Z): """ :param deltaU: delta u in pixels :type deltaU: float :param Z: Z, in cartesian space :type Z: float :rtype: float Compute delta X, given Z in cartesian space and d...
[ "def", "getDeltaX", "(", "self", ",", "deltaU", ",", "Z", ")", ":", "fx", "=", "self", ".", "P", "[", "0", ",", "0", "]", "return", "Z", "*", "deltaU", "/", "fx" ]
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/vision_opencv/image_geometry/src/image_geometry/cameramodels.py#L179-L191
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_misc.py
python
TimeSpan_Week
(*args)
return _misc_.TimeSpan_Week(*args)
TimeSpan_Week() -> TimeSpan
TimeSpan_Week() -> TimeSpan
[ "TimeSpan_Week", "()", "-", ">", "TimeSpan" ]
def TimeSpan_Week(*args): """TimeSpan_Week() -> TimeSpan""" return _misc_.TimeSpan_Week(*args)
[ "def", "TimeSpan_Week", "(", "*", "args", ")", ":", "return", "_misc_", ".", "TimeSpan_Week", "(", "*", "args", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_misc.py#L4600-L4602
liulei01/DRBox
b5c76e033c555c9009590ab384e1f7bd3c66c237
scripts/cpp_lint.py
python
CheckSpacingForFunctionCall
(filename, line, linenum, error)
Checks for the correctness of various spacing around function calls. Args: filename: The name of the current file. line: The text of the line to check. linenum: The number of the line to check. error: The function to call with any errors found.
Checks for the correctness of various spacing around function calls.
[ "Checks", "for", "the", "correctness", "of", "various", "spacing", "around", "function", "calls", "." ]
def CheckSpacingForFunctionCall(filename, line, linenum, error): """Checks for the correctness of various spacing around function calls. Args: filename: The name of the current file. line: The text of the line to check. linenum: The number of the line to check. error: The function to call with any ...
[ "def", "CheckSpacingForFunctionCall", "(", "filename", ",", "line", ",", "linenum", ",", "error", ")", ":", "# Since function calls often occur inside if/for/while/switch", "# expressions - which have their own, more liberal conventions - we", "# first see if we should be looking inside ...
https://github.com/liulei01/DRBox/blob/b5c76e033c555c9009590ab384e1f7bd3c66c237/scripts/cpp_lint.py#L2305-L2370
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/distribute/values.py
python
MirroredVariable._write_object_proto
(self, proto, options)
Update a SavedObject proto for the caller. If a DistributedVariable object supports this method, it will be called when saving with a pre-built `SavedObject` proto representing the object, plus an instance of `SaveOptions`. This method is then free to modify that proto instance. `DistributedVariab...
Update a SavedObject proto for the caller.
[ "Update", "a", "SavedObject", "proto", "for", "the", "caller", "." ]
def _write_object_proto(self, proto, options): """Update a SavedObject proto for the caller. If a DistributedVariable object supports this method, it will be called when saving with a pre-built `SavedObject` proto representing the object, plus an instance of `SaveOptions`. This method is then free to m...
[ "def", "_write_object_proto", "(", "self", ",", "proto", ",", "options", ")", ":", "super", "(", "MirroredVariable", ",", "self", ")", ".", "_write_object_proto", "(", "proto", ",", "options", ")", "values_util", ".", "write_object_proto", "(", "self", ",", ...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/distribute/values.py#L1190-L1209
baidu/tera
dbcd28af792d879d961bf9fc7eb60de81b437646
src/sdk/python/TeraSdk.py
python
Client.Close
(self)
销毁这个client,释放底层资源,以后不得再使用这个对象
销毁这个client,释放底层资源,以后不得再使用这个对象
[ "销毁这个client,释放底层资源,以后不得再使用这个对象" ]
def Close(self): """ 销毁这个client,释放底层资源,以后不得再使用这个对象 """ lib.tera_client_close(self.client)
[ "def", "Close", "(", "self", ")", ":", "lib", ".", "tera_client_close", "(", "self", ".", "client", ")" ]
https://github.com/baidu/tera/blob/dbcd28af792d879d961bf9fc7eb60de81b437646/src/sdk/python/TeraSdk.py#L267-L271
MegEngine/MegEngine
ce9ad07a27ec909fb8db4dd67943d24ba98fb93a
imperative/python/megengine/utils/network.py
python
NodeFilter.as_dict
(self)
return collections.OrderedDict((i.name, i) for i in self)
r"""construct an ordered dict to map from node names to objects in this iterator
r"""construct an ordered dict to map from node names to objects in this iterator
[ "r", "construct", "an", "ordered", "dict", "to", "map", "from", "node", "names", "to", "objects", "in", "this", "iterator" ]
def as_dict(self): r"""construct an ordered dict to map from node names to objects in this iterator """ return collections.OrderedDict((i.name, i) for i in self)
[ "def", "as_dict", "(", "self", ")", ":", "return", "collections", ".", "OrderedDict", "(", "(", "i", ".", "name", ",", "i", ")", "for", "i", "in", "self", ")" ]
https://github.com/MegEngine/MegEngine/blob/ce9ad07a27ec909fb8db4dd67943d24ba98fb93a/imperative/python/megengine/utils/network.py#L735-L739
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/gsutil/third_party/boto/boto/route53/connection.py
python
Route53Connection.create_zone
(self, name, private_zone=False, vpc_id=None, vpc_region=None)
return Zone(self, zone['CreateHostedZoneResponse']['HostedZone'])
Create a new Hosted Zone. Returns a Zone object for the newly created Hosted Zone. :type name: str :param name: The name of the domain. This should be a fully-specified domain, and should end with a final period as the last label indication. If you omit the final perio...
Create a new Hosted Zone. Returns a Zone object for the newly created Hosted Zone.
[ "Create", "a", "new", "Hosted", "Zone", ".", "Returns", "a", "Zone", "object", "for", "the", "newly", "created", "Hosted", "Zone", "." ]
def create_zone(self, name, private_zone=False, vpc_id=None, vpc_region=None): """ Create a new Hosted Zone. Returns a Zone object for the newly created Hosted Zone. :type name: str :param name: The name of the domain. This should be a fully-spec...
[ "def", "create_zone", "(", "self", ",", "name", ",", "private_zone", "=", "False", ",", "vpc_id", "=", "None", ",", "vpc_region", "=", "None", ")", ":", "zone", "=", "self", ".", "create_hosted_zone", "(", "name", ",", "private_zone", "=", "private_zone", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/gsutil/third_party/boto/boto/route53/connection.py#L506-L535
y123456yz/reading-and-annotate-mongodb-3.6
93280293672ca7586dc24af18132aa61e4ed7fcf
mongo/buildscripts/idl/idl/errors.py
python
ParserError.__init__
(self, error_id, msg, file_name, line, column)
Construct a parser error with source location information.
Construct a parser error with source location information.
[ "Construct", "a", "parser", "error", "with", "source", "location", "information", "." ]
def __init__(self, error_id, msg, file_name, line, column): # type: (unicode, unicode, unicode, int, int) -> None """"Construct a parser error with source location information.""" # pylint: disable=too-many-arguments self.error_id = error_id self.msg = msg super(ParserErr...
[ "def", "__init__", "(", "self", ",", "error_id", ",", "msg", ",", "file_name", ",", "line", ",", "column", ")", ":", "# type: (unicode, unicode, unicode, int, int) -> None", "# pylint: disable=too-many-arguments", "self", ".", "error_id", "=", "error_id", "self", ".",...
https://github.com/y123456yz/reading-and-annotate-mongodb-3.6/blob/93280293672ca7586dc24af18132aa61e4ed7fcf/mongo/buildscripts/idl/idl/errors.py#L105-L111
MicBosi/VisualizationLibrary
d2a0e321288152008957e29a0bc270ad192f75be
src/external/freetype/src/tools/docmaker/tohtml.py
python
HtmlFormatter.make_html_word
( self, word )
return html_quote( word )
analyze a simple word to detect cross-references and styling
analyze a simple word to detect cross-references and styling
[ "analyze", "a", "simple", "word", "to", "detect", "cross", "-", "references", "and", "styling" ]
def make_html_word( self, word ): """analyze a simple word to detect cross-references and styling""" # look for cross-references m = re_crossref.match( word ) if m: try: name = m.group( 1 ) rest = m.group( 2 ) block = self.iden...
[ "def", "make_html_word", "(", "self", ",", "word", ")", ":", "# look for cross-references", "m", "=", "re_crossref", ".", "match", "(", "word", ")", "if", "m", ":", "try", ":", "name", "=", "m", ".", "group", "(", "1", ")", "rest", "=", "m", ".", "...
https://github.com/MicBosi/VisualizationLibrary/blob/d2a0e321288152008957e29a0bc270ad192f75be/src/external/freetype/src/tools/docmaker/tohtml.py#L255-L285
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/devil/devil/android/ports.py
python
IsDevicePortUsed
(device, device_port, state='')
return False
Checks whether the specified device port is used or not. Args: device: A DeviceUtils instance. device_port: Port on device we want to check. state: String of the specified state. Default is empty string, which means any state. Returns: True if the port on device is already used, otherwi...
Checks whether the specified device port is used or not.
[ "Checks", "whether", "the", "specified", "device", "port", "is", "used", "or", "not", "." ]
def IsDevicePortUsed(device, device_port, state=''): """Checks whether the specified device port is used or not. Args: device: A DeviceUtils instance. device_port: Port on device we want to check. state: String of the specified state. Default is empty string, which means any state. Return...
[ "def", "IsDevicePortUsed", "(", "device", ",", "device_port", ",", "state", "=", "''", ")", ":", "base_urls", "=", "(", "'127.0.0.1:%d'", "%", "device_port", ",", "'localhost:%d'", "%", "device_port", ")", "netstat_results", "=", "device", ".", "RunShellCommand"...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/devil/devil/android/ports.py#L103-L129
isl-org/Open3D
79aec3ddde6a571ce2f28e4096477e52ec465244
util/check_style.py
python
_glob_files
(directories, extensions)
return file_paths
Find files with certain extensions in directories recursively. Args: directories: list of directories, relative to the root Open3D repo directory. extensions: list of extensions, e.g. ["cpp", "h"]. Return: List of file paths.
Find files with certain extensions in directories recursively.
[ "Find", "files", "with", "certain", "extensions", "in", "directories", "recursively", "." ]
def _glob_files(directories, extensions): """ Find files with certain extensions in directories recursively. Args: directories: list of directories, relative to the root Open3D repo directory. extensions: list of extensions, e.g. ["cpp", "h"]. Return: List of file paths. ""...
[ "def", "_glob_files", "(", "directories", ",", "extensions", ")", ":", "pwd", "=", "Path", "(", "os", ".", "path", ".", "dirname", "(", "os", ".", "path", ".", "abspath", "(", "__file__", ")", ")", ")", "open3d_root_dir", "=", "pwd", ".", "parent", "...
https://github.com/isl-org/Open3D/blob/79aec3ddde6a571ce2f28e4096477e52ec465244/util/check_style.py#L85-L107
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/botocore/retryhandler.py
python
delay_exponential
(base, growth_factor, attempts)
return time_to_sleep
Calculate time to sleep based on exponential function. The format is:: base * growth_factor ^ (attempts - 1) If ``base`` is set to 'rand' then a random number between 0 and 1 will be used as the base. Base must be greater than 0, otherwise a ValueError will be raised.
Calculate time to sleep based on exponential function.
[ "Calculate", "time", "to", "sleep", "based", "on", "exponential", "function", "." ]
def delay_exponential(base, growth_factor, attempts): """Calculate time to sleep based on exponential function. The format is:: base * growth_factor ^ (attempts - 1) If ``base`` is set to 'rand' then a random number between 0 and 1 will be used as the base. Base must be greater than 0, ot...
[ "def", "delay_exponential", "(", "base", ",", "growth_factor", ",", "attempts", ")", ":", "if", "base", "==", "'rand'", ":", "base", "=", "random", ".", "random", "(", ")", "elif", "base", "<=", "0", ":", "raise", "ValueError", "(", "\"The 'base' param mus...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/botocore/retryhandler.py#L39-L58
NVIDIA/MDL-SDK
aa9642b2546ad7b6236b5627385d882c2ed83c5d
src/mdl/jit/llvm/dist/bindings/python/llvm/object.py
python
Symbol.address
(self)
return lib.LLVMGetSymbolAddress(self)
The address of this symbol, in long bytes.
The address of this symbol, in long bytes.
[ "The", "address", "of", "this", "symbol", "in", "long", "bytes", "." ]
def address(self): """The address of this symbol, in long bytes.""" if self.expired: raise Exception('Symbol instance has expired.') return lib.LLVMGetSymbolAddress(self)
[ "def", "address", "(", "self", ")", ":", "if", "self", ".", "expired", ":", "raise", "Exception", "(", "'Symbol instance has expired.'", ")", "return", "lib", ".", "LLVMGetSymbolAddress", "(", "self", ")" ]
https://github.com/NVIDIA/MDL-SDK/blob/aa9642b2546ad7b6236b5627385d882c2ed83c5d/src/mdl/jit/llvm/dist/bindings/python/llvm/object.py#L314-L319
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/supertooltip.py
python
SuperToolTip.SetBodyImage
(self, bmp)
Sets the main body bitmap for :class:`SuperToolTip`. :param `bmp`: the body bitmap, a valid :class:`Bitmap` object.
Sets the main body bitmap for :class:`SuperToolTip`.
[ "Sets", "the", "main", "body", "bitmap", "for", ":", "class", ":", "SuperToolTip", "." ]
def SetBodyImage(self, bmp): """ Sets the main body bitmap for :class:`SuperToolTip`. :param `bmp`: the body bitmap, a valid :class:`Bitmap` object. """ self._embeddedImage = bmp if self._superToolTip: self._superToolTip.Invalidate()
[ "def", "SetBodyImage", "(", "self", ",", "bmp", ")", ":", "self", ".", "_embeddedImage", "=", "bmp", "if", "self", ".", "_superToolTip", ":", "self", ".", "_superToolTip", ".", "Invalidate", "(", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/supertooltip.py#L1086-L1095
openvinotoolkit/openvino
dedcbeafa8b84cccdc55ca64b8da516682b381c7
thirdparty/itt_collector/runtool/sea_runtool.py
python
TaskCombiner.context_switch
(self, time, cpu, prev, next)
Called to process context switch events on CPU. :param cpu: CPU number (int) :param prev: previous task description (dict. Example: {'tid': 2935135, 'state': 'S', 'name': u'vtplay', 'prio': 31}) :param next: next task description (dict. see above)
Called to process context switch events on CPU. :param cpu: CPU number (int) :param prev: previous task description (dict. Example: {'tid': 2935135, 'state': 'S', 'name': u'vtplay', 'prio': 31}) :param next: next task description (dict. see above)
[ "Called", "to", "process", "context", "switch", "events", "on", "CPU", ".", ":", "param", "cpu", ":", "CPU", "number", "(", "int", ")", ":", "param", "prev", ":", "previous", "task", "description", "(", "dict", ".", "Example", ":", "{", "tid", ":", "...
def context_switch(self, time, cpu, prev, next): """ Called to process context switch events on CPU. :param cpu: CPU number (int) :param prev: previous task description (dict. Example: {'tid': 2935135, 'state': 'S', 'name': u'vtplay', 'prio': 31}) :param next: next task descripti...
[ "def", "context_switch", "(", "self", ",", "time", ",", "cpu", ",", "prev", ",", "next", ")", ":", "pass" ]
https://github.com/openvinotoolkit/openvino/blob/dedcbeafa8b84cccdc55ca64b8da516682b381c7/thirdparty/itt_collector/runtool/sea_runtool.py#L1887-L1894
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/eager/function.py
python
Function._create_graph_function
(self, args, kwargs, override_flat_arg_shapes=None)
return graph_function
Create a `ConcreteFunction` from `args` and `kwargs`.
Create a `ConcreteFunction` from `args` and `kwargs`.
[ "Create", "a", "ConcreteFunction", "from", "args", "and", "kwargs", "." ]
def _create_graph_function(self, args, kwargs, override_flat_arg_shapes=None): """Create a `ConcreteFunction` from `args` and `kwargs`.""" if self.input_signature is None: arglen = len(args) else: arglen = len(self.input_signature) base_arg_names = self._function_spec.arg_names[:arglen] ...
[ "def", "_create_graph_function", "(", "self", ",", "args", ",", "kwargs", ",", "override_flat_arg_shapes", "=", "None", ")", ":", "if", "self", ".", "input_signature", "is", "None", ":", "arglen", "=", "len", "(", "args", ")", "else", ":", "arglen", "=", ...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/eager/function.py#L2012-L2045
sdhash/sdhash
b9eff63e4e5867e910f41fd69032bbb1c94a2a5e
sdhash-ui/cherrypy/_cpchecker.py
python
Checker._compat
(self, config)
Process config and warn on each obsolete or deprecated entry.
Process config and warn on each obsolete or deprecated entry.
[ "Process", "config", "and", "warn", "on", "each", "obsolete", "or", "deprecated", "entry", "." ]
def _compat(self, config): """Process config and warn on each obsolete or deprecated entry.""" for section, conf in config.items(): if isinstance(conf, dict): for k, v in conf.items(): if k in self.obsolete: warnings.warn("%r is obs...
[ "def", "_compat", "(", "self", ",", "config", ")", ":", "for", "section", ",", "conf", "in", "config", ".", "items", "(", ")", ":", "if", "isinstance", "(", "conf", ",", "dict", ")", ":", "for", "k", ",", "v", "in", "conf", ".", "items", "(", "...
https://github.com/sdhash/sdhash/blob/b9eff63e4e5867e910f41fd69032bbb1c94a2a5e/sdhash-ui/cherrypy/_cpchecker.py#L187-L206
cinder/Cinder
e83f5bb9c01a63eec20168d02953a0879e5100f7
src/freetype/tools/glnames.py
python
dump_encoding
( file, encoding_name, encoding_list )
dump a given encoding
dump a given encoding
[ "dump", "a", "given", "encoding" ]
def dump_encoding( file, encoding_name, encoding_list ): """dump a given encoding""" write = file.write write( " /* the following are indices into the SID name table */\n" ) write( "#ifndef DEFINE_PS_TABLES_DATA\n" ) write( "#ifdef __cplusplus\n" ) write( ' extern "C"\n' ) write( "#else\n" ) write(...
[ "def", "dump_encoding", "(", "file", ",", "encoding_name", ",", "encoding_list", ")", ":", "write", "=", "file", ".", "write", "write", "(", "\" /* the following are indices into the SID name table */\\n\"", ")", "write", "(", "\"#ifndef DEFINE_PS_TABLES_DATA\\n\"", ")"...
https://github.com/cinder/Cinder/blob/e83f5bb9c01a63eec20168d02953a0879e5100f7/src/freetype/tools/glnames.py#L5211-L5245
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/concurrent/futures/process.py
python
_sendback_result
(result_queue, work_id, result=None, exception=None)
Safely send back the given result or exception
Safely send back the given result or exception
[ "Safely", "send", "back", "the", "given", "result", "or", "exception" ]
def _sendback_result(result_queue, work_id, result=None, exception=None): """Safely send back the given result or exception""" try: result_queue.put(_ResultItem(work_id, result=result, exception=exception)) except BaseException as e: exc = _ExceptionWithT...
[ "def", "_sendback_result", "(", "result_queue", ",", "work_id", ",", "result", "=", "None", ",", "exception", "=", "None", ")", ":", "try", ":", "result_queue", ".", "put", "(", "_ResultItem", "(", "work_id", ",", "result", "=", "result", ",", "exception",...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/concurrent/futures/process.py#L201-L208
lfortran/lfortran
6c96b79f5d86746cb2ec5acc86d4b0272ea34631
grammar/asdl.py
python
parse
(filename)
Parse ASDL from the given file and return a Module node describing it.
Parse ASDL from the given file and return a Module node describing it.
[ "Parse", "ASDL", "from", "the", "given", "file", "and", "return", "a", "Module", "node", "describing", "it", "." ]
def parse(filename): """Parse ASDL from the given file and return a Module node describing it.""" with open(filename) as f: parser = ASDLParser() return parser.parse(f.read())
[ "def", "parse", "(", "filename", ")", ":", "with", "open", "(", "filename", ")", "as", "f", ":", "parser", "=", "ASDLParser", "(", ")", "return", "parser", ".", "parse", "(", "f", ".", "read", "(", ")", ")" ]
https://github.com/lfortran/lfortran/blob/6c96b79f5d86746cb2ec5acc86d4b0272ea34631/grammar/asdl.py#L195-L199
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python/src/Lib/lib-tk/Tkinter.py
python
PanedWindow.__init__
(self, master=None, cnf={}, **kw)
Construct a panedwindow widget with the parent MASTER. STANDARD OPTIONS background, borderwidth, cursor, height, orient, relief, width WIDGET-SPECIFIC OPTIONS handlepad, handlesize, opaqueresize, sashcursor, sashpad, sashrelief, sashwidth, ...
Construct a panedwindow widget with the parent MASTER.
[ "Construct", "a", "panedwindow", "widget", "with", "the", "parent", "MASTER", "." ]
def __init__(self, master=None, cnf={}, **kw): """Construct a panedwindow widget with the parent MASTER. STANDARD OPTIONS background, borderwidth, cursor, height, orient, relief, width WIDGET-SPECIFIC OPTIONS handlepad, handlesize, opaqueresize, ...
[ "def", "__init__", "(", "self", ",", "master", "=", "None", ",", "cnf", "=", "{", "}", ",", "*", "*", "kw", ")", ":", "Widget", ".", "__init__", "(", "self", ",", "master", ",", "'panedwindow'", ",", "cnf", ",", "kw", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Lib/lib-tk/Tkinter.py#L3631-L3645
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/keras/backend.py
python
sum
(x, axis=None, keepdims=False)
return math_ops.reduce_sum(x, axis, keepdims)
Sum of the values in a tensor, alongside the specified axis. Args: x: A tensor or variable. axis: An integer, the axis to sum over. keepdims: A boolean, whether to keep the dimensions or not. If `keepdims` is `False`, the rank of the tensor is reduced by 1. If `keepdims` is `Tru...
Sum of the values in a tensor, alongside the specified axis.
[ "Sum", "of", "the", "values", "in", "a", "tensor", "alongside", "the", "specified", "axis", "." ]
def sum(x, axis=None, keepdims=False): """Sum of the values in a tensor, alongside the specified axis. Args: x: A tensor or variable. axis: An integer, the axis to sum over. keepdims: A boolean, whether to keep the dimensions or not. If `keepdims` is `False`, the rank of the tensor is r...
[ "def", "sum", "(", "x", ",", "axis", "=", "None", ",", "keepdims", "=", "False", ")", ":", "return", "math_ops", ".", "reduce_sum", "(", "x", ",", "axis", ",", "keepdims", ")" ]
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/keras/backend.py#L2322-L2336
RobotLocomotion/drake
0e18a34604c45ed65bc9018a54f7610f91cdad5b
tools/workspace/drake_visualizer/_drake_visualizer_builtin_scripts/show_hydroelastic_contact.py
python
_BodyContact.clean
(self, timestamp: int)
Removes all contacts that don't match the given timestamp.
Removes all contacts that don't match the given timestamp.
[ "Removes", "all", "contacts", "that", "don", "t", "match", "the", "given", "timestamp", "." ]
def clean(self, timestamp: int): """Removes all contacts that don't match the given timestamp.""" to_remove = [] for key, contact in self._contacts.items(): if contact.timestamp != timestamp: contact.clear() to_remove.append(key) for key in to_...
[ "def", "clean", "(", "self", ",", "timestamp", ":", "int", ")", ":", "to_remove", "=", "[", "]", "for", "key", ",", "contact", "in", "self", ".", "_contacts", ".", "items", "(", ")", ":", "if", "contact", ".", "timestamp", "!=", "timestamp", ":", "...
https://github.com/RobotLocomotion/drake/blob/0e18a34604c45ed65bc9018a54f7610f91cdad5b/tools/workspace/drake_visualizer/_drake_visualizer_builtin_scripts/show_hydroelastic_contact.py#L681-L691
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/hypertreelist.py
python
TreeListHeaderWindow.SetCustomRenderer
(self, renderer=None)
Associate a custom renderer with the header - all columns will use it :param `renderer`: a class able to correctly render header buttons :note: the renderer class **must** implement the method `DrawHeaderButton`
Associate a custom renderer with the header - all columns will use it
[ "Associate", "a", "custom", "renderer", "with", "the", "header", "-", "all", "columns", "will", "use", "it" ]
def SetCustomRenderer(self, renderer=None): """ Associate a custom renderer with the header - all columns will use it :param `renderer`: a class able to correctly render header buttons :note: the renderer class **must** implement the method `DrawHeaderButton` """ self....
[ "def", "SetCustomRenderer", "(", "self", ",", "renderer", "=", "None", ")", ":", "self", ".", "_headerCustomRenderer", "=", "renderer" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/hypertreelist.py#L916-L925
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/keras/engine/keras_tensor.py
python
KerasTensor.dtype
(self)
return self._type_spec._dtype
Returns the `dtype` symbolically inferred for this Keras output.
Returns the `dtype` symbolically inferred for this Keras output.
[ "Returns", "the", "dtype", "symbolically", "inferred", "for", "this", "Keras", "output", "." ]
def dtype(self): """Returns the `dtype` symbolically inferred for this Keras output.""" # TODO(kaftan): This is only valid for normal/sparse/ragged tensors. # may need to raise an error when it's not valid for a type_spec, # but some keras code (e.g. build-related stuff) will likely fail when # it c...
[ "def", "dtype", "(", "self", ")", ":", "# TODO(kaftan): This is only valid for normal/sparse/ragged tensors.", "# may need to raise an error when it's not valid for a type_spec,", "# but some keras code (e.g. build-related stuff) will likely fail when", "# it can't access shape or dtype", "retur...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/keras/engine/keras_tensor.py#L322-L328
OGRECave/ogre-next
287307980e6de8910f04f3cc0994451b075071fd
Tools/BlenderExport/ogrepkg/base.py
python
Log.__init__
(self)
return
Constructor.
Constructor.
[ "Constructor", "." ]
def __init__(self): """Constructor. """ Singleton.__init__(self) Model.__init__(self) self.clear() return
[ "def", "__init__", "(", "self", ")", ":", "Singleton", ".", "__init__", "(", "self", ")", "Model", ".", "__init__", "(", "self", ")", "self", ".", "clear", "(", ")", "return" ]
https://github.com/OGRECave/ogre-next/blob/287307980e6de8910f04f3cc0994451b075071fd/Tools/BlenderExport/ogrepkg/base.py#L117-L123
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py2/pandas/io/sql.py
python
_wrap_result
(data, columns, index_col=None, coerce_float=True, parse_dates=None)
return frame
Wrap result set of query in a DataFrame.
Wrap result set of query in a DataFrame.
[ "Wrap", "result", "set", "of", "query", "in", "a", "DataFrame", "." ]
def _wrap_result(data, columns, index_col=None, coerce_float=True, parse_dates=None): """Wrap result set of query in a DataFrame.""" frame = DataFrame.from_records(data, columns=columns, coerce_float=coerce_float) frame = _parse_date_columns(frame, parse...
[ "def", "_wrap_result", "(", "data", ",", "columns", ",", "index_col", "=", "None", ",", "coerce_float", "=", "True", ",", "parse_dates", "=", "None", ")", ":", "frame", "=", "DataFrame", ".", "from_records", "(", "data", ",", "columns", "=", "columns", "...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py2/pandas/io/sql.py#L136-L148
root-project/root
fcd3583bb14852bf2e8cd2415717cbaac0e75896
main/python/cmdLineUtils.py
python
isTree
(rootFile,pathSplit)
Return True if the object, corresponding to (rootFile,pathSplit), inherits from TTree
Return True if the object, corresponding to (rootFile,pathSplit), inherits from TTree
[ "Return", "True", "if", "the", "object", "corresponding", "to", "(", "rootFile", "pathSplit", ")", "inherits", "from", "TTree" ]
def isTree(rootFile,pathSplit): """ Return True if the object, corresponding to (rootFile,pathSplit), inherits from TTree """ if pathSplit == []: return False # the object is the rootFile itself else: return isTreeKey(getKey(rootFile,pathSplit))
[ "def", "isTree", "(", "rootFile", ",", "pathSplit", ")", ":", "if", "pathSplit", "==", "[", "]", ":", "return", "False", "# the object is the rootFile itself", "else", ":", "return", "isTreeKey", "(", "getKey", "(", "rootFile", ",", "pathSplit", ")", ")" ]
https://github.com/root-project/root/blob/fcd3583bb14852bf2e8cd2415717cbaac0e75896/main/python/cmdLineUtils.py#L223-L228
SequoiaDB/SequoiaDB
2894ed7e5bd6fe57330afc900cf76d0ff0df9f64
driver/python/pysequoiadb/collectionspace.py
python
collectionspace.__getattr__
(self, name)
support client.cs to access to collection. eg. cc = client() cs = cc.test cl = cs.test_cl # access to collection named 'test_cl' and we should pass '__members__' and '__methods__', becasue dir(cc) will invoke __getattr__("__members__") and ...
support client.cs to access to collection.
[ "support", "client", ".", "cs", "to", "access", "to", "collection", "." ]
def __getattr__(self, name): """support client.cs to access to collection. eg. cc = client() cs = cc.test cl = cs.test_cl # access to collection named 'test_cl' and we should pass '__members__' and '__methods__', becasue dir(cc) will invoke __...
[ "def", "__getattr__", "(", "self", ",", "name", ")", ":", "if", "'__members__'", "==", "name", "or", "'__methods__'", "==", "name", ":", "pass", "else", ":", "cl", "=", "collection", "(", ")", "try", ":", "rc", "=", "sdb", ".", "cs_get_collection", "("...
https://github.com/SequoiaDB/SequoiaDB/blob/2894ed7e5bd6fe57330afc900cf76d0ff0df9f64/driver/python/pysequoiadb/collectionspace.py#L87-L115
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/models/rnn/translate/translate.py
python
self_test
()
Test the translation model.
Test the translation model.
[ "Test", "the", "translation", "model", "." ]
def self_test(): """Test the translation model.""" with tf.Session() as sess: print("Self-test for neural translation model.") # Create model with vocabularies of 10, 2 small buckets, 2 layers of 32. model = seq2seq_model.Seq2SeqModel(10, 10, [(3, 3), (6, 6)], 32, 2, ...
[ "def", "self_test", "(", ")", ":", "with", "tf", ".", "Session", "(", ")", "as", "sess", ":", "print", "(", "\"Self-test for neural translation model.\"", ")", "# Create model with vocabularies of 10, 2 small buckets, 2 layers of 32.", "model", "=", "seq2seq_model", ".", ...
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/models/rnn/translate/translate.py#L250-L267
deepmind/open_spiel
4ca53bea32bb2875c7385d215424048ae92f78c8
open_spiel/python/jax/nfsp.py
python
ReservoirBuffer.sample
(self, num_samples)
return random.sample(self._data, num_samples)
Returns `num_samples` uniformly sampled from the buffer. Args: num_samples: `int`, number of samples to draw. Returns: An iterable over `num_samples` random elements of the buffer. Raises: ValueError: If there are less than `num_samples` elements in the buffer
Returns `num_samples` uniformly sampled from the buffer.
[ "Returns", "num_samples", "uniformly", "sampled", "from", "the", "buffer", "." ]
def sample(self, num_samples): """Returns `num_samples` uniformly sampled from the buffer. Args: num_samples: `int`, number of samples to draw. Returns: An iterable over `num_samples` random elements of the buffer. Raises: ValueError: If there are less than `num_samples` elements in...
[ "def", "sample", "(", "self", ",", "num_samples", ")", ":", "if", "len", "(", "self", ".", "_data", ")", "<", "num_samples", ":", "raise", "ValueError", "(", "\"{} elements could not be sampled from size {}\"", ".", "format", "(", "num_samples", ",", "len", "(...
https://github.com/deepmind/open_spiel/blob/4ca53bea32bb2875c7385d215424048ae92f78c8/open_spiel/python/jax/nfsp.py#L361-L376
cms-sw/cmssw
fd9de012d503d3405420bcbeec0ec879baa57cf2
Configuration/PyReleaseValidation/python/relval_machine.py
python
convert_keys_to_string
(dictionary)
Recursively converts dictionary keys to strings. Utility to help deal with unicode keys in dictionaries created from json requests. In order to pass dict to function as **kwarg we should transform key/value to str.
Recursively converts dictionary keys to strings. Utility to help deal with unicode keys in dictionaries created from json requests. In order to pass dict to function as **kwarg we should transform key/value to str.
[ "Recursively", "converts", "dictionary", "keys", "to", "strings", ".", "Utility", "to", "help", "deal", "with", "unicode", "keys", "in", "dictionaries", "created", "from", "json", "requests", ".", "In", "order", "to", "pass", "dict", "to", "function", "as", ...
def convert_keys_to_string(dictionary): """ Recursively converts dictionary keys to strings. Utility to help deal with unicode keys in dictionaries created from json requests. In order to pass dict to function as **kwarg we should transform key/value to str. """ if isinstance(dictionary, str...
[ "def", "convert_keys_to_string", "(", "dictionary", ")", ":", "if", "isinstance", "(", "dictionary", ",", "str", ")", ":", "return", "str", "(", "dictionary", ")", "elif", "isinstance", "(", "dictionary", ",", "collections", ".", "Mapping", ")", ":", "return...
https://github.com/cms-sw/cmssw/blob/fd9de012d503d3405420bcbeec0ec879baa57cf2/Configuration/PyReleaseValidation/python/relval_machine.py#L35-L47
okex/V3-Open-API-SDK
c5abb0db7e2287718e0055e17e57672ce0ec7fd9
okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_vendor/cachecontrol/controller.py
python
CacheController._urlnorm
(cls, uri)
return defrag_uri
Normalize the URL to create a safe key for the cache
Normalize the URL to create a safe key for the cache
[ "Normalize", "the", "URL", "to", "create", "a", "safe", "key", "for", "the", "cache" ]
def _urlnorm(cls, uri): """Normalize the URL to create a safe key for the cache""" (scheme, authority, path, query, fragment) = parse_uri(uri) if not scheme or not authority: raise Exception("Only absolute URIs are allowed. uri = %s" % uri) scheme = scheme.lower() au...
[ "def", "_urlnorm", "(", "cls", ",", "uri", ")", ":", "(", "scheme", ",", "authority", ",", "path", ",", "query", ",", "fragment", ")", "=", "parse_uri", "(", "uri", ")", "if", "not", "scheme", "or", "not", "authority", ":", "raise", "Exception", "(",...
https://github.com/okex/V3-Open-API-SDK/blob/c5abb0db7e2287718e0055e17e57672ce0ec7fd9/okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_vendor/cachecontrol/controller.py#L43-L60
plumonito/dtslam
5994bb9cf7a11981b830370db206bceb654c085d
3rdparty/opencv-git/doc/pattern_tools/svgfig.py
python
Frame.__init__
(self, xmin, xmax, ymin, ymax, *d, **kwds)
Acts like Fig, but draws a coordinate frame around the data. You also need to supply plot ranges. Frame(xmin, xmax, ymin, ymax, obj, obj, obj..., keyword options...) xmin, xmax required minimum and maximum x values (in the objs' coordinates) ymin, ymax required minimum ...
Acts like Fig, but draws a coordinate frame around the data. You also need to supply plot ranges.
[ "Acts", "like", "Fig", "but", "draws", "a", "coordinate", "frame", "around", "the", "data", ".", "You", "also", "need", "to", "supply", "plot", "ranges", "." ]
def __init__(self, xmin, xmax, ymin, ymax, *d, **kwds): """Acts like Fig, but draws a coordinate frame around the data. You also need to supply plot ranges. Frame(xmin, xmax, ymin, ymax, obj, obj, obj..., keyword options...) xmin, xmax required minimum and maximum x values (in the ...
[ "def", "__init__", "(", "self", ",", "xmin", ",", "xmax", ",", "ymin", ",", "ymax", ",", "*", "d", ",", "*", "*", "kwds", ")", ":", "self", ".", "xmin", ",", "self", ".", "xmax", ",", "self", ".", "ymin", ",", "self", ".", "ymax", "=", "xmin"...
https://github.com/plumonito/dtslam/blob/5994bb9cf7a11981b830370db206bceb654c085d/3rdparty/opencv-git/doc/pattern_tools/svgfig.py#L971-L1042
opencv/opencv
76aff8478883858f0e46746044348ebb16dc3c67
samples/dnn/speech_recognition.py
python
FilterbankFeatures.frame
(self, x, frame_length, hop_length)
return np.lib.stride_tricks.as_strided(x, shape=shape, strides=strides)
Slices a data array into (overlapping) frames. args: x : array to frame frame_length : length of frame hop_length : Number of steps to advance between frames return : A framed view of `x`
Slices a data array into (overlapping) frames. args: x : array to frame frame_length : length of frame hop_length : Number of steps to advance between frames return : A framed view of `x`
[ "Slices", "a", "data", "array", "into", "(", "overlapping", ")", "frames", ".", "args", ":", "x", ":", "array", "to", "frame", "frame_length", ":", "length", "of", "frame", "hop_length", ":", "Number", "of", "steps", "to", "advance", "between", "frames", ...
def frame(self, x, frame_length, hop_length): ''' Slices a data array into (overlapping) frames. args: x : array to frame frame_length : length of frame hop_length : Number of steps to advance between frames return : A framed vi...
[ "def", "frame", "(", "self", ",", "x", ",", "frame_length", ",", "hop_length", ")", ":", "if", "x", ".", "shape", "[", "-", "1", "]", "<", "frame_length", ":", "raise", "Exception", "(", "\"Input is too short (n={:d})\"", "\" for frame_length={:d}\"", ".", "...
https://github.com/opencv/opencv/blob/76aff8478883858f0e46746044348ebb16dc3c67/samples/dnn/speech_recognition.py#L281-L301
BlzFans/wke
b0fa21158312e40c5fbd84682d643022b6c34a93
cygwin/lib/python2.6/pydoc.py
python
HTMLDoc.docother
(self, object, name=None, mod=None, *ignored)
return lhs + self.repr(object)
Produce HTML documentation for a data object.
Produce HTML documentation for a data object.
[ "Produce", "HTML", "documentation", "for", "a", "data", "object", "." ]
def docother(self, object, name=None, mod=None, *ignored): """Produce HTML documentation for a data object.""" lhs = name and '<strong>%s</strong> = ' % name or '' return lhs + self.repr(object)
[ "def", "docother", "(", "self", ",", "object", ",", "name", "=", "None", ",", "mod", "=", "None", ",", "*", "ignored", ")", ":", "lhs", "=", "name", "and", "'<strong>%s</strong> = '", "%", "name", "or", "''", "return", "lhs", "+", "self", ".", "repr"...
https://github.com/BlzFans/wke/blob/b0fa21158312e40c5fbd84682d643022b6c34a93/cygwin/lib/python2.6/pydoc.py#L918-L921
openthread/openthread
9fcdbed9c526c70f1556d1ed84099c1535c7cd32
tools/otci/otci/otci.py
python
OTCI.dns_set_config
(self, server: Tuple[Union[str, ipaddress.IPv6Address], int], response_timeout: int = None, max_tx_attempts: int = None, recursion_desired: bool = None)
Set DNS client query config.
Set DNS client query config.
[ "Set", "DNS", "client", "query", "config", "." ]
def dns_set_config(self, server: Tuple[Union[str, ipaddress.IPv6Address], int], response_timeout: int = None, max_tx_attempts: int = None, recursion_desired: bool = None): """Set DNS client query config.""" cmd =...
[ "def", "dns_set_config", "(", "self", ",", "server", ":", "Tuple", "[", "Union", "[", "str", ",", "ipaddress", ".", "IPv6Address", "]", ",", "int", "]", ",", "response_timeout", ":", "int", "=", "None", ",", "max_tx_attempts", ":", "int", "=", "None", ...
https://github.com/openthread/openthread/blob/9fcdbed9c526c70f1556d1ed84099c1535c7cd32/tools/otci/otci/otci.py#L799-L817
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py2/scipy/signal/signaltools.py
python
sosfiltfilt
(sos, x, axis=-1, padtype='odd', padlen=None)
return y
A forward-backward digital filter using cascaded second-order sections. See `filtfilt` for more complete information about this method. Parameters ---------- sos : array_like Array of second-order filter coefficients, must have shape ``(n_sections, 6)``. Each row corresponds to a secon...
A forward-backward digital filter using cascaded second-order sections.
[ "A", "forward", "-", "backward", "digital", "filter", "using", "cascaded", "second", "-", "order", "sections", "." ]
def sosfiltfilt(sos, x, axis=-1, padtype='odd', padlen=None): """ A forward-backward digital filter using cascaded second-order sections. See `filtfilt` for more complete information about this method. Parameters ---------- sos : array_like Array of second-order filter coefficients, mu...
[ "def", "sosfiltfilt", "(", "sos", ",", "x", ",", "axis", "=", "-", "1", ",", "padtype", "=", "'odd'", ",", "padlen", "=", "None", ")", ":", "sos", ",", "n_sections", "=", "_validate_sos", "(", "sos", ")", "# `method` is \"pad\"...", "ntaps", "=", "2", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py2/scipy/signal/signaltools.py#L3299-L3407
echronos/echronos
c996f1d2c8af6c6536205eb319c1bf1d4d84569c
external_tools/ply_info/example/BASIC/basparse.py
python
p_number
(p)
number : INTEGER | FLOAT
number : INTEGER | FLOAT
[ "number", ":", "INTEGER", "|", "FLOAT" ]
def p_number(p): '''number : INTEGER | FLOAT''' p[0] = eval(p[1])
[ "def", "p_number", "(", "p", ")", ":", "p", "[", "0", "]", "=", "eval", "(", "p", "[", "1", "]", ")" ]
https://github.com/echronos/echronos/blob/c996f1d2c8af6c6536205eb319c1bf1d4d84569c/external_tools/ply_info/example/BASIC/basparse.py#L358-L361
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/site-packages/pip/commands/search.py
python
transform_hits
(hits)
return package_list
The list from pypi is really a list of versions. We want a list of packages with the list of versions stored inline. This converts the list from pypi into one we can use.
The list from pypi is really a list of versions. We want a list of packages with the list of versions stored inline. This converts the list from pypi into one we can use.
[ "The", "list", "from", "pypi", "is", "really", "a", "list", "of", "versions", ".", "We", "want", "a", "list", "of", "packages", "with", "the", "list", "of", "versions", "stored", "inline", ".", "This", "converts", "the", "list", "from", "pypi", "into", ...
def transform_hits(hits): """ The list from pypi is really a list of versions. We want a list of packages with the list of versions stored inline. This converts the list from pypi into one we can use. """ packages = {} for hit in hits: name = hit['name'] summary = hit['summar...
[ "def", "transform_hits", "(", "hits", ")", ":", "packages", "=", "{", "}", "for", "hit", "in", "hits", ":", "name", "=", "hit", "[", "'name'", "]", "summary", "=", "hit", "[", "'summary'", "]", "version", "=", "hit", "[", "'version'", "]", "score", ...
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/site-packages/pip/commands/search.py#L56-L83
miyosuda/TensorFlowAndroidDemo
35903e0221aa5f109ea2dbef27f20b52e317f42d
jni-build/jni/include/tensorflow/contrib/learn/python/learn/estimators/base.py
python
TensorFlowEstimator.save
(self, path)
Saves checkpoints and graph to given path. Args: path: Folder to save model to.
Saves checkpoints and graph to given path.
[ "Saves", "checkpoints", "and", "graph", "to", "given", "path", "." ]
def save(self, path): """Saves checkpoints and graph to given path. Args: path: Folder to save model to. """ if self._graph is None: raise NotFittedError # Copy model dir into new path. _copy_dir(self.model_dir, path) # Save model definition. all_params = self.get_params()...
[ "def", "save", "(", "self", ",", "path", ")", ":", "if", "self", ".", "_graph", "is", "None", ":", "raise", "NotFittedError", "# Copy model dir into new path.", "_copy_dir", "(", "self", ".", "model_dir", ",", "path", ")", "# Save model definition.", "all_params...
https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/contrib/learn/python/learn/estimators/base.py#L272-L294
vslavik/poedit
f7a9daa0a10037e090aa0a86f5ce0f24ececdf6a
deps/boost/libs/metaparse/tools/benchmark/generate.py
python
Mode.description
(self)
The description of the mode
The description of the mode
[ "The", "description", "of", "the", "mode" ]
def description(self): """The description of the mode""" if self.identifier == 'bmp': return 'Using BOOST_METAPARSE_STRING' elif self.identifier == 'man': return 'Generating strings manually'
[ "def", "description", "(", "self", ")", ":", "if", "self", ".", "identifier", "==", "'bmp'", ":", "return", "'Using BOOST_METAPARSE_STRING'", "elif", "self", ".", "identifier", "==", "'man'", ":", "return", "'Generating strings manually'" ]
https://github.com/vslavik/poedit/blob/f7a9daa0a10037e090aa0a86f5ce0f24ececdf6a/deps/boost/libs/metaparse/tools/benchmark/generate.py#L82-L87
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/popen2.py
python
Popen3.__init__
(self, cmd, capturestderr=False, bufsize=-1)
The parameter 'cmd' is the shell command to execute in a sub-process. On UNIX, 'cmd' may be a sequence, in which case arguments will be passed directly to the program without shell intervention (as with os.spawnv()). If 'cmd' is a string it will be passed to the shell (as with os.syste...
The parameter 'cmd' is the shell command to execute in a sub-process. On UNIX, 'cmd' may be a sequence, in which case arguments will be passed directly to the program without shell intervention (as with os.spawnv()). If 'cmd' is a string it will be passed to the shell (as with os.syste...
[ "The", "parameter", "cmd", "is", "the", "shell", "command", "to", "execute", "in", "a", "sub", "-", "process", ".", "On", "UNIX", "cmd", "may", "be", "a", "sequence", "in", "which", "case", "arguments", "will", "be", "passed", "directly", "to", "the", ...
def __init__(self, cmd, capturestderr=False, bufsize=-1): """The parameter 'cmd' is the shell command to execute in a sub-process. On UNIX, 'cmd' may be a sequence, in which case arguments will be passed directly to the program without shell intervention (as with os.spawnv()). If 'cmd'...
[ "def", "__init__", "(", "self", ",", "cmd", ",", "capturestderr", "=", "False", ",", "bufsize", "=", "-", "1", ")", ":", "_cleanup", "(", ")", "self", ".", "cmd", "=", "cmd", "p2cread", ",", "p2cwrite", "=", "os", ".", "pipe", "(", ")", "c2pread", ...
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/popen2.py#L40-L72
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
tools/valgrind/suppressions.py
python
GlobToRegex
(glob_pattern, ignore_case=False)
return ''.join(regex)
Translate glob wildcards (*?) into regex syntax. Escape the rest.
Translate glob wildcards (*?) into regex syntax. Escape the rest.
[ "Translate", "glob", "wildcards", "(", "*", "?", ")", "into", "regex", "syntax", ".", "Escape", "the", "rest", "." ]
def GlobToRegex(glob_pattern, ignore_case=False): """Translate glob wildcards (*?) into regex syntax. Escape the rest.""" regex = '' for char in glob_pattern: if char == '*': regex += '.*' elif char == '?': regex += '.' elif ignore_case and char.isalpha(): regex += '[%s%s]' % (char....
[ "def", "GlobToRegex", "(", "glob_pattern", ",", "ignore_case", "=", "False", ")", ":", "regex", "=", "''", "for", "char", "in", "glob_pattern", ":", "if", "char", "==", "'*'", ":", "regex", "+=", "'.*'", "elif", "char", "==", "'?'", ":", "regex", "+=",...
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/tools/valgrind/suppressions.py#L35-L47
apache/mesos
97d9a4063332aae3825d78de71611657e05cf5e2
support/cpplint.py
python
ProcessGlobalSuppresions
(lines)
Updates the list of global error suppressions. Parses any lint directives in the file that have global effect. Args: lines: An array of strings, each representing a line of the file, with the last element being empty if the file is terminated with a newline.
Updates the list of global error suppressions.
[ "Updates", "the", "list", "of", "global", "error", "suppressions", "." ]
def ProcessGlobalSuppresions(lines): """Updates the list of global error suppressions. Parses any lint directives in the file that have global effect. Args: lines: An array of strings, each representing a line of the file, with the last element being empty if the file is terminated with a newline...
[ "def", "ProcessGlobalSuppresions", "(", "lines", ")", ":", "for", "line", "in", "lines", ":", "if", "_SEARCH_C_FILE", ".", "search", "(", "line", ")", ":", "for", "category", "in", "_DEFAULT_C_SUPPRESSED_CATEGORIES", ":", "_global_error_suppressions", "[", "catego...
https://github.com/apache/mesos/blob/97d9a4063332aae3825d78de71611657e05cf5e2/support/cpplint.py#L620-L635
mapnik/mapnik
f3da900c355e1d15059c4a91b00203dcc9d9f0ef
scons/scons-local-4.1.0/SCons/Node/__init__.py
python
Node.is_literal
(self)
return 1
Always pass the string representation of a Node to the command interpreter literally.
Always pass the string representation of a Node to the command interpreter literally.
[ "Always", "pass", "the", "string", "representation", "of", "a", "Node", "to", "the", "command", "interpreter", "literally", "." ]
def is_literal(self): """Always pass the string representation of a Node to the command interpreter literally.""" return 1
[ "def", "is_literal", "(", "self", ")", ":", "return", "1" ]
https://github.com/mapnik/mapnik/blob/f3da900c355e1d15059c4a91b00203dcc9d9f0ef/scons/scons-local-4.1.0/SCons/Node/__init__.py#L1533-L1536
gem5/gem5
141cc37c2d4b93959d4c249b8f7e6a8b2ef75338
ext/ply/example/calc/calc.py
python
p_statement_expr
(p)
statement : expression
statement : expression
[ "statement", ":", "expression" ]
def p_statement_expr(p): 'statement : expression' print(p[1])
[ "def", "p_statement_expr", "(", "p", ")", ":", "print", "(", "p", "[", "1", "]", ")" ]
https://github.com/gem5/gem5/blob/141cc37c2d4b93959d4c249b8f7e6a8b2ef75338/ext/ply/example/calc/calc.py#L58-L60
google/nucleus
68d3947fafba1337f294c0668a6e1c7f3f1273e3
nucleus/io/bedgraph.py
python
NativeBedGraphReader.query
(self)
Returns an iterator for going through the records in the region. NOTE: This function is not currently implemented by NativeBedGraphReader though it could be implemented for sorted, tabix-indexed BedGraph files.
Returns an iterator for going through the records in the region.
[ "Returns", "an", "iterator", "for", "going", "through", "the", "records", "in", "the", "region", "." ]
def query(self): """Returns an iterator for going through the records in the region. NOTE: This function is not currently implemented by NativeBedGraphReader though it could be implemented for sorted, tabix-indexed BedGraph files. """ raise NotImplementedError('Can not currently query a BedGraph fi...
[ "def", "query", "(", "self", ")", ":", "raise", "NotImplementedError", "(", "'Can not currently query a BedGraph file'", ")" ]
https://github.com/google/nucleus/blob/68d3947fafba1337f294c0668a6e1c7f3f1273e3/nucleus/io/bedgraph.py#L87-L93
cinder/Cinder
e83f5bb9c01a63eec20168d02953a0879e5100f7
docs/generateDocs.py
python
process_ci_prefix_tag
(bs4, tag, in_path)
Finds the referenced tag's object if existent and adds the path to the prefix file to the class to be parsed later :param tag: The ci tag with a defined prefix attribute :param in_path: The path to the refix content :return:
Finds the referenced tag's object if existent and adds the path to the prefix file to the class to be parsed later :param tag: The ci tag with a defined prefix attribute :param in_path: The path to the refix content :return:
[ "Finds", "the", "referenced", "tag", "s", "object", "if", "existent", "and", "adds", "the", "path", "to", "the", "prefix", "file", "to", "the", "class", "to", "be", "parsed", "later", ":", "param", "tag", ":", "The", "ci", "tag", "with", "a", "defined"...
def process_ci_prefix_tag(bs4, tag, in_path): """ Finds the referenced tag's object if existent and adds the path to the prefix file to the class to be parsed later :param tag: The ci tag with a defined prefix attribute :param in_path: The path to the refix content :return: """ in_path = in_...
[ "def", "process_ci_prefix_tag", "(", "bs4", ",", "tag", ",", "in_path", ")", ":", "in_path", "=", "in_path", ".", "replace", "(", "'\\\\'", ",", "'/'", ")", "in_dir", "=", "get_path_dir", "(", "in_path", ")", "obj_ref", "=", "find_ci_tag_ref", "(", "tag", ...
https://github.com/cinder/Cinder/blob/e83f5bb9c01a63eec20168d02953a0879e5100f7/docs/generateDocs.py#L2733-L2763
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/keras/engine/compile_utils.py
python
MetricsContainer._get_metric_objects
(self, metrics, y_t, y_p)
return [self._get_metric_object(m, y_t, y_p) for m in metrics]
Convert user-supplied metrics to `Metric` objects.
Convert user-supplied metrics to `Metric` objects.
[ "Convert", "user", "-", "supplied", "metrics", "to", "Metric", "objects", "." ]
def _get_metric_objects(self, metrics, y_t, y_p): """Convert user-supplied metrics to `Metric` objects.""" metrics = nest.flatten(metrics) return [self._get_metric_object(m, y_t, y_p) for m in metrics]
[ "def", "_get_metric_objects", "(", "self", ",", "metrics", ",", "y_t", ",", "y_p", ")", ":", "metrics", "=", "nest", ".", "flatten", "(", "metrics", ")", "return", "[", "self", ".", "_get_metric_object", "(", "m", ",", "y_t", ",", "y_p", ")", "for", ...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/keras/engine/compile_utils.py#L482-L485
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/cookielib.py
python
time2netscape
(t=None)
return "%s %02d-%s-%04d %02d:%02d:%02d GMT" % ( DAYS[wday], mday, MONTHS[mon-1], year, hour, min, sec)
Return a string representing time in seconds since epoch, t. If the function is called without an argument, it will use the current time. The format of the returned string is like this: Wed, DD-Mon-YYYY HH:MM:SS GMT
Return a string representing time in seconds since epoch, t.
[ "Return", "a", "string", "representing", "time", "in", "seconds", "since", "epoch", "t", "." ]
def time2netscape(t=None): """Return a string representing time in seconds since epoch, t. If the function is called without an argument, it will use the current time. The format of the returned string is like this: Wed, DD-Mon-YYYY HH:MM:SS GMT """ if t is None: t = time.time() year...
[ "def", "time2netscape", "(", "t", "=", "None", ")", ":", "if", "t", "is", "None", ":", "t", "=", "time", ".", "time", "(", ")", "year", ",", "mon", ",", "mday", ",", "hour", ",", "min", ",", "sec", ",", "wday", "=", "time", ".", "gmtime", "("...
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/cookielib.py#L103-L117
apple/swift-lldb
d74be846ef3e62de946df343e8c234bde93a8912
utils/vim-lldb/python-vim-lldb/vim_ui.py
python
UI.hideWindow
(self, name)
return True
Hides window pane specified by name
Hides window pane specified by name
[ "Hides", "window", "pane", "specified", "by", "name" ]
def hideWindow(self, name): """ Hides window pane specified by name """ if not self.paneCol.havePane(name): sys.stderr.write("unknown window: %s" % name) return False self.paneCol.hide([name]) return True
[ "def", "hideWindow", "(", "self", ",", "name", ")", ":", "if", "not", "self", ".", "paneCol", ".", "havePane", "(", "name", ")", ":", "sys", ".", "stderr", ".", "write", "(", "\"unknown window: %s\"", "%", "name", ")", "return", "False", "self", ".", ...
https://github.com/apple/swift-lldb/blob/d74be846ef3e62de946df343e8c234bde93a8912/utils/vim-lldb/python-vim-lldb/vim_ui.py#L248-L254
google/certificate-transparency
2588562fd306a447958471b6f06c1069619c1641
python/ct/crypto/asn1/types.py
python
Any._convert_value
(cls, value)
The value of an Any is the undecoded value.
The value of an Any is the undecoded value.
[ "The", "value", "of", "an", "Any", "is", "the", "undecoded", "value", "." ]
def _convert_value(cls, value): """The value of an Any is the undecoded value.""" # Always return the undecoded value for consistency; the # decoded/decoded_value properties can be used to retrieve the # decoded contents. if isinstance(value, Any): # This gets ambiguo...
[ "def", "_convert_value", "(", "cls", ",", "value", ")", ":", "# Always return the undecoded value for consistency; the", "# decoded/decoded_value properties can be used to retrieve the", "# decoded contents.", "if", "isinstance", "(", "value", ",", "Any", ")", ":", "# This gets...
https://github.com/google/certificate-transparency/blob/2588562fd306a447958471b6f06c1069619c1641/python/ct/crypto/asn1/types.py#L1026-L1039
pytorch/ELF
e851e786ced8d26cf470f08a6b9bf7e413fc63f7
src_py/rlpytorch/sampler/sample_methods.py
python
epsilon_greedy
(state_curr, args, node="pi")
return sample_multinomial(state_curr, args, node=node, greedy=True)
epsilon greedy sampling Args: state_curr(dict): current state containing all data args(dict): customized arguments for sampling. `epsilon` is used node(str): name string for policy, default is "pi" Returns: A list of actions using epsilon greedy sampling.
epsilon greedy sampling
[ "epsilon", "greedy", "sampling" ]
def epsilon_greedy(state_curr, args, node="pi"): ''' epsilon greedy sampling Args: state_curr(dict): current state containing all data args(dict): customized arguments for sampling. `epsilon` is used node(str): name string for policy, default is "pi" Returns: A list of acti...
[ "def", "epsilon_greedy", "(", "state_curr", ",", "args", ",", "node", "=", "\"pi\"", ")", ":", "return", "sample_multinomial", "(", "state_curr", ",", "args", ",", "node", "=", "node", ",", "greedy", "=", "True", ")" ]
https://github.com/pytorch/ELF/blob/e851e786ced8d26cf470f08a6b9bf7e413fc63f7/src_py/rlpytorch/sampler/sample_methods.py#L128-L139
ricardoquesada/Spidermonkey
4a75ea2543408bd1b2c515aa95901523eeef7858
python/mozbuild/mozbuild/frontend/sandbox.py
python
Sandbox.__init__
(self, context, builtins=None)
Initialize a Sandbox ready for execution.
Initialize a Sandbox ready for execution.
[ "Initialize", "a", "Sandbox", "ready", "for", "execution", "." ]
def __init__(self, context, builtins=None): """Initialize a Sandbox ready for execution. """ self._builtins = builtins or self.BUILTINS dict.__setitem__(self, '__builtins__', self._builtins) assert isinstance(self._builtins, ReadOnlyDict) assert isinstance(context, Conte...
[ "def", "__init__", "(", "self", ",", "context", ",", "builtins", "=", "None", ")", ":", "self", ".", "_builtins", "=", "builtins", "or", "self", ".", "BUILTINS", "dict", ".", "__setitem__", "(", "self", ",", "'__builtins__'", ",", "self", ".", "_builtins...
https://github.com/ricardoquesada/Spidermonkey/blob/4a75ea2543408bd1b2c515aa95901523eeef7858/python/mozbuild/mozbuild/frontend/sandbox.py#L110-L124
raymondlu/super-animation-samples
04234269112ff0dc32447f27a761dbbb00b8ba17
samples/cocos2d-x-3.1/CocosLuaGame2/frameworks/cocos2d-x/tools/bindings-generator/generator.py
python
build_namespace
(cursor, namespaces=[])
return namespaces
build the full namespace for a specific cursor
build the full namespace for a specific cursor
[ "build", "the", "full", "namespace", "for", "a", "specific", "cursor" ]
def build_namespace(cursor, namespaces=[]): ''' build the full namespace for a specific cursor ''' if cursor: parent = cursor.semantic_parent if parent: if parent.kind == cindex.CursorKind.NAMESPACE or parent.kind == cindex.CursorKind.CLASS_DECL: namespaces.ap...
[ "def", "build_namespace", "(", "cursor", ",", "namespaces", "=", "[", "]", ")", ":", "if", "cursor", ":", "parent", "=", "cursor", ".", "semantic_parent", "if", "parent", ":", "if", "parent", ".", "kind", "==", "cindex", ".", "CursorKind", ".", "NAMESPAC...
https://github.com/raymondlu/super-animation-samples/blob/04234269112ff0dc32447f27a761dbbb00b8ba17/samples/cocos2d-x-3.1/CocosLuaGame2/frameworks/cocos2d-x/tools/bindings-generator/generator.py#L104-L115
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
third_party/re2/re2/unicode.py
python
Scripts
(unicode_dir=_UNICODE_DIR)
return scripts
Returns dict mapping script names to code lists. Args: unicode_dir: Unicode data directory Returns: dict mapping script names to code lists
Returns dict mapping script names to code lists.
[ "Returns", "dict", "mapping", "script", "names", "to", "code", "lists", "." ]
def Scripts(unicode_dir=_UNICODE_DIR): """Returns dict mapping script names to code lists. Args: unicode_dir: Unicode data directory Returns: dict mapping script names to code lists """ scripts = {} def DoLine(codes, fields): """Process single Scripts.txt line, updating scripts.""" (_, n...
[ "def", "Scripts", "(", "unicode_dir", "=", "_UNICODE_DIR", ")", ":", "scripts", "=", "{", "}", "def", "DoLine", "(", "codes", ",", "fields", ")", ":", "\"\"\"Process single Scripts.txt line, updating scripts.\"\"\"", "(", "_", ",", "name", ")", "=", "fields", ...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/third_party/re2/re2/unicode.py#L253-L271
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/python/profiler/pprof_profiler.py
python
profile
(graph, run_metadata, output_dir=None)
return profile_files
Generate profiles in pprof format. See https://github.com/google/pprof/blob/master/proto/profile.proto for pprof proto format. Args: graph: A `Graph` object. run_metadata: A `RunMetadata` proto. output_dir: (string) Directory to output pprof profile to. Profile files for each device will be st...
Generate profiles in pprof format.
[ "Generate", "profiles", "in", "pprof", "format", "." ]
def profile(graph, run_metadata, output_dir=None): """Generate profiles in pprof format. See https://github.com/google/pprof/blob/master/proto/profile.proto for pprof proto format. Args: graph: A `Graph` object. run_metadata: A `RunMetadata` proto. output_dir: (string) Directory to output pprof pr...
[ "def", "profile", "(", "graph", ",", "run_metadata", ",", "output_dir", "=", "None", ")", ":", "profiles", "=", "get_profiles", "(", "graph", ",", "run_metadata", ")", "output_file_template", "=", "None", "if", "output_dir", ":", "if", "not", "os", ".", "p...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/python/profiler/pprof_profiler.py#L405-L445
MythTV/mythtv
d282a209cb8be85d036f85a62a8ec971b67d45f4
mythtv/programs/scripts/internetcontent/nv_python_libs/xsltfunctions/tedtalksXSL_api.py
python
xpathFunctions.stripSubstring
(self, string, startText, terminatorChar)
return string[:index].strip()
Return a substring terminated by specific character(s) return a substring
Return a substring terminated by specific character(s) return a substring
[ "Return", "a", "substring", "terminated", "by", "specific", "character", "(", "s", ")", "return", "a", "substring" ]
def stripSubstring(self, string, startText, terminatorChar): '''Return a substring terminated by specific character(s) return a substring ''' index = string.find(startText) if index == -1: return '' string = string[index+len(startText):] index = string...
[ "def", "stripSubstring", "(", "self", ",", "string", ",", "startText", ",", "terminatorChar", ")", ":", "index", "=", "string", ".", "find", "(", "startText", ")", "if", "index", "==", "-", "1", ":", "return", "''", "string", "=", "string", "[", "index...
https://github.com/MythTV/mythtv/blob/d282a209cb8be85d036f85a62a8ec971b67d45f4/mythtv/programs/scripts/internetcontent/nv_python_libs/xsltfunctions/tedtalksXSL_api.py#L231-L242
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/gsutil/gslib/translation_helper.py
python
LifecycleTranslation.BotoLifecycleFromMessage
(cls, lifecycle_message)
return boto_lifecycle
Translates an apitools message to a boto lifecycle object.
Translates an apitools message to a boto lifecycle object.
[ "Translates", "an", "apitools", "message", "to", "a", "boto", "lifecycle", "object", "." ]
def BotoLifecycleFromMessage(cls, lifecycle_message): """Translates an apitools message to a boto lifecycle object.""" boto_lifecycle = boto.gs.lifecycle.LifecycleConfig() if lifecycle_message: for rule_message in lifecycle_message.rule: boto_rule = boto.gs.lifecycle.Rule() if (rule_me...
[ "def", "BotoLifecycleFromMessage", "(", "cls", ",", "lifecycle_message", ")", ":", "boto_lifecycle", "=", "boto", ".", "gs", ".", "lifecycle", ".", "LifecycleConfig", "(", ")", "if", "lifecycle_message", ":", "for", "rule_message", "in", "lifecycle_message", ".", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/gsutil/gslib/translation_helper.py#L448-L471
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/python/ops/control_flow_ops.py
python
GradLoopState.history_map
(self)
return self._history_map
The map that records all the tensors needed for backprop.
The map that records all the tensors needed for backprop.
[ "The", "map", "that", "records", "all", "the", "tensors", "needed", "for", "backprop", "." ]
def history_map(self): """The map that records all the tensors needed for backprop.""" return self._history_map
[ "def", "history_map", "(", "self", ")", ":", "return", "self", ".", "_history_map" ]
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/python/ops/control_flow_ops.py#L614-L616
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py2/scipy/io/netcdf.py
python
netcdf_variable._get_missing_value
(self)
return missing_value
Returns the value denoting "no data" for this variable. If this variable does not have a missing/fill value, returns None. If both _FillValue and missing_value are given, give precedence to _FillValue. The netCDF standard gives special meaning to _FillValue; missing_value is just used...
Returns the value denoting "no data" for this variable.
[ "Returns", "the", "value", "denoting", "no", "data", "for", "this", "variable", "." ]
def _get_missing_value(self): """ Returns the value denoting "no data" for this variable. If this variable does not have a missing/fill value, returns None. If both _FillValue and missing_value are given, give precedence to _FillValue. The netCDF standard gives special meaning ...
[ "def", "_get_missing_value", "(", "self", ")", ":", "if", "'_FillValue'", "in", "self", ".", "_attributes", ":", "missing_value", "=", "self", ".", "_attributes", "[", "'_FillValue'", "]", "elif", "'missing_value'", "in", "self", ".", "_attributes", ":", "miss...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py2/scipy/io/netcdf.py#L1047-L1065
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_core.py
python
Window.MacIsWindowScrollbar
(*args, **kwargs)
return _core_.Window_MacIsWindowScrollbar(*args, **kwargs)
MacIsWindowScrollbar(self, Window sb) -> bool
MacIsWindowScrollbar(self, Window sb) -> bool
[ "MacIsWindowScrollbar", "(", "self", "Window", "sb", ")", "-", ">", "bool" ]
def MacIsWindowScrollbar(*args, **kwargs): """MacIsWindowScrollbar(self, Window sb) -> bool""" return _core_.Window_MacIsWindowScrollbar(*args, **kwargs)
[ "def", "MacIsWindowScrollbar", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "Window_MacIsWindowScrollbar", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_core.py#L11333-L11335