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
NREL/EnergyPlus
fadc5973b85c70e8cc923efb69c144e808a26078
src/EnergyPlus/api/datatransfer.py
python
DataExchange.warmup_flag
(self, state: c_void_p)
return self.api.warmupFlag(state) == 1
Gets a flag for whether the warmup flag is currently on, signaling that EnergyPlus is still in the process of converging on warmup days. The C API returns an integer where 1 is yes and 0 is no, this simply wraps that with a bool conversion. :param state: An active EnergyPlus "state" that is re...
Gets a flag for whether the warmup flag is currently on, signaling that EnergyPlus is still in the process of converging on warmup days. The C API returns an integer where 1 is yes and 0 is no, this simply wraps that with a bool conversion.
[ "Gets", "a", "flag", "for", "whether", "the", "warmup", "flag", "is", "currently", "on", "signaling", "that", "EnergyPlus", "is", "still", "in", "the", "process", "of", "converging", "on", "warmup", "days", ".", "The", "C", "API", "returns", "an", "integer...
def warmup_flag(self, state: c_void_p) -> bool: """ Gets a flag for whether the warmup flag is currently on, signaling that EnergyPlus is still in the process of converging on warmup days. The C API returns an integer where 1 is yes and 0 is no, this simply wraps that with a bool conver...
[ "def", "warmup_flag", "(", "self", ",", "state", ":", "c_void_p", ")", "->", "bool", ":", "return", "self", ".", "api", ".", "warmupFlag", "(", "state", ")", "==", "1" ]
https://github.com/NREL/EnergyPlus/blob/fadc5973b85c70e8cc923efb69c144e808a26078/src/EnergyPlus/api/datatransfer.py#L1050-L1059
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_core.py
python
Image.GetDataBuffer
(*args, **kwargs)
return _core_.Image_GetDataBuffer(*args, **kwargs)
GetDataBuffer(self) -> PyObject Returns a writable Python buffer object that is pointing at the RGB image data buffer inside the wx.Image. You need to ensure that you do not use this buffer object after the image has been destroyed.
GetDataBuffer(self) -> PyObject
[ "GetDataBuffer", "(", "self", ")", "-", ">", "PyObject" ]
def GetDataBuffer(*args, **kwargs): """ GetDataBuffer(self) -> PyObject Returns a writable Python buffer object that is pointing at the RGB image data buffer inside the wx.Image. You need to ensure that you do not use this buffer object after the image has been destroyed. ...
[ "def", "GetDataBuffer", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "Image_GetDataBuffer", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_core.py#L3375-L3383
shizhuolin/PyCTP
3b3e160ef7ace423a04a09cc034d939db2444ef1
APIToPyCTP.py
python
generatestructcppheadercode
(codetree)
struct header
struct header
[ "struct", "header" ]
def generatestructcppheadercode(codetree): """struct header""" cppheadercodetemplate = "./src/UserApiStruct.h.template" cppheadercodefile = "./src/UserApiStruct.h" cppheadercode = "" for (key, value) in codetree.items(): if(value['type'] == 'struct'): cppheadercode += "\nPyObject *PyCTP_PyDict_FromS...
[ "def", "generatestructcppheadercode", "(", "codetree", ")", ":", "cppheadercodetemplate", "=", "\"./src/UserApiStruct.h.template\"", "cppheadercodefile", "=", "\"./src/UserApiStruct.h\"", "cppheadercode", "=", "\"\"", "for", "(", "key", ",", "value", ")", "in", "codetree"...
https://github.com/shizhuolin/PyCTP/blob/3b3e160ef7ace423a04a09cc034d939db2444ef1/APIToPyCTP.py#L179-L199
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
tools/isolate/isolate.py
python
load_results
(resultfile)
return data
Loads the previous results as an optimization.
Loads the previous results as an optimization.
[ "Loads", "the", "previous", "results", "as", "an", "optimization", "." ]
def load_results(resultfile): """Loads the previous results as an optimization.""" data = {} if resultfile and os.path.isfile(resultfile): resultfile = os.path.abspath(resultfile) with open(resultfile, 'r') as f: data = json.load(f) logging.debug('Loaded %s' % resultfile) else: resultfil...
[ "def", "load_results", "(", "resultfile", ")", ":", "data", "=", "{", "}", "if", "resultfile", "and", "os", ".", "path", ".", "isfile", "(", "resultfile", ")", ":", "resultfile", "=", "os", ".", "path", ".", "abspath", "(", "resultfile", ")", "with", ...
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/tools/isolate/isolate.py#L229-L246
PaddlePaddle/Paddle
1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c
python/paddle/fluid/contrib/quantize/quantize_transpiler.py
python
_quantized_scale_name
(var_name)
return "%s.scale" % (var_name)
Return quantized variable name for the input `var_name`.
Return quantized variable name for the input `var_name`.
[ "Return", "quantized", "variable", "name", "for", "the", "input", "var_name", "." ]
def _quantized_scale_name(var_name): """ Return quantized variable name for the input `var_name`. """ return "%s.scale" % (var_name)
[ "def", "_quantized_scale_name", "(", "var_name", ")", ":", "return", "\"%s.scale\"", "%", "(", "var_name", ")" ]
https://github.com/PaddlePaddle/Paddle/blob/1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c/python/paddle/fluid/contrib/quantize/quantize_transpiler.py#L48-L52
envoyproxy/envoy
65541accdafe255e72310b4298d646e091da2d80
tools/api_proto_plugin/type_context.py
python
TypeContext.extend_field
(self, index, name)
return self._extend([2, index], 'field', name)
Extend type context with a field. Args: index: field index in message. name: field name.
Extend type context with a field.
[ "Extend", "type", "context", "with", "a", "field", "." ]
def extend_field(self, index, name): """Extend type context with a field. Args: index: field index in message. name: field name. """ return self._extend([2, index], 'field', name)
[ "def", "extend_field", "(", "self", ",", "index", ",", "name", ")", ":", "return", "self", ".", "_extend", "(", "[", "2", ",", "index", "]", ",", "'field'", ",", "name", ")" ]
https://github.com/envoyproxy/envoy/blob/65541accdafe255e72310b4298d646e091da2d80/tools/api_proto_plugin/type_context.py#L191-L198
openvinotoolkit/openvino
dedcbeafa8b84cccdc55ca64b8da516682b381c7
tools/mo/openvino/tools/mo/middle/passes/fusing/resnet_optimization.py
python
_simple_stride_prop
(graph: Graph, node: Node, spatial_dims, supported=True)
This function handles stride propagation for op nodes. If node is in supported ops dict so this is supported operation and we can propagate stride directly via this op (stride_prop will be set by using bottom stride_prop), otherwise we can't and stride_prop attr will be set as 1,1,1,1
This function handles stride propagation for op nodes. If node is in supported ops dict so this is supported operation and we can propagate stride directly via this op (stride_prop will be set by using bottom stride_prop), otherwise we can't and stride_prop attr will be set as 1,1,1,1
[ "This", "function", "handles", "stride", "propagation", "for", "op", "nodes", ".", "If", "node", "is", "in", "supported", "ops", "dict", "so", "this", "is", "supported", "operation", "and", "we", "can", "propagate", "stride", "directly", "via", "this", "op",...
def _simple_stride_prop(graph: Graph, node: Node, spatial_dims, supported=True): """ This function handles stride propagation for op nodes. If node is in supported ops dict so this is supported operation and we can propagate stride directly via this op (stride_prop will be set by using bottom stride_prop), ...
[ "def", "_simple_stride_prop", "(", "graph", ":", "Graph", ",", "node", ":", "Node", ",", "spatial_dims", ",", "supported", "=", "True", ")", ":", "next_ops", "=", "get_next_operation", "(", "node", ")", "stride_props", ",", "all_ops_are_valid", "=", "_check_ne...
https://github.com/openvinotoolkit/openvino/blob/dedcbeafa8b84cccdc55ca64b8da516682b381c7/tools/mo/openvino/tools/mo/middle/passes/fusing/resnet_optimization.py#L59-L85
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/commands.py
python
Build.initialize_options
(self)
Prepare for new options
Prepare for new options
[ "Prepare", "for", "new", "options" ]
def initialize_options(self): """ Prepare for new options """ _build.build.initialize_options(self) if 'build' in _option_defaults: for opt_name, default in _option_defaults['build']: setattr(self, opt_name, default)
[ "def", "initialize_options", "(", "self", ")", ":", "_build", ".", "build", ".", "initialize_options", "(", "self", ")", "if", "'build'", "in", "_option_defaults", ":", "for", "opt_name", ",", "default", "in", "_option_defaults", "[", "'build'", "]", ":", "s...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/commands.py#L251-L256
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/ops/operations/array_ops.py
python
Argmin.__init__
(self, axis=-1, output_type=mstype.int32)
Initialize Argmin
Initialize Argmin
[ "Initialize", "Argmin" ]
def __init__(self, axis=-1, output_type=mstype.int32): """Initialize Argmin""" self.init_prim_io_names(inputs=['x'], outputs=['output']) validator.check_value_type("axis", axis, [int], self.name) validator.check_type_name("output_type", output_type, [mstype.int32, mstype.int64], self.nam...
[ "def", "__init__", "(", "self", ",", "axis", "=", "-", "1", ",", "output_type", "=", "mstype", ".", "int32", ")", ":", "self", ".", "init_prim_io_names", "(", "inputs", "=", "[", "'x'", "]", ",", "outputs", "=", "[", "'output'", "]", ")", "validator"...
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/ops/operations/array_ops.py#L1777-L1783
miyosuda/TensorFlowAndroidDemo
35903e0221aa5f109ea2dbef27f20b52e317f42d
jni-build/jni/include/tensorflow/python/summary/event_file_inspector.py
python
get_dict_to_print
(field_to_obs)
return output
Transform the field-to-obs mapping into a printable dictionary. Args: field_to_obs: Dict that maps string field to `Observation` list. Returns: A dict with the keys and values to print to console.
Transform the field-to-obs mapping into a printable dictionary.
[ "Transform", "the", "field", "-", "to", "-", "obs", "mapping", "into", "a", "printable", "dictionary", "." ]
def get_dict_to_print(field_to_obs): """Transform the field-to-obs mapping into a printable dictionary. Args: field_to_obs: Dict that maps string field to `Observation` list. Returns: A dict with the keys and values to print to console. """ def compressed_steps(steps): return {'num_steps': len(...
[ "def", "get_dict_to_print", "(", "field_to_obs", ")", ":", "def", "compressed_steps", "(", "steps", ")", ":", "return", "{", "'num_steps'", ":", "len", "(", "set", "(", "steps", ")", ")", ",", "'min_step'", ":", "min", "(", "steps", ")", ",", "'max_step'...
https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/python/summary/event_file_inspector.py#L254-L287
cvxpy/cvxpy
5165b4fb750dfd237de8659383ef24b4b2e33aaf
cvxpy/atoms/affine/reshape.py
python
reshape.validate_arguments
(self)
Checks that the new shape has the same number of entries as the old.
Checks that the new shape has the same number of entries as the old.
[ "Checks", "that", "the", "new", "shape", "has", "the", "same", "number", "of", "entries", "as", "the", "old", "." ]
def validate_arguments(self) -> None: """Checks that the new shape has the same number of entries as the old. """ old_len = self.args[0].size new_len = np.prod(self._shape, dtype=int) if not old_len == new_len: raise ValueError( "Invalid reshape dimens...
[ "def", "validate_arguments", "(", "self", ")", "->", "None", ":", "old_len", "=", "self", ".", "args", "[", "0", "]", ".", "size", "new_len", "=", "np", ".", "prod", "(", "self", ".", "_shape", ",", "dtype", "=", "int", ")", "if", "not", "old_len",...
https://github.com/cvxpy/cvxpy/blob/5165b4fb750dfd237de8659383ef24b4b2e33aaf/cvxpy/atoms/affine/reshape.py#L72-L80
luliyucoordinate/Leetcode
96afcdc54807d1d184e881a075d1dbf3371e31fb
src/0919-Complete-Binary-Tree-Inserter/0919.py
python
CBTInserter.__init__
(self, root)
:type root: TreeNode
:type root: TreeNode
[ ":", "type", "root", ":", "TreeNode" ]
def __init__(self, root): """ :type root: TreeNode """ self.data = list() self.data.append(root) for node in self.data: if node.left: self.data.append(node.left) if node.right: self.data.append(node.right)
[ "def", "__init__", "(", "self", ",", "root", ")", ":", "self", ".", "data", "=", "list", "(", ")", "self", ".", "data", ".", "append", "(", "root", ")", "for", "node", "in", "self", ".", "data", ":", "if", "node", ".", "left", ":", "self", ".",...
https://github.com/luliyucoordinate/Leetcode/blob/96afcdc54807d1d184e881a075d1dbf3371e31fb/src/0919-Complete-Binary-Tree-Inserter/0919.py#L9-L19
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/_collections_abc.py
python
MutableMapping.clear
(self)
D.clear() -> None. Remove all items from D.
D.clear() -> None. Remove all items from D.
[ "D", ".", "clear", "()", "-", ">", "None", ".", "Remove", "all", "items", "from", "D", "." ]
def clear(self): 'D.clear() -> None. Remove all items from D.' try: while True: self.popitem() except KeyError: pass
[ "def", "clear", "(", "self", ")", ":", "try", ":", "while", "True", ":", "self", ".", "popitem", "(", ")", "except", "KeyError", ":", "pass" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/_collections_abc.py#L816-L822
intel/llvm
e6d0547e9d99b5a56430c4749f6c7e328bf221ab
lldb/examples/python/bsd.py
python
Interactive.default
(self, line)
return True
Catch all for unknown command, which will exit the interpreter.
Catch all for unknown command, which will exit the interpreter.
[ "Catch", "all", "for", "unknown", "command", "which", "will", "exit", "the", "interpreter", "." ]
def default(self, line): '''Catch all for unknown command, which will exit the interpreter.''' print("unknown command: %s" % line) return True
[ "def", "default", "(", "self", ",", "line", ")", ":", "print", "(", "\"unknown command: %s\"", "%", "line", ")", "return", "True" ]
https://github.com/intel/llvm/blob/e6d0547e9d99b5a56430c4749f6c7e328bf221ab/lldb/examples/python/bsd.py#L220-L223
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/contrib/bayesflow/python/ops/monte_carlo_impl.py
python
expectation
(f, p, z=None, n=None, seed=None, name='expectation')
r"""Monte Carlo estimate of an expectation: `E_p[f(Z)]` with sample mean. This `Op` returns ``` n^{-1} sum_{i=1}^n f(z_i), where z_i ~ p \approx E_p[f(Z)] ``` User supplies either `Tensor` of samples `z`, or number of samples to draw `n` Args: f: Callable mapping samples from `p` to `Tensors`. ...
r"""Monte Carlo estimate of an expectation: `E_p[f(Z)]` with sample mean.
[ "r", "Monte", "Carlo", "estimate", "of", "an", "expectation", ":", "E_p", "[", "f", "(", "Z", ")", "]", "with", "sample", "mean", "." ]
def expectation(f, p, z=None, n=None, seed=None, name='expectation'): r"""Monte Carlo estimate of an expectation: `E_p[f(Z)]` with sample mean. This `Op` returns ``` n^{-1} sum_{i=1}^n f(z_i), where z_i ~ p \approx E_p[f(Z)] ``` User supplies either `Tensor` of samples `z`, or number of samples to dr...
[ "def", "expectation", "(", "f", ",", "p", ",", "z", "=", "None", ",", "n", "=", "None", ",", "seed", "=", "None", ",", "name", "=", "'expectation'", ")", ":", "with", "ops", ".", "name_scope", "(", "name", ",", "values", "=", "[", "n", ",", "z"...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/contrib/bayesflow/python/ops/monte_carlo_impl.py#L198-L252
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib-tk/Tkinter.py
python
PanedWindow.proxy_forget
(self)
return self.proxy("forget")
Remove the proxy from the display.
Remove the proxy from the display.
[ "Remove", "the", "proxy", "from", "the", "display", "." ]
def proxy_forget(self): """Remove the proxy from the display. """ return self.proxy("forget")
[ "def", "proxy_forget", "(", "self", ")", ":", "return", "self", ".", "proxy", "(", "\"forget\"", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib-tk/Tkinter.py#L3609-L3612
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/pdb.py
python
Pdb.do_display
(self, arg)
display [expression] Display the value of the expression if it changed, each time execution stops in the current frame. Without expression, list all display expressions for the current frame.
display [expression]
[ "display", "[", "expression", "]" ]
def do_display(self, arg): """display [expression] Display the value of the expression if it changed, each time execution stops in the current frame. Without expression, list all display expressions for the current frame. """ if not arg: self.message('Curren...
[ "def", "do_display", "(", "self", ",", "arg", ")", ":", "if", "not", "arg", ":", "self", ".", "message", "(", "'Currently displaying:'", ")", "for", "item", "in", "self", ".", "displaying", ".", "get", "(", "self", ".", "curframe", ",", "{", "}", ")"...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/pdb.py#L1334-L1349
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/parso/py3/parso/cache.py
python
load_module
(hashed_grammar, file_io, cache_path=None)
Returns a module or None, if it fails.
Returns a module or None, if it fails.
[ "Returns", "a", "module", "or", "None", "if", "it", "fails", "." ]
def load_module(hashed_grammar, file_io, cache_path=None): """ Returns a module or None, if it fails. """ p_time = file_io.get_last_modified() if p_time is None: return None try: module_cache_item = parser_cache[hashed_grammar][file_io.path] if p_time <= module_cache_ite...
[ "def", "load_module", "(", "hashed_grammar", ",", "file_io", ",", "cache_path", "=", "None", ")", ":", "p_time", "=", "file_io", ".", "get_last_modified", "(", ")", "if", "p_time", "is", "None", ":", "return", "None", "try", ":", "module_cache_item", "=", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/parso/py3/parso/cache.py#L113-L132
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib-tk/Tkinter.py
python
Wm.wm_protocol
(self, name=None, func=None)
return self.tk.call( 'wm', 'protocol', self._w, name, command)
Bind function FUNC to command NAME for this widget. Return the function bound to NAME if None is given. NAME could be e.g. "WM_SAVE_YOURSELF" or "WM_DELETE_WINDOW".
Bind function FUNC to command NAME for this widget. Return the function bound to NAME if None is given. NAME could be e.g. "WM_SAVE_YOURSELF" or "WM_DELETE_WINDOW".
[ "Bind", "function", "FUNC", "to", "command", "NAME", "for", "this", "widget", ".", "Return", "the", "function", "bound", "to", "NAME", "if", "None", "is", "given", ".", "NAME", "could", "be", "e", ".", "g", ".", "WM_SAVE_YOURSELF", "or", "WM_DELETE_WINDOW"...
def wm_protocol(self, name=None, func=None): """Bind function FUNC to command NAME for this widget. Return the function bound to NAME if None is given. NAME could be e.g. "WM_SAVE_YOURSELF" or "WM_DELETE_WINDOW".""" if hasattr(func, '__call__'): command = self._register(func)...
[ "def", "wm_protocol", "(", "self", ",", "name", "=", "None", ",", "func", "=", "None", ")", ":", "if", "hasattr", "(", "func", ",", "'__call__'", ")", ":", "command", "=", "self", ".", "_register", "(", "func", ")", "else", ":", "command", "=", "fu...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib-tk/Tkinter.py#L1678-L1687
turi-code/SFrame
796b9bdfb2fa1b881d82080754643c7e68629cd2
oss_src/unity/python/sframe/extensions.py
python
_build_native_function_call
(fn)
return _Closure(native_function_name, arglist)
If fn can be interpreted and handled as a native function: i.e. fn is one of the extensions, or fn is a simple lambda closure using one of the extensions. fn = gl.extensions.add fn = lambda x: gl.extensions.add(5) Then, this returns a closure object, which describes the function call whi...
If fn can be interpreted and handled as a native function: i.e. fn is one of the extensions, or fn is a simple lambda closure using one of the extensions.
[ "If", "fn", "can", "be", "interpreted", "and", "handled", "as", "a", "native", "function", ":", "i", ".", "e", ".", "fn", "is", "one", "of", "the", "extensions", "or", "fn", "is", "a", "simple", "lambda", "closure", "using", "one", "of", "the", "exte...
def _build_native_function_call(fn): """ If fn can be interpreted and handled as a native function: i.e. fn is one of the extensions, or fn is a simple lambda closure using one of the extensions. fn = gl.extensions.add fn = lambda x: gl.extensions.add(5) Then, this returns a closure ...
[ "def", "_build_native_function_call", "(", "fn", ")", ":", "# See if fn is the native function itself", "native_function_name", "=", "_get_toolkit_function_name_from_function", "(", "fn", ")", "if", "native_function_name", "!=", "\"\"", ":", "# yup!", "# generate an \"identity\...
https://github.com/turi-code/SFrame/blob/796b9bdfb2fa1b881d82080754643c7e68629cd2/oss_src/unity/python/sframe/extensions.py#L658-L738
google/gemmlowp
e844ffd17118c1e17d94e1ba4354c075a4577b88
meta/generators/quantized_mul_kernels_common.py
python
_GenerateNxMLoadMultiplyAggregate
(emitter, registers, kernel_m, kernel_n, aggregators, lhs, rhs, count)
Emit inner loop for N rows x M cols multiplication.
Emit inner loop for N rows x M cols multiplication.
[ "Emit", "inner", "loop", "for", "N", "rows", "x", "M", "cols", "multiplication", "." ]
def _GenerateNxMLoadMultiplyAggregate(emitter, registers, kernel_m, kernel_n, aggregators, lhs, rhs, count): """Emit inner loop for N rows x M cols multiplication.""" emitter.EmitNewline() emitter.EmitComment('General NxM lanes loop.') emitter.EmitNumericalLabel(1) emitte...
[ "def", "_GenerateNxMLoadMultiplyAggregate", "(", "emitter", ",", "registers", ",", "kernel_m", ",", "kernel_n", ",", "aggregators", ",", "lhs", ",", "rhs", ",", "count", ")", ":", "emitter", ".", "EmitNewline", "(", ")", "emitter", ".", "EmitComment", "(", "...
https://github.com/google/gemmlowp/blob/e844ffd17118c1e17d94e1ba4354c075a4577b88/meta/generators/quantized_mul_kernels_common.py#L410-L446
weolar/miniblink49
1c4678db0594a4abde23d3ebbcc7cd13c3170777
third_party/WebKit/Source/bindings/scripts/idl_definitions.py
python
IdlDefinitions.__init__
(self, idl_name, node)
Args: node: AST root node, class == 'File
Args: node: AST root node, class == 'File
[ "Args", ":", "node", ":", "AST", "root", "node", "class", "==", "File" ]
def __init__(self, idl_name, node): """Args: node: AST root node, class == 'File'""" self.callback_functions = {} self.dictionaries = {} self.enumerations = {} self.implements = [] self.interfaces = {} self.idl_name = idl_name self.typedefs = {} n...
[ "def", "__init__", "(", "self", ",", "idl_name", ",", "node", ")", ":", "self", ".", "callback_functions", "=", "{", "}", "self", ".", "dictionaries", "=", "{", "}", "self", ".", "enumerations", "=", "{", "}", "self", ".", "implements", "=", "[", "]"...
https://github.com/weolar/miniblink49/blob/1c4678db0594a4abde23d3ebbcc7cd13c3170777/third_party/WebKit/Source/bindings/scripts/idl_definitions.py#L91-L130
kamyu104/LeetCode-Solutions
77605708a927ea3b85aee5a479db733938c7c211
Python/peeking-iterator.py
python
PeekingIterator.next
(self)
return self.val_
:rtype: int
:rtype: int
[ ":", "rtype", ":", "int" ]
def next(self): """ :rtype: int """ self.val_ = self.peek() self.has_peeked_ = False self.has_next_ = self.iterator.hasNext() return self.val_
[ "def", "next", "(", "self", ")", ":", "self", ".", "val_", "=", "self", ".", "peek", "(", ")", "self", ".", "has_peeked_", "=", "False", "self", ".", "has_next_", "=", "self", ".", "iterator", ".", "hasNext", "(", ")", "return", "self", ".", "val_"...
https://github.com/kamyu104/LeetCode-Solutions/blob/77605708a927ea3b85aee5a479db733938c7c211/Python/peeking-iterator.py#L26-L33
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/aui.py
python
AuiManager.AddPane
(*args, **kwargs)
return _aui.AuiManager_AddPane(*args, **kwargs)
AddPane(self, Window window, AuiPaneInfo paneInfo, Point dropPos) -> bool
AddPane(self, Window window, AuiPaneInfo paneInfo, Point dropPos) -> bool
[ "AddPane", "(", "self", "Window", "window", "AuiPaneInfo", "paneInfo", "Point", "dropPos", ")", "-", ">", "bool" ]
def AddPane(*args, **kwargs): """AddPane(self, Window window, AuiPaneInfo paneInfo, Point dropPos) -> bool""" return _aui.AuiManager_AddPane(*args, **kwargs)
[ "def", "AddPane", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_aui", ".", "AuiManager_AddPane", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/aui.py#L643-L645
thalium/icebox
99d147d5b9269222225443ce171b4fd46d8985d4
third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2class.py
python
parseDTD
(ExternalID, SystemID)
return xmlDtd(_obj=ret)
Load and parse an external subset.
Load and parse an external subset.
[ "Load", "and", "parse", "an", "external", "subset", "." ]
def parseDTD(ExternalID, SystemID): """Load and parse an external subset. """ ret = libxml2mod.xmlParseDTD(ExternalID, SystemID) if ret is None:raise parserError('xmlParseDTD() failed') return xmlDtd(_obj=ret)
[ "def", "parseDTD", "(", "ExternalID", ",", "SystemID", ")", ":", "ret", "=", "libxml2mod", ".", "xmlParseDTD", "(", "ExternalID", ",", "SystemID", ")", "if", "ret", "is", "None", ":", "raise", "parserError", "(", "'xmlParseDTD() failed'", ")", "return", "xml...
https://github.com/thalium/icebox/blob/99d147d5b9269222225443ce171b4fd46d8985d4/third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2class.py#L530-L534
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/pip/_internal/utils/encoding.py
python
auto_decode
(data)
return data.decode( locale.getpreferredencoding(False) or sys.getdefaultencoding(), )
Check a bytes string for a BOM to correctly detect the encoding Fallback to locale.getpreferredencoding(False) like open() on Python3
Check a bytes string for a BOM to correctly detect the encoding
[ "Check", "a", "bytes", "string", "for", "a", "BOM", "to", "correctly", "detect", "the", "encoding" ]
def auto_decode(data): # type: (bytes) -> str """Check a bytes string for a BOM to correctly detect the encoding Fallback to locale.getpreferredencoding(False) like open() on Python3""" for bom, encoding in BOMS: if data.startswith(bom): return data[len(bom):].decode(encoding) #...
[ "def", "auto_decode", "(", "data", ")", ":", "# type: (bytes) -> str", "for", "bom", ",", "encoding", "in", "BOMS", ":", "if", "data", ".", "startswith", "(", "bom", ")", ":", "return", "data", "[", "len", "(", "bom", ")", ":", "]", ".", "decode", "(...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/pip/_internal/utils/encoding.py#L24-L41
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py
python
URLopener.open_unknown
(self, fullurl, data=None)
Overridable interface to open unknown URL type.
Overridable interface to open unknown URL type.
[ "Overridable", "interface", "to", "open", "unknown", "URL", "type", "." ]
def open_unknown(self, fullurl, data=None): """Overridable interface to open unknown URL type.""" type, url = splittype(fullurl) raise OSError('url error', 'unknown url type', type)
[ "def", "open_unknown", "(", "self", ",", "fullurl", ",", "data", "=", "None", ")", ":", "type", ",", "url", "=", "splittype", "(", "fullurl", ")", "raise", "OSError", "(", "'url error'", ",", "'unknown url type'", ",", "type", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py#L1797-L1800
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/docview.py
python
DocManager.FileHistoryUseMenu
(self, menu)
Use this menu for appending recently-visited document filenames, for convenient access. Calling this function with a valid menu enables the history list functionality. Note that you can add multiple menus using this function, to be managed by the file history object.
Use this menu for appending recently-visited document filenames, for convenient access. Calling this function with a valid menu enables the history list functionality.
[ "Use", "this", "menu", "for", "appending", "recently", "-", "visited", "document", "filenames", "for", "convenient", "access", ".", "Calling", "this", "function", "with", "a", "valid", "menu", "enables", "the", "history", "list", "functionality", "." ]
def FileHistoryUseMenu(self, menu): """ Use this menu for appending recently-visited document filenames, for convenient access. Calling this function with a valid menu enables the history list functionality. Note that you can add multiple menus using this function, to be ...
[ "def", "FileHistoryUseMenu", "(", "self", ",", "menu", ")", ":", "if", "self", ".", "_fileHistory", ":", "self", ".", "_fileHistory", ".", "UseMenu", "(", "menu", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/docview.py#L2056-L2066
apple/turicreate
cce55aa5311300e3ce6af93cb45ba791fd1bdf49
src/python/turicreate/data_structures/sarray.py
python
SArray.all
(self)
Return True if every element of the SArray evaluates to True. For numeric SArrays zeros and missing values (``None``) evaluate to False, while all non-zero, non-missing values evaluate to True. For string, list, and dictionary SArrays, empty values (zero length strings, lists or dictiona...
Return True if every element of the SArray evaluates to True. For numeric SArrays zeros and missing values (``None``) evaluate to False, while all non-zero, non-missing values evaluate to True. For string, list, and dictionary SArrays, empty values (zero length strings, lists or dictiona...
[ "Return", "True", "if", "every", "element", "of", "the", "SArray", "evaluates", "to", "True", ".", "For", "numeric", "SArrays", "zeros", "and", "missing", "values", "(", "None", ")", "evaluate", "to", "False", "while", "all", "non", "-", "zero", "non", "...
def all(self): """ Return True if every element of the SArray evaluates to True. For numeric SArrays zeros and missing values (``None``) evaluate to False, while all non-zero, non-missing values evaluate to True. For string, list, and dictionary SArrays, empty values (zero length...
[ "def", "all", "(", "self", ")", ":", "with", "cython_context", "(", ")", ":", "return", "self", ".", "__proxy__", ".", "all", "(", ")" ]
https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/src/python/turicreate/data_structures/sarray.py#L2067-L2102
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/ma/mrecords.py
python
_mrreconstruct
(subtype, baseclass, baseshape, basetype,)
return subtype.__new__(subtype, _data, mask=_mask, dtype=basetype,)
Build a new MaskedArray from the information stored in a pickle.
Build a new MaskedArray from the information stored in a pickle.
[ "Build", "a", "new", "MaskedArray", "from", "the", "information", "stored", "in", "a", "pickle", "." ]
def _mrreconstruct(subtype, baseclass, baseshape, basetype,): """ Build a new MaskedArray from the information stored in a pickle. """ _data = ndarray.__new__(baseclass, baseshape, basetype).view(subtype) _mask = ndarray.__new__(ndarray, baseshape, 'b1') return subtype.__new__(subtype, _data, m...
[ "def", "_mrreconstruct", "(", "subtype", ",", "baseclass", ",", "baseshape", ",", "basetype", ",", ")", ":", "_data", "=", "ndarray", ".", "__new__", "(", "baseclass", ",", "baseshape", ",", "basetype", ")", ".", "view", "(", "subtype", ")", "_mask", "="...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/ma/mrecords.py#L490-L497
SpenceKonde/megaTinyCore
1c4a70b18a149fe6bcb551dfa6db11ca50b8997b
megaavr/tools/libs/pyedbglib/protocols/avr8protocol.py
python
Avr8Protocol.set_interface
(self, interface)
Sets the function field in the physical context :param interface: physical interface setting
Sets the function field in the physical context
[ "Sets", "the", "function", "field", "in", "the", "physical", "context" ]
def set_interface(self, interface): """ Sets the function field in the physical context :param interface: physical interface setting """ self.set_byte(self.AVR8_CTXT_PHYSICAL, self.AVR8_PHY_INTERFACE, interface)
[ "def", "set_interface", "(", "self", ",", "interface", ")", ":", "self", ".", "set_byte", "(", "self", ".", "AVR8_CTXT_PHYSICAL", ",", "self", ".", "AVR8_PHY_INTERFACE", ",", "interface", ")" ]
https://github.com/SpenceKonde/megaTinyCore/blob/1c4a70b18a149fe6bcb551dfa6db11ca50b8997b/megaavr/tools/libs/pyedbglib/protocols/avr8protocol.py#L241-L247
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/syntax/_caml.py
python
SyntaxData.GetKeywords
(self)
return [CAML_KW1, CAML_KW2, CAML_KW3]
Returns Specified Keywords List
Returns Specified Keywords List
[ "Returns", "Specified", "Keywords", "List" ]
def GetKeywords(self): """Returns Specified Keywords List """ return [CAML_KW1, CAML_KW2, CAML_KW3]
[ "def", "GetKeywords", "(", "self", ")", ":", "return", "[", "CAML_KW1", ",", "CAML_KW2", ",", "CAML_KW3", "]" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/syntax/_caml.py#L81-L83
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/distutils/cmd.py
python
Command.__init__
(self, dist)
Create and initialize a new Command object. Most importantly, invokes the 'initialize_options()' method, which is the real initializer and depends on the actual command being instantiated.
Create and initialize a new Command object. Most importantly, invokes the 'initialize_options()' method, which is the real initializer and depends on the actual command being instantiated.
[ "Create", "and", "initialize", "a", "new", "Command", "object", ".", "Most", "importantly", "invokes", "the", "initialize_options", "()", "method", "which", "is", "the", "real", "initializer", "and", "depends", "on", "the", "actual", "command", "being", "instant...
def __init__(self, dist): """Create and initialize a new Command object. Most importantly, invokes the 'initialize_options()' method, which is the real initializer and depends on the actual command being instantiated. """ # late import because of mutual dependence betwee...
[ "def", "__init__", "(", "self", ",", "dist", ")", ":", "# late import because of mutual dependence between these classes", "from", "distutils", ".", "dist", "import", "Distribution", "if", "not", "isinstance", "(", "dist", ",", "Distribution", ")", ":", "raise", "Ty...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/distutils/cmd.py#L47-L92
PaddlePaddle/Paddle
1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c
python/paddle/fluid/executor.py
python
Executor.close
(self)
Close the executor. This interface is used for distributed training (PServers mode). This executor can not be used after calling the interface, because this interface releases resources associated with the current Trainer. Returns: None Examples: .. code-block::...
Close the executor. This interface is used for distributed training (PServers mode). This executor can not be used after calling the interface, because this interface releases resources associated with the current Trainer.
[ "Close", "the", "executor", ".", "This", "interface", "is", "used", "for", "distributed", "training", "(", "PServers", "mode", ")", ".", "This", "executor", "can", "not", "be", "used", "after", "calling", "the", "interface", "because", "this", "interface", "...
def close(self): """ Close the executor. This interface is used for distributed training (PServers mode). This executor can not be used after calling the interface, because this interface releases resources associated with the current Trainer. Returns: None ...
[ "def", "close", "(", "self", ")", ":", "if", "not", "self", ".", "_closed", ":", "self", ".", "_closed", "=", "True", "for", "k", ",", "trainer_instance", "in", "self", ".", "trainer_caches", ".", "items", "(", ")", ":", "self", ".", "_default_executor...
https://github.com/PaddlePaddle/Paddle/blob/1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c/python/paddle/fluid/executor.py#L1000-L1024
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_gdi.py
python
Region.IntersectRegion
(*args, **kwargs)
return _gdi_.Region_IntersectRegion(*args, **kwargs)
IntersectRegion(self, Region region) -> bool
IntersectRegion(self, Region region) -> bool
[ "IntersectRegion", "(", "self", "Region", "region", ")", "-", ">", "bool" ]
def IntersectRegion(*args, **kwargs): """IntersectRegion(self, Region region) -> bool""" return _gdi_.Region_IntersectRegion(*args, **kwargs)
[ "def", "IntersectRegion", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_gdi_", ".", "Region_IntersectRegion", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_gdi.py#L1583-L1585
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/cgutils.py
python
for_range_slice
(builder, start, stop, step, intp=None, inc=True)
Generate LLVM IR for a for-loop based on a slice. Yields a (index, count) tuple where `index` is the slice index's value inside the loop, and `count` the iteration count. Parameters ------------- builder : object Builder object start : int The beginning value of the slice s...
Generate LLVM IR for a for-loop based on a slice. Yields a (index, count) tuple where `index` is the slice index's value inside the loop, and `count` the iteration count.
[ "Generate", "LLVM", "IR", "for", "a", "for", "-", "loop", "based", "on", "a", "slice", ".", "Yields", "a", "(", "index", "count", ")", "tuple", "where", "index", "is", "the", "slice", "index", "s", "value", "inside", "the", "loop", "and", "count", "t...
def for_range_slice(builder, start, stop, step, intp=None, inc=True): """ Generate LLVM IR for a for-loop based on a slice. Yields a (index, count) tuple where `index` is the slice index's value inside the loop, and `count` the iteration count. Parameters ------------- builder : object ...
[ "def", "for_range_slice", "(", "builder", ",", "start", ",", "stop", ",", "step", ",", "intp", "=", "None", ",", "inc", "=", "True", ")", ":", "if", "intp", "is", "None", ":", "intp", "=", "start", ".", "type", "bbcond", "=", "builder", ".", "appen...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/cgutils.py#L497-L551
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/extern/pygments/lexers/__init__.py
python
get_lexer_for_filename
(_fn, code=None, **options)
Get a lexer for a filename. If multiple lexers match the filename pattern, use ``analyze_text()`` to figure out which one is more appropriate.
Get a lexer for a filename. If multiple lexers match the filename pattern, use ``analyze_text()`` to figure out which one is more appropriate.
[ "Get", "a", "lexer", "for", "a", "filename", ".", "If", "multiple", "lexers", "match", "the", "filename", "pattern", "use", "analyze_text", "()", "to", "figure", "out", "which", "one", "is", "more", "appropriate", "." ]
def get_lexer_for_filename(_fn, code=None, **options): """ Get a lexer for a filename. If multiple lexers match the filename pattern, use ``analyze_text()`` to figure out which one is more appropriate. """ matches = [] fn = basename(_fn) for modname, name, _, filenames, _ in LEXERS.iter...
[ "def", "get_lexer_for_filename", "(", "_fn", ",", "code", "=", "None", ",", "*", "*", "options", ")", ":", "matches", "=", "[", "]", "fn", "=", "basename", "(", "_fn", ")", "for", "modname", ",", "name", ",", "_", ",", "filenames", ",", "_", "in", ...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/extern/pygments/lexers/__init__.py#L83-L120
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/stc.py
python
StyledTextCtrl.BackTab
(*args, **kwargs)
return _stc.StyledTextCtrl_BackTab(*args, **kwargs)
BackTab(self) Dedent the selected lines.
BackTab(self)
[ "BackTab", "(", "self", ")" ]
def BackTab(*args, **kwargs): """ BackTab(self) Dedent the selected lines. """ return _stc.StyledTextCtrl_BackTab(*args, **kwargs)
[ "def", "BackTab", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_stc", ".", "StyledTextCtrl_BackTab", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/stc.py#L4555-L4561
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scikit-learn/py2/sklearn/multioutput.py
python
MultiOutputRegressor.score
(self, X, y, sample_weight=None)
return r2_score(y, self.predict(X), sample_weight=sample_weight, multioutput='uniform_average')
Returns the coefficient of determination R^2 of the prediction. The coefficient R^2 is defined as (1 - u/v), where u is the regression sum of squares ((y_true - y_pred) ** 2).sum() and v is the residual sum of squares ((y_true - y_true.mean()) ** 2).sum(). Best possible score is 1.0 and...
Returns the coefficient of determination R^2 of the prediction.
[ "Returns", "the", "coefficient", "of", "determination", "R^2", "of", "the", "prediction", "." ]
def score(self, X, y, sample_weight=None): """Returns the coefficient of determination R^2 of the prediction. The coefficient R^2 is defined as (1 - u/v), where u is the regression sum of squares ((y_true - y_pred) ** 2).sum() and v is the residual sum of squares ((y_true - y_true.mean(...
[ "def", "score", "(", "self", ",", "X", ",", "y", ",", "sample_weight", "=", "None", ")", ":", "# XXX remove in 0.19 when r2_score default for multioutput changes", "from", ".", "metrics", "import", "r2_score", "return", "r2_score", "(", "y", ",", "self", ".", "p...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scikit-learn/py2/sklearn/multioutput.py#L139-L174
BlzFans/wke
b0fa21158312e40c5fbd84682d643022b6c34a93
cygwin/lib/python2.6/random.py
python
Random.betavariate
(self, alpha, beta)
Beta distribution. Conditions on the parameters are alpha > 0 and beta > 0. Returned values range between 0 and 1.
Beta distribution.
[ "Beta", "distribution", "." ]
def betavariate(self, alpha, beta): """Beta distribution. Conditions on the parameters are alpha > 0 and beta > 0. Returned values range between 0 and 1. """ # This version due to Janne Sinkkonen, and matches all the std # texts (e.g., Knuth Vol 2 Ed 3 pg 134 "the beta...
[ "def", "betavariate", "(", "self", ",", "alpha", ",", "beta", ")", ":", "# This version due to Janne Sinkkonen, and matches all the std", "# texts (e.g., Knuth Vol 2 Ed 3 pg 134 \"the beta distribution\").", "y", "=", "self", ".", "gammavariate", "(", "alpha", ",", "1.", ")...
https://github.com/BlzFans/wke/blob/b0fa21158312e40c5fbd84682d643022b6c34a93/cygwin/lib/python2.6/random.py#L603-L617
msracver/Deep-Image-Analogy
632b9287b42552e32dad64922967c8c9ec7fc4d3
examples/pycaffe/tools.py
python
SimpleTransformer.deprocess
(self, im)
return np.uint8(im)
inverse of preprocess()
inverse of preprocess()
[ "inverse", "of", "preprocess", "()" ]
def deprocess(self, im): """ inverse of preprocess() """ im = im.transpose(1, 2, 0) im /= self.scale im += self.mean im = im[:, :, ::-1] # change to RGB return np.uint8(im)
[ "def", "deprocess", "(", "self", ",", "im", ")", ":", "im", "=", "im", ".", "transpose", "(", "1", ",", "2", ",", "0", ")", "im", "/=", "self", ".", "scale", "im", "+=", "self", ".", "mean", "im", "=", "im", "[", ":", ",", ":", ",", ":", ...
https://github.com/msracver/Deep-Image-Analogy/blob/632b9287b42552e32dad64922967c8c9ec7fc4d3/examples/pycaffe/tools.py#L41-L50
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/python/ops/logging_ops.py
python
Print
(input_, data, message=None, first_n=None, summarize=None, name=None)
return gen_logging_ops._print(input_, data, message, first_n, summarize, name)
Prints a list of tensors. This is an identity op with the side effect of printing `data` when evaluating. Note: This op prints to the standard error. It is not currently compatible with jupyter notebook (printing to the notebook *server's* output, not into the notebook). Args: input_: A tensor pa...
Prints a list of tensors.
[ "Prints", "a", "list", "of", "tensors", "." ]
def Print(input_, data, message=None, first_n=None, summarize=None, name=None): """Prints a list of tensors. This is an identity op with the side effect of printing `data` when evaluating. Note: This op prints to the standard error. It is not currently compatible with jupyter notebook (printing ...
[ "def", "Print", "(", "input_", ",", "data", ",", "message", "=", "None", ",", "first_n", "=", "None", ",", "summarize", "=", "None", ",", "name", "=", "None", ")", ":", "return", "gen_logging_ops", ".", "_print", "(", "input_", ",", "data", ",", "mes...
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/python/ops/logging_ops.py#L38-L62
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_core.py
python
VersionInfo.__init__
(self, *args, **kwargs)
__init__(self, String name, int major, int minor, int micro=0, String description=wxEmptyString, String copyright=wxEmptyString) -> VersionInfo
__init__(self, String name, int major, int minor, int micro=0, String description=wxEmptyString, String copyright=wxEmptyString) -> VersionInfo
[ "__init__", "(", "self", "String", "name", "int", "major", "int", "minor", "int", "micro", "=", "0", "String", "description", "=", "wxEmptyString", "String", "copyright", "=", "wxEmptyString", ")", "-", ">", "VersionInfo" ]
def __init__(self, *args, **kwargs): """ __init__(self, String name, int major, int minor, int micro=0, String description=wxEmptyString, String copyright=wxEmptyString) -> VersionInfo """ _core_.VersionInfo_swiginit(self,_core_.new_VersionInfo(*args, **kwargs))
[ "def", "__init__", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "_core_", ".", "VersionInfo_swiginit", "(", "self", ",", "_core_", ".", "new_VersionInfo", "(", "*", "args", ",", "*", "*", "kwargs", ")", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_core.py#L16559-L16564
apple/turicreate
cce55aa5311300e3ce6af93cb45ba791fd1bdf49
deps/src/libxml2-2.9.1/python/libxml2.py
python
keepBlanksDefault
(val)
return ret
Set and return the previous value for default blanks text nodes support. The 1.x version of the parser used an heuristic to try to detect ignorable white spaces. As a result the SAX callback was generating xmlSAX2IgnorableWhitespace() callbacks instead of characters() one, and when using t...
Set and return the previous value for default blanks text nodes support. The 1.x version of the parser used an heuristic to try to detect ignorable white spaces. As a result the SAX callback was generating xmlSAX2IgnorableWhitespace() callbacks instead of characters() one, and when using t...
[ "Set", "and", "return", "the", "previous", "value", "for", "default", "blanks", "text", "nodes", "support", ".", "The", "1", ".", "x", "version", "of", "the", "parser", "used", "an", "heuristic", "to", "try", "to", "detect", "ignorable", "white", "spaces",...
def keepBlanksDefault(val): """Set and return the previous value for default blanks text nodes support. The 1.x version of the parser used an heuristic to try to detect ignorable white spaces. As a result the SAX callback was generating xmlSAX2IgnorableWhitespace() callbacks instead of ...
[ "def", "keepBlanksDefault", "(", "val", ")", ":", "ret", "=", "libxml2mod", ".", "xmlKeepBlanksDefault", "(", "val", ")", "return", "ret" ]
https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/deps/src/libxml2-2.9.1/python/libxml2.py#L1281-L1301
chromiumembedded/cef
80caf947f3fe2210e5344713c5281d8af9bdc295
tools/yapf/yapf/yapflib/format_token.py
python
FormatToken.subtypes
(self)
return [Subtype.NONE] if value is None else value
Extra type information for directing formatting.
Extra type information for directing formatting.
[ "Extra", "type", "information", "for", "directing", "formatting", "." ]
def subtypes(self): """Extra type information for directing formatting.""" value = pytree_utils.GetNodeAnnotation(self.node, pytree_utils.Annotation.SUBTYPE) return [Subtype.NONE] if value is None else value
[ "def", "subtypes", "(", "self", ")", ":", "value", "=", "pytree_utils", ".", "GetNodeAnnotation", "(", "self", ".", "node", ",", "pytree_utils", ".", "Annotation", ".", "SUBTYPE", ")", "return", "[", "Subtype", ".", "NONE", "]", "if", "value", "is", "Non...
https://github.com/chromiumembedded/cef/blob/80caf947f3fe2210e5344713c5281d8af9bdc295/tools/yapf/yapf/yapflib/format_token.py#L219-L223
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
tools/telemetry/telemetry/page/page_set.py
python
PageSet.ReorderPageSet
(self, results_file)
return pages
Reorders this page set based on the results of a past run.
Reorders this page set based on the results of a past run.
[ "Reorders", "this", "page", "set", "based", "on", "the", "results", "of", "a", "past", "run", "." ]
def ReorderPageSet(self, results_file): """Reorders this page set based on the results of a past run.""" page_set_dict = {} for page in self.pages: page_set_dict[page.url] = page pages = [] with open(results_file, 'rb') as csv_file: csv_reader = csv.reader(csv_file) csv_header = c...
[ "def", "ReorderPageSet", "(", "self", ",", "results_file", ")", ":", "page_set_dict", "=", "{", "}", "for", "page", "in", "self", ".", "pages", ":", "page_set_dict", "[", "page", ".", "url", "]", "=", "page", "pages", "=", "[", "]", "with", "open", "...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/tools/telemetry/telemetry/page/page_set.py#L111-L133
BlzFans/wke
b0fa21158312e40c5fbd84682d643022b6c34a93
cygwin/lib/python2.6/pdb.py
python
Pdb.displayhook
(self, obj)
Custom displayhook for the exec in default(), which prevents assignment of the _ variable in the builtins.
Custom displayhook for the exec in default(), which prevents assignment of the _ variable in the builtins.
[ "Custom", "displayhook", "for", "the", "exec", "in", "default", "()", "which", "prevents", "assignment", "of", "the", "_", "variable", "in", "the", "builtins", "." ]
def displayhook(self, obj): """Custom displayhook for the exec in default(), which prevents assignment of the _ variable in the builtins. """ # reproduce the behavior of the standard displayhook, not printing None if obj is not None: print repr(obj)
[ "def", "displayhook", "(", "self", ",", "obj", ")", ":", "# reproduce the behavior of the standard displayhook, not printing None", "if", "obj", "is", "not", "None", ":", "print", "repr", "(", "obj", ")" ]
https://github.com/BlzFans/wke/blob/b0fa21158312e40c5fbd84682d643022b6c34a93/cygwin/lib/python2.6/pdb.py#L197-L203
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_core.py
python
Sizer.PrependWindow
(self, *args, **kw)
return self.Prepend(*args, **kw)
Compatibility alias for `Prepend`.
Compatibility alias for `Prepend`.
[ "Compatibility", "alias", "for", "Prepend", "." ]
def PrependWindow(self, *args, **kw): """Compatibility alias for `Prepend`.""" return self.Prepend(*args, **kw)
[ "def", "PrependWindow", "(", "self", ",", "*", "args", ",", "*", "*", "kw", ")", ":", "return", "self", ".", "Prepend", "(", "*", "args", ",", "*", "*", "kw", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_core.py#L14724-L14726
GoSSIP-SJTU/TripleDoggy
03648d6b19c812504b14e8b98c8c7b3f443f4e54
tools/clang/bindings/python/clang/cindex.py
python
TranslationUnit.reparse
(self, unsaved_files=None, options=0)
Reparse an already parsed translation unit. In-memory contents for files can be provided by passing a list of pairs as unsaved_files, the first items should be the filenames to be mapped and the second should be the contents to be substituted for the file. The contents may be passed as ...
Reparse an already parsed translation unit.
[ "Reparse", "an", "already", "parsed", "translation", "unit", "." ]
def reparse(self, unsaved_files=None, options=0): """ Reparse an already parsed translation unit. In-memory contents for files can be provided by passing a list of pairs as unsaved_files, the first items should be the filenames to be mapped and the second should be the contents ...
[ "def", "reparse", "(", "self", ",", "unsaved_files", "=", "None", ",", "options", "=", "0", ")", ":", "if", "unsaved_files", "is", "None", ":", "unsaved_files", "=", "[", "]", "unsaved_files_array", "=", "0", "if", "len", "(", "unsaved_files", ")", ":", ...
https://github.com/GoSSIP-SJTU/TripleDoggy/blob/03648d6b19c812504b14e8b98c8c7b3f443f4e54/tools/clang/bindings/python/clang/cindex.py#L2951-L2978
SeisSol/SeisSol
955fbeb8c5d40d3363a2da0edc611259aebe1653
preprocessing/science/kinematic_models/FaultPlane.py
python
FaultPlane.upsample_fault
(self, spatial_order, spatial_zoom, temporal_zoom, proj, use_Yoffe=False, time_smoothing_kernel_as_dt_fraction=0.5)
return pf
increase spatial and temporal resolution of kinematic model by interpolation
increase spatial and temporal resolution of kinematic model by interpolation
[ "increase", "spatial", "and", "temporal", "resolution", "of", "kinematic", "model", "by", "interpolation" ]
def upsample_fault(self, spatial_order, spatial_zoom, temporal_zoom, proj, use_Yoffe=False, time_smoothing_kernel_as_dt_fraction=0.5): "increase spatial and temporal resolution of kinematic model by interpolation" # time vector ndt2 = (self.ndt - 1) * temporal_zoom + 1 ny2, nx2 = self.ny...
[ "def", "upsample_fault", "(", "self", ",", "spatial_order", ",", "spatial_zoom", ",", "temporal_zoom", ",", "proj", ",", "use_Yoffe", "=", "False", ",", "time_smoothing_kernel_as_dt_fraction", "=", "0.5", ")", ":", "# time vector", "ndt2", "=", "(", "self", ".",...
https://github.com/SeisSol/SeisSol/blob/955fbeb8c5d40d3363a2da0edc611259aebe1653/preprocessing/science/kinematic_models/FaultPlane.py#L429-L498
thalium/icebox
99d147d5b9269222225443ce171b4fd46d8985d4
third_party/virtualbox/src/VBox/VMM/VMMAll/IEMAllInstructionsPython.py
python
SimpleParser.parseTagOpDisEnum
(self, sTag, aasSections, iTagLine, iEndLine)
return True
Tag: \@opdisenum Value: OP_XXXX This is for select a specific (legacy) disassembler enum value for the instruction.
Tag: \@opdisenum Value: OP_XXXX
[ "Tag", ":", "\\", "@opdisenum", "Value", ":", "OP_XXXX" ]
def parseTagOpDisEnum(self, sTag, aasSections, iTagLine, iEndLine): """ Tag: \@opdisenum Value: OP_XXXX This is for select a specific (legacy) disassembler enum value for the instruction. """ oInstr = self.ensureInstructionForOpTag(iTagLine); ...
[ "def", "parseTagOpDisEnum", "(", "self", ",", "sTag", ",", "aasSections", ",", "iTagLine", ",", "iEndLine", ")", ":", "oInstr", "=", "self", ".", "ensureInstructionForOpTag", "(", "iTagLine", ")", "# Flatten and split.", "asWords", "=", "self", ".", "flattenAllS...
https://github.com/thalium/icebox/blob/99d147d5b9269222225443ce171b4fd46d8985d4/third_party/virtualbox/src/VBox/VMM/VMMAll/IEMAllInstructionsPython.py#L2310-L2337
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/Path/PathScripts/PathOpTools.py
python
offsetWire
(wire, base, offset, forward, Side=None)
return orientWire(Part.Wire(edges), None)
offsetWire(wire, base, offset, forward) ... offsets the wire away from base and orients the wire accordingly. The function tries to avoid most of the pitfalls of Part.makeOffset2D which is possible because all offsetting happens in the XY plane.
offsetWire(wire, base, offset, forward) ... offsets the wire away from base and orients the wire accordingly. The function tries to avoid most of the pitfalls of Part.makeOffset2D which is possible because all offsetting happens in the XY plane.
[ "offsetWire", "(", "wire", "base", "offset", "forward", ")", "...", "offsets", "the", "wire", "away", "from", "base", "and", "orients", "the", "wire", "accordingly", ".", "The", "function", "tries", "to", "avoid", "most", "of", "the", "pitfalls", "of", "Pa...
def offsetWire(wire, base, offset, forward, Side=None): """offsetWire(wire, base, offset, forward) ... offsets the wire away from base and orients the wire accordingly. The function tries to avoid most of the pitfalls of Part.makeOffset2D which is possible because all offsetting happens in the XY plane. ...
[ "def", "offsetWire", "(", "wire", ",", "base", ",", "offset", ",", "forward", ",", "Side", "=", "None", ")", ":", "PathLog", ".", "track", "(", "\"offsetWire\"", ")", "if", "1", "==", "len", "(", "wire", ".", "Edges", ")", ":", "edge", "=", "wire",...
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Path/PathScripts/PathOpTools.py#L173-L423
hunterlew/mstar_deeplearning_project
3761624dcbd7d44af257200542d13d1444dc634a
classification/caffe/build/Release/pycaffe/caffe/coord_map.py
python
conv_params
(fn)
return (axis, np.array(params.get('stride', 1), ndmin=1), (ks - 1) * dilation + 1, np.array(params.get('pad', 0), ndmin=1))
Extract the spatial parameters that determine the coordinate mapping: kernel size, stride, padding, and dilation. Implementation detail: Convolution, Deconvolution, and Im2col layers define these in the convolution_param message, while Pooling has its own fields in pooling_param. This method deals with...
Extract the spatial parameters that determine the coordinate mapping: kernel size, stride, padding, and dilation.
[ "Extract", "the", "spatial", "parameters", "that", "determine", "the", "coordinate", "mapping", ":", "kernel", "size", "stride", "padding", "and", "dilation", "." ]
def conv_params(fn): """ Extract the spatial parameters that determine the coordinate mapping: kernel size, stride, padding, and dilation. Implementation detail: Convolution, Deconvolution, and Im2col layers define these in the convolution_param message, while Pooling has its own fields in pool...
[ "def", "conv_params", "(", "fn", ")", ":", "params", "=", "fn", ".", "params", ".", "get", "(", "'convolution_param'", ",", "fn", ".", "params", ")", "axis", "=", "params", ".", "get", "(", "'axis'", ",", "1", ")", "ks", "=", "np", ".", "array", ...
https://github.com/hunterlew/mstar_deeplearning_project/blob/3761624dcbd7d44af257200542d13d1444dc634a/classification/caffe/build/Release/pycaffe/caffe/coord_map.py#L18-L37
mapnik/mapnik
f3da900c355e1d15059c4a91b00203dcc9d9f0ef
scons/scons-local-4.1.0/SCons/Tool/MSCommon/sdk.py
python
get_default_sdk
()
return InstalledSDKList[0]
Set up the default Platform/Windows SDK.
Set up the default Platform/Windows SDK.
[ "Set", "up", "the", "default", "Platform", "/", "Windows", "SDK", "." ]
def get_default_sdk(): """Set up the default Platform/Windows SDK.""" get_installed_sdks() if not InstalledSDKList: return None return InstalledSDKList[0]
[ "def", "get_default_sdk", "(", ")", ":", "get_installed_sdks", "(", ")", "if", "not", "InstalledSDKList", ":", "return", "None", "return", "InstalledSDKList", "[", "0", "]" ]
https://github.com/mapnik/mapnik/blob/f3da900c355e1d15059c4a91b00203dcc9d9f0ef/scons/scons-local-4.1.0/SCons/Tool/MSCommon/sdk.py#L339-L344
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/third_party/lib_x86_64/python2.7/dist-packages/rosdep2/model.py
python
RosdepDatabase.get_view_names
(self)
return self._rosdep_db.keys()
:returns: list of view names that are loaded into this database.
:returns: list of view names that are loaded into this database.
[ ":", "returns", ":", "list", "of", "view", "names", "that", "are", "loaded", "into", "this", "database", "." ]
def get_view_names(self): """ :returns: list of view names that are loaded into this database. """ return self._rosdep_db.keys()
[ "def", "get_view_names", "(", "self", ")", ":", "return", "self", ".", "_rosdep_db", ".", "keys", "(", ")" ]
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/third_party/lib_x86_64/python2.7/dist-packages/rosdep2/model.py#L92-L96
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/python/ops/array_ops.py
python
_FillShape
(op)
return [tensor_util.constant_value_as_shape(op.inputs[0])]
Shape function for the Fill op. This op takes a vector of dimensions and a scalar, and produces a tensor with the given dimensions. Args: op: A Fill Operation. Returns: A single-element list containing the shape of the output. Raises: ValueError: If the shapes or arguments are known to be inva...
Shape function for the Fill op.
[ "Shape", "function", "for", "the", "Fill", "op", "." ]
def _FillShape(op): """Shape function for the Fill op. This op takes a vector of dimensions and a scalar, and produces a tensor with the given dimensions. Args: op: A Fill Operation. Returns: A single-element list containing the shape of the output. Raises: ValueError: If the shapes or argum...
[ "def", "_FillShape", "(", "op", ")", ":", "op", ".", "inputs", "[", "0", "]", ".", "get_shape", "(", ")", ".", "assert_has_rank", "(", "1", ")", "op", ".", "inputs", "[", "1", "]", ".", "get_shape", "(", ")", ".", "assert_has_rank", "(", "0", ")"...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/python/ops/array_ops.py#L1887-L1907
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/ed_bookmark.py
python
BookmarkWindow.GotoBookmark
(self, mark)
Goto the bookmark in the editor @param mark: BookMark
Goto the bookmark in the editor @param mark: BookMark
[ "Goto", "the", "bookmark", "in", "the", "editor", "@param", "mark", ":", "BookMark" ]
def GotoBookmark(self, mark): """Goto the bookmark in the editor @param mark: BookMark """ app = wx.GetApp() mw = app.GetActiveWindow() if mw: nb = mw.GetNotebook() buf = nb.FindBuffer(mark.Filename) use_handle = True if no...
[ "def", "GotoBookmark", "(", "self", ",", "mark", ")", ":", "app", "=", "wx", ".", "GetApp", "(", ")", "mw", "=", "app", ".", "GetActiveWindow", "(", ")", "if", "mw", ":", "nb", "=", "mw", ".", "GetNotebook", "(", ")", "buf", "=", "nb", ".", "Fi...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/ed_bookmark.py#L227-L254
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/symtable.py
python
Symbol.get_namespaces
(self)
return self.__namespaces
Return a list of namespaces bound to this name
Return a list of namespaces bound to this name
[ "Return", "a", "list", "of", "namespaces", "bound", "to", "this", "name" ]
def get_namespaces(self): """Return a list of namespaces bound to this name""" return self.__namespaces
[ "def", "get_namespaces", "(", "self", ")", ":", "return", "self", ".", "__namespaces" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/symtable.py#L223-L225
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/ops/_op_impl/_custom_op/_basic.py
python
_get_bias
(shape_bias)
return shb
_get_bias
_get_bias
[ "_get_bias" ]
def _get_bias(shape_bias): """_get_bias""" bias_length = shape_bias[0] if bias_length % 16 == 0: shb = shape_bias else: bias_length = (bias_length // 16) * 16 + 16 shape_bias = [] shape_bias.append(bias_length) shb = shape_bias return shb
[ "def", "_get_bias", "(", "shape_bias", ")", ":", "bias_length", "=", "shape_bias", "[", "0", "]", "if", "bias_length", "%", "16", "==", "0", ":", "shb", "=", "shape_bias", "else", ":", "bias_length", "=", "(", "bias_length", "//", "16", ")", "*", "16",...
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/ops/_op_impl/_custom_op/_basic.py#L130-L140
snap-stanford/snap-python
d53c51b0a26aa7e3e7400b014cdf728948fde80a
setup/snap.py
python
TCh_GetUc
(*args)
return _snap.TCh_GetUc(*args)
TCh_GetUc(char const & Ch) -> char Parameters: Ch: char const &
TCh_GetUc(char const & Ch) -> char
[ "TCh_GetUc", "(", "char", "const", "&", "Ch", ")", "-", ">", "char" ]
def TCh_GetUc(*args): """ TCh_GetUc(char const & Ch) -> char Parameters: Ch: char const & """ return _snap.TCh_GetUc(*args)
[ "def", "TCh_GetUc", "(", "*", "args", ")", ":", "return", "_snap", ".", "TCh_GetUc", "(", "*", "args", ")" ]
https://github.com/snap-stanford/snap-python/blob/d53c51b0a26aa7e3e7400b014cdf728948fde80a/setup/snap.py#L12707-L12715
ROCmSoftwarePlatform/hipCaffe
4ec5d482515cce532348553b6db6d00d015675d5
scripts/cpp_lint.py
python
ResetNolintSuppressions
()
Resets the set of NOLINT suppressions to empty.
Resets the set of NOLINT suppressions to empty.
[ "Resets", "the", "set", "of", "NOLINT", "suppressions", "to", "empty", "." ]
def ResetNolintSuppressions(): "Resets the set of NOLINT suppressions to empty." _error_suppressions.clear()
[ "def", "ResetNolintSuppressions", "(", ")", ":", "_error_suppressions", ".", "clear", "(", ")" ]
https://github.com/ROCmSoftwarePlatform/hipCaffe/blob/4ec5d482515cce532348553b6db6d00d015675d5/scripts/cpp_lint.py#L495-L497
tkn-tub/ns3-gym
19bfe0a583e641142609939a090a09dfc63a095f
src/visualizer/visualizer/core.py
python
Visualizer.__init__
(self)
! Initializer function. @param self: class object. @return none
! Initializer function.
[ "!", "Initializer", "function", "." ]
def __init__(self): """! Initializer function. @param self: class object. @return none """ assert Visualizer.INSTANCE is None Visualizer.INSTANCE = self super(Visualizer, self).__init__() self.nodes = {} # node index -> Node self.channels...
[ "def", "__init__", "(", "self", ")", ":", "assert", "Visualizer", ".", "INSTANCE", "is", "None", "Visualizer", ".", "INSTANCE", "=", "self", "super", "(", "Visualizer", ",", "self", ")", ".", "__init__", "(", ")", "self", ".", "nodes", "=", "{", "}", ...
https://github.com/tkn-tub/ns3-gym/blob/19bfe0a583e641142609939a090a09dfc63a095f/src/visualizer/visualizer/core.py#L718-L763
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/telemetry/third_party/web-page-replay/platformsettings.py
python
_WindowsPlatformSettings.get_system_logging_handler
(self)
return DebugViewHandler()
Return a handler for the logging module (optional). For Windows, output can be viewed with DebugView. http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx
Return a handler for the logging module (optional).
[ "Return", "a", "handler", "for", "the", "logging", "module", "(", "optional", ")", "." ]
def get_system_logging_handler(self): """Return a handler for the logging module (optional). For Windows, output can be viewed with DebugView. http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx """ import ctypes output_debug_string = ctypes.windll.kernel32.OutputDebugStringA outp...
[ "def", "get_system_logging_handler", "(", "self", ")", ":", "import", "ctypes", "output_debug_string", "=", "ctypes", ".", "windll", ".", "kernel32", ".", "OutputDebugStringA", "output_debug_string", ".", "argtypes", "=", "[", "ctypes", ".", "c_char_p", "]", "clas...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/telemetry/third_party/web-page-replay/platformsettings.py#L601-L613
BitMEX/api-connectors
37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812
auto-generated/python/swagger_client/api/chat_api.py
python
ChatApi.chat_get
(self, **kwargs)
Get chat messages. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.chat_get(async_req=True) >>> result = thread.get() :param async_req bool :param float count: Numbe...
Get chat messages. # noqa: E501
[ "Get", "chat", "messages", ".", "#", "noqa", ":", "E501" ]
def chat_get(self, **kwargs): # noqa: E501 """Get chat messages. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.chat_get(async_req=True) >>> result = thread.get() ...
[ "def", "chat_get", "(", "self", ",", "*", "*", "kwargs", ")", ":", "# noqa: E501", "kwargs", "[", "'_return_http_data_only'", "]", "=", "True", "if", "kwargs", ".", "get", "(", "'async_req'", ")", ":", "return", "self", ".", "chat_get_with_http_info", "(", ...
https://github.com/BitMEX/api-connectors/blob/37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812/auto-generated/python/swagger_client/api/chat_api.py#L36-L58
RamadhanAmizudin/malware
2c6c53c8b0d556f5d8078d6ca0fc4448f4697cf1
Fuzzbunch/fuzzbunch/redirection.py
python
RedirectionManager.config_redirect
(self, plugin, do_redir)
return id
Configure whether the plug-in should perform redirection plugin - An instance of a plugin do_redir - Should we do redirection? (True or False)
Configure whether the plug-in should perform redirection plugin - An instance of a plugin do_redir - Should we do redirection? (True or False)
[ "Configure", "whether", "the", "plug", "-", "in", "should", "perform", "redirection", "plugin", "-", "An", "instance", "of", "a", "plugin", "do_redir", "-", "Should", "we", "do", "redirection?", "(", "True", "or", "False", ")" ]
def config_redirect(self, plugin, do_redir): """Configure whether the plug-in should perform redirection plugin - An instance of a plugin do_redir - Should we do redirection? (True or False)""" redir = plugin.getRedirection() # Make a new session dictionary here session...
[ "def", "config_redirect", "(", "self", ",", "plugin", ",", "do_redir", ")", ":", "redir", "=", "plugin", ".", "getRedirection", "(", ")", "# Make a new session dictionary here", "session_data", "=", "{", "'params'", ":", "{", "}", ",", "# ", "'remote'", ":", ...
https://github.com/RamadhanAmizudin/malware/blob/2c6c53c8b0d556f5d8078d6ca0fc4448f4697cf1/Fuzzbunch/fuzzbunch/redirection.py#L466-L508
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/fitting_widgets/tf_asymmetry_fitting/tf_asymmetry_fitting_model.py
python
TFAsymmetryFittingModel._get_all_fit_function_parameter_values_for_tf_single_function
(self, tf_single_function: IFunction)
return [self._get_normalisation_from_tf_fit_function(tf_single_function)] + parameter_values
Returns the required parameters values including normalisation from a TF asymmetry single function.
Returns the required parameters values including normalisation from a TF asymmetry single function.
[ "Returns", "the", "required", "parameters", "values", "including", "normalisation", "from", "a", "TF", "asymmetry", "single", "function", "." ]
def _get_all_fit_function_parameter_values_for_tf_single_function(self, tf_single_function: IFunction) -> list: """Returns the required parameters values including normalisation from a TF asymmetry single function.""" normal_single_function = self._get_normal_fit_function_from(tf_single_function) ...
[ "def", "_get_all_fit_function_parameter_values_for_tf_single_function", "(", "self", ",", "tf_single_function", ":", "IFunction", ")", "->", "list", ":", "normal_single_function", "=", "self", ".", "_get_normal_fit_function_from", "(", "tf_single_function", ")", "parameter_va...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/fitting_widgets/tf_asymmetry_fitting/tf_asymmetry_fitting_model.py#L691-L695
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/third_party/lib_x86_64/python2.7/dist-packages/numpy/distutils/fcompiler/__init__.py
python
load_all_fcompiler_classes
()
Cache all the FCompiler classes found in modules in the numpy.distutils.fcompiler package.
Cache all the FCompiler classes found in modules in the numpy.distutils.fcompiler package.
[ "Cache", "all", "the", "FCompiler", "classes", "found", "in", "modules", "in", "the", "numpy", ".", "distutils", ".", "fcompiler", "package", "." ]
def load_all_fcompiler_classes(): """Cache all the FCompiler classes found in modules in the numpy.distutils.fcompiler package. """ from glob import glob global fcompiler_class, fcompiler_aliases if fcompiler_class is not None: return pys = os.path.join(os.path.dirname(__file__), '*....
[ "def", "load_all_fcompiler_classes", "(", ")", ":", "from", "glob", "import", "glob", "global", "fcompiler_class", ",", "fcompiler_aliases", "if", "fcompiler_class", "is", "not", "None", ":", "return", "pys", "=", "os", ".", "path", ".", "join", "(", "os", "...
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/third_party/lib_x86_64/python2.7/dist-packages/numpy/distutils/fcompiler/__init__.py#L726-L752
BVLC/caffe
9b891540183ddc834a02b2bd81b31afae71b2153
scripts/cpp_lint.py
python
CheckForNewlineAtEOF
(filename, lines, error)
Logs an error if there is no newline char at the end of the file. Args: filename: The name of the current file. lines: An array of strings, each representing a line of the file. error: The function to call with any errors found.
Logs an error if there is no newline char at the end of the file.
[ "Logs", "an", "error", "if", "there", "is", "no", "newline", "char", "at", "the", "end", "of", "the", "file", "." ]
def CheckForNewlineAtEOF(filename, lines, error): """Logs an error if there is no newline char at the end of the file. Args: filename: The name of the current file. lines: An array of strings, each representing a line of the file. error: The function to call with any errors found. """ # The array ...
[ "def", "CheckForNewlineAtEOF", "(", "filename", ",", "lines", ",", "error", ")", ":", "# The array lines() was created by adding two newlines to the", "# original file (go figure), then splitting on \\n.", "# To verify that the file ends in \\n, we just have to make sure the", "# last-but-...
https://github.com/BVLC/caffe/blob/9b891540183ddc834a02b2bd81b31afae71b2153/scripts/cpp_lint.py#L1512-L1527
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/debug/cli/curses_ui.py
python
CursesUI._scroll_output
(self, direction, line_index=None)
Scroll the output pad. Args: direction: _SCROLL_REFRESH, _SCROLL_UP, _SCROLL_DOWN, _SCROLL_UP_A_LINE, _SCROLL_DOWN_A_LINE, _SCROLL_HOME, _SCROLL_END, _SCROLL_TO_LINE_INDEX line_index: (int) Specifies the zero-based line index to scroll to. Applicable only if direction is _SCROLL_TO_LINE...
Scroll the output pad.
[ "Scroll", "the", "output", "pad", "." ]
def _scroll_output(self, direction, line_index=None): """Scroll the output pad. Args: direction: _SCROLL_REFRESH, _SCROLL_UP, _SCROLL_DOWN, _SCROLL_UP_A_LINE, _SCROLL_DOWN_A_LINE, _SCROLL_HOME, _SCROLL_END, _SCROLL_TO_LINE_INDEX line_index: (int) Specifies the zero-based line index to scrol...
[ "def", "_scroll_output", "(", "self", ",", "direction", ",", "line_index", "=", "None", ")", ":", "if", "not", "self", ".", "_output_pad", ":", "# No output pad is present. Do nothing.", "return", "if", "direction", "==", "_SCROLL_REFRESH", ":", "pass", "elif", ...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/debug/cli/curses_ui.py#L1316-L1391
ricardoquesada/Spidermonkey
4a75ea2543408bd1b2c515aa95901523eeef7858
media/webrtc/trunk/webrtc/tools/compare_videos.py
python
_ParseArgs
()
return options
Registers the command-line options.
Registers the command-line options.
[ "Registers", "the", "command", "-", "line", "options", "." ]
def _ParseArgs(): """Registers the command-line options.""" usage = 'usage: %prog [options]' parser = optparse.OptionParser(usage=usage) parser.add_option('--label', type='string', default='MY_TEST', help=('Label of the test, used to identify different ' 'tests. De...
[ "def", "_ParseArgs", "(", ")", ":", "usage", "=", "'usage: %prog [options]'", "parser", "=", "optparse", ".", "OptionParser", "(", "usage", "=", "usage", ")", "parser", ".", "add_option", "(", "'--label'", ",", "type", "=", "'string'", ",", "default", "=", ...
https://github.com/ricardoquesada/Spidermonkey/blob/4a75ea2543408bd1b2c515aa95901523eeef7858/media/webrtc/trunk/webrtc/tools/compare_videos.py#L24-L75
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/results_tab_widget/results_tab_presenter.py
python
ResultsTabPresenter.on_new_fit_performed
(self, fit_info=None)
React to a new fit created in the fitting tab
React to a new fit created in the fitting tab
[ "React", "to", "a", "new", "fit", "created", "in", "the", "fitting", "tab" ]
def on_new_fit_performed(self, fit_info=None): """React to a new fit created in the fitting tab""" # It's possible that this call can come in on a thread that # is different to the one that the view lives on. # In order to update the GUI we use invokeMethod with the assumption # ...
[ "def", "on_new_fit_performed", "(", "self", ",", "fit_info", "=", "None", ")", ":", "# It's possible that this call can come in on a thread that", "# is different to the one that the view lives on.", "# In order to update the GUI we use invokeMethod with the assumption", "# that 'self' liv...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/results_tab_widget/results_tab_presenter.py#L48-L62
SpenceKonde/megaTinyCore
1c4a70b18a149fe6bcb551dfa6db11ca50b8997b
megaavr/tools/libs/pyedbglib/protocols/avr8protocol.py
python
Avr8Protocol.run
(self)
Resumes core execution
Resumes core execution
[ "Resumes", "core", "execution" ]
def run(self): """Resumes core execution""" self.logger.debug("AVR core resume") self.check_response(self.jtagice3_command_response(bytearray([self.CMD_AVR8_RUN, self.CMD_VERSION0])))
[ "def", "run", "(", "self", ")", ":", "self", ".", "logger", ".", "debug", "(", "\"AVR core resume\"", ")", "self", ".", "check_response", "(", "self", ".", "jtagice3_command_response", "(", "bytearray", "(", "[", "self", ".", "CMD_AVR8_RUN", ",", "self", "...
https://github.com/SpenceKonde/megaTinyCore/blob/1c4a70b18a149fe6bcb551dfa6db11ca50b8997b/megaavr/tools/libs/pyedbglib/protocols/avr8protocol.py#L394-L397
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/keras/legacy_tf_layers/core.py
python
dense
( inputs, units, activation=None, use_bias=True, kernel_initializer=None, bias_initializer=init_ops.zeros_initializer(), kernel_regularizer=None, bias_regularizer=None, activity_regularizer=None, kernel_constraint=None, bias_constraint=None, trainable=True, name=None, ...
return layer.apply(inputs)
Functional interface for the densely-connected layer. This layer implements the operation: `outputs = activation(inputs * kernel + bias)` where `activation` is the activation function passed as the `activation` argument (if not `None`), `kernel` is a weights matrix created by the layer, and `bias` is a bias ...
Functional interface for the densely-connected layer.
[ "Functional", "interface", "for", "the", "densely", "-", "connected", "layer", "." ]
def dense( inputs, units, activation=None, use_bias=True, kernel_initializer=None, bias_initializer=init_ops.zeros_initializer(), kernel_regularizer=None, bias_regularizer=None, activity_regularizer=None, kernel_constraint=None, bias_constraint=None, trainable=True, name=...
[ "def", "dense", "(", "inputs", ",", "units", ",", "activation", "=", "None", ",", "use_bias", "=", "True", ",", "kernel_initializer", "=", "None", ",", "bias_initializer", "=", "init_ops", ".", "zeros_initializer", "(", ")", ",", "kernel_regularizer", "=", "...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/keras/legacy_tf_layers/core.py#L113-L187
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/distutils/ccompiler.py
python
CCompiler.add_include_dir
(self, dir)
Add 'dir' to the list of directories that will be searched for header files. The compiler is instructed to search directories in the order in which they are supplied by successive calls to 'add_include_dir()'.
Add 'dir' to the list of directories that will be searched for header files. The compiler is instructed to search directories in the order in which they are supplied by successive calls to 'add_include_dir()'.
[ "Add", "dir", "to", "the", "list", "of", "directories", "that", "will", "be", "searched", "for", "header", "files", ".", "The", "compiler", "is", "instructed", "to", "search", "directories", "in", "the", "order", "in", "which", "they", "are", "supplied", "...
def add_include_dir(self, dir): """Add 'dir' to the list of directories that will be searched for header files. The compiler is instructed to search directories in the order in which they are supplied by successive calls to 'add_include_dir()'. """ self.include_dirs.appe...
[ "def", "add_include_dir", "(", "self", ",", "dir", ")", ":", "self", ".", "include_dirs", ".", "append", "(", "dir", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/distutils/ccompiler.py#L217-L223
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/client/session.py
python
BaseSession.close
(self)
Closes this session. Calling this method frees all resources associated with the session. Raises: tf.errors.OpError: Or one of its subclasses if an error occurs while closing the TensorFlow session.
Closes this session.
[ "Closes", "this", "session", "." ]
def close(self): """Closes this session. Calling this method frees all resources associated with the session. Raises: tf.errors.OpError: Or one of its subclasses if an error occurs while closing the TensorFlow session. """ if self._session and not self._closed: self._closed = T...
[ "def", "close", "(", "self", ")", ":", "if", "self", ".", "_session", "and", "not", "self", ".", "_closed", ":", "self", ".", "_closed", "=", "True", "tf_session", ".", "TF_CloseSession", "(", "self", ".", "_session", ")" ]
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/client/session.py#L742-L753
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/SocketServer.py
python
ThreadingMixIn.process_request
(self, request, client_address)
Start a new thread to process the request.
Start a new thread to process the request.
[ "Start", "a", "new", "thread", "to", "process", "the", "request", "." ]
def process_request(self, request, client_address): """Start a new thread to process the request.""" t = threading.Thread(target = self.process_request_thread, args = (request, client_address)) t.daemon = self.daemon_threads t.start()
[ "def", "process_request", "(", "self", ",", "request", ",", "client_address", ")", ":", "t", "=", "threading", ".", "Thread", "(", "target", "=", "self", ".", "process_request_thread", ",", "args", "=", "(", "request", ",", "client_address", ")", ")", "t",...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/SocketServer.py#L599-L604
quantOS-org/DataCore
e2ef9bd2c22ee9e2845675b6435a14fa607f3551
mdlink/deps/windows/protobuf-2.5.0/python/google/protobuf/internal/cpp_message.py
python
_AddMessageMethods
(message_descriptor, cls)
Adds the methods to a protocol message class.
Adds the methods to a protocol message class.
[ "Adds", "the", "methods", "to", "a", "protocol", "message", "class", "." ]
def _AddMessageMethods(message_descriptor, cls): """Adds the methods to a protocol message class.""" if message_descriptor.is_extendable: def ClearExtension(self, extension): self.Extensions.ClearExtension(extension) def HasExtension(self, extension): return self.Extensions.HasExtension(extens...
[ "def", "_AddMessageMethods", "(", "message_descriptor", ",", "cls", ")", ":", "if", "message_descriptor", ".", "is_extendable", ":", "def", "ClearExtension", "(", "self", ",", "extension", ")", ":", "self", ".", "Extensions", ".", "ClearExtension", "(", "extensi...
https://github.com/quantOS-org/DataCore/blob/e2ef9bd2c22ee9e2845675b6435a14fa607f3551/mdlink/deps/windows/protobuf-2.5.0/python/google/protobuf/internal/cpp_message.py#L508-L654
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/numpy/py3/numpy/ma/core.py
python
_MaskedBinaryOperation.__init__
(self, mbfunc, fillx=0, filly=0)
abfunc(fillx, filly) must be defined. abfunc(x, filly) = x for all x to enable reduce.
abfunc(fillx, filly) must be defined.
[ "abfunc", "(", "fillx", "filly", ")", "must", "be", "defined", "." ]
def __init__(self, mbfunc, fillx=0, filly=0): """ abfunc(fillx, filly) must be defined. abfunc(x, filly) = x for all x to enable reduce. """ super().__init__(mbfunc) self.fillx = fillx self.filly = filly ufunc_domain[mbfunc] = None ufunc_fills[mb...
[ "def", "__init__", "(", "self", ",", "mbfunc", ",", "fillx", "=", "0", ",", "filly", "=", "0", ")", ":", "super", "(", ")", ".", "__init__", "(", "mbfunc", ")", "self", ".", "fillx", "=", "fillx", "self", ".", "filly", "=", "filly", "ufunc_domain",...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/numpy/py3/numpy/ma/core.py#L992-L1003
snap-stanford/snap-python
d53c51b0a26aa7e3e7400b014cdf728948fde80a
setup/snap.py
python
TStr.GetPrimHashCd
(self)
return _snap.TStr_GetPrimHashCd(self)
GetPrimHashCd(TStr self) -> int Parameters: self: TStr const *
GetPrimHashCd(TStr self) -> int
[ "GetPrimHashCd", "(", "TStr", "self", ")", "-", ">", "int" ]
def GetPrimHashCd(self): """ GetPrimHashCd(TStr self) -> int Parameters: self: TStr const * """ return _snap.TStr_GetPrimHashCd(self)
[ "def", "GetPrimHashCd", "(", "self", ")", ":", "return", "_snap", ".", "TStr_GetPrimHashCd", "(", "self", ")" ]
https://github.com/snap-stanford/snap-python/blob/d53c51b0a26aa7e3e7400b014cdf728948fde80a/setup/snap.py#L10328-L10336
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/train/callback/_landscape.py
python
SummaryLandscape._check_device_ids
(device_ids)
Check device_ids type and value.
Check device_ids type and value.
[ "Check", "device_ids", "type", "and", "value", "." ]
def _check_device_ids(device_ids): """Check device_ids type and value.""" check_value_type('device_ids', device_ids, list) for i in device_ids: if not isinstance(i, int): raise TypeError(f'Landscape device_ids type should be int, ' f'bu...
[ "def", "_check_device_ids", "(", "device_ids", ")", ":", "check_value_type", "(", "'device_ids'", ",", "device_ids", ",", "list", ")", "for", "i", "in", "device_ids", ":", "if", "not", "isinstance", "(", "i", ",", "int", ")", ":", "raise", "TypeError", "("...
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/train/callback/_landscape.py#L811-L820
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/io/pytables.py
python
Fixed.validate_version
(self, where=None)
return True
are we trying to operate on an old version?
are we trying to operate on an old version?
[ "are", "we", "trying", "to", "operate", "on", "an", "old", "version?" ]
def validate_version(self, where=None): """ are we trying to operate on an old version? """ return True
[ "def", "validate_version", "(", "self", ",", "where", "=", "None", ")", ":", "return", "True" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/io/pytables.py#L2596-L2598
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/setuptools/package_index.py
python
interpret_distro_name
( location, basename, metadata, py_version=None, precedence=SOURCE_DIST, platform=None )
Generate alternative interpretations of a source distro name Note: if `location` is a filesystem filename, you should call ``pkg_resources.normalize_path()`` on it before passing it to this routine!
Generate alternative interpretations of a source distro name
[ "Generate", "alternative", "interpretations", "of", "a", "source", "distro", "name" ]
def interpret_distro_name( location, basename, metadata, py_version=None, precedence=SOURCE_DIST, platform=None ): """Generate alternative interpretations of a source distro name Note: if `location` is a filesystem filename, you should call ``pkg_resources.normalize_path()`` on it before pa...
[ "def", "interpret_distro_name", "(", "location", ",", "basename", ",", "metadata", ",", "py_version", "=", "None", ",", "precedence", "=", "SOURCE_DIST", ",", "platform", "=", "None", ")", ":", "# Generate alternative interpretations of a source distro name", "# Because...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/setuptools/package_index.py#L151-L183
apache/impala
8ddac48f3428c86f2cbd037ced89cfb903298b12
shell/ext-py/six-1.14.0/six.py
python
add_metaclass
(metaclass)
return wrapper
Class decorator for creating a class with a metaclass.
Class decorator for creating a class with a metaclass.
[ "Class", "decorator", "for", "creating", "a", "class", "with", "a", "metaclass", "." ]
def add_metaclass(metaclass): """Class decorator for creating a class with a metaclass.""" def wrapper(cls): orig_vars = cls.__dict__.copy() slots = orig_vars.get('__slots__') if slots is not None: if isinstance(slots, str): slots = [slots] for slo...
[ "def", "add_metaclass", "(", "metaclass", ")", ":", "def", "wrapper", "(", "cls", ")", ":", "orig_vars", "=", "cls", ".", "__dict__", ".", "copy", "(", ")", "slots", "=", "orig_vars", ".", "get", "(", "'__slots__'", ")", "if", "slots", "is", "not", "...
https://github.com/apache/impala/blob/8ddac48f3428c86f2cbd037ced89cfb903298b12/shell/ext-py/six-1.14.0/six.py#L864-L879
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/xml/sax/saxutils.py
python
prepare_input_source
(source, base = "")
return source
This function takes an InputSource and an optional base URL and returns a fully resolved InputSource object ready for reading.
This function takes an InputSource and an optional base URL and returns a fully resolved InputSource object ready for reading.
[ "This", "function", "takes", "an", "InputSource", "and", "an", "optional", "base", "URL", "and", "returns", "a", "fully", "resolved", "InputSource", "object", "ready", "for", "reading", "." ]
def prepare_input_source(source, base = ""): """This function takes an InputSource and an optional base URL and returns a fully resolved InputSource object ready for reading.""" if type(source) in _StringTypes: source = xmlreader.InputSource(source) elif hasattr(source, "read"): f = sou...
[ "def", "prepare_input_source", "(", "source", ",", "base", "=", "\"\"", ")", ":", "if", "type", "(", "source", ")", "in", "_StringTypes", ":", "source", "=", "xmlreader", ".", "InputSource", "(", "source", ")", "elif", "hasattr", "(", "source", ",", "\"r...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/xml/sax/saxutils.py#L303-L346
google/syzygy
8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5
third_party/numpy/files/numpy/lib/recfunctions.py
python
append_fields
(base, names, data, dtypes=None, fill_value= -1, usemask=True, asrecarray=False)
return _fix_output(output, usemask=usemask, asrecarray=asrecarray)
Add new fields to an existing array. The names of the fields are given with the `names` arguments, the corresponding values with the `data` arguments. If a single field is appended, `names`, `data` and `dtypes` do not have to be lists but just values. Parameters ---------- base : array ...
Add new fields to an existing array.
[ "Add", "new", "fields", "to", "an", "existing", "array", "." ]
def append_fields(base, names, data, dtypes=None, fill_value= -1, usemask=True, asrecarray=False): """ Add new fields to an existing array. The names of the fields are given with the `names` arguments, the corresponding values with the `data` arguments. If a single field is append...
[ "def", "append_fields", "(", "base", ",", "names", ",", "data", ",", "dtypes", "=", "None", ",", "fill_value", "=", "-", "1", ",", "usemask", "=", "True", ",", "asrecarray", "=", "False", ")", ":", "# Check the names", "if", "isinstance", "(", "names", ...
https://github.com/google/syzygy/blob/8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5/third_party/numpy/files/numpy/lib/recfunctions.py#L575-L641
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/ipython/py3/IPython/core/interactiveshell.py
python
InteractiveShell.reset
(self, new_session=True, aggressive=False)
Clear all internal namespaces, and attempt to release references to user objects. If new_session is True, a new history session will be opened.
Clear all internal namespaces, and attempt to release references to user objects.
[ "Clear", "all", "internal", "namespaces", "and", "attempt", "to", "release", "references", "to", "user", "objects", "." ]
def reset(self, new_session=True, aggressive=False): """Clear all internal namespaces, and attempt to release references to user objects. If new_session is True, a new history session will be opened. """ # Clear histories self.history_manager.reset(new_session) #...
[ "def", "reset", "(", "self", ",", "new_session", "=", "True", ",", "aggressive", "=", "False", ")", ":", "# Clear histories", "self", ".", "history_manager", ".", "reset", "(", "new_session", ")", "# Reset counter used to index all histories", "if", "new_session", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/ipython/py3/IPython/core/interactiveshell.py#L1422-L1483
KratosMultiphysics/Kratos
0000833054ed0503424eb28205d6508d9ca6cbbc
applications/ContactStructuralMechanicsApplication/python_scripts/adaptative_remeshing_contact_structural_mechanics_analysis.py
python
AdaptativeRemeshingContactStructuralMechanicsAnalysis.Initialize
(self)
Initializing the Analysis
Initializing the Analysis
[ "Initializing", "the", "Analysis" ]
def Initialize(self): """ Initializing the Analysis """ super(AdaptativeRemeshingContactStructuralMechanicsAnalysis, self).Initialize() computing_model_part = self._GetSolver().GetComputingModelPart() if not self.process_remesh: convergence_criteria = self._GetSolver()._GetCo...
[ "def", "Initialize", "(", "self", ")", ":", "super", "(", "AdaptativeRemeshingContactStructuralMechanicsAnalysis", ",", "self", ")", ".", "Initialize", "(", ")", "computing_model_part", "=", "self", ".", "_GetSolver", "(", ")", ".", "GetComputingModelPart", "(", "...
https://github.com/KratosMultiphysics/Kratos/blob/0000833054ed0503424eb28205d6508d9ca6cbbc/applications/ContactStructuralMechanicsApplication/python_scripts/adaptative_remeshing_contact_structural_mechanics_analysis.py#L57-L94
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/tkinter/__init__.py
python
Text.dlineinfo
(self, index)
return self._getints(self.tk.call(self._w, 'dlineinfo', index))
Return tuple (x,y,width,height,baseline) giving the bounding box and baseline position of the visible part of the line containing the character at INDEX.
Return tuple (x,y,width,height,baseline) giving the bounding box and baseline position of the visible part of the line containing the character at INDEX.
[ "Return", "tuple", "(", "x", "y", "width", "height", "baseline", ")", "giving", "the", "bounding", "box", "and", "baseline", "position", "of", "the", "visible", "part", "of", "the", "line", "containing", "the", "character", "at", "INDEX", "." ]
def dlineinfo(self, index): """Return tuple (x,y,width,height,baseline) giving the bounding box and baseline position of the visible part of the line containing the character at INDEX.""" return self._getints(self.tk.call(self._w, 'dlineinfo', index))
[ "def", "dlineinfo", "(", "self", ",", "index", ")", ":", "return", "self", ".", "_getints", "(", "self", ".", "tk", ".", "call", "(", "self", ".", "_w", ",", "'dlineinfo'", ",", "index", ")", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/tkinter/__init__.py#L3140-L3144
hfinkel/llvm-project-cxxjit
91084ef018240bbb8e24235ff5cd8c355a9c1a1e
clang/bindings/python/clang/cindex.py
python
Cursor.is_static_method
(self)
return conf.lib.clang_CXXMethod_isStatic(self)
Returns True if the cursor refers to a C++ member function or member function template that is declared 'static'.
Returns True if the cursor refers to a C++ member function or member function template that is declared 'static'.
[ "Returns", "True", "if", "the", "cursor", "refers", "to", "a", "C", "++", "member", "function", "or", "member", "function", "template", "that", "is", "declared", "static", "." ]
def is_static_method(self): """Returns True if the cursor refers to a C++ member function or member function template that is declared 'static'. """ return conf.lib.clang_CXXMethod_isStatic(self)
[ "def", "is_static_method", "(", "self", ")", ":", "return", "conf", ".", "lib", ".", "clang_CXXMethod_isStatic", "(", "self", ")" ]
https://github.com/hfinkel/llvm-project-cxxjit/blob/91084ef018240bbb8e24235ff5cd8c355a9c1a1e/clang/bindings/python/clang/cindex.py#L1485-L1489
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/nn/probability/distribution/distribution.py
python
Distribution._set_sd
(self)
Set standard deviation based on the availability of `_sd` and `_var`.
Set standard deviation based on the availability of `_sd` and `_var`.
[ "Set", "standard", "deviation", "based", "on", "the", "availability", "of", "_sd", "and", "_var", "." ]
def _set_sd(self): """ Set standard deviation based on the availability of `_sd` and `_var`. """ if hasattr(self, '_sd'): self._call_sd = self._sd elif hasattr(self, '_var'): self._call_sd = self._calc_sd_from_var else: self._call_sd = ...
[ "def", "_set_sd", "(", "self", ")", ":", "if", "hasattr", "(", "self", ",", "'_sd'", ")", ":", "self", ".", "_call_sd", "=", "self", ".", "_sd", "elif", "hasattr", "(", "self", ",", "'_var'", ")", ":", "self", ".", "_call_sd", "=", "self", ".", "...
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/nn/probability/distribution/distribution.py#L256-L265
google/mysql-protobuf
467cda676afaa49e762c5c9164a43f6ad31a1fbf
protobuf/python/google/protobuf/internal/python_message.py
python
_AddPropertiesForField
(field, cls)
Adds a public property for a protocol message field. Clients can use this property to get and (in the case of non-repeated scalar fields) directly set the value of a protocol message field. Args: field: A FieldDescriptor for this field. cls: The class we're constructing.
Adds a public property for a protocol message field. Clients can use this property to get and (in the case of non-repeated scalar fields) directly set the value of a protocol message field.
[ "Adds", "a", "public", "property", "for", "a", "protocol", "message", "field", ".", "Clients", "can", "use", "this", "property", "to", "get", "and", "(", "in", "the", "case", "of", "non", "-", "repeated", "scalar", "fields", ")", "directly", "set", "the"...
def _AddPropertiesForField(field, cls): """Adds a public property for a protocol message field. Clients can use this property to get and (in the case of non-repeated scalar fields) directly set the value of a protocol message field. Args: field: A FieldDescriptor for this field. cls: The class we're ...
[ "def", "_AddPropertiesForField", "(", "field", ",", "cls", ")", ":", "# Catch it if we add other types that we should", "# handle specially here.", "assert", "_FieldDescriptor", ".", "MAX_CPPTYPE", "==", "10", "constant_name", "=", "field", ".", "name", ".", "upper", "(...
https://github.com/google/mysql-protobuf/blob/467cda676afaa49e762c5c9164a43f6ad31a1fbf/protobuf/python/google/protobuf/internal/python_message.py#L496-L518
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
tools/code_coverage/croc_html.py
python
CrocHtml.AddSectionHeader
(self, table, caption, itemtype, is_file=False)
Adds a section header to the coverage table. Args: table: Table to add rows to. caption: Caption for section, if not None. itemtype: Type of items in this section, if not None. is_file: Are items in this section files?
Adds a section header to the coverage table.
[ "Adds", "a", "section", "header", "to", "the", "coverage", "table", "." ]
def AddSectionHeader(self, table, caption, itemtype, is_file=False): """Adds a section header to the coverage table. Args: table: Table to add rows to. caption: Caption for section, if not None. itemtype: Type of items in this section, if not None. is_file: Are items in this section fil...
[ "def", "AddSectionHeader", "(", "self", ",", "table", ",", "caption", ",", "itemtype", ",", "is_file", "=", "False", ")", ":", "if", "caption", "is", "not", "None", ":", "table", ".", "E", "(", "'tr'", ")", ".", "E", "(", "'td'", ",", "e_class", "=...
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/tools/code_coverage/croc_html.py#L186-L219
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/contrib/distributions/python/ops/dirichlet_multinomial.py
python
DirichletMultinomial.variance
(self, name="mean")
Class variances for every batch member. The variance for each batch member is defined as the following: ``` Var(X_j) = n * alpha_j / alpha_0 * (1 - alpha_j / alpha_0) * (n + alpha_0) / (1 + alpha_0) ``` where `alpha_0 = sum_j alpha_j`. The covariance between elements in a batch is defi...
Class variances for every batch member.
[ "Class", "variances", "for", "every", "batch", "member", "." ]
def variance(self, name="mean"): """Class variances for every batch member. The variance for each batch member is defined as the following: ``` Var(X_j) = n * alpha_j / alpha_0 * (1 - alpha_j / alpha_0) * (n + alpha_0) / (1 + alpha_0) ``` where `alpha_0 = sum_j alpha_j`. The covari...
[ "def", "variance", "(", "self", ",", "name", "=", "\"mean\"", ")", ":", "alpha", "=", "self", ".", "_alpha", "alpha_sum", "=", "self", ".", "_alpha_sum", "n", "=", "self", ".", "_n", "with", "ops", ".", "name_scope", "(", "self", ".", "name", ")", ...
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/contrib/distributions/python/ops/dirichlet_multinomial.py#L210-L250
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/core/generic.py
python
NDFrame._construct_axes_dict_from
(self, axes, **kwargs)
return d
Return an axes dictionary for the passed axes.
Return an axes dictionary for the passed axes.
[ "Return", "an", "axes", "dictionary", "for", "the", "passed", "axes", "." ]
def _construct_axes_dict_from(self, axes, **kwargs): """Return an axes dictionary for the passed axes.""" d = {a: ax for a, ax in zip(self._AXIS_ORDERS, axes)} d.update(kwargs) return d
[ "def", "_construct_axes_dict_from", "(", "self", ",", "axes", ",", "*", "*", "kwargs", ")", ":", "d", "=", "{", "a", ":", "ax", "for", "a", ",", "ax", "in", "zip", "(", "self", ".", "_AXIS_ORDERS", ",", "axes", ")", "}", "d", ".", "update", "(", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/core/generic.py#L350-L354
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/_core.py
python
Point2D.GetFloor
(*args, **kwargs)
return _core_.Point2D_GetFloor(*args, **kwargs)
GetFloor() -> (x,y) Convert to integer
GetFloor() -> (x,y)
[ "GetFloor", "()", "-", ">", "(", "x", "y", ")" ]
def GetFloor(*args, **kwargs): """ GetFloor() -> (x,y) Convert to integer """ return _core_.Point2D_GetFloor(*args, **kwargs)
[ "def", "GetFloor", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "Point2D_GetFloor", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_core.py#L1656-L1662
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/ipython/py3/IPython/terminal/pt_inputhooks/wx.py
python
inputhook_wx2
(context)
return 0
Run the wx event loop, polling for stdin. This version runs the wx eventloop for an undetermined amount of time, during which it periodically checks to see if anything is ready on stdin. If anything is ready on stdin, the event loop exits. The argument to elr.Run controls how often the event loop loo...
Run the wx event loop, polling for stdin.
[ "Run", "the", "wx", "event", "loop", "polling", "for", "stdin", "." ]
def inputhook_wx2(context): """Run the wx event loop, polling for stdin. This version runs the wx eventloop for an undetermined amount of time, during which it periodically checks to see if anything is ready on stdin. If anything is ready on stdin, the event loop exits. The argument to elr.Run co...
[ "def", "inputhook_wx2", "(", "context", ")", ":", "app", "=", "wx", ".", "GetApp", "(", ")", "if", "app", "is", "not", "None", ":", "assert", "wx", ".", "Thread_IsMain", "(", ")", "elr", "=", "EventLoopRunner", "(", ")", "# As this time is made shorter, ke...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/ipython/py3/IPython/terminal/pt_inputhooks/wx.py#L76-L98
weolar/miniblink49
1c4678db0594a4abde23d3ebbcc7cd13c3170777
v8_7_5/tools/grokdump.py
python
InspectionShell.do_known_oldspace
(self, address)
Teach V8 heap layout information to the inspector. Set the first old space page by passing any pointer into that page.
Teach V8 heap layout information to the inspector.
[ "Teach", "V8", "heap", "layout", "information", "to", "the", "inspector", "." ]
def do_known_oldspace(self, address): """ Teach V8 heap layout information to the inspector. Set the first old space page by passing any pointer into that page. """ address = self.ParseAddressExpr(address) page_address = address & ~self.heap.PageAlignmentMask() self.padawan.known_first_ol...
[ "def", "do_known_oldspace", "(", "self", ",", "address", ")", ":", "address", "=", "self", ".", "ParseAddressExpr", "(", "address", ")", "page_address", "=", "address", "&", "~", "self", ".", "heap", ".", "PageAlignmentMask", "(", ")", "self", ".", "padawa...
https://github.com/weolar/miniblink49/blob/1c4678db0594a4abde23d3ebbcc7cd13c3170777/v8_7_5/tools/grokdump.py#L3646-L3654
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py3/pandas/plotting/_matplotlib/style.py
python
_derive_colors
( *, color: Color | Collection[Color] | None, colormap: str | Colormap | None, color_type: str, num_colors: int, )
Derive colors from either `colormap`, `color_type` or `color` inputs. Get a list of colors either from `colormap`, or from `color`, or from `color_type` (if both `colormap` and `color` are None). Parameters ---------- color : str or sequence, optional Color(s) to be used for deriving seque...
Derive colors from either `colormap`, `color_type` or `color` inputs.
[ "Derive", "colors", "from", "either", "colormap", "color_type", "or", "color", "inputs", "." ]
def _derive_colors( *, color: Color | Collection[Color] | None, colormap: str | Colormap | None, color_type: str, num_colors: int, ) -> list[Color]: """ Derive colors from either `colormap`, `color_type` or `color` inputs. Get a list of colors either from `colormap`, or from `color`, ...
[ "def", "_derive_colors", "(", "*", ",", "color", ":", "Color", "|", "Collection", "[", "Color", "]", "|", "None", ",", "colormap", ":", "str", "|", "Colormap", "|", "None", ",", "color_type", ":", "str", ",", "num_colors", ":", "int", ",", ")", "->",...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/plotting/_matplotlib/style.py#L80-L128
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/_controls.py
python
ListItem.GetBackgroundColour
(*args, **kwargs)
return _controls_.ListItem_GetBackgroundColour(*args, **kwargs)
GetBackgroundColour(self) -> Colour
GetBackgroundColour(self) -> Colour
[ "GetBackgroundColour", "(", "self", ")", "-", ">", "Colour" ]
def GetBackgroundColour(*args, **kwargs): """GetBackgroundColour(self) -> Colour""" return _controls_.ListItem_GetBackgroundColour(*args, **kwargs)
[ "def", "GetBackgroundColour", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_controls_", ".", "ListItem_GetBackgroundColour", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_controls.py#L4260-L4262
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/third_party/lib_x86_64/python2.7/dist-packages/geographic_msgs/msg/_RoutePath.py
python
RoutePath.__init__
(self, *args, **kwds)
Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix in-order arguments and keyword arguments. The available fields are: header,network...
Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix in-order arguments and keyword arguments.
[ "Constructor", ".", "Any", "message", "fields", "that", "are", "implicitly", "/", "explicitly", "set", "to", "None", "will", "be", "assigned", "a", "default", "value", ".", "The", "recommend", "use", "is", "keyword", "arguments", "as", "this", "is", "more", ...
def __init__(self, *args, **kwds): """ Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix in-order arguments and keyword arguments. ...
[ "def", "__init__", "(", "self", ",", "*", "args", ",", "*", "*", "kwds", ")", ":", "if", "args", "or", "kwds", ":", "super", "(", "RoutePath", ",", "self", ")", ".", "__init__", "(", "*", "args", ",", "*", "*", "kwds", ")", "#message fields cannot ...
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/third_party/lib_x86_64/python2.7/dist-packages/geographic_msgs/msg/_RoutePath.py#L69-L98