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
vmtk/vmtk
927331ad752265199390eabbbf2e07cdc2b4bcc6
vtkVmtk/Utilities/Stellar_1.0/meshconvert.py
python
writeOFF
(verts, tris, outFileName)
write out an OFF file from a list of vertices and triangles
write out an OFF file from a list of vertices and triangles
[ "write", "out", "an", "OFF", "file", "from", "a", "list", "of", "vertices", "and", "triangles" ]
def writeOFF(verts, tris, outFileName): """write out an OFF file from a list of vertices and triangles""" outFileName += '.off' outfile = open(outFileName, 'w') # write header lines outfile.write('OFF\n') outfile.write('%d %d 0\n' % (len(verts), len(tris))) for vert in verts: #prin...
[ "def", "writeOFF", "(", "verts", ",", "tris", ",", "outFileName", ")", ":", "outFileName", "+=", "'.off'", "outfile", "=", "open", "(", "outFileName", ",", "'w'", ")", "# write header lines", "outfile", ".", "write", "(", "'OFF\\n'", ")", "outfile", ".", "...
https://github.com/vmtk/vmtk/blob/927331ad752265199390eabbbf2e07cdc2b4bcc6/vtkVmtk/Utilities/Stellar_1.0/meshconvert.py#L751-L766
limbo018/DREAMPlace
146c3b9fd003d1acd52c96d9fd02e3f0a05154e4
dreamplace/ops/dct/discrete_spectral_transform.py
python
idct_2N
(x, expk=None)
return y
Batch Inverse Discrete Cosine Transformation without normalization to coefficients. Compute y_u = \sum_i x_i cos(pi*(2u+1)*i/(2N)), Impelements the 2N padding trick to solve IDCT with IFFT in the following link, https://github.com/tensorflow/tensorflow/blob/r1.10/tensorflow/python/ops/spectral_ops.py ...
Batch Inverse Discrete Cosine Transformation without normalization to coefficients. Compute y_u = \sum_i x_i cos(pi*(2u+1)*i/(2N)), Impelements the 2N padding trick to solve IDCT with IFFT in the following link, https://github.com/tensorflow/tensorflow/blob/r1.10/tensorflow/python/ops/spectral_ops.py
[ "Batch", "Inverse", "Discrete", "Cosine", "Transformation", "without", "normalization", "to", "coefficients", ".", "Compute", "y_u", "=", "\\", "sum_i", "x_i", "cos", "(", "pi", "*", "(", "2u", "+", "1", ")", "*", "i", "/", "(", "2N", "))", "Impelements"...
def idct_2N(x, expk=None): """ Batch Inverse Discrete Cosine Transformation without normalization to coefficients. Compute y_u = \sum_i x_i cos(pi*(2u+1)*i/(2N)), Impelements the 2N padding trick to solve IDCT with IFFT in the following link, https://github.com/tensorflow/tensorflow/blob/r1.10/tensorfl...
[ "def", "idct_2N", "(", "x", ",", "expk", "=", "None", ")", ":", "# last dimension", "N", "=", "x", ".", "size", "(", "-", "1", ")", "if", "expk", "is", "None", ":", "expk", "=", "get_expk", "(", "N", ",", "dtype", "=", "x", ".", "dtype", ",", ...
https://github.com/limbo018/DREAMPlace/blob/146c3b9fd003d1acd52c96d9fd02e3f0a05154e4/dreamplace/ops/dct/discrete_spectral_transform.py#L153-L185
generalized-intelligence/GAAS
29ab17d3e8a4ba18edef3a57c36d8db6329fac73
algorithms/src/LocalizationAndMapping/registration_localization/fast_gicp/thirdparty/Sophus/py/sophus/se3.py
python
Se3.__getitem__
(self, key)
We use the following convention [q0, q1, q2, q3, t0, t1, t2]
We use the following convention [q0, q1, q2, q3, t0, t1, t2]
[ "We", "use", "the", "following", "convention", "[", "q0", "q1", "q2", "q3", "t0", "t1", "t2", "]" ]
def __getitem__(self, key): """ We use the following convention [q0, q1, q2, q3, t0, t1, t2] """ assert (key >= 0 and key < 7) if key < 4: return self.so3[key] else: return self.t[key - 4]
[ "def", "__getitem__", "(", "self", ",", "key", ")", ":", "assert", "(", "key", ">=", "0", "and", "key", "<", "7", ")", "if", "key", "<", "4", ":", "return", "self", ".", "so3", "[", "key", "]", "else", ":", "return", "self", ".", "t", "[", "k...
https://github.com/generalized-intelligence/GAAS/blob/29ab17d3e8a4ba18edef3a57c36d8db6329fac73/algorithms/src/LocalizationAndMapping/registration_localization/fast_gicp/thirdparty/Sophus/py/sophus/se3.py#L96-L102
VAR-solutions/Algorithms
4ad6773e9675ef35aa858ca3969be5ddf6e3daea
LinkedList/LinkedListModule.py
python
LinkedList.getNodeCount
(self,value)
return NodeCount
returns the number of nodes containing a particular value
returns the number of nodes containing a particular value
[ "returns", "the", "number", "of", "nodes", "containing", "a", "particular", "value" ]
def getNodeCount(self,value): """returns the number of nodes containing a particular value""" CurrentNode = self.head NodeCount = 0 while CurrentNode is not None: if CurrentNode.data == value: NodeCount += 1 CurrentNode = CurrentNode.next ...
[ "def", "getNodeCount", "(", "self", ",", "value", ")", ":", "CurrentNode", "=", "self", ".", "head", "NodeCount", "=", "0", "while", "CurrentNode", "is", "not", "None", ":", "if", "CurrentNode", ".", "data", "==", "value", ":", "NodeCount", "+=", "1", ...
https://github.com/VAR-solutions/Algorithms/blob/4ad6773e9675ef35aa858ca3969be5ddf6e3daea/LinkedList/LinkedListModule.py#L147-L158
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py
python
SBSymbolContext.SetFunction
(self, *args)
return _lldb.SBSymbolContext_SetFunction(self, *args)
SetFunction(self, SBFunction function)
SetFunction(self, SBFunction function)
[ "SetFunction", "(", "self", "SBFunction", "function", ")" ]
def SetFunction(self, *args): """SetFunction(self, SBFunction function)""" return _lldb.SBSymbolContext_SetFunction(self, *args)
[ "def", "SetFunction", "(", "self", ",", "*", "args", ")", ":", "return", "_lldb", ".", "SBSymbolContext_SetFunction", "(", "self", ",", "*", "args", ")" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py#L8292-L8294
swift/swift
12d031cf8177fdec0137f9aa7e2912fa23c4416b
3rdParty/SCons/scons-3.0.1/engine/SCons/Tool/lex.py
python
generate
(env)
Add Builders and construction variables for lex to an Environment.
Add Builders and construction variables for lex to an Environment.
[ "Add", "Builders", "and", "construction", "variables", "for", "lex", "to", "an", "Environment", "." ]
def generate(env): """Add Builders and construction variables for lex to an Environment.""" c_file, cxx_file = SCons.Tool.createCFileBuilders(env) # C c_file.add_action(".l", LexAction) c_file.add_emitter(".l", lexEmitter) c_file.add_action(".lex", LexAction) c_file.add_emitter(".lex", lex...
[ "def", "generate", "(", "env", ")", ":", "c_file", ",", "cxx_file", "=", "SCons", ".", "Tool", ".", "createCFileBuilders", "(", "env", ")", "# C", "c_file", ".", "add_action", "(", "\".l\"", ",", "LexAction", ")", "c_file", ".", "add_emitter", "(", "\".l...
https://github.com/swift/swift/blob/12d031cf8177fdec0137f9aa7e2912fa23c4416b/3rdParty/SCons/scons-3.0.1/engine/SCons/Tool/lex.py#L67-L88
apple/turicreate
cce55aa5311300e3ce6af93cb45ba791fd1bdf49
deps/src/libxml2-2.9.1/python/libxml2class.py
python
xmlTextReader.BaseUri
(self)
return ret
The base URI of the node.
The base URI of the node.
[ "The", "base", "URI", "of", "the", "node", "." ]
def BaseUri(self): """The base URI of the node. """ ret = libxml2mod.xmlTextReaderConstBaseUri(self._o) return ret
[ "def", "BaseUri", "(", "self", ")", ":", "ret", "=", "libxml2mod", ".", "xmlTextReaderConstBaseUri", "(", "self", ".", "_o", ")", "return", "ret" ]
https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/deps/src/libxml2-2.9.1/python/libxml2class.py#L5748-L5751
qgis/QGIS
15a77662d4bb712184f6aa60d0bd663010a76a75
python/utils.py
python
loadPlugin
(packageName: str)
load plugin's package
load plugin's package
[ "load", "plugin", "s", "package" ]
def loadPlugin(packageName: str) -> bool: """ load plugin's package """ try: __import__(packageName) return True except: pass # continue... # snake in the grass, we know it's there sys.path_importer_cache.clear() # retry try: __import__(packageName) ...
[ "def", "loadPlugin", "(", "packageName", ":", "str", ")", "->", "bool", ":", "try", ":", "__import__", "(", "packageName", ")", "return", "True", "except", ":", "pass", "# continue...", "# snake in the grass, we know it's there", "sys", ".", "path_importer_cache", ...
https://github.com/qgis/QGIS/blob/15a77662d4bb712184f6aa60d0bd663010a76a75/python/utils.py#L387-L406
chromiumembedded/cef
80caf947f3fe2210e5344713c5281d8af9bdc295
tools/cef_parser.py
python
obj_header.get_class
(self, classname, defined_structs=None)
return None
Return the specified class or None if not found.
Return the specified class or None if not found.
[ "Return", "the", "specified", "class", "or", "None", "if", "not", "found", "." ]
def get_class(self, classname, defined_structs=None): """ Return the specified class or None if not found. """ for cls in self.classes: if cls.get_name() == classname: return cls elif not defined_structs is None: defined_structs.append(cls.get_capi_name()) return None
[ "def", "get_class", "(", "self", ",", "classname", ",", "defined_structs", "=", "None", ")", ":", "for", "cls", "in", "self", ".", "classes", ":", "if", "cls", ".", "get_name", "(", ")", "==", "classname", ":", "return", "cls", "elif", "not", "defined_...
https://github.com/chromiumembedded/cef/blob/80caf947f3fe2210e5344713c5281d8af9bdc295/tools/cef_parser.py#L718-L725
SequoiaDB/SequoiaDB
2894ed7e5bd6fe57330afc900cf76d0ff0df9f64
tools/server/php_linux/libxml2/lib/python2.4/site-packages/libxml2.py
python
newCatalog
(sgml)
return catalog(_obj=ret)
create a new Catalog.
create a new Catalog.
[ "create", "a", "new", "Catalog", "." ]
def newCatalog(sgml): """create a new Catalog. """ ret = libxml2mod.xmlNewCatalog(sgml) if ret is None:raise treeError('xmlNewCatalog() failed') return catalog(_obj=ret)
[ "def", "newCatalog", "(", "sgml", ")", ":", "ret", "=", "libxml2mod", ".", "xmlNewCatalog", "(", "sgml", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "(", "'xmlNewCatalog() failed'", ")", "return", "catalog", "(", "_obj", "=", "ret", ")" ]
https://github.com/SequoiaDB/SequoiaDB/blob/2894ed7e5bd6fe57330afc900cf76d0ff0df9f64/tools/server/php_linux/libxml2/lib/python2.4/site-packages/libxml2.py#L954-L958
lukasmonk/lucaschess
13e2e5cb13b38a720ccf897af649054a64bcb914
Code/QT/Grid.py
python
Grid.recno
(self)
return n if n <= nX else nX
Devuelve la fila actual.
Devuelve la fila actual.
[ "Devuelve", "la", "fila", "actual", "." ]
def recno(self): """ Devuelve la fila actual. """ n = self.currentIndex().row() nX = self.cg.numDatos - 1 return n if n <= nX else nX
[ "def", "recno", "(", "self", ")", ":", "n", "=", "self", ".", "currentIndex", "(", ")", ".", "row", "(", ")", "nX", "=", "self", ".", "cg", ".", "numDatos", "-", "1", "return", "n", "if", "n", "<=", "nX", "else", "nX" ]
https://github.com/lukasmonk/lucaschess/blob/13e2e5cb13b38a720ccf897af649054a64bcb914/Code/QT/Grid.py#L441-L447
y123456yz/reading-and-annotate-mongodb-3.6
93280293672ca7586dc24af18132aa61e4ed7fcf
mongo/buildscripts/idl/idl/errors.py
python
ParserError.__str__
(self)
return msg
Return a formatted error. Example error message: test.idl: (17, 4): ID0008: Unknown IDL node 'cpp_namespac' for YAML entity 'global'.
Return a formatted error.
[ "Return", "a", "formatted", "error", "." ]
def __str__(self): # type: () -> str """ Return a formatted error. Example error message: test.idl: (17, 4): ID0008: Unknown IDL node 'cpp_namespac' for YAML entity 'global'. """ msg = "%s: (%d, %d): %s: %s" % (os.path.basename(self.file_name), self.line, self.co...
[ "def", "__str__", "(", "self", ")", ":", "# type: () -> str", "msg", "=", "\"%s: (%d, %d): %s: %s\"", "%", "(", "os", ".", "path", ".", "basename", "(", "self", ".", "file_name", ")", ",", "self", ".", "line", ",", "self", ".", "column", ",", "self", "...
https://github.com/y123456yz/reading-and-annotate-mongodb-3.6/blob/93280293672ca7586dc24af18132aa61e4ed7fcf/mongo/buildscripts/idl/idl/errors.py#L113-L123
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/utilities/table_utils.py
python
DoubleItemDelegate.convert_for_display
(number)
return str(float(number))
need to convert to a float then back to a string to make sure it always has scientific notation
need to convert to a float then back to a string to make sure it always has scientific notation
[ "need", "to", "convert", "to", "a", "float", "then", "back", "to", "a", "string", "to", "make", "sure", "it", "always", "has", "scientific", "notation" ]
def convert_for_display(number): """need to convert to a float then back to a string to make sure it always has scientific notation""" return str(float(number))
[ "def", "convert_for_display", "(", "number", ")", ":", "return", "str", "(", "float", "(", "number", ")", ")" ]
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/utilities/table_utils.py#L214-L218
bh107/bohrium
5b83e7117285fefc7779ed0e9acb0f8e74c7e068
bridge/npbackend/bohrium/backend_messaging.py
python
cuda_use_current_context
()
return _backend_msg("CUDA: use current context")
Tell the CUDA backend to use the current CUDA context (useful for PyCUDA interop)
Tell the CUDA backend to use the current CUDA context (useful for PyCUDA interop)
[ "Tell", "the", "CUDA", "backend", "to", "use", "the", "current", "CUDA", "context", "(", "useful", "for", "PyCUDA", "interop", ")" ]
def cuda_use_current_context(): """Tell the CUDA backend to use the current CUDA context (useful for PyCUDA interop)""" return _backend_msg("CUDA: use current context")
[ "def", "cuda_use_current_context", "(", ")", ":", "return", "_backend_msg", "(", "\"CUDA: use current context\"", ")" ]
https://github.com/bh107/bohrium/blob/5b83e7117285fefc7779ed0e9acb0f8e74c7e068/bridge/npbackend/bohrium/backend_messaging.py#L34-L36
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/pydoc.py
python
TextDoc.docmodule
(self, object, name=None, mod=None)
return result
Produce text documentation for a given module object.
Produce text documentation for a given module object.
[ "Produce", "text", "documentation", "for", "a", "given", "module", "object", "." ]
def docmodule(self, object, name=None, mod=None): """Produce text documentation for a given module object.""" name = object.__name__ # ignore the passed-in name synop, desc = splitdoc(getdoc(object)) result = self.section('NAME', name + (synop and ' - ' + synop)) all = getattr(ob...
[ "def", "docmodule", "(", "self", ",", "object", ",", "name", "=", "None", ",", "mod", "=", "None", ")", ":", "name", "=", "object", ".", "__name__", "# ignore the passed-in name", "synop", ",", "desc", "=", "splitdoc", "(", "getdoc", "(", "object", ")", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/pydoc.py#L1113-L1212
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/eager/context.py
python
set_global_seed
(seed)
Sets the eager mode seed.
Sets the eager mode seed.
[ "Sets", "the", "eager", "mode", "seed", "." ]
def set_global_seed(seed): """Sets the eager mode seed.""" context()._set_global_seed(seed)
[ "def", "set_global_seed", "(", "seed", ")", ":", "context", "(", ")", ".", "_set_global_seed", "(", "seed", ")" ]
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/eager/context.py#L2105-L2107
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/python/client/session.py
python
_uniquify_fetches
(fetch_mappers)
return unique_fetches, value_indices
Uniquifies fetches from a list of fetch_mappers. This is a utility function used by _ListFetchMapper and _DictFetchMapper. It gathers all the unique fetches from a list of mappers and builds a list containing all of them but without duplicates (unique_fetches). It also returns a 2-D list of integers (values_...
Uniquifies fetches from a list of fetch_mappers.
[ "Uniquifies", "fetches", "from", "a", "list", "of", "fetch_mappers", "." ]
def _uniquify_fetches(fetch_mappers): """Uniquifies fetches from a list of fetch_mappers. This is a utility function used by _ListFetchMapper and _DictFetchMapper. It gathers all the unique fetches from a list of mappers and builds a list containing all of them but without duplicates (unique_fetches). It a...
[ "def", "_uniquify_fetches", "(", "fetch_mappers", ")", ":", "unique_fetches", "=", "[", "]", "value_indices", "=", "[", "]", "seen_fetches", "=", "{", "}", "for", "m", "in", "fetch_mappers", ":", "m_value_indices", "=", "[", "]", "for", "f", "in", "m", "...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/python/client/session.py#L242-L275
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/ros_comm/rosmaster/src/rosmaster/master_api.py
python
ROSMasterHandler.subscribeParam
(self, caller_id, caller_api, key)
return 1, "Subscribed to parameter [%s]"%key, val
Retrieve parameter value from server and subscribe to updates to that param. See paramUpdate() in the Node API. @param caller_id str: ROS caller id @type caller_id: str @param key: parameter to lookup. @type key: str @param caller_api: API URI for paramUpdate callbacks...
Retrieve parameter value from server and subscribe to updates to that param. See paramUpdate() in the Node API.
[ "Retrieve", "parameter", "value", "from", "server", "and", "subscribe", "to", "updates", "to", "that", "param", ".", "See", "paramUpdate", "()", "in", "the", "Node", "API", "." ]
def subscribeParam(self, caller_id, caller_api, key): """ Retrieve parameter value from server and subscribe to updates to that param. See paramUpdate() in the Node API. @param caller_id str: ROS caller id @type caller_id: str @param key: parameter to lookup. @t...
[ "def", "subscribeParam", "(", "self", ",", "caller_id", ",", "caller_api", ",", "key", ")", ":", "key", "=", "resolve_name", "(", "key", ",", "caller_id", ")", "try", ":", "# ps_lock has precedence and is required due to", "# potential self.reg_manager modification", ...
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/ros_comm/rosmaster/src/rosmaster/master_api.py#L432-L455
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_core.py
python
VersionInfo.GetMajor
(*args, **kwargs)
return _core_.VersionInfo_GetMajor(*args, **kwargs)
GetMajor(self) -> int
GetMajor(self) -> int
[ "GetMajor", "(", "self", ")", "-", ">", "int" ]
def GetMajor(*args, **kwargs): """GetMajor(self) -> int""" return _core_.VersionInfo_GetMajor(*args, **kwargs)
[ "def", "GetMajor", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "VersionInfo_GetMajor", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_core.py#L16569-L16571
eventql/eventql
7ca0dbb2e683b525620ea30dc40540a22d5eb227
deps/3rdparty/spidermonkey/mozjs/build/pymake/pymake/parser.py
python
parsestring
(s, filename)
return condstack[0]
Parse a string containing makefile data into a parserdata.StatementList.
Parse a string containing makefile data into a parserdata.StatementList.
[ "Parse", "a", "string", "containing", "makefile", "data", "into", "a", "parserdata", ".", "StatementList", "." ]
def parsestring(s, filename): """ Parse a string containing makefile data into a parserdata.StatementList. """ currule = False condstack = [parserdata.StatementList()] fdlines = enumeratelines(s, filename) for d in fdlines: assert len(condstack) > 0 offset = d.lstart ...
[ "def", "parsestring", "(", "s", ",", "filename", ")", ":", "currule", "=", "False", "condstack", "=", "[", "parserdata", ".", "StatementList", "(", ")", "]", "fdlines", "=", "enumeratelines", "(", "s", ",", "filename", ")", "for", "d", "in", "fdlines", ...
https://github.com/eventql/eventql/blob/7ca0dbb2e683b525620ea30dc40540a22d5eb227/deps/3rdparty/spidermonkey/mozjs/build/pymake/pymake/parser.py#L425-L635
trilinos/Trilinos
6168be6dd51e35e1cd681e9c4b24433e709df140
packages/seacas/libraries/ioss/src/visualization/catalyst/phactori/phactori.py
python
ShowDataColorLegendXX
(inPvView, inOnOffSetting, inColorLegendPositionAndSize, inColorSettings, inColorLegendRepRef, inPvDataRep)
return newScalarBarWidgetRepresentation
Turns on or off the display of the color bar legend showing the mapping between the color and the data value (and the name of the data value. (note this is primarily to do the paraview-side work to turn bar on or off, on to set up for rendering in the shared view, off to turn off rendering in shar...
Turns on or off the display of the color bar legend showing the mapping between the color and the data value (and the name of the data value. (note this is primarily to do the paraview-side work to turn bar on or off, on to set up for rendering in the shared view, off to turn off rendering in shar...
[ "Turns", "on", "or", "off", "the", "display", "of", "the", "color", "bar", "legend", "showing", "the", "mapping", "between", "the", "color", "and", "the", "data", "value", "(", "and", "the", "name", "of", "the", "data", "value", ".", "(", "note", "this...
def ShowDataColorLegendXX(inPvView, inOnOffSetting, inColorLegendPositionAndSize, inColorSettings, inColorLegendRepRef, inPvDataRep): """Turns on or off the display of the color bar legend showing the mapping between the color and the data value (and the name of the data value. (note this is...
[ "def", "ShowDataColorLegendXX", "(", "inPvView", ",", "inOnOffSetting", ",", "inColorLegendPositionAndSize", ",", "inColorSettings", ",", "inColorLegendRepRef", ",", "inPvDataRep", ")", ":", "if", "PhactoriDbg", "(", "100", ")", ":", "myDebugPrint3", "(", "'phactori.S...
https://github.com/trilinos/Trilinos/blob/6168be6dd51e35e1cd681e9c4b24433e709df140/packages/seacas/libraries/ioss/src/visualization/catalyst/phactori/phactori.py#L12516-L12817
hughperkins/tf-coriander
970d3df6c11400ad68405f22b0c42a52374e94ca
tensorflow/contrib/graph_editor/select.py
python
get_walks_union_ops
(forward_seed_ops, backward_seed_ops, forward_inclusive=True, backward_inclusive=True, within_ops=None, control_inputs=False, control_outputs=None, cont...
return util.concatenate_unique(forward_ops, backward_ops)
Return the union of a forward and a backward walk. Args: forward_seed_ops: an iterable of operations from which the forward graph walk starts. If a list of tensors is given instead, the seed_ops are set to be the consumers of those tensors. backward_seed_ops: an iterable of operations from which ...
Return the union of a forward and a backward walk.
[ "Return", "the", "union", "of", "a", "forward", "and", "a", "backward", "walk", "." ]
def get_walks_union_ops(forward_seed_ops, backward_seed_ops, forward_inclusive=True, backward_inclusive=True, within_ops=None, control_inputs=False, control_outputs=None, ...
[ "def", "get_walks_union_ops", "(", "forward_seed_ops", ",", "backward_seed_ops", ",", "forward_inclusive", "=", "True", ",", "backward_inclusive", "=", "True", ",", "within_ops", "=", "None", ",", "control_inputs", "=", "False", ",", "control_outputs", "=", "None", ...
https://github.com/hughperkins/tf-coriander/blob/970d3df6c11400ad68405f22b0c42a52374e94ca/tensorflow/contrib/graph_editor/select.py#L562-L611
pytorch/pytorch
7176c92687d3cc847cc046bf002269c6949a21c2
torch/nn/modules/utils.py
python
consume_prefix_in_state_dict_if_present
( state_dict: Dict[str, Any], prefix: str )
r"""Strip the prefix in state_dict in place, if any. ..note:: Given a `state_dict` from a DP/DDP model, a local model can load it by applying `consume_prefix_in_state_dict_if_present(state_dict, "module.")` before calling :meth:`torch.nn.Module.load_state_dict`. Args: state_dic...
r"""Strip the prefix in state_dict in place, if any.
[ "r", "Strip", "the", "prefix", "in", "state_dict", "in", "place", "if", "any", "." ]
def consume_prefix_in_state_dict_if_present( state_dict: Dict[str, Any], prefix: str ) -> None: r"""Strip the prefix in state_dict in place, if any. ..note:: Given a `state_dict` from a DP/DDP model, a local model can load it by applying `consume_prefix_in_state_dict_if_present(state_dict, ...
[ "def", "consume_prefix_in_state_dict_if_present", "(", "state_dict", ":", "Dict", "[", "str", ",", "Any", "]", ",", "prefix", ":", "str", ")", "->", "None", ":", "keys", "=", "sorted", "(", "state_dict", ".", "keys", "(", ")", ")", "for", "key", "in", ...
https://github.com/pytorch/pytorch/blob/7176c92687d3cc847cc046bf002269c6949a21c2/torch/nn/modules/utils.py#L43-L75
microsoft/DirectXShaderCompiler
8348ff8d9e0287610ba05d3a828e10af981a1c05
tools/clang/bindings/python/clang/cindex.py
python
Type.get_array_size
(self)
return conf.lib.clang_getArraySize(self)
Retrieve the size of the constant array.
Retrieve the size of the constant array.
[ "Retrieve", "the", "size", "of", "the", "constant", "array", "." ]
def get_array_size(self): """ Retrieve the size of the constant array. """ return conf.lib.clang_getArraySize(self)
[ "def", "get_array_size", "(", "self", ")", ":", "return", "conf", ".", "lib", ".", "clang_getArraySize", "(", "self", ")" ]
https://github.com/microsoft/DirectXShaderCompiler/blob/8348ff8d9e0287610ba05d3a828e10af981a1c05/tools/clang/bindings/python/clang/cindex.py#L1862-L1866
BestSonny/SSTD
174d452189f6bf9cf4b6957719392008bd974069
python/caffe/io.py
python
datum_to_array
(datum)
Converts a datum to an array. Note that the label is not returned, as one can easily get it by calling datum.label.
Converts a datum to an array. Note that the label is not returned, as one can easily get it by calling datum.label.
[ "Converts", "a", "datum", "to", "an", "array", ".", "Note", "that", "the", "label", "is", "not", "returned", "as", "one", "can", "easily", "get", "it", "by", "calling", "datum", ".", "label", "." ]
def datum_to_array(datum): """Converts a datum to an array. Note that the label is not returned, as one can easily get it by calling datum.label. """ if len(datum.data): return np.fromstring(datum.data, dtype=np.uint8).reshape( datum.channels, datum.height, datum.width) else: ...
[ "def", "datum_to_array", "(", "datum", ")", ":", "if", "len", "(", "datum", ".", "data", ")", ":", "return", "np", ".", "fromstring", "(", "datum", ".", "data", ",", "dtype", "=", "np", ".", "uint8", ")", ".", "reshape", "(", "datum", ".", "channel...
https://github.com/BestSonny/SSTD/blob/174d452189f6bf9cf4b6957719392008bd974069/python/caffe/io.py#L84-L93
grpc/grpc
27bc6fe7797e43298dc931b96dc57322d0852a9f
src/python/grpcio/grpc/framework/interfaces/face/utilities.py
python
unary_unary_event
(behavior)
return _MethodImplementation(cardinality.Cardinality.UNARY_UNARY, style.Service.EVENT, None, None, None, None, behavior, None, None, None)
Creates an face.MethodImplementation for the given behavior. Args: behavior: The implementation of a unary-unary RPC method as a callable value that takes a request value, a response callback to which to pass the response value of the RPC, and an face.ServicerContext. Returns: An face.MethodIm...
Creates an face.MethodImplementation for the given behavior.
[ "Creates", "an", "face", ".", "MethodImplementation", "for", "the", "given", "behavior", "." ]
def unary_unary_event(behavior): """Creates an face.MethodImplementation for the given behavior. Args: behavior: The implementation of a unary-unary RPC method as a callable value that takes a request value, a response callback to which to pass the response value of the RPC, and an face.ServicerC...
[ "def", "unary_unary_event", "(", "behavior", ")", ":", "return", "_MethodImplementation", "(", "cardinality", ".", "Cardinality", ".", "UNARY_UNARY", ",", "style", ".", "Service", ".", "EVENT", ",", "None", ",", "None", ",", "None", ",", "None", ",", "behavi...
https://github.com/grpc/grpc/blob/27bc6fe7797e43298dc931b96dc57322d0852a9f/src/python/grpcio/grpc/framework/interfaces/face/utilities.py#L105-L118
perilouswithadollarsign/cstrike15_src
f82112a2388b841d72cb62ca48ab1846dfcc11c8
thirdparty/protobuf-2.5.0/python/mox.py
python
In.equals
(self, rhs)
return self._key in rhs
Check to see whether key is in rhs. Args: rhs: dict Returns: bool
Check to see whether key is in rhs.
[ "Check", "to", "see", "whether", "key", "is", "in", "rhs", "." ]
def equals(self, rhs): """Check to see whether key is in rhs. Args: rhs: dict Returns: bool """ return self._key in rhs
[ "def", "equals", "(", "self", ",", "rhs", ")", ":", "return", "self", ".", "_key", "in", "rhs" ]
https://github.com/perilouswithadollarsign/cstrike15_src/blob/f82112a2388b841d72cb62ca48ab1846dfcc11c8/thirdparty/protobuf-2.5.0/python/mox.py#L955-L965
wy1iu/LargeMargin_Softmax_Loss
c3e9f20e4f16e2b4daf7d358a614366b9b39a6ec
scripts/cpp_lint.py
python
_NestingState.SeenOpenBrace
(self)
return (not self.stack) or self.stack[-1].seen_open_brace
Check if we have seen the opening brace for the innermost block. Returns: True if we have seen the opening brace, False if the innermost block is still expecting an opening brace.
Check if we have seen the opening brace for the innermost block.
[ "Check", "if", "we", "have", "seen", "the", "opening", "brace", "for", "the", "innermost", "block", "." ]
def SeenOpenBrace(self): """Check if we have seen the opening brace for the innermost block. Returns: True if we have seen the opening brace, False if the innermost block is still expecting an opening brace. """ return (not self.stack) or self.stack[-1].seen_open_brace
[ "def", "SeenOpenBrace", "(", "self", ")", ":", "return", "(", "not", "self", ".", "stack", ")", "or", "self", ".", "stack", "[", "-", "1", "]", ".", "seen_open_brace" ]
https://github.com/wy1iu/LargeMargin_Softmax_Loss/blob/c3e9f20e4f16e2b4daf7d358a614366b9b39a6ec/scripts/cpp_lint.py#L1931-L1938
thalium/icebox
99d147d5b9269222225443ce171b4fd46d8985d4
third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2class.py
python
outputBuffer.htmlDocContentDumpFormatOutput
(self, cur, encoding, format)
Dump an HTML document.
Dump an HTML document.
[ "Dump", "an", "HTML", "document", "." ]
def htmlDocContentDumpFormatOutput(self, cur, encoding, format): """Dump an HTML document. """ if cur is None: cur__o = None else: cur__o = cur._o libxml2mod.htmlDocContentDumpFormatOutput(self._o, cur__o, encoding, format)
[ "def", "htmlDocContentDumpFormatOutput", "(", "self", ",", "cur", ",", "encoding", ",", "format", ")", ":", "if", "cur", "is", "None", ":", "cur__o", "=", "None", "else", ":", "cur__o", "=", "cur", ".", "_o", "libxml2mod", ".", "htmlDocContentDumpFormatOutpu...
https://github.com/thalium/icebox/blob/99d147d5b9269222225443ce171b4fd46d8985d4/third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2class.py#L5251-L5255
apple/turicreate
cce55aa5311300e3ce6af93cb45ba791fd1bdf49
src/external/coremltools_wrap/coremltools/coremltools/converters/onnx/_operators_nd.py
python
_convert_size
(builder, node, graph, err)
convert to CoreML GetShape and ReduceProd Layer: https://github.com/apple/coremltools/blob/655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492/mlmodel/format/NeuralNetwork.proto#L5131 https://github.com/apple/coremltools/blob/655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492/mlmodel/format/NeuralNetwork.proto#L4722
convert to CoreML GetShape and ReduceProd Layer: https://github.com/apple/coremltools/blob/655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492/mlmodel/format/NeuralNetwork.proto#L5131 https://github.com/apple/coremltools/blob/655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492/mlmodel/format/NeuralNetwork.proto#L4722
[ "convert", "to", "CoreML", "GetShape", "and", "ReduceProd", "Layer", ":", "https", ":", "//", "github", ".", "com", "/", "apple", "/", "coremltools", "/", "blob", "/", "655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492", "/", "mlmodel", "/", "format", "/", "NeuralNetwork...
def _convert_size(builder, node, graph, err): """ convert to CoreML GetShape and ReduceProd Layer: https://github.com/apple/coremltools/blob/655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492/mlmodel/format/NeuralNetwork.proto#L5131 https://github.com/apple/coremltools/blob/655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e49...
[ "def", "_convert_size", "(", "builder", ",", "node", ",", "graph", ",", "err", ")", ":", "builder", ".", "add_get_shape", "(", "name", "=", "node", ".", "name", ",", "input_name", "=", "node", ".", "inputs", "[", "0", "]", ",", "output_name", "=", "n...
https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/src/external/coremltools_wrap/coremltools/coremltools/converters/onnx/_operators_nd.py#L2214-L2229
BYVoid/OpenCC
f3bafc4d016acfba5d5aef0cf5c98fa3c0090e0c
deps/google-benchmark/mingw.py
python
repository
(urls = urls, log = EmptyLogger())
return versions
Downloads and parse mingw-build repository files and parses them
Downloads and parse mingw-build repository files and parses them
[ "Downloads", "and", "parse", "mingw", "-", "build", "repository", "files", "and", "parses", "them" ]
def repository(urls = urls, log = EmptyLogger()): ''' Downloads and parse mingw-build repository files and parses them ''' log.info('getting mingw-builds repository') versions = {} re_sourceforge = re.compile(r'http://sourceforge.net/projects/([^/]+)/files') re_sub = r'http://downloads.sourc...
[ "def", "repository", "(", "urls", "=", "urls", ",", "log", "=", "EmptyLogger", "(", ")", ")", ":", "log", ".", "info", "(", "'getting mingw-builds repository'", ")", "versions", "=", "{", "}", "re_sourceforge", "=", "re", ".", "compile", "(", "r'http://sou...
https://github.com/BYVoid/OpenCC/blob/f3bafc4d016acfba5d5aef0cf5c98fa3c0090e0c/deps/google-benchmark/mingw.py#L55-L84
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/python/ops/metrics_impl.py
python
_streaming_sparse_false_positive_at_k
(labels, predictions_idx, k=None, class_id=None, weights=None, name=None)
Calculates weighted per step false positives for precision@k. If `class_id` is specified, calculate binary true positives for `class_id` only. If `class_id` is not specified, calculate metrics for `k` predicted vs `n` label classes, where `n` is the 2nd dimension of `labels`. If `weights` is `None`,...
Calculates weighted per step false positives for precision@k.
[ "Calculates", "weighted", "per", "step", "false", "positives", "for", "precision@k", "." ]
def _streaming_sparse_false_positive_at_k(labels, predictions_idx, k=None, class_id=None, weights=None, name=N...
[ "def", "_streaming_sparse_false_positive_at_k", "(", "labels", ",", "predictions_idx", ",", "k", "=", "None", ",", "class_id", "=", "None", ",", "weights", "=", "None", ",", "name", "=", "None", ")", ":", "with", "ops", ".", "name_scope", "(", "name", ",",...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/python/ops/metrics_impl.py#L2621-L2668
rusty1s/pytorch_cluster
576e0bbfa13cbe9c2fdc49de2cde5e2bf28f1e01
torch_cluster/radius.py
python
radius_graph
(x: torch.Tensor, r: float, batch: Optional[torch.Tensor] = None, loop: bool = False, max_num_neighbors: int = 32, flow: str = 'source_to_target', num_workers: int = 1)
return torch.stack([row, col], dim=0)
r"""Computes graph edges to all points within a given distance. Args: x (Tensor): Node feature matrix :math:`\mathbf{X} \in \mathbb{R}^{N \times F}`. r (float): The radius. batch (LongTensor, optional): Batch vector :math:`\mathbf{b} \in {\{ 0, \ldots, B-1\}}^N`, whi...
r"""Computes graph edges to all points within a given distance.
[ "r", "Computes", "graph", "edges", "to", "all", "points", "within", "a", "given", "distance", "." ]
def radius_graph(x: torch.Tensor, r: float, batch: Optional[torch.Tensor] = None, loop: bool = False, max_num_neighbors: int = 32, flow: str = 'source_to_target', num_workers: int = 1) -> torch.Tensor: r"""Computes graph edges to all points within a given distance....
[ "def", "radius_graph", "(", "x", ":", "torch", ".", "Tensor", ",", "r", ":", "float", ",", "batch", ":", "Optional", "[", "torch", ".", "Tensor", "]", "=", "None", ",", "loop", ":", "bool", "=", "False", ",", "max_num_neighbors", ":", "int", "=", "...
https://github.com/rusty1s/pytorch_cluster/blob/576e0bbfa13cbe9c2fdc49de2cde5e2bf28f1e01/torch_cluster/radius.py#L75-L128
synfig/synfig
a5ec91db5b751dc12e4400ccfb5c063fd6d2d928
synfig-studio/plugins/lottie-exporter/common/misc.py
python
get_vector
(waypoint)
return Vector(x, y)
Given a waypoint, it parses the string vector into Vector class defined in this converter Args: waypoint (lxml.etree._Element) : Synfig format waypoint Returns: (common.Vector.Vector) : x and y axis values stores in Vector format
Given a waypoint, it parses the string vector into Vector class defined in this converter
[ "Given", "a", "waypoint", "it", "parses", "the", "string", "vector", "into", "Vector", "class", "defined", "in", "this", "converter" ]
def get_vector(waypoint): """ Given a waypoint, it parses the string vector into Vector class defined in this converter Args: waypoint (lxml.etree._Element) : Synfig format waypoint Returns: (common.Vector.Vector) : x and y axis values stores in Vector format """ # converti...
[ "def", "get_vector", "(", "waypoint", ")", ":", "# converting radius and angle to a vector", "if", "waypoint", ".", "tag", "==", "\"radial_composite\"", ":", "for", "child", "in", "waypoint", ":", "if", "child", ".", "tag", "==", "\"radius\"", ":", "radius", "="...
https://github.com/synfig/synfig/blob/a5ec91db5b751dc12e4400ccfb5c063fd6d2d928/synfig-studio/plugins/lottie-exporter/common/misc.py#L363-L386
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/stc.py
python
StyledTextCtrl.WordLeftExtend
(*args, **kwargs)
return _stc.StyledTextCtrl_WordLeftExtend(*args, **kwargs)
WordLeftExtend(self) Move caret left one word extending selection to new caret position.
WordLeftExtend(self)
[ "WordLeftExtend", "(", "self", ")" ]
def WordLeftExtend(*args, **kwargs): """ WordLeftExtend(self) Move caret left one word extending selection to new caret position. """ return _stc.StyledTextCtrl_WordLeftExtend(*args, **kwargs)
[ "def", "WordLeftExtend", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_stc", ".", "StyledTextCtrl_WordLeftExtend", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/stc.py#L4400-L4406
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/_core.py
python
DropFilesEvent.GetPosition
(*args, **kwargs)
return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
GetPosition(self) -> Point Returns the position at which the files were dropped.
GetPosition(self) -> Point
[ "GetPosition", "(", "self", ")", "-", ">", "Point" ]
def GetPosition(*args, **kwargs): """ GetPosition(self) -> Point Returns the position at which the files were dropped. """ return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
[ "def", "GetPosition", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "DropFilesEvent_GetPosition", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_core.py#L6654-L6660
gnina/gnina
b9ae032f52fc7a8153987bde09c0efa3620d8bb6
caffe/examples/pycaffe/layers/pascal_multilabel_datalayers.py
python
PascalMultilabelDataLayerSync.reshape
(self, bottom, top)
There is no need to reshape the data, since the input is of fixed size (rows and columns)
There is no need to reshape the data, since the input is of fixed size (rows and columns)
[ "There", "is", "no", "need", "to", "reshape", "the", "data", "since", "the", "input", "is", "of", "fixed", "size", "(", "rows", "and", "columns", ")" ]
def reshape(self, bottom, top): """ There is no need to reshape the data, since the input is of fixed size (rows and columns) """ pass
[ "def", "reshape", "(", "self", ",", "bottom", ",", "top", ")", ":", "pass" ]
https://github.com/gnina/gnina/blob/b9ae032f52fc7a8153987bde09c0efa3620d8bb6/caffe/examples/pycaffe/layers/pascal_multilabel_datalayers.py#L67-L72
idaholab/moose
9eeebc65e098b4c30f8205fb41591fd5b61eb6ff
python/MooseDocs/common/log.py
python
MultiprocessingHandler.aquire
(self)
Disable.
Disable.
[ "Disable", "." ]
def aquire(self): """Disable.""" pass
[ "def", "aquire", "(", "self", ")", ":", "pass" ]
https://github.com/idaholab/moose/blob/9eeebc65e098b4c30f8205fb41591fd5b61eb6ff/python/MooseDocs/common/log.py#L66-L68
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py
python
SBTypeCategory.AddLanguage
(self, *args)
return _lldb.SBTypeCategory_AddLanguage(self, *args)
AddLanguage(self, LanguageType language)
AddLanguage(self, LanguageType language)
[ "AddLanguage", "(", "self", "LanguageType", "language", ")" ]
def AddLanguage(self, *args): """AddLanguage(self, LanguageType language)""" return _lldb.SBTypeCategory_AddLanguage(self, *args)
[ "def", "AddLanguage", "(", "self", ",", "*", "args", ")", ":", "return", "_lldb", ".", "SBTypeCategory_AddLanguage", "(", "self", ",", "*", "args", ")" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py#L10760-L10762
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/pkg_resources/_vendor/packaging/version.py
python
_parse_local_version
(local)
Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
[ "Takes", "a", "string", "like", "abc", ".", "1", ".", "twelve", "and", "turns", "it", "into", "(", "abc", "1", "twelve", ")", "." ]
def _parse_local_version(local): """ Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve"). """ if local is not None: return tuple( part.lower() if not part.isdigit() else int(part) for part in _local_version_seperators.split(local) )
[ "def", "_parse_local_version", "(", "local", ")", ":", "if", "local", "is", "not", "None", ":", "return", "tuple", "(", "part", ".", "lower", "(", ")", "if", "not", "part", ".", "isdigit", "(", ")", "else", "int", "(", "part", ")", "for", "part", "...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/pkg_resources/_vendor/packaging/version.py#L332-L340
PX4/PX4-Autopilot
0b9f60a0370be53d683352c63fd92db3d6586e18
Tools/mavlink_px4.py
python
MAVLink.scaled_pressure_send
(self, time_boot_ms, press_abs, press_diff, temperature)
return self.send(self.scaled_pressure_encode(time_boot_ms, press_abs, press_diff, temperature))
The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field. time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) press_abs : Absolute ...
The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field.
[ "The", "pressure", "readings", "for", "the", "typical", "setup", "of", "one", "absolute", "and", "differential", "pressure", "sensor", ".", "The", "units", "are", "as", "specified", "in", "each", "field", "." ]
def scaled_pressure_send(self, time_boot_ms, press_abs, press_diff, temperature): ''' The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field. time_boot_ms ...
[ "def", "scaled_pressure_send", "(", "self", ",", "time_boot_ms", ",", "press_abs", ",", "press_diff", ",", "temperature", ")", ":", "return", "self", ".", "send", "(", "self", ".", "scaled_pressure_encode", "(", "time_boot_ms", ",", "press_abs", ",", "press_diff...
https://github.com/PX4/PX4-Autopilot/blob/0b9f60a0370be53d683352c63fd92db3d6586e18/Tools/mavlink_px4.py#L3029-L3041
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py3/pandas/io/formats/printing.py
python
format_object_attrs
( obj: Sized, include_dtype: bool = True )
return attrs
Return a list of tuples of the (attr, formatted_value) for common attrs, including dtype, name, length Parameters ---------- obj : object Must be sized. include_dtype : bool If False, dtype won't be in the returned list Returns ------- list of 2-tuple
Return a list of tuples of the (attr, formatted_value) for common attrs, including dtype, name, length
[ "Return", "a", "list", "of", "tuples", "of", "the", "(", "attr", "formatted_value", ")", "for", "common", "attrs", "including", "dtype", "name", "length" ]
def format_object_attrs( obj: Sized, include_dtype: bool = True ) -> list[tuple[str, str | int]]: """ Return a list of tuples of the (attr, formatted_value) for common attrs, including dtype, name, length Parameters ---------- obj : object Must be sized. include_dtype : bool ...
[ "def", "format_object_attrs", "(", "obj", ":", "Sized", ",", "include_dtype", ":", "bool", "=", "True", ")", "->", "list", "[", "tuple", "[", "str", ",", "str", "|", "int", "]", "]", ":", "attrs", ":", "list", "[", "tuple", "[", "str", ",", "str", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/io/formats/printing.py#L508-L543
eldar/deepcut-cnn
928bf2f224fce132f6e4404b4c95fb017297a5e0
scripts/cpp_lint.py
python
GetPreviousNonBlankLine
(clean_lines, linenum)
return ('', -1)
Return the most recent non-blank line and its line number. Args: clean_lines: A CleansedLines instance containing the file contents. linenum: The number of the line to check. Returns: A tuple with two elements. The first element is the contents of the last non-blank line before the current line, ...
Return the most recent non-blank line and its line number.
[ "Return", "the", "most", "recent", "non", "-", "blank", "line", "and", "its", "line", "number", "." ]
def GetPreviousNonBlankLine(clean_lines, linenum): """Return the most recent non-blank line and its line number. Args: clean_lines: A CleansedLines instance containing the file contents. linenum: The number of the line to check. Returns: A tuple with two elements. The first element is the contents ...
[ "def", "GetPreviousNonBlankLine", "(", "clean_lines", ",", "linenum", ")", ":", "prevlinenum", "=", "linenum", "-", "1", "while", "prevlinenum", ">=", "0", ":", "prevline", "=", "clean_lines", ".", "elided", "[", "prevlinenum", "]", "if", "not", "IsBlankLine",...
https://github.com/eldar/deepcut-cnn/blob/928bf2f224fce132f6e4404b4c95fb017297a5e0/scripts/cpp_lint.py#L3046-L3066
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py3/pandas/core/computation/expressions.py
python
_can_use_numexpr
(op, op_str, a, b, dtype_check)
return False
return a boolean if we WILL be using numexpr
return a boolean if we WILL be using numexpr
[ "return", "a", "boolean", "if", "we", "WILL", "be", "using", "numexpr" ]
def _can_use_numexpr(op, op_str, a, b, dtype_check): """return a boolean if we WILL be using numexpr""" if op_str is not None: # required min elements (otherwise we are adding overhead) if a.size > _MIN_ELEMENTS: # check for dtype compatibility dtypes: set[str] = set() ...
[ "def", "_can_use_numexpr", "(", "op", ",", "op_str", ",", "a", ",", "b", ",", "dtype_check", ")", ":", "if", "op_str", "is", "not", "None", ":", "# required min elements (otherwise we are adding overhead)", "if", "a", ".", "size", ">", "_MIN_ELEMENTS", ":", "#...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/core/computation/expressions.py#L72-L89
deepmodeling/deepmd-kit
159e45d248b0429844fb6a8cb3b3a201987c8d79
deepmd/descriptor/descriptor.py
python
Descriptor.get_dim_rot_mat_1
(self)
Returns the first dimension of the rotation matrix. The rotation is of shape dim_1 x 3 Returns ------- int the first dimension of the rotation matrix
Returns the first dimension of the rotation matrix. The rotation is of shape dim_1 x 3
[ "Returns", "the", "first", "dimension", "of", "the", "rotation", "matrix", ".", "The", "rotation", "is", "of", "shape", "dim_1", "x", "3" ]
def get_dim_rot_mat_1(self) -> int: """ Returns the first dimension of the rotation matrix. The rotation is of shape dim_1 x 3 Returns ------- int the first dimension of the rotation matrix """ # TODO: I think this method should be implemented...
[ "def", "get_dim_rot_mat_1", "(", "self", ")", "->", "int", ":", "# TODO: I think this method should be implemented as it's called by dipole and", "# polar fitting network. However, currently not all descriptors have this", "# method.", "raise", "NotImplementedError" ]
https://github.com/deepmodeling/deepmd-kit/blob/159e45d248b0429844fb6a8cb3b3a201987c8d79/deepmd/descriptor/descriptor.py#L109-L122
weolar/miniblink49
1c4678db0594a4abde23d3ebbcc7cd13c3170777
third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/dispatch.py
python
Dispatcher.transfer_data
(self, request)
Let a handler transfer_data with a WebSocket client. Select a handler based on request.ws_resource and call its web_socket_transfer_data function. Args: request: mod_python request. Raises: DispatchException: when handler was not found AbortedByUser...
Let a handler transfer_data with a WebSocket client.
[ "Let", "a", "handler", "transfer_data", "with", "a", "WebSocket", "client", "." ]
def transfer_data(self, request): """Let a handler transfer_data with a WebSocket client. Select a handler based on request.ws_resource and call its web_socket_transfer_data function. Args: request: mod_python request. Raises: DispatchException: when ha...
[ "def", "transfer_data", "(", "self", ",", "request", ")", ":", "# TODO(tyoshino): Terminate underlying TCP connection if possible.", "try", ":", "if", "mux", ".", "use_mux", "(", "request", ")", ":", "mux", ".", "start", "(", "request", ",", "self", ")", "else",...
https://github.com/weolar/miniblink49/blob/1c4678db0594a4abde23d3ebbcc7cd13c3170777/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/dispatch.py#L270-L327
rrwick/Porechop
109e437280436d1ec27e5a5b7a34ffb752176390
ez_setup.py
python
has_powershell
()
return True
Determine if Powershell is available.
Determine if Powershell is available.
[ "Determine", "if", "Powershell", "is", "available", "." ]
def has_powershell(): """Determine if Powershell is available.""" if platform.system() != 'Windows': return False cmd = ['powershell', '-Command', 'echo test'] with open(os.path.devnull, 'wb') as devnull: try: subprocess.check_call(cmd, stdout=devnull, stderr=devnull) ...
[ "def", "has_powershell", "(", ")", ":", "if", "platform", ".", "system", "(", ")", "!=", "'Windows'", ":", "return", "False", "cmd", "=", "[", "'powershell'", ",", "'-Command'", ",", "'echo test'", "]", "with", "open", "(", "os", ".", "path", ".", "dev...
https://github.com/rrwick/Porechop/blob/109e437280436d1ec27e5a5b7a34ffb752176390/ez_setup.py#L259-L269
baidu/bigflow
449245016c0df7d1252e85581e588bfc60cefad3
bigflow_python/python/bigflow/transforms.py
python
transform
(pcollection, first_arg, *other_args, **options)
return bigflow.transform_impls.transform.transform(pcollection, first_arg, *other_args, **options)
对给定PCollection进行任意的变换,结果为另一个PCollection transform有两种形式,形式一: 基本原型为`transform(pcollection, initializer, transformer, finalizer, *side_inputs, **options)` transform将PCollection的处理分为3个阶段: 初始化,遍历及结束,分别对应于 initializer, transformer和finalizer三个处理函数。三个函数之间有一个状态 status(也可以理解为上下文context),同时有一个emitter参数可以向输出...
[]
def transform(pcollection, first_arg, *other_args, **options): """ 对给定PCollection进行任意的变换,结果为另一个PCollection transform有两种形式,形式一: 基本原型为`transform(pcollection, initializer, transformer, finalizer, *side_inputs, **options)` transform将PCollection的处理分为3个阶段: 初始化,遍历及结束,分别对应于 initializer, transformer和...
[ "def", "transform", "(", "pcollection", ",", "first_arg", ",", "*", "other_args", ",", "*", "*", "options", ")", ":", "import", "bigflow", ".", "transform_impls", ".", "transform", "return", "bigflow", ".", "transform_impls", ".", "transform", ".", "transform"...
https://github.com/baidu/bigflow/blob/449245016c0df7d1252e85581e588bfc60cefad3/bigflow_python/python/bigflow/transforms.py#L986-L1109
apache/arrow
af33dd1157eb8d7d9bfac25ebf61445b793b7943
python/benchmarks/common.py
python
BuiltinsGenerator._generate_varying_sequences
(self, random_factory, n, min_size, max_size, none_prob)
return data
Generate a list of *n* sequences of varying size between *min_size* and *max_size*, with *none_prob* probability of an entry being None. The base material for each sequence is obtained by calling `random_factory(<some size>)`
Generate a list of *n* sequences of varying size between *min_size* and *max_size*, with *none_prob* probability of an entry being None. The base material for each sequence is obtained by calling `random_factory(<some size>)`
[ "Generate", "a", "list", "of", "*", "n", "*", "sequences", "of", "varying", "size", "between", "*", "min_size", "*", "and", "*", "max_size", "*", "with", "*", "none_prob", "*", "probability", "of", "an", "entry", "being", "None", ".", "The", "base", "m...
def _generate_varying_sequences(self, random_factory, n, min_size, max_size, none_prob): """ Generate a list of *n* sequences of varying size between *min_size* and *max_size*, with *none_prob* probability of an entry being None. The base material for ...
[ "def", "_generate_varying_sequences", "(", "self", ",", "random_factory", ",", "n", ",", "min_size", ",", "max_size", ",", "none_prob", ")", ":", "base_size", "=", "10000", "base", "=", "random_factory", "(", "base_size", "+", "max_size", ")", "data", "=", "...
https://github.com/apache/arrow/blob/af33dd1157eb8d7d9bfac25ebf61445b793b7943/python/benchmarks/common.py#L181-L201
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/_windows.py
python
Dialog.SetReturnCode
(*args, **kwargs)
return _windows_.Dialog_SetReturnCode(*args, **kwargs)
SetReturnCode(self, int returnCode)
SetReturnCode(self, int returnCode)
[ "SetReturnCode", "(", "self", "int", "returnCode", ")" ]
def SetReturnCode(*args, **kwargs): """SetReturnCode(self, int returnCode)""" return _windows_.Dialog_SetReturnCode(*args, **kwargs)
[ "def", "SetReturnCode", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_windows_", ".", "Dialog_SetReturnCode", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_windows.py#L745-L747
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Source/ThirdParty/CEF3/cef_source/tools/file_util.py
python
read_version_file
(file, args)
Read and parse a version file (key=value pairs, one per line).
Read and parse a version file (key=value pairs, one per line).
[ "Read", "and", "parse", "a", "version", "file", "(", "key", "=", "value", "pairs", "one", "per", "line", ")", "." ]
def read_version_file(file, args): """ Read and parse a version file (key=value pairs, one per line). """ lines = read_file(file).split("\n") for line in lines: parts = line.split('=', 1) if len(parts) == 2: args[parts[0]] = parts[1]
[ "def", "read_version_file", "(", "file", ",", "args", ")", ":", "lines", "=", "read_file", "(", "file", ")", ".", "split", "(", "\"\\n\"", ")", "for", "line", "in", "lines", ":", "parts", "=", "line", ".", "split", "(", "'='", ",", "1", ")", "if", ...
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Source/ThirdParty/CEF3/cef_source/tools/file_util.py#L125-L131
nest/nest-simulator
f2623eb78518cdbd55e77e0ed486bf1111bcb62f
pynest/nest/lib/hl_api_helper.py
python
__is_executable
(path, candidate)
return os.access(candidate, os.X_OK) and os.path.isfile(candidate)
Returns true for executable files.
Returns true for executable files.
[ "Returns", "true", "for", "executable", "files", "." ]
def __is_executable(path, candidate): """Returns true for executable files.""" candidate = os.path.join(path, candidate) return os.access(candidate, os.X_OK) and os.path.isfile(candidate)
[ "def", "__is_executable", "(", "path", ",", "candidate", ")", ":", "candidate", "=", "os", ".", "path", ".", "join", "(", "path", ",", "candidate", ")", "return", "os", ".", "access", "(", "candidate", ",", "os", ".", "X_OK", ")", "and", "os", ".", ...
https://github.com/nest/nest-simulator/blob/f2623eb78518cdbd55e77e0ed486bf1111bcb62f/pynest/nest/lib/hl_api_helper.py#L442-L446
netket/netket
0d534e54ecbf25b677ea72af6b85947979420652
netket/vqs/mc/mc_mixed_state/state.py
python
MCMixedState.__init__
( self, sampler, model=None, *, sampler_diag: Sampler = None, n_samples_diag: int = None, n_samples_per_rank_diag: Optional[int] = None, n_discard_per_chain_diag: Optional[int] = None, n_discard_diag: Optional[int] = None, # deprecated see...
Constructs the MCMixedState. Arguments are the same as :class:`MCState`. Arguments: sampler: The sampler model: (Optional) The model. If not provided, you must provide init_fun and apply_fun. n_samples: the total number of samples across chains and processes when sam...
Constructs the MCMixedState. Arguments are the same as :class:`MCState`.
[ "Constructs", "the", "MCMixedState", ".", "Arguments", "are", "the", "same", "as", ":", "class", ":", "MCState", "." ]
def __init__( self, sampler, model=None, *, sampler_diag: Sampler = None, n_samples_diag: int = None, n_samples_per_rank_diag: Optional[int] = None, n_discard_per_chain_diag: Optional[int] = None, n_discard_diag: Optional[int] = None, # deprecated...
[ "def", "__init__", "(", "self", ",", "sampler", ",", "model", "=", "None", ",", "*", ",", "sampler_diag", ":", "Sampler", "=", "None", ",", "n_samples_diag", ":", "int", "=", "None", ",", "n_samples_per_rank_diag", ":", "Optional", "[", "int", "]", "=", ...
https://github.com/netket/netket/blob/0d534e54ecbf25b677ea72af6b85947979420652/netket/vqs/mc/mc_mixed_state/state.py#L47-L155
KDE/krita
10ea63984e00366865769c193ab298de73a59c5c
plugins/python/scripter/ui_scripter/editor/debugarea.py
python
DebugArea.paintEvent
(self, event)
It Invokes the draw method(debugAreaPaintEvent) in CodeEditor
It Invokes the draw method(debugAreaPaintEvent) in CodeEditor
[ "It", "Invokes", "the", "draw", "method", "(", "debugAreaPaintEvent", ")", "in", "CodeEditor" ]
def paintEvent(self, event): """It Invokes the draw method(debugAreaPaintEvent) in CodeEditor""" self.codeEditor.debugAreaPaintEvent(event)
[ "def", "paintEvent", "(", "self", ",", "event", ")", ":", "self", ".", "codeEditor", ".", "debugAreaPaintEvent", "(", "event", ")" ]
https://github.com/KDE/krita/blob/10ea63984e00366865769c193ab298de73a59c5c/plugins/python/scripter/ui_scripter/editor/debugarea.py#L19-L21
BitMEX/api-connectors
37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812
auto-generated/python/swagger_client/models/user_event.py
python
UserEvent.status
(self, status)
Sets the status of this UserEvent. :param status: The status of this UserEvent. # noqa: E501 :type: str
Sets the status of this UserEvent.
[ "Sets", "the", "status", "of", "this", "UserEvent", "." ]
def status(self, status): """Sets the status of this UserEvent. :param status: The status of this UserEvent. # noqa: E501 :type: str """ if status is None: raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 allowed_values = ["s...
[ "def", "status", "(", "self", ",", "status", ")", ":", "if", "status", "is", "None", ":", "raise", "ValueError", "(", "\"Invalid value for `status`, must not be `None`\"", ")", "# noqa: E501", "allowed_values", "=", "[", "\"success\"", ",", "\"failure\"", "]", "# ...
https://github.com/BitMEX/api-connectors/blob/37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812/auto-generated/python/swagger_client/models/user_event.py#L156-L172
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py
python
NTEventLogHandler.emit
(self, record)
Emit a record. Determine the message ID, event category and event type. Then log the message in the NT event log.
Emit a record.
[ "Emit", "a", "record", "." ]
def emit(self, record): """ Emit a record. Determine the message ID, event category and event type. Then log the message in the NT event log. """ if self._welu: try: id = self.getMessageID(record) cat = self.getEventCategory(re...
[ "def", "emit", "(", "self", ",", "record", ")", ":", "if", "self", ".", "_welu", ":", "try", ":", "id", "=", "self", ".", "getMessageID", "(", "record", ")", "cat", "=", "self", ".", "getEventCategory", "(", "record", ")", "type", "=", "self", ".",...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/logging/handlers.py#L1094-L1109
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/aui/auibar.py
python
AuiToolBar.AddCheckTool
(self, tool_id, label, bitmap, disabled_bitmap, short_help_string="", long_help_string="", client_data=None)
return self.AddTool(tool_id, label, bitmap, disabled_bitmap, ITEM_CHECK, short_help_string, long_help_string, client_data)
Adds a new check (or toggle) tool to the :class:`AuiToolBar`. :see: :meth:`AddTool` for an explanation of the input parameters.
Adds a new check (or toggle) tool to the :class:`AuiToolBar`. :see: :meth:`AddTool` for an explanation of the input parameters.
[ "Adds", "a", "new", "check", "(", "or", "toggle", ")", "tool", "to", "the", ":", "class", ":", "AuiToolBar", ".", ":", "see", ":", ":", "meth", ":", "AddTool", "for", "an", "explanation", "of", "the", "input", "parameters", "." ]
def AddCheckTool(self, tool_id, label, bitmap, disabled_bitmap, short_help_string="", long_help_string="", client_data=None): """ Adds a new check (or toggle) tool to the :class:`AuiToolBar`. :see: :meth:`AddTool` for an explanation of the input parameters. """ return s...
[ "def", "AddCheckTool", "(", "self", ",", "tool_id", ",", "label", ",", "bitmap", ",", "disabled_bitmap", ",", "short_help_string", "=", "\"\"", ",", "long_help_string", "=", "\"\"", ",", "client_data", "=", "None", ")", ":", "return", "self", ".", "AddTool",...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/aui/auibar.py#L1832-L1839
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemFramework/v1/AWS/resource-manager-code/lib/swagger_spec_validator/validator20.py
python
validate_definitions
(definitions, deref)
Validates the semantic errors in #/definitions. :param definitions: dict of all the definitions :param deref: callable that dereferences $refs :raises: :py:class:`swagger_spec_validator.SwaggerValidationError` :raises: :py:class:`jsonschema.exceptions.ValidationError`
Validates the semantic errors in #/definitions.
[ "Validates", "the", "semantic", "errors", "in", "#", "/", "definitions", "." ]
def validate_definitions(definitions, deref): """Validates the semantic errors in #/definitions. :param definitions: dict of all the definitions :param deref: callable that dereferences $refs :raises: :py:class:`swagger_spec_validator.SwaggerValidationError` :raises: :py:class:`jsonschema.exceptio...
[ "def", "validate_definitions", "(", "definitions", ",", "deref", ")", ":", "visited_definitions_ids", "=", "set", "(", ")", "for", "def_name", ",", "definition", "in", "iteritems", "(", "definitions", ")", ":", "validate_definition", "(", "definition", "=", "def...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemFramework/v1/AWS/resource-manager-code/lib/swagger_spec_validator/validator20.py#L515-L531
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/build/waf-1.7.13/waflib/Scripting.py
python
Dist.get_tar_path
(self, node)
return node.abspath()
return the path to use for a node in the tar archive, the purpose of this is to let subclases resolve symbolic links or to change file names
return the path to use for a node in the tar archive, the purpose of this is to let subclases resolve symbolic links or to change file names
[ "return", "the", "path", "to", "use", "for", "a", "node", "in", "the", "tar", "archive", "the", "purpose", "of", "this", "is", "to", "let", "subclases", "resolve", "symbolic", "links", "or", "to", "change", "file", "names" ]
def get_tar_path(self, node): """ return the path to use for a node in the tar archive, the purpose of this is to let subclases resolve symbolic links or to change file names """ return node.abspath()
[ "def", "get_tar_path", "(", "self", ",", "node", ")", ":", "return", "node", ".", "abspath", "(", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/build/waf-1.7.13/waflib/Scripting.py#L483-L488
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/compiler/pyassem.py
python
PyFlowGraph.getConsts
(self)
return tuple(l)
Return a tuple for the const slot of the code object Must convert references to code (MAKE_FUNCTION) to code objects recursively.
Return a tuple for the const slot of the code object
[ "Return", "a", "tuple", "for", "the", "const", "slot", "of", "the", "code", "object" ]
def getConsts(self): """Return a tuple for the const slot of the code object Must convert references to code (MAKE_FUNCTION) to code objects recursively. """ l = [] for elt in self.consts: if isinstance(elt, PyFlowGraph): elt = elt.getCode() ...
[ "def", "getConsts", "(", "self", ")", ":", "l", "=", "[", "]", "for", "elt", "in", "self", ".", "consts", ":", "if", "isinstance", "(", "elt", ",", "PyFlowGraph", ")", ":", "elt", "=", "elt", ".", "getCode", "(", ")", "l", ".", "append", "(", "...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/compiler/pyassem.py#L546-L557
v8/v8
fee3bf095260bf657a3eea4d3d41f90c42c6c857
tools/grokdump.py
python
InspectionShell.do_list_modules
(self, arg)
List details for all loaded modules in the minidump. An argument can be passed to limit the output to only those modules that contain the argument as a substring (case insensitive match).
List details for all loaded modules in the minidump.
[ "List", "details", "for", "all", "loaded", "modules", "in", "the", "minidump", "." ]
def do_list_modules(self, arg): """ List details for all loaded modules in the minidump. An argument can be passed to limit the output to only those modules that contain the argument as a substring (case insensitive match). """ for module in self.reader.module_list.modules: if arg: ...
[ "def", "do_list_modules", "(", "self", ",", "arg", ")", ":", "for", "module", "in", "self", ".", "reader", ".", "module_list", ".", "modules", ":", "if", "arg", ":", "name", "=", "GetModuleName", "(", "self", ".", "reader", ",", "module", ")", ".", "...
https://github.com/v8/v8/blob/fee3bf095260bf657a3eea4d3d41f90c42c6c857/tools/grokdump.py#L3762-L3776
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/_core.py
python
TextEntryBase.AutoComplete
(*args, **kwargs)
return _core_.TextEntryBase_AutoComplete(*args, **kwargs)
AutoComplete(self, wxArrayString choices) -> bool
AutoComplete(self, wxArrayString choices) -> bool
[ "AutoComplete", "(", "self", "wxArrayString", "choices", ")", "-", ">", "bool" ]
def AutoComplete(*args, **kwargs): """AutoComplete(self, wxArrayString choices) -> bool""" return _core_.TextEntryBase_AutoComplete(*args, **kwargs)
[ "def", "AutoComplete", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "TextEntryBase_AutoComplete", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_core.py#L13316-L13318
BlzFans/wke
b0fa21158312e40c5fbd84682d643022b6c34a93
cygwin/lib/python2.6/encodings/base64_codec.py
python
base64_encode
(input,errors='strict')
return (output, len(input))
Encodes the object input and returns a tuple (output object, length consumed). errors defines the error handling to apply. It defaults to 'strict' handling which is the only currently supported error handling for this codec.
Encodes the object input and returns a tuple (output object, length consumed).
[ "Encodes", "the", "object", "input", "and", "returns", "a", "tuple", "(", "output", "object", "length", "consumed", ")", "." ]
def base64_encode(input,errors='strict'): """ Encodes the object input and returns a tuple (output object, length consumed). errors defines the error handling to apply. It defaults to 'strict' handling which is the only currently supported error handling for this codec. """ ...
[ "def", "base64_encode", "(", "input", ",", "errors", "=", "'strict'", ")", ":", "assert", "errors", "==", "'strict'", "output", "=", "base64", ".", "encodestring", "(", "input", ")", "return", "(", "output", ",", "len", "(", "input", ")", ")" ]
https://github.com/BlzFans/wke/blob/b0fa21158312e40c5fbd84682d643022b6c34a93/cygwin/lib/python2.6/encodings/base64_codec.py#L13-L25
mickem/nscp
79f89fdbb6da63f91bc9dedb7aea202fe938f237
scripts/python/lib/google/protobuf/internal/containers.py
python
RepeatedScalarFieldContainer.extend
(self, elem_seq)
Extends by appending the given sequence. Similar to list.extend().
Extends by appending the given sequence. Similar to list.extend().
[ "Extends", "by", "appending", "the", "given", "sequence", ".", "Similar", "to", "list", ".", "extend", "()", "." ]
def extend(self, elem_seq): """Extends by appending the given sequence. Similar to list.extend().""" if not elem_seq: return new_values = [] for elem in elem_seq: self._type_checker.CheckValue(elem) new_values.append(elem) self._values.extend(new_values) self._message_listener...
[ "def", "extend", "(", "self", ",", "elem_seq", ")", ":", "if", "not", "elem_seq", ":", "return", "new_values", "=", "[", "]", "for", "elem", "in", "elem_seq", ":", "self", ".", "_type_checker", ".", "CheckValue", "(", "elem", ")", "new_values", ".", "a...
https://github.com/mickem/nscp/blob/79f89fdbb6da63f91bc9dedb7aea202fe938f237/scripts/python/lib/google/protobuf/internal/containers.py#L118-L128
zju3dv/clean-pvnet
5870c509e3cc205e1bb28910a7b1a9a3c8add9a8
lib/utils/pysixd/transform.py
python
Arcball.drag
(self, point)
Update current cursor window coordinates.
Update current cursor window coordinates.
[ "Update", "current", "cursor", "window", "coordinates", "." ]
def drag(self, point): """Update current cursor window coordinates.""" vnow = arcball_map_to_sphere(point, self._center, self._radius) if self._axis is not None: vnow = arcball_constrain_to_axis(vnow, self._axis) self._qpre = self._qnow t = numpy.cross(self._vdown, vn...
[ "def", "drag", "(", "self", ",", "point", ")", ":", "vnow", "=", "arcball_map_to_sphere", "(", "point", ",", "self", ".", "_center", ",", "self", ".", "_radius", ")", "if", "self", ".", "_axis", "is", "not", "None", ":", "vnow", "=", "arcball_constrain...
https://github.com/zju3dv/clean-pvnet/blob/5870c509e3cc205e1bb28910a7b1a9a3c8add9a8/lib/utils/pysixd/transform.py#L1594-L1605
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
gpu/command_buffer/build_gles2_cmd_buffer.py
python
CustomHandler.WriteImmediateServiceImplementation
(self, func, file)
Overrriden from TypeHandler.
Overrriden from TypeHandler.
[ "Overrriden", "from", "TypeHandler", "." ]
def WriteImmediateServiceImplementation(self, func, file): """Overrriden from TypeHandler.""" pass
[ "def", "WriteImmediateServiceImplementation", "(", "self", ",", "func", ",", "file", ")", ":", "pass" ]
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/gpu/command_buffer/build_gles2_cmd_buffer.py#L2337-L2339
okex/V3-Open-API-SDK
c5abb0db7e2287718e0055e17e57672ce0ec7fd9
okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_vendor/urllib3/util/retry.py
python
Retry.is_retry
(self, method, status_code, has_retry_after=False)
return (self.total and self.respect_retry_after_header and has_retry_after and (status_code in self.RETRY_AFTER_STATUS_CODES))
Is this method/status code retryable? (Based on whitelists and control variables such as the number of total retries to allow, whether to respect the Retry-After header, whether this header is present, and whether the returned status code is on the list of status codes to be retried upon...
Is this method/status code retryable? (Based on whitelists and control variables such as the number of total retries to allow, whether to respect the Retry-After header, whether this header is present, and whether the returned status code is on the list of status codes to be retried upon...
[ "Is", "this", "method", "/", "status", "code", "retryable?", "(", "Based", "on", "whitelists", "and", "control", "variables", "such", "as", "the", "number", "of", "total", "retries", "to", "allow", "whether", "to", "respect", "the", "Retry", "-", "After", ...
def is_retry(self, method, status_code, has_retry_after=False): """ Is this method/status code retryable? (Based on whitelists and control variables such as the number of total retries to allow, whether to respect the Retry-After header, whether this header is present, and whether the re...
[ "def", "is_retry", "(", "self", ",", "method", ",", "status_code", ",", "has_retry_after", "=", "False", ")", ":", "if", "not", "self", ".", "_is_method_retryable", "(", "method", ")", ":", "return", "False", "if", "self", ".", "status_forcelist", "and", "...
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/urllib3/util/retry.py#L304-L318
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/Blast/houdini/python2.7libs/blastExport/slice.py
python
Slice.metaDataEntityId
(self, value)
:return: str
:return: str
[ ":", "return", ":", "str" ]
def metaDataEntityId(self, value): """ :return: str """ if self.__metaDataEntityId == value: return self.__metaDataEntityId = value
[ "def", "metaDataEntityId", "(", "self", ",", "value", ")", ":", "if", "self", ".", "__metaDataEntityId", "==", "value", ":", "return", "self", ".", "__metaDataEntityId", "=", "value" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/Blast/houdini/python2.7libs/blastExport/slice.py#L262-L270
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/nn/layer/container.py
python
_get_prefix_and_index
(cells)
return prefix, index
get prefix and index of parameter name in sequential cell or cell list.
get prefix and index of parameter name in sequential cell or cell list.
[ "get", "prefix", "and", "index", "of", "parameter", "name", "in", "sequential", "cell", "or", "cell", "list", "." ]
def _get_prefix_and_index(cells): """get prefix and index of parameter name in sequential cell or cell list.""" prefix = "" index = 0 if not cells: return prefix, index cell_list = list(cells.items()) first_param, first_key = None, None second_param, second_key = None, None for ...
[ "def", "_get_prefix_and_index", "(", "cells", ")", ":", "prefix", "=", "\"\"", "index", "=", "0", "if", "not", "cells", ":", "return", "prefix", ",", "index", "cell_list", "=", "list", "(", "cells", ".", "items", "(", ")", ")", "first_param", ",", "fir...
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/nn/layer/container.py#L42-L76
francinexue/xuefu
b6ff79747a42e020588c0c0a921048e08fe4680c
api/ctpx/ctptd.py
python
CtpTd.onRtnOrder
(self, OrderField)
报单通知
报单通知
[ "报单通知" ]
def onRtnOrder(self, OrderField): """报单通知""" # #如果委托成功,OrderSubmitStatus先是0(不用管),则OrderSubmitStatus = 3,且orderStatus = 3,等待排队. # 紧接着成交则OrderSubmitStatus = 3,且orderStatus = 0-1 ## 如果撤单成功,OrderSubmitStatus先是1(不用管),则OrderSubmitStatus = 3,且orderStatus = *.等待撤单 # ...
[ "def", "onRtnOrder", "(", "self", ",", "OrderField", ")", ":", "# #如果委托成功,OrderSubmitStatus先是0(不用管),则OrderSubmitStatus = 3,且orderStatus = 3,等待排队.", "# 紧接着成交则OrderSubmitStatus = 3,且orderStatus = 0-1", "## 如果撤单成功,OrderSubmitStatus先是1(不用管),则OrderSubmitStatus = 3,且orderStatus = *.等待撤单"...
https://github.com/francinexue/xuefu/blob/b6ff79747a42e020588c0c0a921048e08fe4680c/api/ctpx/ctptd.py#L753-L760
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/mapreduce/mapreduce/api/map_job/map_job_control.py
python
Job.__update_state
(self)
Fetches most up to date state from db.
Fetches most up to date state from db.
[ "Fetches", "most", "up", "to", "date", "state", "from", "db", "." ]
def __update_state(self): """Fetches most up to date state from db.""" # Only if the job was not in a terminal state. if self._state.active: self._state = self.__get_state_by_id(self.job_config.job_id)
[ "def", "__update_state", "(", "self", ")", ":", "# Only if the job was not in a terminal state.", "if", "self", ".", "_state", ".", "active", ":", "self", ".", "_state", "=", "self", ".", "__get_state_by_id", "(", "self", ".", "job_config", ".", "job_id", ")" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/mapreduce/mapreduce/api/map_job/map_job_control.py#L157-L161
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/ultimatelistctrl.py
python
UltimateListItemData.SetImage
(self, image)
Sets the zero-based indexes of the images associated with the item into the image list. :param `image`: a Python list with the zero-based indexes of the images associated with the item into the image list.
Sets the zero-based indexes of the images associated with the item into the image list.
[ "Sets", "the", "zero", "-", "based", "indexes", "of", "the", "images", "associated", "with", "the", "item", "into", "the", "image", "list", "." ]
def SetImage(self, image): """ Sets the zero-based indexes of the images associated with the item into the image list. :param `image`: a Python list with the zero-based indexes of the images associated with the item into the image list. """ self._image = to_lis...
[ "def", "SetImage", "(", "self", ",", "image", ")", ":", "self", ".", "_image", "=", "to_list", "(", "image", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/ultimatelistctrl.py#L2553-L2562
lammps/lammps
b75c3065430a75b1b5543a10e10f46d9b4c91913
python/lammps/core.py
python
lammps.get_os_info
(self)
return sb.value.decode()
Return a string with information about the OS and compiler runtime This is a wrapper around the :cpp:func:`lammps_get_os_info` function of the C-library interface. :return: OS info string :rtype: string
Return a string with information about the OS and compiler runtime
[ "Return", "a", "string", "with", "information", "about", "the", "OS", "and", "compiler", "runtime" ]
def get_os_info(self): """Return a string with information about the OS and compiler runtime This is a wrapper around the :cpp:func:`lammps_get_os_info` function of the C-library interface. :return: OS info string :rtype: string """ sb = create_string_buffer(512) self.lib.lammps_get_os_i...
[ "def", "get_os_info", "(", "self", ")", ":", "sb", "=", "create_string_buffer", "(", "512", ")", "self", ".", "lib", ".", "lammps_get_os_info", "(", "sb", ",", "512", ")", "return", "sb", ".", "value", ".", "decode", "(", ")" ]
https://github.com/lammps/lammps/blob/b75c3065430a75b1b5543a10e10f46d9b4c91913/python/lammps/core.py#L505-L516
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/nn/probability/distribution/gamma.py
python
Gamma._log_prob
(self, value, concentration=None, rate=None)
return unnormalized_log_prob - log_normalization
r""" Evaluate log probability. Args: value (Tensor): The value to be evaluated. concentration (Tensor): The concentration of the distribution. Default: self._concentration. rate (Tensor): The rate the distribution. Default: self._rate. .. math:: ...
r""" Evaluate log probability.
[ "r", "Evaluate", "log", "probability", "." ]
def _log_prob(self, value, concentration=None, rate=None): r""" Evaluate log probability. Args: value (Tensor): The value to be evaluated. concentration (Tensor): The concentration of the distribution. Default: self._concentration. rate (Tensor): The rate the...
[ "def", "_log_prob", "(", "self", ",", "value", ",", "concentration", "=", "None", ",", "rate", "=", "None", ")", ":", "value", "=", "self", ".", "_check_value", "(", "value", ",", "'value'", ")", "value", "=", "self", ".", "cast", "(", "value", ",", ...
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/nn/probability/distribution/gamma.py#L312-L331
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py3/scipy/ndimage/interpolation.py
python
shift
(input, shift, output=None, order=3, mode='constant', cval=0.0, prefilter=True)
return output
Shift an array. The array is shifted using spline interpolation of the requested order. Points outside the boundaries of the input are filled according to the given mode. Parameters ---------- %(input)s shift : float or sequence The shift along the axes. If a float, `shift` is the ...
Shift an array.
[ "Shift", "an", "array", "." ]
def shift(input, shift, output=None, order=3, mode='constant', cval=0.0, prefilter=True): """ Shift an array. The array is shifted using spline interpolation of the requested order. Points outside the boundaries of the input are filled according to the given mode. Parameters ----...
[ "def", "shift", "(", "input", ",", "shift", ",", "output", "=", "None", ",", "order", "=", "3", ",", "mode", "=", "'constant'", ",", "cval", "=", "0.0", ",", "prefilter", "=", "True", ")", ":", "if", "order", "<", "0", "or", "order", ">", "5", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py3/scipy/ndimage/interpolation.py#L485-L533
okex/V3-Open-API-SDK
c5abb0db7e2287718e0055e17e57672ce0ec7fd9
okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_vendor/ipaddress.py
python
ip_interface
(address)
Take an IP string/int and return an object of the correct type. Args: address: A string or integer, the IP address. Either IPv4 or IPv6 addresses may be supplied; integers less than 2**32 will be considered to be IPv4 by default. Returns: An IPv4Interface or IPv6Interface ...
Take an IP string/int and return an object of the correct type.
[ "Take", "an", "IP", "string", "/", "int", "and", "return", "an", "object", "of", "the", "correct", "type", "." ]
def ip_interface(address): """Take an IP string/int and return an object of the correct type. Args: address: A string or integer, the IP address. Either IPv4 or IPv6 addresses may be supplied; integers less than 2**32 will be considered to be IPv4 by default. Returns: ...
[ "def", "ip_interface", "(", "address", ")", ":", "try", ":", "return", "IPv4Interface", "(", "address", ")", "except", "(", "AddressValueError", ",", "NetmaskValueError", ")", ":", "pass", "try", ":", "return", "IPv6Interface", "(", "address", ")", "except", ...
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/ipaddress.py#L207-L239
tensorflow/serving
3b29e18ab57c68604f599d0b3e1f8df417d22427
tensorflow_serving/apis/prediction_service_pb2_grpc.py
python
PredictionServiceServicer.Predict
(self, request, context)
Predict -- provides access to loaded TensorFlow model.
Predict -- provides access to loaded TensorFlow model.
[ "Predict", "--", "provides", "access", "to", "loaded", "TensorFlow", "model", "." ]
def Predict(self, request, context): """Predict -- provides access to loaded TensorFlow model. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
[ "def", "Predict", "(", "self", ",", "request", ",", "context", ")", ":", "context", ".", "set_code", "(", "grpc", ".", "StatusCode", ".", "UNIMPLEMENTED", ")", "context", ".", "set_details", "(", "'Method not implemented!'", ")", "raise", "NotImplementedError", ...
https://github.com/tensorflow/serving/blob/3b29e18ab57c68604f599d0b3e1f8df417d22427/tensorflow_serving/apis/prediction_service_pb2_grpc.py#L87-L92
Yelp/MOE
5b5a6a2c6c3cf47320126f7f5894e2a83e347f5c
moe/views/optimizable_gp_pretty_view.py
python
OptimizableGpPrettyView._get_default_optimizer_params
(self, params)
return OPTIMIZER_TYPE_AND_OBJECTIVE_TO_DEFAULT_PARAMETERS[optimizer_parameters_lookup]
Get the default optimizer parameters associated with the desired ``optimizer_type`` and REST endpoint. :param params: a (partially) deserialized REST request with everything except possibly ``params['optimizer_info']`` :type params: dict :return: default multistart and optimizer param...
Get the default optimizer parameters associated with the desired ``optimizer_type`` and REST endpoint.
[ "Get", "the", "default", "optimizer", "parameters", "associated", "with", "the", "desired", "optimizer_type", "and", "REST", "endpoint", "." ]
def _get_default_optimizer_params(self, params): """Get the default optimizer parameters associated with the desired ``optimizer_type`` and REST endpoint. :param params: a (partially) deserialized REST request with everything except possibly ``params['optimizer_info']`` :type params: ...
[ "def", "_get_default_optimizer_params", "(", "self", ",", "params", ")", ":", "optimizer_type", "=", "params", "[", "'optimizer_info'", "]", "[", "'optimizer_type'", "]", "optimizer_parameters_lookup", "=", "(", "optimizer_type", ",", "self", ".", "_route_name", ")"...
https://github.com/Yelp/MOE/blob/5b5a6a2c6c3cf47320126f7f5894e2a83e347f5c/moe/views/optimizable_gp_pretty_view.py#L26-L38
rrwick/Porechop
109e437280436d1ec27e5a5b7a34ffb752176390
ez_setup.py
python
_parse_args
()
return options
Parse the command line for options.
Parse the command line for options.
[ "Parse", "the", "command", "line", "for", "options", "." ]
def _parse_args(): """Parse the command line for options.""" parser = optparse.OptionParser() parser.add_option( '--user', dest='user_install', action='store_true', default=False, help='install in user site package') parser.add_option( '--download-base', dest='download_base', met...
[ "def", "_parse_args", "(", ")", ":", "parser", "=", "optparse", ".", "OptionParser", "(", ")", "parser", ".", "add_option", "(", "'--user'", ",", "dest", "=", "'user_install'", ",", "action", "=", "'store_true'", ",", "default", "=", "False", ",", "help", ...
https://github.com/rrwick/Porechop/blob/109e437280436d1ec27e5a5b7a34ffb752176390/ez_setup.py#L368-L394
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/ipython/py3/IPython/terminal/pt_inputhooks/wx.py
python
inputhook_wx1
(context)
return 0
Run the wx event loop by processing pending events only. This approach seems to work, but its performance is not great as it relies on having PyOS_InputHook called regularly.
Run the wx event loop by processing pending events only.
[ "Run", "the", "wx", "event", "loop", "by", "processing", "pending", "events", "only", "." ]
def inputhook_wx1(context): """Run the wx event loop by processing pending events only. This approach seems to work, but its performance is not great as it relies on having PyOS_InputHook called regularly. """ app = wx.GetApp() if app is not None: assert wx.Thread_IsMain() # Ma...
[ "def", "inputhook_wx1", "(", "context", ")", ":", "app", "=", "wx", ".", "GetApp", "(", ")", "if", "app", "is", "not", "None", ":", "assert", "wx", ".", "Thread_IsMain", "(", ")", "# Make a temporary event loop and process system events until", "# there are no mor...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/ipython/py3/IPython/terminal/pt_inputhooks/wx.py#L28-L47
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python/src/Lib/fractions.py
python
Fraction.__new__
(cls, numerator=0, denominator=None)
return self
Constructs a Fraction. Takes a string like '3/2' or '1.5', another Rational instance, a numerator/denominator pair, or a float. Examples -------- >>> Fraction(10, -8) Fraction(-5, 4) >>> Fraction(Fraction(1, 7), 5) Fraction(1, 35) >>> Fraction(F...
Constructs a Fraction.
[ "Constructs", "a", "Fraction", "." ]
def __new__(cls, numerator=0, denominator=None): """Constructs a Fraction. Takes a string like '3/2' or '1.5', another Rational instance, a numerator/denominator pair, or a float. Examples -------- >>> Fraction(10, -8) Fraction(-5, 4) >>> Fraction(Fract...
[ "def", "__new__", "(", "cls", ",", "numerator", "=", "0", ",", "denominator", "=", "None", ")", ":", "self", "=", "super", "(", "Fraction", ",", "cls", ")", ".", "__new__", "(", "cls", ")", "if", "denominator", "is", "None", ":", "if", "isinstance", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Lib/fractions.py#L68-L166
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/chunk.py
python
Chunk.getsize
(self)
return self.chunksize
Return the size of the current chunk.
Return the size of the current chunk.
[ "Return", "the", "size", "of", "the", "current", "chunk", "." ]
def getsize(self): """Return the size of the current chunk.""" return self.chunksize
[ "def", "getsize", "(", "self", ")", ":", "return", "self", ".", "chunksize" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/chunk.py#L82-L84
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/core/arrays/numpy_.py
python
PandasDtype.itemsize
(self)
return self._dtype.itemsize
The element size of this data-type object.
The element size of this data-type object.
[ "The", "element", "size", "of", "this", "data", "-", "type", "object", "." ]
def itemsize(self): """The element size of this data-type object.""" return self._dtype.itemsize
[ "def", "itemsize", "(", "self", ")", ":", "return", "self", ".", "_dtype", ".", "itemsize" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/core/arrays/numpy_.py#L97-L99
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/targets/dictimpl.py
python
impl_dict
(context, builder, sig, args)
return context.compile_internal(builder, call_ctor, sig, args)
The `dict()` implementation simply forwards the work to `Dict.empty()`.
The `dict()` implementation simply forwards the work to `Dict.empty()`.
[ "The", "dict", "()", "implementation", "simply", "forwards", "the", "work", "to", "Dict", ".", "empty", "()", "." ]
def impl_dict(context, builder, sig, args): """ The `dict()` implementation simply forwards the work to `Dict.empty()`. """ from numba.typed import Dict dicttype = sig.return_type kt, vt = dicttype.key_type, dicttype.value_type def call_ctor(): return Dict.empty(kt, vt) return...
[ "def", "impl_dict", "(", "context", ",", "builder", ",", "sig", ",", "args", ")", ":", "from", "numba", ".", "typed", "import", "Dict", "dicttype", "=", "sig", ".", "return_type", "kt", ",", "vt", "=", "dicttype", ".", "key_type", ",", "dicttype", ".",...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/targets/dictimpl.py#L8-L20
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/saved_model/loader_impl.py
python
SavedModelLoader.load
(self, sess, tags, import_scope=None, **saver_kwargs)
return self.get_meta_graph_def_from_tags(tags)
Load the MetaGraphDef graph and restore variable values into the session. Args: sess: tf.compat.v1.Session to restore variable values. tags: a set of string tags identifying a MetaGraphDef. import_scope: Optional `string` -- if specified, prepend this string followed by '/' to all loaded ...
Load the MetaGraphDef graph and restore variable values into the session.
[ "Load", "the", "MetaGraphDef", "graph", "and", "restore", "variable", "values", "into", "the", "session", "." ]
def load(self, sess, tags, import_scope=None, **saver_kwargs): """Load the MetaGraphDef graph and restore variable values into the session. Args: sess: tf.compat.v1.Session to restore variable values. tags: a set of string tags identifying a MetaGraphDef. import_scope: Optional `string` -- if...
[ "def", "load", "(", "self", ",", "sess", ",", "tags", ",", "import_scope", "=", "None", ",", "*", "*", "saver_kwargs", ")", ":", "with", "sess", ".", "graph", ".", "as_default", "(", ")", ":", "saver", ",", "_", "=", "self", ".", "load_graph", "(",...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/saved_model/loader_impl.py#L405-L425
apple/turicreate
cce55aa5311300e3ce6af93cb45ba791fd1bdf49
deps/src/libxml2-2.9.1/python/libxml2class.py
python
xmlDoc.newDocTextLen
(self, content, len)
return __tmp
Creation of a new text node with an extra content length parameter. The text node pertain to a given document.
Creation of a new text node with an extra content length parameter. The text node pertain to a given document.
[ "Creation", "of", "a", "new", "text", "node", "with", "an", "extra", "content", "length", "parameter", ".", "The", "text", "node", "pertain", "to", "a", "given", "document", "." ]
def newDocTextLen(self, content, len): """Creation of a new text node with an extra content length parameter. The text node pertain to a given document. """ ret = libxml2mod.xmlNewDocTextLen(self._o, content, len) if ret is None:raise treeError('xmlNewDocTextLen() failed') __t...
[ "def", "newDocTextLen", "(", "self", ",", "content", ",", "len", ")", ":", "ret", "=", "libxml2mod", ".", "xmlNewDocTextLen", "(", "self", ".", "_o", ",", "content", ",", "len", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "(", "'xmlNewDo...
https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/deps/src/libxml2-2.9.1/python/libxml2class.py#L3601-L3607
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/package_index.py
python
find_external_links
(url, page)
Find rel="homepage" and rel="download" links in `page`, yielding URLs
Find rel="homepage" and rel="download" links in `page`, yielding URLs
[ "Find", "rel", "=", "homepage", "and", "rel", "=", "download", "links", "in", "page", "yielding", "URLs" ]
def find_external_links(url, page): """Find rel="homepage" and rel="download" links in `page`, yielding URLs""" for match in REL.finditer(page): tag, rel = match.groups() rels = set(map(str.strip, rel.lower().split(','))) if 'homepage' in rels or 'download' in rels: for matc...
[ "def", "find_external_links", "(", "url", ",", "page", ")", ":", "for", "match", "in", "REL", ".", "finditer", "(", "page", ")", ":", "tag", ",", "rel", "=", "match", ".", "groups", "(", ")", "rels", "=", "set", "(", "map", "(", "str", ".", "stri...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/package_index.py#L223-L238
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/lib2to3/pytree.py
python
Node.clone
(self)
return Node(self.type, [ch.clone() for ch in self.children], fixers_applied=self.fixers_applied)
Return a cloned (deep) copy of self.
Return a cloned (deep) copy of self.
[ "Return", "a", "cloned", "(", "deep", ")", "copy", "of", "self", "." ]
def clone(self): """Return a cloned (deep) copy of self.""" return Node(self.type, [ch.clone() for ch in self.children], fixers_applied=self.fixers_applied)
[ "def", "clone", "(", "self", ")", ":", "return", "Node", "(", "self", ".", "type", ",", "[", "ch", ".", "clone", "(", ")", "for", "ch", "in", "self", ".", "children", "]", ",", "fixers_applied", "=", "self", ".", "fixers_applied", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/lib2to3/pytree.py#L257-L260
mapsme/omim
1892903b63f2c85b16ed4966d21fe76aba06b9ba
tools/python/stylesheet/webcolors/webcolors.py
python
rgb_percent_to_rgb
(rgb_percent_triplet)
return tuple(map(_percent_to_integer, rgb_percent_triplet))
Convert a 3-tuple of percentages, suitable for use in an ``rgb()`` color triplet, to a 3-tuple of integers suitable for use in representing that color. Some precision may be lost in this conversion. See the note regarding precision for ``rgb_to_rgb_percent()`` for details; generally speaking, the f...
Convert a 3-tuple of percentages, suitable for use in an ``rgb()`` color triplet, to a 3-tuple of integers suitable for use in representing that color.
[ "Convert", "a", "3", "-", "tuple", "of", "percentages", "suitable", "for", "use", "in", "an", "rgb", "()", "color", "triplet", "to", "a", "3", "-", "tuple", "of", "integers", "suitable", "for", "use", "in", "representing", "that", "color", "." ]
def rgb_percent_to_rgb(rgb_percent_triplet): """ Convert a 3-tuple of percentages, suitable for use in an ``rgb()`` color triplet, to a 3-tuple of integers suitable for use in representing that color. Some precision may be lost in this conversion. See the note regarding precision for ``rgb_to_r...
[ "def", "rgb_percent_to_rgb", "(", "rgb_percent_triplet", ")", ":", "return", "tuple", "(", "map", "(", "_percent_to_integer", ",", "rgb_percent_triplet", ")", ")" ]
https://github.com/mapsme/omim/blob/1892903b63f2c85b16ed4966d21fe76aba06b9ba/tools/python/stylesheet/webcolors/webcolors.py#L818-L843
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/plistlib.py
python
Plist.write
(self, pathOrFile)
Deprecated. Use the writePlist() function instead.
Deprecated. Use the writePlist() function instead.
[ "Deprecated", ".", "Use", "the", "writePlist", "()", "function", "instead", "." ]
def write(self, pathOrFile): """Deprecated. Use the writePlist() function instead.""" writePlist(self, pathOrFile)
[ "def", "write", "(", "self", ",", "pathOrFile", ")", ":", "writePlist", "(", "self", ",", "pathOrFile", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/plistlib.py#L351-L353
mingchen/protobuf-ios
0958df34558cd54cb7b6e6ca5c8855bf3d475046
compiler/python/mox.py
python
MockMethod._VerifyMethodCall
(self)
return expected
Verify the called method is expected. This can be an ordered method, or part of an unordered set. Returns: The expected mock method. Raises: UnexpectedMethodCall if the method called was not expected.
Verify the called method is expected.
[ "Verify", "the", "called", "method", "is", "expected", "." ]
def _VerifyMethodCall(self): """Verify the called method is expected. This can be an ordered method, or part of an unordered set. Returns: The expected mock method. Raises: UnexpectedMethodCall if the method called was not expected. """ expected = self._PopNextMethod() # Loo...
[ "def", "_VerifyMethodCall", "(", "self", ")", ":", "expected", "=", "self", ".", "_PopNextMethod", "(", ")", "# Loop here, because we might have a MethodGroup followed by another", "# group.", "while", "isinstance", "(", "expected", ",", "MethodGroup", ")", ":", "expect...
https://github.com/mingchen/protobuf-ios/blob/0958df34558cd54cb7b6e6ca5c8855bf3d475046/compiler/python/mox.py#L588-L613
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_misc.py
python
Log_GetRepetitionCounting
(*args)
return _misc_.Log_GetRepetitionCounting(*args)
Log_GetRepetitionCounting() -> bool
Log_GetRepetitionCounting() -> bool
[ "Log_GetRepetitionCounting", "()", "-", ">", "bool" ]
def Log_GetRepetitionCounting(*args): """Log_GetRepetitionCounting() -> bool""" return _misc_.Log_GetRepetitionCounting(*args)
[ "def", "Log_GetRepetitionCounting", "(", "*", "args", ")", ":", "return", "_misc_", ".", "Log_GetRepetitionCounting", "(", "*", "args", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_misc.py#L1692-L1694
apple/swift-lldb
d74be846ef3e62de946df343e8c234bde93a8912
scripts/Python/static-binding/lldb.py
python
SBThread.StepUsingScriptedThreadPlan
(self, *args)
return _lldb.SBThread_StepUsingScriptedThreadPlan(self, *args)
StepUsingScriptedThreadPlan(SBThread self, char const * script_class_name) -> SBError StepUsingScriptedThreadPlan(SBThread self, char const * script_class_name, bool resume_immediately) -> SBError
StepUsingScriptedThreadPlan(SBThread self, char const * script_class_name) -> SBError StepUsingScriptedThreadPlan(SBThread self, char const * script_class_name, bool resume_immediately) -> SBError
[ "StepUsingScriptedThreadPlan", "(", "SBThread", "self", "char", "const", "*", "script_class_name", ")", "-", ">", "SBError", "StepUsingScriptedThreadPlan", "(", "SBThread", "self", "char", "const", "*", "script_class_name", "bool", "resume_immediately", ")", "-", ">",...
def StepUsingScriptedThreadPlan(self, *args): """ StepUsingScriptedThreadPlan(SBThread self, char const * script_class_name) -> SBError StepUsingScriptedThreadPlan(SBThread self, char const * script_class_name, bool resume_immediately) -> SBError """ return _lldb.SBThread_StepUsi...
[ "def", "StepUsingScriptedThreadPlan", "(", "self", ",", "*", "args", ")", ":", "return", "_lldb", ".", "SBThread_StepUsingScriptedThreadPlan", "(", "self", ",", "*", "args", ")" ]
https://github.com/apple/swift-lldb/blob/d74be846ef3e62de946df343e8c234bde93a8912/scripts/Python/static-binding/lldb.py#L11742-L11747
facebookresearch/ELF
1f790173095cd910976d9f651b80beb872ec5d12
vendor/pybind11/tools/clang/cindex.py
python
Cursor.enum_value
(self)
return self._enum_value
Return the value of an enum constant.
Return the value of an enum constant.
[ "Return", "the", "value", "of", "an", "enum", "constant", "." ]
def enum_value(self): """Return the value of an enum constant.""" if not hasattr(self, '_enum_value'): assert self.kind == CursorKind.ENUM_CONSTANT_DECL # Figure out the underlying type of the enum to know if it # is a signed or unsigned quantity. underlyi...
[ "def", "enum_value", "(", "self", ")", ":", "if", "not", "hasattr", "(", "self", ",", "'_enum_value'", ")", ":", "assert", "self", ".", "kind", "==", "CursorKind", ".", "ENUM_CONSTANT_DECL", "# Figure out the underlying type of the enum to know if it", "# is a signed ...
https://github.com/facebookresearch/ELF/blob/1f790173095cd910976d9f651b80beb872ec5d12/vendor/pybind11/tools/clang/cindex.py#L1531-L1553
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/python2_version/klampt/src/robotsim.py
python
RobotModelLink.getAngularAcceleration
(self, ddq)
return _robotsim.RobotModelLink_getAngularAcceleration(self, ddq)
getAngularAcceleration(RobotModelLink self, doubleVector ddq) Returns the angular acceleration of the link given the robot's current joint configuration and velocities, and the joint accelerations ddq. Returns: (list of 3 floats): the angular acceleration of the link, in ...
getAngularAcceleration(RobotModelLink self, doubleVector ddq)
[ "getAngularAcceleration", "(", "RobotModelLink", "self", "doubleVector", "ddq", ")" ]
def getAngularAcceleration(self, ddq): """ getAngularAcceleration(RobotModelLink self, doubleVector ddq) Returns the angular acceleration of the link given the robot's current joint configuration and velocities, and the joint accelerations ddq. Returns: (list...
[ "def", "getAngularAcceleration", "(", "self", ",", "ddq", ")", ":", "return", "_robotsim", ".", "RobotModelLink_getAngularAcceleration", "(", "self", ",", "ddq", ")" ]
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/python2_version/klampt/src/robotsim.py#L4166-L4181
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/urllib3/response.py
python
HTTPResponse._init_decoder
(self)
Set-up the _decoder attribute if necessary.
Set-up the _decoder attribute if necessary.
[ "Set", "-", "up", "the", "_decoder", "attribute", "if", "necessary", "." ]
def _init_decoder(self): """ Set-up the _decoder attribute if necessary. """ # Note: content-encoding value should be case-insensitive, per RFC 7230 # Section 3.2 content_encoding = self.headers.get("content-encoding", "").lower() if self._decoder is None: ...
[ "def", "_init_decoder", "(", "self", ")", ":", "# Note: content-encoding value should be case-insensitive, per RFC 7230", "# Section 3.2", "content_encoding", "=", "self", ".", "headers", ".", "get", "(", "\"content-encoding\"", ",", "\"\"", ")", ".", "lower", "(", ")",...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/urllib3/response.py#L356-L373
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/email/encoders.py
python
encode_base64
(msg)
Encode the message's payload in Base64. Also, add an appropriate Content-Transfer-Encoding header.
Encode the message's payload in Base64.
[ "Encode", "the", "message", "s", "payload", "in", "Base64", "." ]
def encode_base64(msg): """Encode the message's payload in Base64. Also, add an appropriate Content-Transfer-Encoding header. """ orig = msg.get_payload() encdata = _bencode(orig) msg.set_payload(encdata) msg['Content-Transfer-Encoding'] = 'base64'
[ "def", "encode_base64", "(", "msg", ")", ":", "orig", "=", "msg", ".", "get_payload", "(", ")", "encdata", "=", "_bencode", "(", "orig", ")", "msg", ".", "set_payload", "(", "encdata", ")", "msg", "[", "'Content-Transfer-Encoding'", "]", "=", "'base64'" ]
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/email/encoders.py#L39-L47
GJDuck/LowFat
ecf6a0f0fa1b73a27a626cf493cc39e477b6faea
llvm-4.0.0.src/projects/compiler-rt/lib/sanitizer_common/scripts/cpplint.py
python
_DropCommonSuffixes
(filename)
return os.path.splitext(filename)[0]
Drops common suffixes like _test.cc or -inl.h from filename. For example: >>> _DropCommonSuffixes('foo/foo-inl.h') 'foo/foo' >>> _DropCommonSuffixes('foo/bar/foo.cc') 'foo/bar/foo' >>> _DropCommonSuffixes('foo/foo_internal.h') 'foo/foo' >>> _DropCommonSuffixes('foo/foo_unusualinternal.h')...
Drops common suffixes like _test.cc or -inl.h from filename.
[ "Drops", "common", "suffixes", "like", "_test", ".", "cc", "or", "-", "inl", ".", "h", "from", "filename", "." ]
def _DropCommonSuffixes(filename): """Drops common suffixes like _test.cc or -inl.h from filename. For example: >>> _DropCommonSuffixes('foo/foo-inl.h') 'foo/foo' >>> _DropCommonSuffixes('foo/bar/foo.cc') 'foo/bar/foo' >>> _DropCommonSuffixes('foo/foo_internal.h') 'foo/foo' >>> _DropCom...
[ "def", "_DropCommonSuffixes", "(", "filename", ")", ":", "for", "suffix", "in", "(", "'test.cc'", ",", "'regtest.cc'", ",", "'unittest.cc'", ",", "'inl.h'", ",", "'impl.h'", ",", "'internal.h'", ")", ":", "if", "(", "filename", ".", "endswith", "(", "suffix"...
https://github.com/GJDuck/LowFat/blob/ecf6a0f0fa1b73a27a626cf493cc39e477b6faea/llvm-4.0.0.src/projects/compiler-rt/lib/sanitizer_common/scripts/cpplint.py#L2913-L2937
BitMEX/api-connectors
37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812
auto-generated/python/swagger_client/models/position.py
python
Position.pos_init
(self)
return self._pos_init
Gets the pos_init of this Position. # noqa: E501 :return: The pos_init of this Position. # noqa: E501 :rtype: float
Gets the pos_init of this Position. # noqa: E501
[ "Gets", "the", "pos_init", "of", "this", "Position", ".", "#", "noqa", ":", "E501" ]
def pos_init(self): """Gets the pos_init of this Position. # noqa: E501 :return: The pos_init of this Position. # noqa: E501 :rtype: float """ return self._pos_init
[ "def", "pos_init", "(", "self", ")", ":", "return", "self", ".", "_pos_init" ]
https://github.com/BitMEX/api-connectors/blob/37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812/auto-generated/python/swagger_client/models/position.py#L1596-L1603
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/debug/lib/grpc_debug_server.py
python
EventListenerBaseStreamHandler.on_value_event
(self, event)
Callback for Event proto received through the gRPC stream. This Event proto carries a Tensor in its summary.value[0] field. Args: event: The Event proto from the stream to be processed.
Callback for Event proto received through the gRPC stream.
[ "Callback", "for", "Event", "proto", "received", "through", "the", "gRPC", "stream", "." ]
def on_value_event(self, event): """Callback for Event proto received through the gRPC stream. This Event proto carries a Tensor in its summary.value[0] field. Args: event: The Event proto from the stream to be processed. """ raise NotImplementedError( "on_value_event() is not implem...
[ "def", "on_value_event", "(", "self", ",", "event", ")", ":", "raise", "NotImplementedError", "(", "\"on_value_event() is not implemented in the base servicer class\"", ")" ]
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/debug/lib/grpc_debug_server.py#L91-L100