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
limbo018/DREAMPlace
146c3b9fd003d1acd52c96d9fd02e3f0a05154e4
dreamplace/ops/dct/dct.py
python
dct
(x, expk, algorithm)
return output.view(x.size())
compute discrete cosine transformation, DCT II, using N-FFT or 2N-FFT yk = \sum_{n=0}^{N-1} x_n cos(pi/N*n*(k+1/2)) @param x sequence @param expk coefficients for post-processing @param algorithm algorithm type N | 2N
compute discrete cosine transformation, DCT II, using N-FFT or 2N-FFT yk = \sum_{n=0}^{N-1} x_n cos(pi/N*n*(k+1/2))
[ "compute", "discrete", "cosine", "transformation", "DCT", "II", "using", "N", "-", "FFT", "or", "2N", "-", "FFT", "yk", "=", "\\", "sum_", "{", "n", "=", "0", "}", "^", "{", "N", "-", "1", "}", "x_n", "cos", "(", "pi", "/", "N", "*", "n", "*"...
def dct(x, expk, algorithm): """compute discrete cosine transformation, DCT II, using N-FFT or 2N-FFT yk = \sum_{n=0}^{N-1} x_n cos(pi/N*n*(k+1/2)) @param x sequence @param expk coefficients for post-processing @param algorithm algorithm type N | 2N """ if x.is_cuda: if algorithm...
[ "def", "dct", "(", "x", ",", "expk", ",", "algorithm", ")", ":", "if", "x", ".", "is_cuda", ":", "if", "algorithm", "==", "'N'", ":", "output", "=", "dct_cuda", ".", "dct", "(", "x", ".", "view", "(", "[", "-", "1", ",", "x", ".", "size", "("...
https://github.com/limbo018/DREAMPlace/blob/146c3b9fd003d1acd52c96d9fd02e3f0a05154e4/dreamplace/ops/dct/dct.py#L21-L39
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py2/pandas/core/generic.py
python
NDFrame._convert
(self, datetime=False, numeric=False, timedelta=False, coerce=False, copy=True)
return self._constructor( self._data.convert(datetime=datetime, numeric=numeric, timedelta=timedelta, coerce=coerce, copy=copy)).__finalize__(self)
Attempt to infer better dtype for object columns Parameters ---------- datetime : boolean, default False If True, convert to date where possible. numeric : boolean, default False If True, attempt to convert to numbers (including strings), with unconve...
Attempt to infer better dtype for object columns
[ "Attempt", "to", "infer", "better", "dtype", "for", "object", "columns" ]
def _convert(self, datetime=False, numeric=False, timedelta=False, coerce=False, copy=True): """ Attempt to infer better dtype for object columns Parameters ---------- datetime : boolean, default False If True, convert to date where possible. ...
[ "def", "_convert", "(", "self", ",", "datetime", "=", "False", ",", "numeric", "=", "False", ",", "timedelta", "=", "False", ",", "coerce", "=", "False", ",", "copy", "=", "True", ")", ":", "return", "self", ".", "_constructor", "(", "self", ".", "_d...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py2/pandas/core/generic.py#L5821-L5850
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/idlelib/config.py
python
IdleConf.GetExtensions
(self, active_only=True, editor_only=False, shell_only=False)
Return extensions in default and user config-extensions files. If active_only True, only return active (enabled) extensions and optionally only editor or shell extensions. If active_only False, return all extensions.
Return extensions in default and user config-extensions files.
[ "Return", "extensions", "in", "default", "and", "user", "config", "-", "extensions", "files", "." ]
def GetExtensions(self, active_only=True, editor_only=False, shell_only=False): """Return extensions in default and user config-extensions files. If active_only True, only return active (enabled) extensions and optionally only editor or shell extensions. If active_...
[ "def", "GetExtensions", "(", "self", ",", "active_only", "=", "True", ",", "editor_only", "=", "False", ",", "shell_only", "=", "False", ")", ":", "extns", "=", "self", ".", "RemoveKeyBindNames", "(", "self", ".", "GetSectionList", "(", "'default'", ",", "...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/idlelib/config.py#L412-L451
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py2/scipy/cluster/hierarchy.py
python
from_mlab_linkage
(Z)
return np.hstack([Zpart, CS.reshape(Zs[0], 1)])
Convert a linkage matrix generated by MATLAB(TM) to a new linkage matrix compatible with this module. The conversion does two things: * the indices are converted from ``1..N`` to ``0..(N-1)`` form, and * a fourth column ``Z[:,3]`` is added where ``Z[i,3]`` represents the number of ori...
Convert a linkage matrix generated by MATLAB(TM) to a new linkage matrix compatible with this module.
[ "Convert", "a", "linkage", "matrix", "generated", "by", "MATLAB", "(", "TM", ")", "to", "a", "new", "linkage", "matrix", "compatible", "with", "this", "module", "." ]
def from_mlab_linkage(Z): """ Convert a linkage matrix generated by MATLAB(TM) to a new linkage matrix compatible with this module. The conversion does two things: * the indices are converted from ``1..N`` to ``0..(N-1)`` form, and * a fourth column ``Z[:,3]`` is added where ``Z[i,3]...
[ "def", "from_mlab_linkage", "(", "Z", ")", ":", "Z", "=", "np", ".", "asarray", "(", "Z", ",", "dtype", "=", "np", ".", "double", ",", "order", "=", "'c'", ")", "Zs", "=", "Z", ".", "shape", "# If it's empty, return it.", "if", "len", "(", "Zs", ")...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py2/scipy/cluster/hierarchy.py#L1825-L1916
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/dataview.py
python
DataViewEvent.__init__
(self, *args, **kwargs)
__init__(self, EventType commandType=wxEVT_NULL, int winid=0) -> DataViewEvent
__init__(self, EventType commandType=wxEVT_NULL, int winid=0) -> DataViewEvent
[ "__init__", "(", "self", "EventType", "commandType", "=", "wxEVT_NULL", "int", "winid", "=", "0", ")", "-", ">", "DataViewEvent" ]
def __init__(self, *args, **kwargs): """__init__(self, EventType commandType=wxEVT_NULL, int winid=0) -> DataViewEvent""" _dataview.DataViewEvent_swiginit(self,_dataview.new_DataViewEvent(*args, **kwargs))
[ "def", "__init__", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "_dataview", ".", "DataViewEvent_swiginit", "(", "self", ",", "_dataview", ".", "new_DataViewEvent", "(", "*", "args", ",", "*", "*", "kwargs", ")", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/dataview.py#L1896-L1898
chuckcho/video-caffe
fc232b3e3a90ea22dd041b9fc5c542f170581f20
scripts/cpp_lint.py
python
_NestingState.InNamespaceBody
(self)
return self.stack and isinstance(self.stack[-1], _NamespaceInfo)
Check if we are currently one level inside a namespace body. Returns: True if top of the stack is a namespace block, False otherwise.
Check if we are currently one level inside a namespace body.
[ "Check", "if", "we", "are", "currently", "one", "level", "inside", "a", "namespace", "body", "." ]
def InNamespaceBody(self): """Check if we are currently one level inside a namespace body. Returns: True if top of the stack is a namespace block, False otherwise. """ return self.stack and isinstance(self.stack[-1], _NamespaceInfo)
[ "def", "InNamespaceBody", "(", "self", ")", ":", "return", "self", ".", "stack", "and", "isinstance", "(", "self", ".", "stack", "[", "-", "1", "]", ",", "_NamespaceInfo", ")" ]
https://github.com/chuckcho/video-caffe/blob/fc232b3e3a90ea22dd041b9fc5c542f170581f20/scripts/cpp_lint.py#L1946-L1952
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/fsspec/implementations/webhdfs.py
python
WebHDFile._initiate_upload
(self)
Create remote file/upload
Create remote file/upload
[ "Create", "remote", "file", "/", "upload" ]
def _initiate_upload(self): """ Create remote file/upload """ if "a" in self.mode: op, method = "APPEND", "POST" else: op, method = "CREATE", "PUT" if self.fs.exists(self.path): # no "truncate" or "create empty" self.fs.rm(self....
[ "def", "_initiate_upload", "(", "self", ")", ":", "if", "\"a\"", "in", "self", ".", "mode", ":", "op", ",", "method", "=", "\"APPEND\"", ",", "\"POST\"", "else", ":", "op", ",", "method", "=", "\"CREATE\"", ",", "\"PUT\"", "if", "self", ".", "fs", "....
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/fsspec/implementations/webhdfs.py#L359-L374
arangodb/arangodb
0d658689c7d1b721b314fa3ca27d38303e1570c8
3rdParty/V8/v7.9.317/third_party/jinja2/bccache.py
python
BytecodeCache.dump_bytecode
(self, bucket)
Subclasses have to override this method to write the bytecode from a bucket back to the cache. If it unable to do so it must not fail silently but raise an exception.
Subclasses have to override this method to write the bytecode from a bucket back to the cache. If it unable to do so it must not fail silently but raise an exception.
[ "Subclasses", "have", "to", "override", "this", "method", "to", "write", "the", "bytecode", "from", "a", "bucket", "back", "to", "the", "cache", ".", "If", "it", "unable", "to", "do", "so", "it", "must", "not", "fail", "silently", "but", "raise", "an", ...
def dump_bytecode(self, bucket): """Subclasses have to override this method to write the bytecode from a bucket back to the cache. If it unable to do so it must not fail silently but raise an exception. """ raise NotImplementedError()
[ "def", "dump_bytecode", "(", "self", ",", "bucket", ")", ":", "raise", "NotImplementedError", "(", ")" ]
https://github.com/arangodb/arangodb/blob/0d658689c7d1b721b314fa3ca27d38303e1570c8/3rdParty/V8/v7.9.317/third_party/jinja2/bccache.py#L153-L158
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/richtext.py
python
RichTextCtrl.MoveHome
(*args, **kwargs)
return _richtext.RichTextCtrl_MoveHome(*args, **kwargs)
MoveHome(self, int flags=0) -> bool Move to the start of the buffer
MoveHome(self, int flags=0) -> bool
[ "MoveHome", "(", "self", "int", "flags", "=", "0", ")", "-", ">", "bool" ]
def MoveHome(*args, **kwargs): """ MoveHome(self, int flags=0) -> bool Move to the start of the buffer """ return _richtext.RichTextCtrl_MoveHome(*args, **kwargs)
[ "def", "MoveHome", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_richtext", ".", "RichTextCtrl_MoveHome", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/richtext.py#L3788-L3794
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_windows.py
python
PageSetupDialog.GetPageSetupData
(*args, **kwargs)
return _windows_.PageSetupDialog_GetPageSetupData(*args, **kwargs)
GetPageSetupData(self) -> PageSetupDialogData
GetPageSetupData(self) -> PageSetupDialogData
[ "GetPageSetupData", "(", "self", ")", "-", ">", "PageSetupDialogData" ]
def GetPageSetupData(*args, **kwargs): """GetPageSetupData(self) -> PageSetupDialogData""" return _windows_.PageSetupDialog_GetPageSetupData(*args, **kwargs)
[ "def", "GetPageSetupData", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_windows_", ".", "PageSetupDialog_GetPageSetupData", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_windows.py#L5020-L5022
keyboardio/Kaleidoscope
d59604e98b2439d108647f15be52984a6837d360
bin/cpplint.py
python
FindNextMultiLineCommentEnd
(lines, lineix)
return len(lines)
We are inside a comment, find the end marker.
We are inside a comment, find the end marker.
[ "We", "are", "inside", "a", "comment", "find", "the", "end", "marker", "." ]
def FindNextMultiLineCommentEnd(lines, lineix): """We are inside a comment, find the end marker.""" while lineix < len(lines): if lines[lineix].strip().endswith('*/'): return lineix lineix += 1 return len(lines)
[ "def", "FindNextMultiLineCommentEnd", "(", "lines", ",", "lineix", ")", ":", "while", "lineix", "<", "len", "(", "lines", ")", ":", "if", "lines", "[", "lineix", "]", ".", "strip", "(", ")", ".", "endswith", "(", "'*/'", ")", ":", "return", "lineix", ...
https://github.com/keyboardio/Kaleidoscope/blob/d59604e98b2439d108647f15be52984a6837d360/bin/cpplint.py#L1591-L1597
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/App/FreeCADInit.py
python
FCADLogger.isEnabledFor
(self,level)
return self._isEnabledFor(level)
To check for an integer or text log level. * level: integer or text log level
To check for an integer or text log level.
[ "To", "check", "for", "an", "integer", "or", "text", "log", "level", "." ]
def isEnabledFor(self,level): '''To check for an integer or text log level. * level: integer or text log level ''' if not isinstance(level,int): level = self.__class__._levels[level] return self._isEnabledFor(level)
[ "def", "isEnabledFor", "(", "self", ",", "level", ")", ":", "if", "not", "isinstance", "(", "level", ",", "int", ")", ":", "level", "=", "self", ".", "__class__", ".", "_levels", "[", "level", "]", "return", "self", ".", "_isEnabledFor", "(", "level", ...
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/App/FreeCADInit.py#L388-L395
zhuli19901106/leetcode-zhuli
0f8fc29ccb8c33ea91149ecb2d4e961024c11db7
algorithms/0501-1000/0981_time-based-key-value-store_1_AC.py
python
TimeMap.__init__
(self)
Initialize your data structure here.
Initialize your data structure here.
[ "Initialize", "your", "data", "structure", "here", "." ]
def __init__(self): """ Initialize your data structure here. """ self.ds = {}
[ "def", "__init__", "(", "self", ")", ":", "self", ".", "ds", "=", "{", "}" ]
https://github.com/zhuli19901106/leetcode-zhuli/blob/0f8fc29ccb8c33ea91149ecb2d4e961024c11db7/algorithms/0501-1000/0981_time-based-key-value-store_1_AC.py#L7-L11
BTCPrivate/BTCP-Rebase
c8c7fe6ac26b6fba71eae1c89cdc0d924f5c6d82
contrib/devtools/update-translations.py
python
sanitize_string
(s)
return s.replace('\n',' ')
Sanitize string for printing
Sanitize string for printing
[ "Sanitize", "string", "for", "printing" ]
def sanitize_string(s): '''Sanitize string for printing''' return s.replace('\n',' ')
[ "def", "sanitize_string", "(", "s", ")", ":", "return", "s", ".", "replace", "(", "'\\n'", ",", "' '", ")" ]
https://github.com/BTCPrivate/BTCP-Rebase/blob/c8c7fe6ac26b6fba71eae1c89cdc0d924f5c6d82/contrib/devtools/update-translations.py#L80-L82
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/plat-mac/pimp.py
python
main
()
Minimal commandline tool to drive pimp.
Minimal commandline tool to drive pimp.
[ "Minimal", "commandline", "tool", "to", "drive", "pimp", "." ]
def main(): """Minimal commandline tool to drive pimp.""" import getopt def _help(): print "Usage: pimp [options] -s [package ...] List installed status" print " pimp [options] -l [package ...] Show package information" print " pimp [options] -i package ... Install ...
[ "def", "main", "(", ")", ":", "import", "getopt", "def", "_help", "(", ")", ":", "print", "\"Usage: pimp [options] -s [package ...] List installed status\"", "print", "\" pimp [options] -l [package ...] Show package information\"", "print", "\" pimp [options] -i packa...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/plat-mac/pimp.py#L1095-L1162
klzgrad/naiveproxy
ed2c513637c77b18721fe428d7ed395b4d284c83
src/build/config/apple/sdk_info.py
python
FillXcodeVersion
(settings, developer_dir)
Fills the Xcode version and build number into |settings|.
Fills the Xcode version and build number into |settings|.
[ "Fills", "the", "Xcode", "version", "and", "build", "number", "into", "|settings|", "." ]
def FillXcodeVersion(settings, developer_dir): """Fills the Xcode version and build number into |settings|.""" if developer_dir: xcode_version_plist_path = os.path.join(developer_dir, 'Contents/version.plist') version_plist = LoadPList(xcode_version_plist_path) ...
[ "def", "FillXcodeVersion", "(", "settings", ",", "developer_dir", ")", ":", "if", "developer_dir", ":", "xcode_version_plist_path", "=", "os", ".", "path", ".", "join", "(", "developer_dir", ",", "'Contents/version.plist'", ")", "version_plist", "=", "LoadPList", ...
https://github.com/klzgrad/naiveproxy/blob/ed2c513637c77b18721fe428d7ed395b4d284c83/src/build/config/apple/sdk_info.py#L68-L84
apple/swift-lldb
d74be846ef3e62de946df343e8c234bde93a8912
scripts/Python/static-binding/lldb.py
python
SBType.GetVectorElementType
(self)
return _lldb.SBType_GetVectorElementType(self)
GetVectorElementType(SBType self) -> SBType
GetVectorElementType(SBType self) -> SBType
[ "GetVectorElementType", "(", "SBType", "self", ")", "-", ">", "SBType" ]
def GetVectorElementType(self): """GetVectorElementType(SBType self) -> SBType""" return _lldb.SBType_GetVectorElementType(self)
[ "def", "GetVectorElementType", "(", "self", ")", ":", "return", "_lldb", ".", "SBType_GetVectorElementType", "(", "self", ")" ]
https://github.com/apple/swift-lldb/blob/d74be846ef3e62de946df343e8c234bde93a8912/scripts/Python/static-binding/lldb.py#L12712-L12714
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/io/pytables.py
python
read_hdf
( path_or_buf, key=None, mode: str = "r", errors: str = "strict", where=None, start: Optional[int] = None, stop: Optional[int] = None, columns=None, iterator=False, chunksize: Optional[int] = None, **kwargs, )
Read from the store, close it if we opened it. Retrieve pandas object stored in file, optionally based on where criteria Parameters ---------- path_or_buf : str, path object, pandas.HDFStore or file-like object Any valid string path is acceptable. The string could be a URL. Valid U...
Read from the store, close it if we opened it.
[ "Read", "from", "the", "store", "close", "it", "if", "we", "opened", "it", "." ]
def read_hdf( path_or_buf, key=None, mode: str = "r", errors: str = "strict", where=None, start: Optional[int] = None, stop: Optional[int] = None, columns=None, iterator=False, chunksize: Optional[int] = None, **kwargs, ): """ Read from the store, close it if we opene...
[ "def", "read_hdf", "(", "path_or_buf", ",", "key", "=", "None", ",", "mode", ":", "str", "=", "\"r\"", ",", "errors", ":", "str", "=", "\"strict\"", ",", "where", "=", "None", ",", "start", ":", "Optional", "[", "int", "]", "=", "None", ",", "stop"...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/io/pytables.py#L287-L438
htcondor/htcondor
4829724575176d1d6c936e4693dfd78a728569b0
bindings/python/htcondor/compat_enum/__init__.py
python
unique
(enumeration)
return enumeration
Class decorator that ensures only unique members exist in an enumeration.
Class decorator that ensures only unique members exist in an enumeration.
[ "Class", "decorator", "that", "ensures", "only", "unique", "members", "exist", "in", "an", "enumeration", "." ]
def unique(enumeration): """Class decorator that ensures only unique members exist in an enumeration.""" duplicates = [] for name, member in enumeration.__members__.items(): if name != member.name: duplicates.append((name, member.name)) if duplicates: duplicate_names = ', '.j...
[ "def", "unique", "(", "enumeration", ")", ":", "duplicates", "=", "[", "]", "for", "name", ",", "member", "in", "enumeration", ".", "__members__", ".", "items", "(", ")", ":", "if", "name", "!=", "member", ".", "name", ":", "duplicates", ".", "append",...
https://github.com/htcondor/htcondor/blob/4829724575176d1d6c936e4693dfd78a728569b0/bindings/python/htcondor/compat_enum/__init__.py#L825-L838
moflow/moflow
2dfb27c799c90c6caf1477508eca3eec616ef7d2
bap/libtracewrap/libtrace/protobuf/python/google/protobuf/internal/decoder.py
python
MessageDecoder
(field_number, is_repeated, is_packed, key, new_default)
Returns a decoder for a message field.
Returns a decoder for a message field.
[ "Returns", "a", "decoder", "for", "a", "message", "field", "." ]
def MessageDecoder(field_number, is_repeated, is_packed, key, new_default): """Returns a decoder for a message field.""" local_DecodeVarint = _DecodeVarint assert not is_packed if is_repeated: tag_bytes = encoder.TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED...
[ "def", "MessageDecoder", "(", "field_number", ",", "is_repeated", ",", "is_packed", ",", "key", ",", "new_default", ")", ":", "local_DecodeVarint", "=", "_DecodeVarint", "assert", "not", "is_packed", "if", "is_repeated", ":", "tag_bytes", "=", "encoder", ".", "T...
https://github.com/moflow/moflow/blob/2dfb27c799c90c6caf1477508eca3eec616ef7d2/bap/libtracewrap/libtrace/protobuf/python/google/protobuf/internal/decoder.py#L499-L549
Slicer/Slicer
ba9fadf332cb0303515b68d8d06a344c82e3e3e5
Modules/Loadable/Annotations/SubjectHierarchyPlugins/AnnotationsSubjectHierarchyPlugin.py
python
AnnotationsSubjectHierarchyPlugin.viewContextMenuActions
(self)
return []
Important note: In order to use view menus in scripted plugins, it needs to be registered differently, so that the Python API can be fully built by the time this function is called. The following changes are necessary: 1. Remove or comment out the following line from constructor ...
Important note: In order to use view menus in scripted plugins, it needs to be registered differently, so that the Python API can be fully built by the time this function is called.
[ "Important", "note", ":", "In", "order", "to", "use", "view", "menus", "in", "scripted", "plugins", "it", "needs", "to", "be", "registered", "differently", "so", "that", "the", "Python", "API", "can", "be", "fully", "built", "by", "the", "time", "this", ...
def viewContextMenuActions(self): """ Important note: In order to use view menus in scripted plugins, it needs to be registered differently, so that the Python API can be fully built by the time this function is called. The following changes are necessary: 1. Remove or comment out t...
[ "def", "viewContextMenuActions", "(", "self", ")", ":", "return", "[", "]" ]
https://github.com/Slicer/Slicer/blob/ba9fadf332cb0303515b68d8d06a344c82e3e3e5/Modules/Loadable/Annotations/SubjectHierarchyPlugins/AnnotationsSubjectHierarchyPlugin.py#L95-L108
turi-code/SFrame
796b9bdfb2fa1b881d82080754643c7e68629cd2
oss_src/unity/python/sframe/data_structures/image.py
python
Image.height
(self)
return self._height
Returns the height of the image stored in the Image object. Returns ------- out : int The height of the image stored in the Image object. See Also -------- width, channels, pixel_data Examples -------- >>> img = graphlab.Image('http...
Returns the height of the image stored in the Image object.
[ "Returns", "the", "height", "of", "the", "image", "stored", "in", "the", "Image", "object", "." ]
def height(self): """ Returns the height of the image stored in the Image object. Returns ------- out : int The height of the image stored in the Image object. See Also -------- width, channels, pixel_data Examples -------- ...
[ "def", "height", "(", "self", ")", ":", "return", "self", ".", "_height" ]
https://github.com/turi-code/SFrame/blob/796b9bdfb2fa1b881d82080754643c7e68629cd2/oss_src/unity/python/sframe/data_structures/image.py#L80-L100
eclipse/sumo
7132a9b8b6eea734bdec38479026b4d8c4336d03
tools/traci/_busstop.py
python
BusStopDomain.getName
(self, stopID)
return self._getUniversal(tc.VAR_NAME, stopID)
getName(string) -> string Returns the name of this stop
getName(string) -> string
[ "getName", "(", "string", ")", "-", ">", "string" ]
def getName(self, stopID): """getName(string) -> string Returns the name of this stop """ return self._getUniversal(tc.VAR_NAME, stopID)
[ "def", "getName", "(", "self", ",", "stopID", ")", ":", "return", "self", ".", "_getUniversal", "(", "tc", ".", "VAR_NAME", ",", "stopID", ")" ]
https://github.com/eclipse/sumo/blob/7132a9b8b6eea734bdec38479026b4d8c4336d03/tools/traci/_busstop.py#L50-L55
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
chrome/common/extensions/docs/server2/availability_finder.py
python
AvailabilityFinder._GetApiSchema
(self, api_name, file_system, version)
return matching_schemas or None
Searches |file_system| for |api_name|'s API schema data, and processes and returns it if found.
Searches |file_system| for |api_name|'s API schema data, and processes and returns it if found.
[ "Searches", "|file_system|", "for", "|api_name|", "s", "API", "schema", "data", "and", "processes", "and", "returns", "it", "if", "found", "." ]
def _GetApiSchema(self, api_name, file_system, version): '''Searches |file_system| for |api_name|'s API schema data, and processes and returns it if found. ''' api_filename = self._GetApiSchemaFilename(api_name, file_system, version) if api_filename is None: # No file for the API could be foun...
[ "def", "_GetApiSchema", "(", "self", ",", "api_name", ",", "file_system", ",", "version", ")", ":", "api_filename", "=", "self", ".", "_GetApiSchemaFilename", "(", "api_name", ",", "file_system", ",", "version", ")", "if", "api_filename", "is", "None", ":", ...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/chrome/common/extensions/docs/server2/availability_finder.py#L117-L133
pytorch/pytorch
7176c92687d3cc847cc046bf002269c6949a21c2
torch/multiprocessing/pool.py
python
Pool._repopulate_pool
(self)
Bring the number of pool processes up to the specified number, for use after reaping workers which have exited.
Bring the number of pool processes up to the specified number, for use after reaping workers which have exited.
[ "Bring", "the", "number", "of", "pool", "processes", "up", "to", "the", "specified", "number", "for", "use", "after", "reaping", "workers", "which", "have", "exited", "." ]
def _repopulate_pool(self): """Bring the number of pool processes up to the specified number, for use after reaping workers which have exited. """ for i in range(self._processes - len(self._pool)): # changed worker -> clean_worker args = (self._inqueue, self._outq...
[ "def", "_repopulate_pool", "(", "self", ")", ":", "for", "i", "in", "range", "(", "self", ".", "_processes", "-", "len", "(", "self", ".", "_pool", ")", ")", ":", "# changed worker -> clean_worker", "args", "=", "(", "self", ".", "_inqueue", ",", "self",...
https://github.com/pytorch/pytorch/blob/7176c92687d3cc847cc046bf002269c6949a21c2/torch/multiprocessing/pool.py#L27-L43
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_windows.py
python
VarScrollHelperBase.EnablePhysicalScrolling
(*args, **kwargs)
return _windows_.VarScrollHelperBase_EnablePhysicalScrolling(*args, **kwargs)
EnablePhysicalScrolling(self, bool scrolling=True)
EnablePhysicalScrolling(self, bool scrolling=True)
[ "EnablePhysicalScrolling", "(", "self", "bool", "scrolling", "=", "True", ")" ]
def EnablePhysicalScrolling(*args, **kwargs): """EnablePhysicalScrolling(self, bool scrolling=True)""" return _windows_.VarScrollHelperBase_EnablePhysicalScrolling(*args, **kwargs)
[ "def", "EnablePhysicalScrolling", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_windows_", ".", "VarScrollHelperBase_EnablePhysicalScrolling", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_windows.py#L2206-L2208
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_core.py
python
MenuBar.IsAttached
(*args, **kwargs)
return _core_.MenuBar_IsAttached(*args, **kwargs)
IsAttached(self) -> bool
IsAttached(self) -> bool
[ "IsAttached", "(", "self", ")", "-", ">", "bool" ]
def IsAttached(*args, **kwargs): """IsAttached(self) -> bool""" return _core_.MenuBar_IsAttached(*args, **kwargs)
[ "def", "IsAttached", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "MenuBar_IsAttached", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_core.py#L12367-L12369
apple/swift-clang
d7403439fc6641751840b723e7165fb02f52db95
tools/scan-build-py/libscanbuild/intercept.py
python
format_entry
(exec_trace)
Generate the desired fields for compilation database entries.
Generate the desired fields for compilation database entries.
[ "Generate", "the", "desired", "fields", "for", "compilation", "database", "entries", "." ]
def format_entry(exec_trace): """ Generate the desired fields for compilation database entries. """ def abspath(cwd, name): """ Create normalized absolute path from input filename. """ fullname = name if os.path.isabs(name) else os.path.join(cwd, name) return os.path.normpath(fullname) ...
[ "def", "format_entry", "(", "exec_trace", ")", ":", "def", "abspath", "(", "cwd", ",", "name", ")", ":", "\"\"\" Create normalized absolute path from input filename. \"\"\"", "fullname", "=", "name", "if", "os", ".", "path", ".", "isabs", "(", "name", ")", "else...
https://github.com/apple/swift-clang/blob/d7403439fc6641751840b723e7165fb02f52db95/tools/scan-build-py/libscanbuild/intercept.py#L204-L223
GJDuck/LowFat
ecf6a0f0fa1b73a27a626cf493cc39e477b6faea
llvm-4.0.0.src/examples/Kaleidoscope/MCJIT/complete/genk-timing.py
python
TimingScriptGenerator.writeTimingCall
(self, filename, numFuncs, funcsCalled, totalCalls)
Echo some comments and invoke both versions of toy
Echo some comments and invoke both versions of toy
[ "Echo", "some", "comments", "and", "invoke", "both", "versions", "of", "toy" ]
def writeTimingCall(self, filename, numFuncs, funcsCalled, totalCalls): """Echo some comments and invoke both versions of toy""" rootname = filename if '.' in filename: rootname = filename[:filename.rfind('.')] self.shfile.write("echo \"%s: Calls %d of %d functions, %d total\...
[ "def", "writeTimingCall", "(", "self", ",", "filename", ",", "numFuncs", ",", "funcsCalled", ",", "totalCalls", ")", ":", "rootname", "=", "filename", "if", "'.'", "in", "filename", ":", "rootname", "=", "filename", "[", ":", "filename", ".", "rfind", "(",...
https://github.com/GJDuck/LowFat/blob/ecf6a0f0fa1b73a27a626cf493cc39e477b6faea/llvm-4.0.0.src/examples/Kaleidoscope/MCJIT/complete/genk-timing.py#L13-L35
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py3/pandas/io/common.py
python
stringify_path
( filepath_or_buffer: FilePathOrBuffer[AnyStr], convert_file_like: bool = False, )
return _expand_user(filepath_or_buffer)
Attempt to convert a path-like object to a string. Parameters ---------- filepath_or_buffer : object to be converted Returns ------- str_filepath_or_buffer : maybe a string version of the object Notes ----- Objects supporting the fspath protocol (python 3.6+) are coerced accor...
Attempt to convert a path-like object to a string.
[ "Attempt", "to", "convert", "a", "path", "-", "like", "object", "to", "a", "string", "." ]
def stringify_path( filepath_or_buffer: FilePathOrBuffer[AnyStr], convert_file_like: bool = False, ) -> FileOrBuffer[AnyStr]: """ Attempt to convert a path-like object to a string. Parameters ---------- filepath_or_buffer : object to be converted Returns ------- str_filepath_or...
[ "def", "stringify_path", "(", "filepath_or_buffer", ":", "FilePathOrBuffer", "[", "AnyStr", "]", ",", "convert_file_like", ":", "bool", "=", "False", ",", ")", "->", "FileOrBuffer", "[", "AnyStr", "]", ":", "if", "not", "convert_file_like", "and", "is_file_like"...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/io/common.py#L171-L202
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/klampt/src/robotsim.py
python
RobotModelDriver.getVelocity
(self)
return _robotsim.RobotModelDriver_getVelocity(self)
r""" getVelocity(RobotModelDriver self) -> double Returns the current driver velocity value from the robot's velocity.
r""" getVelocity(RobotModelDriver self) -> double
[ "r", "getVelocity", "(", "RobotModelDriver", "self", ")", "-", ">", "double" ]
def getVelocity(self) -> "double": r""" getVelocity(RobotModelDriver self) -> double Returns the current driver velocity value from the robot's velocity. """ return _robotsim.RobotModelDriver_getVelocity(self)
[ "def", "getVelocity", "(", "self", ")", "->", "\"double\"", ":", "return", "_robotsim", ".", "RobotModelDriver_getVelocity", "(", "self", ")" ]
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/klampt/src/robotsim.py#L4697-L4705
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/aui.py
python
PreAuiMDIClientWindow
(*args, **kwargs)
return val
PreAuiMDIClientWindow() -> AuiMDIClientWindow
PreAuiMDIClientWindow() -> AuiMDIClientWindow
[ "PreAuiMDIClientWindow", "()", "-", ">", "AuiMDIClientWindow" ]
def PreAuiMDIClientWindow(*args, **kwargs): """PreAuiMDIClientWindow() -> AuiMDIClientWindow""" val = _aui.new_PreAuiMDIClientWindow(*args, **kwargs) val._setOORInfo(val) return val
[ "def", "PreAuiMDIClientWindow", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "val", "=", "_aui", ".", "new_PreAuiMDIClientWindow", "(", "*", "args", ",", "*", "*", "kwargs", ")", "val", ".", "_setOORInfo", "(", "val", ")", "return", "val" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/aui.py#L1649-L1653
SpaceNetChallenge/BuildingDetectors
3def3c44b5847c744cd2f3356182892d92496579
qinhaifang/src/caffe-mnc/scripts/cpp_lint.py
python
FileInfo.IsSource
(self)
return self.Extension()[1:] in ('c', 'cc', 'cpp', 'cxx')
File has a source file extension.
File has a source file extension.
[ "File", "has", "a", "source", "file", "extension", "." ]
def IsSource(self): """File has a source file extension.""" return self.Extension()[1:] in ('c', 'cc', 'cpp', 'cxx')
[ "def", "IsSource", "(", "self", ")", ":", "return", "self", ".", "Extension", "(", ")", "[", "1", ":", "]", "in", "(", "'c'", ",", "'cc'", ",", "'cpp'", ",", "'cxx'", ")" ]
https://github.com/SpaceNetChallenge/BuildingDetectors/blob/3def3c44b5847c744cd2f3356182892d92496579/qinhaifang/src/caffe-mnc/scripts/cpp_lint.py#L956-L958
manutdzou/KITTI_SSD
5b620c2f291d36a0fe14489214f22a992f173f44
examples/pycaffe/layers/pascal_multilabel_datalayers.py
python
PascalMultilabelDataLayerSync.backward
(self, top, propagate_down, bottom)
These layers does not back propagate
These layers does not back propagate
[ "These", "layers", "does", "not", "back", "propagate" ]
def backward(self, top, propagate_down, bottom): """ These layers does not back propagate """ pass
[ "def", "backward", "(", "self", ",", "top", ",", "propagate_down", ",", "bottom", ")", ":", "pass" ]
https://github.com/manutdzou/KITTI_SSD/blob/5b620c2f291d36a0fe14489214f22a992f173f44/examples/pycaffe/layers/pascal_multilabel_datalayers.py#L74-L78
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/perf_insights/third_party/cloudstorage/common.py
python
validate_bucket_name
(name)
Validate a Google Storage bucket name. Args: name: a Google Storage bucket name with no prefix or suffix. Raises: ValueError: if name is invalid.
Validate a Google Storage bucket name.
[ "Validate", "a", "Google", "Storage", "bucket", "name", "." ]
def validate_bucket_name(name): """Validate a Google Storage bucket name. Args: name: a Google Storage bucket name with no prefix or suffix. Raises: ValueError: if name is invalid. """ _validate_path(name) if not _GCS_BUCKET_REGEX.match(name): raise ValueError('Bucket should be 3-63 characters...
[ "def", "validate_bucket_name", "(", "name", ")", ":", "_validate_path", "(", "name", ")", "if", "not", "_GCS_BUCKET_REGEX", ".", "match", "(", "name", ")", ":", "raise", "ValueError", "(", "'Bucket should be 3-63 characters long using only a-z,'", "'0-9, underscore, das...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/perf_insights/third_party/cloudstorage/common.py#L201-L213
vmware/concord-bft
ec036a384b4c81be0423d4b429bd37900b13b864
util/pyclient/bft_client.py
python
BftClient.__enter__
(self)
Context manager method for 'with' statements
Context manager method for 'with' statements
[ "Context", "manager", "method", "for", "with", "statements" ]
def __enter__(self): """ Context manager method for 'with' statements """ pass
[ "def", "__enter__", "(", "self", ")", ":", "pass" ]
https://github.com/vmware/concord-bft/blob/ec036a384b4c81be0423d4b429bd37900b13b864/util/pyclient/bft_client.py#L102-L104
happynear/caffe-windows
967eedf25009e334b7f6f933bb5e17aaaff5bef6
examples/pycaffe/tools.py
python
CaffeSolver.add_from_file
(self, filepath)
Reads a caffe solver prototxt file and updates the Caffesolver instance parameters.
Reads a caffe solver prototxt file and updates the Caffesolver instance parameters.
[ "Reads", "a", "caffe", "solver", "prototxt", "file", "and", "updates", "the", "Caffesolver", "instance", "parameters", "." ]
def add_from_file(self, filepath): """ Reads a caffe solver prototxt file and updates the Caffesolver instance parameters. """ with open(filepath, 'r') as f: for line in f: if line[0] == '#': continue splitLine = lin...
[ "def", "add_from_file", "(", "self", ",", "filepath", ")", ":", "with", "open", "(", "filepath", ",", "'r'", ")", "as", "f", ":", "for", "line", "in", "f", ":", "if", "line", "[", "0", "]", "==", "'#'", ":", "continue", "splitLine", "=", "line", ...
https://github.com/happynear/caffe-windows/blob/967eedf25009e334b7f6f933bb5e17aaaff5bef6/examples/pycaffe/tools.py#L101-L111
vicaya/hypertable
e7386f799c238c109ae47973417c2a2c7f750825
src/py/ThriftClient/gen-py/hyperthrift/gen/ClientService.py
python
Iface.get_row_as_arrays
(self, name, row)
Alternative interface using array as cell Parameters: - name - row
Alternative interface using array as cell Parameters: - name - row
[ "Alternative", "interface", "using", "array", "as", "cell", "Parameters", ":", "-", "name", "-", "row" ]
def get_row_as_arrays(self, name, row): """ Alternative interface using array as cell Parameters: - name - row """ pass
[ "def", "get_row_as_arrays", "(", "self", ",", "name", ",", "row", ")", ":", "pass" ]
https://github.com/vicaya/hypertable/blob/e7386f799c238c109ae47973417c2a2c7f750825/src/py/ThriftClient/gen-py/hyperthrift/gen/ClientService.py#L120-L128
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/core/defchararray.py
python
isalnum
(a)
return _vec_string(a, bool_, 'isalnum')
Returns true for each element if all characters in the string are alphanumeric and there is at least one character, false otherwise. Calls `str.isalnum` element-wise. For 8-bit strings, this method is locale-dependent. Parameters ---------- a : array_like of str or unicode Returns --...
Returns true for each element if all characters in the string are alphanumeric and there is at least one character, false otherwise.
[ "Returns", "true", "for", "each", "element", "if", "all", "characters", "in", "the", "string", "are", "alphanumeric", "and", "there", "is", "at", "least", "one", "character", "false", "otherwise", "." ]
def isalnum(a): """ Returns true for each element if all characters in the string are alphanumeric and there is at least one character, false otherwise. Calls `str.isalnum` element-wise. For 8-bit strings, this method is locale-dependent. Parameters ---------- a : array_like of str or...
[ "def", "isalnum", "(", "a", ")", ":", "return", "_vec_string", "(", "a", ",", "bool_", ",", "'isalnum'", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/core/defchararray.py#L755-L777
intel/llvm
e6d0547e9d99b5a56430c4749f6c7e328bf221ab
clang/bindings/python/clang/cindex.py
python
Cursor.result_type
(self)
return self._result_type
Retrieve the Type of the result for this Cursor.
Retrieve the Type of the result for this Cursor.
[ "Retrieve", "the", "Type", "of", "the", "result", "for", "this", "Cursor", "." ]
def result_type(self): """Retrieve the Type of the result for this Cursor.""" if not hasattr(self, '_result_type'): self._result_type = conf.lib.clang_getCursorResultType(self) return self._result_type
[ "def", "result_type", "(", "self", ")", ":", "if", "not", "hasattr", "(", "self", ",", "'_result_type'", ")", ":", "self", ".", "_result_type", "=", "conf", ".", "lib", ".", "clang_getCursorResultType", "(", "self", ")", "return", "self", ".", "_result_typ...
https://github.com/intel/llvm/blob/e6d0547e9d99b5a56430c4749f6c7e328bf221ab/clang/bindings/python/clang/cindex.py#L1668-L1673
toggl-open-source/toggldesktop
91865205885531cc8fd9e8d613dad49d625d56e7
third_party/cpplint/cpplint.py
python
GetIndentLevel
(line)
Return the number of leading spaces in line. Args: line: A string to check. Returns: An integer count of leading spaces, possibly zero.
Return the number of leading spaces in line.
[ "Return", "the", "number", "of", "leading", "spaces", "in", "line", "." ]
def GetIndentLevel(line): """Return the number of leading spaces in line. Args: line: A string to check. Returns: An integer count of leading spaces, possibly zero. """ indent = Match(r'^( *)\S', line) if indent: return len(indent.group(1)) else: return 0
[ "def", "GetIndentLevel", "(", "line", ")", ":", "indent", "=", "Match", "(", "r'^( *)\\S'", ",", "line", ")", "if", "indent", ":", "return", "len", "(", "indent", ".", "group", "(", "1", ")", ")", "else", ":", "return", "0" ]
https://github.com/toggl-open-source/toggldesktop/blob/91865205885531cc8fd9e8d613dad49d625d56e7/third_party/cpplint/cpplint.py#L1635-L1648
espressomd/espresso
7e29f9052e710fe1ebf0f5d2a8076b32921fbc6a
src/python/espressomd/rotation.py
python
diagonalized_inertia_tensor
(positions, masses)
return eig, eigv
Calculate the diagonalized inertia tensor with respect to the center of mass for given point masses at given positions. Parameters ---------- positions : (N,3) array_like of :obj:`float` Positions of the masses. masses : (N,) array_like of :obj:`float` Returns ------- (3,) ...
Calculate the diagonalized inertia tensor with respect to the center of mass for given point masses at given positions.
[ "Calculate", "the", "diagonalized", "inertia", "tensor", "with", "respect", "to", "the", "center", "of", "mass", "for", "given", "point", "masses", "at", "given", "positions", "." ]
def diagonalized_inertia_tensor(positions, masses): """ Calculate the diagonalized inertia tensor with respect to the center of mass for given point masses at given positions. Parameters ---------- positions : (N,3) array_like of :obj:`float` Positions of the masses. masses : (N...
[ "def", "diagonalized_inertia_tensor", "(", "positions", ",", "masses", ")", ":", "assert", "np", ".", "array", "(", "masses", ")", ".", "shape", "[", "0", "]", "==", "np", ".", "array", "(", "positions", ")", ".", "shape", "[", "0", "]", "def", "cent...
https://github.com/espressomd/espresso/blob/7e29f9052e710fe1ebf0f5d2a8076b32921fbc6a/src/python/espressomd/rotation.py#L105-L138
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/keras/utils/conv_utils.py
python
conv_input_length
(output_length, filter_size, padding, stride)
return (output_length - 1) * stride - 2 * pad + filter_size
Determines input length of a convolution given output length. Args: output_length: integer. filter_size: integer. padding: one of "same", "valid", "full". stride: integer. Returns: The input length (integer).
Determines input length of a convolution given output length.
[ "Determines", "input", "length", "of", "a", "convolution", "given", "output", "length", "." ]
def conv_input_length(output_length, filter_size, padding, stride): """Determines input length of a convolution given output length. Args: output_length: integer. filter_size: integer. padding: one of "same", "valid", "full". stride: integer. Returns: The input length (integer). ...
[ "def", "conv_input_length", "(", "output_length", ",", "filter_size", ",", "padding", ",", "stride", ")", ":", "if", "output_length", "is", "None", ":", "return", "None", "assert", "padding", "in", "{", "'same'", ",", "'valid'", ",", "'full'", "}", "if", "...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/keras/utils/conv_utils.py#L115-L136
snap-stanford/snap-python
d53c51b0a26aa7e3e7400b014cdf728948fde80a
setup/snap.py
python
TIntIntVH.BegI
(self)
return _snap.TIntIntVH_BegI(self)
BegI(TIntIntVH self) -> THash< TInt,TVec< TInt,int > >::TIter Parameters: self: THash< TInt,TVec< TInt,int > > const *
BegI(TIntIntVH self) -> THash< TInt,TVec< TInt,int > >::TIter
[ "BegI", "(", "TIntIntVH", "self", ")", "-", ">", "THash<", "TInt", "TVec<", "TInt", "int", ">", ">", "::", "TIter" ]
def BegI(self): """ BegI(TIntIntVH self) -> THash< TInt,TVec< TInt,int > >::TIter Parameters: self: THash< TInt,TVec< TInt,int > > const * """ return _snap.TIntIntVH_BegI(self)
[ "def", "BegI", "(", "self", ")", ":", "return", "_snap", ".", "TIntIntVH_BegI", "(", "self", ")" ]
https://github.com/snap-stanford/snap-python/blob/d53c51b0a26aa7e3e7400b014cdf728948fde80a/setup/snap.py#L17751-L17759
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/python/framework/ops.py
python
Graph.unique_name
(self, name, mark_as_used=True)
return name
Return a unique operation name for `name`. Note: You rarely need to call `unique_name()` directly. Most of the time you just need to create `with g.name_scope()` blocks to generate structured names. `unique_name` is used to generate structured names, separated by `"/"`, to help identify operation...
Return a unique operation name for `name`.
[ "Return", "a", "unique", "operation", "name", "for", "name", "." ]
def unique_name(self, name, mark_as_used=True): """Return a unique operation name for `name`. Note: You rarely need to call `unique_name()` directly. Most of the time you just need to create `with g.name_scope()` blocks to generate structured names. `unique_name` is used to generate structured na...
[ "def", "unique_name", "(", "self", ",", "name", ",", "mark_as_used", "=", "True", ")", ":", "if", "self", ".", "_name_stack", ":", "name", "=", "self", ".", "_name_stack", "+", "\"/\"", "+", "name", "i", "=", "self", ".", "_names_in_use", ".", "get", ...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/python/framework/ops.py#L3187-L3230
PaddlePaddle/Paddle
1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c
python/paddle/tensor/search.py
python
index_sample
(x, index)
return out
**IndexSample Layer** IndexSample OP returns the element of the specified location of X, and the location is specified by Index. .. code-block:: text Given: X = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]] Index = [[0, 1, 3], ...
**IndexSample Layer**
[ "**", "IndexSample", "Layer", "**" ]
def index_sample(x, index): """ **IndexSample Layer** IndexSample OP returns the element of the specified location of X, and the location is specified by Index. .. code-block:: text Given: X = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]] ...
[ "def", "index_sample", "(", "x", ",", "index", ")", ":", "if", "in_dygraph_mode", "(", ")", ":", "return", "_C_ops", ".", "index_sample", "(", "x", ",", "index", ")", "helper", "=", "LayerHelper", "(", "\"index_sample\"", ",", "*", "*", "locals", "(", ...
https://github.com/PaddlePaddle/Paddle/blob/1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c/python/paddle/tensor/search.py#L634-L722
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/inspect.py
python
ismethod
(object)
return isinstance(object, types.MethodType)
Return true if the object is an instance method. Instance method objects provide these attributes: __doc__ documentation string __name__ name with which this method was defined im_class class object in which this method belongs im_func function object c...
Return true if the object is an instance method.
[ "Return", "true", "if", "the", "object", "is", "an", "instance", "method", "." ]
def ismethod(object): """Return true if the object is an instance method. Instance method objects provide these attributes: __doc__ documentation string __name__ name with which this method was defined im_class class object in which this method belongs im_f...
[ "def", "ismethod", "(", "object", ")", ":", "return", "isinstance", "(", "object", ",", "types", ".", "MethodType", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/inspect.py#L67-L76
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib-tk/Tkinter.py
python
Misc.after_cancel
(self, id)
Cancel scheduling of function identified with ID. Identifier returned by after or after_idle must be given as first parameter.
Cancel scheduling of function identified with ID.
[ "Cancel", "scheduling", "of", "function", "identified", "with", "ID", "." ]
def after_cancel(self, id): """Cancel scheduling of function identified with ID. Identifier returned by after or after_idle must be given as first parameter.""" try: data = self.tk.call('after', 'info', id) # In Tk 8.3, splitlist returns: (script, type) ...
[ "def", "after_cancel", "(", "self", ",", "id", ")", ":", "try", ":", "data", "=", "self", ".", "tk", ".", "call", "(", "'after'", ",", "'info'", ",", "id", ")", "# In Tk 8.3, splitlist returns: (script, type)", "# In Tk 8.4, splitlist may return (script, type) or (s...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib-tk/Tkinter.py#L546-L559
cvxpy/cvxpy
5165b4fb750dfd237de8659383ef24b4b2e33aaf
cvxpy/atoms/mixed_norm.py
python
mixed_norm
(X, p: Union[int, str] = 2, q: Union[int, str] = 1)
return norm(vecnorms, q)
Lp,q norm; :math:`(\\sum_k (\\sum_l \\lvert x_{k,l} \\rvert^p)^{q/p})^{1/q}`. Parameters ---------- X : Expression or numeric constant The matrix to take the l_{p,q} norm of. p : int or str, optional The type of inner norm. q : int or str, optional The type of outer norm. ...
Lp,q norm; :math:`(\\sum_k (\\sum_l \\lvert x_{k,l} \\rvert^p)^{q/p})^{1/q}`.
[ "Lp", "q", "norm", ";", ":", "math", ":", "(", "\\\\", "sum_k", "(", "\\\\", "sum_l", "\\\\", "lvert", "x_", "{", "k", "l", "}", "\\\\", "rvert^p", ")", "^", "{", "q", "/", "p", "}", ")", "^", "{", "1", "/", "q", "}", "." ]
def mixed_norm(X, p: Union[int, str] = 2, q: Union[int, str] = 1): """Lp,q norm; :math:`(\\sum_k (\\sum_l \\lvert x_{k,l} \\rvert^p)^{q/p})^{1/q}`. Parameters ---------- X : Expression or numeric constant The matrix to take the l_{p,q} norm of. p : int or str, optional The type of i...
[ "def", "mixed_norm", "(", "X", ",", "p", ":", "Union", "[", "int", ",", "str", "]", "=", "2", ",", "q", ":", "Union", "[", "int", ",", "str", "]", "=", "1", ")", ":", "X", "=", "Expression", ".", "cast_to_const", "(", "X", ")", "# inner norms",...
https://github.com/cvxpy/cvxpy/blob/5165b4fb750dfd237de8659383ef24b4b2e33aaf/cvxpy/atoms/mixed_norm.py#L23-L45
nasa/astrobee
9241e67e6692810d6e275abb3165b6d02f4ca5ef
scripts/git/cpplint.py
python
_BlockInfo.CheckBegin
(self, filename, clean_lines, linenum, error)
Run checks that applies to text up to the opening brace. This is mostly for checking the text after the class identifier and the "{", usually where the base class is specified. For other blocks, there isn't much to check, so we always pass. Args: filename: The name of the cu...
Run checks that applies to text up to the opening brace.
[ "Run", "checks", "that", "applies", "to", "text", "up", "to", "the", "opening", "brace", "." ]
def CheckBegin(self, filename, clean_lines, linenum, error): """Run checks that applies to text up to the opening brace. This is mostly for checking the text after the class identifier and the "{", usually where the base class is specified. For other blocks, there isn't much to check, ...
[ "def", "CheckBegin", "(", "self", ",", "filename", ",", "clean_lines", ",", "linenum", ",", "error", ")", ":", "pass" ]
https://github.com/nasa/astrobee/blob/9241e67e6692810d6e275abb3165b6d02f4ca5ef/scripts/git/cpplint.py#L2099-L2112
apple/swift-lldb
d74be846ef3e62de946df343e8c234bde93a8912
scripts/Python/static-binding/lldb.py
python
SBSymbolContext.SetCompileUnit
(self, compile_unit)
return _lldb.SBSymbolContext_SetCompileUnit(self, compile_unit)
SetCompileUnit(SBSymbolContext self, SBCompileUnit compile_unit)
SetCompileUnit(SBSymbolContext self, SBCompileUnit compile_unit)
[ "SetCompileUnit", "(", "SBSymbolContext", "self", "SBCompileUnit", "compile_unit", ")" ]
def SetCompileUnit(self, compile_unit): """SetCompileUnit(SBSymbolContext self, SBCompileUnit compile_unit)""" return _lldb.SBSymbolContext_SetCompileUnit(self, compile_unit)
[ "def", "SetCompileUnit", "(", "self", ",", "compile_unit", ")", ":", "return", "_lldb", ".", "SBSymbolContext_SetCompileUnit", "(", "self", ",", "compile_unit", ")" ]
https://github.com/apple/swift-lldb/blob/d74be846ef3e62de946df343e8c234bde93a8912/scripts/Python/static-binding/lldb.py#L10013-L10015
LiquidPlayer/LiquidCore
9405979363f2353ac9a71ad8ab59685dd7f919c9
deps/node-10.15.3/tools/cpplint.py
python
_CppLintState.BackupFilters
(self)
Saves the current filter list to backup storage.
Saves the current filter list to backup storage.
[ "Saves", "the", "current", "filter", "list", "to", "backup", "storage", "." ]
def BackupFilters(self): """ Saves the current filter list to backup storage.""" self._filters_backup = self.filters[:]
[ "def", "BackupFilters", "(", "self", ")", ":", "self", ".", "_filters_backup", "=", "self", ".", "filters", "[", ":", "]" ]
https://github.com/LiquidPlayer/LiquidCore/blob/9405979363f2353ac9a71ad8ab59685dd7f919c9/deps/node-10.15.3/tools/cpplint.py#L1048-L1050
apple/foundationdb
f7118ad406f44ab7a33970fc8370647ed0085e18
layers/containers/vector.py
python
Vector.empty
(self, tr=None)
return self._size(self._to_transaction(tr)) == 0
Test whether the Vector is empty.
Test whether the Vector is empty.
[ "Test", "whether", "the", "Vector", "is", "empty", "." ]
def empty(self, tr=None): """Test whether the Vector is empty.""" return self._size(self._to_transaction(tr)) == 0
[ "def", "empty", "(", "self", ",", "tr", "=", "None", ")", ":", "return", "self", ".", "_size", "(", "self", ".", "_to_transaction", "(", "tr", ")", ")", "==", "0" ]
https://github.com/apple/foundationdb/blob/f7118ad406f44ab7a33970fc8370647ed0085e18/layers/containers/vector.py#L170-L172
ceph/ceph
959663007321a369c83218414a29bd9dbc8bda3a
qa/tasks/ceph_manager.py
python
CephManager.do_rados
(self, cmd, pool=None, namespace=None, remote=None, **kwargs)
return proc
Execute a remote rados command.
Execute a remote rados command.
[ "Execute", "a", "remote", "rados", "command", "." ]
def do_rados(self, cmd, pool=None, namespace=None, remote=None, **kwargs): """ Execute a remote rados command. """ if remote is None: remote = self.controller pre = [ 'adjust-ulimits', 'ceph-coverage', f'{self.testdir}/archive/cover...
[ "def", "do_rados", "(", "self", ",", "cmd", ",", "pool", "=", "None", ",", "namespace", "=", "None", ",", "remote", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "remote", "is", "None", ":", "remote", "=", "self", ".", "controller", "pre", ...
https://github.com/ceph/ceph/blob/959663007321a369c83218414a29bd9dbc8bda3a/qa/tasks/ceph_manager.py#L1715-L1740
google/filament
d21f092645b8e1e312307cbf89f1484891347c63
third_party/glslang/update_glslang_sources.py
python
GoodCommit.GetUrl
(self)
return '{host}{subrepo}'.format( host=host, subrepo=self.subrepo)
Returns the URL for the repository.
Returns the URL for the repository.
[ "Returns", "the", "URL", "for", "the", "repository", "." ]
def GetUrl(self): """Returns the URL for the repository.""" host = SITE_TO_HOST[self.site] return '{host}{subrepo}'.format( host=host, subrepo=self.subrepo)
[ "def", "GetUrl", "(", "self", ")", ":", "host", "=", "SITE_TO_HOST", "[", "self", ".", "site", "]", "return", "'{host}{subrepo}'", ".", "format", "(", "host", "=", "host", ",", "subrepo", "=", "self", ".", "subrepo", ")" ]
https://github.com/google/filament/blob/d21f092645b8e1e312307cbf89f1484891347c63/third_party/glslang/update_glslang_sources.py#L89-L94
yue/yue
619d62c191b13c51c01be451dc48917c34a5aefc
building/tools/cpplint.py
python
_SetFilters
(filters)
Sets the module's error-message filters. These filters are applied when deciding whether to emit a given error message. Args: filters: A string of comma-separated filters (eg "whitespace/indent"). Each filter should start with + or -; else we die.
Sets the module's error-message filters.
[ "Sets", "the", "module", "s", "error", "-", "message", "filters", "." ]
def _SetFilters(filters): """Sets the module's error-message filters. These filters are applied when deciding whether to emit a given error message. Args: filters: A string of comma-separated filters (eg "whitespace/indent"). Each filter should start with + or -; else we die. """ _cpplint...
[ "def", "_SetFilters", "(", "filters", ")", ":", "_cpplint_state", ".", "SetFilters", "(", "filters", ")" ]
https://github.com/yue/yue/blob/619d62c191b13c51c01be451dc48917c34a5aefc/building/tools/cpplint.py#L995-L1005
yrnkrn/zapcc
c6a8aa30006d997eff0d60fd37b0e62b8aa0ea50
tools/clang/tools/scan-build-py/libscanbuild/analyze.py
python
require
(required)
return decorator
Decorator for checking the required values in state. It checks the required attributes in the passed state and stop when any of those is missing.
Decorator for checking the required values in state.
[ "Decorator", "for", "checking", "the", "required", "values", "in", "state", "." ]
def require(required): """ Decorator for checking the required values in state. It checks the required attributes in the passed state and stop when any of those is missing. """ def decorator(function): @functools.wraps(function) def wrapper(*args, **kwargs): for key in requ...
[ "def", "require", "(", "required", ")", ":", "def", "decorator", "(", "function", ")", ":", "@", "functools", ".", "wraps", "(", "function", ")", "def", "wrapper", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "for", "key", "in", "required", ...
https://github.com/yrnkrn/zapcc/blob/c6a8aa30006d997eff0d60fd37b0e62b8aa0ea50/tools/clang/tools/scan-build-py/libscanbuild/analyze.py#L269-L287
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/site-packages/win32/lib/win32pdhquery.py
python
Query.addperfcounter
(self, object, counter, machine=None)
A "Performance Counter" is a stable, known, common counter, such as Memory, or Processor. The use of addperfcounter by end-users is deprecated, since the use of addcounterbybrowsing is considerably more flexible and general. It is provided here to allow the easy development of scripts which need to access ...
A "Performance Counter" is a stable, known, common counter, such as Memory, or Processor. The use of addperfcounter by end-users is deprecated, since the use of addcounterbybrowsing is considerably more flexible and general. It is provided here to allow the easy development of scripts which need to access ...
[ "A", "Performance", "Counter", "is", "a", "stable", "known", "common", "counter", "such", "as", "Memory", "or", "Processor", ".", "The", "use", "of", "addperfcounter", "by", "end", "-", "users", "is", "deprecated", "since", "the", "use", "of", "addcounterbyb...
def addperfcounter(self, object, counter, machine=None): ''' A "Performance Counter" is a stable, known, common counter, such as Memory, or Processor. The use of addperfcounter by end-users is deprecated, since the use of addcounterbybrowsing is considerably more flexible and general. It is provided here...
[ "def", "addperfcounter", "(", "self", ",", "object", ",", "counter", ",", "machine", "=", "None", ")", ":", "BaseQuery", ".", "addcounter", "(", "self", ",", "object", "=", "object", ",", "counter", "=", "counter", ",", "machine", "=", "machine", ")" ]
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/site-packages/win32/lib/win32pdhquery.py#L348-L364
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/AWSPythonSDK/1.5.8/dateutil/tz/tz.py
python
tzfile.fromutc
(self, dt)
return enfold(dt_out, fold=int(fold))
The ``tzfile`` implementation of :py:func:`datetime.tzinfo.fromutc`. :param dt: A :py:class:`datetime.datetime` object. :raises TypeError: Raised if ``dt`` is not a :py:class:`datetime.datetime` object. :raises ValueError: Raised if this is called with a ``...
The ``tzfile`` implementation of :py:func:`datetime.tzinfo.fromutc`.
[ "The", "tzfile", "implementation", "of", ":", "py", ":", "func", ":", "datetime", ".", "tzinfo", ".", "fromutc", "." ]
def fromutc(self, dt): """ The ``tzfile`` implementation of :py:func:`datetime.tzinfo.fromutc`. :param dt: A :py:class:`datetime.datetime` object. :raises TypeError: Raised if ``dt`` is not a :py:class:`datetime.datetime` object. :raises ValueError: ...
[ "def", "fromutc", "(", "self", ",", "dt", ")", ":", "# These isinstance checks are in datetime.tzinfo, so we'll preserve", "# them, even if we don't care about duck typing.", "if", "not", "isinstance", "(", "dt", ",", "datetime", ".", "datetime", ")", ":", "raise", "TypeE...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/AWSPythonSDK/1.5.8/dateutil/tz/tz.py#L637-L671
SequoiaDB/SequoiaDB
2894ed7e5bd6fe57330afc900cf76d0ff0df9f64
tools/server/php_linux/libxml2/lib/python2.4/site-packages/libxml2.py
python
parserCtxt.htmlCtxtReadFd
(self, fd, URL, encoding, options)
return __tmp
parse an XML from a file descriptor and build a tree. This reuses the existing @ctxt parser context
parse an XML from a file descriptor and build a tree. This reuses the existing
[ "parse", "an", "XML", "from", "a", "file", "descriptor", "and", "build", "a", "tree", ".", "This", "reuses", "the", "existing" ]
def htmlCtxtReadFd(self, fd, URL, encoding, options): """parse an XML from a file descriptor and build a tree. This reuses the existing @ctxt parser context """ ret = libxml2mod.htmlCtxtReadFd(self._o, fd, URL, encoding, options) if ret is None:raise treeError('htmlCtxtReadFd() failed...
[ "def", "htmlCtxtReadFd", "(", "self", ",", "fd", ",", "URL", ",", "encoding", ",", "options", ")", ":", "ret", "=", "libxml2mod", ".", "htmlCtxtReadFd", "(", "self", ".", "_o", ",", "fd", ",", "URL", ",", "encoding", ",", "options", ")", "if", "ret",...
https://github.com/SequoiaDB/SequoiaDB/blob/2894ed7e5bd6fe57330afc900cf76d0ff0df9f64/tools/server/php_linux/libxml2/lib/python2.4/site-packages/libxml2.py#L4905-L4911
fatih/subvim
241b6d170597857105da219c9b7d36059e9f11fb
vim/base/YouCompleteMe/third_party/jedi/jedi/parser/representation.py
python
Scope.get_code
(self, first_indent=False, indention=' ')
return string
:return: Returns the code of the current scope. :rtype: str
:return: Returns the code of the current scope. :rtype: str
[ ":", "return", ":", "Returns", "the", "code", "of", "the", "current", "scope", ".", ":", "rtype", ":", "str" ]
def get_code(self, first_indent=False, indention=' '): """ :return: Returns the code of the current scope. :rtype: str """ string = "" if len(self.docstr) > 0: string += '"""' + self.docstr + '"""\n' objs = self.subscopes + self.imports + self.stat...
[ "def", "get_code", "(", "self", ",", "first_indent", "=", "False", ",", "indention", "=", "' '", ")", ":", "string", "=", "\"\"", "if", "len", "(", "self", ".", "docstr", ")", ">", "0", ":", "string", "+=", "'\"\"\"'", "+", "self", ".", "docstr", ...
https://github.com/fatih/subvim/blob/241b6d170597857105da219c9b7d36059e9f11fb/vim/base/YouCompleteMe/third_party/jedi/jedi/parser/representation.py#L194-L214
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/decimal.py
python
Context.to_integral_exact
(self, a)
return a.to_integral_exact(context=self)
Rounds to an integer. When the operand has a negative exponent, the result is the same as using the quantize() operation using the given operand as the left-hand-operand, 1E+0 as the right-hand-operand, and the precision of the operand as the precision setting; Inexact and Rounded flags...
Rounds to an integer.
[ "Rounds", "to", "an", "integer", "." ]
def to_integral_exact(self, a): """Rounds to an integer. When the operand has a negative exponent, the result is the same as using the quantize() operation using the given operand as the left-hand-operand, 1E+0 as the right-hand-operand, and the precision of the operand as the p...
[ "def", "to_integral_exact", "(", "self", ",", "a", ")", ":", "a", "=", "_convert_other", "(", "a", ",", "raiseit", "=", "True", ")", "return", "a", ".", "to_integral_exact", "(", "context", "=", "self", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/decimal.py#L5356-L5384
scylladb/scylla
00a6fda7b98438184024fc4683b0accf1852e30c
scylla-gdb.py
python
histogram.__init__
(self, counts = None, print_indicators = True, formatter=None)
Constructor. Params: * counts: initial counts (default to empty). * print_indicators: print the '+' characters to illustrate relative count. Can be turned off when the item names are very long and would thus make indicators unreadable. * formatter: a callable tha...
Constructor.
[ "Constructor", "." ]
def __init__(self, counts = None, print_indicators = True, formatter=None): """Constructor. Params: * counts: initial counts (default to empty). * print_indicators: print the '+' characters to illustrate relative count. Can be turned off when the item names are very long and...
[ "def", "__init__", "(", "self", ",", "counts", "=", "None", ",", "print_indicators", "=", "True", ",", "formatter", "=", "None", ")", ":", "if", "counts", "is", "None", ":", "self", ".", "_counts", "=", "defaultdict", "(", "int", ")", "else", ":", "s...
https://github.com/scylladb/scylla/blob/00a6fda7b98438184024fc4683b0accf1852e30c/scylla-gdb.py#L1078-L1101
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/targets/linalg.py
python
call_xxdot
(context, builder, conjugate, dtype, n, a_data, b_data, out_data)
Call the BLAS vector * vector product function for the given arguments.
Call the BLAS vector * vector product function for the given arguments.
[ "Call", "the", "BLAS", "vector", "*", "vector", "product", "function", "for", "the", "given", "arguments", "." ]
def call_xxdot(context, builder, conjugate, dtype, n, a_data, b_data, out_data): """ Call the BLAS vector * vector product function for the given arguments. """ fnty = ir.FunctionType(ir.IntType(32), [ll_char, ll_char, intp_t, # kind, conjugate, n ...
[ "def", "call_xxdot", "(", "context", ",", "builder", ",", "conjugate", ",", "dtype", ",", "n", ",", "a_data", ",", "b_data", ",", "out_data", ")", ":", "fnty", "=", "ir", ".", "FunctionType", "(", "ir", ".", "IntType", "(", "32", ")", ",", "[", "ll...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/targets/linalg.py#L344-L363
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numpy/polynomial/legendre.py
python
legfit
(x, y, deg, rcond=None, full=False, w=None)
return pu._fit(legvander, x, y, deg, rcond, full, w)
Least squares fit of Legendre series to data. Return the coefficients of a Legendre series of degree `deg` that is the least squares fit to the data values `y` given at points `x`. If `y` is 1-D the returned coefficients will also be 1-D. If `y` is 2-D multiple fits are done, one for each column of `y`...
Least squares fit of Legendre series to data.
[ "Least", "squares", "fit", "of", "Legendre", "series", "to", "data", "." ]
def legfit(x, y, deg, rcond=None, full=False, w=None): """ Least squares fit of Legendre series to data. Return the coefficients of a Legendre series of degree `deg` that is the least squares fit to the data values `y` given at points `x`. If `y` is 1-D the returned coefficients will also be 1-D. I...
[ "def", "legfit", "(", "x", ",", "y", ",", "deg", ",", "rcond", "=", "None", ",", "full", "=", "False", ",", "w", "=", "None", ")", ":", "return", "pu", ".", "_fit", "(", "legvander", ",", "x", ",", "y", ",", "deg", ",", "rcond", ",", "full", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numpy/polynomial/legendre.py#L1289-L1410
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/plugins/codebrowser/codebrowser/gentag/verilogtags.py
python
GenerateTags
(buff)
return rtags
Create a DocStruct object that represents a Verilog document @param buff: a file like buffer object (StringIO) @todo: add support for parsing module definitions / class variables
Create a DocStruct object that represents a Verilog document @param buff: a file like buffer object (StringIO) @todo: add support for parsing module definitions / class variables
[ "Create", "a", "DocStruct", "object", "that", "represents", "a", "Verilog", "document", "@param", "buff", ":", "a", "file", "like", "buffer", "object", "(", "StringIO", ")", "@todo", ":", "add", "support", "for", "parsing", "module", "definitions", "/", "cla...
def GenerateTags(buff): """Create a DocStruct object that represents a Verilog document @param buff: a file like buffer object (StringIO) @todo: add support for parsing module definitions / class variables """ rtags = taglib.DocStruct() rtags.SetElementDescription('class', "Class Definitions") ...
[ "def", "GenerateTags", "(", "buff", ")", ":", "rtags", "=", "taglib", ".", "DocStruct", "(", ")", "rtags", ".", "SetElementDescription", "(", "'class'", ",", "\"Class Definitions\"", ")", "rtags", ".", "SetElementDescription", "(", "'task'", ",", "\"Task Definit...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/plugins/codebrowser/codebrowser/gentag/verilogtags.py#L30-L120
weolar/miniblink49
1c4678db0594a4abde23d3ebbcc7cd13c3170777
third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/wptserve/wptserve/response.py
python
Response.set_cookie
(self, name, value, path="/", domain=None, max_age=None, expires=None, secure=False, httponly=False, comment=None)
Set a cookie to be sent with a Set-Cookie header in the response :param name: String name of the cookie :param value: String value of the cookie :param max_age: datetime.timedelta int representing the time (in seconds) until the cookie expires :param path...
Set a cookie to be sent with a Set-Cookie header in the response
[ "Set", "a", "cookie", "to", "be", "sent", "with", "a", "Set", "-", "Cookie", "header", "in", "the", "response" ]
def set_cookie(self, name, value, path="/", domain=None, max_age=None, expires=None, secure=False, httponly=False, comment=None): """Set a cookie to be sent with a Set-Cookie header in the response :param name: String name of the cookie :param value: String value of t...
[ "def", "set_cookie", "(", "self", ",", "name", ",", "value", ",", "path", "=", "\"/\"", ",", "domain", "=", "None", ",", "max_age", "=", "None", ",", "expires", "=", "None", ",", "secure", "=", "False", ",", "httponly", "=", "False", ",", "comment", ...
https://github.com/weolar/miniblink49/blob/1c4678db0594a4abde23d3ebbcc7cd13c3170777/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/wptserve/wptserve/response.py#L94-L150
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
tools/code_coverage/croc.py
python
Coverage.ParseLcovFile
(self, input_filename)
Adds coverage data from a .lcov file. Args: input_filename: Input filename.
Adds coverage data from a .lcov file.
[ "Adds", "coverage", "data", "from", "a", ".", "lcov", "file", "." ]
def ParseLcovFile(self, input_filename): """Adds coverage data from a .lcov file. Args: input_filename: Input filename. """ # TODO: All manner of error checking lcov_file = None try: lcov_file = open(input_filename, 'rt') self.ParseLcovData(lcov_file) finally: if lco...
[ "def", "ParseLcovFile", "(", "self", ",", "input_filename", ")", ":", "# TODO: All manner of error checking", "lcov_file", "=", "None", "try", ":", "lcov_file", "=", "open", "(", "input_filename", ",", "'rt'", ")", "self", ".", "ParseLcovData", "(", "lcov_file", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/tools/code_coverage/croc.py#L358-L371
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/framework/python/ops/checkpoint_ops.py
python
load_variable_slot_initializer
(ckpt_path, old_tensor_name, primary_partition_info, new_row_vocab_size, new_col_vocab_size, old_row_vocab_file=None, ...
return _initializer
Loads pre-trained multi-class slots for linear models from checkpoint. Wrapper around `load_and_remap_matrix_initializer()` specialized for loading multi-class slots (such as optimizer accumulators) and remapping them according to the provided vocab files. See docs for `load_and_remap_matrix_initializer()` for...
Loads pre-trained multi-class slots for linear models from checkpoint.
[ "Loads", "pre", "-", "trained", "multi", "-", "class", "slots", "for", "linear", "models", "from", "checkpoint", "." ]
def load_variable_slot_initializer(ckpt_path, old_tensor_name, primary_partition_info, new_row_vocab_size, new_col_vocab_size, old_row_vocab_file...
[ "def", "load_variable_slot_initializer", "(", "ckpt_path", ",", "old_tensor_name", ",", "primary_partition_info", ",", "new_row_vocab_size", ",", "new_col_vocab_size", ",", "old_row_vocab_file", "=", "None", ",", "new_row_vocab_file", "=", "None", ",", "old_col_vocab_file",...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/framework/python/ops/checkpoint_ops.py#L89-L180
openvinotoolkit/openvino
dedcbeafa8b84cccdc55ca64b8da516682b381c7
tools/pot/openvino/tools/pot/engines/utils.py
python
cast_friendly_names
(nodes)
Process nGraph nodes and sets POT-friendly tensor name based on friendly_name
Process nGraph nodes and sets POT-friendly tensor name based on friendly_name
[ "Process", "nGraph", "nodes", "and", "sets", "POT", "-", "friendly", "tensor", "name", "based", "on", "friendly_name" ]
def cast_friendly_names(nodes): """ Process nGraph nodes and sets POT-friendly tensor name based on friendly_name """ for ng_node in nodes: names = ng_node.get_tensor().get_names() names.add(ng_node.get_node().friendly_name) ng_node.get_tensor().set_names(names)
[ "def", "cast_friendly_names", "(", "nodes", ")", ":", "for", "ng_node", "in", "nodes", ":", "names", "=", "ng_node", ".", "get_tensor", "(", ")", ".", "get_names", "(", ")", "names", ".", "add", "(", "ng_node", ".", "get_node", "(", ")", ".", "friendly...
https://github.com/openvinotoolkit/openvino/blob/dedcbeafa8b84cccdc55ca64b8da516682b381c7/tools/pot/openvino/tools/pot/engines/utils.py#L160-L167
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/ed_stc.py
python
EditraStc.GotoBraceMatch
(self)
Jump the caret to the brace opposite of the one the caret is currently at. If there is no match or the caret currently is not next to a brace no action is taken. @return: bool
Jump the caret to the brace opposite of the one the caret is currently at. If there is no match or the caret currently is not next to a brace no action is taken. @return: bool
[ "Jump", "the", "caret", "to", "the", "brace", "opposite", "of", "the", "one", "the", "caret", "is", "currently", "at", ".", "If", "there", "is", "no", "match", "or", "the", "caret", "currently", "is", "not", "next", "to", "a", "brace", "no", "action", ...
def GotoBraceMatch(self): """Jump the caret to the brace opposite of the one the caret is currently at. If there is no match or the caret currently is not next to a brace no action is taken. @return: bool """ cbrace, brace_opposite = self.GetBracePair() if -1 in ...
[ "def", "GotoBraceMatch", "(", "self", ")", ":", "cbrace", ",", "brace_opposite", "=", "self", ".", "GetBracePair", "(", ")", "if", "-", "1", "in", "(", "cbrace", ",", "brace_opposite", ")", ":", "return", "False", "else", ":", "self", ".", "GotoPos", "...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/ed_stc.py#L506-L518
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/Paste/paste/request.py
python
path_info_split
(path_info)
Splits off the first segment of the path. Returns (first_part, rest_of_path). first_part can be None (if PATH_INFO is empty), '' (if PATH_INFO is '/'), or a name without any /'s. rest_of_path can be '' or a string starting with /.
Splits off the first segment of the path. Returns (first_part, rest_of_path). first_part can be None (if PATH_INFO is empty), '' (if PATH_INFO is '/'), or a name without any /'s. rest_of_path can be '' or a string starting with /.
[ "Splits", "off", "the", "first", "segment", "of", "the", "path", ".", "Returns", "(", "first_part", "rest_of_path", ")", ".", "first_part", "can", "be", "None", "(", "if", "PATH_INFO", "is", "empty", ")", "(", "if", "PATH_INFO", "is", "/", ")", "or", "...
def path_info_split(path_info): """ Splits off the first segment of the path. Returns (first_part, rest_of_path). first_part can be None (if PATH_INFO is empty), '' (if PATH_INFO is '/'), or a name without any /'s. rest_of_path can be '' or a string starting with /. """ if not path_info:...
[ "def", "path_info_split", "(", "path_info", ")", ":", "if", "not", "path_info", ":", "return", "None", ",", "''", "assert", "path_info", ".", "startswith", "(", "'/'", ")", ",", "(", "\"PATH_INFO should start with /: %r\"", "%", "path_info", ")", "path_info", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/Paste/paste/request.py#L269-L286
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py
python
SBTypeSynthetic.IsValid
(self)
return _lldb.SBTypeSynthetic_IsValid(self)
IsValid(self) -> bool
IsValid(self) -> bool
[ "IsValid", "(", "self", ")", "-", ">", "bool" ]
def IsValid(self): """IsValid(self) -> bool""" return _lldb.SBTypeSynthetic_IsValid(self)
[ "def", "IsValid", "(", "self", ")", ":", "return", "_lldb", ".", "SBTypeSynthetic_IsValid", "(", "self", ")" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py#L11582-L11584
google/nucleus
68d3947fafba1337f294c0668a6e1c7f3f1273e3
nucleus/io/vcf.py
python
_create_get_fn_cache
(fields)
return { field.id: vcf_constants.create_get_fn(field.type, field.number) for field in fields }
Returns a dictionary from field to a callable that extracts its value.
Returns a dictionary from field to a callable that extracts its value.
[ "Returns", "a", "dictionary", "from", "field", "to", "a", "callable", "that", "extracts", "its", "value", "." ]
def _create_get_fn_cache(fields): """Returns a dictionary from field to a callable that extracts its value.""" return { field.id: vcf_constants.create_get_fn(field.type, field.number) for field in fields }
[ "def", "_create_get_fn_cache", "(", "fields", ")", ":", "return", "{", "field", ".", "id", ":", "vcf_constants", ".", "create_get_fn", "(", "field", ".", "type", ",", "field", ".", "number", ")", "for", "field", "in", "fields", "}" ]
https://github.com/google/nucleus/blob/68d3947fafba1337f294c0668a6e1c7f3f1273e3/nucleus/io/vcf.py#L74-L79
PaddlePaddle/Paddle
1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c
python/paddle/distributed/auto_parallel/process_mesh.py
python
ProcessMesh.ndim
(self)
return len(self._topology)
r""" Get the number of dimension of ProcessMesh.
r""" Get the number of dimension of ProcessMesh.
[ "r", "Get", "the", "number", "of", "dimension", "of", "ProcessMesh", "." ]
def ndim(self): r""" Get the number of dimension of ProcessMesh. """ return len(self._topology)
[ "def", "ndim", "(", "self", ")", ":", "return", "len", "(", "self", ".", "_topology", ")" ]
https://github.com/PaddlePaddle/Paddle/blob/1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c/python/paddle/distributed/auto_parallel/process_mesh.py#L121-L125
microsoft/CNTK
e9396480025b9ca457d26b6f33dd07c474c6aa04
bindings/python/cntk/io/transforms.py
python
color
(brightness_radius=0.0, contrast_radius=0.0, saturation_radius=0.0)
return cntk_py.reader_color(brightness_radius, contrast_radius, saturation_radius)
Color transform that can be used to pass to `map_features` for data augmentation. Args: brightness_radius (float, default 0.0): Radius for brightness change. Must be set within [0.0, 1.0]. For example, assume brightness_radius = 0.2, a random number `x` is uniformly drawn from [-0.2, 0....
Color transform that can be used to pass to `map_features` for data augmentation.
[ "Color", "transform", "that", "can", "be", "used", "to", "pass", "to", "map_features", "for", "data", "augmentation", "." ]
def color(brightness_radius=0.0, contrast_radius=0.0, saturation_radius=0.0): ''' Color transform that can be used to pass to `map_features` for data augmentation. Args: brightness_radius (float, default 0.0): Radius for brightness change. Must be set within [0.0, 1.0]. For example, assum...
[ "def", "color", "(", "brightness_radius", "=", "0.0", ",", "contrast_radius", "=", "0.0", ",", "saturation_radius", "=", "0.0", ")", ":", "return", "cntk_py", ".", "reader_color", "(", "brightness_radius", ",", "contrast_radius", ",", "saturation_radius", ")" ]
https://github.com/microsoft/CNTK/blob/e9396480025b9ca457d26b6f33dd07c474c6aa04/bindings/python/cntk/io/transforms.py#L112-L134
OSGeo/gdal
3748fc4ba4fba727492774b2b908a2130c864a83
swig/python/osgeo/gdal.py
python
MDArray.GetStatistics
(self, *args, **kwargs)
return _gdal.MDArray_GetStatistics(self, *args, **kwargs)
r"""GetStatistics(MDArray self, bool approx_ok=FALSE, bool force=TRUE, GDALProgressFunc callback=0, void * callback_data=None) -> Statistics
r"""GetStatistics(MDArray self, bool approx_ok=FALSE, bool force=TRUE, GDALProgressFunc callback=0, void * callback_data=None) -> Statistics
[ "r", "GetStatistics", "(", "MDArray", "self", "bool", "approx_ok", "=", "FALSE", "bool", "force", "=", "TRUE", "GDALProgressFunc", "callback", "=", "0", "void", "*", "callback_data", "=", "None", ")", "-", ">", "Statistics" ]
def GetStatistics(self, *args, **kwargs): r"""GetStatistics(MDArray self, bool approx_ok=FALSE, bool force=TRUE, GDALProgressFunc callback=0, void * callback_data=None) -> Statistics""" return _gdal.MDArray_GetStatistics(self, *args, **kwargs)
[ "def", "GetStatistics", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_gdal", ".", "MDArray_GetStatistics", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/OSGeo/gdal/blob/3748fc4ba4fba727492774b2b908a2130c864a83/swig/python/osgeo/gdal.py#L2847-L2849
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/boto3/resources/collection.py
python
ResourceCollection.page_size
(self, count)
return self._clone(page_size=count)
Fetch at most this many resources per service request. >>> for obj in s3.Bucket('boto3').objects.page_size(100): ... print(obj.key) :type count: int :param count: Fetch this many items per request :rtype: :py:class:`ResourceCollection`
Fetch at most this many resources per service request.
[ "Fetch", "at", "most", "this", "many", "resources", "per", "service", "request", "." ]
def page_size(self, count): """ Fetch at most this many resources per service request. >>> for obj in s3.Bucket('boto3').objects.page_size(100): ... print(obj.key) :type count: int :param count: Fetch this many items per request :rtype: :py:class:`Re...
[ "def", "page_size", "(", "self", ",", "count", ")", ":", "return", "self", ".", "_clone", "(", "page_size", "=", "count", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/boto3/resources/collection.py#L246-L257
PaddlePaddle/Paddle
1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c
python/paddle/fluid/incubate/fleet/collective/__init__.py
python
CollectiveOptimizer.minimize
(self, loss, startup_program=None, parameter_list=None, no_grad_set=None)
return optimize_ops, param_grads
minimize a program through loss Args: loss (Variable|Variable List): loss variable or loss variable list to run optimization. startup_program (Program): startup_program for initializing parameters in `parameter_list`. parameter_list (list): list of Variables t...
minimize a program through loss Args: loss (Variable|Variable List): loss variable or loss variable list to run optimization. startup_program (Program): startup_program for initializing parameters in `parameter_list`. parameter_list (list): list of Variables t...
[ "minimize", "a", "program", "through", "loss", "Args", ":", "loss", "(", "Variable|Variable", "List", ")", ":", "loss", "variable", "or", "loss", "variable", "list", "to", "run", "optimization", ".", "startup_program", "(", "Program", ")", ":", "startup_progra...
def minimize(self, loss, startup_program=None, parameter_list=None, no_grad_set=None): """ minimize a program through loss Args: loss (Variable|Variable List): loss variable or loss variable list to run optimization....
[ "def", "minimize", "(", "self", ",", "loss", ",", "startup_program", "=", "None", ",", "parameter_list", "=", "None", ",", "no_grad_set", "=", "None", ")", ":", "# check optimizer conflicts", "if", "self", ".", "_forward_recompute", ":", "if", "self", ".", "...
https://github.com/PaddlePaddle/Paddle/blob/1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c/python/paddle/fluid/incubate/fleet/collective/__init__.py#L451-L516
PyMesh/PyMesh
384ba882b7558ba6e8653ed263c419226c22bddf
python/pymesh/snap_rounding.py
python
snap_rounding
(points, segments, pixel_size, use_iterative=True)
return vertices, edges
2D snap rounding. Args: points (``numpy.ndarray``): Input points. segments (``numpy.ndarray``): Input segments. pixel_size (``float``): Pixel size. use_iterative (``bool``): Whether to use iterative snap rounding. Returns: 2 values are returned. * ``vertice...
2D snap rounding.
[ "2D", "snap", "rounding", "." ]
def snap_rounding(points, segments, pixel_size, use_iterative=True): """ 2D snap rounding. Args: points (``numpy.ndarray``): Input points. segments (``numpy.ndarray``): Input segments. pixel_size (``float``): Pixel size. use_iterative (``bool``): Whether to use iterative snap ro...
[ "def", "snap_rounding", "(", "points", ",", "segments", ",", "pixel_size", ",", "use_iterative", "=", "True", ")", ":", "engine", "=", "PyMesh", ".", "SnapRounding2", "(", ")", "engine", ".", "points", "=", "points", "engine", ".", "segments", "=", "segmen...
https://github.com/PyMesh/PyMesh/blob/384ba882b7558ba6e8653ed263c419226c22bddf/python/pymesh/snap_rounding.py#L6-L31
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/pdb.py
python
Pdb.lookupmodule
(self, filename)
return None
Helper function for break/clear parsing -- may be overridden. lookupmodule() translates (possibly incomplete) file or module name into an absolute file name.
Helper function for break/clear parsing -- may be overridden.
[ "Helper", "function", "for", "break", "/", "clear", "parsing", "--", "may", "be", "overridden", "." ]
def lookupmodule(self, filename): """Helper function for break/clear parsing -- may be overridden. lookupmodule() translates (possibly incomplete) file or module name into an absolute file name. """ if os.path.isabs(filename) and os.path.exists(filename): return fil...
[ "def", "lookupmodule", "(", "self", ",", "filename", ")", ":", "if", "os", ".", "path", ".", "isabs", "(", "filename", ")", "and", "os", ".", "path", ".", "exists", "(", "filename", ")", ":", "return", "filename", "f", "=", "os", ".", "path", ".", ...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/pdb.py#L1187-L1209
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib2to3/pytree.py
python
Base._eq
(self, other)
Compare two nodes for equality. This is called by __eq__ and __ne__. It is only called if the two nodes have the same type. This must be implemented by the concrete subclass. Nodes should be considered equal if they have the same structure, ignoring the prefix string and other context...
Compare two nodes for equality.
[ "Compare", "two", "nodes", "for", "equality", "." ]
def _eq(self, other): """ Compare two nodes for equality. This is called by __eq__ and __ne__. It is only called if the two nodes have the same type. This must be implemented by the concrete subclass. Nodes should be considered equal if they have the same structure, ig...
[ "def", "_eq", "(", "self", ",", "other", ")", ":", "raise", "NotImplementedError" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib2to3/pytree.py#L77-L86
uzh-rpg/rpg_svo
d6161063b47f36ce78252ee4c4fedf3f6d8f2898
svo_analysis/src/svo_analysis/tum_benchmark_tools/evaluate_rpe.py
python
percentile
(seq,q)
return seq_sorted[int((len(seq_sorted)-1)*q)]
Return the q-percentile of a list
Return the q-percentile of a list
[ "Return", "the", "q", "-", "percentile", "of", "a", "list" ]
def percentile(seq,q): """ Return the q-percentile of a list """ seq_sorted = list(seq) seq_sorted.sort() return seq_sorted[int((len(seq_sorted)-1)*q)]
[ "def", "percentile", "(", "seq", ",", "q", ")", ":", "seq_sorted", "=", "list", "(", "seq", ")", "seq_sorted", ".", "sort", "(", ")", "return", "seq_sorted", "[", "int", "(", "(", "len", "(", "seq_sorted", ")", "-", "1", ")", "*", "q", ")", "]" ]
https://github.com/uzh-rpg/rpg_svo/blob/d6161063b47f36ce78252ee4c4fedf3f6d8f2898/svo_analysis/src/svo_analysis/tum_benchmark_tools/evaluate_rpe.py#L299-L305
cluebotng/cluebotng
2ed38a518c1019f6b7b03e33b487f96f8df617b0
fabfile.py
python
_stop
()
Internal function, calls jstop on the grid jobs
Internal function, calls jstop on the grid jobs
[ "Internal", "function", "calls", "jstop", "on", "the", "grid", "jobs" ]
def _stop(): ''' Internal function, calls jstop on the grid jobs ''' sudo('jstop cbng_bot | true') sudo('jstop cbng_core | true')
[ "def", "_stop", "(", ")", ":", "sudo", "(", "'jstop cbng_bot | true'", ")", "sudo", "(", "'jstop cbng_core | true'", ")" ]
https://github.com/cluebotng/cluebotng/blob/2ed38a518c1019f6b7b03e33b487f96f8df617b0/fabfile.py#L109-L114
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/keras/engine/functional.py
python
_map_graph_network
(inputs, outputs)
return network_nodes, nodes_by_depth, layers, layers_by_depth
Validates a network's topology and gather its layers and nodes. Args: inputs: List of input tensors. outputs: List of outputs tensors. Returns: A tuple `(nodes, nodes_by_depth, layers, layers_by_depth)`. - nodes: list of Node instances. - nodes_by_depth: dict mapping ints (depth) to lists of n...
Validates a network's topology and gather its layers and nodes.
[ "Validates", "a", "network", "s", "topology", "and", "gather", "its", "layers", "and", "nodes", "." ]
def _map_graph_network(inputs, outputs): """Validates a network's topology and gather its layers and nodes. Args: inputs: List of input tensors. outputs: List of outputs tensors. Returns: A tuple `(nodes, nodes_by_depth, layers, layers_by_depth)`. - nodes: list of Node instances. - nodes_by_...
[ "def", "_map_graph_network", "(", "inputs", ",", "outputs", ")", ":", "# \"depth\" is number of layers between output Node and the Node.", "# Nodes are ordered from inputs -> outputs.", "nodes_in_decreasing_depth", ",", "layer_indices", "=", "_build_map", "(", "outputs", ")", "ne...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/keras/engine/functional.py#L883-L1002
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/distutils/dist.py
python
Distribution.get_command_class
(self, command)
Return the class that implements the Distutils command named by 'command'. First we check the 'cmdclass' dictionary; if the command is mentioned there, we fetch the class object from the dictionary and return it. Otherwise we load the command module ("distutils.command." + command) and...
Return the class that implements the Distutils command named by 'command'. First we check the 'cmdclass' dictionary; if the command is mentioned there, we fetch the class object from the dictionary and return it. Otherwise we load the command module ("distutils.command." + command) and...
[ "Return", "the", "class", "that", "implements", "the", "Distutils", "command", "named", "by", "command", ".", "First", "we", "check", "the", "cmdclass", "dictionary", ";", "if", "the", "command", "is", "mentioned", "there", "we", "fetch", "the", "class", "ob...
def get_command_class(self, command): """Return the class that implements the Distutils command named by 'command'. First we check the 'cmdclass' dictionary; if the command is mentioned there, we fetch the class object from the dictionary and return it. Otherwise we load the command mo...
[ "def", "get_command_class", "(", "self", ",", "command", ")", ":", "klass", "=", "self", ".", "cmdclass", ".", "get", "(", "command", ")", "if", "klass", ":", "return", "klass", "for", "pkgname", "in", "self", ".", "get_command_packages", "(", ")", ":", ...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/distutils/dist.py#L794-L830
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/combo.py
python
ComboCtrl.GetBitmapNormal
(*args, **kwargs)
return _combo.ComboCtrl_GetBitmapNormal(*args, **kwargs)
GetBitmapNormal(self) -> Bitmap
GetBitmapNormal(self) -> Bitmap
[ "GetBitmapNormal", "(", "self", ")", "-", ">", "Bitmap" ]
def GetBitmapNormal(*args, **kwargs): """GetBitmapNormal(self) -> Bitmap""" return _combo.ComboCtrl_GetBitmapNormal(*args, **kwargs)
[ "def", "GetBitmapNormal", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_combo", ".", "ComboCtrl_GetBitmapNormal", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/combo.py#L446-L448
funnyzhou/Adaptive_Feeding
9c78182331d8c0ea28de47226e805776c638d46f
lib/datasets/pascal_voc.py
python
pascal_voc.image_path_from_index
(self, index)
return image_path
Construct an image path from the image's "index" identifier.
Construct an image path from the image's "index" identifier.
[ "Construct", "an", "image", "path", "from", "the", "image", "s", "index", "identifier", "." ]
def image_path_from_index(self, index): """ Construct an image path from the image's "index" identifier. """ image_path = os.path.join(self._data_path, 'JPEGImages', index + self._image_ext) assert os.path.exists(image_path), \ 'P...
[ "def", "image_path_from_index", "(", "self", ",", "index", ")", ":", "image_path", "=", "os", ".", "path", ".", "join", "(", "self", ".", "_data_path", ",", "'JPEGImages'", ",", "index", "+", "self", ".", "_image_ext", ")", "assert", "os", ".", "path", ...
https://github.com/funnyzhou/Adaptive_Feeding/blob/9c78182331d8c0ea28de47226e805776c638d46f/lib/datasets/pascal_voc.py#L63-L71
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/external/bazel_tools/third_party/py/gflags/__init__.py
python
FloatParser.Convert
(self, argument)
return float(argument)
Converts argument to a float; raises ValueError on errors.
Converts argument to a float; raises ValueError on errors.
[ "Converts", "argument", "to", "a", "float", ";", "raises", "ValueError", "on", "errors", "." ]
def Convert(self, argument): """Converts argument to a float; raises ValueError on errors.""" return float(argument)
[ "def", "Convert", "(", "self", ",", "argument", ")", ":", "return", "float", "(", "argument", ")" ]
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/external/bazel_tools/third_party/py/gflags/__init__.py#L2499-L2501
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/python2_version/klampt/robotsim.py
python
TerrainModel.getName
(self)
return _robotsim.TerrainModel_getName(self)
getName(TerrainModel self) -> char const *
getName(TerrainModel self) -> char const *
[ "getName", "(", "TerrainModel", "self", ")", "-", ">", "char", "const", "*" ]
def getName(self): """ getName(TerrainModel self) -> char const * """ return _robotsim.TerrainModel_getName(self)
[ "def", "getName", "(", "self", ")", ":", "return", "_robotsim", ".", "TerrainModel_getName", "(", "self", ")" ]
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/python2_version/klampt/robotsim.py#L5618-L5625
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/_core.py
python
Image.IsTransparent
(*args, **kwargs)
return _core_.Image_IsTransparent(*args, **kwargs)
IsTransparent(self, int x, int y, byte threshold=IMAGE_ALPHA_THRESHOLD) -> bool Returns ``True`` if this pixel is masked or has an alpha value less than the spcified threshold.
IsTransparent(self, int x, int y, byte threshold=IMAGE_ALPHA_THRESHOLD) -> bool
[ "IsTransparent", "(", "self", "int", "x", "int", "y", "byte", "threshold", "=", "IMAGE_ALPHA_THRESHOLD", ")", "-", ">", "bool" ]
def IsTransparent(*args, **kwargs): """ IsTransparent(self, int x, int y, byte threshold=IMAGE_ALPHA_THRESHOLD) -> bool Returns ``True`` if this pixel is masked or has an alpha value less than the spcified threshold. """ return _core_.Image_IsTransparent(*args, **kwargs)
[ "def", "IsTransparent", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "Image_IsTransparent", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_core.py#L3091-L3098
Cisco-Talos/moflow
ed71dfb0540d9e0d7a4c72f0881b58958d573728
BAP-0.7-moflow/libtracewrap/libtrace/protobuf/python/google/protobuf/internal/python_message.py
python
_AddSlots
(message_descriptor, dictionary)
Adds a __slots__ entry to dictionary, containing the names of all valid attributes for this message type. Args: message_descriptor: A Descriptor instance describing this message type. dictionary: Class dictionary to which we'll add a '__slots__' entry.
Adds a __slots__ entry to dictionary, containing the names of all valid attributes for this message type.
[ "Adds", "a", "__slots__", "entry", "to", "dictionary", "containing", "the", "names", "of", "all", "valid", "attributes", "for", "this", "message", "type", "." ]
def _AddSlots(message_descriptor, dictionary): """Adds a __slots__ entry to dictionary, containing the names of all valid attributes for this message type. Args: message_descriptor: A Descriptor instance describing this message type. dictionary: Class dictionary to which we'll add a '__slots__' entry. ...
[ "def", "_AddSlots", "(", "message_descriptor", ",", "dictionary", ")", ":", "dictionary", "[", "'__slots__'", "]", "=", "[", "'_cached_byte_size'", ",", "'_cached_byte_size_dirty'", ",", "'_fields'", ",", "'_is_present_in_parent'", ",", "'_listener'", ",", "'_listener...
https://github.com/Cisco-Talos/moflow/blob/ed71dfb0540d9e0d7a4c72f0881b58958d573728/BAP-0.7-moflow/libtracewrap/libtrace/protobuf/python/google/protobuf/internal/python_message.py#L156-L170
PaddlePaddle/Paddle
1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c
python/paddle/fluid/layers/sequence_lod.py
python
sequence_expand
(x, y, ref_level=-1, name=None)
return tmp
r""" :api_attr: Static Graph Sequence Expand Layer. This layer will expand the input variable ``x`` \ according to specified level ``ref_level`` lod of ``y``. Please note that \ the lod level of ``x`` is at most 1. If the lod level of ``x`` is 1, than \ the size of lod of ``x`` must be...
r""" :api_attr: Static Graph
[ "r", ":", "api_attr", ":", "Static", "Graph" ]
def sequence_expand(x, y, ref_level=-1, name=None): r""" :api_attr: Static Graph Sequence Expand Layer. This layer will expand the input variable ``x`` \ according to specified level ``ref_level`` lod of ``y``. Please note that \ the lod level of ``x`` is at most 1. If the lod level of ``x...
[ "def", "sequence_expand", "(", "x", ",", "y", ",", "ref_level", "=", "-", "1", ",", "name", "=", "None", ")", ":", "assert", "not", "in_dygraph_mode", "(", ")", ",", "(", "\"sequence layer is not supported in dygraph mode yet.\"", ")", "check_variable_and_dtype", ...
https://github.com/PaddlePaddle/Paddle/blob/1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c/python/paddle/fluid/layers/sequence_lod.py#L650-L784
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
tools/resources/find_unused_resources.py
python
FindFilesWithContents
(string_a, string_b)
return files_list
Returns list of paths of files that contain |string_a| or |string_b|. Uses --name-only to print the file paths. The default behavior of git grep is to OR together multiple patterns. Args: string_a: A string to search for (not a regular expression). string_b: As above. Returns: A list of file path...
Returns list of paths of files that contain |string_a| or |string_b|.
[ "Returns", "list", "of", "paths", "of", "files", "that", "contain", "|string_a|", "or", "|string_b|", "." ]
def FindFilesWithContents(string_a, string_b): """Returns list of paths of files that contain |string_a| or |string_b|. Uses --name-only to print the file paths. The default behavior of git grep is to OR together multiple patterns. Args: string_a: A string to search for (not a regular expression). str...
[ "def", "FindFilesWithContents", "(", "string_a", ",", "string_b", ")", ":", "matching_files", "=", "subprocess", ".", "check_output", "(", "[", "'git'", ",", "'grep'", ",", "'--name-only'", ",", "'--fixed-strings'", ",", "'-e'", ",", "string_a", ",", "'-e'", "...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/tools/resources/find_unused_resources.py#L54-L73
LiquidPlayer/LiquidCore
9405979363f2353ac9a71ad8ab59685dd7f919c9
deps/node-10.15.3/tools/cpplint.py
python
NestingState.Update
(self, filename, clean_lines, linenum, error)
Update nesting state with current line. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found.
Update nesting state with current line.
[ "Update", "nesting", "state", "with", "current", "line", "." ]
def Update(self, filename, clean_lines, linenum, error): """Update nesting state with current line. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any err...
[ "def", "Update", "(", "self", ",", "filename", ",", "clean_lines", ",", "linenum", ",", "error", ")", ":", "line", "=", "clean_lines", ".", "elided", "[", "linenum", "]", "# Remember top of the previous nesting stack.", "#", "# The stack is always pushed/popped and no...
https://github.com/LiquidPlayer/LiquidCore/blob/9405979363f2353ac9a71ad8ab59685dd7f919c9/deps/node-10.15.3/tools/cpplint.py#L2684-L2846
Samsung/veles
95ed733c2e49bc011ad98ccf2416ecec23fbf352
libVeles/cpplint.py
python
ReplaceableCheck
(operator, macro, line)
return Match(match_this, line) and not Search(r'NULL|&&|\|\|', line)
Determine whether a basic CHECK can be replaced with a more specific one. For example suggest using CHECK_EQ instead of CHECK(a == b) and similarly for CHECK_GE, CHECK_GT, CHECK_LE, CHECK_LT, CHECK_NE. Args: operator: The C++ operator used in the CHECK. macro: The CHECK or EXPECT macro being called. ...
Determine whether a basic CHECK can be replaced with a more specific one.
[ "Determine", "whether", "a", "basic", "CHECK", "can", "be", "replaced", "with", "a", "more", "specific", "one", "." ]
def ReplaceableCheck(operator, macro, line): """Determine whether a basic CHECK can be replaced with a more specific one. For example suggest using CHECK_EQ instead of CHECK(a == b) and similarly for CHECK_GE, CHECK_GT, CHECK_LE, CHECK_LT, CHECK_NE. Args: operator: The C++ operator used in the CHECK. ...
[ "def", "ReplaceableCheck", "(", "operator", ",", "macro", ",", "line", ")", ":", "# This matches decimal and hex integers, strings, and chars (in that order).", "match_constant", "=", "r'([-+]?(\\d+|0[xX][0-9a-fA-F]+)[lLuU]{0,3}|\".*\"|\\'.*\\')'", "# Expression to match two sides of the...
https://github.com/Samsung/veles/blob/95ed733c2e49bc011ad98ccf2416ecec23fbf352/libVeles/cpplint.py#L2672-L2704
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/fileinput.py
python
fileno
()
return _state.fileno()
Return the file number of the current file. When no file is currently opened, returns -1.
Return the file number of the current file. When no file is currently opened, returns -1.
[ "Return", "the", "file", "number", "of", "the", "current", "file", ".", "When", "no", "file", "is", "currently", "opened", "returns", "-", "1", "." ]
def fileno(): """ Return the file number of the current file. When no file is currently opened, returns -1. """ if not _state: raise RuntimeError("no active input()") return _state.fileno()
[ "def", "fileno", "(", ")", ":", "if", "not", "_state", ":", "raise", "RuntimeError", "(", "\"no active input()\"", ")", "return", "_state", ".", "fileno", "(", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/fileinput.py#L148-L155
llvm-mirror/lldb
d01083a850f577b85501a0902b52fd0930de72c7
third_party/Python/module/pexpect-4.6/pexpect/screen.py
python
screen.pretty
(self)
return top_bot + u'\n'.join([u'|'+line+u'|' for line in unicode(self).split(u'\n')]) + u'\n' + top_bot
This returns a copy of the screen as a unicode string with an ASCII text box around the screen border. This is similar to __str__/__unicode__ except that it adds a box.
This returns a copy of the screen as a unicode string with an ASCII text box around the screen border. This is similar to __str__/__unicode__ except that it adds a box.
[ "This", "returns", "a", "copy", "of", "the", "screen", "as", "a", "unicode", "string", "with", "an", "ASCII", "text", "box", "around", "the", "screen", "border", ".", "This", "is", "similar", "to", "__str__", "/", "__unicode__", "except", "that", "it", "...
def pretty (self): '''This returns a copy of the screen as a unicode string with an ASCII text box around the screen border. This is similar to __str__/__unicode__ except that it adds a box.''' top_bot = u'+' + u'-'*self.cols + u'+\n' return top_bot + u'\n'.join([u'|'+line+u'|' ...
[ "def", "pretty", "(", "self", ")", ":", "top_bot", "=", "u'+'", "+", "u'-'", "*", "self", ".", "cols", "+", "u'+\\n'", "return", "top_bot", "+", "u'\\n'", ".", "join", "(", "[", "u'|'", "+", "line", "+", "u'|'", "for", "line", "in", "unicode", "(",...
https://github.com/llvm-mirror/lldb/blob/d01083a850f577b85501a0902b52fd0930de72c7/third_party/Python/module/pexpect-4.6/pexpect/screen.py#L138-L144
shedskin/shedskin
ae88dbca7b1d9671cd8be448cb0b497122758936
examples/block.py
python
easytest
()
Tests block code with N=3, f=0.01 on a tiny example. >>> easytest() # doctest:+NORMALIZE_WHITESPACE #Symbol Count Codeword 000 (0.97) 1 001 (0.0098) 001 010 (0.0098) 010 011 (9.9e-05) 00001 100 (0.0098) 011 101 ...
Tests block code with N=3, f=0.01 on a tiny example. >>> easytest() # doctest:+NORMALIZE_WHITESPACE #Symbol Count Codeword 000 (0.97) 1 001 (0.0098) 001 010 (0.0098) 010 011 (9.9e-05) 00001 100 (0.0098) 011 101 ...
[ "Tests", "block", "code", "with", "N", "=", "3", "f", "=", "0", ".", "01", "on", "a", "tiny", "example", ".", ">>>", "easytest", "()", "#", "doctest", ":", "+", "NORMALIZE_WHITESPACE", "#Symbol", "Count", "Codeword", "000", "(", "0", ".", "97", ")", ...
def easytest(): """ Tests block code with N=3, f=0.01 on a tiny example. >>> easytest() # doctest:+NORMALIZE_WHITESPACE #Symbol Count Codeword 000 (0.97) 1 001 (0.0098) 001 010 (0.0098) 010 011 (9.9e-05) 00001 100 ...
[ "def", "easytest", "(", ")", ":", "N", "=", "3", "f", "=", "0.01", "probs", "=", "findprobs", "(", "f", ",", "N", ")", "# if len(probs) > 999 :", "# sys.setrecursionlimit( len(probs)+100 )", "symbols", "=", "makenodes", "(", "probs", ")", "# makenodes ...
https://github.com/shedskin/shedskin/blob/ae88dbca7b1d9671cd8be448cb0b497122758936/examples/block.py#L332-L370
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/turtle.py
python
TNavigator.back
(self, distance)
Move the turtle backward by distance. Aliases: back | backward | bk Argument: distance -- a number Move the turtle backward by distance ,opposite to the direction the turtle is headed. Do not change the turtle's heading. Example (for a Turtle instance named turtle): ...
Move the turtle backward by distance.
[ "Move", "the", "turtle", "backward", "by", "distance", "." ]
def back(self, distance): """Move the turtle backward by distance. Aliases: back | backward | bk Argument: distance -- a number Move the turtle backward by distance ,opposite to the direction the turtle is headed. Do not change the turtle's heading. Example (f...
[ "def", "back", "(", "self", ",", "distance", ")", ":", "self", ".", "_go", "(", "-", "distance", ")" ]
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/turtle.py#L1554-L1572