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
shedskin/shedskin
ae88dbca7b1d9671cd8be448cb0b497122758936
examples/c64/cpu.py
python
CPU.CLI
(self, opcode = 0x58)
Clear Interrupt Disable
Clear Interrupt Disable
[ "Clear", "Interrupt", "Disable" ]
def CLI(self, opcode = 0x58): """ Clear Interrupt Disable """ self.flags.discard("I")
[ "def", "CLI", "(", "self", ",", "opcode", "=", "0x58", ")", ":", "self", ".", "flags", ".", "discard", "(", "\"I\"", ")" ]
https://github.com/shedskin/shedskin/blob/ae88dbca7b1d9671cd8be448cb0b497122758936/examples/c64/cpu.py#L1736-L1738
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/cgi.py
python
FieldStorage.__init__
(self, fp=None, headers=None, outerboundary=b'', environ=os.environ, keep_blank_values=0, strict_parsing=0, limit=None, encoding='utf-8', errors='replace', max_num_fields=None, separator='&')
Constructor. Read multipart/* until last part. Arguments, all optional: fp : file pointer; default: sys.stdin.buffer (not used when the request method is GET) Can be : 1. a TextIOWrapper object 2. an object whose read() and readline() metho...
Constructor. Read multipart/* until last part.
[ "Constructor", ".", "Read", "multipart", "/", "*", "until", "last", "part", "." ]
def __init__(self, fp=None, headers=None, outerboundary=b'', environ=os.environ, keep_blank_values=0, strict_parsing=0, limit=None, encoding='utf-8', errors='replace', max_num_fields=None, separator='&'): """Constructor. Read multipart/* until last part. ...
[ "def", "__init__", "(", "self", ",", "fp", "=", "None", ",", "headers", "=", "None", ",", "outerboundary", "=", "b''", ",", "environ", "=", "os", ".", "environ", ",", "keep_blank_values", "=", "0", ",", "strict_parsing", "=", "0", ",", "limit", "=", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/cgi.py#L336-L499
thalium/icebox
99d147d5b9269222225443ce171b4fd46d8985d4
third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2.py
python
isIdeographic
(ch)
return ret
This function is DEPRECATED. Use xmlIsIdeographicQ instead
This function is DEPRECATED. Use xmlIsIdeographicQ instead
[ "This", "function", "is", "DEPRECATED", ".", "Use", "xmlIsIdeographicQ", "instead" ]
def isIdeographic(ch): """This function is DEPRECATED. Use xmlIsIdeographicQ instead """ ret = libxml2mod.xmlIsIdeographic(ch) return ret
[ "def", "isIdeographic", "(", "ch", ")", ":", "ret", "=", "libxml2mod", ".", "xmlIsIdeographic", "(", "ch", ")", "return", "ret" ]
https://github.com/thalium/icebox/blob/99d147d5b9269222225443ce171b4fd46d8985d4/third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2.py#L1062-L1065
naver/sling
5671cd445a2caae0b4dd0332299e4cfede05062c
webkit/Tools/Scripts/webkitpy/thirdparty/BeautifulSoup.py
python
Tag.__ne__
(self, other)
return not self == other
Returns true iff this tag is not identical to the other tag, as defined in __eq__.
Returns true iff this tag is not identical to the other tag, as defined in __eq__.
[ "Returns", "true", "iff", "this", "tag", "is", "not", "identical", "to", "the", "other", "tag", "as", "defined", "in", "__eq__", "." ]
def __ne__(self, other): """Returns true iff this tag is not identical to the other tag, as defined in __eq__.""" return not self == other
[ "def", "__ne__", "(", "self", ",", "other", ")", ":", "return", "not", "self", "==", "other" ]
https://github.com/naver/sling/blob/5671cd445a2caae0b4dd0332299e4cfede05062c/webkit/Tools/Scripts/webkitpy/thirdparty/BeautifulSoup.py#L672-L675
linyouhappy/kongkongxiyou
7a69b2913eb29f4be77f9a62fb90cdd72c4160f1
cocosjs/frameworks/cocos2d-x/tools/bindings-generator/clang/cindex.py
python
CursorKind.is_expression
(self)
return conf.lib.clang_isExpression(self)
Test if this is an expression kind.
Test if this is an expression kind.
[ "Test", "if", "this", "is", "an", "expression", "kind", "." ]
def is_expression(self): """Test if this is an expression kind.""" return conf.lib.clang_isExpression(self)
[ "def", "is_expression", "(", "self", ")", ":", "return", "conf", ".", "lib", ".", "clang_isExpression", "(", "self", ")" ]
https://github.com/linyouhappy/kongkongxiyou/blob/7a69b2913eb29f4be77f9a62fb90cdd72c4160f1/cocosjs/frameworks/cocos2d-x/tools/bindings-generator/clang/cindex.py#L640-L642
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/lib2to3/pygram.py
python
Symbols.__init__
(self, grammar)
Initializer. Creates an attribute for each grammar symbol (nonterminal), whose value is the symbol's type (an int >= 256).
Initializer.
[ "Initializer", "." ]
def __init__(self, grammar): """Initializer. Creates an attribute for each grammar symbol (nonterminal), whose value is the symbol's type (an int >= 256). """ for name, symbol in grammar.symbol2number.iteritems(): setattr(self, name, symbol)
[ "def", "__init__", "(", "self", ",", "grammar", ")", ":", "for", "name", ",", "symbol", "in", "grammar", ".", "symbol2number", ".", "iteritems", "(", ")", ":", "setattr", "(", "self", ",", "name", ",", "symbol", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/lib2to3/pygram.py#L22-L29
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/scipy/linalg/special_matrices.py
python
invpascal
(n, kind='symmetric', exact=True)
return invp
Returns the inverse of the n x n Pascal matrix. The Pascal matrix is a matrix containing the binomial coefficients as its elements. Parameters ---------- n : int The size of the matrix to create; that is, the result is an n x n matrix. kind : str, optional Must be one o...
Returns the inverse of the n x n Pascal matrix.
[ "Returns", "the", "inverse", "of", "the", "n", "x", "n", "Pascal", "matrix", "." ]
def invpascal(n, kind='symmetric', exact=True): """ Returns the inverse of the n x n Pascal matrix. The Pascal matrix is a matrix containing the binomial coefficients as its elements. Parameters ---------- n : int The size of the matrix to create; that is, the result is an n x n ...
[ "def", "invpascal", "(", "n", ",", "kind", "=", "'symmetric'", ",", "exact", "=", "True", ")", ":", "from", "scipy", ".", "special", "import", "comb", "if", "kind", "not", "in", "[", "'symmetric'", ",", "'lower'", ",", "'upper'", "]", ":", "raise", "...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/scipy/linalg/special_matrices.py#L855-L962
jeog/TDAmeritradeAPI
91c738afd7d57b54f6231170bd64c2550fafd34d
python/tdma_api/get.py
python
TransactionHistoryGetter.set_start_date
(self, start_date)
Sets/changes iso8601 date string of start of range to use.
Sets/changes iso8601 date string of start of range to use.
[ "Sets", "/", "changes", "iso8601", "date", "string", "of", "start", "of", "range", "to", "use", "." ]
def set_start_date(self, start_date): """Sets/changes iso8601 date string of start of range to use.""" clib.set_str(self._abi('SetStartDate'), start_date, self._obj)
[ "def", "set_start_date", "(", "self", ",", "start_date", ")", ":", "clib", ".", "set_str", "(", "self", ".", "_abi", "(", "'SetStartDate'", ")", ",", "start_date", ",", "self", ".", "_obj", ")" ]
https://github.com/jeog/TDAmeritradeAPI/blob/91c738afd7d57b54f6231170bd64c2550fafd34d/python/tdma_api/get.py#L1193-L1195
tiny-dnn/tiny-dnn
c0f576f5cb7b35893f62127cb7aec18f77a3bcc5
third_party/cpplint.py
python
_CppLintState.BackupFilters
(self)
Saves the current filter list to backup storage.
Saves the current filter list to backup storage.
[ "Saves", "the", "current", "filter", "list", "to", "backup", "storage", "." ]
def BackupFilters(self): """ Saves the current filter list to backup storage.""" self._filters_backup = self.filters[:]
[ "def", "BackupFilters", "(", "self", ")", ":", "self", ".", "_filters_backup", "=", "self", ".", "filters", "[", ":", "]" ]
https://github.com/tiny-dnn/tiny-dnn/blob/c0f576f5cb7b35893f62127cb7aec18f77a3bcc5/third_party/cpplint.py#L1032-L1034
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_core.py
python
MouseEvent.Aux1Down
(*args, **kwargs)
return _core_.MouseEvent_Aux1Down(*args, **kwargs)
Aux1Down(self) -> bool Returns true if the AUX1 mouse button state changed to down.
Aux1Down(self) -> bool
[ "Aux1Down", "(", "self", ")", "-", ">", "bool" ]
def Aux1Down(*args, **kwargs): """ Aux1Down(self) -> bool Returns true if the AUX1 mouse button state changed to down. """ return _core_.MouseEvent_Aux1Down(*args, **kwargs)
[ "def", "Aux1Down", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "MouseEvent_Aux1Down", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_core.py#L5649-L5655
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/util/keyword_args.py
python
keyword_args_only
(func)
return new_func
Decorator for marking specific function accepting keyword args only. This decorator raises a `ValueError` if the input `func` is called with any non-keyword args. This prevents the caller from providing the arguments in wrong order. Args: func: The function or method needed to be decorated. Returns: ...
Decorator for marking specific function accepting keyword args only.
[ "Decorator", "for", "marking", "specific", "function", "accepting", "keyword", "args", "only", "." ]
def keyword_args_only(func): """Decorator for marking specific function accepting keyword args only. This decorator raises a `ValueError` if the input `func` is called with any non-keyword args. This prevents the caller from providing the arguments in wrong order. Args: func: The function or method need...
[ "def", "keyword_args_only", "(", "func", ")", ":", "decorator_utils", ".", "validate_callable", "(", "func", ",", "\"keyword_args_only\"", ")", "@", "functools", ".", "wraps", "(", "func", ")", "def", "new_func", "(", "*", "args", ",", "*", "*", "kwargs", ...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/util/keyword_args.py#L23-L50
BlzFans/wke
b0fa21158312e40c5fbd84682d643022b6c34a93
cygwin/lib/python2.6/decimal.py
python
Decimal.__neg__
(self, context=None)
return ans._fix(context)
Returns a copy with the sign switched. Rounds, if it has reason.
Returns a copy with the sign switched.
[ "Returns", "a", "copy", "with", "the", "sign", "switched", "." ]
def __neg__(self, context=None): """Returns a copy with the sign switched. Rounds, if it has reason. """ if self._is_special: ans = self._check_nans(context=context) if ans: return ans if not self: # -Decimal('0') is Decimal('...
[ "def", "__neg__", "(", "self", ",", "context", "=", "None", ")", ":", "if", "self", ".", "_is_special", ":", "ans", "=", "self", ".", "_check_nans", "(", "context", "=", "context", ")", "if", "ans", ":", "return", "ans", "if", "not", "self", ":", "...
https://github.com/BlzFans/wke/blob/b0fa21158312e40c5fbd84682d643022b6c34a93/cygwin/lib/python2.6/decimal.py#L989-L1007
rodeofx/OpenWalter
6116fbe3f04f1146c854afbfbdbe944feaee647e
walter/maya/scripts/walterPanel/walterMayaTraverser.py
python
WalterMayaImplementation.dir
(self, origin, path)
return objects
Return the list of child objects of the path. Args: origin: The origin object that contains the tree. path: The path.
Return the list of child objects of the path.
[ "Return", "the", "list", "of", "child", "objects", "of", "the", "path", "." ]
def dir(self, origin, path): """ Return the list of child objects of the path. Args: origin: The origin object that contains the tree. path: The path. """ objects = pm.walterStandin(da=(origin, path)) # Exclude /materials from the list if...
[ "def", "dir", "(", "self", ",", "origin", ",", "path", ")", ":", "objects", "=", "pm", ".", "walterStandin", "(", "da", "=", "(", "origin", ",", "path", ")", ")", "# Exclude /materials from the list", "if", "path", "==", "\"/\"", ":", "objects", "[", "...
https://github.com/rodeofx/OpenWalter/blob/6116fbe3f04f1146c854afbfbdbe944feaee647e/walter/maya/scripts/walterPanel/walterMayaTraverser.py#L79-L93
hpi-xnor/BMXNet-v2
af2b1859eafc5c721b1397cef02f946aaf2ce20d
example/nce-loss/lstm_net.py
python
_lstm
(num_hidden, indata, prev_state, param, seqidx, layeridx, dropout=0.)
return LSTMState(c=next_c, h=next_h)
LSTM Cell symbol
LSTM Cell symbol
[ "LSTM", "Cell", "symbol" ]
def _lstm(num_hidden, indata, prev_state, param, seqidx, layeridx, dropout=0.): """LSTM Cell symbol""" if dropout > 0.: indata = mx.sym.Dropout(data=indata, p=dropout) i2h = mx.sym.FullyConnected(data=indata, weight=param.i2h_weight, bi...
[ "def", "_lstm", "(", "num_hidden", ",", "indata", ",", "prev_state", ",", "param", ",", "seqidx", ",", "layeridx", ",", "dropout", "=", "0.", ")", ":", "if", "dropout", ">", "0.", ":", "indata", "=", "mx", ".", "sym", ".", "Dropout", "(", "data", "...
https://github.com/hpi-xnor/BMXNet-v2/blob/af2b1859eafc5c721b1397cef02f946aaf2ce20d/example/nce-loss/lstm_net.py#L31-L54
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/closure_linter/closure_linter/statetracker.py
python
StateTracker.FunctionDepth
(self)
return len(self._function_stack)
Returns the number of functions in which the token is nested. Returns: The number of functions in which the token is nested.
Returns the number of functions in which the token is nested.
[ "Returns", "the", "number", "of", "functions", "in", "which", "the", "token", "is", "nested", "." ]
def FunctionDepth(self): """Returns the number of functions in which the token is nested. Returns: The number of functions in which the token is nested. """ return len(self._function_stack)
[ "def", "FunctionDepth", "(", "self", ")", ":", "return", "len", "(", "self", ".", "_function_stack", ")" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/closure_linter/closure_linter/statetracker.py#L925-L931
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/xml/sax/_exceptions.py
python
SAXParseException.getSystemId
(self)
return self._systemId
Get the system identifier of the entity where the exception occurred.
Get the system identifier of the entity where the exception occurred.
[ "Get", "the", "system", "identifier", "of", "the", "entity", "where", "the", "exception", "occurred", "." ]
def getSystemId(self): "Get the system identifier of the entity where the exception occurred." return self._systemId
[ "def", "getSystemId", "(", "self", ")", ":", "return", "self", ".", "_systemId" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/xml/sax/_exceptions.py#L85-L87
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqt/mantidqt/widgets/sliceviewer/model.py
python
_roi_binmd_parameters
(workspace, slicepoint: Sequence[Optional[float]], bin_params: Optional[Sequence[float]], limits: tuple, dimension_indices: tuple)
return params, xindex, yindex
Return a sequence of 2-tuples defining the limits for MDEventWorkspace binning :param workspace: MDEventWorkspace that is to be binned :param slicepoint: ND sequence of either None or float. A float defines the point in that dimension for the slice. :param bin_params: A list ndims long e...
Return a sequence of 2-tuples defining the limits for MDEventWorkspace binning :param workspace: MDEventWorkspace that is to be binned :param slicepoint: ND sequence of either None or float. A float defines the point in that dimension for the slice. :param bin_params: A list ndims long e...
[ "Return", "a", "sequence", "of", "2", "-", "tuples", "defining", "the", "limits", "for", "MDEventWorkspace", "binning", ":", "param", "workspace", ":", "MDEventWorkspace", "that", "is", "to", "be", "binned", ":", "param", "slicepoint", ":", "ND", "sequence", ...
def _roi_binmd_parameters(workspace, slicepoint: Sequence[Optional[float]], bin_params: Optional[Sequence[float]], limits: tuple, dimension_indices: tuple) -> Tuple[dict, int, int]: """ Return a sequence of 2-tuples defining the limit...
[ "def", "_roi_binmd_parameters", "(", "workspace", ",", "slicepoint", ":", "Sequence", "[", "Optional", "[", "float", "]", "]", ",", "bin_params", ":", "Optional", "[", "Sequence", "[", "float", "]", "]", ",", "limits", ":", "tuple", ",", "dimension_indices",...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqt/mantidqt/widgets/sliceviewer/model.py#L567-L604
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/Jinja2/py2/jinja2/compiler.py
python
CodeGenerator.visit_Include
(self, node, frame)
Handles includes.
Handles includes.
[ "Handles", "includes", "." ]
def visit_Include(self, node, frame): """Handles includes.""" if node.ignore_missing: self.writeline("try:") self.indent() func_name = "get_or_select_template" if isinstance(node.template, nodes.Const): if isinstance(node.template.value, string_types)...
[ "def", "visit_Include", "(", "self", ",", "node", ",", "frame", ")", ":", "if", "node", ".", "ignore_missing", ":", "self", ".", "writeline", "(", "\"try:\"", ")", "self", ".", "indent", "(", ")", "func_name", "=", "\"get_or_select_template\"", "if", "isin...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/Jinja2/py2/jinja2/compiler.py#L919-L975
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemDefectReporter/v1/AWS/common-code/Lib/requests/sessions.py
python
Session.merge_environment_settings
(self, url, proxies, stream, verify, cert)
return {'verify': verify, 'proxies': proxies, 'stream': stream, 'cert': cert}
Check the environment and merge it with some settings. :rtype: dict
Check the environment and merge it with some settings.
[ "Check", "the", "environment", "and", "merge", "it", "with", "some", "settings", "." ]
def merge_environment_settings(self, url, proxies, stream, verify, cert): """ Check the environment and merge it with some settings. :rtype: dict """ # Gather clues from the surrounding environment. if self.trust_env: # Set environment's proxies. ...
[ "def", "merge_environment_settings", "(", "self", ",", "url", ",", "proxies", ",", "stream", ",", "verify", ",", "cert", ")", ":", "# Gather clues from the surrounding environment.", "if", "self", ".", "trust_env", ":", "# Set environment's proxies.", "no_proxy", "=",...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemDefectReporter/v1/AWS/common-code/Lib/requests/sessions.py#L662-L689
opengauss-mirror/openGauss-server
e383f1b77720a00ddbe4c0655bc85914d9b02a2b
src/gausskernel/dbmind/tools/ai_server/agent/task/os_exporter.py
python
OSExporter.io_read
(self)
return std.decode("utf-8").strip()
Obtaining the io_read info of the GaussDB :return: io_read info
Obtaining the io_read info of the GaussDB :return: io_read info
[ "Obtaining", "the", "io_read", "info", "of", "the", "GaussDB", ":", "return", ":", "io_read", "info" ]
def io_read(self): """ Obtaining the io_read info of the GaussDB :return: io_read info """ proc_pid = Common.get_proc_pid(self.ip, self.port) cmd = "pidstat -d | awk '{if ($4==\"%s\")print}' | awk '{print $5}'" % proc_pid std, _ = Common.execute_cmd(cmd) i...
[ "def", "io_read", "(", "self", ")", ":", "proc_pid", "=", "Common", ".", "get_proc_pid", "(", "self", ".", "ip", ",", "self", ".", "port", ")", "cmd", "=", "\"pidstat -d | awk '{if ($4==\\\"%s\\\")print}' | awk '{print $5}'\"", "%", "proc_pid", "std", ",", "_", ...
https://github.com/opengauss-mirror/openGauss-server/blob/e383f1b77720a00ddbe4c0655bc85914d9b02a2b/src/gausskernel/dbmind/tools/ai_server/agent/task/os_exporter.py#L81-L91
giuspen/cherrytree
84712f206478fcf9acf30174009ad28c648c6344
pygtk2/modules/tablez.py
python
TablesHandler.dialog_tablecolhandle
(self, title, rename_text)
return [False, None, None]
Opens the Table Column Handle Dialog
Opens the Table Column Handle Dialog
[ "Opens", "the", "Table", "Column", "Handle", "Dialog" ]
def dialog_tablecolhandle(self, title, rename_text): """Opens the Table Column Handle Dialog""" dialog = gtk.Dialog(title=title, parent=self.dad.window, flags=gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT, buttons=(gtk...
[ "def", "dialog_tablecolhandle", "(", "self", ",", "title", ",", "rename_text", ")", ":", "dialog", "=", "gtk", ".", "Dialog", "(", "title", "=", "title", ",", "parent", "=", "self", ".", "dad", ".", "window", ",", "flags", "=", "gtk", ".", "DIALOG_MODA...
https://github.com/giuspen/cherrytree/blob/84712f206478fcf9acf30174009ad28c648c6344/pygtk2/modules/tablez.py#L51-L172
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
third_party/tlslite/tlslite/utils/hmac.py
python
_strxor
(s1, s2)
return "".join(map(lambda x, y: chr(ord(x) ^ ord(y)), s1, s2))
Utility method. XOR the two strings s1 and s2 (must have same length).
Utility method. XOR the two strings s1 and s2 (must have same length).
[ "Utility", "method", ".", "XOR", "the", "two", "strings", "s1", "and", "s2", "(", "must", "have", "same", "length", ")", "." ]
def _strxor(s1, s2): """Utility method. XOR the two strings s1 and s2 (must have same length). """ return "".join(map(lambda x, y: chr(ord(x) ^ ord(y)), s1, s2))
[ "def", "_strxor", "(", "s1", ",", "s2", ")", ":", "return", "\"\"", ".", "join", "(", "map", "(", "lambda", "x", ",", "y", ":", "chr", "(", "ord", "(", "x", ")", "^", "ord", "(", "y", ")", ")", ",", "s1", ",", "s2", ")", ")" ]
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/third_party/tlslite/tlslite/utils/hmac.py#L9-L12
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/genericmessagedialog.py
python
GenericMessageDialog.SetOKCancelLabels
(self, ok, cancel)
return True
Overrides the default labels of the ``OK`` and ``Cancel`` buttons. :param `ok`: the new label for the ``OK`` button; :param `cancel`: the new label for the ``Cancel`` button. :see: The remarks in the :meth:`~GenericMessageDialog.SetYesNoLabels` documentation. .. versionadded:: 0.9.3
Overrides the default labels of the ``OK`` and ``Cancel`` buttons.
[ "Overrides", "the", "default", "labels", "of", "the", "OK", "and", "Cancel", "buttons", "." ]
def SetOKCancelLabels(self, ok, cancel): """ Overrides the default labels of the ``OK`` and ``Cancel`` buttons. :param `ok`: the new label for the ``OK`` button; :param `cancel`: the new label for the ``Cancel`` button. :see: The remarks in the :meth:`~GenericMessageDialog.SetY...
[ "def", "SetOKCancelLabels", "(", "self", ",", "ok", ",", "cancel", ")", ":", "self", ".", "_ok", ",", "self", ".", "_cancel", "=", "ok", ",", "cancel", "return", "True" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/genericmessagedialog.py#L1196-L1209
rprichard/CxxCodeBrowser
a2fa83d2fe06119f0a7a1827b8167fab88b53561
third_party/libre2/lib/codereview/codereview.py
python
VersionControlSystem.IsBinary
(self, filename)
return not mimetype.startswith("text/")
Returns true if the guessed mimetyped isnt't in text group.
Returns true if the guessed mimetyped isnt't in text group.
[ "Returns", "true", "if", "the", "guessed", "mimetyped", "isnt", "t", "in", "text", "group", "." ]
def IsBinary(self, filename): """Returns true if the guessed mimetyped isnt't in text group.""" mimetype = mimetypes.guess_type(filename)[0] if not mimetype: return False # e.g. README, "real" binaries usually have an extension # special case for text files which don't start with text/ if mimetype in TEXT...
[ "def", "IsBinary", "(", "self", ",", "filename", ")", ":", "mimetype", "=", "mimetypes", ".", "guess_type", "(", "filename", ")", "[", "0", "]", "if", "not", "mimetype", ":", "return", "False", "# e.g. README, \"real\" binaries usually have an extension", "# speci...
https://github.com/rprichard/CxxCodeBrowser/blob/a2fa83d2fe06119f0a7a1827b8167fab88b53561/third_party/libre2/lib/codereview/codereview.py#L3324-L3332
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/closure_linter/closure_linter/statetracker.py
python
StateTracker.InAssignedFunction
(self)
return self.InFunction() and self._function_stack[-1].is_assigned
Returns true if the current token is within a function variable. Returns: True if if the current token is within a function variable
Returns true if the current token is within a function variable.
[ "Returns", "true", "if", "the", "current", "token", "is", "within", "a", "function", "variable", "." ]
def InAssignedFunction(self): """Returns true if the current token is within a function variable. Returns: True if if the current token is within a function variable """ return self.InFunction() and self._function_stack[-1].is_assigned
[ "def", "InAssignedFunction", "(", "self", ")", ":", "return", "self", ".", "InFunction", "(", ")", "and", "self", ".", "_function_stack", "[", "-", "1", "]", ".", "is_assigned" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/closure_linter/closure_linter/statetracker.py#L843-L849
FEniCS/dolfinx
3dfdf038cccdb70962865b58a63bf29c2e55ec6e
python/dolfinx/mesh.py
python
Mesh.__init__
(self, comm: _MPI.Comm, topology: _cpp.mesh.Topology, geometry: _cpp.mesh.Geometry, domain: ufl.Mesh)
A class for representing meshes Args: comm: The MPI communicator topology: The mesh topology geometry: The mesh geometry domain: The MPI communicator Notes: Mesh objects are not generally created using this class directly.
A class for representing meshes
[ "A", "class", "for", "representing", "meshes" ]
def __init__(self, comm: _MPI.Comm, topology: _cpp.mesh.Topology, geometry: _cpp.mesh.Geometry, domain: ufl.Mesh): """A class for representing meshes Args: comm: The MPI communicator topology: The mesh topology geometry: The mesh geometry ...
[ "def", "__init__", "(", "self", ",", "comm", ":", "_MPI", ".", "Comm", ",", "topology", ":", "_cpp", ".", "mesh", ".", "Topology", ",", "geometry", ":", "_cpp", ".", "mesh", ".", "Geometry", ",", "domain", ":", "ufl", ".", "Mesh", ")", ":", "super"...
https://github.com/FEniCS/dolfinx/blob/3dfdf038cccdb70962865b58a63bf29c2e55ec6e/python/dolfinx/mesh.py#L35-L51
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py2/pandas/core/indexes/base.py
python
Index._is_strictly_monotonic_increasing
(self)
return self.is_unique and self.is_monotonic_increasing
Return if the index is strictly monotonic increasing (only increasing) values. Examples -------- >>> Index([1, 2, 3])._is_strictly_monotonic_increasing True >>> Index([1, 2, 2])._is_strictly_monotonic_increasing False >>> Index([1, 3, 2])._is_strictly_mon...
Return if the index is strictly monotonic increasing (only increasing) values.
[ "Return", "if", "the", "index", "is", "strictly", "monotonic", "increasing", "(", "only", "increasing", ")", "values", "." ]
def _is_strictly_monotonic_increasing(self): """ Return if the index is strictly monotonic increasing (only increasing) values. Examples -------- >>> Index([1, 2, 3])._is_strictly_monotonic_increasing True >>> Index([1, 2, 2])._is_strictly_monotonic_incre...
[ "def", "_is_strictly_monotonic_increasing", "(", "self", ")", ":", "return", "self", ".", "is_unique", "and", "self", ".", "is_monotonic_increasing" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py2/pandas/core/indexes/base.py#L1622-L1636
SFTtech/openage
d6a08c53c48dc1e157807471df92197f6ca9e04d
openage/convert/entity_object/conversion/aoc/genie_effect.py
python
GenieEffectObject.get_type
(self)
return self["type_id"].get_value()
Returns the effect's type.
Returns the effect's type.
[ "Returns", "the", "effect", "s", "type", "." ]
def get_type(self): """ Returns the effect's type. """ return self["type_id"].get_value()
[ "def", "get_type", "(", "self", ")", ":", "return", "self", "[", "\"type_id\"", "]", ".", "get_value", "(", ")" ]
https://github.com/SFTtech/openage/blob/d6a08c53c48dc1e157807471df92197f6ca9e04d/openage/convert/entity_object/conversion/aoc/genie_effect.py#L35-L39
leanprover/lean
72a965986fa5aeae54062e98efb3140b2c4e79fd
src/cmake/Modules/cpplint.py
python
RemoveMultiLineComments
(filename, lines, error)
Removes multiline (c-style) comments from lines.
Removes multiline (c-style) comments from lines.
[ "Removes", "multiline", "(", "c", "-", "style", ")", "comments", "from", "lines", "." ]
def RemoveMultiLineComments(filename, lines, error): """Removes multiline (c-style) comments from lines.""" lineix = 0 while lineix < len(lines): lineix_begin = FindNextMultiLineCommentStart(lines, lineix) if lineix_begin >= len(lines): return lineix_end = FindNextMultiLineCommentEnd(lines, line...
[ "def", "RemoveMultiLineComments", "(", "filename", ",", "lines", ",", "error", ")", ":", "lineix", "=", "0", "while", "lineix", "<", "len", "(", "lines", ")", ":", "lineix_begin", "=", "FindNextMultiLineCommentStart", "(", "lines", ",", "lineix", ")", "if", ...
https://github.com/leanprover/lean/blob/72a965986fa5aeae54062e98efb3140b2c4e79fd/src/cmake/Modules/cpplint.py#L1025-L1038
BlzFans/wke
b0fa21158312e40c5fbd84682d643022b6c34a93
cygwin/lib/python2.6/xml/sax/xmlreader.py
python
XMLReader.parse
(self, source)
Parse an XML document from a system identifier or an InputSource.
Parse an XML document from a system identifier or an InputSource.
[ "Parse", "an", "XML", "document", "from", "a", "system", "identifier", "or", "an", "InputSource", "." ]
def parse(self, source): "Parse an XML document from a system identifier or an InputSource." raise NotImplementedError("This method must be implemented!")
[ "def", "parse", "(", "self", ",", "source", ")", ":", "raise", "NotImplementedError", "(", "\"This method must be implemented!\"", ")" ]
https://github.com/BlzFans/wke/blob/b0fa21158312e40c5fbd84682d643022b6c34a93/cygwin/lib/python2.6/xml/sax/xmlreader.py#L30-L32
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/fsspec/transaction.py
python
Transaction.__init__
(self, fs)
Parameters ---------- fs: FileSystem instance
Parameters ---------- fs: FileSystem instance
[ "Parameters", "----------", "fs", ":", "FileSystem", "instance" ]
def __init__(self, fs): """ Parameters ---------- fs: FileSystem instance """ self.fs = fs self.files = []
[ "def", "__init__", "(", "self", ",", "fs", ")", ":", "self", ".", "fs", "=", "fs", "self", ".", "files", "=", "[", "]" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/fsspec/transaction.py#L9-L16
root-project/root
fcd3583bb14852bf2e8cd2415717cbaac0e75896
bindings/pyroot/pythonizations/python/ROOT/_pythonization/_roofit/_rooabsdata.py
python
RooAbsData.plotOn
(self, *args, **kwargs)
return self._plotOn(*args, **kwargs)
r"""The RooAbsData::plotOn() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
r"""The RooAbsData::plotOn() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
[ "r", "The", "RooAbsData", "::", "plotOn", "()", "function", "is", "pythonized", "with", "the", "command", "argument", "pythonization", ".", "The", "keywords", "must", "correspond", "to", "the", "CmdArgs", "of", "the", "function", "." ]
def plotOn(self, *args, **kwargs): r"""The RooAbsData::plotOn() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function. """ # Redefinition of `RooAbsData.plotOn` for keyword arguments. args, kwargs = _kwargs_to_...
[ "def", "plotOn", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "# Redefinition of `RooAbsData.plotOn` for keyword arguments.", "args", ",", "kwargs", "=", "_kwargs_to_roocmdargs", "(", "*", "args", ",", "*", "*", "kwargs", ")", "return", "s...
https://github.com/root-project/root/blob/fcd3583bb14852bf2e8cd2415717cbaac0e75896/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_roofit/_rooabsdata.py#L38-L44
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/scipy/stats/kde.py
python
gaussian_kde.pdf
(self, x)
return self.evaluate(x)
Evaluate the estimated pdf on a provided set of points. Notes ----- This is an alias for `gaussian_kde.evaluate`. See the ``evaluate`` docstring for more details.
Evaluate the estimated pdf on a provided set of points.
[ "Evaluate", "the", "estimated", "pdf", "on", "a", "provided", "set", "of", "points", "." ]
def pdf(self, x): """ Evaluate the estimated pdf on a provided set of points. Notes ----- This is an alias for `gaussian_kde.evaluate`. See the ``evaluate`` docstring for more details. """ return self.evaluate(x)
[ "def", "pdf", "(", "self", ",", "x", ")", ":", "return", "self", ".", "evaluate", "(", "x", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/scipy/stats/kde.py#L514-L524
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/telemetry/telemetry/web_perf/metrics/webrtc_rendering_stats.py
python
WebMediaPlayerMsRenderingStats._IsEventValid
(self, event)
return True
Check that the needed arguments are present in event. Args: event: event to check. Returns: True is event is valid, false otherwise.
Check that the needed arguments are present in event.
[ "Check", "that", "the", "needed", "arguments", "are", "present", "in", "event", "." ]
def _IsEventValid(self, event): """Check that the needed arguments are present in event. Args: event: event to check. Returns: True is event is valid, false otherwise.""" if not event.args: return False mandatory = [ACTUAL_RENDER_BEGIN, ACTUAL_RENDER_END, IDEAL_RENDER_INS...
[ "def", "_IsEventValid", "(", "self", ",", "event", ")", ":", "if", "not", "event", ".", "args", ":", "return", "False", "mandatory", "=", "[", "ACTUAL_RENDER_BEGIN", ",", "ACTUAL_RENDER_END", ",", "IDEAL_RENDER_INSTANT", ",", "SERIAL", "]", "for", "parameter",...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/telemetry/telemetry/web_perf/metrics/webrtc_rendering_stats.py#L51-L66
panda3d/panda3d
833ad89ebad58395d0af0b7ec08538e5e4308265
direct/src/distributed/StagedObject.py
python
StagedObject.goOnStage
(self, *args, **kw)
If a stage switch is needed, the correct "handle" function will be called. Otherwise, nothing happens.
If a stage switch is needed, the correct "handle" function will be called. Otherwise, nothing happens.
[ "If", "a", "stage", "switch", "is", "needed", "the", "correct", "handle", "function", "will", "be", "called", ".", "Otherwise", "nothing", "happens", "." ]
def goOnStage(self, *args, **kw): """ If a stage switch is needed, the correct "handle" function will be called. Otherwise, nothing happens. """ # This is the high level function that clients of # your class should call to set the on/off stage state. if not self...
[ "def", "goOnStage", "(", "self", ",", "*", "args", ",", "*", "*", "kw", ")", ":", "# This is the high level function that clients of", "# your class should call to set the on/off stage state.", "if", "not", "self", ".", "isOnStage", "(", ")", ":", "self", ".", "hand...
https://github.com/panda3d/panda3d/blob/833ad89ebad58395d0af0b7ec08538e5e4308265/direct/src/distributed/StagedObject.py#L21-L30
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/gsutil/gslib/cloud_api_delegator.py
python
CloudApiDelegator.XmlPassThroughGetLifecycle
(self, storage_url, provider=None)
return self._GetApi(provider).XmlPassThroughGetLifecycle(storage_url)
XML compatibility function for getting lifecycle config on a bucket. Args: storage_url: StorageUrl object. provider: Cloud storage provider to connect to. If not present, class-wide default is used. Raises: ArgumentException for errors during input validation. ServiceE...
XML compatibility function for getting lifecycle config on a bucket.
[ "XML", "compatibility", "function", "for", "getting", "lifecycle", "config", "on", "a", "bucket", "." ]
def XmlPassThroughGetLifecycle(self, storage_url, provider=None): """XML compatibility function for getting lifecycle config on a bucket. Args: storage_url: StorageUrl object. provider: Cloud storage provider to connect to. If not present, class-wide default is used. Raises: ...
[ "def", "XmlPassThroughGetLifecycle", "(", "self", ",", "storage_url", ",", "provider", "=", "None", ")", ":", "return", "self", ".", "_GetApi", "(", "provider", ")", ".", "XmlPassThroughGetLifecycle", "(", "storage_url", ")" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/gsutil/gslib/cloud_api_delegator.py#L358-L373
CanalTP/navitia
cb84ce9859070187e708818b058e6a7e0b7f891b
source/jormungandr/jormungandr/realtime_schedule/sytral.py
python
Sytral._make_params
(self, route_point)
return params
create params list for GET request
create params list for GET request
[ "create", "params", "list", "for", "GET", "request" ]
def _make_params(self, route_point): ''' create params list for GET request ''' stop_id_list = route_point.fetch_all_stop_id(self.object_id_tag) if not stop_id_list: logging.getLogger(__name__).debug( 'missing realtime id for {obj}: stop code={s}'.form...
[ "def", "_make_params", "(", "self", ",", "route_point", ")", ":", "stop_id_list", "=", "route_point", ".", "fetch_all_stop_id", "(", "self", ".", "object_id_tag", ")", "if", "not", "stop_id_list", ":", "logging", ".", "getLogger", "(", "__name__", ")", ".", ...
https://github.com/CanalTP/navitia/blob/cb84ce9859070187e708818b058e6a7e0b7f891b/source/jormungandr/jormungandr/realtime_schedule/sytral.py#L89-L106
hpi-xnor/BMXNet
ed0b201da6667887222b8e4b5f997c4f6b61943d
python/mxnet/module/bucketing_module.py
python
BucketingModule.bind
(self, data_shapes, label_shapes=None, for_training=True, inputs_need_grad=False, force_rebind=False, shared_module=None, grad_req='write')
Binding for a `BucketingModule` means setting up the buckets and binding the executor for the default bucket key. Executors corresponding to other keys are bound afterwards with `switch_bucket`. Parameters ---------- data_shapes : list of (str, tuple) This should cor...
Binding for a `BucketingModule` means setting up the buckets and binding the executor for the default bucket key. Executors corresponding to other keys are bound afterwards with `switch_bucket`.
[ "Binding", "for", "a", "BucketingModule", "means", "setting", "up", "the", "buckets", "and", "binding", "the", "executor", "for", "the", "default", "bucket", "key", ".", "Executors", "corresponding", "to", "other", "keys", "are", "bound", "afterwards", "with", ...
def bind(self, data_shapes, label_shapes=None, for_training=True, inputs_need_grad=False, force_rebind=False, shared_module=None, grad_req='write'): """Binding for a `BucketingModule` means setting up the buckets and binding the executor for the default bucket key. Executors co...
[ "def", "bind", "(", "self", ",", "data_shapes", ",", "label_shapes", "=", "None", ",", "for_training", "=", "True", ",", "inputs_need_grad", "=", "False", ",", "force_rebind", "=", "False", ",", "shared_module", "=", "None", ",", "grad_req", "=", "'write'", ...
https://github.com/hpi-xnor/BMXNet/blob/ed0b201da6667887222b8e4b5f997c4f6b61943d/python/mxnet/module/bucketing_module.py#L282-L344
qboticslabs/mastering_ros
d83e78f30acc45b0f18522c1d5fae3a7f52974b9
chapter_9_codes/chefbot/chefbot_bringup/scripts/SerialDataGateway.py
python
SerialDataGateway.__init__
(self, port="/dev/ttyUSB0", baudrate=115200, lineHandler = _OnLineReceived)
Initializes the receiver class. port: The serial port to listen to. receivedLineHandler: The function to call when a line was received.
Initializes the receiver class. port: The serial port to listen to. receivedLineHandler: The function to call when a line was received.
[ "Initializes", "the", "receiver", "class", ".", "port", ":", "The", "serial", "port", "to", "listen", "to", ".", "receivedLineHandler", ":", "The", "function", "to", "call", "when", "a", "line", "was", "received", "." ]
def __init__(self, port="/dev/ttyUSB0", baudrate=115200, lineHandler = _OnLineReceived): ''' Initializes the receiver class. port: The serial port to listen to. receivedLineHandler: The function to call when a line was received. ''' self._Port = port self._Baudrate = baudrate self.ReceivedLineHandler =...
[ "def", "__init__", "(", "self", ",", "port", "=", "\"/dev/ttyUSB0\"", ",", "baudrate", "=", "115200", ",", "lineHandler", "=", "_OnLineReceived", ")", ":", "self", ".", "_Port", "=", "port", "self", ".", "_Baudrate", "=", "baudrate", "self", ".", "Received...
https://github.com/qboticslabs/mastering_ros/blob/d83e78f30acc45b0f18522c1d5fae3a7f52974b9/chapter_9_codes/chefbot/chefbot_bringup/scripts/SerialDataGateway.py#L22-L31
apple/swift-lldb
d74be846ef3e62de946df343e8c234bde93a8912
scripts/Python/static-binding/lldb.py
python
SBValue.GetStaticValue
(self)
return _lldb.SBValue_GetStaticValue(self)
GetStaticValue(SBValue self) -> SBValue
GetStaticValue(SBValue self) -> SBValue
[ "GetStaticValue", "(", "SBValue", "self", ")", "-", ">", "SBValue" ]
def GetStaticValue(self): """GetStaticValue(SBValue self) -> SBValue""" return _lldb.SBValue_GetStaticValue(self)
[ "def", "GetStaticValue", "(", "self", ")", ":", "return", "_lldb", ".", "SBValue_GetStaticValue", "(", "self", ")" ]
https://github.com/apple/swift-lldb/blob/d74be846ef3e62de946df343e8c234bde93a8912/scripts/Python/static-binding/lldb.py#L14284-L14286
PaddlePaddle/Paddle
1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c
python/paddle/tensor/manipulation.py
python
reshape
(x, shape, name=None)
return paddle.fluid.layers.reshape(x=x, shape=shape, name=name)
This operator changes the shape of ``x`` without changing its data. Note that the output Tensor will share data with origin Tensor and doesn't have a Tensor copy in ``dygraph`` mode. If you want to use the Tensor copy version, please use `Tensor.clone` like ``reshape_clone_x = x.reshape([-1]).clone()...
This operator changes the shape of ``x`` without changing its data.
[ "This", "operator", "changes", "the", "shape", "of", "x", "without", "changing", "its", "data", "." ]
def reshape(x, shape, name=None): """ This operator changes the shape of ``x`` without changing its data. Note that the output Tensor will share data with origin Tensor and doesn't have a Tensor copy in ``dygraph`` mode. If you want to use the Tensor copy version, please use `Tensor.clone` like ...
[ "def", "reshape", "(", "x", ",", "shape", ",", "name", "=", "None", ")", ":", "return", "paddle", ".", "fluid", ".", "layers", ".", "reshape", "(", "x", "=", "x", ",", "shape", "=", "shape", ",", "name", "=", "name", ")" ]
https://github.com/PaddlePaddle/Paddle/blob/1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c/python/paddle/tensor/manipulation.py#L2026-L2102
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_core.py
python
Window.GetMinHeight
(*args, **kwargs)
return _core_.Window_GetMinHeight(*args, **kwargs)
GetMinHeight(self) -> int
GetMinHeight(self) -> int
[ "GetMinHeight", "(", "self", ")", "-", ">", "int" ]
def GetMinHeight(*args, **kwargs): """GetMinHeight(self) -> int""" return _core_.Window_GetMinHeight(*args, **kwargs)
[ "def", "GetMinHeight", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "Window_GetMinHeight", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_core.py#L9776-L9778
miyosuda/TensorFlowAndroidDemo
35903e0221aa5f109ea2dbef27f20b52e317f42d
jni-build/jni/include/tensorflow/python/training/queue_runner.py
python
QueueRunner.exceptions_raised
(self)
return self._exceptions_raised
Exceptions raised but not handled by the `QueueRunner` threads. Exceptions raised in queue runner threads are handled in one of two ways depending on whether or not a `Coordinator` was passed to `create_threads()`: * With a `Coordinator`, exceptions are reported to the coordinator and forgotten ...
Exceptions raised but not handled by the `QueueRunner` threads.
[ "Exceptions", "raised", "but", "not", "handled", "by", "the", "QueueRunner", "threads", "." ]
def exceptions_raised(self): """Exceptions raised but not handled by the `QueueRunner` threads. Exceptions raised in queue runner threads are handled in one of two ways depending on whether or not a `Coordinator` was passed to `create_threads()`: * With a `Coordinator`, exceptions are reported to ...
[ "def", "exceptions_raised", "(", "self", ")", ":", "return", "self", ".", "_exceptions_raised" ]
https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/python/training/queue_runner.py#L146-L162
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/http/cookiejar.py
python
time2isoz
(t=None)
return "%04d-%02d-%02d %02d:%02d:%02dZ" % ( dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second)
Return a string representing time in seconds since epoch, t. If the function is called without an argument, it will use the current time. The format of the returned string is like "YYYY-MM-DD hh:mm:ssZ", representing Universal Time (UTC, aka GMT). An example of this format is: 1994-11-24 08:49:3...
Return a string representing time in seconds since epoch, t.
[ "Return", "a", "string", "representing", "time", "in", "seconds", "since", "epoch", "t", "." ]
def time2isoz(t=None): """Return a string representing time in seconds since epoch, t. If the function is called without an argument, it will use the current time. The format of the returned string is like "YYYY-MM-DD hh:mm:ssZ", representing Universal Time (UTC, aka GMT). An example of this form...
[ "def", "time2isoz", "(", "t", "=", "None", ")", ":", "if", "t", "is", "None", ":", "dt", "=", "datetime", ".", "datetime", ".", "utcnow", "(", ")", "else", ":", "dt", "=", "datetime", ".", "datetime", ".", "utcfromtimestamp", "(", "t", ")", "return...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/http/cookiejar.py#L86-L103
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/flatnotebook.py
python
TabNavigatorWindow.OnPanelEraseBg
(self, event)
Handles the ``wx.EVT_ERASE_BACKGROUND`` for the :class:`TabNavigatorWindow` top panel. :param `event`: a :class:`EraseEvent` event to be processed. :note: This method is intentionally empty to reduce flicker.
Handles the ``wx.EVT_ERASE_BACKGROUND`` for the :class:`TabNavigatorWindow` top panel.
[ "Handles", "the", "wx", ".", "EVT_ERASE_BACKGROUND", "for", "the", ":", "class", ":", "TabNavigatorWindow", "top", "panel", "." ]
def OnPanelEraseBg(self, event): """ Handles the ``wx.EVT_ERASE_BACKGROUND`` for the :class:`TabNavigatorWindow` top panel. :param `event`: a :class:`EraseEvent` event to be processed. :note: This method is intentionally empty to reduce flicker. """ pass
[ "def", "OnPanelEraseBg", "(", "self", ",", "event", ")", ":", "pass" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/flatnotebook.py#L1687-L1696
mongodb/mongo-cxx-driver
eb86512b05be20d2f51d53ba9b860c709e0799b3
etc/clang_format.py
python
lint_patch
(clang_format, infile)
Lint patch command entry point
Lint patch command entry point
[ "Lint", "patch", "command", "entry", "point" ]
def lint_patch(clang_format, infile): """Lint patch command entry point """ files = get_files_to_check_from_patch(infile) # Patch may have files that we do not want to check which is fine if files: _lint_files(clang_format, files)
[ "def", "lint_patch", "(", "clang_format", ",", "infile", ")", ":", "files", "=", "get_files_to_check_from_patch", "(", "infile", ")", "# Patch may have files that we do not want to check which is fine", "if", "files", ":", "_lint_files", "(", "clang_format", ",", "files",...
https://github.com/mongodb/mongo-cxx-driver/blob/eb86512b05be20d2f51d53ba9b860c709e0799b3/etc/clang_format.py#L670-L677
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
tools/code_coverage/croc_html.py
python
CrocHtml.AddCaptionForSubdir
(self, body, path)
Adds a caption for the subdir, with links to each parent dir. Args: body: Body elemement. path: Path to subdir.
Adds a caption for the subdir, with links to each parent dir.
[ "Adds", "a", "caption", "for", "the", "subdir", "with", "links", "to", "each", "parent", "dir", "." ]
def AddCaptionForSubdir(self, body, path): """Adds a caption for the subdir, with links to each parent dir. Args: body: Body elemement. path: Path to subdir. """ # Link to parent dirs hdr = body.E('h2') hdr.Text('Coverage for ') dirs = [''] + path.split('/') num_dirs = len(d...
[ "def", "AddCaptionForSubdir", "(", "self", ",", "body", ",", "path", ")", ":", "# Link to parent dirs", "hdr", "=", "body", ".", "E", "(", "'h2'", ")", "hdr", ".", "Text", "(", "'Coverage for '", ")", "dirs", "=", "[", "''", "]", "+", "path", ".", "s...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/tools/code_coverage/croc_html.py#L169-L184
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/py_vulcanize/py_vulcanize/resource_loader.py
python
ResourceLoader.FindResourceGivenAbsolutePath
(self, absolute_path, binary=False)
return resource_module.Resource(longest_candidate, absolute_path, binary)
Returns a Resource for the given absolute path.
Returns a Resource for the given absolute path.
[ "Returns", "a", "Resource", "for", "the", "given", "absolute", "path", "." ]
def FindResourceGivenAbsolutePath(self, absolute_path, binary=False): """Returns a Resource for the given absolute path.""" candidate_paths = [] for source_path in self.source_paths: if absolute_path.startswith(source_path): candidate_paths.append(source_path) if len(candidate_paths) == 0:...
[ "def", "FindResourceGivenAbsolutePath", "(", "self", ",", "absolute_path", ",", "binary", "=", "False", ")", ":", "candidate_paths", "=", "[", "]", "for", "source_path", "in", "self", ".", "source_paths", ":", "if", "absolute_path", ".", "startswith", "(", "so...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/py_vulcanize/py_vulcanize/resource_loader.py#L52-L64
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/psutil/__init__.py
python
Process.kill
(self)
Kill the current process with SIGKILL pre-emptively checking whether PID has been reused.
Kill the current process with SIGKILL pre-emptively checking whether PID has been reused.
[ "Kill", "the", "current", "process", "with", "SIGKILL", "pre", "-", "emptively", "checking", "whether", "PID", "has", "been", "reused", "." ]
def kill(self): """Kill the current process with SIGKILL pre-emptively checking whether PID has been reused. """ if POSIX: self._send_signal(signal.SIGKILL) else: # pragma: no cover self._proc.kill()
[ "def", "kill", "(", "self", ")", ":", "if", "POSIX", ":", "self", ".", "_send_signal", "(", "signal", ".", "SIGKILL", ")", "else", ":", "# pragma: no cover", "self", ".", "_proc", ".", "kill", "(", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/psutil/__init__.py#L1250-L1257
cornell-zhang/heterocl
6d9e4b4acc2ee2707b2d25b27298c0335bccedfd
python/heterocl/tvm/contrib/mxnet.py
python
to_mxnet_func
(func, const_loc=None)
return _wrap_async(func, _api_internal._TVMSetStream, len(const_loc), *const_loc)
Wrap a TVM function as MXNet function MXNet function runs asynchrously via its engine. Parameters ---------- func : Function A TVM function that can take positional arguments const_loc : list of int List of integers indicating the argument position of read only NDArray arg...
Wrap a TVM function as MXNet function
[ "Wrap", "a", "TVM", "function", "as", "MXNet", "function" ]
def to_mxnet_func(func, const_loc=None): """Wrap a TVM function as MXNet function MXNet function runs asynchrously via its engine. Parameters ---------- func : Function A TVM function that can take positional arguments const_loc : list of int List of integers indicating the ar...
[ "def", "to_mxnet_func", "(", "func", ",", "const_loc", "=", "None", ")", ":", "# only import mxnet when wrap get called.", "# pylint: disable=import-self", "import", "mxnet", "if", "isinstance", "(", "func", ",", "Module", ")", ":", "func", "=", "func", ".", "entr...
https://github.com/cornell-zhang/heterocl/blob/6d9e4b4acc2ee2707b2d25b27298c0335bccedfd/python/heterocl/tvm/contrib/mxnet.py#L11-L59
facebookincubator/BOLT
88c70afe9d388ad430cc150cc158641701397f70
lldb/examples/python/in_call_stack.py
python
in_call_stack
(frame, bp_loc, arg_dict, _)
return False
Only break if the given name is in the current call stack.
Only break if the given name is in the current call stack.
[ "Only", "break", "if", "the", "given", "name", "is", "in", "the", "current", "call", "stack", "." ]
def in_call_stack(frame, bp_loc, arg_dict, _): """Only break if the given name is in the current call stack.""" name = arg_dict.GetValueForKey('name').GetStringValue(1000) thread = frame.GetThread() found = False for frame in thread.frames: # Check the symbol. symbol = frame.GetSymbol() if symbol ...
[ "def", "in_call_stack", "(", "frame", ",", "bp_loc", ",", "arg_dict", ",", "_", ")", ":", "name", "=", "arg_dict", ".", "GetValueForKey", "(", "'name'", ")", ".", "GetStringValue", "(", "1000", ")", "thread", "=", "frame", ".", "GetThread", "(", ")", "...
https://github.com/facebookincubator/BOLT/blob/88c70afe9d388ad430cc150cc158641701397f70/lldb/examples/python/in_call_stack.py#L10-L24
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/numpy/py2/numpy/ma/core.py
python
MaskedArray.unshare_mask
(self)
return self
Copy the mask and set the sharedmask flag to False. Whether the mask is shared between masked arrays can be seen from the `sharedmask` property. `unshare_mask` ensures the mask is not shared. A copy of the mask is only made if it was shared. See Also -------- sharedmask
Copy the mask and set the sharedmask flag to False.
[ "Copy", "the", "mask", "and", "set", "the", "sharedmask", "flag", "to", "False", "." ]
def unshare_mask(self): """ Copy the mask and set the sharedmask flag to False. Whether the mask is shared between masked arrays can be seen from the `sharedmask` property. `unshare_mask` ensures the mask is not shared. A copy of the mask is only made if it was shared. ...
[ "def", "unshare_mask", "(", "self", ")", ":", "if", "self", ".", "_sharedmask", ":", "self", ".", "_mask", "=", "self", ".", "_mask", ".", "copy", "(", ")", "self", ".", "_sharedmask", "=", "False", "return", "self" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/numpy/py2/numpy/ma/core.py#L3514-L3530
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/richtext.py
python
RichTextFontTable.__init__
(self, *args, **kwargs)
__init__(self) -> RichTextFontTable
__init__(self) -> RichTextFontTable
[ "__init__", "(", "self", ")", "-", ">", "RichTextFontTable" ]
def __init__(self, *args, **kwargs): """__init__(self) -> RichTextFontTable""" _richtext.RichTextFontTable_swiginit(self,_richtext.new_RichTextFontTable(*args, **kwargs))
[ "def", "__init__", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "_richtext", ".", "RichTextFontTable_swiginit", "(", "self", ",", "_richtext", ".", "new_RichTextFontTable", "(", "*", "args", ",", "*", "*", "kwargs", ")", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/richtext.py#L911-L913
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/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/python/windows/Lib/pandas/core/arrays/numpy_.py#L97-L99
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/distutils/ccompiler.py
python
CCompiler.set_executables
(self, **kwargs)
Define the executables (and options for them) that will be run to perform the various stages of compilation. The exact set of executables that may be specified here depends on the compiler class (via the 'executables' class attribute), but most will have: compiler the C/C++ compi...
Define the executables (and options for them) that will be run to perform the various stages of compilation. The exact set of executables that may be specified here depends on the compiler class (via the 'executables' class attribute), but most will have: compiler the C/C++ compi...
[ "Define", "the", "executables", "(", "and", "options", "for", "them", ")", "that", "will", "be", "run", "to", "perform", "the", "various", "stages", "of", "compilation", ".", "The", "exact", "set", "of", "executables", "that", "may", "be", "specified", "he...
def set_executables(self, **kwargs): """Define the executables (and options for them) that will be run to perform the various stages of compilation. The exact set of executables that may be specified here depends on the compiler class (via the 'executables' class attribute), but most wi...
[ "def", "set_executables", "(", "self", ",", "*", "*", "kwargs", ")", ":", "# Note that some CCompiler implementation classes will define class", "# attributes 'cpp', 'cc', etc. with hard-coded executable names;", "# this is appropriate when a compiler class is for exactly one", "# compiler...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/distutils/ccompiler.py#L121-L151
PaddlePaddle/Paddle
1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c
python/paddle/distributed/fleet/base/role_maker.py
python
PaddleCloudRoleMaker._is_server
(self)
return self._role == Role.SERVER
whether current process is server
whether current process is server
[ "whether", "current", "process", "is", "server" ]
def _is_server(self): """ whether current process is server """ if not self._role_is_generated: self._generate_role() return self._role == Role.SERVER
[ "def", "_is_server", "(", "self", ")", ":", "if", "not", "self", ".", "_role_is_generated", ":", "self", ".", "_generate_role", "(", ")", "return", "self", ".", "_role", "==", "Role", ".", "SERVER" ]
https://github.com/PaddlePaddle/Paddle/blob/1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c/python/paddle/distributed/fleet/base/role_maker.py#L601-L607
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/rulerctrl.py
python
RulerCtrl.SetTimeFormat
(self, format=TimeFormat)
Sets the time format. :param `format`: the format used to display time values.
Sets the time format.
[ "Sets", "the", "time", "format", "." ]
def SetTimeFormat(self, format=TimeFormat): """ Sets the time format. :param `format`: the format used to display time values. """ if self._timeformat != format: self._timeformat = format self.Invalidate()
[ "def", "SetTimeFormat", "(", "self", ",", "format", "=", "TimeFormat", ")", ":", "if", "self", ".", "_timeformat", "!=", "format", ":", "self", ".", "_timeformat", "=", "format", "self", ".", "Invalidate", "(", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/rulerctrl.py#L917-L926
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/layers/python/layers/feature_column.py
python
_CrossedColumn.weight_tensor
(self, input_tensor)
return None
Returns the weight tensor from the given transformed input_tensor.
Returns the weight tensor from the given transformed input_tensor.
[ "Returns", "the", "weight", "tensor", "from", "the", "given", "transformed", "input_tensor", "." ]
def weight_tensor(self, input_tensor): """Returns the weight tensor from the given transformed input_tensor.""" del input_tensor return None
[ "def", "weight_tensor", "(", "self", ",", "input_tensor", ")", ":", "del", "input_tensor", "return", "None" ]
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/layers/python/layers/feature_column.py#L2350-L2353
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/mailbox.py
python
MHMessage.get_sequences
(self)
return self._sequences[:]
Return a list of sequences that include the message.
Return a list of sequences that include the message.
[ "Return", "a", "list", "of", "sequences", "that", "include", "the", "message", "." ]
def get_sequences(self): """Return a list of sequences that include the message.""" return self._sequences[:]
[ "def", "get_sequences", "(", "self", ")", ":", "return", "self", ".", "_sequences", "[", ":", "]" ]
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/mailbox.py#L1701-L1703
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pkg_resources/__init__.py
python
WorkingSet.__contains__
(self, dist)
return self.by_key.get(dist.key) == dist
True if `dist` is the active distribution for its project
True if `dist` is the active distribution for its project
[ "True", "if", "dist", "is", "the", "active", "distribution", "for", "its", "project" ]
def __contains__(self, dist): """True if `dist` is the active distribution for its project""" return self.by_key.get(dist.key) == dist
[ "def", "__contains__", "(", "self", ",", "dist", ")", ":", "return", "self", ".", "by_key", ".", "get", "(", "dist", ".", "key", ")", "==", "dist" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pkg_resources/__init__.py#L627-L629
AXErunners/axe
53f14e8112ab6370b96e1e78d2858dabc886bba4
contrib/devtools/update-translations.py
python
remove_invalid_characters
(s)
return FIX_RE.sub(b'', s)
Remove invalid characters from translation string
Remove invalid characters from translation string
[ "Remove", "invalid", "characters", "from", "translation", "string" ]
def remove_invalid_characters(s): '''Remove invalid characters from translation string''' return FIX_RE.sub(b'', s)
[ "def", "remove_invalid_characters", "(", "s", ")", ":", "return", "FIX_RE", ".", "sub", "(", "b''", ",", "s", ")" ]
https://github.com/AXErunners/axe/blob/53f14e8112ab6370b96e1e78d2858dabc886bba4/contrib/devtools/update-translations.py#L115-L117
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/ctypes/_aix.py
python
get_shared
(ld_headers)
return shared
extract the shareable objects from ld_headers character "[" is used to strip off the path information. Note: the "[" and "]" characters that are part of dump -H output are not removed here.
extract the shareable objects from ld_headers character "[" is used to strip off the path information. Note: the "[" and "]" characters that are part of dump -H output are not removed here.
[ "extract", "the", "shareable", "objects", "from", "ld_headers", "character", "[", "is", "used", "to", "strip", "off", "the", "path", "information", ".", "Note", ":", "the", "[", "and", "]", "characters", "that", "are", "part", "of", "dump", "-", "H", "ou...
def get_shared(ld_headers): """ extract the shareable objects from ld_headers character "[" is used to strip off the path information. Note: the "[" and "]" characters that are part of dump -H output are not removed here. """ shared = [] for (line, _) in ld_headers: # potential m...
[ "def", "get_shared", "(", "ld_headers", ")", ":", "shared", "=", "[", "]", "for", "(", "line", ",", "_", ")", "in", "ld_headers", ":", "# potential member lines contain \"[\"", "# otherwise, no processing needed", "if", "\"[\"", "in", "line", ":", "# Strip off tra...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/ctypes/_aix.py#L121-L135
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/contrib/distributions/python/ops/multinomial.py
python
Multinomial.__init__
(self, n, logits=None, p=None, validate_args=True, allow_nan_stats=False, name="Multinomial")
Initialize a batch of Multinomial distributions. Args: n: Non-negative floating point tensor with shape broadcastable to `[N1,..., Nm]` with `m >= 0`. Defines this as a batch of `N1 x ... x Nm` different Multinomial distributions. Its components should be equal to integer values. ...
Initialize a batch of Multinomial distributions.
[ "Initialize", "a", "batch", "of", "Multinomial", "distributions", "." ]
def __init__(self, n, logits=None, p=None, validate_args=True, allow_nan_stats=False, name="Multinomial"): """Initialize a batch of Multinomial distributions. Args: n: Non-negative floating point tensor with shape ...
[ "def", "__init__", "(", "self", ",", "n", ",", "logits", "=", "None", ",", "p", "=", "None", ",", "validate_args", "=", "True", ",", "allow_nan_stats", "=", "False", ",", "name", "=", "\"Multinomial\"", ")", ":", "self", ".", "_logits", ",", "self", ...
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/contrib/distributions/python/ops/multinomial.py#L95-L164
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/msilib/__init__.py
python
Directory.start_component
(self, component = None, feature = None, flags = None, keyfile = None, uuid=None)
Add an entry to the Component table, and make this component the current for this directory. If no component name is given, the directory name is used. If no feature is given, the current feature is used. If no flags are given, the directory's default flags are used. If no keyfile is given, the ...
Add an entry to the Component table, and make this component the current for this directory. If no component name is given, the directory name is used. If no feature is given, the current feature is used. If no flags are given, the directory's default flags are used. If no keyfile is given, the ...
[ "Add", "an", "entry", "to", "the", "Component", "table", "and", "make", "this", "component", "the", "current", "for", "this", "directory", ".", "If", "no", "component", "name", "is", "given", "the", "directory", "name", "is", "used", ".", "If", "no", "fe...
def start_component(self, component = None, feature = None, flags = None, keyfile = None, uuid=None): """Add an entry to the Component table, and make this component the current for this directory. If no component name is given, the directory name is used. If no feature is given, the current fea...
[ "def", "start_component", "(", "self", ",", "component", "=", "None", ",", "feature", "=", "None", ",", "flags", "=", "None", ",", "keyfile", "=", "None", ",", "uuid", "=", "None", ")", ":", "if", "flags", "is", "None", ":", "flags", "=", "self", "...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/msilib/__init__.py#L258-L285
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/string.py
python
center
(s, width, *args)
return s.center(width, *args)
center(s, width[, fillchar]) -> string Return a center version of s, in a field of the specified width. padded with spaces as needed. The string is never truncated. If specified the fillchar is used instead of spaces.
center(s, width[, fillchar]) -> string
[ "center", "(", "s", "width", "[", "fillchar", "]", ")", "-", ">", "string" ]
def center(s, width, *args): """center(s, width[, fillchar]) -> string Return a center version of s, in a field of the specified width. padded with spaces as needed. The string is never truncated. If specified the fillchar is used instead of spaces. """ return s.center(width, *args)
[ "def", "center", "(", "s", ",", "width", ",", "*", "args", ")", ":", "return", "s", ".", "center", "(", "width", ",", "*", "args", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/string.py#L445-L453
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_gdi.py
python
ImageList.GetSize
(*args, **kwargs)
return _gdi_.ImageList_GetSize(*args, **kwargs)
GetSize(index) -> (width,height)
GetSize(index) -> (width,height)
[ "GetSize", "(", "index", ")", "-", ">", "(", "width", "height", ")" ]
def GetSize(*args, **kwargs): """GetSize(index) -> (width,height)""" return _gdi_.ImageList_GetSize(*args, **kwargs)
[ "def", "GetSize", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_gdi_", ".", "ImageList_GetSize", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_gdi.py#L6962-L6964
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/nntplib.py
python
NNTP.group
(self, name)
return resp, count, first, last, name
Process a GROUP command. Argument: - group: the group name Returns: - resp: server response if successful - count: number of articles (string) - first: first article number (string) - last: last article number (string) - name: the group name
Process a GROUP command. Argument: - group: the group name Returns: - resp: server response if successful - count: number of articles (string) - first: first article number (string) - last: last article number (string) - name: the group name
[ "Process", "a", "GROUP", "command", ".", "Argument", ":", "-", "group", ":", "the", "group", "name", "Returns", ":", "-", "resp", ":", "server", "response", "if", "successful", "-", "count", ":", "number", "of", "articles", "(", "string", ")", "-", "fi...
def group(self, name): """Process a GROUP command. Argument: - group: the group name Returns: - resp: server response if successful - count: number of articles (string) - first: first article number (string) - last: last article number (string) - name: th...
[ "def", "group", "(", "self", ",", "name", ")", ":", "resp", "=", "self", ".", "shortcmd", "(", "'GROUP '", "+", "name", ")", "if", "resp", "[", ":", "3", "]", "!=", "'211'", ":", "raise", "NNTPReplyError", "(", "resp", ")", "words", "=", "resp", ...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/nntplib.py#L335-L359
Kitware/ParaView
f760af9124ff4634b23ebbeab95a4f56e0261955
ThirdParty/cinema/paraview/tpl/cinema_python/database/store.py
python
Store.find_field_key
(self, desc)
return None
Given a descriptor this finds the field value if any in the descriptor.
Given a descriptor this finds the field value if any in the descriptor.
[ "Given", "a", "descriptor", "this", "finds", "the", "field", "value", "if", "any", "in", "the", "descriptor", "." ]
def find_field_key(self, desc): """ Given a descriptor this finds the field value if any in the descriptor. """ for k in desc.keys(): params = self.parameter_list[k] if 'role' in params: if params['role'] == 'field': ret...
[ "def", "find_field_key", "(", "self", ",", "desc", ")", ":", "for", "k", "in", "desc", ".", "keys", "(", ")", ":", "params", "=", "self", ".", "parameter_list", "[", "k", "]", "if", "'role'", "in", "params", ":", "if", "params", "[", "'role'", "]",...
https://github.com/Kitware/ParaView/blob/f760af9124ff4634b23ebbeab95a4f56e0261955/ThirdParty/cinema/paraview/tpl/cinema_python/database/store.py#L252-L262
stitchEm/stitchEm
0f399501d41ab77933677f2907f41f80ceb704d7
lib/bindings/samples/server/output/output.py
python
WriterOutput.connect_writer_events
(self, shared_writer)
Add reaction for the events from plugin :param shared_writer: :return:
Add reaction for the events from plugin :param shared_writer: :return:
[ "Add", "reaction", "for", "the", "events", "from", "plugin", ":", "param", "shared_writer", ":", ":", "return", ":" ]
def connect_writer_events(self, shared_writer): """ Add reaction for the events from plugin :param shared_writer: :return: """ def connect(event, callback): self.callbacks.append(CppCallback(callback)) shared_writer.getOutputEventManager().subscri...
[ "def", "connect_writer_events", "(", "self", ",", "shared_writer", ")", ":", "def", "connect", "(", "event", ",", "callback", ")", ":", "self", ".", "callbacks", ".", "append", "(", "CppCallback", "(", "callback", ")", ")", "shared_writer", ".", "getOutputEv...
https://github.com/stitchEm/stitchEm/blob/0f399501d41ab77933677f2907f41f80ceb704d7/lib/bindings/samples/server/output/output.py#L217-L255
acado/acado
b4e28f3131f79cadfd1a001e9fff061f361d3a0f
misc/cpplint.py
python
_FunctionState.End
(self)
Stop analyzing function body.
Stop analyzing function body.
[ "Stop", "analyzing", "function", "body", "." ]
def End(self): """Stop analyzing function body.""" self.in_a_function = False
[ "def", "End", "(", "self", ")", ":", "self", ".", "in_a_function", "=", "False" ]
https://github.com/acado/acado/blob/b4e28f3131f79cadfd1a001e9fff061f361d3a0f/misc/cpplint.py#L853-L855
CRYTEK/CRYENGINE
232227c59a220cbbd311576f0fbeba7bb53b2a8c
Editor/Python/windows/Lib/site-packages/setuptools/extern/__init__.py
python
VendorImporter.search_path
(self)
Search first the vendor package then as a natural package.
Search first the vendor package then as a natural package.
[ "Search", "first", "the", "vendor", "package", "then", "as", "a", "natural", "package", "." ]
def search_path(self): """ Search first the vendor package then as a natural package. """ yield self.vendor_pkg + '.' yield ''
[ "def", "search_path", "(", "self", ")", ":", "yield", "self", ".", "vendor_pkg", "+", "'.'", "yield", "''" ]
https://github.com/CRYTEK/CRYENGINE/blob/232227c59a220cbbd311576f0fbeba7bb53b2a8c/Editor/Python/windows/Lib/site-packages/setuptools/extern/__init__.py#L16-L21
ZhouWeikuan/DouDiZhu
0d84ff6c0bc54dba6ae37955de9ae9307513dc99
code/frameworks/cocos2d-x/tools/bindings-generator/backup/clang-llvm-3.3-pybinding/cindex.py
python
Cursor.get_children
(self)
return iter(children)
Return an iterator for accessing the children of this cursor.
Return an iterator for accessing the children of this cursor.
[ "Return", "an", "iterator", "for", "accessing", "the", "children", "of", "this", "cursor", "." ]
def get_children(self): """Return an iterator for accessing the children of this cursor.""" # FIXME: Expose iteration from CIndex, PR6125. def visitor(child, parent, children): # FIXME: Document this assertion in API. # FIXME: There should just be an isNull method. ...
[ "def", "get_children", "(", "self", ")", ":", "# FIXME: Expose iteration from CIndex, PR6125.", "def", "visitor", "(", "child", ",", "parent", ",", "children", ")", ":", "# FIXME: Document this assertion in API.", "# FIXME: There should just be an isNull method.", "assert", "...
https://github.com/ZhouWeikuan/DouDiZhu/blob/0d84ff6c0bc54dba6ae37955de9ae9307513dc99/code/frameworks/cocos2d-x/tools/bindings-generator/backup/clang-llvm-3.3-pybinding/cindex.py#L1291-L1307
Harick1/caffe-yolo
eea92bf3ddfe4d0ff6b0b3ba9b15c029a83ed9a3
tools/extra/parse_log.py
python
save_csv_files
(logfile_path, output_dir, train_dict_list, test_dict_list, delimiter=',', verbose=False)
Save CSV files to output_dir If the input log file is, e.g., caffe.INFO, the names will be caffe.INFO.train and caffe.INFO.test
Save CSV files to output_dir
[ "Save", "CSV", "files", "to", "output_dir" ]
def save_csv_files(logfile_path, output_dir, train_dict_list, test_dict_list, delimiter=',', verbose=False): """Save CSV files to output_dir If the input log file is, e.g., caffe.INFO, the names will be caffe.INFO.train and caffe.INFO.test """ log_basename = os.path.basename(log...
[ "def", "save_csv_files", "(", "logfile_path", ",", "output_dir", ",", "train_dict_list", ",", "test_dict_list", ",", "delimiter", "=", "','", ",", "verbose", "=", "False", ")", ":", "log_basename", "=", "os", ".", "path", ".", "basename", "(", "logfile_path", ...
https://github.com/Harick1/caffe-yolo/blob/eea92bf3ddfe4d0ff6b0b3ba9b15c029a83ed9a3/tools/extra/parse_log.py#L132-L145
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/clang/bindings/python/clang/cindex.py
python
Cursor.is_const_method
(self)
return conf.lib.clang_CXXMethod_isConst(self)
Returns True if the cursor refers to a C++ member function or member function template that is declared 'const'.
Returns True if the cursor refers to a C++ member function or member function template that is declared 'const'.
[ "Returns", "True", "if", "the", "cursor", "refers", "to", "a", "C", "++", "member", "function", "or", "member", "function", "template", "that", "is", "declared", "const", "." ]
def is_const_method(self): """Returns True if the cursor refers to a C++ member function or member function template that is declared 'const'. """ return conf.lib.clang_CXXMethod_isConst(self)
[ "def", "is_const_method", "(", "self", ")", ":", "return", "conf", ".", "lib", ".", "clang_CXXMethod_isConst", "(", "self", ")" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/clang/bindings/python/clang/cindex.py#L1346-L1350
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python/src/Tools/pybench/CommandLine.py
python
Application.exit
(self, rc=0)
Exit the program. rc is used as exit code and passed back to the calling program. It defaults to 0 which usually means: OK.
Exit the program.
[ "Exit", "the", "program", "." ]
def exit(self, rc=0): """ Exit the program. rc is used as exit code and passed back to the calling program. It defaults to 0 which usually means: OK. """ raise SystemExit, rc
[ "def", "exit", "(", "self", ",", "rc", "=", "0", ")", ":", "raise", "SystemExit", ",", "rc" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Tools/pybench/CommandLine.py#L393-L401
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/lib-tk/turtle.py
python
TurtleScreenBase._onrelease
(self, item, fun, num=1, add=None)
Bind fun to mouse-button-release event on turtle. fun must be a function with two arguments, the coordinates of the point on the canvas where mouse button is released. num, the number of the mouse-button defaults to 1 If a turtle is clicked, first _onclick-event will be performed, ...
Bind fun to mouse-button-release event on turtle. fun must be a function with two arguments, the coordinates of the point on the canvas where mouse button is released. num, the number of the mouse-button defaults to 1
[ "Bind", "fun", "to", "mouse", "-", "button", "-", "release", "event", "on", "turtle", ".", "fun", "must", "be", "a", "function", "with", "two", "arguments", "the", "coordinates", "of", "the", "point", "on", "the", "canvas", "where", "mouse", "button", "i...
def _onrelease(self, item, fun, num=1, add=None): """Bind fun to mouse-button-release event on turtle. fun must be a function with two arguments, the coordinates of the point on the canvas where mouse button is released. num, the number of the mouse-button defaults to 1 If a tur...
[ "def", "_onrelease", "(", "self", ",", "item", ",", "fun", ",", "num", "=", "1", ",", "add", "=", "None", ")", ":", "if", "fun", "is", "None", ":", "self", ".", "cv", ".", "tag_unbind", "(", "item", ",", "\"<Button%s-ButtonRelease>\"", "%", "num", ...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/lib-tk/turtle.py#L644-L661
papyrussolution/OpenPapyrus
bbfb5ec2ea2109b8e2f125edd838e12eaf7b8b91
Src/OSF/protobuf-3.19.1/python/google/protobuf/text_format.py
python
Tokenizer.Consume
(self, token)
Consumes a piece of text. Args: token: Text to consume. Raises: ParseError: If the text couldn't be consumed.
Consumes a piece of text.
[ "Consumes", "a", "piece", "of", "text", "." ]
def Consume(self, token): """Consumes a piece of text. Args: token: Text to consume. Raises: ParseError: If the text couldn't be consumed. """ if not self.TryConsume(token): raise self.ParseError('Expected "%s".' % token)
[ "def", "Consume", "(", "self", ",", "token", ")", ":", "if", "not", "self", ".", "TryConsume", "(", "token", ")", ":", "raise", "self", ".", "ParseError", "(", "'Expected \"%s\".'", "%", "token", ")" ]
https://github.com/papyrussolution/OpenPapyrus/blob/bbfb5ec2ea2109b8e2f125edd838e12eaf7b8b91/Src/OSF/protobuf-3.19.1/python/google/protobuf/text_format.py#L1304-L1314
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/ed_statbar.py
python
EdStatBar.PushStatusText
(self, txt, field)
Set the status text @param txt: Text to put in bar @param field: int
Set the status text @param txt: Text to put in bar @param field: int
[ "Set", "the", "status", "text", "@param", "txt", ":", "Text", "to", "put", "in", "bar", "@param", "field", ":", "int" ]
def PushStatusText(self, txt, field): """Set the status text @param txt: Text to put in bar @param field: int """ wx.CallAfter(self.__SetStatusText, txt, field)
[ "def", "PushStatusText", "(", "self", ",", "txt", ",", "field", ")", ":", "wx", ".", "CallAfter", "(", "self", ".", "__SetStatusText", ",", "txt", ",", "field", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/ed_statbar.py#L281-L287
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/contrib/session_bundle/gc.py
python
union
(lf, rf)
return keep
Creates a filter that keeps the union of two filters. Args: lf: first filter rf: second filter Returns: A filter function that keeps the n largest paths.
Creates a filter that keeps the union of two filters.
[ "Creates", "a", "filter", "that", "keeps", "the", "union", "of", "two", "filters", "." ]
def union(lf, rf): """Creates a filter that keeps the union of two filters. Args: lf: first filter rf: second filter Returns: A filter function that keeps the n largest paths. """ def keep(paths): l = set(lf(paths)) r = set(rf(paths)) return sorted(list(l|r)) return keep
[ "def", "union", "(", "lf", ",", "rf", ")", ":", "def", "keep", "(", "paths", ")", ":", "l", "=", "set", "(", "lf", "(", "paths", ")", ")", "r", "=", "set", "(", "rf", "(", "paths", ")", ")", "return", "sorted", "(", "list", "(", "l", "|", ...
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/contrib/session_bundle/gc.py#L146-L160
fenderglass/Flye
2013acc650356cc934a2a9b82eb90af260c8b52b
flye/polishing/alignment.py
python
get_uniform_alignments
(alignments)
return selected_alignments, median_cov
Leaves top alignments for each position within contig assuming uniform coverage distribution
Leaves top alignments for each position within contig assuming uniform coverage distribution
[ "Leaves", "top", "alignments", "for", "each", "position", "within", "contig", "assuming", "uniform", "coverage", "distribution" ]
def get_uniform_alignments(alignments): """ Leaves top alignments for each position within contig assuming uniform coverage distribution """ if not alignments: return [] WINDOW = 100 MIN_COV = 20 GOOD_RATE = 0.66 MIN_QV = 20 def is_reliable(aln): return not aln....
[ "def", "get_uniform_alignments", "(", "alignments", ")", ":", "if", "not", "alignments", ":", "return", "[", "]", "WINDOW", "=", "100", "MIN_COV", "=", "20", "GOOD_RATE", "=", "0.66", "MIN_QV", "=", "20", "def", "is_reliable", "(", "aln", ")", ":", "retu...
https://github.com/fenderglass/Flye/blob/2013acc650356cc934a2a9b82eb90af260c8b52b/flye/polishing/alignment.py#L96-L189
apache/trafodion
8455c839ad6b6d7b6e04edda5715053095b78046
install/python-installer/scripts/httplib2/socks.py
python
socksocket.__recvall
(self, count)
return data
__recvall(count) -> data Receive EXACTLY the number of bytes requested from the socket. Blocks until the required number of bytes have been received.
__recvall(count) -> data Receive EXACTLY the number of bytes requested from the socket. Blocks until the required number of bytes have been received.
[ "__recvall", "(", "count", ")", "-", ">", "data", "Receive", "EXACTLY", "the", "number", "of", "bytes", "requested", "from", "the", "socket", ".", "Blocks", "until", "the", "required", "number", "of", "bytes", "have", "been", "received", "." ]
def __recvall(self, count): """__recvall(count) -> data Receive EXACTLY the number of bytes requested from the socket. Blocks until the required number of bytes have been received. """ data = self.recv(count) while len(data) < count: d = self.recv(count-len(da...
[ "def", "__recvall", "(", "self", ",", "count", ")", ":", "data", "=", "self", ".", "recv", "(", "count", ")", "while", "len", "(", "data", ")", "<", "count", ":", "d", "=", "self", ".", "recv", "(", "count", "-", "len", "(", "data", ")", ")", ...
https://github.com/apache/trafodion/blob/8455c839ad6b6d7b6e04edda5715053095b78046/install/python-installer/scripts/httplib2/socks.py#L133-L143
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py2/pandas/io/formats/format.py
python
DataFrameFormatter._to_str_columns
(self)
return strcols
Render a DataFrame to a list of columns (as lists of strings).
Render a DataFrame to a list of columns (as lists of strings).
[ "Render", "a", "DataFrame", "to", "a", "list", "of", "columns", "(", "as", "lists", "of", "strings", ")", "." ]
def _to_str_columns(self): """ Render a DataFrame to a list of columns (as lists of strings). """ frame = self.tr_frame # may include levels names also str_index = self._get_formatted_index(frame) if not is_list_like(self.header) and not self.header: ...
[ "def", "_to_str_columns", "(", "self", ")", ":", "frame", "=", "self", ".", "tr_frame", "# may include levels names also", "str_index", "=", "self", ".", "_get_formatted_index", "(", "frame", ")", "if", "not", "is_list_like", "(", "self", ".", "header", ")", "...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py2/pandas/io/formats/format.py#L503-L580
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/plugins/Launch/launch/__init__.py
python
Launch.GetBitmap
(self)
return bmp
Get the tab bitmap @return: wx.Bitmap
Get the tab bitmap @return: wx.Bitmap
[ "Get", "the", "tab", "bitmap", "@return", ":", "wx", ".", "Bitmap" ]
def GetBitmap(self): """Get the tab bitmap @return: wx.Bitmap """ bmp = wx.ArtProvider.GetBitmap(str(ed_glob.ID_BIN_FILE), wx.ART_MENU) return bmp
[ "def", "GetBitmap", "(", "self", ")", ":", "bmp", "=", "wx", ".", "ArtProvider", ".", "GetBitmap", "(", "str", "(", "ed_glob", ".", "ID_BIN_FILE", ")", ",", "wx", ".", "ART_MENU", ")", "return", "bmp" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/plugins/Launch/launch/__init__.py#L59-L65
giuspen/cherrytree
84712f206478fcf9acf30174009ad28c648c6344
pygtk2/modules/imports.py
python
LeoHandler.get_cherrytree_xml
(self, leo_string)
return self.dom.toxml()
Returns a CherryTree string Containing the Leo Nodes
Returns a CherryTree string Containing the Leo Nodes
[ "Returns", "a", "CherryTree", "string", "Containing", "the", "Leo", "Nodes" ]
def get_cherrytree_xml(self, leo_string): """Returns a CherryTree string Containing the Leo Nodes""" self.dom = xml.dom.minidom.Document() self.nodes_list = [self.dom.createElement(cons.APP_NAME)] self.dom.appendChild(self.nodes_list[0]) self.parse_leo_xml(leo_string) ret...
[ "def", "get_cherrytree_xml", "(", "self", ",", "leo_string", ")", ":", "self", ".", "dom", "=", "xml", ".", "dom", ".", "minidom", ".", "Document", "(", ")", "self", ".", "nodes_list", "=", "[", "self", ".", "dom", ".", "createElement", "(", "cons", ...
https://github.com/giuspen/cherrytree/blob/84712f206478fcf9acf30174009ad28c648c6344/pygtk2/modules/imports.py#L179-L185
intel/llvm
e6d0547e9d99b5a56430c4749f6c7e328bf221ab
lldb/third_party/Python/module/pexpect-4.6/pexpect/spawnbase.py
python
SpawnBase.flush
(self)
This does nothing. It is here to support the interface for a File-like object.
This does nothing. It is here to support the interface for a File-like object.
[ "This", "does", "nothing", ".", "It", "is", "here", "to", "support", "the", "interface", "for", "a", "File", "-", "like", "object", "." ]
def flush(self): '''This does nothing. It is here to support the interface for a File-like object. ''' pass
[ "def", "flush", "(", "self", ")", ":", "pass" ]
https://github.com/intel/llvm/blob/e6d0547e9d99b5a56430c4749f6c7e328bf221ab/lldb/third_party/Python/module/pexpect-4.6/pexpect/spawnbase.py#L506-L509
sc0ty/subsync
be5390d00ff475b6543eb0140c7e65b34317d95b
subsync/assets/assetlist.py
python
AssetList.missing
(self)
return AssetList([ a for a in self if a.isMissing() ])
Get missing assets (as new `AssetList`). Missing assets are assets that are not available locally nor remotely on asset server.
Get missing assets (as new `AssetList`).
[ "Get", "missing", "assets", "(", "as", "new", "AssetList", ")", "." ]
def missing(self): """Get missing assets (as new `AssetList`). Missing assets are assets that are not available locally nor remotely on asset server. """ return AssetList([ a for a in self if a.isMissing() ])
[ "def", "missing", "(", "self", ")", ":", "return", "AssetList", "(", "[", "a", "for", "a", "in", "self", "if", "a", ".", "isMissing", "(", ")", "]", ")" ]
https://github.com/sc0ty/subsync/blob/be5390d00ff475b6543eb0140c7e65b34317d95b/subsync/assets/assetlist.py#L12-L18
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/stc.py
python
StyledTextEvent.GetDragResult
(*args, **kwargs)
return _stc.StyledTextEvent_GetDragResult(*args, **kwargs)
GetDragResult(self) -> int
GetDragResult(self) -> int
[ "GetDragResult", "(", "self", ")", "-", ">", "int" ]
def GetDragResult(*args, **kwargs): """GetDragResult(self) -> int""" return _stc.StyledTextEvent_GetDragResult(*args, **kwargs)
[ "def", "GetDragResult", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_stc", ".", "StyledTextEvent_GetDragResult", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/stc.py#L7210-L7212
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/idlelib/config.py
python
IdleConf.CreateConfigHandlers
(self)
Populate default and user config parser dictionaries.
Populate default and user config parser dictionaries.
[ "Populate", "default", "and", "user", "config", "parser", "dictionaries", "." ]
def CreateConfigHandlers(self): "Populate default and user config parser dictionaries." idledir = os.path.dirname(__file__) self.userdir = userdir = '' if idlelib.testing else self.GetUserCfgDir() for cfg_type in self.config_types: self.defaultCfg[cfg_type] = IdleConfParser( ...
[ "def", "CreateConfigHandlers", "(", "self", ")", ":", "idledir", "=", "os", ".", "path", ".", "dirname", "(", "__file__", ")", "self", ".", "userdir", "=", "userdir", "=", "''", "if", "idlelib", ".", "testing", "else", "self", ".", "GetUserCfgDir", "(", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/idlelib/config.py#L168-L176
quantOS-org/DataCore
e2ef9bd2c22ee9e2845675b6435a14fa607f3551
mdlink/deps/windows/protobuf-2.5.0/python/google/protobuf/service_reflection.py
python
_ServiceBuilder._GenerateNonImplementedMethod
(self, method)
return lambda inst, rpc_controller, request, callback: ( self._NonImplementedMethod(method.name, rpc_controller, callback))
Generates and returns a method that can be set for a service methods. Args: method: Descriptor of the service method for which a method is to be generated. Returns: A method that can be added to the service class.
Generates and returns a method that can be set for a service methods.
[ "Generates", "and", "returns", "a", "method", "that", "can", "be", "set", "for", "a", "service", "methods", "." ]
def _GenerateNonImplementedMethod(self, method): """Generates and returns a method that can be set for a service methods. Args: method: Descriptor of the service method for which a method is to be generated. Returns: A method that can be added to the service class. """ return l...
[ "def", "_GenerateNonImplementedMethod", "(", "self", ",", "method", ")", ":", "return", "lambda", "inst", ",", "rpc_controller", ",", "request", ",", "callback", ":", "(", "self", ".", "_NonImplementedMethod", "(", "method", ".", "name", ",", "rpc_controller", ...
https://github.com/quantOS-org/DataCore/blob/e2ef9bd2c22ee9e2845675b6435a14fa607f3551/mdlink/deps/windows/protobuf-2.5.0/python/google/protobuf/service_reflection.py#L205-L216
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/compileall.py
python
compile_dir
(dir, maxlevels=10, ddir=None, force=0, rx=None, quiet=0)
return success
Byte-compile all modules in the given directory tree. Arguments (only dir is required): dir: the directory to byte-compile maxlevels: maximum recursion level (default 10) ddir: the directory that will be prepended to the path to the file as it is compiled into each byte-code ...
Byte-compile all modules in the given directory tree.
[ "Byte", "-", "compile", "all", "modules", "in", "the", "given", "directory", "tree", "." ]
def compile_dir(dir, maxlevels=10, ddir=None, force=0, rx=None, quiet=0): """Byte-compile all modules in the given directory tree. Arguments (only dir is required): dir: the directory to byte-compile maxlevels: maximum recursion level (default 10) ddir: the directory tha...
[ "def", "compile_dir", "(", "dir", ",", "maxlevels", "=", "10", ",", "ddir", "=", "None", ",", "force", "=", "0", ",", "rx", "=", "None", ",", "quiet", "=", "0", ")", ":", "if", "not", "quiet", ":", "print", "'Listing'", ",", "dir", ",", "'...'", ...
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/compileall.py#L21-L59
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_gdi.py
python
PseudoDC.DrawEllipticArcPointSize
(*args, **kwargs)
return _gdi_.PseudoDC_DrawEllipticArcPointSize(*args, **kwargs)
DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end) Draws an arc of an ellipse, with the given rectangle defining the bounds of the ellipse. The current pen is used for drawing the arc and the current brush is used for drawing the pie. The *start* and *end* para...
DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
[ "DrawEllipticArcPointSize", "(", "self", "Point", "pt", "Size", "sz", "double", "start", "double", "end", ")" ]
def DrawEllipticArcPointSize(*args, **kwargs): """ DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end) Draws an arc of an ellipse, with the given rectangle defining the bounds of the ellipse. The current pen is used for drawing the arc and the current bru...
[ "def", "DrawEllipticArcPointSize", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_gdi_", ".", "PseudoDC_DrawEllipticArcPointSize", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_gdi.py#L8043-L8057
emsesp/EMS-ESP
65c4a381bf8df61d1e18ba00223b1a55933fc547
scripts/esptool.py
python
ESPLoader.detect_chip
(port=DEFAULT_PORT, baud=ESP_ROM_BAUD, connect_mode='default_reset', trace_enabled=False)
Use serial access to detect the chip type. We use the UART's datecode register for this, it's mapped at the same address on ESP8266 & ESP32 so we can use one memory read and compare to the datecode register for each chip type. This routine automatically performs ESPLoader.conne...
Use serial access to detect the chip type.
[ "Use", "serial", "access", "to", "detect", "the", "chip", "type", "." ]
def detect_chip(port=DEFAULT_PORT, baud=ESP_ROM_BAUD, connect_mode='default_reset', trace_enabled=False): """ Use serial access to detect the chip type. We use the UART's datecode register for this, it's mapped at the same address on ESP8266 & ESP32 so we can use one memory read and com...
[ "def", "detect_chip", "(", "port", "=", "DEFAULT_PORT", ",", "baud", "=", "ESP_ROM_BAUD", ",", "connect_mode", "=", "'default_reset'", ",", "trace_enabled", "=", "False", ")", ":", "detect_port", "=", "ESPLoader", "(", "port", ",", "baud", ",", "trace_enabled"...
https://github.com/emsesp/EMS-ESP/blob/65c4a381bf8df61d1e18ba00223b1a55933fc547/scripts/esptool.py#L247-L273
CRYTEK/CRYENGINE
232227c59a220cbbd311576f0fbeba7bb53b2a8c
Editor/Python/windows/Lib/site-packages/setuptools/_vendor/pyparsing.py
python
matchPreviousExpr
(expr)
return rep
Helper to define an expression that is indirectly defined from the tokens matched in a previous expression, that is, it looks for a 'repeat' of a previous expression. For example:: first = Word(nums) second = matchPreviousExpr(first) matchExpr = first + ":" + second will match C{"1:...
Helper to define an expression that is indirectly defined from the tokens matched in a previous expression, that is, it looks for a 'repeat' of a previous expression. For example:: first = Word(nums) second = matchPreviousExpr(first) matchExpr = first + ":" + second will match C{"1:...
[ "Helper", "to", "define", "an", "expression", "that", "is", "indirectly", "defined", "from", "the", "tokens", "matched", "in", "a", "previous", "expression", "that", "is", "it", "looks", "for", "a", "repeat", "of", "a", "previous", "expression", ".", "For", ...
def matchPreviousExpr(expr): """ Helper to define an expression that is indirectly defined from the tokens matched in a previous expression, that is, it looks for a 'repeat' of a previous expression. For example:: first = Word(nums) second = matchPreviousExpr(first) matchExpr = ...
[ "def", "matchPreviousExpr", "(", "expr", ")", ":", "rep", "=", "Forward", "(", ")", "e2", "=", "expr", ".", "copy", "(", ")", "rep", "<<=", "e2", "def", "copyTokenToRepeater", "(", "s", ",", "l", ",", "t", ")", ":", "matchTokens", "=", "_flatten", ...
https://github.com/CRYTEK/CRYENGINE/blob/232227c59a220cbbd311576f0fbeba7bb53b2a8c/Editor/Python/windows/Lib/site-packages/setuptools/_vendor/pyparsing.py#L4537-L4563
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/dataset/engine/validators.py
python
check_caltech256_dataset
(method)
return new_method
A wrapper that wraps a parameter checker around the original Dataset(Caltech256Dataset).
A wrapper that wraps a parameter checker around the original Dataset(Caltech256Dataset).
[ "A", "wrapper", "that", "wraps", "a", "parameter", "checker", "around", "the", "original", "Dataset", "(", "Caltech256Dataset", ")", "." ]
def check_caltech256_dataset(method): """A wrapper that wraps a parameter checker around the original Dataset(Caltech256Dataset).""" @wraps(method) def new_method(self, *args, **kwargs): _, param_dict = parse_user_args(method, *args, **kwargs) nreq_param_int = ['num_samples', 'num_parallel...
[ "def", "check_caltech256_dataset", "(", "method", ")", ":", "@", "wraps", "(", "method", ")", "def", "new_method", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "_", ",", "param_dict", "=", "parse_user_args", "(", "method", ",", "*"...
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/dataset/engine/validators.py#L523-L545
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/grid.py
python
Grid.IsSortOrderAscending
(*args, **kwargs)
return _grid.Grid_IsSortOrderAscending(*args, **kwargs)
IsSortOrderAscending(self) -> bool
IsSortOrderAscending(self) -> bool
[ "IsSortOrderAscending", "(", "self", ")", "-", ">", "bool" ]
def IsSortOrderAscending(*args, **kwargs): """IsSortOrderAscending(self) -> bool""" return _grid.Grid_IsSortOrderAscending(*args, **kwargs)
[ "def", "IsSortOrderAscending", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_grid", ".", "Grid_IsSortOrderAscending", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/grid.py#L2177-L2179
chuckcho/video-caffe
fc232b3e3a90ea22dd041b9fc5c542f170581f20
python/caffe/draw.py
python
get_pydot_graph
(caffe_net, rankdir, label_edges=True, phase=None, display_lrm=False)
return pydot_graph
Create a data structure which represents the `caffe_net`. Parameters ---------- caffe_net : object rankdir : {'LR', 'TB', 'BT'} Direction of graph layout. label_edges : boolean, optional Label the edges (default is True). phase : {caffe_pb2.Phase.TRAIN, caffe_pb2.Phase.TEST, Non...
Create a data structure which represents the `caffe_net`.
[ "Create", "a", "data", "structure", "which", "represents", "the", "caffe_net", "." ]
def get_pydot_graph(caffe_net, rankdir, label_edges=True, phase=None, display_lrm=False): """Create a data structure which represents the `caffe_net`. Parameters ---------- caffe_net : object rankdir : {'LR', 'TB', 'BT'} Direction of graph layout. label_edges : boolean, optional ...
[ "def", "get_pydot_graph", "(", "caffe_net", ",", "rankdir", ",", "label_edges", "=", "True", ",", "phase", "=", "None", ",", "display_lrm", "=", "False", ")", ":", "pydot_graph", "=", "pydot", ".", "Dot", "(", "caffe_net", ".", "name", "if", "caffe_net", ...
https://github.com/chuckcho/video-caffe/blob/fc232b3e3a90ea22dd041b9fc5c542f170581f20/python/caffe/draw.py#L190-L265
domino-team/openwrt-cc
8b181297c34d14d3ca521cc9f31430d561dbc688
package/gli-pub/openwrt-node-packages-master/node/node-v6.9.1/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
python
NinjaWriter.WriteMacInfoPlist
(self, partial_info_plist, bundle_depends)
Write build rules for bundle Info.plist files.
Write build rules for bundle Info.plist files.
[ "Write", "build", "rules", "for", "bundle", "Info", ".", "plist", "files", "." ]
def WriteMacInfoPlist(self, partial_info_plist, bundle_depends): """Write build rules for bundle Info.plist files.""" info_plist, out, defines, extra_env = gyp.xcode_emulation.GetMacInfoPlist( generator_default_variables['PRODUCT_DIR'], self.xcode_settings, self.GypPathToNinja) if not info_p...
[ "def", "WriteMacInfoPlist", "(", "self", ",", "partial_info_plist", ",", "bundle_depends", ")", ":", "info_plist", ",", "out", ",", "defines", ",", "extra_env", "=", "gyp", ".", "xcode_emulation", ".", "GetMacInfoPlist", "(", "generator_default_variables", "[", "'...
https://github.com/domino-team/openwrt-cc/blob/8b181297c34d14d3ca521cc9f31430d561dbc688/package/gli-pub/openwrt-node-packages-master/node/node-v6.9.1/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py#L828-L860
cms-sw/cmssw
fd9de012d503d3405420bcbeec0ec879baa57cf2
HLTrigger/Tools/python/rrapi.py
python
RRApi.templates
(self, workspace, table)
return self.get([workspace, table, "templates"])
Get output templates for table for workspace (all apps)
Get output templates for table for workspace (all apps)
[ "Get", "output", "templates", "for", "table", "for", "workspace", "(", "all", "apps", ")" ]
def templates(self, workspace, table): """ Get output templates for table for workspace (all apps) """ return self.get([workspace, table, "templates"])
[ "def", "templates", "(", "self", ",", "workspace", ",", "table", ")", ":", "return", "self", ".", "get", "(", "[", "workspace", ",", "table", ",", "\"templates\"", "]", ")" ]
https://github.com/cms-sw/cmssw/blob/fd9de012d503d3405420bcbeec0ec879baa57cf2/HLTrigger/Tools/python/rrapi.py#L146-L150
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/python/ops/math_grad.py
python
_SquaredDifferenceGrad
(op, grad)
return (array_ops.reshape(math_ops.reduce_sum(x_grad, rx), sx), -array_ops.reshape(math_ops.reduce_sum(x_grad, ry), sy))
Returns the gradient for (x-y)^2.
Returns the gradient for (x-y)^2.
[ "Returns", "the", "gradient", "for", "(", "x", "-", "y", ")", "^2", "." ]
def _SquaredDifferenceGrad(op, grad): """Returns the gradient for (x-y)^2.""" x = op.inputs[0] y = op.inputs[1] sx = array_ops.shape(x) sy = array_ops.shape(y) # pylint: disable=protected-access rx, ry = gen_array_ops._broadcast_gradient_args(sx, sy) # pylint: enable=protected-access # .op works with ...
[ "def", "_SquaredDifferenceGrad", "(", "op", ",", "grad", ")", ":", "x", "=", "op", ".", "inputs", "[", "0", "]", "y", "=", "op", ".", "inputs", "[", "1", "]", "sx", "=", "array_ops", ".", "shape", "(", "x", ")", "sy", "=", "array_ops", ".", "sh...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/python/ops/math_grad.py#L592-L607
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/cython/Cython/Compiler/Optimize.py
python
OptimizeBuiltinCalls._handle_simple_method_unicode_count
(self, node, function, args, is_unbound_method)
return method_call.coerce_to_pyobject(self.current_env())
Replace unicode.count(...) by a direct call to the corresponding C-API function.
Replace unicode.count(...) by a direct call to the corresponding C-API function.
[ "Replace", "unicode", ".", "count", "(", "...", ")", "by", "a", "direct", "call", "to", "the", "corresponding", "C", "-", "API", "function", "." ]
def _handle_simple_method_unicode_count(self, node, function, args, is_unbound_method): """Replace unicode.count(...) by a direct call to the corresponding C-API function. """ if len(args) not in (2,3,4): self._error_wrong_arg_count('unicode.count', node, args, "2-4") ...
[ "def", "_handle_simple_method_unicode_count", "(", "self", ",", "node", ",", "function", ",", "args", ",", "is_unbound_method", ")", ":", "if", "len", "(", "args", ")", "not", "in", "(", "2", ",", "3", ",", "4", ")", ":", "self", ".", "_error_wrong_arg_c...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/cython/Cython/Compiler/Optimize.py#L3587-L3602