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
idaholab/moose
9eeebc65e098b4c30f8205fb41591fd5b61eb6ff
python/peacock/PostprocessorViewer/plugins/AxisSettingsWidget.py
python
AxisSettingsWidget.set
(self, function, *args, **kwargs)
Helper method for calling set methods containing the 'x' or 'y' (e.g., "set_xscale")
Helper method for calling set methods containing the 'x' or 'y' (e.g., "set_xscale")
[ "Helper", "method", "for", "calling", "set", "methods", "containing", "the", "x", "or", "y", "(", "e", ".", "g", ".", "set_xscale", ")" ]
def set(self, function, *args, **kwargs): """ Helper method for calling set methods containing the 'x' or 'y' (e.g., "set_xscale") """ if self._axes == None: import traceback; traceback.print_stack() func = getattr(self._axes, function.format(self._name)) fun...
[ "def", "set", "(", "self", ",", "function", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "self", ".", "_axes", "==", "None", ":", "import", "traceback", "traceback", ".", "print_stack", "(", ")", "func", "=", "getattr", "(", "self", "...
https://github.com/idaholab/moose/blob/9eeebc65e098b4c30f8205fb41591fd5b61eb6ff/python/peacock/PostprocessorViewer/plugins/AxisSettingsWidget.py#L87-L95
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/io/html.py
python
_remove_whitespace
(s: str, regex=_RE_WHITESPACE)
return regex.sub(" ", s.strip())
Replace extra whitespace inside of a string with a single space. Parameters ---------- s : str or unicode The string from which to remove extra whitespace. regex : re.Pattern The regular expression to use to remove extra whitespace. Returns ------- subd : str or unicode ...
Replace extra whitespace inside of a string with a single space.
[ "Replace", "extra", "whitespace", "inside", "of", "a", "string", "with", "a", "single", "space", "." ]
def _remove_whitespace(s: str, regex=_RE_WHITESPACE) -> str: """ Replace extra whitespace inside of a string with a single space. Parameters ---------- s : str or unicode The string from which to remove extra whitespace. regex : re.Pattern The regular expression to use to remove...
[ "def", "_remove_whitespace", "(", "s", ":", "str", ",", "regex", "=", "_RE_WHITESPACE", ")", "->", "str", ":", "return", "regex", ".", "sub", "(", "\" \"", ",", "s", ".", "strip", "(", ")", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/io/html.py#L60-L76
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/flatmenu.py
python
FlatToolbarItem.SetLabel
(self, label)
Sets the tool label. :param string `label`: the new tool string.
Sets the tool label.
[ "Sets", "the", "tool", "label", "." ]
def SetLabel(self, label): """ Sets the tool label. :param string `label`: the new tool string. """ self._label = label
[ "def", "SetLabel", "(", "self", ",", "label", ")", ":", "self", ".", "_label", "=", "label" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/flatmenu.py#L4606-L4613
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/internals/managers.py
python
BlockManager.quantile
( self, axis=0, consolidate=True, transposed=False, interpolation="linear", qs=None, numeric_only=None, )
return SingleBlockManager( [make_block(values, ndim=1, placement=np.arange(len(values)))], axes[0] )
Iterate over blocks applying quantile reduction. This routine is intended for reduction type operations and will do inference on the generated blocks. Parameters ---------- axis: reduction axis, default 0 consolidate: boolean, default True. Join together blocks having sa...
Iterate over blocks applying quantile reduction. This routine is intended for reduction type operations and will do inference on the generated blocks.
[ "Iterate", "over", "blocks", "applying", "quantile", "reduction", ".", "This", "routine", "is", "intended", "for", "reduction", "type", "operations", "and", "will", "do", "inference", "on", "the", "generated", "blocks", "." ]
def quantile( self, axis=0, consolidate=True, transposed=False, interpolation="linear", qs=None, numeric_only=None, ): """ Iterate over blocks applying quantile reduction. This routine is intended for reduction type operations and ...
[ "def", "quantile", "(", "self", ",", "axis", "=", "0", ",", "consolidate", "=", "True", ",", "transposed", "=", "False", ",", "interpolation", "=", "\"linear\"", ",", "qs", "=", "None", ",", "numeric_only", "=", "None", ",", ")", ":", "# Series dispatche...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/internals/managers.py#L450-L552
limbo018/DREAMPlace
146c3b9fd003d1acd52c96d9fd02e3f0a05154e4
dreamplace/ops/dct/dct.py
python
idxst_idct
(x, expk0, expk1)
return output.view(x.size())
compute inverse discrete cosine-sine transformation This is equivalent to idxst(idct(x)^T)^T
compute inverse discrete cosine-sine transformation This is equivalent to idxst(idct(x)^T)^T
[ "compute", "inverse", "discrete", "cosine", "-", "sine", "transformation", "This", "is", "equivalent", "to", "idxst", "(", "idct", "(", "x", ")", "^T", ")", "^T" ]
def idxst_idct(x, expk0, expk1): """compute inverse discrete cosine-sine transformation This is equivalent to idxst(idct(x)^T)^T """ if x.is_cuda: output = dct_cuda.idxst_idct(x.view([-1, x.size(-1)]), expk0, expk1) else: output = dct_cpp.idxst_idct(x.view([-1, x.size(-1)]), expk0, e...
[ "def", "idxst_idct", "(", "x", ",", "expk0", ",", "expk1", ")", ":", "if", "x", ".", "is_cuda", ":", "output", "=", "dct_cuda", ".", "idxst_idct", "(", "x", ".", "view", "(", "[", "-", "1", ",", "x", ".", "size", "(", "-", "1", ")", "]", ")",...
https://github.com/limbo018/DREAMPlace/blob/146c3b9fd003d1acd52c96d9fd02e3f0a05154e4/dreamplace/ops/dct/dct.py#L373-L381
macchina-io/macchina.io
ef24ba0e18379c3dd48fb84e6dbf991101cb8db0
platform/JS/V8/tools/gyp/pylib/gyp/MSVSProject.py
python
Writer.AddFileConfig
(self, path, config, attrs=None, tools=None)
Adds a configuration to a file. Args: path: Relative path to the file. config: Name of configuration to add. attrs: Dict of configuration attributes; may be None. tools: List of tools (strings or Tool objects); may be None. Raises: ValueError: Relative path does not match any fil...
Adds a configuration to a file.
[ "Adds", "a", "configuration", "to", "a", "file", "." ]
def AddFileConfig(self, path, config, attrs=None, tools=None): """Adds a configuration to a file. Args: path: Relative path to the file. config: Name of configuration to add. attrs: Dict of configuration attributes; may be None. tools: List of tools (strings or Tool objects); may be Non...
[ "def", "AddFileConfig", "(", "self", ",", "path", ",", "config", ",", "attrs", "=", "None", ",", "tools", "=", "None", ")", ":", "# Find the file node with the right relative path", "parent", "=", "self", ".", "files_dict", ".", "get", "(", "path", ")", "if"...
https://github.com/macchina-io/macchina.io/blob/ef24ba0e18379c3dd48fb84e6dbf991101cb8db0/platform/JS/V8/tools/gyp/pylib/gyp/MSVSProject.py#L166-L186
thalium/icebox
99d147d5b9269222225443ce171b4fd46d8985d4
third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2.py
python
catalogGetPublic
(pubID)
return ret
Try to lookup the catalog reference associated to a public ID DEPRECATED, use xmlCatalogResolvePublic()
Try to lookup the catalog reference associated to a public ID DEPRECATED, use xmlCatalogResolvePublic()
[ "Try", "to", "lookup", "the", "catalog", "reference", "associated", "to", "a", "public", "ID", "DEPRECATED", "use", "xmlCatalogResolvePublic", "()" ]
def catalogGetPublic(pubID): """Try to lookup the catalog reference associated to a public ID DEPRECATED, use xmlCatalogResolvePublic() """ ret = libxml2mod.xmlCatalogGetPublic(pubID) return ret
[ "def", "catalogGetPublic", "(", "pubID", ")", ":", "ret", "=", "libxml2mod", ".", "xmlCatalogGetPublic", "(", "pubID", ")", "return", "ret" ]
https://github.com/thalium/icebox/blob/99d147d5b9269222225443ce171b4fd46d8985d4/third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2.py#L927-L931
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_core.py
python
GBSizerItemSizer
(*args, **kwargs)
return val
GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span=DefaultSpan, int flag=0, int border=0, PyObject userData=None) -> GBSizerItem Construct a `wx.GBSizerItem` for a sizer
GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span=DefaultSpan, int flag=0, int border=0, PyObject userData=None) -> GBSizerItem
[ "GBSizerItemSizer", "(", "Sizer", "sizer", "GBPosition", "pos", "GBSpan", "span", "=", "DefaultSpan", "int", "flag", "=", "0", "int", "border", "=", "0", "PyObject", "userData", "=", "None", ")", "-", ">", "GBSizerItem" ]
def GBSizerItemSizer(*args, **kwargs): """ GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span=DefaultSpan, int flag=0, int border=0, PyObject userData=None) -> GBSizerItem Construct a `wx.GBSizerItem` for a sizer """ val = _core_.new_GBSizerItemSizer(*args, **kwargs) return val
[ "def", "GBSizerItemSizer", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "val", "=", "_core_", ".", "new_GBSizerItemSizer", "(", "*", "args", ",", "*", "*", "kwargs", ")", "return", "val" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_core.py#L15835-L15843
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/propgrid.py
python
PGChoices.GetDataPtr
(*args, **kwargs)
return _propgrid.PGChoices_GetDataPtr(*args, **kwargs)
GetDataPtr(self)
GetDataPtr(self)
[ "GetDataPtr", "(", "self", ")" ]
def GetDataPtr(*args, **kwargs): """GetDataPtr(self)""" return _propgrid.PGChoices_GetDataPtr(*args, **kwargs)
[ "def", "GetDataPtr", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_propgrid", ".", "PGChoices_GetDataPtr", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/propgrid.py#L334-L336
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/cubecolourdialog.py
python
CubeColourDialog.DrawMarkers
(self, dc=None)
Draws the markers for all the controls. :param `dc`: an instance of :class:`DC`. If `dc` is ``None``, a :class:`ClientDC` is created on the fly.
Draws the markers for all the controls.
[ "Draws", "the", "markers", "for", "all", "the", "controls", "." ]
def DrawMarkers(self, dc=None): """ Draws the markers for all the controls. :param `dc`: an instance of :class:`DC`. If `dc` is ``None``, a :class:`ClientDC` is created on the fly. """ if dc is None: dc = wx.ClientDC(self) self.hsvBitmap.DrawMarker...
[ "def", "DrawMarkers", "(", "self", ",", "dc", "=", "None", ")", ":", "if", "dc", "is", "None", ":", "dc", "=", "wx", ".", "ClientDC", "(", "self", ")", "self", ".", "hsvBitmap", ".", "DrawMarkers", "(", ")", "self", ".", "rgbBitmap", ".", "DrawMark...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/cubecolourdialog.py#L3191-L3204
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numpy/core/einsumfunc.py
python
einsum_path
(*operands, **kwargs)
return (path, path_print)
einsum_path(subscripts, *operands, optimize='greedy') Evaluates the lowest cost contraction order for an einsum expression by considering the creation of intermediate arrays. Parameters ---------- subscripts : str Specifies the subscripts for summation. *operands : list of array_like ...
einsum_path(subscripts, *operands, optimize='greedy')
[ "einsum_path", "(", "subscripts", "*", "operands", "optimize", "=", "greedy", ")" ]
def einsum_path(*operands, **kwargs): """ einsum_path(subscripts, *operands, optimize='greedy') Evaluates the lowest cost contraction order for an einsum expression by considering the creation of intermediate arrays. Parameters ---------- subscripts : str Specifies the subscripts f...
[ "def", "einsum_path", "(", "*", "operands", ",", "*", "*", "kwargs", ")", ":", "# Make sure all keywords are valid", "valid_contract_kwargs", "=", "[", "'optimize'", ",", "'einsum_call'", "]", "unknown_kwargs", "=", "[", "k", "for", "(", "k", ",", "v", ")", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numpy/core/einsumfunc.py#L705-L992
eclipse/sumo
7132a9b8b6eea734bdec38479026b4d8c4336d03
tools/contributed/sumopy/plugins/mapmatching/mapmatching.py
python
Mapmatching.get_timesmap
(self, is_check_lanes = False)
return self._timesmap
Returns a dictionary where key is id_mode and value is a distance-lookup table, mapping id_edge to edge distance
Returns a dictionary where key is id_mode and value is a distance-lookup table, mapping id_edge to edge distance
[ "Returns", "a", "dictionary", "where", "key", "is", "id_mode", "and", "value", "is", "a", "distance", "-", "lookup", "table", "mapping", "id_edge", "to", "edge", "distance" ]
def get_timesmap(self, is_check_lanes = False): """ Returns a dictionary where key is id_mode and value is a distance-lookup table, mapping id_edge to edge distance """ #print 'get_timesmap',self._distancesmap is None if s...
[ "def", "get_timesmap", "(", "self", ",", "is_check_lanes", "=", "False", ")", ":", "#print 'get_timesmap',self._distancesmap is None", "if", "self", ".", "_timesmap", "is", "None", ":", "vtypes", "=", "self", ".", "get_scenario", "(", ")", ".", "demand", ".", ...
https://github.com/eclipse/sumo/blob/7132a9b8b6eea734bdec38479026b4d8c4336d03/tools/contributed/sumopy/plugins/mapmatching/mapmatching.py#L9881-L9907
hpi-xnor/BMXNet-v2
af2b1859eafc5c721b1397cef02f946aaf2ce20d
python/mxnet/image/image.py
python
ForceResizeAug.__call__
(self, src)
return imresize(src, *self.size, interp=_get_interp_method(self.interp, sizes))
Augmenter body
Augmenter body
[ "Augmenter", "body" ]
def __call__(self, src): """Augmenter body""" sizes = (src.shape[0], src.shape[1], self.size[1], self.size[0]) return imresize(src, *self.size, interp=_get_interp_method(self.interp, sizes))
[ "def", "__call__", "(", "self", ",", "src", ")", ":", "sizes", "=", "(", "src", ".", "shape", "[", "0", "]", ",", "src", ".", "shape", "[", "1", "]", ",", "self", ".", "size", "[", "1", "]", ",", "self", ".", "size", "[", "0", "]", ")", "...
https://github.com/hpi-xnor/BMXNet-v2/blob/af2b1859eafc5c721b1397cef02f946aaf2ce20d/python/mxnet/image/image.py#L689-L692
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/dtypes/common.py
python
ensure_float
(arr)
return arr
Ensure that an array object has a float dtype if possible. Parameters ---------- arr : array-like The array whose data type we want to enforce as float. Returns ------- float_arr : The original array cast to the float dtype if possible. Otherwise, the original array is ...
Ensure that an array object has a float dtype if possible.
[ "Ensure", "that", "an", "array", "object", "has", "a", "float", "dtype", "if", "possible", "." ]
def ensure_float(arr): """ Ensure that an array object has a float dtype if possible. Parameters ---------- arr : array-like The array whose data type we want to enforce as float. Returns ------- float_arr : The original array cast to the float dtype if possible...
[ "def", "ensure_float", "(", "arr", ")", ":", "if", "issubclass", "(", "arr", ".", "dtype", ".", "type", ",", "(", "np", ".", "integer", ",", "np", ".", "bool_", ")", ")", ":", "arr", "=", "arr", ".", "astype", "(", "float", ")", "return", "arr" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/dtypes/common.py#L78-L95
deepmind/open_spiel
4ca53bea32bb2875c7385d215424048ae92f78c8
open_spiel/python/jax/deep_cfr.py
python
DeepCFRSolver._serialize_advantage_memory
(self, info_state, iteration, samp_regret, legal_actions_mask)
return example.SerializeToString()
Create serialized example to store an advantage entry.
Create serialized example to store an advantage entry.
[ "Create", "serialized", "example", "to", "store", "an", "advantage", "entry", "." ]
def _serialize_advantage_memory(self, info_state, iteration, samp_regret, legal_actions_mask): """Create serialized example to store an advantage entry.""" example = tf.train.Example( features=tf.train.Features( feature={ 'info_state': ...
[ "def", "_serialize_advantage_memory", "(", "self", ",", "info_state", ",", "iteration", ",", "samp_regret", ",", "legal_actions_mask", ")", ":", "example", "=", "tf", ".", "train", ".", "Example", "(", "features", "=", "tf", ".", "train", ".", "Features", "(...
https://github.com/deepmind/open_spiel/blob/4ca53bea32bb2875c7385d215424048ae92f78c8/open_spiel/python/jax/deep_cfr.py#L354-L373
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib2to3/fixer_base.py
python
BaseFix.compile_pattern
(self)
Compiles self.PATTERN into self.pattern. Subclass may override if it doesn't want to use self.{pattern,PATTERN} in .match().
Compiles self.PATTERN into self.pattern.
[ "Compiles", "self", ".", "PATTERN", "into", "self", ".", "pattern", "." ]
def compile_pattern(self): """Compiles self.PATTERN into self.pattern. Subclass may override if it doesn't want to use self.{pattern,PATTERN} in .match(). """ if self.PATTERN is not None: PC = PatternCompiler() self.pattern, self.pattern_tree = PC.compile...
[ "def", "compile_pattern", "(", "self", ")", ":", "if", "self", ".", "PATTERN", "is", "not", "None", ":", "PC", "=", "PatternCompiler", "(", ")", "self", ".", "pattern", ",", "self", ".", "pattern_tree", "=", "PC", ".", "compile_pattern", "(", "self", "...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib2to3/fixer_base.py#L61-L70
wyrover/book-code
7f4883d9030d553bc6bcfa3da685e34789839900
3rdparty/protobuf/python/google/protobuf/internal/well_known_types.py
python
_CheckFieldMaskMessage
(message)
Raises ValueError if message is not a FieldMask.
Raises ValueError if message is not a FieldMask.
[ "Raises", "ValueError", "if", "message", "is", "not", "a", "FieldMask", "." ]
def _CheckFieldMaskMessage(message): """Raises ValueError if message is not a FieldMask.""" message_descriptor = message.DESCRIPTOR if (message_descriptor.name != 'FieldMask' or message_descriptor.file.name != 'google/protobuf/field_mask.proto'): raise ValueError('Message {0} is not a FieldMask.'.format...
[ "def", "_CheckFieldMaskMessage", "(", "message", ")", ":", "message_descriptor", "=", "message", ".", "DESCRIPTOR", "if", "(", "message_descriptor", ".", "name", "!=", "'FieldMask'", "or", "message_descriptor", ".", "file", ".", "name", "!=", "'google/protobuf/field...
https://github.com/wyrover/book-code/blob/7f4883d9030d553bc6bcfa3da685e34789839900/3rdparty/protobuf/python/google/protobuf/internal/well_known_types.py#L466-L472
mickem/nscp
79f89fdbb6da63f91bc9dedb7aea202fe938f237
scripts/python/lib/google/protobuf/internal/python_message.py
python
_AddUnicodeMethod
(unused_message_descriptor, cls)
Helper for _AddMessageMethods().
Helper for _AddMessageMethods().
[ "Helper", "for", "_AddMessageMethods", "()", "." ]
def _AddUnicodeMethod(unused_message_descriptor, cls): """Helper for _AddMessageMethods().""" def __unicode__(self): return text_format.MessageToString(self, as_utf8=True).decode('utf-8') cls.__unicode__ = __unicode__
[ "def", "_AddUnicodeMethod", "(", "unused_message_descriptor", ",", "cls", ")", ":", "def", "__unicode__", "(", "self", ")", ":", "return", "text_format", ".", "MessageToString", "(", "self", ",", "as_utf8", "=", "True", ")", ".", "decode", "(", "'utf-8'", ")...
https://github.com/mickem/nscp/blob/79f89fdbb6da63f91bc9dedb7aea202fe938f237/scripts/python/lib/google/protobuf/internal/python_message.py#L664-L669
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py2/scipy/optimize/_linprog_util.py
python
_presolve
(c, A_ub, b_ub, A_eq, b_eq, bounds, rr, tol=1e-9)
return (c, c0, A_ub, b_ub, A_eq, b_eq, bounds, x, undo, complete, status, message)
Given inputs for a linear programming problem in preferred format, presolve the problem: identify trivial infeasibilities, redundancies, and unboundedness, tighten bounds where possible, and eliminate fixed variables. Parameters ---------- c : 1D array Coefficients of the linear objecti...
Given inputs for a linear programming problem in preferred format, presolve the problem: identify trivial infeasibilities, redundancies, and unboundedness, tighten bounds where possible, and eliminate fixed variables.
[ "Given", "inputs", "for", "a", "linear", "programming", "problem", "in", "preferred", "format", "presolve", "the", "problem", ":", "identify", "trivial", "infeasibilities", "redundancies", "and", "unboundedness", "tighten", "bounds", "where", "possible", "and", "eli...
def _presolve(c, A_ub, b_ub, A_eq, b_eq, bounds, rr, tol=1e-9): """ Given inputs for a linear programming problem in preferred format, presolve the problem: identify trivial infeasibilities, redundancies, and unboundedness, tighten bounds where possible, and eliminate fixed variables. Parameter...
[ "def", "_presolve", "(", "c", ",", "A_ub", ",", "b_ub", ",", "A_eq", ",", "b_eq", ",", "bounds", ",", "rr", ",", "tol", "=", "1e-9", ")", ":", "# ideas from Reference [5] by Andersen and Andersen", "# however, unlike the reference, this is performed before converting", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py2/scipy/optimize/_linprog_util.py#L340-L721
microsoft/TSS.MSR
0f2516fca2cd9929c31d5450e39301c9bde43688
TSS.Py/src/TpmTypes.py
python
TPMS_ALG_PROPERTY.fromBytes
(buffer)
return TpmBuffer(buffer).createObj(TPMS_ALG_PROPERTY)
Returns new TPMS_ALG_PROPERTY object constructed from its marshaled representation in the given byte buffer
Returns new TPMS_ALG_PROPERTY object constructed from its marshaled representation in the given byte buffer
[ "Returns", "new", "TPMS_ALG_PROPERTY", "object", "constructed", "from", "its", "marshaled", "representation", "in", "the", "given", "byte", "buffer" ]
def fromBytes(buffer): """ Returns new TPMS_ALG_PROPERTY object constructed from its marshaled representation in the given byte buffer """ return TpmBuffer(buffer).createObj(TPMS_ALG_PROPERTY)
[ "def", "fromBytes", "(", "buffer", ")", ":", "return", "TpmBuffer", "(", "buffer", ")", ".", "createObj", "(", "TPMS_ALG_PROPERTY", ")" ]
https://github.com/microsoft/TSS.MSR/blob/0f2516fca2cd9929c31d5450e39301c9bde43688/TSS.Py/src/TpmTypes.py#L4286-L4290
hughperkins/tf-coriander
970d3df6c11400ad68405f22b0c42a52374e94ca
tensorflow/python/ops/control_flow_ops.py
python
CondContext.to_proto
(self)
return context_def
Converts a `CondContext` to a `CondContextDef` protocol buffer. Returns: A `CondContextDef` protocol buffer.
Converts a `CondContext` to a `CondContextDef` protocol buffer.
[ "Converts", "a", "CondContext", "to", "a", "CondContextDef", "protocol", "buffer", "." ]
def to_proto(self): """Converts a `CondContext` to a `CondContextDef` protocol buffer. Returns: A `CondContextDef` protocol buffer. """ context_def = control_flow_pb2.CondContextDef() context_def.context_name = self.name context_def.pred_name = self._pred.name context_def.pivot_name =...
[ "def", "to_proto", "(", "self", ")", ":", "context_def", "=", "control_flow_pb2", ".", "CondContextDef", "(", ")", "context_def", ".", "context_name", "=", "self", ".", "name", "context_def", ".", "pred_name", "=", "self", ".", "_pred", ".", "name", "context...
https://github.com/hughperkins/tf-coriander/blob/970d3df6c11400ad68405f22b0c42a52374e94ca/tensorflow/python/ops/control_flow_ops.py#L1532-L1545
rdkit/rdkit
ede860ae316d12d8568daf5ee800921c3389c84e
rdkit/sping/SVG/pidSVG.py
python
SVGCanvas._FormFontStr
(self, font)
return fontStr
form what we hope is a valid SVG font string. Defaults to 'sansserif' This should work when an array of font faces are passed in.
form what we hope is a valid SVG font string. Defaults to 'sansserif' This should work when an array of font faces are passed in.
[ "form", "what", "we", "hope", "is", "a", "valid", "SVG", "font", "string", ".", "Defaults", "to", "sansserif", "This", "should", "work", "when", "an", "array", "of", "font", "faces", "are", "passed", "in", "." ]
def _FormFontStr(self, font): """ form what we hope is a valid SVG font string. Defaults to 'sansserif' This should work when an array of font faces are passed in. """ fontStr = '' if font.face is None: font.__dict__['face'] = 'sansserif' # quick hack -cwl if isinstance(font.face,...
[ "def", "_FormFontStr", "(", "self", ",", "font", ")", ":", "fontStr", "=", "''", "if", "font", ".", "face", "is", "None", ":", "font", ".", "__dict__", "[", "'face'", "]", "=", "'sansserif'", "# quick hack -cwl", "if", "isinstance", "(", "font", ".", "...
https://github.com/rdkit/rdkit/blob/ede860ae316d12d8568daf5ee800921c3389c84e/rdkit/sping/SVG/pidSVG.py#L152-L191
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python/src/Lib/decimal.py
python
Context.abs
(self, a)
return a.__abs__(context=self)
Returns the absolute value of the operand. If the operand is negative, the result is the same as using the minus operation on the operand. Otherwise, the result is the same as using the plus operation on the operand. >>> ExtendedContext.abs(Decimal('2.1')) Decimal('2.1') ...
Returns the absolute value of the operand.
[ "Returns", "the", "absolute", "value", "of", "the", "operand", "." ]
def abs(self, a): """Returns the absolute value of the operand. If the operand is negative, the result is the same as using the minus operation on the operand. Otherwise, the result is the same as using the plus operation on the operand. >>> ExtendedContext.abs(Decimal('2.1'))...
[ "def", "abs", "(", "self", ",", "a", ")", ":", "a", "=", "_convert_other", "(", "a", ",", "raiseit", "=", "True", ")", "return", "a", ".", "__abs__", "(", "context", "=", "self", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Lib/decimal.py#L3957-L3976
psnonis/FinBERT
c0c555d833a14e2316a3701e59c0b5156f804b4e
bert-gpu/modeling.py
python
BertModel.__init__
(self, config, is_training, input_ids, input_mask=None, token_type_ids=None, use_one_hot_embeddings=False, scope=None, compute_type=tf.float32)
Constructor for BertModel. Args: config: `BertConfig` instance. is_training: bool. true for training model, false for eval model. Controls whether dropout will be applied. input_ids: int32 Tensor of shape [batch_size, seq_length]. input_mask: (optional) int32 Tensor of shape [batch_...
Constructor for BertModel.
[ "Constructor", "for", "BertModel", "." ]
def __init__(self, config, is_training, input_ids, input_mask=None, token_type_ids=None, use_one_hot_embeddings=False, scope=None, compute_type=tf.float32): """Constructor for BertModel. Args...
[ "def", "__init__", "(", "self", ",", "config", ",", "is_training", ",", "input_ids", ",", "input_mask", "=", "None", ",", "token_type_ids", "=", "None", ",", "use_one_hot_embeddings", "=", "False", ",", "scope", "=", "None", ",", "compute_type", "=", "tf", ...
https://github.com/psnonis/FinBERT/blob/c0c555d833a14e2316a3701e59c0b5156f804b4e/bert-gpu/modeling.py#L132-L240
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/idlelib/config.py
python
IdleConfParser.Get
(self, section, option, type=None, default=None, raw=False)
Get an option value for given section/option or return default. If type is specified, return as type.
Get an option value for given section/option or return default. If type is specified, return as type.
[ "Get", "an", "option", "value", "for", "given", "section", "/", "option", "or", "return", "default", ".", "If", "type", "is", "specified", "return", "as", "type", "." ]
def Get(self, section, option, type=None, default=None, raw=False): """ Get an option value for given section/option or return default. If type is specified, return as type. """ # TODO Use default as fallback, at least if not None # Should also print Warning(file, section...
[ "def", "Get", "(", "self", ",", "section", ",", "option", ",", "type", "=", "None", ",", "default", "=", "None", ",", "raw", "=", "False", ")", ":", "# TODO Use default as fallback, at least if not None", "# Should also print Warning(file, section, option).", "# Curre...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/idlelib/config.py#L50-L65
InsightSoftwareConsortium/ITK
87acfce9a93d928311c38bc371b666b515b9f19d
Modules/ThirdParty/pygccxml/src/pygccxml/utils/utils.py
python
remove_file_no_raise
(file_name, config)
Removes file from disk if exception is raised.
Removes file from disk if exception is raised.
[ "Removes", "file", "from", "disk", "if", "exception", "is", "raised", "." ]
def remove_file_no_raise(file_name, config): """Removes file from disk if exception is raised.""" # The removal can be disabled by the config for debugging purposes. if config.keep_xml: return True try: if os.path.exists(file_name): os.remove(file_name) except IOError as...
[ "def", "remove_file_no_raise", "(", "file_name", ",", "config", ")", ":", "# The removal can be disabled by the config for debugging purposes.", "if", "config", ".", "keep_xml", ":", "return", "True", "try", ":", "if", "os", ".", "path", ".", "exists", "(", "file_na...
https://github.com/InsightSoftwareConsortium/ITK/blob/87acfce9a93d928311c38bc371b666b515b9f19d/Modules/ThirdParty/pygccxml/src/pygccxml/utils/utils.py#L150-L162
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/http/server.py
python
BaseHTTPRequestHandler.handle_expect_100
(self)
return True
Decide what to do with an "Expect: 100-continue" header. If the client is expecting a 100 Continue response, we must respond with either a 100 Continue or a final response before waiting for the request body. The default is to always respond with a 100 Continue. You can behave different...
Decide what to do with an "Expect: 100-continue" header.
[ "Decide", "what", "to", "do", "with", "an", "Expect", ":", "100", "-", "continue", "header", "." ]
def handle_expect_100(self): """Decide what to do with an "Expect: 100-continue" header. If the client is expecting a 100 Continue response, we must respond with either a 100 Continue or a final response before waiting for the request body. The default is to always respond with ...
[ "def", "handle_expect_100", "(", "self", ")", ":", "self", ".", "send_response_only", "(", "HTTPStatus", ".", "CONTINUE", ")", "self", ".", "end_headers", "(", ")", "return", "True" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/http/server.py#L367-L383
snap-stanford/snap-python
d53c51b0a26aa7e3e7400b014cdf728948fde80a
setup/snap.py
python
TChA.__call__
(self, *args)
return _snap.TChA___call__(self, *args)
__call__(TChA self) -> char __call__(TChA self) -> char const * Parameters: self: TChA const *
__call__(TChA self) -> char __call__(TChA self) -> char const *
[ "__call__", "(", "TChA", "self", ")", "-", ">", "char", "__call__", "(", "TChA", "self", ")", "-", ">", "char", "const", "*" ]
def __call__(self, *args): """ __call__(TChA self) -> char __call__(TChA self) -> char const * Parameters: self: TChA const * """ return _snap.TChA___call__(self, *args)
[ "def", "__call__", "(", "self", ",", "*", "args", ")", ":", "return", "_snap", ".", "TChA___call__", "(", "self", ",", "*", "args", ")" ]
https://github.com/snap-stanford/snap-python/blob/d53c51b0a26aa7e3e7400b014cdf728948fde80a/setup/snap.py#L8607-L8616
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
tools/valgrind/asan/asan_symbolize.py
python
disable_buffering
()
Makes this process and child processes stdout unbuffered.
Makes this process and child processes stdout unbuffered.
[ "Makes", "this", "process", "and", "child", "processes", "stdout", "unbuffered", "." ]
def disable_buffering(): """Makes this process and child processes stdout unbuffered.""" if not os.environ.get('PYTHONUNBUFFERED'): # Since sys.stdout is a C++ object, it's impossible to do # sys.stdout.write = lambda... sys.stdout = LineBuffered(sys.stdout) os.environ['PYTHONUNBUFFERED'] = 'x'
[ "def", "disable_buffering", "(", ")", ":", "if", "not", "os", ".", "environ", ".", "get", "(", "'PYTHONUNBUFFERED'", ")", ":", "# Since sys.stdout is a C++ object, it's impossible to do", "# sys.stdout.write = lambda...", "sys", ".", "stdout", "=", "LineBuffered", "(", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/tools/valgrind/asan/asan_symbolize.py#L32-L38
H-uru/Plasma
c2140ea046e82e9c199e257a7f2e7edb42602871
Scripts/Python/plasma/Plasma.py
python
PtGetPrevAgeName
()
Returns filename of previous age visited
Returns filename of previous age visited
[ "Returns", "filename", "of", "previous", "age", "visited" ]
def PtGetPrevAgeName(): """Returns filename of previous age visited""" pass
[ "def", "PtGetPrevAgeName", "(", ")", ":", "pass" ]
https://github.com/H-uru/Plasma/blob/c2140ea046e82e9c199e257a7f2e7edb42602871/Scripts/Python/plasma/Plasma.py#L519-L521
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python/src/Lib/imputil.py
python
_os_bootstrap
()
Set up 'os' module replacement functions for use during import bootstrap.
Set up 'os' module replacement functions for use during import bootstrap.
[ "Set", "up", "os", "module", "replacement", "functions", "for", "use", "during", "import", "bootstrap", "." ]
def _os_bootstrap(): "Set up 'os' module replacement functions for use during import bootstrap." names = sys.builtin_module_names join = None if 'posix' in names: sep = '/' from posix import stat elif 'nt' in names: sep = '\\' from nt import stat elif 'dos' in n...
[ "def", "_os_bootstrap", "(", ")", ":", "names", "=", "sys", ".", "builtin_module_names", "join", "=", "None", "if", "'posix'", "in", "names", ":", "sep", "=", "'/'", "from", "posix", "import", "stat", "elif", "'nt'", "in", "names", ":", "sep", "=", "'\...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Lib/imputil.py#L447-L481
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/closure_linter/closure_linter/statetracker.py
python
StateTracker.InInterfaceMethod
(self)
return False
Returns true if the current token is within an interface method. Returns: True if the current token is within an interface method.
Returns true if the current token is within an interface method.
[ "Returns", "true", "if", "the", "current", "token", "is", "within", "an", "interface", "method", "." ]
def InInterfaceMethod(self): """Returns true if the current token is within an interface method. Returns: True if the current token is within an interface method. """ if self.InFunction(): if self._function_stack[-1].is_interface: return True else: name = self._functio...
[ "def", "InInterfaceMethod", "(", "self", ")", ":", "if", "self", ".", "InFunction", "(", ")", ":", "if", "self", ".", "_function_stack", "[", "-", "1", "]", ".", "is_interface", ":", "return", "True", "else", ":", "name", "=", "self", ".", "_function_s...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/closure_linter/closure_linter/statetracker.py#L815-L833
CRYTEK/CRYENGINE
232227c59a220cbbd311576f0fbeba7bb53b2a8c
Editor/Python/windows/Lib/site-packages/pip/_vendor/requests/api.py
python
post
(url, data=None, json=None, **kwargs)
return request('post', url, data=data, json=json, **kwargs)
Sends a POST request. :param url: URL for the new :class:`Request` object. :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`. :param json: (optional) json data to send in the body of the :class:`Request`. :param \*\*kwargs: Optional arguments tha...
Sends a POST request.
[ "Sends", "a", "POST", "request", "." ]
def post(url, data=None, json=None, **kwargs): """Sends a POST request. :param url: URL for the new :class:`Request` object. :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`. :param json: (optional) json data to send in the body of the :class:`R...
[ "def", "post", "(", "url", ",", "data", "=", "None", ",", "json", "=", "None", ",", "*", "*", "kwargs", ")", ":", "return", "request", "(", "'post'", ",", "url", ",", "data", "=", "data", ",", "json", "=", "json", ",", "*", "*", "kwargs", ")" ]
https://github.com/CRYTEK/CRYENGINE/blob/232227c59a220cbbd311576f0fbeba7bb53b2a8c/Editor/Python/windows/Lib/site-packages/pip/_vendor/requests/api.py#L98-L109
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/propgrid.py
python
ArrayStringProperty.OnCustomStringEdit
(*args, **kwargs)
return _propgrid.ArrayStringProperty_OnCustomStringEdit(*args, **kwargs)
OnCustomStringEdit(self, Window parent, String value) -> bool
OnCustomStringEdit(self, Window parent, String value) -> bool
[ "OnCustomStringEdit", "(", "self", "Window", "parent", "String", "value", ")", "-", ">", "bool" ]
def OnCustomStringEdit(*args, **kwargs): """OnCustomStringEdit(self, Window parent, String value) -> bool""" return _propgrid.ArrayStringProperty_OnCustomStringEdit(*args, **kwargs)
[ "def", "OnCustomStringEdit", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_propgrid", ".", "ArrayStringProperty_OnCustomStringEdit", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/propgrid.py#L3140-L3142
google/syzygy
8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5
third_party/numpy/files/numpy/polynomial/hermite_e.py
python
herme2poly
(cs)
Convert a Hermite series to a polynomial. Convert an array representing the coefficients of a Hermite series, ordered from lowest degree to highest, to an array of the coefficients of the equivalent polynomial (relative to the "standard" basis) ordered from lowest to highest degree. Parameters ...
Convert a Hermite series to a polynomial.
[ "Convert", "a", "Hermite", "series", "to", "a", "polynomial", "." ]
def herme2poly(cs) : """ Convert a Hermite series to a polynomial. Convert an array representing the coefficients of a Hermite series, ordered from lowest degree to highest, to an array of the coefficients of the equivalent polynomial (relative to the "standard" basis) ordered from lowest to hi...
[ "def", "herme2poly", "(", "cs", ")", ":", "from", "polynomial", "import", "polyadd", ",", "polysub", ",", "polymulx", "[", "cs", "]", "=", "pu", ".", "as_series", "(", "[", "cs", "]", ")", "n", "=", "len", "(", "cs", ")", "if", "n", "==", "1", ...
https://github.com/google/syzygy/blob/8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5/third_party/numpy/files/numpy/polynomial/hermite_e.py#L112-L166
projectchrono/chrono
92015a8a6f84ef63ac8206a74e54a676251dcc89
src/demos/python/chrono-tensorflow/PPO/train_serial.py
python
init_gym
(env_name, render)
return env, obs_dim, act_dim
Initialize gym environment, return dimension of observation and action spaces. Args: render: True to toggle on visualization Returns: 3-tuple environment (object) number of observation dimensions (int) number of action dimensions (int)
Initialize gym environment, return dimension of observation and action spaces.
[ "Initialize", "gym", "environment", "return", "dimension", "of", "observation", "and", "action", "spaces", "." ]
def init_gym(env_name, render): """ Initialize gym environment, return dimension of observation and action spaces. Args: render: True to toggle on visualization Returns: 3-tuple environment (object) number of observation dimensions (int) number of action dimensions ...
[ "def", "init_gym", "(", "env_name", ",", "render", ")", ":", "env", "=", "gym", ".", "Init", "(", "env_name", ",", "render", ")", "obs_dim", "=", "env", ".", "observation_space", ".", "shape", "[", "0", "]", "act_dim", "=", "env", ".", "action_space", ...
https://github.com/projectchrono/chrono/blob/92015a8a6f84ef63ac8206a74e54a676251dcc89/src/demos/python/chrono-tensorflow/PPO/train_serial.py#L34-L52
homenc/HElib
f0e3e010009c592cd411ba96baa8376eb485247a
misc/algen/numth.py
python
nextPrime
(upto)
A simple generator implementation of the Sieve of Eratosthenes. Args: upto: An integer for the upper bound of the sieve. Returns: A generator which yields an integer the next prime. Usage: >>> list(nextPrime(10)) [2, 3, 5, 7]
A simple generator implementation of the Sieve of Eratosthenes.
[ "A", "simple", "generator", "implementation", "of", "the", "Sieve", "of", "Eratosthenes", "." ]
def nextPrime(upto): """A simple generator implementation of the Sieve of Eratosthenes. Args: upto: An integer for the upper bound of the sieve. Returns: A generator which yields an integer the next prime. Usage: >>> list(nextPrime(10)) [2, 3, 5, 7] """ numbers = [True]*(upto+1) n...
[ "def", "nextPrime", "(", "upto", ")", ":", "numbers", "=", "[", "True", "]", "*", "(", "upto", "+", "1", ")", "numbers", "[", "0", "]", "=", "False", "numbers", "[", "1", "]", "=", "False", "p", "=", "2", "yield", "p", "# Return 2 straight away", ...
https://github.com/homenc/HElib/blob/f0e3e010009c592cd411ba96baa8376eb485247a/misc/algen/numth.py#L27-L57
nasa/meshNetwork
ff4bd66e0ca6bd424fd8897a97252bb3925d8b3c
python/mesh/generic/tdmaComm.py
python
TDMAComm.parseMeshPacket
(self, packetBytes)
Parse out a mesh packet.
Parse out a mesh packet.
[ "Parse", "out", "a", "mesh", "packet", "." ]
def parseMeshPacket(self, packetBytes): """Parse out a mesh packet.""" # Parse mesh packet header packetHeader = dict() packetHeaderContents = struct.unpack(self.meshPacketHeaderFormat, packetBytes[0:self.meshHeaderLen]) packetHeader = {'sourceId': packetHeaderCo...
[ "def", "parseMeshPacket", "(", "self", ",", "packetBytes", ")", ":", "# Parse mesh packet header", "packetHeader", "=", "dict", "(", ")", "packetHeaderContents", "=", "struct", ".", "unpack", "(", "self", ".", "meshPacketHeaderFormat", ",", "packetBytes", "[", "0"...
https://github.com/nasa/meshNetwork/blob/ff4bd66e0ca6bd424fd8897a97252bb3925d8b3c/python/mesh/generic/tdmaComm.py#L579-L594
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/setuptools/py3/setuptools/_distutils/ccompiler.py
python
CCompiler.add_runtime_library_dir
(self, dir)
Add 'dir' to the list of directories that will be searched for shared libraries at runtime.
Add 'dir' to the list of directories that will be searched for shared libraries at runtime.
[ "Add", "dir", "to", "the", "list", "of", "directories", "that", "will", "be", "searched", "for", "shared", "libraries", "at", "runtime", "." ]
def add_runtime_library_dir(self, dir): """Add 'dir' to the list of directories that will be searched for shared libraries at runtime. """ self.runtime_library_dirs.append(dir)
[ "def", "add_runtime_library_dir", "(", "self", ",", "dir", ")", ":", "self", ".", "runtime_library_dirs", ".", "append", "(", "dir", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/setuptools/py3/setuptools/_distutils/ccompiler.py#L274-L278
apple/swift-lldb
d74be846ef3e62de946df343e8c234bde93a8912
scripts/Python/static-binding/lldb.py
python
SBAttachInfo.UserIDIsValid
(self)
return _lldb.SBAttachInfo_UserIDIsValid(self)
UserIDIsValid(SBAttachInfo self) -> bool
UserIDIsValid(SBAttachInfo self) -> bool
[ "UserIDIsValid", "(", "SBAttachInfo", "self", ")", "-", ">", "bool" ]
def UserIDIsValid(self): """UserIDIsValid(SBAttachInfo self) -> bool""" return _lldb.SBAttachInfo_UserIDIsValid(self)
[ "def", "UserIDIsValid", "(", "self", ")", ":", "return", "_lldb", ".", "SBAttachInfo_UserIDIsValid", "(", "self", ")" ]
https://github.com/apple/swift-lldb/blob/d74be846ef3e62de946df343e8c234bde93a8912/scripts/Python/static-binding/lldb.py#L1132-L1134
domino-team/openwrt-cc
8b181297c34d14d3ca521cc9f31430d561dbc688
package/gli-pub/openwrt-node-packages-master/node/node-v6.9.1/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/ordered_dict.py
python
OrderedDict.copy
(self)
return self.__class__(self)
od.copy() -> a shallow copy of od
od.copy() -> a shallow copy of od
[ "od", ".", "copy", "()", "-", ">", "a", "shallow", "copy", "of", "od" ]
def copy(self): 'od.copy() -> a shallow copy of od' return self.__class__(self)
[ "def", "copy", "(", "self", ")", ":", "return", "self", ".", "__class__", "(", "self", ")" ]
https://github.com/domino-team/openwrt-cc/blob/8b181297c34d14d3ca521cc9f31430d561dbc688/package/gli-pub/openwrt-node-packages-master/node/node-v6.9.1/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/ordered_dict.py#L249-L251
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py
python
Prepared.normalize
(name)
return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_')
PEP 503 normalization plus dashes as underscores.
PEP 503 normalization plus dashes as underscores.
[ "PEP", "503", "normalization", "plus", "dashes", "as", "underscores", "." ]
def normalize(name): """ PEP 503 normalization plus dashes as underscores. """ return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_')
[ "def", "normalize", "(", "name", ")", ":", "return", "re", ".", "sub", "(", "r\"[-_.]+\"", ",", "\"-\"", ",", "name", ")", ".", "lower", "(", ")", ".", "replace", "(", "'-'", ",", "'_'", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py#L860-L864
openvinotoolkit/openvino
dedcbeafa8b84cccdc55ca64b8da516682b381c7
src/bindings/python/src/openvino/runtime/opset1/ops.py
python
tan
(node: NodeInput, name: Optional[str] = None)
return _get_node_factory_opset1().create("Tan", [node])
Apply tangent function on the input node element-wise. @param node: One of: input node, array or scalar. @param name: Optional new name for output node. @return New node with tan operation applied on it.
Apply tangent function on the input node element-wise.
[ "Apply", "tangent", "function", "on", "the", "input", "node", "element", "-", "wise", "." ]
def tan(node: NodeInput, name: Optional[str] = None) -> Node: """Apply tangent function on the input node element-wise. @param node: One of: input node, array or scalar. @param name: Optional new name for output node. @return New node with tan operation applied on it. """ return _get_node_facto...
[ "def", "tan", "(", "node", ":", "NodeInput", ",", "name", ":", "Optional", "[", "str", "]", "=", "None", ")", "->", "Node", ":", "return", "_get_node_factory_opset1", "(", ")", ".", "create", "(", "\"Tan\"", ",", "[", "node", "]", ")" ]
https://github.com/openvinotoolkit/openvino/blob/dedcbeafa8b84cccdc55ca64b8da516682b381c7/src/bindings/python/src/openvino/runtime/opset1/ops.py#L2728-L2735
hpi-xnor/BMXNet-v2
af2b1859eafc5c721b1397cef02f946aaf2ce20d
python/mxnet/ndarray/ndarray.py
python
NDArray.__imul__
(self, other)
x.__imul__(y) <=> x*=y
x.__imul__(y) <=> x*=y
[ "x", ".", "__imul__", "(", "y", ")", "<", "=", ">", "x", "*", "=", "y" ]
def __imul__(self, other): """x.__imul__(y) <=> x*=y """ if not self.writable: raise ValueError('trying to multiply to a readonly NDArray') if isinstance(other, NDArray): return op.broadcast_mul(self, other, out=self) elif isinstance(other, numeric_types): ...
[ "def", "__imul__", "(", "self", ",", "other", ")", ":", "if", "not", "self", ".", "writable", ":", "raise", "ValueError", "(", "'trying to multiply to a readonly NDArray'", ")", "if", "isinstance", "(", "other", ",", "NDArray", ")", ":", "return", "op", ".",...
https://github.com/hpi-xnor/BMXNet-v2/blob/af2b1859eafc5c721b1397cef02f946aaf2ce20d/python/mxnet/ndarray/ndarray.py#L253-L262
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/site-packages/pip/download.py
python
URLOpener.setup
(self, proxystr='', prompting=True)
Sets the proxy handler given the option passed on the command line. If an empty string is passed it looks at the HTTP_PROXY environment variable.
Sets the proxy handler given the option passed on the command line. If an empty string is passed it looks at the HTTP_PROXY environment variable.
[ "Sets", "the", "proxy", "handler", "given", "the", "option", "passed", "on", "the", "command", "line", ".", "If", "an", "empty", "string", "is", "passed", "it", "looks", "at", "the", "HTTP_PROXY", "environment", "variable", "." ]
def setup(self, proxystr='', prompting=True): """ Sets the proxy handler given the option passed on the command line. If an empty string is passed it looks at the HTTP_PROXY environment variable. """ self.prompting = prompting proxy = self.get_proxy(proxystr) ...
[ "def", "setup", "(", "self", ",", "proxystr", "=", "''", ",", "prompting", "=", "True", ")", ":", "self", ".", "prompting", "=", "prompting", "proxy", "=", "self", ".", "get_proxy", "(", "proxystr", ")", "if", "proxy", ":", "self", ".", "proxy_handler"...
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/site-packages/pip/download.py#L243-L252
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/training/tracking/layer_utils.py
python
invalidate_recursive_cache
(key)
return outer
Convenience decorator to invalidate the cache when setting attributes.
Convenience decorator to invalidate the cache when setting attributes.
[ "Convenience", "decorator", "to", "invalidate", "the", "cache", "when", "setting", "attributes", "." ]
def invalidate_recursive_cache(key): """Convenience decorator to invalidate the cache when setting attributes.""" def outer(f): @functools.wraps(f) def wrapped(self, value): sentinel = getattr(self, "_attribute_sentinel") # type: AttributeSentinel sentinel.invalidate(key) return f(self, v...
[ "def", "invalidate_recursive_cache", "(", "key", ")", ":", "def", "outer", "(", "f", ")", ":", "@", "functools", ".", "wraps", "(", "f", ")", "def", "wrapped", "(", "self", ",", "value", ")", ":", "sentinel", "=", "getattr", "(", "self", ",", "\"_att...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/training/tracking/layer_utils.py#L48-L57
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python3/src/Lib/wsgiref/util.py
python
guess_scheme
(environ)
Return a guess for whether 'wsgi.url_scheme' should be 'http' or 'https'
Return a guess for whether 'wsgi.url_scheme' should be 'http' or 'https'
[ "Return", "a", "guess", "for", "whether", "wsgi", ".", "url_scheme", "should", "be", "http", "or", "https" ]
def guess_scheme(environ): """Return a guess for whether 'wsgi.url_scheme' should be 'http' or 'https' """ if environ.get("HTTPS") in ('yes','on','1'): return 'https' else: return 'http'
[ "def", "guess_scheme", "(", "environ", ")", ":", "if", "environ", ".", "get", "(", "\"HTTPS\"", ")", "in", "(", "'yes'", ",", "'on'", ",", "'1'", ")", ":", "return", "'https'", "else", ":", "return", "'http'" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python3/src/Lib/wsgiref/util.py#L42-L48
tpfister/caffe-heatmap
4db69ef53e6b8a0b3b4ebb29328b0ab3dbf67c4e
python/caffe/detector.py
python
Detector.detect_selective_search
(self, image_fnames)
return self.detect_windows(zip(image_fnames, windows_list))
Do windowed detection over Selective Search proposals by extracting the crop and warping to the input dimensions of the net. Parameters ---------- image_fnames: list Returns ------- detections: list of {filename: image filename, window: crop coordinates, ...
Do windowed detection over Selective Search proposals by extracting the crop and warping to the input dimensions of the net.
[ "Do", "windowed", "detection", "over", "Selective", "Search", "proposals", "by", "extracting", "the", "crop", "and", "warping", "to", "the", "input", "dimensions", "of", "the", "net", "." ]
def detect_selective_search(self, image_fnames): """ Do windowed detection over Selective Search proposals by extracting the crop and warping to the input dimensions of the net. Parameters ---------- image_fnames: list Returns ------- detections:...
[ "def", "detect_selective_search", "(", "self", ",", "image_fnames", ")", ":", "import", "selective_search_ijcv_with_python", "as", "selective_search", "# Make absolute paths so MATLAB can find the files.", "image_fnames", "=", "[", "os", ".", "path", ".", "abspath", "(", ...
https://github.com/tpfister/caffe-heatmap/blob/4db69ef53e6b8a0b3b4ebb29328b0ab3dbf67c4e/python/caffe/detector.py#L101-L123
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python/src/Lib/nntplib.py
python
NNTP.xover
(self, start, end, file=None)
return resp,xover_lines
Process an XOVER command (optional server extension) Arguments: - start: start of range - end: end of range Returns: - resp: server response if successful - list: list of (art-nr, subject, poster, date, id, references, size, lines)
Process an XOVER command (optional server extension) Arguments: - start: start of range - end: end of range Returns: - resp: server response if successful - list: list of (art-nr, subject, poster, date, id, references, size, lines)
[ "Process", "an", "XOVER", "command", "(", "optional", "server", "extension", ")", "Arguments", ":", "-", "start", ":", "start", "of", "range", "-", "end", ":", "end", "of", "range", "Returns", ":", "-", "resp", ":", "server", "response", "if", "successfu...
def xover(self, start, end, file=None): """Process an XOVER command (optional server extension) Arguments: - start: start of range - end: end of range Returns: - resp: server response if successful - list: list of (art-nr, subject, poster, date, i...
[ "def", "xover", "(", "self", ",", "start", ",", "end", ",", "file", "=", "None", ")", ":", "resp", ",", "lines", "=", "self", ".", "longcmd", "(", "'XOVER '", "+", "start", "+", "'-'", "+", "end", ",", "file", ")", "xover_lines", "=", "[", "]", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Lib/nntplib.py#L478-L502
tfwu/FaceDetection-ConvNet-3D
f9251c48eb40c5aec8fba7455115c355466555be
amalgamation/python/mxnet_predict.py
python
load_ndarray_file
(nd_bytes)
Load ndarray file and return as list of numpy array. Parameters ---------- nd_bytes : str or bytes The internal ndarray bytes Returns ------- out : dict of str to numpy array or list of numpy array The output list or dict, depending on whether the saved type is list or dict.
Load ndarray file and return as list of numpy array.
[ "Load", "ndarray", "file", "and", "return", "as", "list", "of", "numpy", "array", "." ]
def load_ndarray_file(nd_bytes): """Load ndarray file and return as list of numpy array. Parameters ---------- nd_bytes : str or bytes The internal ndarray bytes Returns ------- out : dict of str to numpy array or list of numpy array The output list or dict, depending on wh...
[ "def", "load_ndarray_file", "(", "nd_bytes", ")", ":", "handle", "=", "NDListHandle", "(", ")", "olen", "=", "mx_uint", "(", ")", "nd_bytes", "=", "bytearray", "(", "nd_bytes", ")", "ptr", "=", "(", "ctypes", ".", "c_char", "*", "len", "(", "nd_bytes", ...
https://github.com/tfwu/FaceDetection-ConvNet-3D/blob/f9251c48eb40c5aec8fba7455115c355466555be/amalgamation/python/mxnet_predict.py#L168-L210
Tencent/Pebble
68315f176d9e328a233ace29b7579a829f89879f
tools/blade/src/blade/java_jar_target.py
python
JavaJarTarget._prebuilt_java_jar_src_path
(self)
return os.path.join(self.path, '%s.jar' % self.name)
The source path for pre build java jar.
The source path for pre build java jar.
[ "The", "source", "path", "for", "pre", "build", "java", "jar", "." ]
def _prebuilt_java_jar_src_path(self): """The source path for pre build java jar. """ return os.path.join(self.path, '%s.jar' % self.name)
[ "def", "_prebuilt_java_jar_src_path", "(", "self", ")", ":", "return", "os", ".", "path", ".", "join", "(", "self", ".", "path", ",", "'%s.jar'", "%", "self", ".", "name", ")" ]
https://github.com/Tencent/Pebble/blob/68315f176d9e328a233ace29b7579a829f89879f/tools/blade/src/blade/java_jar_target.py#L329-L331
regomne/chinesize
2ae555445046cd28d60a514e30ac1d6eca1c442a
N2System/nsbparser/nsbParser.py
python
NsbParser.pa9
(self)
取模
取模
[ "取模" ]
def pa9(self): '取模' var1=self.stack.pop() self.stack.append('('+self.stack.pop()+' % '+var1+')')
[ "def", "pa9", "(", "self", ")", ":", "var1", "=", "self", ".", "stack", ".", "pop", "(", ")", "self", ".", "stack", ".", "append", "(", "'('", "+", "self", ".", "stack", ".", "pop", "(", ")", "+", "' % '", "+", "var1", "+", "')'", ")" ]
https://github.com/regomne/chinesize/blob/2ae555445046cd28d60a514e30ac1d6eca1c442a/N2System/nsbparser/nsbParser.py#L134-L137
google/earthenterprise
0fe84e29be470cd857e3a0e52e5d0afd5bb8cee9
earth_enterprise/src/google/protobuf-py/google/protobuf/internal/python_message.py
python
_AddPropertiesForRepeatedField
(field, cls)
Adds a public property for a "repeated" protocol message field. Clients can use this property to get the value of the field, which will be either a _RepeatedScalarFieldContainer or _RepeatedCompositeFieldContainer (see below). Note that when clients add values to these containers, we perform type-checking i...
Adds a public property for a "repeated" protocol message field. Clients can use this property to get the value of the field, which will be either a _RepeatedScalarFieldContainer or _RepeatedCompositeFieldContainer (see below).
[ "Adds", "a", "public", "property", "for", "a", "repeated", "protocol", "message", "field", ".", "Clients", "can", "use", "this", "property", "to", "get", "the", "value", "of", "the", "field", "which", "will", "be", "either", "a", "_RepeatedScalarFieldContainer...
def _AddPropertiesForRepeatedField(field, cls): """Adds a public property for a "repeated" protocol message field. Clients can use this property to get the value of the field, which will be either a _RepeatedScalarFieldContainer or _RepeatedCompositeFieldContainer (see below). Note that when clients add val...
[ "def", "_AddPropertiesForRepeatedField", "(", "field", ",", "cls", ")", ":", "proto_field_name", "=", "field", ".", "name", "property_name", "=", "_PropertyName", "(", "proto_field_name", ")", "def", "getter", "(", "self", ")", ":", "field_value", "=", "self", ...
https://github.com/google/earthenterprise/blob/0fe84e29be470cd857e3a0e52e5d0afd5bb8cee9/earth_enterprise/src/google/protobuf-py/google/protobuf/internal/python_message.py#L368-L409
FlightGear/flightgear
cf4801e11c5b69b107f87191584eefda3c5a9b26
scripts/python/TerraSync/terrasync/virtual_path.py
python
VirtualPath.parents
(self)
return tuple(self.generateParents())
The path ancestors. Return an immutable sequence providing access to the logical ancestors of the path. >>> p = VirtualPath('/foo/bar/baz') >>> len(p.parents) 3 >>> p.parents[0] terrasync.virtual_path.VirtualPath('/foo/bar') >>> p.parents[1] terr...
The path ancestors.
[ "The", "path", "ancestors", "." ]
def parents(self): """The path ancestors. Return an immutable sequence providing access to the logical ancestors of the path. >>> p = VirtualPath('/foo/bar/baz') >>> len(p.parents) 3 >>> p.parents[0] terrasync.virtual_path.VirtualPath('/foo/bar') ...
[ "def", "parents", "(", "self", ")", ":", "return", "tuple", "(", "self", ".", "generateParents", "(", ")", ")" ]
https://github.com/FlightGear/flightgear/blob/cf4801e11c5b69b107f87191584eefda3c5a9b26/scripts/python/TerraSync/terrasync/virtual_path.py#L259-L276
CaoWGG/TensorRT-YOLOv4
4d7c2edce99e8794a4cb4ea3540d51ce91158a36
onnx-tensorrt/third_party/onnx/third_party/benchmark/mingw.py
python
root
(location = None, arch = None, version = None, threading = None, exceptions = None, revision = None, log = EmptyLogger())
return root_dir
Returns the root folder of a specific version of the mingw-builds variant of gcc. Will download the compiler if needed
Returns the root folder of a specific version of the mingw-builds variant of gcc. Will download the compiler if needed
[ "Returns", "the", "root", "folder", "of", "a", "specific", "version", "of", "the", "mingw", "-", "builds", "variant", "of", "gcc", ".", "Will", "download", "the", "compiler", "if", "needed" ]
def root(location = None, arch = None, version = None, threading = None, exceptions = None, revision = None, log = EmptyLogger()): ''' Returns the root folder of a specific version of the mingw-builds variant of gcc. Will download the compiler if needed ''' # Get the repository if we don't ...
[ "def", "root", "(", "location", "=", "None", ",", "arch", "=", "None", ",", "version", "=", "None", ",", "threading", "=", "None", ",", "exceptions", "=", "None", ",", "revision", "=", "None", ",", "log", "=", "EmptyLogger", "(", ")", ")", ":", "# ...
https://github.com/CaoWGG/TensorRT-YOLOv4/blob/4d7c2edce99e8794a4cb4ea3540d51ce91158a36/onnx-tensorrt/third_party/onnx/third_party/benchmark/mingw.py#L172-L246
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/AddonManager/addonmanager_utilities.py
python
symlink
(source, link_name)
Creates a symlink of a file, if possible. Note that it fails on most modern Windows installations
Creates a symlink of a file, if possible. Note that it fails on most modern Windows installations
[ "Creates", "a", "symlink", "of", "a", "file", "if", "possible", ".", "Note", "that", "it", "fails", "on", "most", "modern", "Windows", "installations" ]
def symlink(source, link_name): """Creates a symlink of a file, if possible. Note that it fails on most modern Windows installations""" if os.path.exists(link_name) or os.path.lexists(link_name): pass else: os_symlink = getattr(os, "symlink", None) if callable(os_symlink): ...
[ "def", "symlink", "(", "source", ",", "link_name", ")", ":", "if", "os", ".", "path", ".", "exists", "(", "link_name", ")", "or", "os", ".", "path", ".", "lexists", "(", "link_name", ")", ":", "pass", "else", ":", "os_symlink", "=", "getattr", "(", ...
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/AddonManager/addonmanager_utilities.py#L50-L70
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_gdi.py
python
DC.SetClippingRect
(*args, **kwargs)
return _gdi_.DC_SetClippingRect(*args, **kwargs)
SetClippingRect(self, Rect rect) Sets the clipping region for this device context to the intersection of the given region described by the parameters of this method and the previously set clipping region. You should call `DestroyClippingRegion` if you want to set the clipping region exa...
SetClippingRect(self, Rect rect)
[ "SetClippingRect", "(", "self", "Rect", "rect", ")" ]
def SetClippingRect(*args, **kwargs): """ SetClippingRect(self, Rect rect) Sets the clipping region for this device context to the intersection of the given region described by the parameters of this method and the previously set clipping region. You should call `DestroyClipping...
[ "def", "SetClippingRect", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_gdi_", ".", "DC_SetClippingRect", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_gdi.py#L3880-L3895
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/scipy/ndimage/filters.py
python
correlate
(input, weights, output=None, mode='reflect', cval=0.0, origin=0)
return _correlate_or_convolve(input, weights, output, mode, cval, origin, False)
Multi-dimensional correlation. The array is correlated with the given kernel. Parameters ---------- input : array-like input array to filter weights : ndarray array of weights, same number of dimensions as input output : array, optional The ``output`` parameter passes a...
Multi-dimensional correlation.
[ "Multi", "-", "dimensional", "correlation", "." ]
def correlate(input, weights, output=None, mode='reflect', cval=0.0, origin=0): """ Multi-dimensional correlation. The array is correlated with the given kernel. Parameters ---------- input : array-like input array to filter weights : ndarray array of weights,...
[ "def", "correlate", "(", "input", ",", "weights", ",", "output", "=", "None", ",", "mode", "=", "'reflect'", ",", "cval", "=", "0.0", ",", "origin", "=", "0", ")", ":", "return", "_correlate_or_convolve", "(", "input", ",", "weights", ",", "output", ",...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/scipy/ndimage/filters.py#L608-L640
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_misc.py
python
Log.GetActiveTarget
(*args, **kwargs)
return _misc_.Log_GetActiveTarget(*args, **kwargs)
GetActiveTarget() -> Log
GetActiveTarget() -> Log
[ "GetActiveTarget", "()", "-", ">", "Log" ]
def GetActiveTarget(*args, **kwargs): """GetActiveTarget() -> Log""" return _misc_.Log_GetActiveTarget(*args, **kwargs)
[ "def", "GetActiveTarget", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_misc_", ".", "Log_GetActiveTarget", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_misc.py#L1515-L1517
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/threading.py
python
Thread.daemon
(self)
return self.__daemonic
A boolean value indicating whether this thread is a daemon thread (True) or not (False). This must be set before start() is called, otherwise RuntimeError is raised. Its initial value is inherited from the creating thread; the main thread is not a daemon thread and therefore all threads created...
A boolean value indicating whether this thread is a daemon thread (True) or not (False).
[ "A", "boolean", "value", "indicating", "whether", "this", "thread", "is", "a", "daemon", "thread", "(", "True", ")", "or", "not", "(", "False", ")", "." ]
def daemon(self): """A boolean value indicating whether this thread is a daemon thread (True) or not (False). This must be set before start() is called, otherwise RuntimeError is raised. Its initial value is inherited from the creating thread; the main thread is not a daemon thread and ...
[ "def", "daemon", "(", "self", ")", ":", "assert", "self", ".", "__initialized", ",", "\"Thread.__init__() not called\"", "return", "self", ".", "__daemonic" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/threading.py#L1007-L1020
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/dateutil/rrule.py
python
rrulebase.between
(self, after, before, inc=False, count=1)
return l
Returns all the occurrences of the rrule between after and before. The inc keyword defines what happens if after and/or before are themselves occurrences. With inc=True, they will be included in the list, if they are found in the recurrence set.
Returns all the occurrences of the rrule between after and before. The inc keyword defines what happens if after and/or before are themselves occurrences. With inc=True, they will be included in the list, if they are found in the recurrence set.
[ "Returns", "all", "the", "occurrences", "of", "the", "rrule", "between", "after", "and", "before", ".", "The", "inc", "keyword", "defines", "what", "happens", "if", "after", "and", "/", "or", "before", "are", "themselves", "occurrences", ".", "With", "inc", ...
def between(self, after, before, inc=False, count=1): """ Returns all the occurrences of the rrule between after and before. The inc keyword defines what happens if after and/or before are themselves occurrences. With inc=True, they will be included in the list, if they are found in the ...
[ "def", "between", "(", "self", ",", "after", ",", "before", ",", "inc", "=", "False", ",", "count", "=", "1", ")", ":", "if", "self", ".", "_cache_complete", ":", "gen", "=", "self", ".", "_cache", "else", ":", "gen", "=", "self", "started", "=", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/dateutil/rrule.py#L269-L300
domino-team/openwrt-cc
8b181297c34d14d3ca521cc9f31430d561dbc688
package/gli-pub/openwrt-node-packages-master/node/node-v6.9.1/tools/gyp/pylib/gyp/msvs_emulation.py
python
_FindDirectXInstallation
()
return dxsdk_dir
Try to find an installation location for the DirectX SDK. Check for the standard environment variable, and if that doesn't exist, try to find via the registry. May return None if not found in either location.
Try to find an installation location for the DirectX SDK. Check for the standard environment variable, and if that doesn't exist, try to find via the registry. May return None if not found in either location.
[ "Try", "to", "find", "an", "installation", "location", "for", "the", "DirectX", "SDK", ".", "Check", "for", "the", "standard", "environment", "variable", "and", "if", "that", "doesn", "t", "exist", "try", "to", "find", "via", "the", "registry", ".", "May",...
def _FindDirectXInstallation(): """Try to find an installation location for the DirectX SDK. Check for the standard environment variable, and if that doesn't exist, try to find via the registry. May return None if not found in either location.""" # Return previously calculated value, if there is one if hasatt...
[ "def", "_FindDirectXInstallation", "(", ")", ":", "# Return previously calculated value, if there is one", "if", "hasattr", "(", "_FindDirectXInstallation", ",", "'dxsdk_dir'", ")", ":", "return", "_FindDirectXInstallation", ".", "dxsdk_dir", "dxsdk_dir", "=", "os", ".", ...
https://github.com/domino-team/openwrt-cc/blob/8b181297c34d14d3ca521cc9f31430d561dbc688/package/gli-pub/openwrt-node-packages-master/node/node-v6.9.1/tools/gyp/pylib/gyp/msvs_emulation.py#L116-L135
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/tkinter/ttk.py
python
tclobjs_to_py
(adict)
return adict
Returns adict with its values converted from Tcl objects to Python objects.
Returns adict with its values converted from Tcl objects to Python objects.
[ "Returns", "adict", "with", "its", "values", "converted", "from", "Tcl", "objects", "to", "Python", "objects", "." ]
def tclobjs_to_py(adict): """Returns adict with its values converted from Tcl objects to Python objects.""" for opt, val in adict.items(): adict[opt] = _tclobj_to_py(val) return adict
[ "def", "tclobjs_to_py", "(", "adict", ")", ":", "for", "opt", ",", "val", "in", "adict", ".", "items", "(", ")", ":", "adict", "[", "opt", "]", "=", "_tclobj_to_py", "(", "val", ")", "return", "adict" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/tkinter/ttk.py#L337-L343
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_core.py
python
Rect2D.SetLeftTop
(*args, **kwargs)
return _core_.Rect2D_SetLeftTop(*args, **kwargs)
SetLeftTop(self, Point2D pt)
SetLeftTop(self, Point2D pt)
[ "SetLeftTop", "(", "self", "Point2D", "pt", ")" ]
def SetLeftTop(*args, **kwargs): """SetLeftTop(self, Point2D pt)""" return _core_.Rect2D_SetLeftTop(*args, **kwargs)
[ "def", "SetLeftTop", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "Rect2D_SetLeftTop", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_core.py#L1907-L1909
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/contrib/predictor/predictor_factories.py
python
from_contrib_estimator
(estimator, prediction_input_fn, input_alternative_key=None, output_alternative_key=None, graph=None)
return contrib_estimator_predictor.ContribEstimatorPredictor( estimator, prediction_input_fn, input_alternative_key, output_alternative_key, graph)
Constructs a `Predictor` from a `tf.contrib.learn.Estimator`. Args: estimator: an instance of `tf.contrib.learn.Estimator`. prediction_input_fn: a function that takes no arguments and returns an instance of `InputFnOps`. input_alternative_key: Optional. Specify the input alternative used for ...
Constructs a `Predictor` from a `tf.contrib.learn.Estimator`.
[ "Constructs", "a", "Predictor", "from", "a", "tf", ".", "contrib", ".", "learn", ".", "Estimator", "." ]
def from_contrib_estimator(estimator, prediction_input_fn, input_alternative_key=None, output_alternative_key=None, graph=None): """Constructs a `Predictor` from a `tf.contrib.learn.Estimator`. Args: est...
[ "def", "from_contrib_estimator", "(", "estimator", ",", "prediction_input_fn", ",", "input_alternative_key", "=", "None", ",", "output_alternative_key", "=", "None", ",", "graph", "=", "None", ")", ":", "if", "isinstance", "(", "estimator", ",", "core_estimator", ...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/contrib/predictor/predictor_factories.py#L28-L64
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_vendor/requests/models.py
python
Response.next
(self)
return self._next
Returns a PreparedRequest for the next request in a redirect chain, if there is one.
Returns a PreparedRequest for the next request in a redirect chain, if there is one.
[ "Returns", "a", "PreparedRequest", "for", "the", "next", "request", "in", "a", "redirect", "chain", "if", "there", "is", "one", "." ]
def next(self): """Returns a PreparedRequest for the next request in a redirect chain, if there is one.""" return self._next
[ "def", "next", "(", "self", ")", ":", "return", "self", ".", "_next" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_vendor/requests/models.py#L1445-L1449
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/contrib/learn/python/learn/dataframe/tensorflow_dataframe.py
python
TensorFlowDataFrame.from_csv_with_feature_spec
(cls, filepatterns, feature_spec, has_header=True, column_names=None, num_threads=1, enqueue_size=None, ...
return dataframe
Create a `DataFrame` from CSV files, given a feature_spec. If `has_header` is false, then `column_names` must be specified. If `has_header` is true and `column_names` are specified, then `column_names` overrides the names in the header. Args: filepatterns: a list of file patterns that resolve to...
Create a `DataFrame` from CSV files, given a feature_spec.
[ "Create", "a", "DataFrame", "from", "CSV", "files", "given", "a", "feature_spec", "." ]
def from_csv_with_feature_spec(cls, filepatterns, feature_spec, has_header=True, column_names=None, num_threads=1, enqueue...
[ "def", "from_csv_with_feature_spec", "(", "cls", ",", "filepatterns", ",", "feature_spec", ",", "has_header", "=", "True", ",", "column_names", "=", "None", ",", "num_threads", "=", "1", ",", "enqueue_size", "=", "None", ",", "batch_size", "=", "32", ",", "q...
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/contrib/learn/python/learn/dataframe/tensorflow_dataframe.py#L381-L438
generalized-intelligence/GAAS
29ab17d3e8a4ba18edef3a57c36d8db6329fac73
algorithms/src/LocalizationAndMapping/icp_lidar_localization/fast_gicp/thirdparty/pybind11/pybind11/setup_helpers.py
python
ParallelCompile.function
(self)
return compile_function
Builds a function object usable as distutils.ccompiler.CCompiler.compile.
Builds a function object usable as distutils.ccompiler.CCompiler.compile.
[ "Builds", "a", "function", "object", "usable", "as", "distutils", ".", "ccompiler", ".", "CCompiler", ".", "compile", "." ]
def function(self): """ Builds a function object usable as distutils.ccompiler.CCompiler.compile. """ def compile_function( compiler, sources, output_dir=None, macros=None, include_dirs=None, debug=0, ex...
[ "def", "function", "(", "self", ")", ":", "def", "compile_function", "(", "compiler", ",", "sources", ",", "output_dir", "=", "None", ",", "macros", "=", "None", ",", "include_dirs", "=", "None", ",", "debug", "=", "0", ",", "extra_preargs", "=", "None",...
https://github.com/generalized-intelligence/GAAS/blob/29ab17d3e8a4ba18edef3a57c36d8db6329fac73/algorithms/src/LocalizationAndMapping/icp_lidar_localization/fast_gicp/thirdparty/pybind11/pybind11/setup_helpers.py#L372-L433
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
third_party/protobuf/python/mox.py
python
MockObject.__init__
(self, class_to_mock)
Initialize a mock object. This determines the methods and properties of the class and stores them. Args: # class_to_mock: class to be mocked class_to_mock: class
Initialize a mock object.
[ "Initialize", "a", "mock", "object", "." ]
def __init__(self, class_to_mock): """Initialize a mock object. This determines the methods and properties of the class and stores them. Args: # class_to_mock: class to be mocked class_to_mock: class """ # This is used to hack around the mixin/inheritance of MockAnything, which # ...
[ "def", "__init__", "(", "self", ",", "class_to_mock", ")", ":", "# This is used to hack around the mixin/inheritance of MockAnything, which", "# is not a proper object (it can be anything. :-)", "MockAnything", ".", "__dict__", "[", "'__init__'", "]", "(", "self", ")", "# Get a...
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/third_party/protobuf/python/mox.py#L362-L384
apache/arrow
af33dd1157eb8d7d9bfac25ebf61445b793b7943
python/pyarrow/orc.py
python
ORCFile.file_postscript_length
(self)
return self.reader.file_postscript_length()
The number of bytes in the file postscript
The number of bytes in the file postscript
[ "The", "number", "of", "bytes", "in", "the", "file", "postscript" ]
def file_postscript_length(self): """The number of bytes in the file postscript""" return self.reader.file_postscript_length()
[ "def", "file_postscript_length", "(", "self", ")", ":", "return", "self", ".", "reader", ".", "file_postscript_length", "(", ")" ]
https://github.com/apache/arrow/blob/af33dd1157eb8d7d9bfac25ebf61445b793b7943/python/pyarrow/orc.py#L121-L123
OPAE/opae-sdk
221124343c8275243a249eb72d69e0ea2d568d1b
python/opae.admin/opae/admin/sysfs.py
python
sysfs_node.node
(self, *nodes)
return sysfs_node(path)
node Gets a new sysfs_node object using the given paths. Args: *nodes: A list of paths to join with the first one being relative to the path of this node. Returns: A sysfs_node object representing the final path derived from joining the path of this node...
node Gets a new sysfs_node object using the given paths.
[ "node", "Gets", "a", "new", "sysfs_node", "object", "using", "the", "given", "paths", "." ]
def node(self, *nodes): """node Gets a new sysfs_node object using the given paths. Args: *nodes: A list of paths to join with the first one being relative to the path of this node. Returns: A sysfs_node object representing the final path derived from ...
[ "def", "node", "(", "self", ",", "*", "nodes", ")", ":", "path", "=", "os", ".", "path", ".", "join", "(", "self", ".", "_sysfs_path", ",", "*", "nodes", ")", "if", "not", "os", ".", "path", ".", "exists", "(", "path", ")", ":", "raise", "NameE...
https://github.com/OPAE/opae-sdk/blob/221124343c8275243a249eb72d69e0ea2d568d1b/python/opae.admin/opae/admin/sysfs.py#L65-L82
neoml-lib/neoml
a0d370fba05269a1b2258cef126f77bbd2054a3e
NeoML/samples/python/cifar10.py
python
fuse_batch_norm
(dnn, block_name)
Fuses batch_norm into convolution As a result reduces inference time Should be used after training
Fuses batch_norm into convolution As a result reduces inference time Should be used after training
[ "Fuses", "batch_norm", "into", "convolution", "As", "a", "result", "reduces", "inference", "time", "Should", "be", "used", "after", "training" ]
def fuse_batch_norm(dnn, block_name): """Fuses batch_norm into convolution As a result reduces inference time Should be used after training """ bn_name = block_name + '_bn' if not dnn.has_layer(bn_name): # Batch norm has already been fused return bn_layer = dnn.layers[bn_name...
[ "def", "fuse_batch_norm", "(", "dnn", ",", "block_name", ")", ":", "bn_name", "=", "block_name", "+", "'_bn'", "if", "not", "dnn", ".", "has_layer", "(", "bn_name", ")", ":", "# Batch norm has already been fused", "return", "bn_layer", "=", "dnn", ".", "layers...
https://github.com/neoml-lib/neoml/blob/a0d370fba05269a1b2258cef126f77bbd2054a3e/NeoML/samples/python/cifar10.py#L238-L257
intel-iot-devkit/how-to-code-samples
b4ea616f36bbfa2e042beb1698f968cfd651d79f
alarm-clock/python/iot_alarm_clock/runner.py
python
Runner.serve_css
(self)
return static_file(resource_path, root=package_root)
Serve the 'styles.css' file.
Serve the 'styles.css' file.
[ "Serve", "the", "styles", ".", "css", "file", "." ]
def serve_css(self): """ Serve the 'styles.css' file. """ resource_package = __name__ resource_path = "styles.css" package_root = resource_filename(resource_package, "") return static_file(resource_path, root=package_root)
[ "def", "serve_css", "(", "self", ")", ":", "resource_package", "=", "__name__", "resource_path", "=", "\"styles.css\"", "package_root", "=", "resource_filename", "(", "resource_package", ",", "\"\"", ")", "return", "static_file", "(", "resource_path", ",", "root", ...
https://github.com/intel-iot-devkit/how-to-code-samples/blob/b4ea616f36bbfa2e042beb1698f968cfd651d79f/alarm-clock/python/iot_alarm_clock/runner.py#L232-L241
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/AWSPythonSDK/1.5.8/docutils/io.py
python
NullOutput.write
(self, data)
Do nothing ([don't even] send data to the bit bucket).
Do nothing ([don't even] send data to the bit bucket).
[ "Do", "nothing", "(", "[", "don", "t", "even", "]", "send", "data", "to", "the", "bit", "bucket", ")", "." ]
def write(self, data): """Do nothing ([don't even] send data to the bit bucket).""" pass
[ "def", "write", "(", "self", ",", "data", ")", ":", "pass" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/AWSPythonSDK/1.5.8/docutils/io.py#L473-L475
hughperkins/tf-coriander
970d3df6c11400ad68405f22b0c42a52374e94ca
tensorflow/python/summary/impl/reservoir.py
python
Reservoir.FilterItems
(self, filterFn, key=None)
Filter items within a Reservoir, using a filtering function. Args: filterFn: A function that returns True for the items to be kept. key: An optional bucket key to filter. If not specified, will filter all all buckets. Returns: The number of items removed.
Filter items within a Reservoir, using a filtering function.
[ "Filter", "items", "within", "a", "Reservoir", "using", "a", "filtering", "function", "." ]
def FilterItems(self, filterFn, key=None): """Filter items within a Reservoir, using a filtering function. Args: filterFn: A function that returns True for the items to be kept. key: An optional bucket key to filter. If not specified, will filter all all buckets. Returns: The num...
[ "def", "FilterItems", "(", "self", ",", "filterFn", ",", "key", "=", "None", ")", ":", "with", "self", ".", "_mutex", ":", "if", "key", ":", "if", "key", "in", "self", ".", "_buckets", ":", "return", "self", ".", "_buckets", "[", "key", "]", ".", ...
https://github.com/hughperkins/tf-coriander/blob/970d3df6c11400ad68405f22b0c42a52374e94ca/tensorflow/python/summary/impl/reservoir.py#L120-L139
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/idlelib/help.py
python
HelpParser.handle_data
(self, data)
Handle date segments in help.html.
Handle date segments in help.html.
[ "Handle", "date", "segments", "in", "help", ".", "html", "." ]
def handle_data(self, data): "Handle date segments in help.html." if self.show and not self.hdrlink: d = data if self.pre else data.replace('\n', ' ') if self.tags == 'h1': try: self.hprefix = d[0:d.index(' ')] except ValueError...
[ "def", "handle_data", "(", "self", ",", "data", ")", ":", "if", "self", ".", "show", "and", "not", "self", ".", "hdrlink", ":", "d", "=", "data", "if", "self", ".", "pre", "else", "data", ".", "replace", "(", "'\\n'", ",", "' '", ")", "if", "self...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/idlelib/help.py#L151-L165
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/ir.py
python
FunctionIR.get_definition
(self, value, lhs_only=False)
Get the definition site for the given variable name or instance. A Expr instance is returned by default, but if lhs_only is set to True, the left-hand-side variable is returned instead.
Get the definition site for the given variable name or instance. A Expr instance is returned by default, but if lhs_only is set to True, the left-hand-side variable is returned instead.
[ "Get", "the", "definition", "site", "for", "the", "given", "variable", "name", "or", "instance", ".", "A", "Expr", "instance", "is", "returned", "by", "default", "but", "if", "lhs_only", "is", "set", "to", "True", "the", "left", "-", "hand", "-", "side",...
def get_definition(self, value, lhs_only=False): """ Get the definition site for the given variable name or instance. A Expr instance is returned by default, but if lhs_only is set to True, the left-hand-side variable is returned instead. """ lhs = value while Tru...
[ "def", "get_definition", "(", "self", ",", "value", ",", "lhs_only", "=", "False", ")", ":", "lhs", "=", "value", "while", "True", ":", "if", "isinstance", "(", "value", ",", "Var", ")", ":", "lhs", "=", "value", "name", "=", "value", ".", "name", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/ir.py#L1402-L1425
hughperkins/tf-coriander
970d3df6c11400ad68405f22b0c42a52374e94ca
tensorflow/python/ops/sparse_ops.py
python
sparse_reset_shape
(sp_input, new_shape=None)
return ops.SparseTensor(in_indices, in_values, output_shape_tensor)
Resets the shape of a `SparseTensor` with indices and values unchanged. If `new_shape` is None, returns a copy of `sp_input` with its shape reset to the tight bounding box of `sp_input`. If `new_shape` is provided, then it must be larger or equal in all dimensions compared to the shape of `sp_input`. When thi...
Resets the shape of a `SparseTensor` with indices and values unchanged.
[ "Resets", "the", "shape", "of", "a", "SparseTensor", "with", "indices", "and", "values", "unchanged", "." ]
def sparse_reset_shape(sp_input, new_shape=None): """Resets the shape of a `SparseTensor` with indices and values unchanged. If `new_shape` is None, returns a copy of `sp_input` with its shape reset to the tight bounding box of `sp_input`. If `new_shape` is provided, then it must be larger or equal in all dim...
[ "def", "sparse_reset_shape", "(", "sp_input", ",", "new_shape", "=", "None", ")", ":", "sp_input", "=", "_convert_to_sparse_tensor", "(", "sp_input", ")", "in_indices", "=", "array_ops", ".", "identity", "(", "sp_input", ".", "indices", ")", "in_values", "=", ...
https://github.com/hughperkins/tf-coriander/blob/970d3df6c11400ad68405f22b0c42a52374e94ca/tensorflow/python/ops/sparse_ops.py#L901-L982
pmq20/node-packer
12c46c6e44fbc14d9ee645ebd17d5296b324f7e0
current/deps/v8/tools/grokdump.py
python
InspectionShell.do_do_trans
(self, address)
Print a transition array in a readable format.
Print a transition array in a readable format.
[ "Print", "a", "transition", "array", "in", "a", "readable", "format", "." ]
def do_do_trans(self, address): """ Print a transition array in a readable format. """ start = self.ParseAddressExpr(address) if ((start & 1) == 1): start = start - 1 TransitionArray(FixedArray(self.heap, None, start)).Print(Printer())
[ "def", "do_do_trans", "(", "self", ",", "address", ")", ":", "start", "=", "self", ".", "ParseAddressExpr", "(", "address", ")", "if", "(", "(", "start", "&", "1", ")", "==", "1", ")", ":", "start", "=", "start", "-", "1", "TransitionArray", "(", "...
https://github.com/pmq20/node-packer/blob/12c46c6e44fbc14d9ee645ebd17d5296b324f7e0/current/deps/v8/tools/grokdump.py#L3614-L3620
openvinotoolkit/openvino
dedcbeafa8b84cccdc55ca64b8da516682b381c7
tools/cross_check_tool/openvino/tools/cross_check_tool/utils.py
python
find_out_cct_mode
(args)
1 -- one IR mode 2 -- two IRs mode 3 -- dump mode 4 -- load mode
1 -- one IR mode 2 -- two IRs mode 3 -- dump mode 4 -- load mode
[ "1", "--", "one", "IR", "mode", "2", "--", "two", "IRs", "mode", "3", "--", "dump", "mode", "4", "--", "load", "mode" ]
def find_out_cct_mode(args): """ 1 -- one IR mode 2 -- two IRs mode 3 -- dump mode 4 -- load mode """ # dump mode if args.dump and args.model is not None and args.device is not None and \ args.reference_model is None and args.reference_device is None: return 3 # l...
[ "def", "find_out_cct_mode", "(", "args", ")", ":", "# dump mode", "if", "args", ".", "dump", "and", "args", ".", "model", "is", "not", "None", "and", "args", ".", "device", "is", "not", "None", "and", "args", ".", "reference_model", "is", "None", "and", ...
https://github.com/openvinotoolkit/openvino/blob/dedcbeafa8b84cccdc55ca64b8da516682b381c7/tools/cross_check_tool/openvino/tools/cross_check_tool/utils.py#L253-L273
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/python/ops/tensor_array_ops.py
python
_TensorArrayCloseShape
(op)
return []
Shape function for ops that take a scalar and produce no outputs.
Shape function for ops that take a scalar and produce no outputs.
[ "Shape", "function", "for", "ops", "that", "take", "a", "scalar", "and", "produce", "no", "outputs", "." ]
def _TensorArrayCloseShape(op): """Shape function for ops that take a scalar and produce no outputs.""" op.inputs[0].get_shape().merge_with(tensor_shape.vector(2)) return []
[ "def", "_TensorArrayCloseShape", "(", "op", ")", ":", "op", ".", "inputs", "[", "0", "]", ".", "get_shape", "(", ")", ".", "merge_with", "(", "tensor_shape", ".", "vector", "(", "2", ")", ")", "return", "[", "]" ]
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/python/ops/tensor_array_ops.py#L410-L413
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python/src/Lib/cookielib.py
python
parse_ns_headers
(ns_headers)
return result
Ad-hoc parser for Netscape protocol cookie-attributes. The old Netscape cookie format for Set-Cookie can for instance contain an unquoted "," in the expires field, so we have to use this ad-hoc parser instead of split_header_words. XXX This may not make the best possible effort to parse all the crap ...
Ad-hoc parser for Netscape protocol cookie-attributes.
[ "Ad", "-", "hoc", "parser", "for", "Netscape", "protocol", "cookie", "-", "attributes", "." ]
def parse_ns_headers(ns_headers): """Ad-hoc parser for Netscape protocol cookie-attributes. The old Netscape cookie format for Set-Cookie can for instance contain an unquoted "," in the expires field, so we have to use this ad-hoc parser instead of split_header_words. XXX This may not make the bes...
[ "def", "parse_ns_headers", "(", "ns_headers", ")", ":", "known_attrs", "=", "(", "\"expires\"", ",", "\"domain\"", ",", "\"path\"", ",", "\"secure\"", ",", "# RFC 2109 attrs (may turn up in Netscape cookies, too)", "\"version\"", ",", "\"port\"", ",", "\"max-age\"", ")"...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Lib/cookielib.py#L444-L509
jsupancic/deep_hand_pose
22cbeae1a8410ff5d37c060c7315719d0a5d608f
python/caffe/io.py
python
Transformer.set_input_scale
(self, in_, scale)
Set the scale of preprocessed inputs s.t. the blob = blob * scale. N.B. input_scale is done AFTER mean subtraction and other preprocessing while raw_scale is done BEFORE. Parameters ---------- in_ : which input to assign this scale factor scale : scale coefficient
Set the scale of preprocessed inputs s.t. the blob = blob * scale. N.B. input_scale is done AFTER mean subtraction and other preprocessing while raw_scale is done BEFORE.
[ "Set", "the", "scale", "of", "preprocessed", "inputs", "s", ".", "t", ".", "the", "blob", "=", "blob", "*", "scale", ".", "N", ".", "B", ".", "input_scale", "is", "done", "AFTER", "mean", "subtraction", "and", "other", "preprocessing", "while", "raw_scal...
def set_input_scale(self, in_, scale): """ Set the scale of preprocessed inputs s.t. the blob = blob * scale. N.B. input_scale is done AFTER mean subtraction and other preprocessing while raw_scale is done BEFORE. Parameters ---------- in_ : which input to assign...
[ "def", "set_input_scale", "(", "self", ",", "in_", ",", "scale", ")", ":", "self", ".", "__check_input", "(", "in_", ")", "self", ".", "input_scale", "[", "in_", "]", "=", "scale" ]
https://github.com/jsupancic/deep_hand_pose/blob/22cbeae1a8410ff5d37c060c7315719d0a5d608f/python/caffe/io.py#L258-L270
memo/ofxMSATensorFlow
512a6e9a929e397c0bddf8bf86ea7521a22dd593
example-mnist/bin/py/input_data.py
python
dense_to_one_hot
(labels_dense, num_classes=10)
return labels_one_hot
Convert class labels from scalars to one-hot vectors.
Convert class labels from scalars to one-hot vectors.
[ "Convert", "class", "labels", "from", "scalars", "to", "one", "-", "hot", "vectors", "." ]
def dense_to_one_hot(labels_dense, num_classes=10): """Convert class labels from scalars to one-hot vectors.""" num_labels = labels_dense.shape[0] index_offset = numpy.arange(num_labels) * num_classes labels_one_hot = numpy.zeros((num_labels, num_classes)) labels_one_hot.flat[index_offset + labels_dense.ravel...
[ "def", "dense_to_one_hot", "(", "labels_dense", ",", "num_classes", "=", "10", ")", ":", "num_labels", "=", "labels_dense", ".", "shape", "[", "0", "]", "index_offset", "=", "numpy", ".", "arange", "(", "num_labels", ")", "*", "num_classes", "labels_one_hot", ...
https://github.com/memo/ofxMSATensorFlow/blob/512a6e9a929e397c0bddf8bf86ea7521a22dd593/example-mnist/bin/py/input_data.py#L69-L75
yrnkrn/zapcc
c6a8aa30006d997eff0d60fd37b0e62b8aa0ea50
tools/clang/bindings/python/clang/cindex.py
python
Cursor.is_virtual_method
(self)
return conf.lib.clang_CXXMethod_isVirtual(self)
Returns True if the cursor refers to a C++ member function or member function template that is declared 'virtual'.
Returns True if the cursor refers to a C++ member function or member function template that is declared 'virtual'.
[ "Returns", "True", "if", "the", "cursor", "refers", "to", "a", "C", "++", "member", "function", "or", "member", "function", "template", "that", "is", "declared", "virtual", "." ]
def is_virtual_method(self): """Returns True if the cursor refers to a C++ member function or member function template that is declared 'virtual'. """ return conf.lib.clang_CXXMethod_isVirtual(self)
[ "def", "is_virtual_method", "(", "self", ")", ":", "return", "conf", ".", "lib", ".", "clang_CXXMethod_isVirtual", "(", "self", ")" ]
https://github.com/yrnkrn/zapcc/blob/c6a8aa30006d997eff0d60fd37b0e62b8aa0ea50/tools/clang/bindings/python/clang/cindex.py#L1476-L1480
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/grid.py
python
Grid.YToEdgeOfRow
(*args, **kwargs)
return _grid.Grid_YToEdgeOfRow(*args, **kwargs)
YToEdgeOfRow(self, int y) -> int
YToEdgeOfRow(self, int y) -> int
[ "YToEdgeOfRow", "(", "self", "int", "y", ")", "-", ">", "int" ]
def YToEdgeOfRow(*args, **kwargs): """YToEdgeOfRow(self, int y) -> int""" return _grid.Grid_YToEdgeOfRow(*args, **kwargs)
[ "def", "YToEdgeOfRow", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_grid", ".", "Grid_YToEdgeOfRow", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/grid.py#L1394-L1396
cyberbotics/webots
af7fa7d68dcf7b4550f1f2e132092b41e83698fc
projects/default/controllers/sumo_supervisor/Objects.py
python
Vehicle.get_motorcycle_models_list
()
return MOTORCYCLE_MODEL
Get the string list of motorcycle models.
Get the string list of motorcycle models.
[ "Get", "the", "string", "list", "of", "motorcycle", "models", "." ]
def get_motorcycle_models_list(): """Get the string list of motorcycle models.""" return MOTORCYCLE_MODEL
[ "def", "get_motorcycle_models_list", "(", ")", ":", "return", "MOTORCYCLE_MODEL" ]
https://github.com/cyberbotics/webots/blob/af7fa7d68dcf7b4550f1f2e132092b41e83698fc/projects/default/controllers/sumo_supervisor/Objects.py#L247-L249
Harick1/caffe-yolo
eea92bf3ddfe4d0ff6b0b3ba9b15c029a83ed9a3
python/caffe/classifier.py
python
Classifier.predict
(self, inputs, oversample=True)
return predictions
Predict classification probabilities of inputs. Parameters ---------- inputs : iterable of (H x W x K) input ndarrays. oversample : boolean average predictions across center, corners, and mirrors when True (default). Center-only prediction when False. Re...
Predict classification probabilities of inputs.
[ "Predict", "classification", "probabilities", "of", "inputs", "." ]
def predict(self, inputs, oversample=True): """ Predict classification probabilities of inputs. Parameters ---------- inputs : iterable of (H x W x K) input ndarrays. oversample : boolean average predictions across center, corners, and mirrors whe...
[ "def", "predict", "(", "self", ",", "inputs", ",", "oversample", "=", "True", ")", ":", "# Scale to standardize input dimensions.", "input_", "=", "np", ".", "zeros", "(", "(", "len", "(", "inputs", ")", ",", "self", ".", "image_dims", "[", "0", "]", ","...
https://github.com/Harick1/caffe-yolo/blob/eea92bf3ddfe4d0ff6b0b3ba9b15c029a83ed9a3/python/caffe/classifier.py#L47-L98
rsummers11/CADLab
976ed959a0b5208bb4173127a7ef732ac73a9b6f
panreas_hnn/hed-globalweight/scripts/cpp_lint.py
python
CheckVlogArguments
(filename, clean_lines, linenum, error)
Checks that VLOG() is only used for defining a logging level. For example, VLOG(2) is correct. VLOG(INFO), VLOG(WARNING), VLOG(ERROR), and VLOG(FATAL) are not. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to ...
Checks that VLOG() is only used for defining a logging level.
[ "Checks", "that", "VLOG", "()", "is", "only", "used", "for", "defining", "a", "logging", "level", "." ]
def CheckVlogArguments(filename, clean_lines, linenum, error): """Checks that VLOG() is only used for defining a logging level. For example, VLOG(2) is correct. VLOG(INFO), VLOG(WARNING), VLOG(ERROR), and VLOG(FATAL) are not. Args: filename: The name of the current file. clean_lines: A CleansedLines i...
[ "def", "CheckVlogArguments", "(", "filename", ",", "clean_lines", ",", "linenum", ",", "error", ")", ":", "line", "=", "clean_lines", ".", "elided", "[", "linenum", "]", "if", "Search", "(", "r'\\bVLOG\\((INFO|ERROR|WARNING|DFATAL|FATAL)\\)'", ",", "line", ")", ...
https://github.com/rsummers11/CADLab/blob/976ed959a0b5208bb4173127a7ef732ac73a9b6f/panreas_hnn/hed-globalweight/scripts/cpp_lint.py#L1708-L1724
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_core.py
python
VersionInfo.GetName
(*args, **kwargs)
return _core_.VersionInfo_GetName(*args, **kwargs)
GetName(self) -> String
GetName(self) -> String
[ "GetName", "(", "self", ")", "-", ">", "String" ]
def GetName(*args, **kwargs): """GetName(self) -> String""" return _core_.VersionInfo_GetName(*args, **kwargs)
[ "def", "GetName", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "VersionInfo_GetName", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_core.py#L16565-L16567
raymondlu/super-animation-samples
04234269112ff0dc32447f27a761dbbb00b8ba17
samples/cocos2d-x-3.1/CocosLuaGame2/frameworks/cocos2d-x/tools/bindings-generator/backup/clang-llvm-3.3-pybinding/cindex.py
python
Cursor.get_usr
(self)
return conf.lib.clang_getCursorUSR(self)
Return the Unified Symbol Resultion (USR) for the entity referenced by the given cursor (or None). A Unified Symbol Resolution (USR) is a string that identifies a particular entity (function, class, variable, etc.) within a program. USRs can be compared across translation units to deter...
Return the Unified Symbol Resultion (USR) for the entity referenced by the given cursor (or None).
[ "Return", "the", "Unified", "Symbol", "Resultion", "(", "USR", ")", "for", "the", "entity", "referenced", "by", "the", "given", "cursor", "(", "or", "None", ")", "." ]
def get_usr(self): """Return the Unified Symbol Resultion (USR) for the entity referenced by the given cursor (or None). A Unified Symbol Resolution (USR) is a string that identifies a particular entity (function, class, variable, etc.) within a program. USRs can be compared acr...
[ "def", "get_usr", "(", "self", ")", ":", "return", "conf", ".", "lib", ".", "clang_getCursorUSR", "(", "self", ")" ]
https://github.com/raymondlu/super-animation-samples/blob/04234269112ff0dc32447f27a761dbbb00b8ba17/samples/cocos2d-x-3.1/CocosLuaGame2/frameworks/cocos2d-x/tools/bindings-generator/backup/clang-llvm-3.3-pybinding/cindex.py#L1086-L1095
PaddlePaddle/Paddle
1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c
python/paddle/nn/layer/container.py
python
LayerDict.pop
(self, key)
return v
Remove the key from the LayerDict and return the layer of the key. Parameters: key (str): the key to be removed. Examples: .. code-block:: python import paddle from collections import OrderedDict sublayers = OrderedDict([ ...
Remove the key from the LayerDict and return the layer of the key.
[ "Remove", "the", "key", "from", "the", "LayerDict", "and", "return", "the", "layer", "of", "the", "key", "." ]
def pop(self, key): """ Remove the key from the LayerDict and return the layer of the key. Parameters: key (str): the key to be removed. Examples: .. code-block:: python import paddle from collections import OrderedDict ...
[ "def", "pop", "(", "self", ",", "key", ")", ":", "v", "=", "self", "[", "key", "]", "del", "self", "[", "key", "]", "return", "v" ]
https://github.com/PaddlePaddle/Paddle/blob/1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c/python/paddle/nn/layer/container.py#L120-L150
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/tkinter/__init__.py
python
XView.xview_scroll
(self, number, what)
Shift the x-view according to NUMBER which is measured in "units" or "pages" (WHAT).
Shift the x-view according to NUMBER which is measured in "units" or "pages" (WHAT).
[ "Shift", "the", "x", "-", "view", "according", "to", "NUMBER", "which", "is", "measured", "in", "units", "or", "pages", "(", "WHAT", ")", "." ]
def xview_scroll(self, number, what): """Shift the x-view according to NUMBER which is measured in "units" or "pages" (WHAT).""" self.tk.call(self._w, 'xview', 'scroll', number, what)
[ "def", "xview_scroll", "(", "self", ",", "number", ",", "what", ")", ":", "self", ".", "tk", ".", "call", "(", "self", ".", "_w", ",", "'xview'", ",", "'scroll'", ",", "number", ",", "what", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/tkinter/__init__.py#L1727-L1730
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/third_party/lib_aarch64/python2.7/dist-packages/rospkg/manifest.py
python
Depend.__init__
(self, name, type_)
Create new depend instance. :param name: dependency name (e.g. package/stack). Must be non-empty @type name: str :param type_: dependency type, e.g. 'package', 'stack'. Must be non-empty. @type type_: str @raise ValueError: if parameters are invalid
Create new depend instance. :param name: dependency name (e.g. package/stack). Must be non-empty
[ "Create", "new", "depend", "instance", ".", ":", "param", "name", ":", "dependency", "name", "(", "e", ".", "g", ".", "package", "/", "stack", ")", ".", "Must", "be", "non", "-", "empty" ]
def __init__(self, name, type_): """ Create new depend instance. :param name: dependency name (e.g. package/stack). Must be non-empty @type name: str :param type_: dependency type, e.g. 'package', 'stack'. Must be non-empty. @type type_: str @raise Val...
[ "def", "__init__", "(", "self", ",", "name", ",", "type_", ")", ":", "if", "not", "name", ":", "raise", "ValueError", "(", "\"bad '%s' attribute\"", "%", "(", "type_", ")", ")", "if", "not", "type_", ":", "raise", "ValueError", "(", "\"type_ must be specif...
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/third_party/lib_aarch64/python2.7/dist-packages/rospkg/manifest.py#L245-L260
Kitware/ParaView
f760af9124ff4634b23ebbeab95a4f56e0261955
Wrapping/Python/paraview/apps/_internals.py
python
find_webapp
(appname)
return None
Returns the path to the is web app with given name is found in the package.
Returns the path to the is web app with given name is found in the package.
[ "Returns", "the", "path", "to", "the", "is", "web", "app", "with", "given", "name", "is", "found", "in", "the", "package", "." ]
def find_webapp(appname): """Returns the path to the is web app with given name is found in the package.""" if platform.system() == "Darwin": root = "Resources/" else: from paraview.servermanager import vtkSMProxyManager pv_version= "%d.%d" % (vtkSMProxyManager.GetVersionMajor(), v...
[ "def", "find_webapp", "(", "appname", ")", ":", "if", "platform", ".", "system", "(", ")", "==", "\"Darwin\"", ":", "root", "=", "\"Resources/\"", "else", ":", "from", "paraview", ".", "servermanager", "import", "vtkSMProxyManager", "pv_version", "=", "\"%d.%d...
https://github.com/Kitware/ParaView/blob/f760af9124ff4634b23ebbeab95a4f56e0261955/Wrapping/Python/paraview/apps/_internals.py#L4-L19
apache/qpid-proton
6bcdfebb55ea3554bc29b1901422532db331a591
python/proton/_handlers.py
python
MessagingHandler.on_sendable
(self, event: Event)
Called when the sender link has credit and messages can therefore be transferred. :param event: The underlying event object. Use this to obtain further information on the event.
Called when the sender link has credit and messages can therefore be transferred.
[ "Called", "when", "the", "sender", "link", "has", "credit", "and", "messages", "can", "therefore", "be", "transferred", "." ]
def on_sendable(self, event: Event) -> None: """ Called when the sender link has credit and messages can therefore be transferred. :param event: The underlying event object. Use this to obtain further information on the event. """ pass
[ "def", "on_sendable", "(", "self", ",", "event", ":", "Event", ")", "->", "None", ":", "pass" ]
https://github.com/apache/qpid-proton/blob/6bcdfebb55ea3554bc29b1901422532db331a591/python/proton/_handlers.py#L825-L833
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/klampt/src/robotsim.py
python
PointCloud.setProperties
(self, *args)
return _robotsim.PointCloud_setProperties(self, *args)
r""" setProperties(PointCloud self, double * np_array2) setProperties(PointCloud self, int pindex, double * np_array) Sets property pindex of all points to the given length-n array.
r""" setProperties(PointCloud self, double * np_array2) setProperties(PointCloud self, int pindex, double * np_array)
[ "r", "setProperties", "(", "PointCloud", "self", "double", "*", "np_array2", ")", "setProperties", "(", "PointCloud", "self", "int", "pindex", "double", "*", "np_array", ")" ]
def setProperties(self, *args) -> "void": r""" setProperties(PointCloud self, double * np_array2) setProperties(PointCloud self, int pindex, double * np_array) Sets property pindex of all points to the given length-n array. """ return _robotsim.PointCloud_setProperti...
[ "def", "setProperties", "(", "self", ",", "*", "args", ")", "->", "\"void\"", ":", "return", "_robotsim", ".", "PointCloud_setProperties", "(", "self", ",", "*", "args", ")" ]
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/klampt/src/robotsim.py#L1274-L1283
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/setuptools/msvc.py
python
RegistryInfo.visualstudio
(self)
return 'VisualStudio'
Microsoft Visual Studio root registry key. Return ------ str Registry key
Microsoft Visual Studio root registry key.
[ "Microsoft", "Visual", "Studio", "root", "registry", "key", "." ]
def visualstudio(self): """ Microsoft Visual Studio root registry key. Return ------ str Registry key """ return 'VisualStudio'
[ "def", "visualstudio", "(", "self", ")", ":", "return", "'VisualStudio'" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/setuptools/msvc.py#L502-L511
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_core.py
python
MenuItem.IsSeparator
(*args, **kwargs)
return _core_.MenuItem_IsSeparator(*args, **kwargs)
IsSeparator(self) -> bool
IsSeparator(self) -> bool
[ "IsSeparator", "(", "self", ")", "-", ">", "bool" ]
def IsSeparator(*args, **kwargs): """IsSeparator(self) -> bool""" return _core_.MenuItem_IsSeparator(*args, **kwargs)
[ "def", "IsSeparator", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "MenuItem_IsSeparator", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_core.py#L12459-L12461
google/syzygy
8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5
third_party/numpy/files/numpy/polynomial/hermite.py
python
hermfit
(x, y, deg, rcond=None, full=False, w=None)
Least squares fit of Hermite series to data. Fit a Hermite series ``p(x) = p[0] * P_{0}(x) + ... + p[deg] * P_{deg}(x)`` of degree `deg` to points `(x, y)`. Returns a vector of coefficients `p` that minimises the squared error. Parameters ---------- x : array_like, shape (M,) x-coordin...
Least squares fit of Hermite series to data.
[ "Least", "squares", "fit", "of", "Hermite", "series", "to", "data", "." ]
def hermfit(x, y, deg, rcond=None, full=False, w=None): """ Least squares fit of Hermite series to data. Fit a Hermite series ``p(x) = p[0] * P_{0}(x) + ... + p[deg] * P_{deg}(x)`` of degree `deg` to points `(x, y)`. Returns a vector of coefficients `p` that minimises the squared error. Parame...
[ "def", "hermfit", "(", "x", ",", "y", ",", "deg", ",", "rcond", "=", "None", ",", "full", "=", "False", ",", "w", "=", "None", ")", ":", "order", "=", "int", "(", "deg", ")", "+", "1", "x", "=", "np", ".", "asarray", "(", "x", ")", "+", "...
https://github.com/google/syzygy/blob/8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5/third_party/numpy/files/numpy/polynomial/hermite.py#L918-L1076