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
commaai/openpilot
4416c21b1e738ab7d04147c5ae52b5135e0cdb40
pyextra/acados_template/acados_ocp.py
python
AcadosOcpConstraints.lsbx_e
(self)
return self.__lsbx_e
Lower bounds on slacks corresponding to soft lower bounds on x at shooting node N. Not required - zeros by default
Lower bounds on slacks corresponding to soft lower bounds on x at shooting node N. Not required - zeros by default
[ "Lower", "bounds", "on", "slacks", "corresponding", "to", "soft", "lower", "bounds", "on", "x", "at", "shooting", "node", "N", ".", "Not", "required", "-", "zeros", "by", "default" ]
def lsbx_e(self): """Lower bounds on slacks corresponding to soft lower bounds on x at shooting node N. Not required - zeros by default""" return self.__lsbx_e
[ "def", "lsbx_e", "(", "self", ")", ":", "return", "self", ".", "__lsbx_e" ]
https://github.com/commaai/openpilot/blob/4416c21b1e738ab7d04147c5ae52b5135e0cdb40/pyextra/acados_template/acados_ocp.py#L1374-L1377
okex/V3-Open-API-SDK
c5abb0db7e2287718e0055e17e57672ce0ec7fd9
okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_internal/vcs/__init__.py
python
VersionControl.run_command
( cls, cmd, # type: List[str] show_stdout=True, # type: bool cwd=None, # type: Optional[str] on_returncode='raise', # type: str extra_ok_returncodes=None, # type: Optional[Iterable[int]] command_desc=None, # type: Optional[str] extra_environ=None, #...
Run a VCS subcommand This is simply a wrapper around call_subprocess that adds the VCS command name, and checks that the VCS is available
Run a VCS subcommand This is simply a wrapper around call_subprocess that adds the VCS command name, and checks that the VCS is available
[ "Run", "a", "VCS", "subcommand", "This", "is", "simply", "a", "wrapper", "around", "call_subprocess", "that", "adds", "the", "VCS", "command", "name", "and", "checks", "that", "the", "VCS", "is", "available" ]
def run_command( cls, cmd, # type: List[str] show_stdout=True, # type: bool cwd=None, # type: Optional[str] on_returncode='raise', # type: str extra_ok_returncodes=None, # type: Optional[Iterable[int]] command_desc=None, # type: Optional[str] extra_e...
[ "def", "run_command", "(", "cls", ",", "cmd", ",", "# type: List[str]", "show_stdout", "=", "True", ",", "# type: bool", "cwd", "=", "None", ",", "# type: Optional[str]", "on_returncode", "=", "'raise'", ",", "# type: str", "extra_ok_returncodes", "=", "None", ","...
https://github.com/okex/V3-Open-API-SDK/blob/c5abb0db7e2287718e0055e17e57672ce0ec7fd9/okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_internal/vcs/__init__.py#L476-L511
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/ops/math_grad.py
python
_BesselI1eGrad
(op, grad)
Compute gradient of bessel_i1e(x) with respect to its argument.
Compute gradient of bessel_i1e(x) with respect to its argument.
[ "Compute", "gradient", "of", "bessel_i1e", "(", "x", ")", "with", "respect", "to", "its", "argument", "." ]
def _BesselI1eGrad(op, grad): """Compute gradient of bessel_i1e(x) with respect to its argument.""" x = op.inputs[0] y = op.outputs[0] with ops.control_dependencies([grad]): # For x = 0, the correct gradient is 0.5. # However, the main branch gives NaN because of the division by x, so # we impute th...
[ "def", "_BesselI1eGrad", "(", "op", ",", "grad", ")", ":", "x", "=", "op", ".", "inputs", "[", "0", "]", "y", "=", "op", ".", "outputs", "[", "0", "]", "with", "ops", ".", "control_dependencies", "(", "[", "grad", "]", ")", ":", "# For x = 0, the c...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/ops/math_grad.py#L964-L978
potassco/clingo
e0c91d8f95cc28de1c480a871f9c97c30de83d40
libpyclingo/clingo/control.py
python
Control.symbolic_atoms
(self)
return SymbolicAtoms(_c_call('clingo_symbolic_atoms_t*', _lib.clingo_control_symbolic_atoms, self._rep))
An object to inspect the symbolic atoms. See Also -------- clingo.symbolic_atoms
An object to inspect the symbolic atoms.
[ "An", "object", "to", "inspect", "the", "symbolic", "atoms", "." ]
def symbolic_atoms(self) -> SymbolicAtoms: ''' An object to inspect the symbolic atoms. See Also -------- clingo.symbolic_atoms ''' return SymbolicAtoms(_c_call('clingo_symbolic_atoms_t*', _lib.clingo_control_symbolic_atoms, self._rep))
[ "def", "symbolic_atoms", "(", "self", ")", "->", "SymbolicAtoms", ":", "return", "SymbolicAtoms", "(", "_c_call", "(", "'clingo_symbolic_atoms_t*'", ",", "_lib", ".", "clingo_control_symbolic_atoms", ",", "self", ".", "_rep", ")", ")" ]
https://github.com/potassco/clingo/blob/e0c91d8f95cc28de1c480a871f9c97c30de83d40/libpyclingo/clingo/control.py#L687-L695
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
tools/auto_bisect/bisect_printer.py
python
BisectPrinter._GetViewVCLinkFromDepotAndHash
(git_revision, depot)
return ''
Gets link to the repository browser.
Gets link to the repository browser.
[ "Gets", "link", "to", "the", "repository", "browser", "." ]
def _GetViewVCLinkFromDepotAndHash(git_revision, depot): """Gets link to the repository browser.""" if depot and 'viewvc' in bisect_utils.DEPOT_DEPS_NAME[depot]: return bisect_utils.DEPOT_DEPS_NAME[depot]['viewvc'] + git_revision return ''
[ "def", "_GetViewVCLinkFromDepotAndHash", "(", "git_revision", ",", "depot", ")", ":", "if", "depot", "and", "'viewvc'", "in", "bisect_utils", ".", "DEPOT_DEPS_NAME", "[", "depot", "]", ":", "return", "bisect_utils", ".", "DEPOT_DEPS_NAME", "[", "depot", "]", "["...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/tools/auto_bisect/bisect_printer.py#L177-L181
mongodb/mongo
d8ff665343ad29cf286ee2cf4a1960d29371937b
src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Builder.py
python
BuilderBase.get_name
(self, env)
Attempts to get the name of the Builder. Look at the BUILDERS variable of env, expecting it to be a dictionary containing this Builder, and return the key of the dictionary. If there's no key, then return a directly-configured name (if there is one) or the name of the class (by default...
Attempts to get the name of the Builder.
[ "Attempts", "to", "get", "the", "name", "of", "the", "Builder", "." ]
def get_name(self, env): """Attempts to get the name of the Builder. Look at the BUILDERS variable of env, expecting it to be a dictionary containing this Builder, and return the key of the dictionary. If there's no key, then return a directly-configured name (if there is one) ...
[ "def", "get_name", "(", "self", ",", "env", ")", ":", "try", ":", "index", "=", "list", "(", "env", "[", "'BUILDERS'", "]", ".", "values", "(", ")", ")", ".", "index", "(", "self", ")", "return", "list", "(", "env", "[", "'BUILDERS'", "]", ".", ...
https://github.com/mongodb/mongo/blob/d8ff665343ad29cf286ee2cf4a1960d29371937b/src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Builder.py#L440-L455
pytorch/pytorch
7176c92687d3cc847cc046bf002269c6949a21c2
torch/nn/modules/module.py
python
Module.__init__
(self)
Initializes internal Module state, shared by both nn.Module and ScriptModule.
Initializes internal Module state, shared by both nn.Module and ScriptModule.
[ "Initializes", "internal", "Module", "state", "shared", "by", "both", "nn", ".", "Module", "and", "ScriptModule", "." ]
def __init__(self) -> None: """ Initializes internal Module state, shared by both nn.Module and ScriptModule. """ torch._C._log_api_usage_once("python.nn_module") self.training = True self._parameters: Dict[str, Optional[Parameter]] = OrderedDict() self._buffers:...
[ "def", "__init__", "(", "self", ")", "->", "None", ":", "torch", ".", "_C", ".", "_log_api_usage_once", "(", "\"python.nn_module\"", ")", "self", ".", "training", "=", "True", "self", ".", "_parameters", ":", "Dict", "[", "str", ",", "Optional", "[", "Pa...
https://github.com/pytorch/pytorch/blob/7176c92687d3cc847cc046bf002269c6949a21c2/torch/nn/modules/module.py#L255-L271
turi-code/SFrame
796b9bdfb2fa1b881d82080754643c7e68629cd2
oss_src/unity/python/sframe/toolkits/_model.py
python
_get_class_full_name
(obj)
return "%s.%s" % (obj.__module__ , cls_name)
Returns a full class name from the module name and the class name. Parameters ---------- cls : type | object Returns ------- A full name with all the imports.
Returns a full class name from the module name and the class name.
[ "Returns", "a", "full", "class", "name", "from", "the", "module", "name", "and", "the", "class", "name", "." ]
def _get_class_full_name(obj): """ Returns a full class name from the module name and the class name. Parameters ---------- cls : type | object Returns ------- A full name with all the imports. """ cls_name = obj.__name__ if type(obj) == type else obj.__class__.__name__ ret...
[ "def", "_get_class_full_name", "(", "obj", ")", ":", "cls_name", "=", "obj", ".", "__name__", "if", "type", "(", "obj", ")", "==", "type", "else", "obj", ".", "__class__", ".", "__name__", "return", "\"%s.%s\"", "%", "(", "obj", ".", "__module__", ",", ...
https://github.com/turi-code/SFrame/blob/796b9bdfb2fa1b881d82080754643c7e68629cd2/oss_src/unity/python/sframe/toolkits/_model.py#L174-L187
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/AWSPythonSDK/1.5.8/docutils/utils/math/math2html.py
python
LstParser.parsecontainer
(self, container)
Parse some lstparams from elyxer.a container.
Parse some lstparams from elyxer.a container.
[ "Parse", "some", "lstparams", "from", "elyxer", ".", "a", "container", "." ]
def parsecontainer(self, container): "Parse some lstparams from elyxer.a container." container.lstparams = LstParser.globalparams.copy() paramlist = container.getparameterlist('lstparams') container.lstparams.update(self.parselstparams(paramlist))
[ "def", "parsecontainer", "(", "self", ",", "container", ")", ":", "container", ".", "lstparams", "=", "LstParser", ".", "globalparams", ".", "copy", "(", ")", "paramlist", "=", "container", ".", "getparameterlist", "(", "'lstparams'", ")", "container", ".", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/AWSPythonSDK/1.5.8/docutils/utils/math/math2html.py#L5158-L5162
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/dataview.py
python
DataViewListCtrl.DeleteAllItems
(*args, **kwargs)
return _dataview.DataViewListCtrl_DeleteAllItems(*args, **kwargs)
DeleteAllItems(self)
DeleteAllItems(self)
[ "DeleteAllItems", "(", "self", ")" ]
def DeleteAllItems(*args, **kwargs): """DeleteAllItems(self)""" return _dataview.DataViewListCtrl_DeleteAllItems(*args, **kwargs)
[ "def", "DeleteAllItems", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_dataview", ".", "DataViewListCtrl_DeleteAllItems", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/dataview.py#L2172-L2174
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/lib-tk/Tkinter.py
python
Canvas.postscript
(self, cnf={}, **kw)
return self.tk.call((self._w, 'postscript') + self._options(cnf, kw))
Print the contents of the canvas to a postscript file. Valid options: colormap, colormode, file, fontmap, height, pageanchor, pageheight, pagewidth, pagex, pagey, rotate, witdh, x, y.
Print the contents of the canvas to a postscript file. Valid options: colormap, colormode, file, fontmap, height, pageanchor, pageheight, pagewidth, pagex, pagey, rotate, witdh, x, y.
[ "Print", "the", "contents", "of", "the", "canvas", "to", "a", "postscript", "file", ".", "Valid", "options", ":", "colormap", "colormode", "file", "fontmap", "height", "pageanchor", "pageheight", "pagewidth", "pagex", "pagey", "rotate", "witdh", "x", "y", "." ...
def postscript(self, cnf={}, **kw): """Print the contents of the canvas to a postscript file. Valid options: colormap, colormode, file, fontmap, height, pageanchor, pageheight, pagewidth, pagex, pagey, rotate, witdh, x, y.""" return self.tk.call((self._w, 'postscript') + ...
[ "def", "postscript", "(", "self", ",", "cnf", "=", "{", "}", ",", "*", "*", "kw", ")", ":", "return", "self", ".", "tk", ".", "call", "(", "(", "self", ".", "_w", ",", "'postscript'", ")", "+", "self", ".", "_options", "(", "cnf", ",", "kw", ...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/lib-tk/Tkinter.py#L2363-L2369
apache/arrow
af33dd1157eb8d7d9bfac25ebf61445b793b7943
cpp/build-support/cpplint.py
python
_FilterExcludedFiles
(filenames)
return [f for f in filenames if os.path.abspath(f) not in exclude_paths]
Filters out files listed in the --exclude command line switch. File paths in the switch are evaluated relative to the current working directory
Filters out files listed in the --exclude command line switch. File paths in the switch are evaluated relative to the current working directory
[ "Filters", "out", "files", "listed", "in", "the", "--", "exclude", "command", "line", "switch", ".", "File", "paths", "in", "the", "switch", "are", "evaluated", "relative", "to", "the", "current", "working", "directory" ]
def _FilterExcludedFiles(filenames): """Filters out files listed in the --exclude command line switch. File paths in the switch are evaluated relative to the current working directory """ exclude_paths = [os.path.abspath(f) for f in _excludes] return [f for f in filenames if os.path.abspath(f) not in exclude_...
[ "def", "_FilterExcludedFiles", "(", "filenames", ")", ":", "exclude_paths", "=", "[", "os", ".", "path", ".", "abspath", "(", "f", ")", "for", "f", "in", "_excludes", "]", "return", "[", "f", "for", "f", "in", "filenames", "if", "os", ".", "path", "....
https://github.com/apache/arrow/blob/af33dd1157eb8d7d9bfac25ebf61445b793b7943/cpp/build-support/cpplint.py#L6447-L6452
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/numpy/py2/numpy/lib/function_base.py
python
unwrap
(p, discont=pi, axis=-1)
return up
Unwrap by changing deltas between values to 2*pi complement. Unwrap radian phase `p` by changing absolute jumps greater than `discont` to their 2*pi complement along the given axis. Parameters ---------- p : array_like Input array. discont : float, optional Maximum discontinuit...
Unwrap by changing deltas between values to 2*pi complement.
[ "Unwrap", "by", "changing", "deltas", "between", "values", "to", "2", "*", "pi", "complement", "." ]
def unwrap(p, discont=pi, axis=-1): """ Unwrap by changing deltas between values to 2*pi complement. Unwrap radian phase `p` by changing absolute jumps greater than `discont` to their 2*pi complement along the given axis. Parameters ---------- p : array_like Input array. discon...
[ "def", "unwrap", "(", "p", ",", "discont", "=", "pi", ",", "axis", "=", "-", "1", ")", ":", "p", "=", "asarray", "(", "p", ")", "nd", "=", "p", ".", "ndim", "dd", "=", "diff", "(", "p", ",", "axis", "=", "axis", ")", "slice1", "=", "[", "...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/numpy/py2/numpy/lib/function_base.py#L1472-L1525
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/inspect.py
python
istraceback
(object)
return isinstance(object, types.TracebackType)
Return true if the object is a traceback. Traceback objects provide these attributes: tb_frame frame object at this level tb_lasti index of last attempted instruction in bytecode tb_lineno current line number in Python source code tb_next next inner trace...
Return true if the object is a traceback.
[ "Return", "true", "if", "the", "object", "is", "a", "traceback", "." ]
def istraceback(object): """Return true if the object is a traceback. Traceback objects provide these attributes: tb_frame frame object at this level tb_lasti index of last attempted instruction in bytecode tb_lineno current line number in Python source code ...
[ "def", "istraceback", "(", "object", ")", ":", "return", "isinstance", "(", "object", ",", "types", ".", "TracebackType", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/inspect.py#L228-L236
OPAE/opae-sdk
221124343c8275243a249eb72d69e0ea2d568d1b
python/opae.admin/opae/admin/tools/fpgareg.py
python
FPGAREG.accelerator_registers
(self)
return True
prints accelerator registers.
prints accelerator registers.
[ "prints", "accelerator", "registers", "." ]
def accelerator_registers(self): """ prints accelerator registers. """ print("****** Accelerator Register ******") str = self.pcie_addr[:-1] + "*" for path in sorted(glob.glob(os.path.join("/sys/bus/pci/devices/", str))): p...
[ "def", "accelerator_registers", "(", "self", ")", ":", "print", "(", "\"****** Accelerator Register ******\"", ")", "str", "=", "self", ".", "pcie_addr", "[", ":", "-", "1", "]", "+", "\"*\"", "for", "path", "in", "sorted", "(", "glob", ".", "glob", "(", ...
https://github.com/OPAE/opae-sdk/blob/221124343c8275243a249eb72d69e0ea2d568d1b/python/opae.admin/opae/admin/tools/fpgareg.py#L289-L316
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/distutils/command/check.py
python
check._check_rst_data
(self, data)
return reporter.messages
Returns warnings when the provided data doesn't compile.
Returns warnings when the provided data doesn't compile.
[ "Returns", "warnings", "when", "the", "provided", "data", "doesn", "t", "compile", "." ]
def _check_rst_data(self, data): """Returns warnings when the provided data doesn't compile.""" source_path = StringIO() parser = Parser() settings = frontend.OptionParser().get_default_values() settings.tab_width = 4 settings.pep_references = None settings.rfc_re...
[ "def", "_check_rst_data", "(", "self", ",", "data", ")", ":", "source_path", "=", "StringIO", "(", ")", "parser", "=", "Parser", "(", ")", "settings", "=", "frontend", ".", "OptionParser", "(", ")", ".", "get_default_values", "(", ")", "settings", ".", "...
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/distutils/command/check.py#L125-L149
wesnoth/wesnoth
6ccac5a5e8ff75303c9190c0da60580925cb32c0
data/tools/wesnoth/wmlparser.py
python
Parser.read_next
(self)
return c
Read the next character, taking care of \r and \t.
Read the next character, taking care of \r and \t.
[ "Read", "the", "next", "character", "taking", "care", "of", "\\", "r", "and", "\\", "t", "." ]
def read_next(self): """Read the next character, taking care of \r and \t.""" c = self.text[self.textpos] self.textpos += 1 if c == "\n": self.line += 1 if self.textpos == len(self.text): if len(self.texts) and not self.stay_in_file: self.pop_text() ...
[ "def", "read_next", "(", "self", ")", ":", "c", "=", "self", ".", "text", "[", "self", ".", "textpos", "]", "self", ".", "textpos", "+=", "1", "if", "c", "==", "\"\\n\"", ":", "self", ".", "line", "+=", "1", "if", "self", ".", "textpos", "==", ...
https://github.com/wesnoth/wesnoth/blob/6ccac5a5e8ff75303c9190c0da60580925cb32c0/data/tools/wesnoth/wmlparser.py#L194-L202
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/python/ops/linalg_ops.py
python
self_adjoint_eigvals
(tensor, name=None)
return e
Computes the eigenvalues of one or more self-adjoint matrices. Args: tensor: `Tensor` of shape `[..., N, N]`. name: string, optional name of the operation. Returns: e: Eigenvalues. Shape is `[..., N]`. The vector `e[..., :]` contains the `N` eigenvalues of `tensor[..., :, :]`.
Computes the eigenvalues of one or more self-adjoint matrices.
[ "Computes", "the", "eigenvalues", "of", "one", "or", "more", "self", "-", "adjoint", "matrices", "." ]
def self_adjoint_eigvals(tensor, name=None): """Computes the eigenvalues of one or more self-adjoint matrices. Args: tensor: `Tensor` of shape `[..., N, N]`. name: string, optional name of the operation. Returns: e: Eigenvalues. Shape is `[..., N]`. The vector `e[..., :]` contains the `N` eige...
[ "def", "self_adjoint_eigvals", "(", "tensor", ",", "name", "=", "None", ")", ":", "# pylint: disable=protected-access", "e", ",", "_", "=", "gen_linalg_ops", ".", "_self_adjoint_eig_v2", "(", "tensor", ",", "compute_v", "=", "False", ",", "name", "=", "name", ...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/python/ops/linalg_ops.py#L216-L229
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/idlelib/sidebar.py
python
BaseSideBar.redirect_focusin_event
(self, event)
return 'break'
Redirect focus-in events to the main editor text widget.
Redirect focus-in events to the main editor text widget.
[ "Redirect", "focus", "-", "in", "events", "to", "the", "main", "editor", "text", "widget", "." ]
def redirect_focusin_event(self, event): """Redirect focus-in events to the main editor text widget.""" self.text.focus_set() return 'break'
[ "def", "redirect_focusin_event", "(", "self", ",", "event", ")", ":", "self", ".", "text", ".", "focus_set", "(", ")", "return", "'break'" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/idlelib/sidebar.py#L103-L106
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/python/framework/tensor_shape.py
python
TensorShape.dims
(self)
return self._dims
Returns a list of Dimensions, or None if the shape is unspecified.
Returns a list of Dimensions, or None if the shape is unspecified.
[ "Returns", "a", "list", "of", "Dimensions", "or", "None", "if", "the", "shape", "is", "unspecified", "." ]
def dims(self): """Returns a list of Dimensions, or None if the shape is unspecified.""" return self._dims
[ "def", "dims", "(", "self", ")", ":", "return", "self", ".", "_dims" ]
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/python/framework/tensor_shape.py#L453-L455
apple/swift-lldb
d74be846ef3e62de946df343e8c234bde93a8912
scripts/Python/static-binding/lldb.py
python
SBSymbol.GetInstructions
(self, *args)
return _lldb.SBSymbol_GetInstructions(self, *args)
GetInstructions(SBSymbol self, SBTarget target) -> SBInstructionList GetInstructions(SBSymbol self, SBTarget target, char const * flavor_string) -> SBInstructionList
GetInstructions(SBSymbol self, SBTarget target) -> SBInstructionList GetInstructions(SBSymbol self, SBTarget target, char const * flavor_string) -> SBInstructionList
[ "GetInstructions", "(", "SBSymbol", "self", "SBTarget", "target", ")", "-", ">", "SBInstructionList", "GetInstructions", "(", "SBSymbol", "self", "SBTarget", "target", "char", "const", "*", "flavor_string", ")", "-", ">", "SBInstructionList" ]
def GetInstructions(self, *args): """ GetInstructions(SBSymbol self, SBTarget target) -> SBInstructionList GetInstructions(SBSymbol self, SBTarget target, char const * flavor_string) -> SBInstructionList """ return _lldb.SBSymbol_GetInstructions(self, *args)
[ "def", "GetInstructions", "(", "self", ",", "*", "args", ")", ":", "return", "_lldb", ".", "SBSymbol_GetInstructions", "(", "self", ",", "*", "args", ")" ]
https://github.com/apple/swift-lldb/blob/d74be846ef3e62de946df343e8c234bde93a8912/scripts/Python/static-binding/lldb.py#L9822-L9827
pmq20/node-packer
12c46c6e44fbc14d9ee645ebd17d5296b324f7e0
current/tools/gyp/pylib/gyp/xcode_emulation.py
python
XcodeSettings.GetInstallName
(self)
return install_name
Return LD_DYLIB_INSTALL_NAME for this target.
Return LD_DYLIB_INSTALL_NAME for this target.
[ "Return", "LD_DYLIB_INSTALL_NAME", "for", "this", "target", "." ]
def GetInstallName(self): """Return LD_DYLIB_INSTALL_NAME for this target.""" # Xcode sets this for shared_libraries, and for nonbundled loadable_modules. if (self.spec['type'] != 'shared_library' and (self.spec['type'] != 'loadable_module' or self._IsBundle())): return None default_insta...
[ "def", "GetInstallName", "(", "self", ")", ":", "# Xcode sets this for shared_libraries, and for nonbundled loadable_modules.", "if", "(", "self", ".", "spec", "[", "'type'", "]", "!=", "'shared_library'", "and", "(", "self", ".", "spec", "[", "'type'", "]", "!=", ...
https://github.com/pmq20/node-packer/blob/12c46c6e44fbc14d9ee645ebd17d5296b324f7e0/current/tools/gyp/pylib/gyp/xcode_emulation.py#L783-L819
blackberry/Boost
fc90c3fde129c62565c023f091eddc4a7ed9902b
tools/build/v2/build/feature.py
python
expand_composites
(properties)
return result
Expand all composite properties in the set so that all components are explicitly expressed.
Expand all composite properties in the set so that all components are explicitly expressed.
[ "Expand", "all", "composite", "properties", "in", "the", "set", "so", "that", "all", "components", "are", "explicitly", "expressed", "." ]
def expand_composites (properties): """ Expand all composite properties in the set so that all components are explicitly expressed. """ explicit_features = set(p.feature() for p in properties) result = [] # now expand composite features for p in properties: expanded = expand_co...
[ "def", "expand_composites", "(", "properties", ")", ":", "explicit_features", "=", "set", "(", "p", ".", "feature", "(", ")", "for", "p", "in", "properties", ")", "result", "=", "[", "]", "# now expand composite features", "for", "p", "in", "properties", ":"...
https://github.com/blackberry/Boost/blob/fc90c3fde129c62565c023f091eddc4a7ed9902b/tools/build/v2/build/feature.py#L578-L612
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numpy/lib/twodim_base.py
python
tri
(N, M=None, k=0, dtype=float)
return m
An array with ones at and below the given diagonal and zeros elsewhere. Parameters ---------- N : int Number of rows in the array. M : int, optional Number of columns in the array. By default, `M` is taken equal to `N`. k : int, optional The sub-diagonal at and below...
An array with ones at and below the given diagonal and zeros elsewhere.
[ "An", "array", "with", "ones", "at", "and", "below", "the", "given", "diagonal", "and", "zeros", "elsewhere", "." ]
def tri(N, M=None, k=0, dtype=float): """ An array with ones at and below the given diagonal and zeros elsewhere. Parameters ---------- N : int Number of rows in the array. M : int, optional Number of columns in the array. By default, `M` is taken equal to `N`. k : i...
[ "def", "tri", "(", "N", ",", "M", "=", "None", ",", "k", "=", "0", ",", "dtype", "=", "float", ")", ":", "if", "M", "is", "None", ":", "M", "=", "N", "m", "=", "greater_equal", ".", "outer", "(", "arange", "(", "N", ",", "dtype", "=", "_min...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numpy/lib/twodim_base.py#L349-L395
tum-vision/fusenet
a1451be2971b348a01b0f525c2a3a7a0e215a591
python/caffe/draw.py
python
draw_net_to_file
(caffe_net, filename, rankdir='LR')
Draws a caffe net, and saves it to file using the format given as the file extension. Use '.raw' to output raw text that you can manually feed to graphviz to draw graphs. Parameters ---------- caffe_net : a caffe.proto.caffe_pb2.NetParameter protocol buffer. filename : string The path t...
Draws a caffe net, and saves it to file using the format given as the file extension. Use '.raw' to output raw text that you can manually feed to graphviz to draw graphs.
[ "Draws", "a", "caffe", "net", "and", "saves", "it", "to", "file", "using", "the", "format", "given", "as", "the", "file", "extension", ".", "Use", ".", "raw", "to", "output", "raw", "text", "that", "you", "can", "manually", "feed", "to", "graphviz", "t...
def draw_net_to_file(caffe_net, filename, rankdir='LR'): """Draws a caffe net, and saves it to file using the format given as the file extension. Use '.raw' to output raw text that you can manually feed to graphviz to draw graphs. Parameters ---------- caffe_net : a caffe.proto.caffe_pb2.NetPar...
[ "def", "draw_net_to_file", "(", "caffe_net", ",", "filename", ",", "rankdir", "=", "'LR'", ")", ":", "ext", "=", "filename", "[", "filename", ".", "rfind", "(", "'.'", ")", "+", "1", ":", "]", "with", "open", "(", "filename", ",", "'wb'", ")", "as", ...
https://github.com/tum-vision/fusenet/blob/a1451be2971b348a01b0f525c2a3a7a0e215a591/python/caffe/draw.py#L207-L222
miyosuda/TensorFlowAndroidDemo
35903e0221aa5f109ea2dbef27f20b52e317f42d
jni-build/jni/include/tensorflow/contrib/lookup/lookup_ops.py
python
TextFileStringTableInitializer.__init__
(self, filename, key_column_index=TextFileIndex.LINE_NUMBER, value_column_index=TextFileIndex.WHOLE_LINE, vocab_size=None, delimiter="\t", name="text_file_string_table_init")
Constructs an initializer for an id-to-string table from a text file. It populates a table that its key and value types are int64 and string, respectively. It generates one key-value pair per line. The content of the key and value are specified by `key_column_index` and `value_column_index`. - Tex...
Constructs an initializer for an id-to-string table from a text file.
[ "Constructs", "an", "initializer", "for", "an", "id", "-", "to", "-", "string", "table", "from", "a", "text", "file", "." ]
def __init__(self, filename, key_column_index=TextFileIndex.LINE_NUMBER, value_column_index=TextFileIndex.WHOLE_LINE, vocab_size=None, delimiter="\t", name="text_file_string_table_init"): """Constructs an initializer for an id...
[ "def", "__init__", "(", "self", ",", "filename", ",", "key_column_index", "=", "TextFileIndex", ".", "LINE_NUMBER", ",", "value_column_index", "=", "TextFileIndex", ".", "WHOLE_LINE", ",", "vocab_size", "=", "None", ",", "delimiter", "=", "\"\\t\"", ",", "name",...
https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/contrib/lookup/lookup_ops.py#L480-L524
BSVino/DoubleAction
c550b168a3e919926c198c30240f506538b92e75
mp/src/thirdparty/protobuf-2.3.0/python/google/protobuf/internal/containers.py
python
RepeatedScalarFieldContainer.append
(self, value)
Appends an item to the list. Similar to list.append().
Appends an item to the list. Similar to list.append().
[ "Appends", "an", "item", "to", "the", "list", ".", "Similar", "to", "list", ".", "append", "()", "." ]
def append(self, value): """Appends an item to the list. Similar to list.append().""" self._type_checker.CheckValue(value) self._values.append(value) if not self._message_listener.dirty: self._message_listener.Modified()
[ "def", "append", "(", "self", ",", "value", ")", ":", "self", ".", "_type_checker", ".", "CheckValue", "(", "value", ")", "self", ".", "_values", ".", "append", "(", "value", ")", "if", "not", "self", ".", "_message_listener", ".", "dirty", ":", "self"...
https://github.com/BSVino/DoubleAction/blob/c550b168a3e919926c198c30240f506538b92e75/mp/src/thirdparty/protobuf-2.3.0/python/google/protobuf/internal/containers.py#L98-L103
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/python/ops/check_ops.py
python
assert_rank
(x, rank, data=None, summarize=None, message=None, name=None)
return assert_op
Assert `x` has rank equal to `rank`. Example of adding a dependency to an operation: ```python with tf.control_dependencies([tf.assert_rank(x, 2)]): output = tf.reduce_sum(x) ``` Args: x: Numeric `Tensor`. rank: Scalar integer `Tensor`. data: The tensors to print out if the condition is ...
Assert `x` has rank equal to `rank`.
[ "Assert", "x", "has", "rank", "equal", "to", "rank", "." ]
def assert_rank(x, rank, data=None, summarize=None, message=None, name=None): """Assert `x` has rank equal to `rank`. Example of adding a dependency to an operation: ```python with tf.control_dependencies([tf.assert_rank(x, 2)]): output = tf.reduce_sum(x) ``` Args: x: Numeric `Tensor`. rank:...
[ "def", "assert_rank", "(", "x", ",", "rank", ",", "data", "=", "None", ",", "summarize", "=", "None", ",", "message", "=", "None", ",", "name", "=", "None", ")", ":", "with", "ops", ".", "name_scope", "(", "name", ",", "'assert_rank'", ",", "(", "x...
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/python/ops/check_ops.py#L580-L633
shedskin/shedskin
ae88dbca7b1d9671cd8be448cb0b497122758936
shedskin/infer.py
python
ifa_determine_split
(node, allnodes)
return remaining
determine split along incoming dataflow edges
determine split along incoming dataflow edges
[ "determine", "split", "along", "incoming", "dataflow", "edges" ]
def ifa_determine_split(node, allnodes): ''' determine split along incoming dataflow edges ''' remaining = [incoming.csites.copy() for incoming in node.in_ if incoming in allnodes] # --- try to clean out larger collections, if subsets are in smaller ones for (i, seti) in enumerate(remaining): fo...
[ "def", "ifa_determine_split", "(", "node", ",", "allnodes", ")", ":", "remaining", "=", "[", "incoming", ".", "csites", ".", "copy", "(", ")", "for", "incoming", "in", "node", ".", "in_", "if", "incoming", "in", "allnodes", "]", "# --- try to clean out large...
https://github.com/shedskin/shedskin/blob/ae88dbca7b1d9671cd8be448cb0b497122758936/shedskin/infer.py#L970-L983
wy1iu/LargeMargin_Softmax_Loss
c3e9f20e4f16e2b4daf7d358a614366b9b39a6ec
python/caffe/io.py
python
array_to_datum
(arr, label=None)
return datum
Converts a 3-dimensional array to datum. If the array has dtype uint8, the output data will be encoded as a string. Otherwise, the output data will be stored in float format.
Converts a 3-dimensional array to datum. If the array has dtype uint8, the output data will be encoded as a string. Otherwise, the output data will be stored in float format.
[ "Converts", "a", "3", "-", "dimensional", "array", "to", "datum", ".", "If", "the", "array", "has", "dtype", "uint8", "the", "output", "data", "will", "be", "encoded", "as", "a", "string", ".", "Otherwise", "the", "output", "data", "will", "be", "stored"...
def array_to_datum(arr, label=None): """Converts a 3-dimensional array to datum. If the array has dtype uint8, the output data will be encoded as a string. Otherwise, the output data will be stored in float format. """ if arr.ndim != 3: raise ValueError('Incorrect array shape.') datum = ...
[ "def", "array_to_datum", "(", "arr", ",", "label", "=", "None", ")", ":", "if", "arr", ".", "ndim", "!=", "3", ":", "raise", "ValueError", "(", "'Incorrect array shape.'", ")", "datum", "=", "caffe_pb2", ".", "Datum", "(", ")", "datum", ".", "channels", ...
https://github.com/wy1iu/LargeMargin_Softmax_Loss/blob/c3e9f20e4f16e2b4daf7d358a614366b9b39a6ec/python/caffe/io.py#L66-L81
trilinos/Trilinos
6168be6dd51e35e1cd681e9c4b24433e709df140
packages/seacas/scripts/exomerge3.py
python
ExodusModel.get_all_node_set_names
(self)
return sorted(x[0] for x in list(self.node_sets.values()) if x[0])
Return a list of all node set names.
Return a list of all node set names.
[ "Return", "a", "list", "of", "all", "node", "set", "names", "." ]
def get_all_node_set_names(self): """Return a list of all node set names.""" return sorted(x[0] for x in list(self.node_sets.values()) if x[0])
[ "def", "get_all_node_set_names", "(", "self", ")", ":", "return", "sorted", "(", "x", "[", "0", "]", "for", "x", "in", "list", "(", "self", ".", "node_sets", ".", "values", "(", ")", ")", "if", "x", "[", "0", "]", ")" ]
https://github.com/trilinos/Trilinos/blob/6168be6dd51e35e1cd681e9c4b24433e709df140/packages/seacas/scripts/exomerge3.py#L4853-L4855
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/dispatcher.py
python
_DispatcherBase.inspect_asm
(self, signature=None)
return dict((sig, self.inspect_asm(sig)) for sig in self.signatures)
Get the generated assembly code. Parameters ---------- signature : tuple of numba types, optional Specify a signature for which to obtain the assembly code. If None, the assembly code is returned for all available signatures. Returns ------- asm ...
Get the generated assembly code.
[ "Get", "the", "generated", "assembly", "code", "." ]
def inspect_asm(self, signature=None): """Get the generated assembly code. Parameters ---------- signature : tuple of numba types, optional Specify a signature for which to obtain the assembly code. If None, the assembly code is returned for all available signatu...
[ "def", "inspect_asm", "(", "self", ",", "signature", "=", "None", ")", ":", "if", "signature", "is", "not", "None", ":", "lib", "=", "self", ".", "overloads", "[", "signature", "]", ".", "library", "return", "lib", ".", "get_asm_str", "(", ")", "return...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/dispatcher.py#L444-L464
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/nn_ops.py
python
softmax
(logits, axis=None, name=None, dim=None)
return _softmax(logits, gen_nn_ops.softmax, axis, name)
Computes softmax activations. This function performs the equivalent of softmax = tf.exp(logits) / tf.reduce_sum(tf.exp(logits), axis) Args: logits: A non-empty `Tensor`. Must be one of the following types: `half`, `float32`, `float64`. axis: The dimension softmax would be performed on. The de...
Computes softmax activations.
[ "Computes", "softmax", "activations", "." ]
def softmax(logits, axis=None, name=None, dim=None): """Computes softmax activations. This function performs the equivalent of softmax = tf.exp(logits) / tf.reduce_sum(tf.exp(logits), axis) Args: logits: A non-empty `Tensor`. Must be one of the following types: `half`, `float32`, `float64`. ...
[ "def", "softmax", "(", "logits", ",", "axis", "=", "None", ",", "name", "=", "None", ",", "dim", "=", "None", ")", ":", "axis", "=", "deprecation", ".", "deprecated_argument_lookup", "(", "\"axis\"", ",", "axis", ",", "\"dim\"", ",", "dim", ")", "if", ...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/nn_ops.py#L2933-L2958
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_windows.py
python
PyWindow._setCallbackInfo
(*args, **kwargs)
return _windows_.PyWindow__setCallbackInfo(*args, **kwargs)
_setCallbackInfo(self, PyObject self, PyObject _class)
_setCallbackInfo(self, PyObject self, PyObject _class)
[ "_setCallbackInfo", "(", "self", "PyObject", "self", "PyObject", "_class", ")" ]
def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" return _windows_.PyWindow__setCallbackInfo(*args, **kwargs)
[ "def", "_setCallbackInfo", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_windows_", ".", "PyWindow__setCallbackInfo", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_windows.py#L4137-L4139
turi-code/SFrame
796b9bdfb2fa1b881d82080754643c7e68629cd2
oss_src/unity/python/sframe/util/cloudpickle.py
python
CloudPickler.save_buffer
(self, obj)
Fallback to save_string
Fallback to save_string
[ "Fallback", "to", "save_string" ]
def save_buffer(self, obj): """Fallback to save_string""" Pickler.save_string(self,str(obj))
[ "def", "save_buffer", "(", "self", ",", "obj", ")", ":", "Pickler", ".", "save_string", "(", "self", ",", "str", "(", "obj", ")", ")" ]
https://github.com/turi-code/SFrame/blob/796b9bdfb2fa1b881d82080754643c7e68629cd2/oss_src/unity/python/sframe/util/cloudpickle.py#L117-L119
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/Path/PathScripts/PathCustomGui.py
python
TaskPanelOpPage.getSignalsForUpdate
(self, obj)
return signals
getSignalsForUpdate(obj) ... return list of signals for updating obj
getSignalsForUpdate(obj) ... return list of signals for updating obj
[ "getSignalsForUpdate", "(", "obj", ")", "...", "return", "list", "of", "signals", "for", "updating", "obj" ]
def getSignalsForUpdate(self, obj): """getSignalsForUpdate(obj) ... return list of signals for updating obj""" signals = [] signals.append(self.form.toolController.currentIndexChanged) signals.append(self.form.coolantController.currentIndexChanged) self.form.txtGCode.textChanged....
[ "def", "getSignalsForUpdate", "(", "self", ",", "obj", ")", ":", "signals", "=", "[", "]", "signals", ".", "append", "(", "self", ".", "form", ".", "toolController", ".", "currentIndexChanged", ")", "signals", ".", "append", "(", "self", ".", "form", "."...
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Path/PathScripts/PathCustomGui.py#L55-L61
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py
python
SplitBehavior
(behavior)
return [x for x in re.split('[ ()"-.,]', behavior) if len(x) > 0]
Splits the behavior to compose a message or i18n-content value. Examples: 'Activate last tab' => ['Activate', 'last', 'tab'] 'Close tab' => ['Close', 'tab']
Splits the behavior to compose a message or i18n-content value.
[ "Splits", "the", "behavior", "to", "compose", "a", "message", "or", "i18n", "-", "content", "value", "." ]
def SplitBehavior(behavior): """Splits the behavior to compose a message or i18n-content value. Examples: 'Activate last tab' => ['Activate', 'last', 'tab'] 'Close tab' => ['Close', 'tab'] """ return [x for x in re.split('[ ()"-.,]', behavior) if len(x) > 0]
[ "def", "SplitBehavior", "(", "behavior", ")", ":", "return", "[", "x", "for", "x", "in", "re", ".", "split", "(", "'[ ()\"-.,]'", ",", "behavior", ")", "if", "len", "(", "x", ")", ">", "0", "]" ]
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py#L204-L211
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
tools/symsrc/pefile.py
python
PE.__parse__
(self, fname, data, fast_load)
Parse a Portable Executable file. Loads a PE file, parsing all its structures and making them available through the instance's attributes.
Parse a Portable Executable file. Loads a PE file, parsing all its structures and making them available through the instance's attributes.
[ "Parse", "a", "Portable", "Executable", "file", ".", "Loads", "a", "PE", "file", "parsing", "all", "its", "structures", "and", "making", "them", "available", "through", "the", "instance", "s", "attributes", "." ]
def __parse__(self, fname, data, fast_load): """Parse a Portable Executable file. Loads a PE file, parsing all its structures and making them available through the instance's attributes. """ if fname: fd = file(fname, 'rb') self.__data__ ...
[ "def", "__parse__", "(", "self", ",", "fname", ",", "data", ",", "fast_load", ")", ":", "if", "fname", ":", "fd", "=", "file", "(", "fname", ",", "'rb'", ")", "self", ".", "__data__", "=", "fd", ".", "read", "(", ")", "fd", ".", "close", "(", "...
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/tools/symsrc/pefile.py#L1326-L1589
naver/sling
5671cd445a2caae0b4dd0332299e4cfede05062c
webkit/Tools/Scripts/webkitpy/port/base.py
python
Port._missing_feature_to_skipped_tests
(self)
return { "Accelerated Compositing": ["compositing"], "3D Rendering": ["animations/3d", "transforms/3d"], }
Return the supported feature dictionary. Keys are feature names and values are the lists of directories to skip if the feature name is not matched.
Return the supported feature dictionary. Keys are feature names and values are the lists of directories to skip if the feature name is not matched.
[ "Return", "the", "supported", "feature", "dictionary", ".", "Keys", "are", "feature", "names", "and", "values", "are", "the", "lists", "of", "directories", "to", "skip", "if", "the", "feature", "name", "is", "not", "matched", "." ]
def _missing_feature_to_skipped_tests(self): """Return the supported feature dictionary. Keys are feature names and values are the lists of directories to skip if the feature name is not matched.""" # FIXME: This list matches WebKitWin and should be moved onto the Win port. return { ...
[ "def", "_missing_feature_to_skipped_tests", "(", "self", ")", ":", "# FIXME: This list matches WebKitWin and should be moved onto the Win port.", "return", "{", "\"Accelerated Compositing\"", ":", "[", "\"compositing\"", "]", ",", "\"3D Rendering\"", ":", "[", "\"animations/3d\""...
https://github.com/naver/sling/blob/5671cd445a2caae0b4dd0332299e4cfede05062c/webkit/Tools/Scripts/webkitpy/port/base.py#L1403-L1410
hughperkins/tf-coriander
970d3df6c11400ad68405f22b0c42a52374e94ca
tensorflow/python/framework/ops.py
python
Graph._add_function
(self, function)
Adds a function to the graph. After the function has been added, you can call to the function by passing the function name in place of an op name to `Graph.create_op()`. Args: function: A `_DefinedFunction` object. Raises: ValueError: if another function is defined with the same name...
Adds a function to the graph.
[ "Adds", "a", "function", "to", "the", "graph", "." ]
def _add_function(self, function): """Adds a function to the graph. After the function has been added, you can call to the function by passing the function name in place of an op name to `Graph.create_op()`. Args: function: A `_DefinedFunction` object. Raises: ValueError: if anot...
[ "def", "_add_function", "(", "self", ",", "function", ")", ":", "name", "=", "function", ".", "name", "previous", "=", "self", ".", "_functions", ".", "get", "(", "name", ",", "None", ")", "if", "previous", ":", "raise", "ValueError", "(", "\"Another fun...
https://github.com/hughperkins/tf-coriander/blob/970d3df6c11400ad68405f22b0c42a52374e94ca/tensorflow/python/framework/ops.py#L2276-L2298
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/contrib/slim/python/slim/data/tfexample_decoder.py
python
Image._decode
(self, image_buffer, image_format)
return image
Decodes the image buffer. Args: image_buffer: T tensor representing the encoded image tensor. image_format: The image format for the image in `image_buffer`. Returns: A decoder image.
Decodes the image buffer.
[ "Decodes", "the", "image", "buffer", "." ]
def _decode(self, image_buffer, image_format): """Decodes the image buffer. Args: image_buffer: T tensor representing the encoded image tensor. image_format: The image format for the image in `image_buffer`. Returns: A decoder image. """ def decode_png(): return image_ops.d...
[ "def", "_decode", "(", "self", ",", "image_buffer", ",", "image_format", ")", ":", "def", "decode_png", "(", ")", ":", "return", "image_ops", ".", "decode_png", "(", "image_buffer", ",", "self", ".", "_channels", ")", "def", "decode_jpg", "(", ")", ":", ...
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/contrib/slim/python/slim/data/tfexample_decoder.py#L257-L278
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/saved_model/signature_serialization.py
python
_valid_signature
(concrete_function)
return True
Returns whether concrete function can be converted to a signature.
Returns whether concrete function can be converted to a signature.
[ "Returns", "whether", "concrete", "function", "can", "be", "converted", "to", "a", "signature", "." ]
def _valid_signature(concrete_function): """Returns whether concrete function can be converted to a signature.""" if not concrete_function.outputs: # Functions without outputs don't make sense as signatures. We just don't # have any way to run an Operation with no outputs as a SignatureDef in the # 1.x ...
[ "def", "_valid_signature", "(", "concrete_function", ")", ":", "if", "not", "concrete_function", ".", "outputs", ":", "# Functions without outputs don't make sense as signatures. We just don't", "# have any way to run an Operation with no outputs as a SignatureDef in the", "# 1.x style."...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/saved_model/signature_serialization.py#L49-L61
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/numpy/py3/numpy/ma/core.py
python
left_shift
(a, n)
Shift the bits of an integer to the left. This is the masked array version of `numpy.left_shift`, for details see that function. See Also -------- numpy.left_shift
Shift the bits of an integer to the left.
[ "Shift", "the", "bits", "of", "an", "integer", "to", "the", "left", "." ]
def left_shift(a, n): """ Shift the bits of an integer to the left. This is the masked array version of `numpy.left_shift`, for details see that function. See Also -------- numpy.left_shift """ m = getmask(a) if m is nomask: d = umath.left_shift(filled(a), n) r...
[ "def", "left_shift", "(", "a", ",", "n", ")", ":", "m", "=", "getmask", "(", "a", ")", "if", "m", "is", "nomask", ":", "d", "=", "umath", ".", "left_shift", "(", "filled", "(", "a", ")", ",", "n", ")", "return", "masked_array", "(", "d", ")", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/numpy/py3/numpy/ma/core.py#L7004-L7022
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/idlelib/runscript.py
python
ScriptBinding.getfilename
(self)
return filename
Get source filename. If not saved, offer to save (or create) file The debugger requires a source file. Make sure there is one, and that the current version of the source buffer has been saved. If the user declines to save or cancels the Save As dialog, return None. If the user has c...
Get source filename. If not saved, offer to save (or create) file
[ "Get", "source", "filename", ".", "If", "not", "saved", "offer", "to", "save", "(", "or", "create", ")", "file" ]
def getfilename(self): """Get source filename. If not saved, offer to save (or create) file The debugger requires a source file. Make sure there is one, and that the current version of the source buffer has been saved. If the user declines to save or cancels the Save As dialog, retur...
[ "def", "getfilename", "(", "self", ")", ":", "filename", "=", "self", ".", "editwin", ".", "io", ".", "filename", "if", "not", "self", ".", "editwin", ".", "get_saved", "(", ")", ":", "autosave", "=", "idleConf", ".", "GetOption", "(", "'main'", ",", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/idlelib/runscript.py#L182-L207
zju3dv/clean-pvnet
5870c509e3cc205e1bb28910a7b1a9a3c8add9a8
lib/utils/pysixd/misc.py
python
depth_im_to_dist_im
(depth_im, K)
return dist_im
Converts depth image to distance image. :param depth_im: Input depth image, where depth_im[y, x] is the Z coordinate of the 3D point [X, Y, Z] that projects to pixel [x, y], or 0 if there is no such 3D point (this is a typical output of the Kinect-like sensors). :param K: Camera matrix. :return: Di...
Converts depth image to distance image.
[ "Converts", "depth", "image", "to", "distance", "image", "." ]
def depth_im_to_dist_im(depth_im, K): """ Converts depth image to distance image. :param depth_im: Input depth image, where depth_im[y, x] is the Z coordinate of the 3D point [X, Y, Z] that projects to pixel [x, y], or 0 if there is no such 3D point (this is a typical output of the Kinect-like sens...
[ "def", "depth_im_to_dist_im", "(", "depth_im", ",", "K", ")", ":", "xs", "=", "np", ".", "tile", "(", "np", ".", "arange", "(", "depth_im", ".", "shape", "[", "1", "]", ")", ",", "[", "depth_im", ".", "shape", "[", "0", "]", ",", "1", "]", ")",...
https://github.com/zju3dv/clean-pvnet/blob/5870c509e3cc205e1bb28910a7b1a9a3c8add9a8/lib/utils/pysixd/misc.py#L43-L62
irods/irods
ed6328646cee87182098d569919004049bf4ce21
scripts/irods/pyparsing.py
python
ParserElement.setBreak
(self,breakFlag = True)
return self
Method to invoke the Python pdb debugger when this element is about to be parsed. Set C{breakFlag} to True to enable, False to disable.
Method to invoke the Python pdb debugger when this element is about to be parsed. Set C{breakFlag} to True to enable, False to disable.
[ "Method", "to", "invoke", "the", "Python", "pdb", "debugger", "when", "this", "element", "is", "about", "to", "be", "parsed", ".", "Set", "C", "{", "breakFlag", "}", "to", "True", "to", "enable", "False", "to", "disable", "." ]
def setBreak(self,breakFlag = True): """Method to invoke the Python pdb debugger when this element is about to be parsed. Set C{breakFlag} to True to enable, False to disable. """ if breakFlag: _parseMethod = self._parse def breaker(instring, loc, do...
[ "def", "setBreak", "(", "self", ",", "breakFlag", "=", "True", ")", ":", "if", "breakFlag", ":", "_parseMethod", "=", "self", ".", "_parse", "def", "breaker", "(", "instring", ",", "loc", ",", "doActions", "=", "True", ",", "callPreParse", "=", "True", ...
https://github.com/irods/irods/blob/ed6328646cee87182098d569919004049bf4ce21/scripts/irods/pyparsing.py#L882-L898
pytorch/pytorch
7176c92687d3cc847cc046bf002269c6949a21c2
torch/cuda/__init__.py
python
current_blas_handle
()
return torch._C._cuda_getCurrentBlasHandle()
r"""Returns cublasHandle_t pointer to current cuBLAS handle
r"""Returns cublasHandle_t pointer to current cuBLAS handle
[ "r", "Returns", "cublasHandle_t", "pointer", "to", "current", "cuBLAS", "handle" ]
def current_blas_handle(): r"""Returns cublasHandle_t pointer to current cuBLAS handle""" _lazy_init() return torch._C._cuda_getCurrentBlasHandle()
[ "def", "current_blas_handle", "(", ")", ":", "_lazy_init", "(", ")", "return", "torch", ".", "_C", ".", "_cuda_getCurrentBlasHandle", "(", ")" ]
https://github.com/pytorch/pytorch/blob/7176c92687d3cc847cc046bf002269c6949a21c2/torch/cuda/__init__.py#L539-L542
LiquidPlayer/LiquidCore
9405979363f2353ac9a71ad8ab59685dd7f919c9
deps/node-10.15.3/tools/cpplint.py
python
_CppLintState.SetVerboseLevel
(self, level)
return last_verbose_level
Sets the module's verbosity, and returns the previous setting.
Sets the module's verbosity, and returns the previous setting.
[ "Sets", "the", "module", "s", "verbosity", "and", "returns", "the", "previous", "setting", "." ]
def SetVerboseLevel(self, level): """Sets the module's verbosity, and returns the previous setting.""" last_verbose_level = self.verbose_level self.verbose_level = level return last_verbose_level
[ "def", "SetVerboseLevel", "(", "self", ",", "level", ")", ":", "last_verbose_level", "=", "self", ".", "verbose_level", "self", ".", "verbose_level", "=", "level", "return", "last_verbose_level" ]
https://github.com/LiquidPlayer/LiquidCore/blob/9405979363f2353ac9a71ad8ab59685dd7f919c9/deps/node-10.15.3/tools/cpplint.py#L1009-L1013
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/pip/_vendor/pyparsing.py
python
oneOf
(strs, caseless=False, useRegex=True, asKeyword=False)
return MatchFirst(parseElementClass(sym) for sym in symbols).setName(' | '.join(symbols))
Helper to quickly define a set of alternative Literals, and makes sure to do longest-first testing when there is a conflict, regardless of the input order, but returns a :class:`MatchFirst` for best performance. Parameters: - strs - a string of space-delimited literals, or a collection of ...
Helper to quickly define a set of alternative Literals, and makes sure to do longest-first testing when there is a conflict, regardless of the input order, but returns a :class:`MatchFirst` for best performance.
[ "Helper", "to", "quickly", "define", "a", "set", "of", "alternative", "Literals", "and", "makes", "sure", "to", "do", "longest", "-", "first", "testing", "when", "there", "is", "a", "conflict", "regardless", "of", "the", "input", "order", "but", "returns", ...
def oneOf(strs, caseless=False, useRegex=True, asKeyword=False): """Helper to quickly define a set of alternative Literals, and makes sure to do longest-first testing when there is a conflict, regardless of the input order, but returns a :class:`MatchFirst` for best performance. Parameters: -...
[ "def", "oneOf", "(", "strs", ",", "caseless", "=", "False", ",", "useRegex", "=", "True", ",", "asKeyword", "=", "False", ")", ":", "if", "isinstance", "(", "caseless", ",", "basestring", ")", ":", "warnings", ".", "warn", "(", "\"More than one string argu...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/pip/_vendor/pyparsing.py#L5462-L5547
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/ipython/py3/IPython/lib/display.py
python
FileLink.__repr__
(self)
return abspath(self.path)
return absolute path to file
return absolute path to file
[ "return", "absolute", "path", "to", "file" ]
def __repr__(self): """return absolute path to file """ return abspath(self.path)
[ "def", "__repr__", "(", "self", ")", ":", "return", "abspath", "(", "self", ".", "path", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/ipython/py3/IPython/lib/display.py#L420-L423
facebook/fbthrift
fb9c8562aba04c4fd9b17716eb5d970cc88a75bb
thrift/lib/py/async_common.py
python
FramedProtocol.data_received
(self, data)
Implements asyncio.Protocol.data_received.
Implements asyncio.Protocol.data_received.
[ "Implements", "asyncio", ".", "Protocol", ".", "data_received", "." ]
def data_received(self, data): """Implements asyncio.Protocol.data_received.""" self.recvd = self.recvd + data while len(self.recvd) >= 4: (length,) = struct.unpack("!I", self.recvd[:4]) if length > MAX_FRAME_SIZE: logger.error( "Frame ...
[ "def", "data_received", "(", "self", ",", "data", ")", ":", "self", ".", "recvd", "=", "self", ".", "recvd", "+", "data", "while", "len", "(", "self", ".", "recvd", ")", ">=", "4", ":", "(", "length", ",", ")", "=", "struct", ".", "unpack", "(", ...
https://github.com/facebook/fbthrift/blob/fb9c8562aba04c4fd9b17716eb5d970cc88a75bb/thrift/lib/py/async_common.py#L240-L262
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/_controls.py
python
TextAttr_RemoveStyle
(*args, **kwargs)
return _controls_.TextAttr_RemoveStyle(*args, **kwargs)
TextAttr_RemoveStyle(TextAttr destStyle, TextAttr style) -> bool
TextAttr_RemoveStyle(TextAttr destStyle, TextAttr style) -> bool
[ "TextAttr_RemoveStyle", "(", "TextAttr", "destStyle", "TextAttr", "style", ")", "-", ">", "bool" ]
def TextAttr_RemoveStyle(*args, **kwargs): """TextAttr_RemoveStyle(TextAttr destStyle, TextAttr style) -> bool""" return _controls_.TextAttr_RemoveStyle(*args, **kwargs)
[ "def", "TextAttr_RemoveStyle", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_controls_", ".", "TextAttr_RemoveStyle", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_controls.py#L1992-L1994
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/email/iterators.py
python
_structure
(msg, fp=None, level=0, include_default=False)
A handy debugging aid
A handy debugging aid
[ "A", "handy", "debugging", "aid" ]
def _structure(msg, fp=None, level=0, include_default=False): """A handy debugging aid""" if fp is None: fp = sys.stdout tab = ' ' * (level * 4) print >> fp, tab + msg.get_content_type(), if include_default: print >> fp, '[%s]' % msg.get_default_type() else: print >> fp ...
[ "def", "_structure", "(", "msg", ",", "fp", "=", "None", ",", "level", "=", "0", ",", "include_default", "=", "False", ")", ":", "if", "fp", "is", "None", ":", "fp", "=", "sys", ".", "stdout", "tab", "=", "' '", "*", "(", "level", "*", "4", ")"...
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/email/iterators.py#L61-L73
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/shutil.py
python
copymode
(src, dst)
Copy mode bits from src to dst
Copy mode bits from src to dst
[ "Copy", "mode", "bits", "from", "src", "to", "dst" ]
def copymode(src, dst): """Copy mode bits from src to dst""" if hasattr(os, 'chmod'): st = os.stat(src) mode = stat.S_IMODE(st.st_mode) os.chmod(dst, mode)
[ "def", "copymode", "(", "src", ",", "dst", ")", ":", "if", "hasattr", "(", "os", ",", "'chmod'", ")", ":", "st", "=", "os", ".", "stat", "(", "src", ")", "mode", "=", "stat", ".", "S_IMODE", "(", "st", ".", "st_mode", ")", "os", ".", "chmod", ...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/shutil.py#L86-L91
shogun-toolbox/shogun
9b8d856971af5a295dd6ad70623ae45647a6334c
examples/meta/generator/parse.py
python
FastParser.p_identifier
(self, p)
identifier : IDENTIFIER
identifier : IDENTIFIER
[ "identifier", ":", "IDENTIFIER" ]
def p_identifier(self, p): "identifier : IDENTIFIER" p[0] = {"Identifier": p[1]}
[ "def", "p_identifier", "(", "self", ",", "p", ")", ":", "p", "[", "0", "]", "=", "{", "\"Identifier\"", ":", "p", "[", "1", "]", "}" ]
https://github.com/shogun-toolbox/shogun/blob/9b8d856971af5a295dd6ad70623ae45647a6334c/examples/meta/generator/parse.py#L220-L222
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/_gdi.py
python
AutoBufferedPaintDC.__init__
(self, *args, **kwargs)
__init__(self, Window win) -> AutoBufferedPaintDC If the current platform double buffers by default then this DC is the same as a plain `wx.PaintDC`, otherwise it is a `wx.BufferedPaintDC`. :see: `wx.AutoBufferedPaintDCFactory`
__init__(self, Window win) -> AutoBufferedPaintDC
[ "__init__", "(", "self", "Window", "win", ")", "-", ">", "AutoBufferedPaintDC" ]
def __init__(self, *args, **kwargs): """ __init__(self, Window win) -> AutoBufferedPaintDC If the current platform double buffers by default then this DC is the same as a plain `wx.PaintDC`, otherwise it is a `wx.BufferedPaintDC`. :see: `wx.AutoBufferedPaintDCFactory` ...
[ "def", "__init__", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "_gdi_", ".", "AutoBufferedPaintDC_swiginit", "(", "self", ",", "_gdi_", ".", "new_AutoBufferedPaintDC", "(", "*", "args", ",", "*", "*", "kwargs", ")", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_gdi.py#L5315-L5325
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/gsutil/third_party/apitools/samples/storage_sample/storage/storage_v1.py
python
ObjectsUpdate.RunWithArgs
(self, bucket, object)
Updates an object's metadata. Args: bucket: Name of the bucket in which the object resides. object: Name of the object. Flags: generation: If present, selects a specific revision of this object (as opposed to the latest version, the default). ifGenerationMatch: Makes the operat...
Updates an object's metadata.
[ "Updates", "an", "object", "s", "metadata", "." ]
def RunWithArgs(self, bucket, object): """Updates an object's metadata. Args: bucket: Name of the bucket in which the object resides. object: Name of the object. Flags: generation: If present, selects a specific revision of this object (as opposed to the latest version, the defau...
[ "def", "RunWithArgs", "(", "self", ",", "bucket", ",", "object", ")", ":", "client", "=", "GetClientFromFlags", "(", ")", "global_params", "=", "GetGlobalParamsFromFlags", "(", ")", "request", "=", "messages", ".", "StorageObjectsUpdateRequest", "(", "bucket", "...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/gsutil/third_party/apitools/samples/storage_sample/storage/storage_v1.py#L2939-L2992
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/Draft/draftguitools/gui_snapper.py
python
Snapper.setSelectMode
(self, mode)
Set the snapper into select mode (hides snapping temporarily).
Set the snapper into select mode (hides snapping temporarily).
[ "Set", "the", "snapper", "into", "select", "mode", "(", "hides", "snapping", "temporarily", ")", "." ]
def setSelectMode(self, mode): """Set the snapper into select mode (hides snapping temporarily).""" self.selectMode = mode if not mode: self.setCursor() else: if self.trackLine: self.trackLine.off()
[ "def", "setSelectMode", "(", "self", ",", "mode", ")", ":", "self", ".", "selectMode", "=", "mode", "if", "not", "mode", ":", "self", ".", "setCursor", "(", ")", "else", ":", "if", "self", ".", "trackLine", ":", "self", ".", "trackLine", ".", "off", ...
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Draft/draftguitools/gui_snapper.py#L1242-L1249
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_controls.py
python
Slider.GetSelStart
(*args, **kwargs)
return _controls_.Slider_GetSelStart(*args, **kwargs)
GetSelStart(self) -> int
GetSelStart(self) -> int
[ "GetSelStart", "(", "self", ")", "-", ">", "int" ]
def GetSelStart(*args, **kwargs): """GetSelStart(self) -> int""" return _controls_.Slider_GetSelStart(*args, **kwargs)
[ "def", "GetSelStart", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_controls_", ".", "Slider_GetSelStart", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_controls.py#L2919-L2921
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py3/scipy/ndimage/morphology.py
python
binary_dilation
(input, structure=None, iterations=1, mask=None, output=None, border_value=0, origin=0, brute_force=False)
return _binary_erosion(input, structure, iterations, mask, output, border_value, origin, 1, brute_force)
Multi-dimensional binary dilation with the given structuring element. Parameters ---------- input : array_like Binary array_like to be dilated. Non-zero (True) elements form the subset to be dilated. structure : array_like, optional Structuring element used for the dilation. Non...
Multi-dimensional binary dilation with the given structuring element.
[ "Multi", "-", "dimensional", "binary", "dilation", "with", "the", "given", "structuring", "element", "." ]
def binary_dilation(input, structure=None, iterations=1, mask=None, output=None, border_value=0, origin=0, brute_force=False): """ Multi-dimensional binary dilation with the given structuring element. Parameters ---------- input : array_like Binary ar...
[ "def", "binary_dilation", "(", "input", ",", "structure", "=", "None", ",", "iterations", "=", "1", ",", "mask", "=", "None", ",", "output", "=", "None", ",", "border_value", "=", "0", ",", "origin", "=", "0", ",", "brute_force", "=", "False", ")", "...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py3/scipy/ndimage/morphology.py#L379-L507
apple/turicreate
cce55aa5311300e3ce6af93cb45ba791fd1bdf49
src/python/turicreate/util/_progress_table_printer.py
python
ProgressTablePrinter.__init__
(self, column_names, column_display_names)
column_names : list(str) Keyword args passed to update(..) column_display_names : list(str) Names with are displayed in the header of the table The ordering of column_names and column_display_names must match.
column_names : list(str) Keyword args passed to update(..)
[ "column_names", ":", "list", "(", "str", ")", "Keyword", "args", "passed", "to", "update", "(", "..", ")" ]
def __init__(self, column_names, column_display_names): """ column_names : list(str) Keyword args passed to update(..) column_display_names : list(str) Names with are displayed in the header of the table The ordering of column_names and column_display_names mu...
[ "def", "__init__", "(", "self", ",", "column_names", ",", "column_display_names", ")", ":", "assert", "len", "(", "column_names", ")", "==", "len", "(", "column_display_names", ")", "num_columns", "=", "len", "(", "column_names", ")", "self", ".", "column_name...
https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/src/python/turicreate/util/_progress_table_printer.py#L2-L26
aksnzhy/xlearn
e03f08ab22779ce13d9b08ac895ef5ba18fb16ef
python-package/xlearn/xlearn.py
python
XLearn.disableLockFree
(self)
Disable lock free training
Disable lock free training
[ "Disable", "lock", "free", "training" ]
def disableLockFree(self): """Disable lock free training""" key = 'lock_free' _check_call(_LIB.XLearnSetBool(ctypes.byref(self.handle), c_str(key), ctypes.c_bool(False)))
[ "def", "disableLockFree", "(", "self", ")", ":", "key", "=", "'lock_free'", "_check_call", "(", "_LIB", ".", "XLearnSetBool", "(", "ctypes", ".", "byref", "(", "self", ".", "handle", ")", ",", "c_str", "(", "key", ")", ",", "ctypes", ".", "c_bool", "("...
https://github.com/aksnzhy/xlearn/blob/e03f08ab22779ce13d9b08ac895ef5ba18fb16ef/python-package/xlearn/xlearn.py#L210-L214
9miao/CrossApp
1f5375e061bf69841eb19728598f5ae3f508d620
tools/tojs/genbindings.py
python
_check_ndk_root_env
()
return NDK_ROOT
Checking the environment NDK_ROOT, which will be used for building
Checking the environment NDK_ROOT, which will be used for building
[ "Checking", "the", "environment", "NDK_ROOT", "which", "will", "be", "used", "for", "building" ]
def _check_ndk_root_env(): ''' Checking the environment NDK_ROOT, which will be used for building ''' try: # NDK_ROOT = os.environ['NDK_ROOT'] NDK_ROOT = "/Users/mac/Documents/android-ndk-r9d" except Exception: print "NDK_ROOT not defined. Please define NDK_ROOT in your environm...
[ "def", "_check_ndk_root_env", "(", ")", ":", "try", ":", "# NDK_ROOT = os.environ['NDK_ROOT']", "NDK_ROOT", "=", "\"/Users/mac/Documents/android-ndk-r9d\"", "except", "Exception", ":", "print", "\"NDK_ROOT not defined. Please define NDK_ROOT in your environment.\"", "sys", ".", "...
https://github.com/9miao/CrossApp/blob/1f5375e061bf69841eb19728598f5ae3f508d620/tools/tojs/genbindings.py#L16-L27
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python/src/Lib/Cookie.py
python
BaseCookie.js_output
(self, attrs=None)
return _nulljoin(result)
Return a string suitable for JavaScript.
Return a string suitable for JavaScript.
[ "Return", "a", "string", "suitable", "for", "JavaScript", "." ]
def js_output(self, attrs=None): """Return a string suitable for JavaScript.""" result = [] items = self.items() items.sort() for K,V in items: result.append( V.js_output(attrs) ) return _nulljoin(result)
[ "def", "js_output", "(", "self", ",", "attrs", "=", "None", ")", ":", "result", "=", "[", "]", "items", "=", "self", ".", "items", "(", ")", "items", ".", "sort", "(", ")", "for", "K", ",", "V", "in", "items", ":", "result", ".", "append", "(",...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Lib/Cookie.py#L623-L630
Z3Prover/z3
d745d03afdfdf638d66093e2bfbacaf87187f35b
src/api/python/z3/z3.py
python
Fixedpoint.insert
(self, *args)
Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr.
Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr.
[ "Assert", "constraints", "as", "background", "axioms", "for", "the", "fixedpoint", "solver", ".", "Alias", "for", "assert_expr", "." ]
def insert(self, *args): """Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr.""" self.assert_exprs(*args)
[ "def", "insert", "(", "self", ",", "*", "args", ")", ":", "self", ".", "assert_exprs", "(", "*", "args", ")" ]
https://github.com/Z3Prover/z3/blob/d745d03afdfdf638d66093e2bfbacaf87187f35b/src/api/python/z3/z3.py#L7413-L7415
apple/swift-lldb
d74be846ef3e62de946df343e8c234bde93a8912
scripts/Python/static-binding/lldb.py
python
SBModule.get_symbols_access_object
(self)
return self.symbols_access (self)
An accessor function that returns a symbols_access() object which allows lazy symbol access from a lldb.SBModule object.
An accessor function that returns a symbols_access() object which allows lazy symbol access from a lldb.SBModule object.
[ "An", "accessor", "function", "that", "returns", "a", "symbols_access", "()", "object", "which", "allows", "lazy", "symbol", "access", "from", "a", "lldb", ".", "SBModule", "object", "." ]
def get_symbols_access_object(self): '''An accessor function that returns a symbols_access() object which allows lazy symbol access from a lldb.SBModule object.''' return self.symbols_access (self)
[ "def", "get_symbols_access_object", "(", "self", ")", ":", "return", "self", ".", "symbols_access", "(", "self", ")" ]
https://github.com/apple/swift-lldb/blob/d74be846ef3e62de946df343e8c234bde93a8912/scripts/Python/static-binding/lldb.py#L7557-L7559
google/or-tools
2cb85b4eead4c38e1c54b48044f92087cf165bce
examples/contrib/steel.py
python
SteelDecisionBuilder.NextVar
(self)
mindom size heuristic with tie break on the weights of orders
mindom size heuristic with tie break on the weights of orders
[ "mindom", "size", "heuristic", "with", "tie", "break", "on", "the", "weights", "of", "orders" ]
def NextVar(self): """ mindom size heuristic with tie break on the weights of orders """ res = [(self.__x[o].Size(), -self.__weights[o], self.__x[o]) for o in range(self.__nb_slabs) if self.__x[o].Size() > 1] if res: res.sort() return res[0][2], -res[0][1] # returns the or...
[ "def", "NextVar", "(", "self", ")", ":", "res", "=", "[", "(", "self", ".", "__x", "[", "o", "]", ".", "Size", "(", ")", ",", "-", "self", ".", "__weights", "[", "o", "]", ",", "self", ".", "__x", "[", "o", "]", ")", "for", "o", "in", "ra...
https://github.com/google/or-tools/blob/2cb85b4eead4c38e1c54b48044f92087cf165bce/examples/contrib/steel.py#L129-L138
toggl-open-source/toggldesktop
91865205885531cc8fd9e8d613dad49d625d56e7
third_party/cpplint/cpplint.py
python
NestingState.InNamespaceBody
(self)
return self.stack and isinstance(self.stack[-1], _NamespaceInfo)
Check if we are currently one level inside a namespace body. Returns: True if top of the stack is a namespace block, False otherwise.
Check if we are currently one level inside a namespace body.
[ "Check", "if", "we", "are", "currently", "one", "level", "inside", "a", "namespace", "body", "." ]
def InNamespaceBody(self): """Check if we are currently one level inside a namespace body. Returns: True if top of the stack is a namespace block, False otherwise. """ return self.stack and isinstance(self.stack[-1], _NamespaceInfo)
[ "def", "InNamespaceBody", "(", "self", ")", ":", "return", "self", ".", "stack", "and", "isinstance", "(", "self", ".", "stack", "[", "-", "1", "]", ",", "_NamespaceInfo", ")" ]
https://github.com/toggl-open-source/toggldesktop/blob/91865205885531cc8fd9e8d613dad49d625d56e7/third_party/cpplint/cpplint.py#L2234-L2240
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py3/pandas/core/indexes/base.py
python
Index.astype
(self, dtype, copy=True)
return Index(casted, name=self.name, dtype=dtype)
Create an Index with values cast to dtypes. The class of a new Index is determined by dtype. When conversion is impossible, a TypeError exception is raised. Parameters ---------- dtype : numpy dtype or pandas type Note that any signed integer `dtype` is treated as `...
Create an Index with values cast to dtypes.
[ "Create", "an", "Index", "with", "values", "cast", "to", "dtypes", "." ]
def astype(self, dtype, copy=True): """ Create an Index with values cast to dtypes. The class of a new Index is determined by dtype. When conversion is impossible, a TypeError exception is raised. Parameters ---------- dtype : numpy dtype or pandas type ...
[ "def", "astype", "(", "self", ",", "dtype", ",", "copy", "=", "True", ")", ":", "if", "dtype", "is", "not", "None", ":", "dtype", "=", "pandas_dtype", "(", "dtype", ")", "if", "is_dtype_equal", "(", "self", ".", "dtype", ",", "dtype", ")", ":", "re...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/core/indexes/base.py#L877-L918
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/telemetry/third_party/mox3/mox3/mox.py
python
_MockObjectFactory.__call__
(self, *params, **named_params)
Instantiate and record that a new mock has been created.
Instantiate and record that a new mock has been created.
[ "Instantiate", "and", "record", "that", "a", "new", "mock", "has", "been", "created", "." ]
def __call__(self, *params, **named_params): """Instantiate and record that a new mock has been created.""" method = getattr(self._class_to_mock, '__init__') mock_method = self._CreateMockMethod('__init__', method_to_mock=method) # Note: calling mock_method() is deferred in order to cat...
[ "def", "__call__", "(", "self", ",", "*", "params", ",", "*", "*", "named_params", ")", ":", "method", "=", "getattr", "(", "self", ".", "_class_to_mock", ",", "'__init__'", ")", "mock_method", "=", "self", ".", "_CreateMockMethod", "(", "'__init__'", ",",...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/telemetry/third_party/mox3/mox3/mox.py#L858-L879
google/skia
82d65d0487bd72f5f7332d002429ec2dc61d2463
infra/bots/assets/android_ndk_darwin/create.py
python
create_asset
(target_dir)
Create the asset.
Create the asset.
[ "Create", "the", "asset", "." ]
def create_asset(target_dir): """Create the asset.""" subprocess.check_call(["curl", NDK_URL, "-o", "ndk.zip"]) subprocess.check_call(["unzip", "ndk.zip", "-d", target_dir]) for f in glob.glob(os.path.join(target_dir, NDK_VER, "*")): shutil.move(f, target_dir) subprocess.check_call(["rm", "ndk.zip"])
[ "def", "create_asset", "(", "target_dir", ")", ":", "subprocess", ".", "check_call", "(", "[", "\"curl\"", ",", "NDK_URL", ",", "\"-o\"", ",", "\"ndk.zip\"", "]", ")", "subprocess", ".", "check_call", "(", "[", "\"unzip\"", ",", "\"ndk.zip\"", ",", "\"-d\"",...
https://github.com/google/skia/blob/82d65d0487bd72f5f7332d002429ec2dc61d2463/infra/bots/assets/android_ndk_darwin/create.py#L24-L30
genn-team/genn
75e1eb218cafa228bf36ae4613d1ce26e877b12c
pygenn/genn_groups.py
python
NeuronGroup.current_spikes
(self)
return self._get_current_events(True)
Current spikes from GeNN
Current spikes from GeNN
[ "Current", "spikes", "from", "GeNN" ]
def current_spikes(self): """Current spikes from GeNN""" return self._get_current_events(True)
[ "def", "current_spikes", "(", "self", ")", ":", "return", "self", ".", "_get_current_events", "(", "True", ")" ]
https://github.com/genn-team/genn/blob/75e1eb218cafa228bf36ae4613d1ce26e877b12c/pygenn/genn_groups.py#L355-L357
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py
python
SBData.CreateDataFromSInt32Array
(*args)
return _lldb.SBData_CreateDataFromSInt32Array(*args)
CreateDataFromSInt32Array(ByteOrder endian, uint32_t addr_byte_size, int32_t array) -> SBData
CreateDataFromSInt32Array(ByteOrder endian, uint32_t addr_byte_size, int32_t array) -> SBData
[ "CreateDataFromSInt32Array", "(", "ByteOrder", "endian", "uint32_t", "addr_byte_size", "int32_t", "array", ")", "-", ">", "SBData" ]
def CreateDataFromSInt32Array(*args): """CreateDataFromSInt32Array(ByteOrder endian, uint32_t addr_byte_size, int32_t array) -> SBData""" return _lldb.SBData_CreateDataFromSInt32Array(*args)
[ "def", "CreateDataFromSInt32Array", "(", "*", "args", ")", ":", "return", "_lldb", ".", "SBData_CreateDataFromSInt32Array", "(", "*", "args", ")" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py#L2784-L2786
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/propgrid.py
python
PropertyGrid.FixPosForTextCtrl
(*args, **kwargs)
return _propgrid.PropertyGrid_FixPosForTextCtrl(*args, **kwargs)
FixPosForTextCtrl(self, Window ctrl, int forColumn=1, Point offset=wxPoint(0, 0))
FixPosForTextCtrl(self, Window ctrl, int forColumn=1, Point offset=wxPoint(0, 0))
[ "FixPosForTextCtrl", "(", "self", "Window", "ctrl", "int", "forColumn", "=", "1", "Point", "offset", "=", "wxPoint", "(", "0", "0", "))" ]
def FixPosForTextCtrl(*args, **kwargs): """FixPosForTextCtrl(self, Window ctrl, int forColumn=1, Point offset=wxPoint(0, 0))""" return _propgrid.PropertyGrid_FixPosForTextCtrl(*args, **kwargs)
[ "def", "FixPosForTextCtrl", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_propgrid", ".", "PropertyGrid_FixPosForTextCtrl", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/propgrid.py#L2344-L2346
naver/sling
5671cd445a2caae0b4dd0332299e4cfede05062c
webkit/Tools/Scripts/webkitpy/xcode/simulator.py
python
Simulator._parse_devices
(self, lines)
Continue to parse devices from ``simctl list``. :param lines: A generator for the output lines from ``simctl list``. :type lines: genexpr :return: None
Continue to parse devices from ``simctl list``. :param lines: A generator for the output lines from ``simctl list``. :type lines: genexpr :return: None
[ "Continue", "to", "parse", "devices", "from", "simctl", "list", ".", ":", "param", "lines", ":", "A", "generator", "for", "the", "output", "lines", "from", "simctl", "list", ".", ":", "type", "lines", ":", "genexpr", ":", "return", ":", "None" ]
def _parse_devices(self, lines): """ Continue to parse devices from ``simctl list``. :param lines: A generator for the output lines from ``simctl list``. :type lines: genexpr :return: None """ current_runtime = None for line in lines: version_m...
[ "def", "_parse_devices", "(", "self", ",", "lines", ")", ":", "current_runtime", "=", "None", "for", "line", "in", "lines", ":", "version_match", "=", "self", ".", "version_re", ".", "match", "(", "line", ")", "if", "version_match", ":", "version", "=", ...
https://github.com/naver/sling/blob/5671cd445a2caae0b4dd0332299e4cfede05062c/webkit/Tools/Scripts/webkitpy/xcode/simulator.py#L363-L394
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib-tk/turtle.py
python
RawTurtle.end_poly
(self)
Stop recording the vertices of a polygon. No argument. Stop recording the vertices of a polygon. Current turtle position is last point of polygon. This will be connected with the first point. Example (for a Turtle instance named turtle): >>> turtle.end_poly()
Stop recording the vertices of a polygon.
[ "Stop", "recording", "the", "vertices", "of", "a", "polygon", "." ]
def end_poly(self): """Stop recording the vertices of a polygon. No argument. Stop recording the vertices of a polygon. Current turtle position is last point of polygon. This will be connected with the first point. Example (for a Turtle instance named turtle): >>> turt...
[ "def", "end_poly", "(", "self", ")", ":", "self", ".", "_creatingPoly", "=", "False" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib-tk/turtle.py#L3319-L3330
openmm/openmm
cb293447c4fc8b03976dfe11399f107bab70f3d9
wrappers/python/openmm/app/forcefield.py
python
_applyPatchesToMatchResidues
(forcefield, data, residues, templateForResidue, bondedToAtom, ignoreExternalBonds, ignoreExtraParticles)
return unmatchedResidues
Try to apply patches to find matches for residues.
Try to apply patches to find matches for residues.
[ "Try", "to", "apply", "patches", "to", "find", "matches", "for", "residues", "." ]
def _applyPatchesToMatchResidues(forcefield, data, residues, templateForResidue, bondedToAtom, ignoreExternalBonds, ignoreExtraParticles): """Try to apply patches to find matches for residues.""" # Start by creating all templates than can be created by applying a combination of one-residue patches # to a si...
[ "def", "_applyPatchesToMatchResidues", "(", "forcefield", ",", "data", ",", "residues", ",", "templateForResidue", ",", "bondedToAtom", ",", "ignoreExternalBonds", ",", "ignoreExtraParticles", ")", ":", "# Start by creating all templates than can be created by applying a combinat...
https://github.com/openmm/openmm/blob/cb293447c4fc8b03976dfe11399f107bab70f3d9/wrappers/python/openmm/app/forcefield.py#L1556-L1658
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_core.py
python
Window_GetCapture
(*args)
return _core_.Window_GetCapture(*args)
Window_GetCapture() -> Window Returns the window which currently captures the mouse or None
Window_GetCapture() -> Window
[ "Window_GetCapture", "()", "-", ">", "Window" ]
def Window_GetCapture(*args): """ Window_GetCapture() -> Window Returns the window which currently captures the mouse or None """ return _core_.Window_GetCapture(*args)
[ "def", "Window_GetCapture", "(", "*", "args", ")", ":", "return", "_core_", ".", "Window_GetCapture", "(", "*", "args", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_core.py#L11756-L11762
gnuradio/gnuradio
09c3c4fa4bfb1a02caac74cb5334dfe065391e3b
grc/converter/block.py
python
from_xml
(filename)
return data
Load block description from xml file
Load block description from xml file
[ "Load", "block", "description", "from", "xml", "file" ]
def from_xml(filename): """Load block description from xml file""" element, version_info = xml.load(filename, 'block.dtd') try: data = convert_block_xml(element) except NameError: raise ValueError('Conversion failed', filename) return data
[ "def", "from_xml", "(", "filename", ")", ":", "element", ",", "version_info", "=", "xml", ".", "load", "(", "filename", ",", "'block.dtd'", ")", "try", ":", "data", "=", "convert_block_xml", "(", "element", ")", "except", "NameError", ":", "raise", "ValueE...
https://github.com/gnuradio/gnuradio/blob/09c3c4fa4bfb1a02caac74cb5334dfe065391e3b/grc/converter/block.py#L26-L35
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
third_party/python_gflags/gflags.py
python
FlagValues.__contains__
(self, name)
return name in self.FlagDict()
Returns True if name is a value (flag) in the dict.
Returns True if name is a value (flag) in the dict.
[ "Returns", "True", "if", "name", "is", "a", "value", "(", "flag", ")", "in", "the", "dict", "." ]
def __contains__(self, name): """Returns True if name is a value (flag) in the dict.""" return name in self.FlagDict()
[ "def", "__contains__", "(", "self", ",", "name", ")", ":", "return", "name", "in", "self", ".", "FlagDict", "(", ")" ]
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/third_party/python_gflags/gflags.py#L1180-L1182
vesoft-inc/nebula
25a06217ebaf169e1f0e5ff6a797ba6f0c41fc35
.linters/cpp/cpplint.py
python
FileInfo.IsSource
(self)
return _IsSourceExtension(self.Extension()[1:])
File has a source file extension.
File has a source file extension.
[ "File", "has", "a", "source", "file", "extension", "." ]
def IsSource(self): """File has a source file extension.""" return _IsSourceExtension(self.Extension()[1:])
[ "def", "IsSource", "(", "self", ")", ":", "return", "_IsSourceExtension", "(", "self", ".", "Extension", "(", ")", "[", "1", ":", "]", ")" ]
https://github.com/vesoft-inc/nebula/blob/25a06217ebaf169e1f0e5ff6a797ba6f0c41fc35/.linters/cpp/cpplint.py#L1405-L1407
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib-tk/turtle.py
python
RawTurtle.reset
(self)
Delete the turtle's drawings and restore its default values. No argument. , Delete the turtle's drawings from the screen, re-center the turtle and set variables to the default values. Example (for a Turtle instance named turtle): >>> turtle.position() (0.00,-22.00) ...
Delete the turtle's drawings and restore its default values.
[ "Delete", "the", "turtle", "s", "drawings", "and", "restore", "its", "default", "values", "." ]
def reset(self): """Delete the turtle's drawings and restore its default values. No argument. , Delete the turtle's drawings from the screen, re-center the turtle and set variables to the default values. Example (for a Turtle instance named turtle): >>> turtle.position(...
[ "def", "reset", "(", "self", ")", ":", "TNavigator", ".", "reset", "(", "self", ")", "TPen", ".", "_reset", "(", "self", ")", "self", ".", "_clear", "(", ")", "self", ".", "_drawturtle", "(", ")", "self", ".", "_update", "(", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib-tk/turtle.py#L2463-L2486
mongodb/mongo
d8ff665343ad29cf286ee2cf4a1960d29371937b
buildscripts/resmokelib/generate_fcv_constants/__init__.py
python
GenerateFCVConstants.__init__
(self)
Constructor.
Constructor.
[ "Constructor", "." ]
def __init__(self): """Constructor."""
[ "def", "__init__", "(", "self", ")", ":" ]
https://github.com/mongodb/mongo/blob/d8ff665343ad29cf286ee2cf4a1960d29371937b/buildscripts/resmokelib/generate_fcv_constants/__init__.py#L12-L13
llvm-mirror/lldb
d01083a850f577b85501a0902b52fd0930de72c7
examples/python/gdbremote.py
python
TerminalColors.underline
(self, on=True)
return ''
Enable or disable underline depending on the "on" parameter.
Enable or disable underline depending on the "on" parameter.
[ "Enable", "or", "disable", "underline", "depending", "on", "the", "on", "parameter", "." ]
def underline(self, on=True): '''Enable or disable underline depending on the "on" parameter.''' if self.enabled: if on: return "\x1b[4m" else: return "\x1b[24m" return ''
[ "def", "underline", "(", "self", ",", "on", "=", "True", ")", ":", "if", "self", ".", "enabled", ":", "if", "on", ":", "return", "\"\\x1b[4m\"", "else", ":", "return", "\"\\x1b[24m\"", "return", "''" ]
https://github.com/llvm-mirror/lldb/blob/d01083a850f577b85501a0902b52fd0930de72c7/examples/python/gdbremote.py#L73-L80
twhui/LiteFlowNet
00925aebf2db9ac50f4b1666f718688b10dd10d1
python/caffe/draw.py
python
get_edge_label
(layer)
return edge_label
Define edge label based on layer type.
Define edge label based on layer type.
[ "Define", "edge", "label", "based", "on", "layer", "type", "." ]
def get_edge_label(layer): """Define edge label based on layer type. """ if layer.type == 'Data': edge_label = 'Batch ' + str(layer.data_param.batch_size) elif layer.type == 'Convolution' or layer.type == 'Deconvolution': edge_label = str(layer.convolution_param.num_output) elif lay...
[ "def", "get_edge_label", "(", "layer", ")", ":", "if", "layer", ".", "type", "==", "'Data'", ":", "edge_label", "=", "'Batch '", "+", "str", "(", "layer", ".", "data_param", ".", "batch_size", ")", "elif", "layer", ".", "type", "==", "'Convolution'", "or...
https://github.com/twhui/LiteFlowNet/blob/00925aebf2db9ac50f4b1666f718688b10dd10d1/python/caffe/draw.py#L46-L59
facebookincubator/BOLT
88c70afe9d388ad430cc150cc158641701397f70
lldb/examples/customization/bin-utils/binutils.py
python
twos_complement
(n, width)
Return a list of (0|1)'s for the binary representation of a width-bit two's complement numeral system of an integer n which may be negative.
Return a list of (0|1)'s for the binary representation of a width-bit two's complement numeral system of an integer n which may be negative.
[ "Return", "a", "list", "of", "(", "0|1", ")", "s", "for", "the", "binary", "representation", "of", "a", "width", "-", "bit", "two", "s", "complement", "numeral", "system", "of", "an", "integer", "n", "which", "may", "be", "negative", "." ]
def twos_complement(n, width): """ Return a list of (0|1)'s for the binary representation of a width-bit two's complement numeral system of an integer n which may be negative. """ val = 2**(width - 1) if n >= 0: if n > (val - 1): return None # It is safe to represent ...
[ "def", "twos_complement", "(", "n", ",", "width", ")", ":", "val", "=", "2", "**", "(", "width", "-", "1", ")", "if", "n", ">=", "0", ":", "if", "n", ">", "(", "val", "-", "1", ")", ":", "return", "None", "# It is safe to represent n with width-bits....
https://github.com/facebookincubator/BOLT/blob/88c70afe9d388ad430cc150cc158641701397f70/lldb/examples/customization/bin-utils/binutils.py#L26-L42
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/dataview.py
python
DataViewTreeStore.SetItemIcon
(*args, **kwargs)
return _dataview.DataViewTreeStore_SetItemIcon(*args, **kwargs)
SetItemIcon(self, DataViewItem item, Icon icon)
SetItemIcon(self, DataViewItem item, Icon icon)
[ "SetItemIcon", "(", "self", "DataViewItem", "item", "Icon", "icon", ")" ]
def SetItemIcon(*args, **kwargs): """SetItemIcon(self, DataViewItem item, Icon icon)""" return _dataview.DataViewTreeStore_SetItemIcon(*args, **kwargs)
[ "def", "SetItemIcon", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_dataview", ".", "DataViewTreeStore_SetItemIcon", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/dataview.py#L2419-L2421
anestisb/oatdump_plus
ba858c1596598f0d9ae79c14d08c708cecc50af3
tools/cpplint.py
python
FindEndOfExpressionInLine
(line, startpos, depth, startchar, endchar)
return -1
Find the position just after the matching endchar. Args: line: a CleansedLines line. startpos: start searching at this position. depth: nesting level at startpos. startchar: expression opening character. endchar: expression closing character. Returns: Index just after endchar.
Find the position just after the matching endchar.
[ "Find", "the", "position", "just", "after", "the", "matching", "endchar", "." ]
def FindEndOfExpressionInLine(line, startpos, depth, startchar, endchar): """Find the position just after the matching endchar. Args: line: a CleansedLines line. startpos: start searching at this position. depth: nesting level at startpos. startchar: expression opening character. endchar: expre...
[ "def", "FindEndOfExpressionInLine", "(", "line", ",", "startpos", ",", "depth", ",", "startchar", ",", "endchar", ")", ":", "for", "i", "in", "xrange", "(", "startpos", ",", "len", "(", "line", ")", ")", ":", "if", "line", "[", "i", "]", "==", "start...
https://github.com/anestisb/oatdump_plus/blob/ba858c1596598f0d9ae79c14d08c708cecc50af3/tools/cpplint.py#L1064-L1084
Tencent/CMONGO
c40380caa14e05509f46993aa8b8da966b09b0b5
src/third_party/scons-2.5.0/scons-local-2.5.0/SCons/Environment.py
python
Base.Clone
(self, tools=[], toolpath=None, parse_flags = None, **kw)
return clone
Return a copy of a construction Environment. The copy is like a Python "deep copy"--that is, independent copies are made recursively of each objects--except that a reference is copied when an object is not deep-copyable (like a function). There are no references to any mutable ...
Return a copy of a construction Environment. The copy is like a Python "deep copy"--that is, independent copies are made recursively of each objects--except that a reference is copied when an object is not deep-copyable (like a function). There are no references to any mutable ...
[ "Return", "a", "copy", "of", "a", "construction", "Environment", ".", "The", "copy", "is", "like", "a", "Python", "deep", "copy", "--", "that", "is", "independent", "copies", "are", "made", "recursively", "of", "each", "objects", "--", "except", "that", "a...
def Clone(self, tools=[], toolpath=None, parse_flags = None, **kw): """Return a copy of a construction Environment. The copy is like a Python "deep copy"--that is, independent copies are made recursively of each objects--except that a reference is copied when an object is not deep-copya...
[ "def", "Clone", "(", "self", ",", "tools", "=", "[", "]", ",", "toolpath", "=", "None", ",", "parse_flags", "=", "None", ",", "*", "*", "kw", ")", ":", "builders", "=", "self", ".", "_dict", ".", "get", "(", "'BUILDERS'", ",", "{", "}", ")", "c...
https://github.com/Tencent/CMONGO/blob/c40380caa14e05509f46993aa8b8da966b09b0b5/src/third_party/scons-2.5.0/scons-local-2.5.0/SCons/Environment.py#L1377-L1421
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_gdi.py
python
Bitmap.__ne__
(*args, **kwargs)
return _gdi_.Bitmap___ne__(*args, **kwargs)
__ne__(self, Bitmap other) -> bool
__ne__(self, Bitmap other) -> bool
[ "__ne__", "(", "self", "Bitmap", "other", ")", "-", ">", "bool" ]
def __ne__(*args, **kwargs): """__ne__(self, Bitmap other) -> bool""" return _gdi_.Bitmap___ne__(*args, **kwargs)
[ "def", "__ne__", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_gdi_", ".", "Bitmap___ne__", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_gdi.py#L838-L840
gv22ga/dlib-face-recognition-android
42d6305cbd85833f2b85bb79b70ab9ab004153c9
tools/lint/cpplint.py
python
_CppLintState.SetCountingStyle
(self, counting_style)
Sets the module's counting options.
Sets the module's counting options.
[ "Sets", "the", "module", "s", "counting", "options", "." ]
def SetCountingStyle(self, counting_style): """Sets the module's counting options.""" self.counting = counting_style
[ "def", "SetCountingStyle", "(", "self", ",", "counting_style", ")", ":", "self", ".", "counting", "=", "counting_style" ]
https://github.com/gv22ga/dlib-face-recognition-android/blob/42d6305cbd85833f2b85bb79b70ab9ab004153c9/tools/lint/cpplint.py#L823-L825
plumonito/dtslam
5994bb9cf7a11981b830370db206bceb654c085d
3rdparty/opencv-git/3rdparty/jinja2/ext.py
python
Extension.filter_stream
(self, stream)
return stream
It's passed a :class:`~jinja2.lexer.TokenStream` that can be used to filter tokens returned. This method has to return an iterable of :class:`~jinja2.lexer.Token`\s, but it doesn't have to return a :class:`~jinja2.lexer.TokenStream`. In the `ext` folder of the Jinja2 source distributio...
It's passed a :class:`~jinja2.lexer.TokenStream` that can be used to filter tokens returned. This method has to return an iterable of :class:`~jinja2.lexer.Token`\s, but it doesn't have to return a :class:`~jinja2.lexer.TokenStream`.
[ "It", "s", "passed", "a", ":", "class", ":", "~jinja2", ".", "lexer", ".", "TokenStream", "that", "can", "be", "used", "to", "filter", "tokens", "returned", ".", "This", "method", "has", "to", "return", "an", "iterable", "of", ":", "class", ":", "~jinj...
def filter_stream(self, stream): """It's passed a :class:`~jinja2.lexer.TokenStream` that can be used to filter tokens returned. This method has to return an iterable of :class:`~jinja2.lexer.Token`\s, but it doesn't have to return a :class:`~jinja2.lexer.TokenStream`. In the `...
[ "def", "filter_stream", "(", "self", ",", "stream", ")", ":", "return", "stream" ]
https://github.com/plumonito/dtslam/blob/5994bb9cf7a11981b830370db206bceb654c085d/3rdparty/opencv-git/3rdparty/jinja2/ext.py#L87-L97
naver/sling
5671cd445a2caae0b4dd0332299e4cfede05062c
webkit/Tools/Scripts/webkitpy/thirdparty/irc/irclib.py
python
ServerConnection.connect
(self, server, port, nickname, password=None, username=None, ircname=None, localaddress="", localport=0, ssl=False, ipv6=False)
return self
Connect/reconnect to a server. Arguments: server -- Server name. port -- Port number. nickname -- The nickname. password -- Password (if any). username -- The username. ircname -- The IRC name ("realname"). localaddress ...
Connect/reconnect to a server.
[ "Connect", "/", "reconnect", "to", "a", "server", "." ]
def connect(self, server, port, nickname, password=None, username=None, ircname=None, localaddress="", localport=0, ssl=False, ipv6=False): """Connect/reconnect to a server. Arguments: server -- Server name. port -- Port number. nickname -- The nic...
[ "def", "connect", "(", "self", ",", "server", ",", "port", ",", "nickname", ",", "password", "=", "None", ",", "username", "=", "None", ",", "ircname", "=", "None", ",", "localaddress", "=", "\"\"", ",", "localport", "=", "0", ",", "ssl", "=", "False...
https://github.com/naver/sling/blob/5671cd445a2caae0b4dd0332299e4cfede05062c/webkit/Tools/Scripts/webkitpy/thirdparty/irc/irclib.py#L381-L449
Ewenwan/MVision
97b394dfa48cb21c82cd003b1a952745e413a17f
deepLearning/02_mlp.py
python
MLP.__init__
(self, inpt, n_in, n_hidden, n_out)
inpt: tf.Tensor, shape [n_examples, n_in] n_in: int, the dimensionality of input n_hidden: int, number of hidden units n_out: int, number of output units
inpt: tf.Tensor, shape [n_examples, n_in] n_in: int, the dimensionality of input n_hidden: int, number of hidden units n_out: int, number of output units
[ "inpt", ":", "tf", ".", "Tensor", "shape", "[", "n_examples", "n_in", "]", "n_in", ":", "int", "the", "dimensionality", "of", "input", "n_hidden", ":", "int", "number", "of", "hidden", "units", "n_out", ":", "int", "number", "of", "output", "units" ]
def __init__(self, inpt, n_in, n_hidden, n_out): """ inpt: tf.Tensor, shape [n_examples, n_in] n_in: int, the dimensionality of input n_hidden: int, number of hidden units n_out: int, number of output units """ # hidden layer self.hiddenLayer = HiddenLayer...
[ "def", "__init__", "(", "self", ",", "inpt", ",", "n_in", ",", "n_hidden", ",", "n_out", ")", ":", "# hidden layer", "self", ".", "hiddenLayer", "=", "HiddenLayer", "(", "inpt", ",", "n_in", "=", "n_in", ",", "n_out", "=", "n_hidden", ")", "# output laye...
https://github.com/Ewenwan/MVision/blob/97b394dfa48cb21c82cd003b1a952745e413a17f/deepLearning/02_mlp.py#L41-L67
nyuwireless-unipd/ns3-mmwave
4ff9e87e8079764e04cbeccd8e85bff15ae16fb3
src/visualizer/visualizer/core.py
python
SimulationThread.run
(self)
! Initializer function. @param self: class object. @return none
! Initializer function.
[ "!", "Initializer", "function", "." ]
def run(self): """! Initializer function. @param self: class object. @return none """ while not self.quit: #print "sim: Wait for go" self.go.wait() # wait until the main (view) thread gives us the go signal self.go.clear() ...
[ "def", "run", "(", "self", ")", ":", "while", "not", "self", ".", "quit", ":", "#print \"sim: Wait for go\"", "self", ".", "go", ".", "wait", "(", ")", "# wait until the main (view) thread gives us the go signal", "self", ".", "go", ".", "clear", "(", ")", "if...
https://github.com/nyuwireless-unipd/ns3-mmwave/blob/4ff9e87e8079764e04cbeccd8e85bff15ae16fb3/src/visualizer/visualizer/core.py#L651-L681
bulletphysics/bullet3
f0f2a952e146f016096db6f85cf0c44ed75b0b9a
examples/pybullet/gym/pybullet_envs/minitaur/envs_v2/sensors/sensor.py
python
BoxSpaceSensor.get_observation_datatype
(self)
return [(self._name, self._dtype, self._shape)]
Returns box-shape data type.
Returns box-shape data type.
[ "Returns", "box", "-", "shape", "data", "type", "." ]
def get_observation_datatype(self) -> _DataTypeList: """Returns box-shape data type.""" return [(self._name, self._dtype, self._shape)]
[ "def", "get_observation_datatype", "(", "self", ")", "->", "_DataTypeList", ":", "return", "[", "(", "self", ".", "_name", ",", "self", ".", "_dtype", ",", "self", ".", "_shape", ")", "]" ]
https://github.com/bulletphysics/bullet3/blob/f0f2a952e146f016096db6f85cf0c44ed75b0b9a/examples/pybullet/gym/pybullet_envs/minitaur/envs_v2/sensors/sensor.py#L422-L424
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/python/ops/tensor_array_ops.py
python
TensorArray.write
(self, index, value, name=None)
Write `value` into index `index` of the TensorArray. Args: index: 0-D. int32 scalar with the index to write to. value: N-D. Tensor of type `dtype`. The Tensor to write to this index. name: A name for the operation (optional). Returns: A new TensorArray object with flow that ensures ...
Write `value` into index `index` of the TensorArray.
[ "Write", "value", "into", "index", "index", "of", "the", "TensorArray", "." ]
def write(self, index, value, name=None): """Write `value` into index `index` of the TensorArray. Args: index: 0-D. int32 scalar with the index to write to. value: N-D. Tensor of type `dtype`. The Tensor to write to this index. name: A name for the operation (optional). Returns: ...
[ "def", "write", "(", "self", ",", "index", ",", "value", ",", "name", "=", "None", ")", ":", "with", "ops", ".", "name_scope", "(", "name", ",", "\"TensorArrayWrite\"", ",", "[", "self", ".", "_handle", ",", "index", ",", "value", "]", ")", ":", "v...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/python/ops/tensor_array_ops.py#L286-L318
SFTtech/openage
d6a08c53c48dc1e157807471df92197f6ca9e04d
openage/util/fslike/directory.py
python
CaseIgnoringDirectory.actual_name
(self, stem, name)
If the (lower-case) path that's given in stem exists, fetches the actual name for the given lower-case name.
If the (lower-case) path that's given in stem exists, fetches the actual name for the given lower-case name.
[ "If", "the", "(", "lower", "-", "case", ")", "path", "that", "s", "given", "in", "stem", "exists", "fetches", "the", "actual", "name", "for", "the", "given", "lower", "-", "case", "name", "." ]
def actual_name(self, stem, name): """ If the (lower-case) path that's given in stem exists, fetches the actual name for the given lower-case name. """ try: listing = self.listings[tuple(stem)] except KeyError: # the directory has not been listed y...
[ "def", "actual_name", "(", "self", ",", "stem", ",", "name", ")", ":", "try", ":", "listing", "=", "self", ".", "listings", "[", "tuple", "(", "stem", ")", "]", "except", "KeyError", ":", "# the directory has not been listed yet.", "try", ":", "filelist", ...
https://github.com/SFTtech/openage/blob/d6a08c53c48dc1e157807471df92197f6ca9e04d/openage/util/fslike/directory.py#L139-L162
ucbrise/clipper
9f25e3fc7f8edc891615e81c5b80d3d8aed72608
clipper_admin/clipper_admin/clipper_admin.py
python
ClipperConnection.set_model_version
(self, name, version, num_replicas=None)
Changes the current model version to "model_version". This method can be used to perform model roll-back and roll-forward. The version can be set to any previously deployed version of the model. Parameters ---------- name : str The name of the model version ...
Changes the current model version to "model_version".
[ "Changes", "the", "current", "model", "version", "to", "model_version", "." ]
def set_model_version(self, name, version, num_replicas=None): """Changes the current model version to "model_version". This method can be used to perform model roll-back and roll-forward. The version can be set to any previously deployed version of the model. Parameters ------...
[ "def", "set_model_version", "(", "self", ",", "name", ",", "version", ",", "num_replicas", "=", "None", ")", ":", "if", "not", "self", ".", "connected", ":", "raise", "UnconnectedException", "(", ")", "version", "=", "str", "(", "version", ")", "url", "=...
https://github.com/ucbrise/clipper/blob/9f25e3fc7f8edc891615e81c5b80d3d8aed72608/clipper_admin/clipper_admin/clipper_admin.py#L1170-L1214
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/cli/cmdoptions.py
python
check_dist_restriction
(options, check_target=False)
Function for determining if custom platform options are allowed. :param options: The OptionParser options. :param check_target: Whether or not to check if --target is being used.
Function for determining if custom platform options are allowed.
[ "Function", "for", "determining", "if", "custom", "platform", "options", "are", "allowed", "." ]
def check_dist_restriction(options, check_target=False): # type: (Values, bool) -> None """Function for determining if custom platform options are allowed. :param options: The OptionParser options. :param check_target: Whether or not to check if --target is being used. """ dist_restriction_set ...
[ "def", "check_dist_restriction", "(", "options", ",", "check_target", "=", "False", ")", ":", "# type: (Values, bool) -> None", "dist_restriction_set", "=", "any", "(", "[", "options", ".", "python_version", ",", "options", ".", "platforms", ",", "options", ".", "...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/cli/cmdoptions.py#L91-L128