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
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_windows.py
python
FindDialogEvent.SetFlags
(*args, **kwargs)
return _windows_.FindDialogEvent_SetFlags(*args, **kwargs)
SetFlags(self, int flags)
SetFlags(self, int flags)
[ "SetFlags", "(", "self", "int", "flags", ")" ]
def SetFlags(*args, **kwargs): """SetFlags(self, int flags)""" return _windows_.FindDialogEvent_SetFlags(*args, **kwargs)
[ "def", "SetFlags", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_windows_", ".", "FindDialogEvent_SetFlags", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_windows.py#L3847-L3849
pyne/pyne
0c2714d7c0d1b5e20be6ae6527da2c660dd6b1b3
pyne/mcnp.py
python
PtracReader.read_next
(self, format, number=1, auto=False, raw_format=False)
Helper method for reading records from the Ptrac file. All binary records consist of the record content's length in bytes, the content itself and then the length again. format can be one of the struct module's format characters (i.e. i for an int, f for a float, s for a string). ...
Helper method for reading records from the Ptrac file. All binary records consist of the record content's length in bytes, the content itself and then the length again. format can be one of the struct module's format characters (i.e. i for an int, f for a float, s for a string). ...
[ "Helper", "method", "for", "reading", "records", "from", "the", "Ptrac", "file", ".", "All", "binary", "records", "consist", "of", "the", "record", "content", "s", "length", "in", "bytes", "the", "content", "itself", "and", "then", "the", "length", "again", ...
def read_next(self, format, number=1, auto=False, raw_format=False): """Helper method for reading records from the Ptrac file. All binary records consist of the record content's length in bytes, the content itself and then the length again. format can be one of the struct module's format...
[ "def", "read_next", "(", "self", ",", "format", ",", "number", "=", "1", ",", "auto", "=", "False", ",", "raw_format", "=", "False", ")", ":", "if", "self", ".", "eightbytes", "and", "(", "not", "raw_format", ")", "and", "format", "==", "'f'", ":", ...
https://github.com/pyne/pyne/blob/0c2714d7c0d1b5e20be6ae6527da2c660dd6b1b3/pyne/mcnp.py#L1089-L1157
GJDuck/LowFat
ecf6a0f0fa1b73a27a626cf493cc39e477b6faea
llvm-4.0.0.src/tools/clang/bindings/python/clang/cindex.py
python
SourceLocation.offset
(self)
return self._get_instantiation()[3]
Get the file offset represented by this source location.
Get the file offset represented by this source location.
[ "Get", "the", "file", "offset", "represented", "by", "this", "source", "location", "." ]
def offset(self): """Get the file offset represented by this source location.""" return self._get_instantiation()[3]
[ "def", "offset", "(", "self", ")", ":", "return", "self", ".", "_get_instantiation", "(", ")", "[", "3", "]" ]
https://github.com/GJDuck/LowFat/blob/ecf6a0f0fa1b73a27a626cf493cc39e477b6faea/llvm-4.0.0.src/tools/clang/bindings/python/clang/cindex.py#L213-L215
apple/swift-lldb
d74be846ef3e62de946df343e8c234bde93a8912
scripts/Python/static-binding/lldb.py
python
SBBroadcaster.AddInitialEventsToListener
(self, listener, requested_events)
return _lldb.SBBroadcaster_AddInitialEventsToListener(self, listener, requested_events)
AddInitialEventsToListener(SBBroadcaster self, SBListener listener, uint32_t requested_events)
AddInitialEventsToListener(SBBroadcaster self, SBListener listener, uint32_t requested_events)
[ "AddInitialEventsToListener", "(", "SBBroadcaster", "self", "SBListener", "listener", "uint32_t", "requested_events", ")" ]
def AddInitialEventsToListener(self, listener, requested_events): """AddInitialEventsToListener(SBBroadcaster self, SBListener listener, uint32_t requested_events)""" return _lldb.SBBroadcaster_AddInitialEventsToListener(self, listener, requested_events)
[ "def", "AddInitialEventsToListener", "(", "self", ",", "listener", ",", "requested_events", ")", ":", "return", "_lldb", ".", "SBBroadcaster_AddInitialEventsToListener", "(", "self", ",", "listener", ",", "requested_events", ")" ]
https://github.com/apple/swift-lldb/blob/d74be846ef3e62de946df343e8c234bde93a8912/scripts/Python/static-binding/lldb.py#L2436-L2438
apple/turicreate
cce55aa5311300e3ce6af93cb45ba791fd1bdf49
deps/src/libxml2-2.9.1/python/libxml2.py
python
uCSIsCatLt
(code)
return ret
Check whether the character is part of Lt UCS Category
Check whether the character is part of Lt UCS Category
[ "Check", "whether", "the", "character", "is", "part", "of", "Lt", "UCS", "Category" ]
def uCSIsCatLt(code): """Check whether the character is part of Lt UCS Category """ ret = libxml2mod.xmlUCSIsCatLt(code) return ret
[ "def", "uCSIsCatLt", "(", "code", ")", ":", "ret", "=", "libxml2mod", ".", "xmlUCSIsCatLt", "(", "code", ")", "return", "ret" ]
https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/deps/src/libxml2-2.9.1/python/libxml2.py#L2289-L2292
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/scipy/io/mmio.py
python
MMFile.read
(self, source)
Reads the contents of a Matrix Market file-like 'source' into a matrix. Parameters ---------- source : str or file-like Matrix Market filename (extensions .mtx, .mtz.gz) or open file object. Returns ------- a : ndarray or coo_matrix D...
Reads the contents of a Matrix Market file-like 'source' into a matrix.
[ "Reads", "the", "contents", "of", "a", "Matrix", "Market", "file", "-", "like", "source", "into", "a", "matrix", "." ]
def read(self, source): """ Reads the contents of a Matrix Market file-like 'source' into a matrix. Parameters ---------- source : str or file-like Matrix Market filename (extensions .mtx, .mtz.gz) or open file object. Returns ------- ...
[ "def", "read", "(", "self", ",", "source", ")", ":", "stream", ",", "close_it", "=", "self", ".", "_open", "(", "source", ")", "try", ":", "self", ".", "_parse_header", "(", "stream", ")", "return", "self", ".", "_parse_body", "(", "stream", ")", "fi...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/scipy/io/mmio.py#L395-L419
bristolcrypto/SPDZ-2
721abfae849625a02ea49aabc534f9cf41ca643f
Compiler/comparison.py
python
KMulC
(a)
return p
Return just the product of all items in a
Return just the product of all items in a
[ "Return", "just", "the", "product", "of", "all", "items", "in", "a" ]
def KMulC(a): """ Return just the product of all items in a """ from types import sint, cint p = sint() if use_inv: PreMulC_with_inverses(p, a) else: PreMulC_without_inverses(p, a) return p
[ "def", "KMulC", "(", "a", ")", ":", "from", "types", "import", "sint", ",", "cint", "p", "=", "sint", "(", ")", "if", "use_inv", ":", "PreMulC_with_inverses", "(", "p", ",", "a", ")", "else", ":", "PreMulC_without_inverses", "(", "p", ",", "a", ")", ...
https://github.com/bristolcrypto/SPDZ-2/blob/721abfae849625a02ea49aabc534f9cf41ca643f/Compiler/comparison.py#L500-L510
pmq20/node-packer
12c46c6e44fbc14d9ee645ebd17d5296b324f7e0
lts/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py
python
UnsetVariable
(output, variable_name)
Unsets a CMake variable.
Unsets a CMake variable.
[ "Unsets", "a", "CMake", "variable", "." ]
def UnsetVariable(output, variable_name): """Unsets a CMake variable.""" output.write('unset(') output.write(variable_name) output.write(')\n')
[ "def", "UnsetVariable", "(", "output", ",", "variable_name", ")", ":", "output", ".", "write", "(", "'unset('", ")", "output", ".", "write", "(", "variable_name", ")", "output", ".", "write", "(", "')\\n'", ")" ]
https://github.com/pmq20/node-packer/blob/12c46c6e44fbc14d9ee645ebd17d5296b324f7e0/lts/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py#L203-L207
google/earthenterprise
0fe84e29be470cd857e3a0e52e5d0afd5bb8cee9
earth_enterprise/src/server/wsgi/serve/push/search/core/search_push_manager.py
python
SearchPushManager.HandleLocalTransferRequest
(self, request, response)
Handles Local Transferring request. Args: request: request object. response: response object. Raises: SearchPushServeException, psycopg2.Warning/Error.
Handles Local Transferring request.
[ "Handles", "Local", "Transferring", "request", "." ]
def HandleLocalTransferRequest(self, request, response): """Handles Local Transferring request. Args: request: request object. response: response object. Raises: SearchPushServeException, psycopg2.Warning/Error. """ logger.debug("HandleLocalTransferRequest...") src_path = requ...
[ "def", "HandleLocalTransferRequest", "(", "self", ",", "request", ",", "response", ")", ":", "logger", ".", "debug", "(", "\"HandleLocalTransferRequest...\"", ")", "src_path", "=", "request", ".", "GetParameter", "(", "constants", ".", "FILE_PATH", ")", "dest_path...
https://github.com/google/earthenterprise/blob/0fe84e29be470cd857e3a0e52e5d0afd5bb8cee9/earth_enterprise/src/server/wsgi/serve/push/search/core/search_push_manager.py#L415-L444
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/_collections_abc.py
python
MutableMapping.update
(*args, **kwds)
D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = ...
D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = ...
[ "D", ".", "update", "(", "[", "E", "]", "**", "F", ")", "-", ">", "None", ".", "Update", "D", "from", "mapping", "/", "iterable", "E", "and", "F", ".", "If", "E", "present", "and", "has", "a", ".", "keys", "()", "method", "does", ":", "for", ...
def update(*args, **kwds): ''' D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is foll...
[ "def", "update", "(", "*", "args", ",", "*", "*", "kwds", ")", ":", "if", "not", "args", ":", "raise", "TypeError", "(", "\"descriptor 'update' of 'MutableMapping' object \"", "\"needs an argument\"", ")", "self", ",", "", "*", "args", "=", "args", "if", "le...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/_collections_abc.py#L824-L849
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_core.py
python
MenuItemList_iterator.next
(*args, **kwargs)
return _core_.MenuItemList_iterator_next(*args, **kwargs)
next(self) -> MenuItem
next(self) -> MenuItem
[ "next", "(", "self", ")", "-", ">", "MenuItem" ]
def next(*args, **kwargs): """next(self) -> MenuItem""" return _core_.MenuItemList_iterator_next(*args, **kwargs)
[ "def", "next", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "MenuItemList_iterator_next", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_core.py#L11954-L11956
infinisql/infinisql
6e858e142196e20b6779e1ee84c4a501e246c1f8
manager/infinisqlmgr/getifaddrs.py
python
getifaddrs
()
Wraps the C getifaddrs call, returns a list of pythonic ifaddrs
Wraps the C getifaddrs call, returns a list of pythonic ifaddrs
[ "Wraps", "the", "C", "getifaddrs", "call", "returns", "a", "list", "of", "pythonic", "ifaddrs" ]
def getifaddrs(): '''Wraps the C getifaddrs call, returns a list of pythonic ifaddrs''' ifap = POINTER(struct_ifaddrs)() result = _getifaddrs(pointer(ifap)) if result == -1: raise OSError(get_errno()) elif result == 0: pass else: assert False, result del result tr...
[ "def", "getifaddrs", "(", ")", ":", "ifap", "=", "POINTER", "(", "struct_ifaddrs", ")", "(", ")", "result", "=", "_getifaddrs", "(", "pointer", "(", "ifap", ")", ")", "if", "result", "==", "-", "1", ":", "raise", "OSError", "(", "get_errno", "(", ")"...
https://github.com/infinisql/infinisql/blob/6e858e142196e20b6779e1ee84c4a501e246c1f8/manager/infinisqlmgr/getifaddrs.py#L141-L164
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/stc.py
python
StyledTextCtrl.GetUseVerticalScrollBar
(*args, **kwargs)
return _stc.StyledTextCtrl_GetUseVerticalScrollBar(*args, **kwargs)
GetUseVerticalScrollBar(self) -> bool Is the vertical scroll bar visible?
GetUseVerticalScrollBar(self) -> bool
[ "GetUseVerticalScrollBar", "(", "self", ")", "-", ">", "bool" ]
def GetUseVerticalScrollBar(*args, **kwargs): """ GetUseVerticalScrollBar(self) -> bool Is the vertical scroll bar visible? """ return _stc.StyledTextCtrl_GetUseVerticalScrollBar(*args, **kwargs)
[ "def", "GetUseVerticalScrollBar", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_stc", ".", "StyledTextCtrl_GetUseVerticalScrollBar", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/stc.py#L4244-L4250
tomahawk-player/tomahawk-resolvers
7f827bbe410ccfdb0446f7d6a91acc2199c9cc8d
archive/spotify/breakpad/third_party/protobuf/protobuf/python/google/protobuf/internal/decoder.py
python
_StructPackDecoder
(wire_type, format)
return _SimpleDecoder(wire_type, InnerDecode)
Return a constructor for a decoder for a fixed-width field. Args: wire_type: The field's wire type. format: The format string to pass to struct.unpack().
Return a constructor for a decoder for a fixed-width field.
[ "Return", "a", "constructor", "for", "a", "decoder", "for", "a", "fixed", "-", "width", "field", "." ]
def _StructPackDecoder(wire_type, format): """Return a constructor for a decoder for a fixed-width field. Args: wire_type: The field's wire type. format: The format string to pass to struct.unpack(). """ value_size = struct.calcsize(format) local_unpack = struct.unpack # Reusing _SimpleDeco...
[ "def", "_StructPackDecoder", "(", "wire_type", ",", "format", ")", ":", "value_size", "=", "struct", ".", "calcsize", "(", "format", ")", "local_unpack", "=", "struct", ".", "unpack", "# Reusing _SimpleDecoder is slightly slower than copying a bunch of code, but", "# not ...
https://github.com/tomahawk-player/tomahawk-resolvers/blob/7f827bbe410ccfdb0446f7d6a91acc2199c9cc8d/archive/spotify/breakpad/third_party/protobuf/protobuf/python/google/protobuf/internal/decoder.py#L254-L276
eventql/eventql
7ca0dbb2e683b525620ea30dc40540a22d5eb227
deps/3rdparty/spidermonkey/mozjs/python/bitstring/bitstring.py
python
Bits._setint
(self, int_, length=None)
Reset the bitstring to have given signed int interpretation.
Reset the bitstring to have given signed int interpretation.
[ "Reset", "the", "bitstring", "to", "have", "given", "signed", "int", "interpretation", "." ]
def _setint(self, int_, length=None): """Reset the bitstring to have given signed int interpretation.""" # If no length given, and we've previously been given a length, use it. if length is None and hasattr(self, 'len') and self.len != 0: length = self.len if length is None o...
[ "def", "_setint", "(", "self", ",", "int_", ",", "length", "=", "None", ")", ":", "# If no length given, and we've previously been given a length, use it.", "if", "length", "is", "None", "and", "hasattr", "(", "self", ",", "'len'", ")", "and", "self", ".", "len"...
https://github.com/eventql/eventql/blob/7ca0dbb2e683b525620ea30dc40540a22d5eb227/deps/3rdparty/spidermonkey/mozjs/python/bitstring/bitstring.py#L1406-L1427
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/ipython/py2/IPython/utils/path.py
python
unquote_filename
(name, win32=(sys.platform=='win32'))
return name
On Windows, remove leading and trailing quotes from filenames. This function has been deprecated and should not be used any more: unquoting is now taken care of by :func:`IPython.utils.process.arg_split`.
On Windows, remove leading and trailing quotes from filenames.
[ "On", "Windows", "remove", "leading", "and", "trailing", "quotes", "from", "filenames", "." ]
def unquote_filename(name, win32=(sys.platform=='win32')): """ On Windows, remove leading and trailing quotes from filenames. This function has been deprecated and should not be used any more: unquoting is now taken care of by :func:`IPython.utils.process.arg_split`. """ warn("'unquote_filename' is...
[ "def", "unquote_filename", "(", "name", ",", "win32", "=", "(", "sys", ".", "platform", "==", "'win32'", ")", ")", ":", "warn", "(", "\"'unquote_filename' is deprecated since IPython 5.0 and should not \"", "\"be used anymore\"", ",", "DeprecationWarning", ",", "stackle...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/ipython/py2/IPython/utils/path.py#L73-L84
hakuna-m/wubiuefi
caec1af0a09c78fd5a345180ada1fe45e0c63493
src/sets/sets.py
python
Set.__hash__
(self)
A Set cannot be hashed.
A Set cannot be hashed.
[ "A", "Set", "cannot", "be", "hashed", "." ]
def __hash__(self): """A Set cannot be hashed.""" # We inherit object.__hash__, so we must deny this explicitly raise TypeError, "Can't hash a Set, only an ImmutableSet."
[ "def", "__hash__", "(", "self", ")", ":", "# We inherit object.__hash__, so we must deny this explicitly", "raise", "TypeError", ",", "\"Can't hash a Set, only an ImmutableSet.\"" ]
https://github.com/hakuna-m/wubiuefi/blob/caec1af0a09c78fd5a345180ada1fe45e0c63493/src/sets/sets.py#L438-L441
mongodb/mongo
d8ff665343ad29cf286ee2cf4a1960d29371937b
src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Node/FS.py
python
Dir._morph
(self)
Turn a file system Node (either a freshly initialized directory object or a separate Entry object) into a proper directory object. Set up this directory's entries and hook it into the file system tree. Specify that directories (this Node) don't use signatures for calculating whether th...
Turn a file system Node (either a freshly initialized directory object or a separate Entry object) into a proper directory object.
[ "Turn", "a", "file", "system", "Node", "(", "either", "a", "freshly", "initialized", "directory", "object", "or", "a", "separate", "Entry", "object", ")", "into", "a", "proper", "directory", "object", "." ]
def _morph(self): """Turn a file system Node (either a freshly initialized directory object or a separate Entry object) into a proper directory object. Set up this directory's entries and hook it into the file system tree. Specify that directories (this Node) don't use signatur...
[ "def", "_morph", "(", "self", ")", ":", "self", ".", "repositories", "=", "[", "]", "self", ".", "srcdir", "=", "None", "self", ".", "entries", "=", "{", "}", "self", ".", "entries", "[", "'.'", "]", "=", "self", "self", ".", "entries", "[", "'.....
https://github.com/mongodb/mongo/blob/d8ff665343ad29cf286ee2cf4a1960d29371937b/src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Node/FS.py#L1539-L1603
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/prefdlg.py
python
DocSyntaxPanel.OnSynChange
(evt)
Handles the events from checkbox and choice control for this panel @param evt: event that called this handler @postcondition: all text controls are updated to reflect the changes made in these controls.
Handles the events from checkbox and choice control for this panel @param evt: event that called this handler @postcondition: all text controls are updated to reflect the changes made in these controls.
[ "Handles", "the", "events", "from", "checkbox", "and", "choice", "control", "for", "this", "panel", "@param", "evt", ":", "event", "that", "called", "this", "handler", "@postcondition", ":", "all", "text", "controls", "are", "updated", "to", "reflect", "the", ...
def OnSynChange(evt): """Handles the events from checkbox and choice control for this panel @param evt: event that called this handler @postcondition: all text controls are updated to reflect the changes made in these controls. """ e_id = evt.GetId() ...
[ "def", "OnSynChange", "(", "evt", ")", ":", "e_id", "=", "evt", ".", "GetId", "(", ")", "e_obj", "=", "evt", ".", "GetEventObject", "(", ")", "if", "e_id", "in", "(", "ed_glob", ".", "ID_PREF_SYNTHEME", ",", "ed_glob", ".", "ID_SYNTAX", ")", ":", "Pr...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/prefdlg.py#L1174-L1186
google/perfetto
fe68c7a7f7657aa71ced68efb126dcac4107c745
tools/write_version_header.py
python
get_latest_release
(changelog_path)
Returns a string like 'v9.0'. It does so by searching the latest version mentioned in the CHANGELOG.
Returns a string like 'v9.0'.
[ "Returns", "a", "string", "like", "v9", ".", "0", "." ]
def get_latest_release(changelog_path): """Returns a string like 'v9.0'. It does so by searching the latest version mentioned in the CHANGELOG.""" if not changelog_path: if os.path.exists('CHANGELOG'): changelog_path = 'CHANGELOG' else: changelog_path = os.path.join(PROJECT_ROOT, 'CHANGELOG')...
[ "def", "get_latest_release", "(", "changelog_path", ")", ":", "if", "not", "changelog_path", ":", "if", "os", ".", "path", ".", "exists", "(", "'CHANGELOG'", ")", ":", "changelog_path", "=", "'CHANGELOG'", "else", ":", "changelog_path", "=", "os", ".", "path...
https://github.com/google/perfetto/blob/fe68c7a7f7657aa71ced68efb126dcac4107c745/tools/write_version_header.py#L41-L55
y123456yz/reading-and-annotate-mongodb-3.6
93280293672ca7586dc24af18132aa61e4ed7fcf
mongo/src/third_party/scons-2.5.0/scons-local-2.5.0/SCons/Script/SConsOptions.py
python
SConsOptionGroup.format_help
(self, formatter)
return result
Format an option group's help text, outdenting the title so it's flush with the "SCons Options" title we print at the top.
Format an option group's help text, outdenting the title so it's flush with the "SCons Options" title we print at the top.
[ "Format", "an", "option", "group", "s", "help", "text", "outdenting", "the", "title", "so", "it", "s", "flush", "with", "the", "SCons", "Options", "title", "we", "print", "at", "the", "top", "." ]
def format_help(self, formatter): """ Format an option group's help text, outdenting the title so it's flush with the "SCons Options" title we print at the top. """ formatter.dedent() result = formatter.format_heading(self.title) formatter.indent() result ...
[ "def", "format_help", "(", "self", ",", "formatter", ")", ":", "formatter", ".", "dedent", "(", ")", "result", "=", "formatter", ".", "format_heading", "(", "self", ".", "title", ")", "formatter", ".", "indent", "(", ")", "result", "=", "result", "+", ...
https://github.com/y123456yz/reading-and-annotate-mongodb-3.6/blob/93280293672ca7586dc24af18132aa61e4ed7fcf/mongo/src/third_party/scons-2.5.0/scons-local-2.5.0/SCons/Script/SConsOptions.py#L256-L265
gnuradio/gnuradio
09c3c4fa4bfb1a02caac74cb5334dfe065391e3b
gr-fft/python/fft/logpwrfft.py
python
_logpwrfft_base.sample_rate
(self)
return self._sd.sample_rate()
Return the current sample rate.
Return the current sample rate.
[ "Return", "the", "current", "sample", "rate", "." ]
def sample_rate(self): """ Return the current sample rate. """ return self._sd.sample_rate()
[ "def", "sample_rate", "(", "self", ")", ":", "return", "self", ".", "_sd", ".", "sample_rate", "(", ")" ]
https://github.com/gnuradio/gnuradio/blob/09c3c4fa4bfb1a02caac74cb5334dfe065391e3b/gr-fft/python/fft/logpwrfft.py#L126-L130
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/runpy.py
python
run_path
(path_name, init_globals=None, run_name=None)
Execute code located at the specified filesystem location Returns the resulting top level namespace dictionary The file path may refer directly to a Python script (i.e. one that could be directly executed with execfile) or else it may refer to a zipfile or directory containing a top ...
Execute code located at the specified filesystem location
[ "Execute", "code", "located", "at", "the", "specified", "filesystem", "location" ]
def run_path(path_name, init_globals=None, run_name=None): """Execute code located at the specified filesystem location Returns the resulting top level namespace dictionary The file path may refer directly to a Python script (i.e. one that could be directly executed with execfile) or else ...
[ "def", "run_path", "(", "path_name", ",", "init_globals", "=", "None", ",", "run_name", "=", "None", ")", ":", "if", "run_name", "is", "None", ":", "run_name", "=", "\"<run_path>\"", "importer", "=", "_get_importer", "(", "path_name", ")", "if", "isinstance"...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/runpy.py#L223-L269
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/richtext.py
python
RichTextBuffer.BeginFont
(*args, **kwargs)
return _richtext.RichTextBuffer_BeginFont(*args, **kwargs)
BeginFont(self, Font font) -> bool
BeginFont(self, Font font) -> bool
[ "BeginFont", "(", "self", "Font", "font", ")", "-", ">", "bool" ]
def BeginFont(*args, **kwargs): """BeginFont(self, Font font) -> bool""" return _richtext.RichTextBuffer_BeginFont(*args, **kwargs)
[ "def", "BeginFont", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_richtext", ".", "RichTextBuffer_BeginFont", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/richtext.py#L2365-L2367
apache/mesos
97d9a4063332aae3825d78de71611657e05cf5e2
support/cpplint.py
python
_ClassifyInclude
(fileinfo, include, is_system)
return _OTHER_HEADER
Figures out what kind of header 'include' is. Args: fileinfo: The current file cpplint is running over. A FileInfo instance. include: The path to a #included file. is_system: True if the #include used <> rather than "". Returns: One of the _XXX_HEADER constants. For example: >>> _ClassifyIn...
Figures out what kind of header 'include' is.
[ "Figures", "out", "what", "kind", "of", "header", "include", "is", "." ]
def _ClassifyInclude(fileinfo, include, is_system): """Figures out what kind of header 'include' is. Args: fileinfo: The current file cpplint is running over. A FileInfo instance. include: The path to a #included file. is_system: True if the #include used <> rather than "". Returns: One of the _...
[ "def", "_ClassifyInclude", "(", "fileinfo", ",", "include", ",", "is_system", ")", ":", "# This is a list of all standard c++ header files, except", "# those already checked for above.", "is_cpp_h", "=", "include", "in", "_CPP_HEADERS", "if", "is_system", ":", "if", "is_cpp...
https://github.com/apache/mesos/blob/97d9a4063332aae3825d78de71611657e05cf5e2/support/cpplint.py#L4466-L4522
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/setup.py
python
find_classifiers
(docs)
return []
Determine classifiers from CLASSIFIERS :return: List of classifiers (``['classifier', ...]``) :rtype: ``list``
Determine classifiers from CLASSIFIERS
[ "Determine", "classifiers", "from", "CLASSIFIERS" ]
def find_classifiers(docs): """ Determine classifiers from CLASSIFIERS :return: List of classifiers (``['classifier', ...]``) :rtype: ``list`` """ filename = docs.get('meta.classifiers', 'CLASSIFIERS').strip() if filename and _os.path.isfile(filename): fp = open(filename, encoding='...
[ "def", "find_classifiers", "(", "docs", ")", ":", "filename", "=", "docs", ".", "get", "(", "'meta.classifiers'", ",", "'CLASSIFIERS'", ")", ".", "strip", "(", ")", "if", "filename", "and", "_os", ".", "path", ".", "isfile", "(", "filename", ")", ":", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/setup.py#L120-L136
apple/turicreate
cce55aa5311300e3ce6af93cb45ba791fd1bdf49
deps/src/libxml2-2.9.1/python/libxml2.py
python
xpathParserContext.xpathFalseFunction
(self, nargs)
Implement the false() XPath function boolean false()
Implement the false() XPath function boolean false()
[ "Implement", "the", "false", "()", "XPath", "function", "boolean", "false", "()" ]
def xpathFalseFunction(self, nargs): """Implement the false() XPath function boolean false() """ libxml2mod.xmlXPathFalseFunction(self._o, nargs)
[ "def", "xpathFalseFunction", "(", "self", ",", "nargs", ")", ":", "libxml2mod", ".", "xmlXPathFalseFunction", "(", "self", ".", "_o", ",", "nargs", ")" ]
https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/deps/src/libxml2-2.9.1/python/libxml2.py#L7510-L7512
microsoft/onnxruntime
f92e47e95b13a240e37caf7b36577983544f98fc
onnxruntime/python/tools/transformers/fusion_embedlayer.py
python
FusionEmbedLayerNoMask.fuse_distilbert
(self, layernorm, add_before_layernorm, input_name_to_nodes, output_name_to_node)
return True
Fuse embedding layer for DistilBert Args: layernorm (NodeProto): node of LayerNormalization or SkipLayerNormalization add_before_layernorm (NodeProto): the Add node before LayerNormalization, or the SkipLayerNormalization itself input_name_to_nodes (Dict[str, List[NodeProto]]...
Fuse embedding layer for DistilBert Args: layernorm (NodeProto): node of LayerNormalization or SkipLayerNormalization add_before_layernorm (NodeProto): the Add node before LayerNormalization, or the SkipLayerNormalization itself input_name_to_nodes (Dict[str, List[NodeProto]]...
[ "Fuse", "embedding", "layer", "for", "DistilBert", "Args", ":", "layernorm", "(", "NodeProto", ")", ":", "node", "of", "LayerNormalization", "or", "SkipLayerNormalization", "add_before_layernorm", "(", "NodeProto", ")", ":", "the", "Add", "node", "before", "LayerN...
def fuse_distilbert(self, layernorm, add_before_layernorm, input_name_to_nodes, output_name_to_node): """Fuse embedding layer for DistilBert Args: layernorm (NodeProto): node of LayerNormalization or SkipLayerNormalization add_before_layernorm (NodeProto): the Add node before Lay...
[ "def", "fuse_distilbert", "(", "self", ",", "layernorm", ",", "add_before_layernorm", ",", "input_name_to_nodes", ",", "output_name_to_node", ")", ":", "# DistilBert has no segment embedding, subgraph pattern is like", "# input_ids", "# | \\", "# | (pos...
https://github.com/microsoft/onnxruntime/blob/f92e47e95b13a240e37caf7b36577983544f98fc/onnxruntime/python/tools/transformers/fusion_embedlayer.py#L497-L535
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/build/waf-1.7.13/lmbrwaflib/msvs.py
python
msvs_generator.get_enabled_vs_configurations
(self, platforms_list, enabled_specs)
return list(sorted(vs_configurations))
Base on the enabled specs, build up a list of all the configurations
Base on the enabled specs, build up a list of all the configurations
[ "Base", "on", "the", "enabled", "specs", "build", "up", "a", "list", "of", "all", "the", "configurations" ]
def get_enabled_vs_configurations(self, platforms_list, enabled_specs): """ Base on the enabled specs, build up a list of all the configurations """ # Go through each of platforms and collect the common configurations platform_configurations_set = set() for platform in pl...
[ "def", "get_enabled_vs_configurations", "(", "self", ",", "platforms_list", ",", "enabled_specs", ")", ":", "# Go through each of platforms and collect the common configurations", "platform_configurations_set", "=", "set", "(", ")", "for", "platform", "in", "platforms_list", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/build/waf-1.7.13/lmbrwaflib/msvs.py#L1828-L1865
netket/netket
0d534e54ecbf25b677ea72af6b85947979420652
netket/jax/utils.py
python
tree_conj
(t: PyTree)
return jax.tree_map(lambda x: jax.lax.conj(x) if jnp.iscomplexobj(x) else x, t)
r""" Conjugate all complex leaves. The real leaves are left untouched. Args: t: pytree
r""" Conjugate all complex leaves. The real leaves are left untouched. Args: t: pytree
[ "r", "Conjugate", "all", "complex", "leaves", ".", "The", "real", "leaves", "are", "left", "untouched", ".", "Args", ":", "t", ":", "pytree" ]
def tree_conj(t: PyTree) -> PyTree: r""" Conjugate all complex leaves. The real leaves are left untouched. Args: t: pytree """ return jax.tree_map(lambda x: jax.lax.conj(x) if jnp.iscomplexobj(x) else x, t)
[ "def", "tree_conj", "(", "t", ":", "PyTree", ")", "->", "PyTree", ":", "return", "jax", ".", "tree_map", "(", "lambda", "x", ":", "jax", ".", "lax", ".", "conj", "(", "x", ")", "if", "jnp", ".", "iscomplexobj", "(", "x", ")", "else", "x", ",", ...
https://github.com/netket/netket/blob/0d534e54ecbf25b677ea72af6b85947979420652/netket/jax/utils.py#L172-L178
SoarGroup/Soar
a1c5e249499137a27da60533c72969eef3b8ab6b
scons/scons-local-4.1.0/SCons/Node/__init__.py
python
Node.GetTag
(self, key)
return self._tags.get(key, None)
Return a user-defined tag.
Return a user-defined tag.
[ "Return", "a", "user", "-", "defined", "tag", "." ]
def GetTag(self, key): """ Return a user-defined tag. """ if not self._tags: return None return self._tags.get(key, None)
[ "def", "GetTag", "(", "self", ",", "key", ")", ":", "if", "not", "self", ".", "_tags", ":", "return", "None", "return", "self", ".", "_tags", ".", "get", "(", "key", ",", "None", ")" ]
https://github.com/SoarGroup/Soar/blob/a1c5e249499137a27da60533c72969eef3b8ab6b/scons/scons-local-4.1.0/SCons/Node/__init__.py#L1441-L1445
ucbrise/clipper
9f25e3fc7f8edc891615e81c5b80d3d8aed72608
clipper_admin/clipper_admin/deployers/mxnet.py
python
create_endpoint
(clipper_conn, name, input_type, func, mxnet_model, mxnet_data_shapes, default_output="None", version=1, slo_micros=3000000, labels=None, ...
Registers an app and deploys the provided predict function with MXNet model as a Clipper model. Parameters ---------- clipper_conn : :py:meth:`clipper_admin.ClipperConnection` A ``ClipperConnection`` object connected to a running Clipper cluster. name : str The name to be assigned t...
Registers an app and deploys the provided predict function with MXNet model as a Clipper model.
[ "Registers", "an", "app", "and", "deploys", "the", "provided", "predict", "function", "with", "MXNet", "model", "as", "a", "Clipper", "model", "." ]
def create_endpoint(clipper_conn, name, input_type, func, mxnet_model, mxnet_data_shapes, default_output="None", version=1, slo_micros=3000000, ...
[ "def", "create_endpoint", "(", "clipper_conn", ",", "name", ",", "input_type", ",", "func", ",", "mxnet_model", ",", "mxnet_data_shapes", ",", "default_output", "=", "\"None\"", ",", "version", "=", "1", ",", "slo_micros", "=", "3000000", ",", "labels", "=", ...
https://github.com/ucbrise/clipper/blob/9f25e3fc7f8edc891615e81c5b80d3d8aed72608/clipper_admin/clipper_admin/deployers/mxnet.py#L17-L115
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/contrib/crf/python/ops/crf.py
python
crf_decode
(potentials, transition_params, sequence_length)
return decode_tags, best_score
Decode the highest scoring sequence of tags in TensorFlow. This is a function for tensor. Args: potentials: A [batch_size, max_seq_len, num_tags] tensor, matrix of unary potentials. transition_params: A [num_tags, num_tags] tensor, matrix of binary potentials. sequence_leng...
Decode the highest scoring sequence of tags in TensorFlow.
[ "Decode", "the", "highest", "scoring", "sequence", "of", "tags", "in", "TensorFlow", "." ]
def crf_decode(potentials, transition_params, sequence_length): """Decode the highest scoring sequence of tags in TensorFlow. This is a function for tensor. Args: potentials: A [batch_size, max_seq_len, num_tags] tensor, matrix of unary potentials. transition_params: A [num_tags, num_tags]...
[ "def", "crf_decode", "(", "potentials", ",", "transition_params", ",", "sequence_length", ")", ":", "# For simplicity, in shape comments, denote:", "# 'batch_size' by 'B', 'max_seq_len' by 'T' , 'num_tags' by 'O' (output).", "num_tags", "=", "potentials", ".", "get_shape", "(", "...
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/contrib/crf/python/ops/crf.py#L423-L477
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/klampt/src/robotsim.py
python
PointCloud.setDepthImage_d
(self, intrinsics: "double const [4]", np_array2: "double *", depth_scale: "double")
return _robotsim.PointCloud_setDepthImage_d(self, intrinsics, np_array2, depth_scale)
r""" setDepthImage_d(PointCloud self, double const [4] intrinsics, double * np_array2, double depth_scale) Sets a structured point cloud from a depth image. [fx,fy,cx,cy] are the intrinsics parameters. The depth is given as a size hxw array, top to bottom.
r""" setDepthImage_d(PointCloud self, double const [4] intrinsics, double * np_array2, double depth_scale)
[ "r", "setDepthImage_d", "(", "PointCloud", "self", "double", "const", "[", "4", "]", "intrinsics", "double", "*", "np_array2", "double", "depth_scale", ")" ]
def setDepthImage_d(self, intrinsics: "double const [4]", np_array2: "double *", depth_scale: "double") -> "void": r""" setDepthImage_d(PointCloud self, double const [4] intrinsics, double * np_array2, double depth_scale) Sets a structured point cloud from a depth image. [fx,fy,cx,cy] are the ...
[ "def", "setDepthImage_d", "(", "self", ",", "intrinsics", ":", "\"double const [4]\"", ",", "np_array2", ":", "\"double *\"", ",", "depth_scale", ":", "\"double\"", ")", "->", "\"void\"", ":", "return", "_robotsim", ".", "PointCloud_setDepthImage_d", "(", "self", ...
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/klampt/src/robotsim.py#L1379-L1388
idaholab/moose
9eeebc65e098b4c30f8205fb41591fd5b61eb6ff
python/MooseDocs/base/executioners.py
python
ParallelBarrier._target
(self, nodes, barrier, page_attributes, read, tokenize, render, write)
Target function for multiprocessing.Process() calls.
Target function for multiprocessing.Process() calls.
[ "Target", "function", "for", "multiprocessing", ".", "Process", "()", "calls", "." ]
def _target(self, nodes, barrier, page_attributes, read, tokenize, render, write): """Target function for multiprocessing.Process() calls.""" if read: for node in nodes: self._page_content[node.uid] = self.read(node) page_attributes[node.uid] = node.attribute...
[ "def", "_target", "(", "self", ",", "nodes", ",", "barrier", ",", "page_attributes", ",", "read", ",", "tokenize", ",", "render", ",", "write", ")", ":", "if", "read", ":", "for", "node", "in", "nodes", ":", "self", ".", "_page_content", "[", "node", ...
https://github.com/idaholab/moose/blob/9eeebc65e098b4c30f8205fb41591fd5b61eb6ff/python/MooseDocs/base/executioners.py#L562-L594
microsoft/AirSim
8057725712c0cd46979135396381784075ffc0f3
PythonClient/airsim/client.py
python
VehicleClient.getLidarData
(self, lidar_name = '', vehicle_name = '')
return LidarData.from_msgpack(self.client.call('getLidarData', lidar_name, vehicle_name))
Args: lidar_name (str, optional): Name of Lidar to get data from, specified in settings.json vehicle_name (str, optional): Name of vehicle to which the sensor corresponds to Returns: LidarData:
Args: lidar_name (str, optional): Name of Lidar to get data from, specified in settings.json vehicle_name (str, optional): Name of vehicle to which the sensor corresponds to
[ "Args", ":", "lidar_name", "(", "str", "optional", ")", ":", "Name", "of", "Lidar", "to", "get", "data", "from", "specified", "in", "settings", ".", "json", "vehicle_name", "(", "str", "optional", ")", ":", "Name", "of", "vehicle", "to", "which", "the", ...
def getLidarData(self, lidar_name = '', vehicle_name = ''): """ Args: lidar_name (str, optional): Name of Lidar to get data from, specified in settings.json vehicle_name (str, optional): Name of vehicle to which the sensor corresponds to Returns: LidarData: ...
[ "def", "getLidarData", "(", "self", ",", "lidar_name", "=", "''", ",", "vehicle_name", "=", "''", ")", ":", "return", "LidarData", ".", "from_msgpack", "(", "self", ".", "client", ".", "call", "(", "'getLidarData'", ",", "lidar_name", ",", "vehicle_name", ...
https://github.com/microsoft/AirSim/blob/8057725712c0cd46979135396381784075ffc0f3/PythonClient/airsim/client.py#L894-L903
oracle/graaljs
36a56e8e993d45fc40939a3a4d9c0c24990720f1
graal-nodejs/tools/inspector_protocol/jinja2/environment.py
python
Environment._generate
(self, source, name, filename, defer_init=False)
return generate(source, self, name, filename, defer_init=defer_init, optimized=self.optimized)
Internal hook that can be overridden to hook a different generate method in. .. versionadded:: 2.5
Internal hook that can be overridden to hook a different generate method in.
[ "Internal", "hook", "that", "can", "be", "overridden", "to", "hook", "a", "different", "generate", "method", "in", "." ]
def _generate(self, source, name, filename, defer_init=False): """Internal hook that can be overridden to hook a different generate method in. .. versionadded:: 2.5 """ return generate(source, self, name, filename, defer_init=defer_init, optimized=self.op...
[ "def", "_generate", "(", "self", ",", "source", ",", "name", ",", "filename", ",", "defer_init", "=", "False", ")", ":", "return", "generate", "(", "source", ",", "self", ",", "name", ",", "filename", ",", "defer_init", "=", "defer_init", ",", "optimized...
https://github.com/oracle/graaljs/blob/36a56e8e993d45fc40939a3a4d9c0c24990720f1/graal-nodejs/tools/inspector_protocol/jinja2/environment.py#L536-L543
wujixiu/helmet-detection
8eff5c59ddfba5a29e0b76aeb48babcb49246178
hardhat-wearing-detection/SSD-RPA/scripts/cpp_lint.py
python
FindStartOfExpressionInLine
(line, endpos, depth, startchar, endchar)
return (-1, depth)
Find position at the matching startchar. This is almost the reverse of FindEndOfExpressionInLine, but note that the input position and returned position differs by 1. Args: line: a CleansedLines line. endpos: start searching at this position. depth: nesting level at endpos. startchar: expression...
Find position at the matching startchar.
[ "Find", "position", "at", "the", "matching", "startchar", "." ]
def FindStartOfExpressionInLine(line, endpos, depth, startchar, endchar): """Find position at the matching startchar. This is almost the reverse of FindEndOfExpressionInLine, but note that the input position and returned position differs by 1. Args: line: a CleansedLines line. endpos: start searching ...
[ "def", "FindStartOfExpressionInLine", "(", "line", ",", "endpos", ",", "depth", ",", "startchar", ",", "endchar", ")", ":", "for", "i", "in", "xrange", "(", "endpos", ",", "-", "1", ",", "-", "1", ")", ":", "if", "line", "[", "i", "]", "==", "endch...
https://github.com/wujixiu/helmet-detection/blob/8eff5c59ddfba5a29e0b76aeb48babcb49246178/hardhat-wearing-detection/SSD-RPA/scripts/cpp_lint.py#L1300-L1324
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemFramework/v1/AWS/common-code/lib/OpenSSL/SSL.py
python
Connection.sock_shutdown
(self, *args, **kwargs)
return self._socket.shutdown(*args, **kwargs)
Call the :meth:`shutdown` method of the underlying socket. See :manpage:`shutdown(2)`. :return: What the socket's shutdown() method returns
Call the :meth:`shutdown` method of the underlying socket. See :manpage:`shutdown(2)`.
[ "Call", "the", ":", "meth", ":", "shutdown", "method", "of", "the", "underlying", "socket", ".", "See", ":", "manpage", ":", "shutdown", "(", "2", ")", "." ]
def sock_shutdown(self, *args, **kwargs): """ Call the :meth:`shutdown` method of the underlying socket. See :manpage:`shutdown(2)`. :return: What the socket's shutdown() method returns """ return self._socket.shutdown(*args, **kwargs)
[ "def", "sock_shutdown", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "self", ".", "_socket", ".", "shutdown", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemFramework/v1/AWS/common-code/lib/OpenSSL/SSL.py#L2197-L2204
tkn-tub/ns3-gym
19bfe0a583e641142609939a090a09dfc63a095f
utils/grid.py
python
GraphicRenderer.get_selection_rectangle
(self)
return(x_start, y_start, x_end - x_start, y_height)
! Get Selection Rectangle @param self this object @return rectangle
! Get Selection Rectangle
[ "!", "Get", "Selection", "Rectangle" ]
def get_selection_rectangle(self): """! Get Selection Rectangle @param self this object @return rectangle """ y_start = self.__top_legend.get_height() + self.__data.get_height() + self.__mid_scale.get_height() + 20 y_height = self.__bot_scale.get_height() + 20 x_...
[ "def", "get_selection_rectangle", "(", "self", ")", ":", "y_start", "=", "self", ".", "__top_legend", ".", "get_height", "(", ")", "+", "self", ".", "__data", ".", "get_height", "(", ")", "+", "self", ".", "__mid_scale", ".", "get_height", "(", ")", "+",...
https://github.com/tkn-tub/ns3-gym/blob/19bfe0a583e641142609939a090a09dfc63a095f/utils/grid.py#L1052-L1061
kamyu104/LeetCode-Solutions
77605708a927ea3b85aee5a479db733938c7c211
Python/dinner-plate-stacks.py
python
DinnerPlates.pop
(self)
return self.__stks[-1].pop()
:rtype: int
:rtype: int
[ ":", "rtype", ":", "int" ]
def pop(self): """ :rtype: int """ while self.__stks and not self.__stks[-1]: self.__stks.pop() if not self.__stks: return -1 return self.__stks[-1].pop()
[ "def", "pop", "(", "self", ")", ":", "while", "self", ".", "__stks", "and", "not", "self", ".", "__stks", "[", "-", "1", "]", ":", "self", ".", "__stks", ".", "pop", "(", ")", "if", "not", "self", ".", "__stks", ":", "return", "-", "1", "return...
https://github.com/kamyu104/LeetCode-Solutions/blob/77605708a927ea3b85aee5a479db733938c7c211/Python/dinner-plate-stacks.py#L34-L42
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_windows.py
python
Frame.SetMenuBar
(*args, **kwargs)
return _windows_.Frame_SetMenuBar(*args, **kwargs)
SetMenuBar(self, MenuBar menubar)
SetMenuBar(self, MenuBar menubar)
[ "SetMenuBar", "(", "self", "MenuBar", "menubar", ")" ]
def SetMenuBar(*args, **kwargs): """SetMenuBar(self, MenuBar menubar)""" return _windows_.Frame_SetMenuBar(*args, **kwargs)
[ "def", "SetMenuBar", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_windows_", ".", "Frame_SetMenuBar", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_windows.py#L591-L593
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/logging/handlers.py
python
SysLogHandler.__init__
(self, address=('localhost', SYSLOG_UDP_PORT), facility=LOG_USER, socktype=None)
Initialize a handler. If address is specified as a string, a UNIX socket is used. To log to a local syslogd, "SysLogHandler(address="/dev/log")" can be used. If facility is not specified, LOG_USER is used. If socktype is specified as socket.SOCK_DGRAM or socket.SOCK_STREAM, that specifi...
Initialize a handler.
[ "Initialize", "a", "handler", "." ]
def __init__(self, address=('localhost', SYSLOG_UDP_PORT), facility=LOG_USER, socktype=None): """ Initialize a handler. If address is specified as a string, a UNIX socket is used. To log to a local syslogd, "SysLogHandler(address="/dev/log")" can be used. If fac...
[ "def", "__init__", "(", "self", ",", "address", "=", "(", "'localhost'", ",", "SYSLOG_UDP_PORT", ")", ",", "facility", "=", "LOG_USER", ",", "socktype", "=", "None", ")", ":", "logging", ".", "Handler", ".", "__init__", "(", "self", ")", "self", ".", "...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/logging/handlers.py#L739-L769
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/botocore/credentials.py
python
RefreshableCredentials.get_frozen_credentials
(self)
return self._frozen_credentials
Return immutable credentials. The ``access_key``, ``secret_key``, and ``token`` properties on this class will always check and refresh credentials if needed before returning the particular credentials. This has an edge case where you can get inconsistent credentials. Imagine t...
Return immutable credentials.
[ "Return", "immutable", "credentials", "." ]
def get_frozen_credentials(self): """Return immutable credentials. The ``access_key``, ``secret_key``, and ``token`` properties on this class will always check and refresh credentials if needed before returning the particular credentials. This has an edge case where you can get...
[ "def", "get_frozen_credentials", "(", "self", ")", ":", "self", ".", "_refresh", "(", ")", "return", "self", ".", "_frozen_credentials" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/botocore/credentials.py#L557-L592
google/usd_from_gltf
6d288cce8b68744494a226574ae1d7ba6a9c46eb
tools/ufgbatch/ufgcommon/util.py
python
enable_ansi_colors
()
Enable ANSI text colorization.
Enable ANSI text colorization.
[ "Enable", "ANSI", "text", "colorization", "." ]
def enable_ansi_colors(): """Enable ANSI text colorization.""" # On Windows this is done via SetConsoleMode, but rather than go through the # hassle of importing the function from a system DLL, just call the 'color' # console command to do it for us. if platform.system() == 'Windows': os.system('color')
[ "def", "enable_ansi_colors", "(", ")", ":", "# On Windows this is done via SetConsoleMode, but rather than go through the", "# hassle of importing the function from a system DLL, just call the 'color'", "# console command to do it for us.", "if", "platform", ".", "system", "(", ")", "=="...
https://github.com/google/usd_from_gltf/blob/6d288cce8b68744494a226574ae1d7ba6a9c46eb/tools/ufgbatch/ufgcommon/util.py#L58-L64
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/telemetry/telemetry/value/summarizable.py
python
SummarizableValue.__init__
(self, page, name, units, important, description, tir_label, improvement_direction, grouping_keys)
A summarizable value result from a test.
A summarizable value result from a test.
[ "A", "summarizable", "value", "result", "from", "a", "test", "." ]
def __init__(self, page, name, units, important, description, tir_label, improvement_direction, grouping_keys): """A summarizable value result from a test.""" super(SummarizableValue, self).__init__( page, name, units, important, description, tir_label, grouping_keys) # TODO(eakuefner): u...
[ "def", "__init__", "(", "self", ",", "page", ",", "name", ",", "units", ",", "important", ",", "description", ",", "tir_label", ",", "improvement_direction", ",", "grouping_keys", ")", ":", "super", "(", "SummarizableValue", ",", "self", ")", ".", "__init__"...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/telemetry/telemetry/value/summarizable.py#L11-L19
sofa-framework/sofa
70628e35a44fcc258cf8250109b5e4eba8c5abe9
applications/plugins/PSL/python/pslparserhjson.py
python
mlscanstring
(s, end)
return (('m', str(r[0])), r[1])
Transform the returned string from the scanner into a string tuple encoding the type of string for further processin. This function scans multiline string and returns ('m', "value")
Transform the returned string from the scanner into a string tuple encoding the type of string for further processin. This function scans multiline string and returns ('m', "value")
[ "Transform", "the", "returned", "string", "from", "the", "scanner", "into", "a", "string", "tuple", "encoding", "the", "type", "of", "string", "for", "further", "processin", ".", "This", "function", "scans", "multiline", "string", "and", "returns", "(", "m", ...
def mlscanstring(s, end): '''Transform the returned string from the scanner into a string tuple encoding the type of string for further processin. This function scans multiline string and returns ('m', "value") ''' r=decoder.mlscanstring(s,end) return (('m', str(r[0])), r[1])
[ "def", "mlscanstring", "(", "s", ",", "end", ")", ":", "r", "=", "decoder", ".", "mlscanstring", "(", "s", ",", "end", ")", "return", "(", "(", "'m'", ",", "str", "(", "r", "[", "0", "]", ")", ")", ",", "r", "[", "1", "]", ")" ]
https://github.com/sofa-framework/sofa/blob/70628e35a44fcc258cf8250109b5e4eba8c5abe9/applications/plugins/PSL/python/pslparserhjson.py#L144-L150
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/eclib/panelbox.py
python
PanelBoxItem.__DoLayout
(self)
Layout the control
Layout the control
[ "Layout", "the", "control" ]
def __DoLayout(self): """Layout the control""" vsizer = wx.BoxSizer(wx.VERTICAL) hsizer = wx.BoxSizer(wx.HORIZONTAL) hsizer.Add((8, 8), 0) if self._bmp is not None: self._bmp = wx.StaticBitmap(self, bitmap=self._bmp) hsizer.Add(self._bmp, 0, wx.ALIGN_CENT...
[ "def", "__DoLayout", "(", "self", ")", ":", "vsizer", "=", "wx", ".", "BoxSizer", "(", "wx", ".", "VERTICAL", ")", "hsizer", "=", "wx", ".", "BoxSizer", "(", "wx", ".", "HORIZONTAL", ")", "hsizer", ".", "Add", "(", "(", "8", ",", "8", ")", ",", ...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/eclib/panelbox.py#L392-L420
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/python/ops/nn_ops.py
python
_LRNGradShape
(op)
return [in_grads_shape.merge_with(in_image_shape).merge_with(out_image_shape)]
Shape function for LRNGrad op.
Shape function for LRNGrad op.
[ "Shape", "function", "for", "LRNGrad", "op", "." ]
def _LRNGradShape(op): """Shape function for LRNGrad op.""" in_grads_shape = op.inputs[0].get_shape().with_rank(4) in_image_shape = op.inputs[1].get_shape().with_rank(4) out_image_shape = op.inputs[2].get_shape().with_rank(4) return [in_grads_shape.merge_with(in_image_shape).merge_with(out_image_shape)]
[ "def", "_LRNGradShape", "(", "op", ")", ":", "in_grads_shape", "=", "op", ".", "inputs", "[", "0", "]", ".", "get_shape", "(", ")", ".", "with_rank", "(", "4", ")", "in_image_shape", "=", "op", ".", "inputs", "[", "1", "]", ".", "get_shape", "(", "...
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/python/ops/nn_ops.py#L698-L703
jackaudio/jack2
21b293dbc37d42446141a08922cdec0d2550c6a0
waflib/Tools/msvc.py
python
setup_msvc
(conf, versiondict)
Checks installed compilers and targets and returns the first combination from the user's options, env, or the global supported lists that checks. :param versiondict: dict(platform -> dict(architecture -> configuration)) :type versiondict: dict(string -> dict(string -> target_compiler) :return: the compiler, revisi...
Checks installed compilers and targets and returns the first combination from the user's options, env, or the global supported lists that checks.
[ "Checks", "installed", "compilers", "and", "targets", "and", "returns", "the", "first", "combination", "from", "the", "user", "s", "options", "env", "or", "the", "global", "supported", "lists", "that", "checks", "." ]
def setup_msvc(conf, versiondict): """ Checks installed compilers and targets and returns the first combination from the user's options, env, or the global supported lists that checks. :param versiondict: dict(platform -> dict(architecture -> configuration)) :type versiondict: dict(string -> dict(string -> target...
[ "def", "setup_msvc", "(", "conf", ",", "versiondict", ")", ":", "platforms", "=", "getattr", "(", "Options", ".", "options", ",", "'msvc_targets'", ",", "''", ")", ".", "split", "(", "','", ")", "if", "platforms", "==", "[", "''", "]", ":", "platforms"...
https://github.com/jackaudio/jack2/blob/21b293dbc37d42446141a08922cdec0d2550c6a0/waflib/Tools/msvc.py#L107-L160
echronos/echronos
c996f1d2c8af6c6536205eb319c1bf1d4d84569c
external_tools/ply_info/example/BASIC/basparse.py
python
p_command_data
(p)
command : DATA numlist
command : DATA numlist
[ "command", ":", "DATA", "numlist" ]
def p_command_data(p): '''command : DATA numlist''' p[0] = ('DATA',p[2])
[ "def", "p_command_data", "(", "p", ")", ":", "p", "[", "0", "]", "=", "(", "'DATA'", ",", "p", "[", "2", "]", ")" ]
https://github.com/echronos/echronos/blob/c996f1d2c8af6c6536205eb319c1bf1d4d84569c/external_tools/ply_info/example/BASIC/basparse.py#L103-L105
smilehao/xlua-framework
a03801538be2b0e92d39332d445b22caca1ef61f
ConfigData/trunk/tools/protobuf-2.5.0/protobuf-2.5.0/python/build/lib/google/protobuf/text_format.py
python
_Tokenizer.ConsumeBool
(self)
return result
Consumes a boolean value. Returns: The bool parsed. Raises: ParseError: If a boolean value couldn't be consumed.
Consumes a boolean value.
[ "Consumes", "a", "boolean", "value", "." ]
def ConsumeBool(self): """Consumes a boolean value. Returns: The bool parsed. Raises: ParseError: If a boolean value couldn't be consumed. """ try: result = ParseBool(self.token) except ValueError, e: raise self._ParseError(str(e)) self.NextToken() return result
[ "def", "ConsumeBool", "(", "self", ")", ":", "try", ":", "result", "=", "ParseBool", "(", "self", ".", "token", ")", "except", "ValueError", ",", "e", ":", "raise", "self", ".", "_ParseError", "(", "str", "(", "e", ")", ")", "self", ".", "NextToken",...
https://github.com/smilehao/xlua-framework/blob/a03801538be2b0e92d39332d445b22caca1ef61f/ConfigData/trunk/tools/protobuf-2.5.0/protobuf-2.5.0/python/build/lib/google/protobuf/text_format.py#L475-L489
google/earthenterprise
0fe84e29be470cd857e3a0e52e5d0afd5bb8cee9
earth_enterprise/src/fusion/portableglobe/servers/file_search.py
python
JsonPlacemark.GetPlacemark
(self, row, results)
Write json for next placemark.
Write json for next placemark.
[ "Write", "json", "for", "next", "placemark", "." ]
def GetPlacemark(self, row, results): """Write json for next placemark.""" if len(row) < 3: return "" elif len(row) == 3: return (json_placemark_template % (row[-2], row[-1], row[0], "", results)) else: return (json_placemark_template % (row[-2]...
[ "def", "GetPlacemark", "(", "self", ",", "row", ",", "results", ")", ":", "if", "len", "(", "row", ")", "<", "3", ":", "return", "\"\"", "elif", "len", "(", "row", ")", "==", "3", ":", "return", "(", "json_placemark_template", "%", "(", "row", "[",...
https://github.com/google/earthenterprise/blob/0fe84e29be470cd857e3a0e52e5d0afd5bb8cee9/earth_enterprise/src/fusion/portableglobe/servers/file_search.py#L118-L127
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py3/scipy/sparse/coo.py
python
coo_matrix.tocsr
(self, copy=False)
Convert this matrix to Compressed Sparse Row format Duplicate entries will be summed together. Examples -------- >>> from numpy import array >>> from scipy.sparse import coo_matrix >>> row = array([0, 0, 1, 3, 1, 0, 0]) >>> col = array([0, 2, 1, 3, 1, 0, 0]) ...
Convert this matrix to Compressed Sparse Row format
[ "Convert", "this", "matrix", "to", "Compressed", "Sparse", "Row", "format" ]
def tocsr(self, copy=False): """Convert this matrix to Compressed Sparse Row format Duplicate entries will be summed together. Examples -------- >>> from numpy import array >>> from scipy.sparse import coo_matrix >>> row = array([0, 0, 1, 3, 1, 0, 0]) >...
[ "def", "tocsr", "(", "self", ",", "copy", "=", "False", ")", ":", "from", ".", "csr", "import", "csr_matrix", "if", "self", ".", "nnz", "==", "0", ":", "return", "csr_matrix", "(", "self", ".", "shape", ",", "dtype", "=", "self", ".", "dtype", ")",...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py3/scipy/sparse/coo.py#L368-L408
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/build/waf-1.7.13/waflib/Tools/compiler_d.py
python
options
(opt)
Restrict the compiler detection from the command-line:: $ waf configure --check-d-compiler=dmd
Restrict the compiler detection from the command-line::
[ "Restrict", "the", "compiler", "detection", "from", "the", "command", "-", "line", "::" ]
def options(opt): """ Restrict the compiler detection from the command-line:: $ waf configure --check-d-compiler=dmd """ d_compiler_opts = opt.add_option_group('D Compiler Options') d_compiler_opts.add_option('--check-d-compiler', default='gdc,dmd,ldc2', action='store', help='check for the compiler [Default:g...
[ "def", "options", "(", "opt", ")", ":", "d_compiler_opts", "=", "opt", ".", "add_option_group", "(", "'D Compiler Options'", ")", "d_compiler_opts", ".", "add_option", "(", "'--check-d-compiler'", ",", "default", "=", "'gdc,dmd,ldc2'", ",", "action", "=", "'store'...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/build/waf-1.7.13/waflib/Tools/compiler_d.py#L48-L58
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python/src/Lib/multiprocessing/util.py
python
log_to_stderr
(level=None)
return _logger
Turn on logging and add a handler which prints to stderr
Turn on logging and add a handler which prints to stderr
[ "Turn", "on", "logging", "and", "add", "a", "handler", "which", "prints", "to", "stderr" ]
def log_to_stderr(level=None): ''' Turn on logging and add a handler which prints to stderr ''' global _log_to_stderr import logging logger = get_logger() formatter = logging.Formatter(DEFAULT_LOGGING_FORMAT) handler = logging.StreamHandler() handler.setFormatter(formatter) logg...
[ "def", "log_to_stderr", "(", "level", "=", "None", ")", ":", "global", "_log_to_stderr", "import", "logging", "logger", "=", "get_logger", "(", ")", "formatter", "=", "logging", ".", "Formatter", "(", "DEFAULT_LOGGING_FORMAT", ")", "handler", "=", "logging", "...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Lib/multiprocessing/util.py#L113-L129
bigtreetech/BIGTREETECH-SKR-mini-E3
221247c12502ff92d071c701ea63cf3aa9bb3b29
firmware/V1.0/Marlin-2.0.7.2-SKR-mini-E3-V1.0/buildroot/share/scripts/createTemperatureLookupMarlin.py
python
Thermistor.resol
(self, adc)
return res
Convert ADC reading into a resolution
Convert ADC reading into a resolution
[ "Convert", "ADC", "reading", "into", "a", "resolution" ]
def resol(self, adc): "Convert ADC reading into a resolution" res = self.temp(adc)-self.temp(adc+1) return res
[ "def", "resol", "(", "self", ",", "adc", ")", ":", "res", "=", "self", ".", "temp", "(", "adc", ")", "-", "self", ".", "temp", "(", "adc", "+", "1", ")", "return", "res" ]
https://github.com/bigtreetech/BIGTREETECH-SKR-mini-E3/blob/221247c12502ff92d071c701ea63cf3aa9bb3b29/firmware/V1.0/Marlin-2.0.7.2-SKR-mini-E3-V1.0/buildroot/share/scripts/createTemperatureLookupMarlin.py#L62-L65
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/operations/build/wheel_legacy.py
python
format_command_result
( command_args, # type: List[str] command_output, # type: str )
return text
Format command information for logging.
Format command information for logging.
[ "Format", "command", "information", "for", "logging", "." ]
def format_command_result( command_args, # type: List[str] command_output, # type: str ): # type: (...) -> str """Format command information for logging.""" command_desc = format_command_args(command_args) text = f'Command arguments: {command_desc}\n' if not command_output: text +...
[ "def", "format_command_result", "(", "command_args", ",", "# type: List[str]", "command_output", ",", "# type: str", ")", ":", "# type: (...) -> str", "command_desc", "=", "format_command_args", "(", "command_args", ")", "text", "=", "f'Command arguments: {command_desc}\\n'",...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/operations/build/wheel_legacy.py#L19-L37
openvinotoolkit/openvino
dedcbeafa8b84cccdc55ca64b8da516682b381c7
src/bindings/python/src/compatibility/ngraph/opset8/ops.py
python
gather
( data: NodeInput, indices: NodeInput, axis: NodeInput, batch_dims: Optional[int] = 0, )
return _get_node_factory_opset8().create("Gather", inputs, attributes)
Return a node which performs Gather with support of negative indices. @param data: N-D tensor with data for gathering @param indices: N-D tensor with indices by which data is gathered. Negative indices indicate reverse indexing from the end @param axis: axis along which elements ar...
Return a node which performs Gather with support of negative indices.
[ "Return", "a", "node", "which", "performs", "Gather", "with", "support", "of", "negative", "indices", "." ]
def gather( data: NodeInput, indices: NodeInput, axis: NodeInput, batch_dims: Optional[int] = 0, ) -> Node: """Return a node which performs Gather with support of negative indices. @param data: N-D tensor with data for gathering @param indices: N-D tensor with i...
[ "def", "gather", "(", "data", ":", "NodeInput", ",", "indices", ":", "NodeInput", ",", "axis", ":", "NodeInput", ",", "batch_dims", ":", "Optional", "[", "int", "]", "=", "0", ",", ")", "->", "Node", ":", "inputs", "=", "as_nodes", "(", "data", ",", ...
https://github.com/openvinotoolkit/openvino/blob/dedcbeafa8b84cccdc55ca64b8da516682b381c7/src/bindings/python/src/compatibility/ngraph/opset8/ops.py#L247-L266
zeakey/DeepSkeleton
dc70170f8fd2ec8ca1157484ce66129981104486
python/caffe/io.py
python
arraylist_to_blobprotovecor_str
(arraylist)
return vec.SerializeToString()
Converts a list of arrays to a serialized blobprotovec, which could be then passed to a network for processing.
Converts a list of arrays to a serialized blobprotovec, which could be then passed to a network for processing.
[ "Converts", "a", "list", "of", "arrays", "to", "a", "serialized", "blobprotovec", "which", "could", "be", "then", "passed", "to", "a", "network", "for", "processing", "." ]
def arraylist_to_blobprotovecor_str(arraylist): """Converts a list of arrays to a serialized blobprotovec, which could be then passed to a network for processing. """ vec = caffe_pb2.BlobProtoVector() vec.blobs.extend([array_to_blobproto(arr) for arr in arraylist]) return vec.SerializeToString()
[ "def", "arraylist_to_blobprotovecor_str", "(", "arraylist", ")", ":", "vec", "=", "caffe_pb2", ".", "BlobProtoVector", "(", ")", "vec", ".", "blobs", ".", "extend", "(", "[", "array_to_blobproto", "(", "arr", ")", "for", "arr", "in", "arraylist", "]", ")", ...
https://github.com/zeakey/DeepSkeleton/blob/dc70170f8fd2ec8ca1157484ce66129981104486/python/caffe/io.py#L46-L52
echronos/echronos
c996f1d2c8af6c6536205eb319c1bf1d4d84569c
external_tools/pystache/common.py
python
is_string
(obj)
return isinstance(obj, _STRING_TYPES)
Return whether the given object is a bytes or string
Return whether the given object is a bytes or string
[ "Return", "whether", "the", "given", "object", "is", "a", "bytes", "or", "string" ]
def is_string(obj): """ Return whether the given object is a bytes or string """ return isinstance(obj, _STRING_TYPES)
[ "def", "is_string", "(", "obj", ")", ":", "return", "isinstance", "(", "obj", ",", "_STRING_TYPES", ")" ]
https://github.com/echronos/echronos/blob/c996f1d2c8af6c6536205eb319c1bf1d4d84569c/external_tools/pystache/common.py#L14-L19
alibaba/graph-learn
54cafee9db3054dc310a28b856be7f97c7d5aee9
graphlearn/python/nn/tf/layers/ego_gin_conv.py
python
EgoGINConv.forward
(self, x, neighbor, expand)
return self.output.forward(x + agg)
Compute node embeddings based on GIN. ```x_i = W * [(1 + eps) * x_i + sum(x_j) for x_j in N_i]```, where ```N_i``` is the neighbor set of ```x_i```. Args: x: A float tensor with shape = [batch_size, in_dim]. neighbor: A float tensor with shape = [batch_size * expand, in_dim]. expand: An i...
Compute node embeddings based on GIN. ```x_i = W * [(1 + eps) * x_i + sum(x_j) for x_j in N_i]```, where ```N_i``` is the neighbor set of ```x_i```.
[ "Compute", "node", "embeddings", "based", "on", "GIN", ".", "x_i", "=", "W", "*", "[", "(", "1", "+", "eps", ")", "*", "x_i", "+", "sum", "(", "x_j", ")", "for", "x_j", "in", "N_i", "]", "where", "N_i", "is", "the", "neighbor", "set", "of", "x_...
def forward(self, x, neighbor, expand): """ Compute node embeddings based on GIN. ```x_i = W * [(1 + eps) * x_i + sum(x_j) for x_j in N_i]```, where ```N_i``` is the neighbor set of ```x_i```. Args: x: A float tensor with shape = [batch_size, in_dim]. neighbor: A float tensor with shape = [...
[ "def", "forward", "(", "self", ",", "x", ",", "neighbor", ",", "expand", ")", ":", "nbr", "=", "tf", ".", "reshape", "(", "neighbor", ",", "[", "-", "1", ",", "expand", ",", "self", ".", "_in_dim", "[", "1", "]", "]", ")", "agg", "=", "tf", "...
https://github.com/alibaba/graph-learn/blob/54cafee9db3054dc310a28b856be7f97c7d5aee9/graphlearn/python/nn/tf/layers/ego_gin_conv.py#L75-L95
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python/src/Lib/decimal.py
python
Decimal.__truediv__
(self, other, context=None)
return ans._fix(context)
Return self / other.
Return self / other.
[ "Return", "self", "/", "other", "." ]
def __truediv__(self, other, context=None): """Return self / other.""" other = _convert_other(other) if other is NotImplemented: return NotImplemented if context is None: context = getcontext() sign = self._sign ^ other._sign if self._is_special...
[ "def", "__truediv__", "(", "self", ",", "other", ",", "context", "=", "None", ")", ":", "other", "=", "_convert_other", "(", "other", ")", "if", "other", "is", "NotImplemented", ":", "return", "NotImplemented", "if", "context", "is", "None", ":", "context"...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Lib/decimal.py#L1291-L1348
BlzFans/wke
b0fa21158312e40c5fbd84682d643022b6c34a93
cygwin/lib/python2.6/random.py
python
Random.weibullvariate
(self, alpha, beta)
return alpha * pow(-_log(u), 1.0/beta)
Weibull distribution. alpha is the scale parameter and beta is the shape parameter.
Weibull distribution.
[ "Weibull", "distribution", "." ]
def weibullvariate(self, alpha, beta): """Weibull distribution. alpha is the scale parameter and beta is the shape parameter. """ # Jain, pg. 499; bug fix courtesy Bill Arms u = 1.0 - self.random() return alpha * pow(-_log(u), 1.0/beta)
[ "def", "weibullvariate", "(", "self", ",", "alpha", ",", "beta", ")", ":", "# Jain, pg. 499; bug fix courtesy Bill Arms", "u", "=", "1.0", "-", "self", ".", "random", "(", ")", "return", "alpha", "*", "pow", "(", "-", "_log", "(", "u", ")", ",", "1.0", ...
https://github.com/BlzFans/wke/blob/b0fa21158312e40c5fbd84682d643022b6c34a93/cygwin/lib/python2.6/random.py#L630-L639
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/poplib.py
python
POP3.dele
(self, which)
return self._shortcmd('DELE %s' % which)
Delete message number 'which'. Result is 'response'.
Delete message number 'which'.
[ "Delete", "message", "number", "which", "." ]
def dele(self, which): """Delete message number 'which'. Result is 'response'. """ return self._shortcmd('DELE %s' % which)
[ "def", "dele", "(", "self", ",", "which", ")", ":", "return", "self", ".", "_shortcmd", "(", "'DELE %s'", "%", "which", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/poplib.py#L251-L256
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinder.py
python
SANSBeamCentreFinder._validate_workspaces
(workspaces)
return workspaces
This method checks if any of the workspaces to plot contain NaN values. :param workspaces: A list of workspace names :return: A list of workspaces (used in matplotlib plotting). Raises if NaN values present.
This method checks if any of the workspaces to plot contain NaN values. :param workspaces: A list of workspace names :return: A list of workspaces (used in matplotlib plotting). Raises if NaN values present.
[ "This", "method", "checks", "if", "any", "of", "the", "workspaces", "to", "plot", "contain", "NaN", "values", ".", ":", "param", "workspaces", ":", "A", "list", "of", "workspace", "names", ":", "return", ":", "A", "list", "of", "workspaces", "(", "used",...
def _validate_workspaces(workspaces): """ This method checks if any of the workspaces to plot contain NaN values. :param workspaces: A list of workspace names :return: A list of workspaces (used in matplotlib plotting). Raises if NaN values present. """ workspaces = Analy...
[ "def", "_validate_workspaces", "(", "workspaces", ")", ":", "workspaces", "=", "AnalysisDataService", ".", "Instance", "(", ")", ".", "retrieveWorkspaces", "(", "workspaces", ",", "unrollGroups", "=", "True", ")", "for", "ws", "in", "workspaces", ":", "if", "n...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinder.py#L296-L308
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
tools/valgrind/tsan_analyze.py
python
TsanAnalyzer.ParseReportFile
(self, filename)
return ret
Parses a report file and returns a list of ThreadSanitizer reports. Args: filename: report filename. Returns: list of (list of (str iff self._use_gdb, _StackTraceLine otherwise)).
Parses a report file and returns a list of ThreadSanitizer reports.
[ "Parses", "a", "report", "file", "and", "returns", "a", "list", "of", "ThreadSanitizer", "reports", "." ]
def ParseReportFile(self, filename): '''Parses a report file and returns a list of ThreadSanitizer reports. Args: filename: report filename. Returns: list of (list of (str iff self._use_gdb, _StackTraceLine otherwise)). ''' ret = [] self.cur_fd_ = open(filename, 'r') while Tru...
[ "def", "ParseReportFile", "(", "self", ",", "filename", ")", ":", "ret", "=", "[", "]", "self", ".", "cur_fd_", "=", "open", "(", "filename", ",", "'r'", ")", "while", "True", ":", "# Read ThreadSanitizer reports.", "self", ".", "ReadLine", "(", ")", "if...
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/tools/valgrind/tsan_analyze.py#L148-L195
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_core.py
python
SizerFlags.ReserveSpaceEvenIfHidden
(*args, **kwargs)
return _core_.SizerFlags_ReserveSpaceEvenIfHidden(*args, **kwargs)
ReserveSpaceEvenIfHidden(self) -> SizerFlags Makes the item ignore window's visibility status
ReserveSpaceEvenIfHidden(self) -> SizerFlags
[ "ReserveSpaceEvenIfHidden", "(", "self", ")", "-", ">", "SizerFlags" ]
def ReserveSpaceEvenIfHidden(*args, **kwargs): """ ReserveSpaceEvenIfHidden(self) -> SizerFlags Makes the item ignore window's visibility status """ return _core_.SizerFlags_ReserveSpaceEvenIfHidden(*args, **kwargs)
[ "def", "ReserveSpaceEvenIfHidden", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "SizerFlags_ReserveSpaceEvenIfHidden", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_core.py#L13866-L13872
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib-tk/ttk.py
python
Treeview.detach
(self, *items)
Unlinks all of the specified items from the tree. The items and all of their descendants are still present, and may be reinserted at another point in the tree, but will not be displayed. The root item may not be detached.
Unlinks all of the specified items from the tree.
[ "Unlinks", "all", "of", "the", "specified", "items", "from", "the", "tree", "." ]
def detach(self, *items): """Unlinks all of the specified items from the tree. The items and all of their descendants are still present, and may be reinserted at another point in the tree, but will not be displayed. The root item may not be detached.""" self.tk.call(self._w, "de...
[ "def", "detach", "(", "self", ",", "*", "items", ")", ":", "self", ".", "tk", ".", "call", "(", "self", ".", "_w", ",", "\"detach\"", ",", "items", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib-tk/ttk.py#L1220-L1226
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/third_party/lib_x86_64/python2.7/dist-packages/numpy/polynomial/polynomial.py
python
polyval2d
(x, y, c)
return c
Evaluate a 2-D polynomial at points (x, y). This function returns the value .. math:: p(x,y) = \\sum_{i,j} c_{i,j} * x^i * y^j The parameters `x` and `y` are converted to arrays only if they are tuples or a lists, otherwise they are treated as a scalars and they must have the same shape after con...
Evaluate a 2-D polynomial at points (x, y).
[ "Evaluate", "a", "2", "-", "D", "polynomial", "at", "points", "(", "x", "y", ")", "." ]
def polyval2d(x, y, c): """ Evaluate a 2-D polynomial at points (x, y). This function returns the value .. math:: p(x,y) = \\sum_{i,j} c_{i,j} * x^i * y^j The parameters `x` and `y` are converted to arrays only if they are tuples or a lists, otherwise they are treated as a scalars and they ...
[ "def", "polyval2d", "(", "x", ",", "y", ",", "c", ")", ":", "try", ":", "x", ",", "y", "=", "np", ".", "array", "(", "(", "x", ",", "y", ")", ",", "copy", "=", "0", ")", "except", ":", "raise", "ValueError", "(", "'x, y are incompatible'", ")",...
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/third_party/lib_x86_64/python2.7/dist-packages/numpy/polynomial/polynomial.py#L782-L836
irods/irods
ed6328646cee87182098d569919004049bf4ce21
scripts/irods/pyparsing.py
python
ParserElement.enablePackrat
()
Enables "packrat" parsing, which adds memoizing to the parsing logic. Repeated parse attempts at the same string location (which happens often in many complex grammars) can immediately return a cached value, instead of re-executing parsing/validating code. Memoizing is done of ...
Enables "packrat" parsing, which adds memoizing to the parsing logic. Repeated parse attempts at the same string location (which happens often in many complex grammars) can immediately return a cached value, instead of re-executing parsing/validating code. Memoizing is done of ...
[ "Enables", "packrat", "parsing", "which", "adds", "memoizing", "to", "the", "parsing", "logic", ".", "Repeated", "parse", "attempts", "at", "the", "same", "string", "location", "(", "which", "happens", "often", "in", "many", "complex", "grammars", ")", "can", ...
def enablePackrat(): """Enables "packrat" parsing, which adds memoizing to the parsing logic. Repeated parse attempts at the same string location (which happens often in many complex grammars) can immediately return a cached value, instead of re-executing parsing/validating code...
[ "def", "enablePackrat", "(", ")", ":", "if", "not", "ParserElement", ".", "_packratEnabled", ":", "ParserElement", ".", "_packratEnabled", "=", "True", "ParserElement", ".", "_parse", "=", "ParserElement", ".", "_parseCache" ]
https://github.com/irods/irods/blob/ed6328646cee87182098d569919004049bf4ce21/scripts/irods/pyparsing.py#L1101-L1119
nodejs/nan
8db8c8f544f2b6ce1b0859ef6ecdd0a3873a9e62
cpplint.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/nodejs/nan/blob/8db8c8f544f2b6ce1b0859ef6ecdd0a3873a9e62/cpplint.py#L2673-L2679
facebook/openr
ed38bdfd6bf290084bfab4821b59f83e7b59315d
openr/py/openr/cli/commands/kvstore.py
python
KvKeyValsCmd.print_kvstore_values
( self, resp: kvstore_types.Publication, area: Optional[str] = None, )
print values from raw publication from KvStore
print values from raw publication from KvStore
[ "print", "values", "from", "raw", "publication", "from", "KvStore" ]
def print_kvstore_values( self, resp: kvstore_types.Publication, area: Optional[str] = None, ) -> None: """print values from raw publication from KvStore""" rows = [] for key, value in sorted(resp.keyVals.items(), key=lambda x: x[0]): val = self.deseriali...
[ "def", "print_kvstore_values", "(", "self", ",", "resp", ":", "kvstore_types", ".", "Publication", ",", "area", ":", "Optional", "[", "str", "]", "=", "None", ",", ")", "->", "None", ":", "rows", "=", "[", "]", "for", "key", ",", "value", "in", "sort...
https://github.com/facebook/openr/blob/ed38bdfd6bf290084bfab4821b59f83e7b59315d/openr/py/openr/cli/commands/kvstore.py#L363-L398
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/utils.py
python
unquote_unreserved
(uri)
return ''.join(parts)
Un-escape any percent-escape sequences in a URI that are unreserved characters. This leaves all reserved, illegal and non-ASCII bytes encoded. :rtype: str
Un-escape any percent-escape sequences in a URI that are unreserved characters. This leaves all reserved, illegal and non-ASCII bytes encoded.
[ "Un", "-", "escape", "any", "percent", "-", "escape", "sequences", "in", "a", "URI", "that", "are", "unreserved", "characters", ".", "This", "leaves", "all", "reserved", "illegal", "and", "non", "-", "ASCII", "bytes", "encoded", "." ]
def unquote_unreserved(uri): """Un-escape any percent-escape sequences in a URI that are unreserved characters. This leaves all reserved, illegal and non-ASCII bytes encoded. :rtype: str """ parts = uri.split('%') for i in range(1, len(parts)): h = parts[i][0:2] if len(h) == 2 a...
[ "def", "unquote_unreserved", "(", "uri", ")", ":", "parts", "=", "uri", ".", "split", "(", "'%'", ")", "for", "i", "in", "range", "(", "1", ",", "len", "(", "parts", ")", ")", ":", "h", "=", "parts", "[", "i", "]", "[", "0", ":", "2", "]", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/utils.py#L570-L591
acado/acado
b4e28f3131f79cadfd1a001e9fff061f361d3a0f
misc/cpplint.py
python
CleanseComments
(line)
return _RE_PATTERN_CLEANSE_LINE_C_COMMENTS.sub('', line)
Removes //-comments and single-line C-style /* */ comments. Args: line: A line of C++ source. Returns: The line with single-line comments removed.
Removes //-comments and single-line C-style /* */ comments.
[ "Removes", "//", "-", "comments", "and", "single", "-", "line", "C", "-", "style", "/", "*", "*", "/", "comments", "." ]
def CleanseComments(line): """Removes //-comments and single-line C-style /* */ comments. Args: line: A line of C++ source. Returns: The line with single-line comments removed. """ commentpos = line.find('//') if commentpos != -1 and not IsCppString(line[:commentpos]): line = line[:commentpos]...
[ "def", "CleanseComments", "(", "line", ")", ":", "commentpos", "=", "line", ".", "find", "(", "'//'", ")", "if", "commentpos", "!=", "-", "1", "and", "not", "IsCppString", "(", "line", "[", ":", "commentpos", "]", ")", ":", "line", "=", "line", "[", ...
https://github.com/acado/acado/blob/b4e28f3131f79cadfd1a001e9fff061f361d3a0f/misc/cpplint.py#L1159-L1172
hpi-xnor/BMXNet
ed0b201da6667887222b8e4b5f997c4f6b61943d
python/mxnet/gluon/trainer.py
python
Trainer.load_states
(self, fname)
Loads trainer states (e.g. optimizer, momentum) from a file. Parameters ---------- fname : str Path to input states file.
Loads trainer states (e.g. optimizer, momentum) from a file.
[ "Loads", "trainer", "states", "(", "e", ".", "g", ".", "optimizer", "momentum", ")", "from", "a", "file", "." ]
def load_states(self, fname): """Loads trainer states (e.g. optimizer, momentum) from a file. Parameters ---------- fname : str Path to input states file. """ if self._update_on_kvstore: self._kvstore.load_optimizer_states(fname) self....
[ "def", "load_states", "(", "self", ",", "fname", ")", ":", "if", "self", ".", "_update_on_kvstore", ":", "self", ".", "_kvstore", ".", "load_optimizer_states", "(", "fname", ")", "self", ".", "_optimizer", "=", "self", ".", "_kvstore", ".", "_updater", "."...
https://github.com/hpi-xnor/BMXNet/blob/ed0b201da6667887222b8e4b5f997c4f6b61943d/python/mxnet/gluon/trainer.py#L218-L235
OSGeo/gdal
3748fc4ba4fba727492774b2b908a2130c864a83
swig/python/osgeo/gdal.py
python
GCP.__init__
(self, *args)
r"""__init__(GCP self, double x=0.0, double y=0.0, double z=0.0, double pixel=0.0, double line=0.0, char const * info="", char const * id="") -> GCP
r"""__init__(GCP self, double x=0.0, double y=0.0, double z=0.0, double pixel=0.0, double line=0.0, char const * info="", char const * id="") -> GCP
[ "r", "__init__", "(", "GCP", "self", "double", "x", "=", "0", ".", "0", "double", "y", "=", "0", ".", "0", "double", "z", "=", "0", ".", "0", "double", "pixel", "=", "0", ".", "0", "double", "line", "=", "0", ".", "0", "char", "const", "*", ...
def __init__(self, *args): r"""__init__(GCP self, double x=0.0, double y=0.0, double z=0.0, double pixel=0.0, double line=0.0, char const * info="", char const * id="") -> GCP""" _gdal.GCP_swiginit(self, _gdal.new_GCP(*args))
[ "def", "__init__", "(", "self", ",", "*", "args", ")", ":", "_gdal", ".", "GCP_swiginit", "(", "self", ",", "_gdal", ".", "new_GCP", "(", "*", "args", ")", ")" ]
https://github.com/OSGeo/gdal/blob/3748fc4ba4fba727492774b2b908a2130c864a83/swig/python/osgeo/gdal.py#L1979-L1981
LiquidPlayer/LiquidCore
9405979363f2353ac9a71ad8ab59685dd7f919c9
deps/node-10.15.3/deps/v8/third_party/jinja2/lexer.py
python
Lexer.tokenize
(self, source, name=None, filename=None, state=None)
return TokenStream(self.wrap(stream, name, filename), name, filename)
Calls tokeniter + tokenize and wraps it in a token stream.
Calls tokeniter + tokenize and wraps it in a token stream.
[ "Calls", "tokeniter", "+", "tokenize", "and", "wraps", "it", "in", "a", "token", "stream", "." ]
def tokenize(self, source, name=None, filename=None, state=None): """Calls tokeniter + tokenize and wraps it in a token stream. """ stream = self.tokeniter(source, name, filename, state) return TokenStream(self.wrap(stream, name, filename), name, filename)
[ "def", "tokenize", "(", "self", ",", "source", ",", "name", "=", "None", ",", "filename", "=", "None", ",", "state", "=", "None", ")", ":", "stream", "=", "self", ".", "tokeniter", "(", "source", ",", "name", ",", "filename", ",", "state", ")", "re...
https://github.com/LiquidPlayer/LiquidCore/blob/9405979363f2353ac9a71ad8ab59685dd7f919c9/deps/node-10.15.3/deps/v8/third_party/jinja2/lexer.py#L552-L556
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/python/ops/control_flow_ops.py
python
WhileContext.pivot
(self)
return self._pivot
The boolean tensor representing the loop termination condition.
The boolean tensor representing the loop termination condition.
[ "The", "boolean", "tensor", "representing", "the", "loop", "termination", "condition", "." ]
def pivot(self): """The boolean tensor representing the loop termination condition.""" return self._pivot
[ "def", "pivot", "(", "self", ")", ":", "return", "self", ".", "_pivot" ]
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/python/ops/control_flow_ops.py#L1415-L1417
Kitware/ParaView
f760af9124ff4634b23ebbeab95a4f56e0261955
Wrapping/Python/paraview/detail/extract_selection.py
python
maskarray_is_valid
(maskArray)
return maskArray is dsa.NoneArray or \ isinstance(maskArray, dsa.VTKArray) or \ isinstance(maskArray, dsa.VTKCompositeDataArray)
Validates that the maskArray is either a VTKArray or a VTKCompositeDataArrays or a NoneArray other returns false.
Validates that the maskArray is either a VTKArray or a VTKCompositeDataArrays or a NoneArray other returns false.
[ "Validates", "that", "the", "maskArray", "is", "either", "a", "VTKArray", "or", "a", "VTKCompositeDataArrays", "or", "a", "NoneArray", "other", "returns", "false", "." ]
def maskarray_is_valid(maskArray): """Validates that the maskArray is either a VTKArray or a VTKCompositeDataArrays or a NoneArray other returns false.""" return maskArray is dsa.NoneArray or \ isinstance(maskArray, dsa.VTKArray) or \ isinstance(maskArray, dsa.VTKCompositeDataArray)
[ "def", "maskarray_is_valid", "(", "maskArray", ")", ":", "return", "maskArray", "is", "dsa", ".", "NoneArray", "or", "isinstance", "(", "maskArray", ",", "dsa", ".", "VTKArray", ")", "or", "isinstance", "(", "maskArray", ",", "dsa", ".", "VTKCompositeDataArray...
https://github.com/Kitware/ParaView/blob/f760af9124ff4634b23ebbeab95a4f56e0261955/Wrapping/Python/paraview/detail/extract_selection.py#L38-L43
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/python2_version/klampt/src/robotsim.py
python
RobotModelLink.setTransform
(self, R, t)
return _robotsim.RobotModelLink_setTransform(self, R, t)
setTransform(RobotModelLink self, double const [9] R, double const [3] t) Sets the link's current transformation (R,t) to the world frame. Note: This does NOT perform inverse kinematics. The transform is overwritten when the robot's setConfig() method is called.
setTransform(RobotModelLink self, double const [9] R, double const [3] t)
[ "setTransform", "(", "RobotModelLink", "self", "double", "const", "[", "9", "]", "R", "double", "const", "[", "3", "]", "t", ")" ]
def setTransform(self, R, t): """ setTransform(RobotModelLink self, double const [9] R, double const [3] t) Sets the link's current transformation (R,t) to the world frame. Note: This does NOT perform inverse kinematics. The transform is overwritten when...
[ "def", "setTransform", "(", "self", ",", "R", ",", "t", ")", ":", "return", "_robotsim", ".", "RobotModelLink_setTransform", "(", "self", ",", "R", ",", "t", ")" ]
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/python2_version/klampt/src/robotsim.py#L3993-L4007
okex/V3-Open-API-SDK
c5abb0db7e2287718e0055e17e57672ce0ec7fd9
okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_vendor/distlib/_backport/tarfile.py
python
_Stream.__init__
(self, name, mode, comptype, fileobj, bufsize)
Construct a _Stream object.
Construct a _Stream object.
[ "Construct", "a", "_Stream", "object", "." ]
def __init__(self, name, mode, comptype, fileobj, bufsize): """Construct a _Stream object. """ self._extfileobj = True if fileobj is None: fileobj = _LowLevelFile(name, mode) self._extfileobj = False if comptype == '*': # Enable transparent co...
[ "def", "__init__", "(", "self", ",", "name", ",", "mode", ",", "comptype", ",", "fileobj", ",", "bufsize", ")", ":", "self", ".", "_extfileobj", "=", "True", "if", "fileobj", "is", "None", ":", "fileobj", "=", "_LowLevelFile", "(", "name", ",", "mode",...
https://github.com/okex/V3-Open-API-SDK/blob/c5abb0db7e2287718e0055e17e57672ce0ec7fd9/okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_vendor/distlib/_backport/tarfile.py#L399-L449
neopenx/Dragon
0e639a7319035ddc81918bd3df059230436ee0a1
Dragon/python/dragon/operators/cast.py
python
FloatToHalf
(inputs, **kwargs)
return output
Cast the type of tensor from ``float32`` to ``float16``. Parameters ---------- inputs : Tensor The ``float32`` tensor. Returns ------- Tensor The ``float16`` tensor.
Cast the type of tensor from ``float32`` to ``float16``.
[ "Cast", "the", "type", "of", "tensor", "from", "float32", "to", "float16", "." ]
def FloatToHalf(inputs, **kwargs): """Cast the type of tensor from ``float32`` to ``float16``. Parameters ---------- inputs : Tensor The ``float32`` tensor. Returns ------- Tensor The ``float16`` tensor. """ CheckInputs(inputs, 1) arguments = ParseArguments(loc...
[ "def", "FloatToHalf", "(", "inputs", ",", "*", "*", "kwargs", ")", ":", "CheckInputs", "(", "inputs", ",", "1", ")", "arguments", "=", "ParseArguments", "(", "locals", "(", ")", ")", "output", "=", "Tensor", ".", "CreateOperator", "(", "nout", "=", "1"...
https://github.com/neopenx/Dragon/blob/0e639a7319035ddc81918bd3df059230436ee0a1/Dragon/python/dragon/operators/cast.py#L14-L36
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/Arch/ArchComponent.py
python
addToComponent
(compobject,addobject,mod=None)
Add an object to a component's properties. Does not run if the addobject already exists in the component's properties. Adds the object to the first property found of Base, Group, or Hosts. If mod is provided, adds the object to that property instead. Parameters ---------- compobject: <ArchCom...
Add an object to a component's properties.
[ "Add", "an", "object", "to", "a", "component", "s", "properties", "." ]
def addToComponent(compobject,addobject,mod=None): """Add an object to a component's properties. Does not run if the addobject already exists in the component's properties. Adds the object to the first property found of Base, Group, or Hosts. If mod is provided, adds the object to that property instea...
[ "def", "addToComponent", "(", "compobject", ",", "addobject", ",", "mod", "=", "None", ")", ":", "import", "Draft", "if", "compobject", "==", "addobject", ":", "return", "# first check zis already there", "found", "=", "False", "attribs", "=", "[", "\"Additions\...
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Arch/ArchComponent.py#L55-L112
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/zipfile.py
python
_ZipDecrypter._GenerateCRCTable
()
return table
Generate a CRC-32 table. ZIP encryption uses the CRC32 one-byte primitive for scrambling some internal keys. We noticed that a direct implementation is faster than relying on binascii.crc32().
Generate a CRC-32 table.
[ "Generate", "a", "CRC", "-", "32", "table", "." ]
def _GenerateCRCTable(): """Generate a CRC-32 table. ZIP encryption uses the CRC32 one-byte primitive for scrambling some internal keys. We noticed that a direct implementation is faster than relying on binascii.crc32(). """ poly = 0xedb88320 table = [0] * 256 ...
[ "def", "_GenerateCRCTable", "(", ")", ":", "poly", "=", "0xedb88320", "table", "=", "[", "0", "]", "*", "256", "for", "i", "in", "range", "(", "256", ")", ":", "crc", "=", "i", "for", "j", "in", "range", "(", "8", ")", ":", "if", "crc", "&", ...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/zipfile.py#L433-L450
echronos/echronos
c996f1d2c8af6c6536205eb319c1bf1d4d84569c
external_tools/ply_info/example/ansic/cparse.py
python
p_struct_declarator_3
(t)
struct_declarator : COLON constant_expression
struct_declarator : COLON constant_expression
[ "struct_declarator", ":", "COLON", "constant_expression" ]
def p_struct_declarator_3(t): 'struct_declarator : COLON constant_expression' pass
[ "def", "p_struct_declarator_3", "(", "t", ")", ":", "pass" ]
https://github.com/echronos/echronos/blob/c996f1d2c8af6c6536205eb319c1bf1d4d84569c/external_tools/ply_info/example/ansic/cparse.py#L225-L227
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemFramework/v1/AWS/common-code/lib/urllib3/connectionpool.py
python
_normalize_host
(host, scheme)
return host
Normalize hosts for comparisons and use with sockets.
Normalize hosts for comparisons and use with sockets.
[ "Normalize", "hosts", "for", "comparisons", "and", "use", "with", "sockets", "." ]
def _normalize_host(host, scheme): """ Normalize hosts for comparisons and use with sockets. """ host = normalize_host(host, scheme) # httplib doesn't like it when we include brackets in IPv6 addresses # Specifically, if we include brackets but also pass the port then # httplib crazily dou...
[ "def", "_normalize_host", "(", "host", ",", "scheme", ")", ":", "host", "=", "normalize_host", "(", "host", ",", "scheme", ")", "# httplib doesn't like it when we include brackets in IPv6 addresses", "# Specifically, if we include brackets but also pass the port then", "# httplib...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemFramework/v1/AWS/common-code/lib/urllib3/connectionpool.py#L1036-L1051
qgis/QGIS
15a77662d4bb712184f6aa60d0bd663010a76a75
python/plugins/db_manager/db_plugins/spatialite/connector.py
python
SpatiaLiteDBConnector._checkSpatial
(self)
return self.has_spatial
check if it's a valid SpatiaLite db
check if it's a valid SpatiaLite db
[ "check", "if", "it", "s", "a", "valid", "SpatiaLite", "db" ]
def _checkSpatial(self): """ check if it's a valid SpatiaLite db """ self.has_spatial = self._checkGeometryColumnsTable() return self.has_spatial
[ "def", "_checkSpatial", "(", "self", ")", ":", "self", ".", "has_spatial", "=", "self", ".", "_checkGeometryColumnsTable", "(", ")", "return", "self", ".", "has_spatial" ]
https://github.com/qgis/QGIS/blob/15a77662d4bb712184f6aa60d0bd663010a76a75/python/plugins/db_manager/db_plugins/spatialite/connector.py#L90-L93
xiaohaoChen/rrc_detection
4f2b110cd122da7f55e8533275a9b4809a88785a
tools/extra/resize_and_crop_images.py
python
OpenCVResizeCrop.resize_and_crop_image
(self, input_file, output_file, output_side_length = 256)
Takes an image name, resize it and crop the center square
Takes an image name, resize it and crop the center square
[ "Takes", "an", "image", "name", "resize", "it", "and", "crop", "the", "center", "square" ]
def resize_and_crop_image(self, input_file, output_file, output_side_length = 256): '''Takes an image name, resize it and crop the center square ''' img = cv2.imread(input_file) height, width, depth = img.shape new_height = output_side_length new_width = output_side_lengt...
[ "def", "resize_and_crop_image", "(", "self", ",", "input_file", ",", "output_file", ",", "output_side_length", "=", "256", ")", ":", "img", "=", "cv2", ".", "imread", "(", "input_file", ")", "height", ",", "width", ",", "depth", "=", "img", ".", "shape", ...
https://github.com/xiaohaoChen/rrc_detection/blob/4f2b110cd122da7f55e8533275a9b4809a88785a/tools/extra/resize_and_crop_images.py#L20-L36
hpi-xnor/BMXNet
ed0b201da6667887222b8e4b5f997c4f6b61943d
python/mxnet/executor.py
python
Executor.output_dict
(self)
return self._output_dict
Get dictionary representation of output arrays. Returns ------- output_dict : dict of str to NDArray The dictionary that maps name of output names to NDArrays. Raises ------ ValueError : if there are duplicated names in the outputs.
Get dictionary representation of output arrays.
[ "Get", "dictionary", "representation", "of", "output", "arrays", "." ]
def output_dict(self): """Get dictionary representation of output arrays. Returns ------- output_dict : dict of str to NDArray The dictionary that maps name of output names to NDArrays. Raises ------ ValueError : if there are duplicated names in the ...
[ "def", "output_dict", "(", "self", ")", ":", "if", "self", ".", "_output_dict", "is", "None", ":", "self", ".", "_output_dict", "=", "Executor", ".", "_get_dict", "(", "self", ".", "_symbol", ".", "list_outputs", "(", ")", ",", "self", ".", "outputs", ...
https://github.com/hpi-xnor/BMXNet/blob/ed0b201da6667887222b8e4b5f997c4f6b61943d/python/mxnet/executor.py#L309-L324
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_controls.py
python
PreTreeCtrl
(*args, **kwargs)
return val
PreTreeCtrl() -> TreeCtrl
PreTreeCtrl() -> TreeCtrl
[ "PreTreeCtrl", "()", "-", ">", "TreeCtrl" ]
def PreTreeCtrl(*args, **kwargs): """PreTreeCtrl() -> TreeCtrl""" val = _controls_.new_PreTreeCtrl(*args, **kwargs) return val
[ "def", "PreTreeCtrl", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "val", "=", "_controls_", ".", "new_PreTreeCtrl", "(", "*", "args", ",", "*", "*", "kwargs", ")", "return", "val" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_controls.py#L5604-L5607
okex/V3-Open-API-SDK
c5abb0db7e2287718e0055e17e57672ce0ec7fd9
okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_vendor/retrying.py
python
Retrying.stop_after_delay
(self, previous_attempt_number, delay_since_first_attempt_ms)
return delay_since_first_attempt_ms >= self._stop_max_delay
Stop after the time from the first attempt >= stop_max_delay.
Stop after the time from the first attempt >= stop_max_delay.
[ "Stop", "after", "the", "time", "from", "the", "first", "attempt", ">", "=", "stop_max_delay", "." ]
def stop_after_delay(self, previous_attempt_number, delay_since_first_attempt_ms): """Stop after the time from the first attempt >= stop_max_delay.""" return delay_since_first_attempt_ms >= self._stop_max_delay
[ "def", "stop_after_delay", "(", "self", ",", "previous_attempt_number", ",", "delay_since_first_attempt_ms", ")", ":", "return", "delay_since_first_attempt_ms", ">=", "self", ".", "_stop_max_delay" ]
https://github.com/okex/V3-Open-API-SDK/blob/c5abb0db7e2287718e0055e17e57672ce0ec7fd9/okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_vendor/retrying.py#L145-L147
pmq20/node-packer
12c46c6e44fbc14d9ee645ebd17d5296b324f7e0
current/deps/v8/third_party/jinja2/compiler.py
python
CodeGenerator.fail
(self, msg, lineno)
Fail with a :exc:`TemplateAssertionError`.
Fail with a :exc:`TemplateAssertionError`.
[ "Fail", "with", "a", ":", "exc", ":", "TemplateAssertionError", "." ]
def fail(self, msg, lineno): """Fail with a :exc:`TemplateAssertionError`.""" raise TemplateAssertionError(msg, lineno, self.name, self.filename)
[ "def", "fail", "(", "self", ",", "msg", ",", "lineno", ")", ":", "raise", "TemplateAssertionError", "(", "msg", ",", "lineno", ",", "self", ".", "name", ",", "self", ".", "filename", ")" ]
https://github.com/pmq20/node-packer/blob/12c46c6e44fbc14d9ee645ebd17d5296b324f7e0/current/deps/v8/third_party/jinja2/compiler.py#L313-L315
google/llvm-propeller
45c226984fe8377ebfb2ad7713c680d652ba678d
libcxx/utils/libcxx/sym_check/util.py
python
read_syms_from_list
(slist)
return [ast.literal_eval(l) for l in slist]
Read a list of symbols from a list of strings. Each string is one symbol.
Read a list of symbols from a list of strings. Each string is one symbol.
[ "Read", "a", "list", "of", "symbols", "from", "a", "list", "of", "strings", ".", "Each", "string", "is", "one", "symbol", "." ]
def read_syms_from_list(slist): """ Read a list of symbols from a list of strings. Each string is one symbol. """ return [ast.literal_eval(l) for l in slist]
[ "def", "read_syms_from_list", "(", "slist", ")", ":", "return", "[", "ast", ".", "literal_eval", "(", "l", ")", "for", "l", "in", "slist", "]" ]
https://github.com/google/llvm-propeller/blob/45c226984fe8377ebfb2ad7713c680d652ba678d/libcxx/utils/libcxx/sym_check/util.py#L17-L22
apiaryio/drafter
4634ebd07f6c6f257cc656598ccd535492fdfb55
tools/gyp/pylib/gyp/common.py
python
GetEnvironFallback
(var_list, default)
return default
Look up a key in the environment, with fallback to secondary keys and finally falling back to a default value.
Look up a key in the environment, with fallback to secondary keys and finally falling back to a default value.
[ "Look", "up", "a", "key", "in", "the", "environment", "with", "fallback", "to", "secondary", "keys", "and", "finally", "falling", "back", "to", "a", "default", "value", "." ]
def GetEnvironFallback(var_list, default): """Look up a key in the environment, with fallback to secondary keys and finally falling back to a default value.""" for var in var_list: if var in os.environ: return os.environ[var] return default
[ "def", "GetEnvironFallback", "(", "var_list", ",", "default", ")", ":", "for", "var", "in", "var_list", ":", "if", "var", "in", "os", ".", "environ", ":", "return", "os", ".", "environ", "[", "var", "]", "return", "default" ]
https://github.com/apiaryio/drafter/blob/4634ebd07f6c6f257cc656598ccd535492fdfb55/tools/gyp/pylib/gyp/common.py#L114-L120
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/tensorboard/backend/handler.py
python
TensorboardHandler._send_json_response
(self, obj, code=200)
Writes out the given object as JSON using the given HTTP status code. This also replaces special float values with stringified versions. Args: obj: The object to respond with. code: The numeric HTTP status code to use.
Writes out the given object as JSON using the given HTTP status code.
[ "Writes", "out", "the", "given", "object", "as", "JSON", "using", "the", "given", "HTTP", "status", "code", "." ]
def _send_json_response(self, obj, code=200): """Writes out the given object as JSON using the given HTTP status code. This also replaces special float values with stringified versions. Args: obj: The object to respond with. code: The numeric HTTP status code to use. """ content = json...
[ "def", "_send_json_response", "(", "self", ",", "obj", ",", "code", "=", "200", ")", ":", "content", "=", "json", ".", "dumps", "(", "json_util", ".", "WrapSpecialFloats", "(", "obj", ")", ")", "self", ".", "_respond", "(", "content", ",", "'application/...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/tensorboard/backend/handler.py#L225-L235
root-project/root
fcd3583bb14852bf2e8cd2415717cbaac0e75896
bindings/pyroot_legacy/JupyROOT/helpers/cppcompleter.py
python
CppCompleter.complete
(self, ip, event)
return self._completeImpl(event.line)
Autocomplete interfacing to TTabCom. If an accessor of a scope is present in the line, the suggestions are prepended with the line. That's how completers work. For example: myGraph.Set<tab> will return "myGraph.Set+suggestion in the list of suggestions.
Autocomplete interfacing to TTabCom. If an accessor of a scope is present in the line, the suggestions are prepended with the line. That's how completers work. For example: myGraph.Set<tab> will return "myGraph.Set+suggestion in the list of suggestions.
[ "Autocomplete", "interfacing", "to", "TTabCom", ".", "If", "an", "accessor", "of", "a", "scope", "is", "present", "in", "the", "line", "the", "suggestions", "are", "prepended", "with", "the", "line", ".", "That", "s", "how", "completers", "work", ".", "For...
def complete(self, ip, event) : ''' Autocomplete interfacing to TTabCom. If an accessor of a scope is present in the line, the suggestions are prepended with the line. That's how completers work. For example: myGraph.Set<tab> will return "myGraph.Set+suggestion in the list of ...
[ "def", "complete", "(", "self", ",", "ip", ",", "event", ")", ":", "return", "self", ".", "_completeImpl", "(", "event", ".", "line", ")" ]
https://github.com/root-project/root/blob/fcd3583bb14852bf2e8cd2415717cbaac0e75896/bindings/pyroot_legacy/JupyROOT/helpers/cppcompleter.py#L169-L177
LiquidPlayer/LiquidCore
9405979363f2353ac9a71ad8ab59685dd7f919c9
deps/node-10.15.3/tools/jinja2/nodes.py
python
Expr.as_const
(self, eval_ctx=None)
Return the value of the expression as constant or raise :exc:`Impossible` if this was not possible. An :class:`EvalContext` can be provided, if none is given a default context is created which requires the nodes to have an attached environment. .. versionchanged:: 2.4 ...
Return the value of the expression as constant or raise :exc:`Impossible` if this was not possible.
[ "Return", "the", "value", "of", "the", "expression", "as", "constant", "or", "raise", ":", "exc", ":", "Impossible", "if", "this", "was", "not", "possible", "." ]
def as_const(self, eval_ctx=None): """Return the value of the expression as constant or raise :exc:`Impossible` if this was not possible. An :class:`EvalContext` can be provided, if none is given a default context is created which requires the nodes to have an attached environme...
[ "def", "as_const", "(", "self", ",", "eval_ctx", "=", "None", ")", ":", "raise", "Impossible", "(", ")" ]
https://github.com/LiquidPlayer/LiquidCore/blob/9405979363f2353ac9a71ad8ab59685dd7f919c9/deps/node-10.15.3/tools/jinja2/nodes.py#L397-L408
qgis/QGIS
15a77662d4bb712184f6aa60d0bd663010a76a75
python/plugins/MetaSearch/dialogs/maindialog.py
python
_get_field_value
(field)
return value
convenience function to return field value integer
convenience function to return field value integer
[ "convenience", "function", "to", "return", "field", "value", "integer" ]
def _get_field_value(field): """convenience function to return field value integer""" value = 0 if field == 'identifier': value = 0 if field == 'link': value = 1 return value
[ "def", "_get_field_value", "(", "field", ")", ":", "value", "=", "0", "if", "field", "==", "'identifier'", ":", "value", "=", "0", "if", "field", "==", "'link'", ":", "value", "=", "1", "return", "value" ]
https://github.com/qgis/QGIS/blob/15a77662d4bb712184f6aa60d0bd663010a76a75/python/plugins/MetaSearch/dialogs/maindialog.py#L1015-L1025
webmproject/libwebm
ee0bab576c338c9807249b99588e352b7268cb62
PRESUBMIT.py
python
_RunCmdOnCheckedFiles
(input_api, output_api, run_cmd, files_to_check)
return results
Ensure that libwebm/ files are clean.
Ensure that libwebm/ files are clean.
[ "Ensure", "that", "libwebm", "/", "files", "are", "clean", "." ]
def _RunCmdOnCheckedFiles(input_api, output_api, run_cmd, files_to_check): """Ensure that libwebm/ files are clean.""" file_filter = lambda x: input_api.FilterSourceFile( x, files_to_check=files_to_check, files_to_skip=None) affected_files = input_api.change.AffectedFiles(file_filter=file_filter) results...
[ "def", "_RunCmdOnCheckedFiles", "(", "input_api", ",", "output_api", ",", "run_cmd", ",", "files_to_check", ")", ":", "file_filter", "=", "lambda", "x", ":", "input_api", ".", "FilterSourceFile", "(", "x", ",", "files_to_check", "=", "files_to_check", ",", "file...
https://github.com/webmproject/libwebm/blob/ee0bab576c338c9807249b99588e352b7268cb62/PRESUBMIT.py#L122-L132