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
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_misc.py
python
AboutDialogInfo._GetWebSiteURL
(*args, **kwargs)
return _misc_.AboutDialogInfo__GetWebSiteURL(*args, **kwargs)
_GetWebSiteURL(self) -> String
_GetWebSiteURL(self) -> String
[ "_GetWebSiteURL", "(", "self", ")", "-", ">", "String" ]
def _GetWebSiteURL(*args, **kwargs): """_GetWebSiteURL(self) -> String""" return _misc_.AboutDialogInfo__GetWebSiteURL(*args, **kwargs)
[ "def", "_GetWebSiteURL", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_misc_", ".", "AboutDialogInfo__GetWebSiteURL", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_misc.py#L6767-L6769
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/lite/python/op_hint.py
python
_LiteAggregateOperand.aggregate_and_return_name_for_input
(self, out_graphdef)
This adds the nodes to out_graphdef and returns an aggregated output. In particular, if you have 4 inputs to a hint stub, this will be the node that you can use as an output. I.e. you have 4 timesteps from a static rnn, then a fused UnidirectionalLSTM will expect 1 input with all 4 time steps. So here ...
This adds the nodes to out_graphdef and returns an aggregated output.
[ "This", "adds", "the", "nodes", "to", "out_graphdef", "and", "returns", "an", "aggregated", "output", "." ]
def aggregate_and_return_name_for_input(self, out_graphdef): """This adds the nodes to out_graphdef and returns an aggregated output. In particular, if you have 4 inputs to a hint stub, this will be the node that you can use as an output. I.e. you have 4 timesteps from a static rnn, then a fused Unidir...
[ "def", "aggregate_and_return_name_for_input", "(", "self", ",", "out_graphdef", ")", ":", "flattened", "=", "self", ".", "flatten_nodes", "(", ")", "if", "(", "self", ".", "aggregation", "==", "OpHint", ".", "AGGREGATE_FIRST", ")", "or", "(", "self", ".", "a...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/lite/python/op_hint.py#L583-L613
klzgrad/naiveproxy
ed2c513637c77b18721fe428d7ed395b4d284c83
src/build/toolchain/apple/linker_driver.py
python
LinkerDriver.run
(self)
Runs the linker driver, separating out the main compiler driver's arguments from the ones handled by this class. It then invokes the required tools, starting with the compiler driver to produce the linker output.
Runs the linker driver, separating out the main compiler driver's arguments from the ones handled by this class. It then invokes the required tools, starting with the compiler driver to produce the linker output.
[ "Runs", "the", "linker", "driver", "separating", "out", "the", "main", "compiler", "driver", "s", "arguments", "from", "the", "ones", "handled", "by", "this", "class", ".", "It", "then", "invokes", "the", "required", "tools", "starting", "with", "the", "comp...
def run(self): """Runs the linker driver, separating out the main compiler driver's arguments from the ones handled by this class. It then invokes the required tools, starting with the compiler driver to produce the linker output. """ # Collect arguments to the linker dri...
[ "def", "run", "(", "self", ")", ":", "# Collect arguments to the linker driver (this script) and remove them", "# from the arguments being passed to the compiler driver.", "linker_driver_actions", "=", "{", "}", "compiler_driver_args", "=", "[", "]", "for", "index", ",", "arg",...
https://github.com/klzgrad/naiveproxy/blob/ed2c513637c77b18721fe428d7ed395b4d284c83/src/build/toolchain/apple/linker_driver.py#L85-L130
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/Draft/draftguitools/gui_trimex.py
python
Trimex.GetResources
(self)
return {'Pixmap': 'Draft_Trimex', 'Accel': "T, R", 'MenuText': QT_TRANSLATE_NOOP("Draft_Trimex", "Trimex"), 'ToolTip': QT_TRANSLATE_NOOP("Draft_Trimex", "Trims or extends the selected object, or extrudes single" + " faces.\nCTRL sna...
Set icon, menu and tooltip.
Set icon, menu and tooltip.
[ "Set", "icon", "menu", "and", "tooltip", "." ]
def GetResources(self): """Set icon, menu and tooltip.""" return {'Pixmap': 'Draft_Trimex', 'Accel': "T, R", 'MenuText': QT_TRANSLATE_NOOP("Draft_Trimex", "Trimex"), 'ToolTip': QT_TRANSLATE_NOOP("Draft_Trimex", "Trims or extends the se...
[ "def", "GetResources", "(", "self", ")", ":", "return", "{", "'Pixmap'", ":", "'Draft_Trimex'", ",", "'Accel'", ":", "\"T, R\"", ",", "'MenuText'", ":", "QT_TRANSLATE_NOOP", "(", "\"Draft_Trimex\"", ",", "\"Trimex\"", ")", ",", "'ToolTip'", ":", "QT_TRANSLATE_NO...
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Draft/draftguitools/gui_trimex.py#L71-L80
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/gsutil/third_party/boto/boto/gs/bucket.py
python
Bucket.set_canned_acl
(self, acl_str, key_name='', headers=None, version_id=None, generation=None, if_generation=None, if_metageneration=None)
return self._set_acl_helper(acl_str, key_name, headers, query_args, generation, if_generation, if_metageneration, canned=True)
Sets a bucket's or objects's ACL using a predefined (canned) value. :type acl_str: string :param acl_str: A canned ACL string. See :data:`~.gs.acl.CannedACLStrings`. :type key_name: string :param key_name: A key name within the bucket to set the ACL for. If not ...
Sets a bucket's or objects's ACL using a predefined (canned) value.
[ "Sets", "a", "bucket", "s", "or", "objects", "s", "ACL", "using", "a", "predefined", "(", "canned", ")", "value", "." ]
def set_canned_acl(self, acl_str, key_name='', headers=None, version_id=None, generation=None, if_generation=None, if_metageneration=None): """Sets a bucket's or objects's ACL using a predefined (canned) value. :type acl_str: string :param acl_str: ...
[ "def", "set_canned_acl", "(", "self", ",", "acl_str", ",", "key_name", "=", "''", ",", "headers", "=", "None", ",", "version_id", "=", "None", ",", "generation", "=", "None", ",", "if_generation", "=", "None", ",", "if_metageneration", "=", "None", ")", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/gsutil/third_party/boto/boto/gs/bucket.py#L489-L528
apple/swift-lldb
d74be846ef3e62de946df343e8c234bde93a8912
utils/vim-lldb/python-vim-lldb/vim_panes.py
python
PaneLayout.hide
(self, panes=[])
Hide panes specified. If empty list provided, hide all.
Hide panes specified. If empty list provided, hide all.
[ "Hide", "panes", "specified", ".", "If", "empty", "list", "provided", "hide", "all", "." ]
def hide(self, panes=[]): """ Hide panes specified. If empty list provided, hide all. """ for name in self.panes: if name in panes or len(panes) == 0: self.panes[name].destroy()
[ "def", "hide", "(", "self", ",", "panes", "=", "[", "]", ")", ":", "for", "name", "in", "self", ".", "panes", ":", "if", "name", "in", "panes", "or", "len", "(", "panes", ")", "==", "0", ":", "self", ".", "panes", "[", "name", "]", ".", "dest...
https://github.com/apple/swift-lldb/blob/d74be846ef3e62de946df343e8c234bde93a8912/utils/vim-lldb/python-vim-lldb/vim_panes.py#L212-L216
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/roc/hsadrv/driver.py
python
Driver.implicit_sync
(self)
Implicit synchronization for all asynchronous streams across all devices.
Implicit synchronization for all asynchronous streams across all devices.
[ "Implicit", "synchronization", "for", "all", "asynchronous", "streams", "across", "all", "devices", "." ]
def implicit_sync(self): """ Implicit synchronization for all asynchronous streams across all devices. """ _logger.info("implicit sync") for st in self._active_streams: st.synchronize()
[ "def", "implicit_sync", "(", "self", ")", ":", "_logger", ".", "info", "(", "\"implicit sync\"", ")", "for", "st", "in", "self", ".", "_active_streams", ":", "st", ".", "synchronize", "(", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/roc/hsadrv/driver.py#L347-L354
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/Draft/draftguitools/gui_trackers.py
python
rectangleTracker.getSize
(self)
return ((DraftVecUtils.project(diag, self.u)).Length, (DraftVecUtils.project(diag, self.v)).Length)
Return (length, width) of the rectangle.
Return (length, width) of the rectangle.
[ "Return", "(", "length", "width", ")", "of", "the", "rectangle", "." ]
def getSize(self): """Return (length, width) of the rectangle.""" p1 = Vector(self.coords.point.getValues()[0].getValue()) p2 = Vector(self.coords.point.getValues()[2].getValue()) diag = p2.sub(p1) return ((DraftVecUtils.project(diag, self.u)).Length, (DraftVecUti...
[ "def", "getSize", "(", "self", ")", ":", "p1", "=", "Vector", "(", "self", ".", "coords", ".", "point", ".", "getValues", "(", ")", "[", "0", "]", ".", "getValue", "(", ")", ")", "p2", "=", "Vector", "(", "self", ".", "coords", ".", "point", "....
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Draft/draftguitools/gui_trackers.py#L292-L298
KhronosGroup/SPIRV-LLVM
1eb85593f3fe2c39379b9a9b088d51eda4f42b8b
bindings/python/llvm/disassembler.py
python
Disassembler.get_instruction
(self, source, pc=0)
return (result, out_str.value)
Obtain the next instruction from an input source. The input source should be a str or bytearray or something that represents a sequence of bytes. This function will start reading bytes from the beginning of the source. The pc argument specifies the address that the first byte ...
Obtain the next instruction from an input source.
[ "Obtain", "the", "next", "instruction", "from", "an", "input", "source", "." ]
def get_instruction(self, source, pc=0): """Obtain the next instruction from an input source. The input source should be a str or bytearray or something that represents a sequence of bytes. This function will start reading bytes from the beginning of the source. The pc...
[ "def", "get_instruction", "(", "self", ",", "source", ",", "pc", "=", "0", ")", ":", "buf", "=", "cast", "(", "c_char_p", "(", "source", ")", ",", "POINTER", "(", "c_ubyte", ")", ")", "out_str", "=", "cast", "(", "(", "c_byte", "*", "255", ")", "...
https://github.com/KhronosGroup/SPIRV-LLVM/blob/1eb85593f3fe2c39379b9a9b088d51eda4f42b8b/bindings/python/llvm/disassembler.py#L84-L107
trilinos/Trilinos
6168be6dd51e35e1cd681e9c4b24433e709df140
packages/seacas/scripts/exomerge2.py
python
ExodusModel._get_closest_point_distance_brute
(self, points)
return dist
Return the distance between the two closest points.
Return the distance between the two closest points.
[ "Return", "the", "distance", "between", "the", "two", "closest", "points", "." ]
def _get_closest_point_distance_brute(self, points): """Return the distance between the two closest points.""" point_count = len(points) dist = sys.float_info.max for i in range(1, point_count): for j in range(i): dist = min(dist, self._distance_between(points...
[ "def", "_get_closest_point_distance_brute", "(", "self", ",", "points", ")", ":", "point_count", "=", "len", "(", "points", ")", "dist", "=", "sys", ".", "float_info", ".", "max", "for", "i", "in", "range", "(", "1", ",", "point_count", ")", ":", "for", ...
https://github.com/trilinos/Trilinos/blob/6168be6dd51e35e1cd681e9c4b24433e709df140/packages/seacas/scripts/exomerge2.py#L8430-L8438
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/mimify.py
python
mimify_part
(ifile, ofile, is_mime)
Convert an 8bit part of a MIME mail message to quoted-printable.
Convert an 8bit part of a MIME mail message to quoted-printable.
[ "Convert", "an", "8bit", "part", "of", "a", "MIME", "mail", "message", "to", "quoted", "-", "printable", "." ]
def mimify_part(ifile, ofile, is_mime): """Convert an 8bit part of a MIME mail message to quoted-printable.""" has_cte = is_qp = is_base64 = 0 multipart = None must_quote_body = must_quote_header = has_iso_chars = 0 header = [] header_end = '' message = [] message_end = '' # read he...
[ "def", "mimify_part", "(", "ifile", ",", "ofile", ",", "is_mime", ")", ":", "has_cte", "=", "is_qp", "=", "is_base64", "=", "0", "multipart", "=", "None", "must_quote_body", "=", "must_quote_header", "=", "has_iso_chars", "=", "0", "header", "=", "[", "]",...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/mimify.py#L280-L413
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/_vendor/pyparsing.py
python
ParserElement.suppress
( self )
return Suppress( self )
Suppresses the output of this C{ParserElement}; useful to keep punctuation from cluttering up returned output.
Suppresses the output of this C{ParserElement}; useful to keep punctuation from cluttering up returned output.
[ "Suppresses", "the", "output", "of", "this", "C", "{", "ParserElement", "}", ";", "useful", "to", "keep", "punctuation", "from", "cluttering", "up", "returned", "output", "." ]
def suppress( self ): """ Suppresses the output of this C{ParserElement}; useful to keep punctuation from cluttering up returned output. """ return Suppress( self )
[ "def", "suppress", "(", "self", ")", ":", "return", "Suppress", "(", "self", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/_vendor/pyparsing.py#L2045-L2050
neoml-lib/neoml
a0d370fba05269a1b2258cef126f77bbd2054a3e
NeoML/Python/neoml/Dnn/Data.py
python
Data.set_blob
(self, blob)
Sets the blob with data.
Sets the blob with data.
[ "Sets", "the", "blob", "with", "data", "." ]
def set_blob(self, blob): """Sets the blob with data. """ self._internal.set_blob(blob._internal)
[ "def", "set_blob", "(", "self", ",", "blob", ")", ":", "self", ".", "_internal", ".", "set_blob", "(", "blob", ".", "_internal", ")" ]
https://github.com/neoml-lib/neoml/blob/a0d370fba05269a1b2258cef126f77bbd2054a3e/NeoML/Python/neoml/Dnn/Data.py#L47-L50
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/utils/misc.py
python
pairwise
(iterable)
return zip_longest(iterable, iterable)
Return paired elements. For example: s -> (s0, s1), (s2, s3), (s4, s5), ...
Return paired elements.
[ "Return", "paired", "elements", "." ]
def pairwise(iterable): # type: (Iterable[Any]) -> Iterator[Tuple[Any, Any]] """ Return paired elements. For example: s -> (s0, s1), (s2, s3), (s4, s5), ... """ iterable = iter(iterable) return zip_longest(iterable, iterable)
[ "def", "pairwise", "(", "iterable", ")", ":", "# type: (Iterable[Any]) -> Iterator[Tuple[Any, Any]]", "iterable", "=", "iter", "(", "iterable", ")", "return", "zip_longest", "(", "iterable", ",", "iterable", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/utils/misc.py#L903-L912
mapnik/mapnik
f3da900c355e1d15059c4a91b00203dcc9d9f0ef
scons/scons-local-4.1.0/SCons/Tool/msvc.py
python
validate_vars
(env)
Validate the PCH and PCHSTOP construction variables.
Validate the PCH and PCHSTOP construction variables.
[ "Validate", "the", "PCH", "and", "PCHSTOP", "construction", "variables", "." ]
def validate_vars(env): """Validate the PCH and PCHSTOP construction variables.""" if 'PCH' in env and env['PCH']: if 'PCHSTOP' not in env: raise SCons.Errors.UserError("The PCHSTOP construction must be defined if PCH is defined.") if not SCons.Util.is_String(env['PCHSTOP']): ...
[ "def", "validate_vars", "(", "env", ")", ":", "if", "'PCH'", "in", "env", "and", "env", "[", "'PCH'", "]", ":", "if", "'PCHSTOP'", "not", "in", "env", ":", "raise", "SCons", ".", "Errors", ".", "UserError", "(", "\"The PCHSTOP construction must be defined if...
https://github.com/mapnik/mapnik/blob/f3da900c355e1d15059c4a91b00203dcc9d9f0ef/scons/scons-local-4.1.0/SCons/Tool/msvc.py#L54-L60
InsightSoftwareConsortium/ITK
87acfce9a93d928311c38bc371b666b515b9f19d
Wrapping/Generators/Python/itk/support/extras.py
python
set_nthreads
(number_of_threads: int)
Support convenient set of the number of threads. Use example (in python): import itk itk.set_nthreads(4) ## use 4 threads
Support convenient set of the number of threads. Use example (in python): import itk itk.set_nthreads(4) ## use 4 threads
[ "Support", "convenient", "set", "of", "the", "number", "of", "threads", ".", "Use", "example", "(", "in", "python", ")", ":", "import", "itk", "itk", ".", "set_nthreads", "(", "4", ")", "##", "use", "4", "threads" ]
def set_nthreads(number_of_threads: int) -> None: """ Support convenient set of the number of threads. Use example (in python): import itk itk.set_nthreads(4) ## use 4 threads """ assert number_of_threads > 0, ( "Please set a positive number of threads instead of %d" % numbe...
[ "def", "set_nthreads", "(", "number_of_threads", ":", "int", ")", "->", "None", ":", "assert", "number_of_threads", ">", "0", ",", "(", "\"Please set a positive number of threads instead of %d\"", "%", "number_of_threads", ")", "import", "itk", "threader", "=", "itk",...
https://github.com/InsightSoftwareConsortium/ITK/blob/87acfce9a93d928311c38bc371b666b515b9f19d/Wrapping/Generators/Python/itk/support/extras.py#L135-L149
rapidsai/cudf
d5b2448fc69f17509304d594f029d0df56984962
python/cudf/cudf/core/groupby/groupby.py
python
GroupBy.cummax
(self)
return self.agg("cummax")
Get the column-wise cumulative maximum value in each group.
Get the column-wise cumulative maximum value in each group.
[ "Get", "the", "column", "-", "wise", "cumulative", "maximum", "value", "in", "each", "group", "." ]
def cummax(self): """Get the column-wise cumulative maximum value in each group.""" return self.agg("cummax")
[ "def", "cummax", "(", "self", ")", ":", "return", "self", ".", "agg", "(", "\"cummax\"", ")" ]
https://github.com/rapidsai/cudf/blob/d5b2448fc69f17509304d594f029d0df56984962/python/cudf/cudf/core/groupby/groupby.py#L1029-L1031
miyosuda/TensorFlowAndroidDemo
35903e0221aa5f109ea2dbef27f20b52e317f42d
jni-build/jni/include/tensorflow/python/ops/session_ops.py
python
TensorHandle._get_reader_key
(handle)
return handle_parts[0] + ";" + handle_parts[-1]
The graph key for reader.
The graph key for reader.
[ "The", "graph", "key", "for", "reader", "." ]
def _get_reader_key(handle): """The graph key for reader.""" handle_parts = str(handle).split(";") return handle_parts[0] + ";" + handle_parts[-1]
[ "def", "_get_reader_key", "(", "handle", ")", ":", "handle_parts", "=", "str", "(", "handle", ")", ".", "split", "(", "\";\"", ")", "return", "handle_parts", "[", "0", "]", "+", "\";\"", "+", "handle_parts", "[", "-", "1", "]" ]
https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/python/ops/session_ops.py#L104-L107
papyrussolution/OpenPapyrus
bbfb5ec2ea2109b8e2f125edd838e12eaf7b8b91
Src/OSF/xapian/xapian-maintainer-tools/audit.py
python
SourceChecker.join_slashed_lines
(self, lines)
return newlines
Join lines terminated with \ together
Join lines terminated with \ together
[ "Join", "lines", "terminated", "with", "\\", "together" ]
def join_slashed_lines(self, lines): "Join lines terminated with \ together" newlines = [] had_slash = False for line in lines: if had_slash: newlines[-1] += line else: newlines.append(line) had_slash = False ...
[ "def", "join_slashed_lines", "(", "self", ",", "lines", ")", ":", "newlines", "=", "[", "]", "had_slash", "=", "False", "for", "line", "in", "lines", ":", "if", "had_slash", ":", "newlines", "[", "-", "1", "]", "+=", "line", "else", ":", "newlines", ...
https://github.com/papyrussolution/OpenPapyrus/blob/bbfb5ec2ea2109b8e2f125edd838e12eaf7b8b91/Src/OSF/xapian/xapian-maintainer-tools/audit.py#L292-L306
protocolbuffers/protobuf
b5ab0b7a18b7336c60130f4ddb2d97c51792f896
python/google/protobuf/internal/well_known_types.py
python
Any.TypeName
(self)
return self.type_url.split('/')[-1]
Returns the protobuf type name of the inner message.
Returns the protobuf type name of the inner message.
[ "Returns", "the", "protobuf", "type", "name", "of", "the", "inner", "message", "." ]
def TypeName(self): """Returns the protobuf type name of the inner message.""" # Only last part is to be used: b/25630112 return self.type_url.split('/')[-1]
[ "def", "TypeName", "(", "self", ")", ":", "# Only last part is to be used: b/25630112", "return", "self", ".", "type_url", ".", "split", "(", "'/'", ")", "[", "-", "1", "]" ]
https://github.com/protocolbuffers/protobuf/blob/b5ab0b7a18b7336c60130f4ddb2d97c51792f896/python/google/protobuf/internal/well_known_types.py#L82-L85
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/tkinter/__init__.py
python
Misc.winfo_class
(self)
return self.tk.call('winfo', 'class', self._w)
Return window class name of this widget.
Return window class name of this widget.
[ "Return", "window", "class", "name", "of", "this", "widget", "." ]
def winfo_class(self): """Return window class name of this widget.""" return self.tk.call('winfo', 'class', self._w)
[ "def", "winfo_class", "(", "self", ")", ":", "return", "self", ".", "tk", ".", "call", "(", "'winfo'", ",", "'class'", ",", "self", ".", "_w", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/tkinter/__init__.py#L968-L970
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py2/pandas/core/indexes/datetimelike.py
python
DatetimeIndexOpsMixin._summary
(self, name=None)
return result
Return a summarized representation. Parameters ---------- name : str name to use in the summary representation Returns ------- String with a summarized representation of the index
Return a summarized representation.
[ "Return", "a", "summarized", "representation", "." ]
def _summary(self, name=None): """ Return a summarized representation. Parameters ---------- name : str name to use in the summary representation Returns ------- String with a summarized representation of the index """ formatt...
[ "def", "_summary", "(", "self", ",", "name", "=", "None", ")", ":", "formatter", "=", "self", ".", "_formatter_func", "if", "len", "(", "self", ")", ">", "0", ":", "index_summary", "=", "', %s to %s'", "%", "(", "formatter", "(", "self", "[", "0", "]...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py2/pandas/core/indexes/datetimelike.py#L548-L577
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/Path/PathScripts/PathSlot.py
python
ObjectSlot._processFeature
(self, obj, shape, sub, pNum)
return False
_processFeature(obj, shape, sub, pNum)... This function analyzes a shape and returns a three item tuple containing: working point, shape orientation/slope, shape category as face, edge, or vert.
_processFeature(obj, shape, sub, pNum)... This function analyzes a shape and returns a three item tuple containing: working point, shape orientation/slope, shape category as face, edge, or vert.
[ "_processFeature", "(", "obj", "shape", "sub", "pNum", ")", "...", "This", "function", "analyzes", "a", "shape", "and", "returns", "a", "three", "item", "tuple", "containing", ":", "working", "point", "shape", "orientation", "/", "slope", "shape", "category", ...
def _processFeature(self, obj, shape, sub, pNum): """_processFeature(obj, shape, sub, pNum)... This function analyzes a shape and returns a three item tuple containing: working point, shape orientation/slope, shape category as face, edge, or vert.""" p = None ...
[ "def", "_processFeature", "(", "self", ",", "obj", ",", "shape", ",", "sub", ",", "pNum", ")", ":", "p", "=", "None", "dYdX", "=", "None", "cat", "=", "sub", "[", ":", "4", "]", "PathLog", ".", "debug", "(", "'sub-feature is {}'", ".", "format", "(...
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Path/PathScripts/PathSlot.py#L1165-L1234
crosslife/OpenBird
9e0198a1a2295f03fa1e8676e216e22c9c7d380b
cocos2d/tools/bindings-generator/clang/cindex.py
python
Cursor.get_children_array
(self)
return children
Return an iterator for accessing the children of this cursor.
Return an iterator for accessing the children of this cursor.
[ "Return", "an", "iterator", "for", "accessing", "the", "children", "of", "this", "cursor", "." ]
def get_children_array(self): """Return an iterator for accessing the children of this cursor.""" # FIXME: Expose iteration from CIndex, PR6125. def visitor(child, parent, children): # FIXME: Document this assertion in API. # FIXME: There should just be an isNull method....
[ "def", "get_children_array", "(", "self", ")", ":", "# FIXME: Expose iteration from CIndex, PR6125.", "def", "visitor", "(", "child", ",", "parent", ",", "children", ")", ":", "# FIXME: Document this assertion in API.", "# FIXME: There should just be an isNull method.", "assert...
https://github.com/crosslife/OpenBird/blob/9e0198a1a2295f03fa1e8676e216e22c9c7d380b/cocos2d/tools/bindings-generator/clang/cindex.py#L1457-L1473
SequoiaDB/SequoiaDB
2894ed7e5bd6fe57330afc900cf76d0ff0df9f64
driver/python/pysequoiadb/client.py
python
client.disconnect
(self)
disconnect to current server. Exceptions: pysequoiadb.error.SDBBaseError
disconnect to current server.
[ "disconnect", "to", "current", "server", "." ]
def disconnect(self): """disconnect to current server. Exceptions: pysequoiadb.error.SDBBaseError """ rc = sdb.sdb_disconnect(self._client) raise_if_error(rc, "Failed to disconnect") # success to disconnect self.__host = self.HOST self.__servi...
[ "def", "disconnect", "(", "self", ")", ":", "rc", "=", "sdb", ".", "sdb_disconnect", "(", "self", ".", "_client", ")", "raise_if_error", "(", "rc", ",", "\"Failed to disconnect\"", ")", "# success to disconnect", "self", ".", "__host", "=", "self", ".", "HOS...
https://github.com/SequoiaDB/SequoiaDB/blob/2894ed7e5bd6fe57330afc900cf76d0ff0df9f64/driver/python/pysequoiadb/client.py#L401-L413
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/gsutil/gslib/name_expansion.py
python
_NameExpansionIterator.__iter__
(self)
Iterates over all source URLs passed to the iterator. For each src url, expands wildcards, object-less bucket names, subdir bucket names, and directory names, and generates a flat listing of all the matching objects/files. You should instantiate this object using the static factory function NameEx...
Iterates over all source URLs passed to the iterator.
[ "Iterates", "over", "all", "source", "URLs", "passed", "to", "the", "iterator", "." ]
def __iter__(self): """Iterates over all source URLs passed to the iterator. For each src url, expands wildcards, object-less bucket names, subdir bucket names, and directory names, and generates a flat listing of all the matching objects/files. You should instantiate this object using the static ...
[ "def", "__iter__", "(", "self", ")", ":", "for", "url_str", "in", "self", ".", "url_strs", ":", "storage_url", "=", "StorageUrlFromString", "(", "url_str", ")", "if", "storage_url", ".", "IsFileUrl", "(", ")", "and", "storage_url", ".", "IsStream", "(", ")...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/gsutil/gslib/name_expansion.py#L151-L280
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/distutils/ccompiler.py
python
CCompiler._fix_lib_args
(self, libraries, library_dirs, runtime_library_dirs)
return (libraries, library_dirs, runtime_library_dirs)
Typecheck and fix up some of the arguments supplied to the 'link_*' methods. Specifically: ensure that all arguments are lists, and augment them with their permanent versions (eg. 'self.libraries' augments 'libraries'). Return a tuple with fixed versions of all arguments.
Typecheck and fix up some of the arguments supplied to the 'link_*' methods. Specifically: ensure that all arguments are lists, and augment them with their permanent versions (eg. 'self.libraries' augments 'libraries'). Return a tuple with fixed versions of all arguments.
[ "Typecheck", "and", "fix", "up", "some", "of", "the", "arguments", "supplied", "to", "the", "link_", "*", "methods", ".", "Specifically", ":", "ensure", "that", "all", "arguments", "are", "lists", "and", "augment", "them", "with", "their", "permanent", "vers...
def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs): """Typecheck and fix up some of the arguments supplied to the 'link_*' methods. Specifically: ensure that all arguments are lists, and augment them with their permanent versions (eg. 'self.libraries' augments 'libra...
[ "def", "_fix_lib_args", "(", "self", ",", "libraries", ",", "library_dirs", ",", "runtime_library_dirs", ")", ":", "if", "libraries", "is", "None", ":", "libraries", "=", "self", ".", "libraries", "elif", "isinstance", "(", "libraries", ",", "(", "list", ","...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/distutils/ccompiler.py#L427-L459
CNugteren/CLBlast
4500a03440e2cc54998c0edab366babf5e504d67
scripts/generator/generator/routine.py
python
Routine.buffer_def_wrapper_cuda
(self, name, flavour)
return []
As above but for CUDA
As above but for CUDA
[ "As", "above", "but", "for", "CUDA" ]
def buffer_def_wrapper_cuda(self, name, flavour): """As above but for CUDA""" prefix = "const " if name in self.inputs else "" if name in self.inputs or name in self.outputs: a = [prefix + flavour.buffer_type + "* " + name + "_buffer"] b = ["const size_t " + name + "_offs...
[ "def", "buffer_def_wrapper_cuda", "(", "self", ",", "name", ",", "flavour", ")", ":", "prefix", "=", "\"const \"", "if", "name", "in", "self", ".", "inputs", "else", "\"\"", "if", "name", "in", "self", ".", "inputs", "or", "name", "in", "self", ".", "o...
https://github.com/CNugteren/CLBlast/blob/4500a03440e2cc54998c0edab366babf5e504d67/scripts/generator/generator/routine.py#L291-L299
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/ogl/_basic.py
python
Shape.GetTextColour
(self, regionId = 0)
return self._regions[regionId].GetColour()
Get the colour for the specified text region.
Get the colour for the specified text region.
[ "Get", "the", "colour", "for", "the", "specified", "text", "region", "." ]
def GetTextColour(self, regionId = 0): """Get the colour for the specified text region.""" if regionId >= len(self._regions): return "" return self._regions[regionId].GetColour()
[ "def", "GetTextColour", "(", "self", ",", "regionId", "=", "0", ")", ":", "if", "regionId", ">=", "len", "(", "self", ".", "_regions", ")", ":", "return", "\"\"", "return", "self", ".", "_regions", "[", "regionId", "]", ".", "GetColour", "(", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/ogl/_basic.py#L648-L652
vgteam/vg
cf4d516a5e9ee5163c783e4437ddf16b18a4b561
scripts/filter_variants_on_repeats.py
python
main
(args)
return 0
Parses command line arguments and do the work of the program. "args" specifies the program arguments, with args[0] being the executable name. The return value should be used as the program's exit code.
Parses command line arguments and do the work of the program. "args" specifies the program arguments, with args[0] being the executable name. The return value should be used as the program's exit code.
[ "Parses", "command", "line", "arguments", "and", "do", "the", "work", "of", "the", "program", ".", "args", "specifies", "the", "program", "arguments", "with", "args", "[", "0", "]", "being", "the", "executable", "name", ".", "The", "return", "value", "shou...
def main(args): """ Parses command line arguments and do the work of the program. "args" specifies the program arguments, with args[0] being the executable name. The return value should be used as the program's exit code. """ options = parse_args(args) # This holds the nicely-parsed options...
[ "def", "main", "(", "args", ")", ":", "options", "=", "parse_args", "(", "args", ")", "# This holds the nicely-parsed options object", "# Make a repeat database", "db", "=", "RepeatDb", "(", "options", ".", "assembly", ",", "options", ".", "contig", ",", "options"...
https://github.com/vgteam/vg/blob/cf4d516a5e9ee5163c783e4437ddf16b18a4b561/scripts/filter_variants_on_repeats.py#L130-L205
moranzcw/LeetCode-NOTES
49a7e33b83d8d9ce449c758717f74a69e72f808e
update.py
python
pop_up_box
()
使用tkinter弹出输入框输入数字, 具有确定输入和清除功能, 可在函数内直接调用num(文本框的值)使用
使用tkinter弹出输入框输入数字, 具有确定输入和清除功能, 可在函数内直接调用num(文本框的值)使用
[ "使用tkinter弹出输入框输入数字", "具有确定输入和清除功能", "可在函数内直接调用num", "(", "文本框的值", ")", "使用" ]
def pop_up_box(): """ 使用tkinter弹出输入框输入数字, 具有确定输入和清除功能, 可在函数内直接调用num(文本框的值)使用 """ def inputstr(): nonlocal title nonlocal code title = get_title(entry.get()) if title == None: tkinter.messagebox.showinfo(title='更新失败',message='更新失败') return c...
[ "def", "pop_up_box", "(", ")", ":", "def", "inputstr", "(", ")", ":", "nonlocal", "title", "nonlocal", "code", "title", "=", "get_title", "(", "entry", ".", "get", "(", ")", ")", "if", "title", "==", "None", ":", "tkinter", ".", "messagebox", ".", "s...
https://github.com/moranzcw/LeetCode-NOTES/blob/49a7e33b83d8d9ce449c758717f74a69e72f808e/update.py#L27-L66
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py3/pandas/io/pytables.py
python
Table.index_cols
(self)
return [(i.axis, i.cname) for i in self.index_axes]
return a list of my index cols
return a list of my index cols
[ "return", "a", "list", "of", "my", "index", "cols" ]
def index_cols(self): """return a list of my index cols""" # Note: each `i.cname` below is assured to be a str. return [(i.axis, i.cname) for i in self.index_axes]
[ "def", "index_cols", "(", "self", ")", ":", "# Note: each `i.cname` below is assured to be a str.", "return", "[", "(", "i", ".", "axis", ",", "i", ".", "cname", ")", "for", "i", "in", "self", ".", "index_axes", "]" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/io/pytables.py#L3450-L3453
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/pip/_vendor/html5lib/html5parser.py
python
HTMLParser.documentEncoding
(self)
return self.tokenizer.stream.charEncoding[0].name
Name of the character encoding that was used to decode the input stream, or :obj:`None` if that is not determined yet
Name of the character encoding that was used to decode the input stream, or :obj:`None` if that is not determined yet
[ "Name", "of", "the", "character", "encoding", "that", "was", "used", "to", "decode", "the", "input", "stream", "or", ":", "obj", ":", "None", "if", "that", "is", "not", "determined", "yet" ]
def documentEncoding(self): """Name of the character encoding that was used to decode the input stream, or :obj:`None` if that is not determined yet """ if not hasattr(self, 'tokenizer'): return None return self.tokenizer.stream.charEncoding[0].name
[ "def", "documentEncoding", "(", "self", ")", ":", "if", "not", "hasattr", "(", "self", ",", "'tokenizer'", ")", ":", "return", "None", "return", "self", ".", "tokenizer", ".", "stream", ".", "charEncoding", "[", "0", "]", ".", "name" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/pip/_vendor/html5lib/html5parser.py#L173-L180
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/polynomial/hermite_e.py
python
hermeval2d
(x, y, c)
return pu._valnd(hermeval, c, x, y)
Evaluate a 2-D HermiteE series at points (x, y). This function returns the values: .. math:: p(x,y) = \\sum_{i,j} c_{i,j} * He_i(x) * He_j(y) The parameters `x` and `y` are converted to arrays only if they are tuples or a lists, otherwise they are treated as a scalars and they must have the same ...
Evaluate a 2-D HermiteE series at points (x, y).
[ "Evaluate", "a", "2", "-", "D", "HermiteE", "series", "at", "points", "(", "x", "y", ")", "." ]
def hermeval2d(x, y, c): """ Evaluate a 2-D HermiteE series at points (x, y). This function returns the values: .. math:: p(x,y) = \\sum_{i,j} c_{i,j} * He_i(x) * He_j(y) The parameters `x` and `y` are converted to arrays only if they are tuples or a lists, otherwise they are treated as a sca...
[ "def", "hermeval2d", "(", "x", ",", "y", ",", "c", ")", ":", "return", "pu", ".", "_valnd", "(", "hermeval", ",", "c", ",", "x", ",", "y", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/polynomial/hermite_e.py#L870-L916
Jack-Cherish/Algorithm
ab3e0f05ff15972f282b6122b73dfa0e84b5960b
Sort Algorithms.py
python
SelectSort
(input_list)
return sorted_list
函数说明:简单选择排序(升序) Website: http://cuijiahua.com Parameters: input_list - 待排序列表 Returns: sorted_list - 升序排序好的列表
函数说明:简单选择排序(升序) Website: http://cuijiahua.com Parameters: input_list - 待排序列表 Returns: sorted_list - 升序排序好的列表
[ "函数说明", ":", "简单选择排序(升序)", "Website", ":", "http", ":", "//", "cuijiahua", ".", "com", "Parameters", ":", "input_list", "-", "待排序列表", "Returns", ":", "sorted_list", "-", "升序排序好的列表" ]
def SelectSort(input_list): ''' 函数说明:简单选择排序(升序) Website: http://cuijiahua.com Parameters: input_list - 待排序列表 Returns: sorted_list - 升序排序好的列表 ''' if len(input_list) == 0: return [] sorted_list = input_list length = len(sorted_list) for i in range(length): min_index = i for j in range(i + 1, length...
[ "def", "SelectSort", "(", "input_list", ")", ":", "if", "len", "(", "input_list", ")", "==", "0", ":", "return", "[", "]", "sorted_list", "=", "input_list", "length", "=", "len", "(", "sorted_list", ")", "for", "i", "in", "range", "(", "length", ")", ...
https://github.com/Jack-Cherish/Algorithm/blob/ab3e0f05ff15972f282b6122b73dfa0e84b5960b/Sort Algorithms.py#L165-L187
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemFramework/v1/AWS/common-code/lib/OpenSSL/crypto.py
python
X509.has_expired
(self)
return not_after < datetime.datetime.utcnow()
Check whether the certificate has expired. :return: ``True`` if the certificate has expired, ``False`` otherwise. :rtype: bool
Check whether the certificate has expired.
[ "Check", "whether", "the", "certificate", "has", "expired", "." ]
def has_expired(self): """ Check whether the certificate has expired. :return: ``True`` if the certificate has expired, ``False`` otherwise. :rtype: bool """ time_string = _native(self.get_notAfter()) not_after = datetime.datetime.strptime(time_string, "%Y%m%d%H%...
[ "def", "has_expired", "(", "self", ")", ":", "time_string", "=", "_native", "(", "self", ".", "get_notAfter", "(", ")", ")", "not_after", "=", "datetime", ".", "datetime", ".", "strptime", "(", "time_string", ",", "\"%Y%m%d%H%M%SZ\"", ")", "return", "not_aft...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemFramework/v1/AWS/common-code/lib/OpenSSL/crypto.py#L1323-L1333
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/ops/operations/nn_ops.py
python
SparseApplyFtrl.__init__
(self, lr, l1, l2, lr_power, use_locking=False)
Initialize SparseApplyFtrl.
Initialize SparseApplyFtrl.
[ "Initialize", "SparseApplyFtrl", "." ]
def __init__(self, lr, l1, l2, lr_power, use_locking=False): """Initialize SparseApplyFtrl.""" validator.check_value_type("lr", lr, [float], self.name) validator.check_value_type("l1", l1, [float], self.name) validator.check_value_type("l2", l2, [float], self.name) validator.chec...
[ "def", "__init__", "(", "self", ",", "lr", ",", "l1", ",", "l2", ",", "lr_power", ",", "use_locking", "=", "False", ")", ":", "validator", ".", "check_value_type", "(", "\"lr\"", ",", "lr", ",", "[", "float", "]", ",", "self", ".", "name", ")", "va...
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/ops/operations/nn_ops.py#L6591-L6604
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/klampt/src/robotsim.py
python
Appearance.refresh
(self, deep: "bool"=True)
return _robotsim.Appearance_refresh(self, deep)
r""" refresh(Appearance self, bool deep=True) call this to rebuild internal buffers, e.g., when the OpenGL context changes. If deep=True, the entire data structure will be revised. Use this for streaming data, for example.
r""" refresh(Appearance self, bool deep=True)
[ "r", "refresh", "(", "Appearance", "self", "bool", "deep", "=", "True", ")" ]
def refresh(self, deep: "bool"=True) -> "void": r""" refresh(Appearance self, bool deep=True) call this to rebuild internal buffers, e.g., when the OpenGL context changes. If deep=True, the entire data structure will be revised. Use this for streaming data, for example. ...
[ "def", "refresh", "(", "self", ",", "deep", ":", "\"bool\"", "=", "True", ")", "->", "\"void\"", ":", "return", "_robotsim", ".", "Appearance_refresh", "(", "self", ",", "deep", ")" ]
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/klampt/src/robotsim.py#L2787-L2797
EricLYang/courseRepo
60679ec7ec130fe0cff9d26b704f1e286e5fde13
3_class/mono-slam/build/catkin_generated/installspace/_setup_util.py
python
_prefix_env_variable
(environ, name, paths, subfolders)
return prefix_str
Return the prefix to prepend to the environment variable NAME, adding any path in NEW_PATHS_STR without creating duplicate or empty items.
Return the prefix to prepend to the environment variable NAME, adding any path in NEW_PATHS_STR without creating duplicate or empty items.
[ "Return", "the", "prefix", "to", "prepend", "to", "the", "environment", "variable", "NAME", "adding", "any", "path", "in", "NEW_PATHS_STR", "without", "creating", "duplicate", "or", "empty", "items", "." ]
def _prefix_env_variable(environ, name, paths, subfolders): ''' Return the prefix to prepend to the environment variable NAME, adding any path in NEW_PATHS_STR without creating duplicate or empty items. ''' value = environ[name] if name in environ else '' environ_paths = [path for path in value.spli...
[ "def", "_prefix_env_variable", "(", "environ", ",", "name", ",", "paths", ",", "subfolders", ")", ":", "value", "=", "environ", "[", "name", "]", "if", "name", "in", "environ", "else", "''", "environ_paths", "=", "[", "path", "for", "path", "in", "value"...
https://github.com/EricLYang/courseRepo/blob/60679ec7ec130fe0cff9d26b704f1e286e5fde13/3_class/mono-slam/build/catkin_generated/installspace/_setup_util.py#L150-L173
PixarAnimationStudios/USD
faed18ce62c8736b02413635b584a2f637156bad
pxr/usdImaging/usdviewq/selectionDataModel.py
python
SelectionDataModel.removeInactivePrims
(self)
Remove all inactive prims
Remove all inactive prims
[ "Remove", "all", "inactive", "prims" ]
def removeInactivePrims(self): """Remove all inactive prims""" for prim in self.getPrims(): if not prim.IsActive(): self.removePrim(prim)
[ "def", "removeInactivePrims", "(", "self", ")", ":", "for", "prim", "in", "self", ".", "getPrims", "(", ")", ":", "if", "not", "prim", ".", "IsActive", "(", ")", ":", "self", ".", "removePrim", "(", "prim", ")" ]
https://github.com/PixarAnimationStudios/USD/blob/faed18ce62c8736b02413635b584a2f637156bad/pxr/usdImaging/usdviewq/selectionDataModel.py#L757-L761
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python3/src/Lib/email/parser.py
python
BytesParser.__init__
(self, *args, **kw)
Parser of binary RFC 2822 and MIME email messages. Creates an in-memory object tree representing the email message, which can then be manipulated and turned over to a Generator to return the textual representation of the message. The input must be formatted as a block of RFC 2822 heade...
Parser of binary RFC 2822 and MIME email messages.
[ "Parser", "of", "binary", "RFC", "2822", "and", "MIME", "email", "messages", "." ]
def __init__(self, *args, **kw): """Parser of binary RFC 2822 and MIME email messages. Creates an in-memory object tree representing the email message, which can then be manipulated and turned over to a Generator to return the textual representation of the message. The input mu...
[ "def", "__init__", "(", "self", ",", "*", "args", ",", "*", "*", "kw", ")", ":", "self", ".", "parser", "=", "Parser", "(", "*", "args", ",", "*", "*", "kw", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python3/src/Lib/email/parser.py#L81-L97
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/xml/sax/xmlreader.py
python
XMLReader.getProperty
(self, name)
Looks up and returns the value of a SAX2 property.
Looks up and returns the value of a SAX2 property.
[ "Looks", "up", "and", "returns", "the", "value", "of", "a", "SAX2", "property", "." ]
def getProperty(self, name): "Looks up and returns the value of a SAX2 property." raise SAXNotRecognizedException("Property '%s' not recognized" % name)
[ "def", "getProperty", "(", "self", ",", "name", ")", ":", "raise", "SAXNotRecognizedException", "(", "\"Property '%s' not recognized\"", "%", "name", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/xml/sax/xmlreader.py#L83-L85
oracle/graaljs
36a56e8e993d45fc40939a3a4d9c0c24990720f1
graal-nodejs/tools/cpplint.py
python
CleansedLines.NumLines
(self)
return self.num_lines
Returns the number of lines represented.
Returns the number of lines represented.
[ "Returns", "the", "number", "of", "lines", "represented", "." ]
def NumLines(self): """Returns the number of lines represented.""" return self.num_lines
[ "def", "NumLines", "(", "self", ")", ":", "return", "self", ".", "num_lines" ]
https://github.com/oracle/graaljs/blob/36a56e8e993d45fc40939a3a4d9c0c24990720f1/graal-nodejs/tools/cpplint.py#L1937-L1939
twtygqyy/caffe-augmentation
c76600d247e5132fa5bd89d87bb5df458341fa84
scripts/cpp_lint.py
python
_NestingState.SeenOpenBrace
(self)
return (not self.stack) or self.stack[-1].seen_open_brace
Check if we have seen the opening brace for the innermost block. Returns: True if we have seen the opening brace, False if the innermost block is still expecting an opening brace.
Check if we have seen the opening brace for the innermost block.
[ "Check", "if", "we", "have", "seen", "the", "opening", "brace", "for", "the", "innermost", "block", "." ]
def SeenOpenBrace(self): """Check if we have seen the opening brace for the innermost block. Returns: True if we have seen the opening brace, False if the innermost block is still expecting an opening brace. """ return (not self.stack) or self.stack[-1].seen_open_brace
[ "def", "SeenOpenBrace", "(", "self", ")", ":", "return", "(", "not", "self", ".", "stack", ")", "or", "self", ".", "stack", "[", "-", "1", "]", ".", "seen_open_brace" ]
https://github.com/twtygqyy/caffe-augmentation/blob/c76600d247e5132fa5bd89d87bb5df458341fa84/scripts/cpp_lint.py#L1935-L1942
swift/swift
12d031cf8177fdec0137f9aa7e2912fa23c4416b
3rdParty/SCons/scons-3.0.1/engine/SCons/Tool/GettextCommon.py
python
_detect_xgettext
(env)
return None
Detects *xgettext(1)* binary
Detects *xgettext(1)* binary
[ "Detects", "*", "xgettext", "(", "1", ")", "*", "binary" ]
def _detect_xgettext(env): """ Detects *xgettext(1)* binary """ if 'XGETTEXT' in env: return env['XGETTEXT'] xgettext = env.Detect('xgettext'); if xgettext: return xgettext raise SCons.Errors.StopError(XgettextNotFound, "Could not detect xgettext") return None
[ "def", "_detect_xgettext", "(", "env", ")", ":", "if", "'XGETTEXT'", "in", "env", ":", "return", "env", "[", "'XGETTEXT'", "]", "xgettext", "=", "env", ".", "Detect", "(", "'xgettext'", ")", "if", "xgettext", ":", "return", "xgettext", "raise", "SCons", ...
https://github.com/swift/swift/blob/12d031cf8177fdec0137f9aa7e2912fa23c4416b/3rdParty/SCons/scons-3.0.1/engine/SCons/Tool/GettextCommon.py#L389-L397
stellar-deprecated/stellard
67eabb2217bdfa9a6ea317f62338fb6bca458c90
src/protobuf/python/google/protobuf/internal/enum_type_wrapper.py
python
EnumTypeWrapper.items
(self)
return [(value_descriptor.name, value_descriptor.number) for value_descriptor in self._enum_type.values]
Return a list of the (name, value) pairs of the enum. These are returned in the order they were defined in the .proto file.
Return a list of the (name, value) pairs of the enum.
[ "Return", "a", "list", "of", "the", "(", "name", "value", ")", "pairs", "of", "the", "enum", "." ]
def items(self): """Return a list of the (name, value) pairs of the enum. These are returned in the order they were defined in the .proto file. """ return [(value_descriptor.name, value_descriptor.number) for value_descriptor in self._enum_type.values]
[ "def", "items", "(", "self", ")", ":", "return", "[", "(", "value_descriptor", ".", "name", ",", "value_descriptor", ".", "number", ")", "for", "value_descriptor", "in", "self", ".", "_enum_type", ".", "values", "]" ]
https://github.com/stellar-deprecated/stellard/blob/67eabb2217bdfa9a6ea317f62338fb6bca458c90/src/protobuf/python/google/protobuf/internal/enum_type_wrapper.py#L83-L89
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/extern/aui/framemanager.py
python
AuiManager.DoDropRow
(self, panes, target, dock_direction, dock_layer, dock_row)
return self.ProcessDockResult(target, drop)
Insert a row in the interface before dropping. :param `panes`: a list of :class:`AuiPaneInfo` classes; :param AuiPaneInfo `target`: the target pane; :param integer `dock_direction`: the docking direction; :param integer `dock_layer`: the docking layer; :param integer `dock_row`:...
Insert a row in the interface before dropping.
[ "Insert", "a", "row", "in", "the", "interface", "before", "dropping", "." ]
def DoDropRow(self, panes, target, dock_direction, dock_layer, dock_row): """ Insert a row in the interface before dropping. :param `panes`: a list of :class:`AuiPaneInfo` classes; :param AuiPaneInfo `target`: the target pane; :param integer `dock_direction`: the docking directi...
[ "def", "DoDropRow", "(", "self", ",", "panes", ",", "target", ",", "dock_direction", ",", "dock_layer", ",", "dock_row", ")", ":", "drop", "=", "self", ".", "CopyTarget", "(", "target", ")", "panes", "=", "DoInsertDockRow", "(", "panes", ",", "dock_directi...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/extern/aui/framemanager.py#L8040-L8055
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/aui.py
python
AuiToolBar.GetToolLongHelp
(*args, **kwargs)
return _aui.AuiToolBar_GetToolLongHelp(*args, **kwargs)
GetToolLongHelp(self, int toolId) -> String
GetToolLongHelp(self, int toolId) -> String
[ "GetToolLongHelp", "(", "self", "int", "toolId", ")", "-", ">", "String" ]
def GetToolLongHelp(*args, **kwargs): """GetToolLongHelp(self, int toolId) -> String""" return _aui.AuiToolBar_GetToolLongHelp(*args, **kwargs)
[ "def", "GetToolLongHelp", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_aui", ".", "AuiToolBar_GetToolLongHelp", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/aui.py#L2242-L2244
VowpalWabbit/vowpal_wabbit
866b8fa88ff85a957c7eb72065ea44518b9ba416
python/vowpalwabbit/pyvw.py
python
Workspace.get_weight
(self, index, offset=0)
return pylibvw.vw.get_weight(self, index, offset)
Get the weight at a particular position in the (learned) weight vector. Args: index (int): position in the learned weight vector offset (int): By default is 0 Returns: float: Weight at the given index
Get the weight at a particular position in the (learned) weight vector.
[ "Get", "the", "weight", "at", "a", "particular", "position", "in", "the", "(", "learned", ")", "weight", "vector", "." ]
def get_weight(self, index, offset=0) -> float: """Get the weight at a particular position in the (learned) weight vector. Args: index (int): position in the learned weight vector offset (int): By default is 0 Returns: float: Weight at the given ind...
[ "def", "get_weight", "(", "self", ",", "index", ",", "offset", "=", "0", ")", "->", "float", ":", "return", "pylibvw", ".", "vw", ".", "get_weight", "(", "self", ",", "index", ",", "offset", ")" ]
https://github.com/VowpalWabbit/vowpal_wabbit/blob/866b8fa88ff85a957c7eb72065ea44518b9ba416/python/vowpalwabbit/pyvw.py#L532-L543
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/cgutils.py
python
for_range_slice_generic
(builder, start, stop, step)
A helper wrapper for for_range_slice(). This is a context manager which yields two for_range_slice()-alike context managers, the first for the positive step case, the second for the negative step case. Use: with for_range_slice_generic(...) as (pos_range, neg_range): with pos_range as ...
A helper wrapper for for_range_slice(). This is a context manager which yields two for_range_slice()-alike context managers, the first for the positive step case, the second for the negative step case.
[ "A", "helper", "wrapper", "for", "for_range_slice", "()", ".", "This", "is", "a", "context", "manager", "which", "yields", "two", "for_range_slice", "()", "-", "alike", "context", "managers", "the", "first", "for", "the", "positive", "step", "case", "the", "...
def for_range_slice_generic(builder, start, stop, step): """ A helper wrapper for for_range_slice(). This is a context manager which yields two for_range_slice()-alike context managers, the first for the positive step case, the second for the negative step case. Use: with for_range_slice_g...
[ "def", "for_range_slice_generic", "(", "builder", ",", "start", ",", "stop", ",", "step", ")", ":", "intp", "=", "start", ".", "type", "is_pos_step", "=", "builder", ".", "icmp_signed", "(", "'>='", ",", "step", ",", "ir", ".", "Constant", "(", "intp", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/cgutils.py#L555-L581
verilog-to-routing/vtr-verilog-to-routing
d9719cf7374821156c3cee31d66991cb85578562
vtr_flow/scripts/benchtracker/server_db.py
python
get_csv_data
()
Return a zipped archive of csv files for selected tasks
Return a zipped archive of csv files for selected tasks
[ "Return", "a", "zipped", "archive", "of", "csv", "files", "for", "selected", "tasks" ]
def get_csv_data(): """Return a zipped archive of csv files for selected tasks""" (exception, payload) = parse_data() if exception: return payload else: (database, tasks, params, data) = payload memory_file = BytesIO() with zipfile.ZipFile(memory_file, "a", zipfile.ZIP_DE...
[ "def", "get_csv_data", "(", ")", ":", "(", "exception", ",", "payload", ")", "=", "parse_data", "(", ")", "if", "exception", ":", "return", "payload", "else", ":", "(", "database", ",", "tasks", ",", "params", ",", "data", ")", "=", "payload", "memory_...
https://github.com/verilog-to-routing/vtr-verilog-to-routing/blob/d9719cf7374821156c3cee31d66991cb85578562/vtr_flow/scripts/benchtracker/server_db.py#L171-L193
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/ed_vim.py
python
EditraCommander.PrevIdent
(self, repeat=1)
Find the previous occurrence of identifier under cursor
Find the previous occurrence of identifier under cursor
[ "Find", "the", "previous", "occurrence", "of", "identifier", "under", "cursor" ]
def PrevIdent(self, repeat=1): """Find the previous occurrence of identifier under cursor""" self._NextIdent(repeat, back=True)
[ "def", "PrevIdent", "(", "self", ",", "repeat", "=", "1", ")", ":", "self", ".", "_NextIdent", "(", "repeat", ",", "back", "=", "True", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/ed_vim.py#L542-L544
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemFramework/v1/AWS/resource-manager-code/lib/pyrsistent/_field_common.py
python
_restore_pmap_field_pickle
(key_type, value_type, data)
return _restore_pickle(type_, data)
Unpickling function for auto-generated PMap field types.
Unpickling function for auto-generated PMap field types.
[ "Unpickling", "function", "for", "auto", "-", "generated", "PMap", "field", "types", "." ]
def _restore_pmap_field_pickle(key_type, value_type, data): """Unpickling function for auto-generated PMap field types.""" type_ = _pmap_field_types[key_type, value_type] return _restore_pickle(type_, data)
[ "def", "_restore_pmap_field_pickle", "(", "key_type", ",", "value_type", ",", "data", ")", ":", "type_", "=", "_pmap_field_types", "[", "key_type", ",", "value_type", "]", "return", "_restore_pickle", "(", "type_", ",", "data", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemFramework/v1/AWS/resource-manager-code/lib/pyrsistent/_field_common.py#L279-L282
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/requests/sessions.py
python
Session.patch
(self, url, data=None, **kwargs)
return self.request('PATCH', url, data=data, **kwargs)
r"""Sends a PATCH request. Returns :class:`Response` object. :param url: URL for the new :class:`Request` object. :param data: (optional) Dictionary, list of tuples, bytes, or file-like object to send in the body of the :class:`Request`. :param \*\*kwargs: Optional arguments that ``...
r"""Sends a PATCH request. Returns :class:`Response` object.
[ "r", "Sends", "a", "PATCH", "request", ".", "Returns", ":", "class", ":", "Response", "object", "." ]
def patch(self, url, data=None, **kwargs): r"""Sends a PATCH request. Returns :class:`Response` object. :param url: URL for the new :class:`Request` object. :param data: (optional) Dictionary, list of tuples, bytes, or file-like object to send in the body of the :class:`Request`. ...
[ "def", "patch", "(", "self", ",", "url", ",", "data", "=", "None", ",", "*", "*", "kwargs", ")", ":", "return", "self", ".", "request", "(", "'PATCH'", ",", "url", ",", "data", "=", "data", ",", "*", "*", "kwargs", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/requests/sessions.py#L592-L602
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
tools/site_compare/drivers/win32/windowing.py
python
MoveAndSizeWindow
(wnd, position=None, size=None, child=None)
Moves and/or resizes a window. Repositions and resizes a window. If a child window is provided, the parent window is resized so the child window has the given size Args: wnd: handle of the frame window position: new location for the frame window size: new size for the frame window (or the child wind...
Moves and/or resizes a window.
[ "Moves", "and", "/", "or", "resizes", "a", "window", "." ]
def MoveAndSizeWindow(wnd, position=None, size=None, child=None): """Moves and/or resizes a window. Repositions and resizes a window. If a child window is provided, the parent window is resized so the child window has the given size Args: wnd: handle of the frame window position: new location for the ...
[ "def", "MoveAndSizeWindow", "(", "wnd", ",", "position", "=", "None", ",", "size", "=", "None", ",", "child", "=", "None", ")", ":", "rect", "=", "win32gui", ".", "GetWindowRect", "(", "wnd", ")", "if", "position", "is", "None", ":", "position", "=", ...
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/tools/site_compare/drivers/win32/windowing.py#L254-L285
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/contrib/distributions/python/ops/distribution_util.py
python
assert_integer_form
( x, data=None, summarize=None, message=None, name="assert_integer_form")
return check_ops.assert_equal( x, math_ops.cast(math_ops.round(casted_x), x.dtype), data=data, summarize=summarize, message=message, name=name)
Assert that x has integer components (or floats equal to integers). Args: x: Numeric `Tensor` data: The tensors to print out if the condition is `False`. Defaults to error message and first few entries of `x` and `y`. summarize: Print this many entries of each tensor. message: A string to prefi...
Assert that x has integer components (or floats equal to integers).
[ "Assert", "that", "x", "has", "integer", "components", "(", "or", "floats", "equal", "to", "integers", ")", "." ]
def assert_integer_form( x, data=None, summarize=None, message=None, name="assert_integer_form"): """Assert that x has integer components (or floats equal to integers). Args: x: Numeric `Tensor` data: The tensors to print out if the condition is `False`. Defaults to error message and first few en...
[ "def", "assert_integer_form", "(", "x", ",", "data", "=", "None", ",", "summarize", "=", "None", ",", "message", "=", "None", ",", "name", "=", "\"assert_integer_form\"", ")", ":", "message", "=", "message", "or", "\"x has non-integer components\"", "x", "=", ...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/contrib/distributions/python/ops/distribution_util.py#L69-L90
ceph/ceph
959663007321a369c83218414a29bd9dbc8bda3a
src/pybind/mgr/dashboard/services/ceph_service.py
python
CephService.get_smart_data_by_host
(hostname)
return smart_data
Get the SMART data of all devices on the given host, regardless of the daemon (osd, mon, ...). :param hostname: The name of the host. :return: A dictionary containing the SMART data of every device on the given host. The device name is used as the key in the dictionary.
Get the SMART data of all devices on the given host, regardless of the daemon (osd, mon, ...). :param hostname: The name of the host. :return: A dictionary containing the SMART data of every device on the given host. The device name is used as the key in the dictionary.
[ "Get", "the", "SMART", "data", "of", "all", "devices", "on", "the", "given", "host", "regardless", "of", "the", "daemon", "(", "osd", "mon", "...", ")", ".", ":", "param", "hostname", ":", "The", "name", "of", "the", "host", ".", ":", "return", ":", ...
def get_smart_data_by_host(hostname): # type: (str) -> dict """ Get the SMART data of all devices on the given host, regardless of the daemon (osd, mon, ...). :param hostname: The name of the host. :return: A dictionary containing the SMART data of every device ...
[ "def", "get_smart_data_by_host", "(", "hostname", ")", ":", "# type: (str) -> dict", "devices", "=", "CephService", ".", "get_devices_by_host", "(", "hostname", ")", "smart_data", "=", "{", "}", "# type: dict", "if", "devices", ":", "for", "device", "in", "devices...
https://github.com/ceph/ceph/blob/959663007321a369c83218414a29bd9dbc8bda3a/src/pybind/mgr/dashboard/services/ceph_service.py#L301-L320
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/dataset/engine/graphdata.py
python
GraphData.get_sampled_neighbors
(self, node_list, neighbor_nums, neighbor_types, strategy=SamplingStrategy.RANDOM)
return self._graph_data.get_sampled_neighbors( node_list, neighbor_nums, neighbor_types, DE_C_INTER_SAMPLING_STRATEGY[strategy]).as_array()
Get sampled neighbor information. The api supports multi-hop neighbor sampling. That is, the previous sampling result is used as the input of next-hop sampling. A maximum of 6-hop are allowed. The sampling result is tiled into a list in the format of [input node, 1-hop sampling result, ...
Get sampled neighbor information.
[ "Get", "sampled", "neighbor", "information", "." ]
def get_sampled_neighbors(self, node_list, neighbor_nums, neighbor_types, strategy=SamplingStrategy.RANDOM): """ Get sampled neighbor information. The api supports multi-hop neighbor sampling. That is, the previous sampling result is used as the input of next-hop sampling. A maximum of ...
[ "def", "get_sampled_neighbors", "(", "self", ",", "node_list", ",", "neighbor_nums", ",", "neighbor_types", ",", "strategy", "=", "SamplingStrategy", ".", "RANDOM", ")", ":", "if", "not", "isinstance", "(", "strategy", ",", "SamplingStrategy", ")", ":", "raise",...
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/dataset/engine/graphdata.py#L341-L379
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemFramework/v1/AWS/common-code/Utils/cgf_utils/aws_utils.py
python
ArnParser.arn
(self)
return self.__arn
The source ARN.
The source ARN.
[ "The", "source", "ARN", "." ]
def arn(self): """The source ARN.""" return self.__arn
[ "def", "arn", "(", "self", ")", ":", "return", "self", ".", "__arn" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemFramework/v1/AWS/common-code/Utils/cgf_utils/aws_utils.py#L398-L400
google/syzygy
8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5
syzygy/build/get_syzygy_binaries.py
python
_CleanState
(output_dir, state, dry_run=False)
return deleted
Cleans up files/directories in |output_dir| that are referenced by the given |state|. Raises an error if there are local changes. Returns a dictionary of files that were deleted.
Cleans up files/directories in |output_dir| that are referenced by the given |state|. Raises an error if there are local changes. Returns a dictionary of files that were deleted.
[ "Cleans", "up", "files", "/", "directories", "in", "|output_dir|", "that", "are", "referenced", "by", "the", "given", "|state|", ".", "Raises", "an", "error", "if", "there", "are", "local", "changes", ".", "Returns", "a", "dictionary", "of", "files", "that",...
def _CleanState(output_dir, state, dry_run=False): """Cleans up files/directories in |output_dir| that are referenced by the given |state|. Raises an error if there are local changes. Returns a dictionary of files that were deleted. """ _LOGGER.debug('Deleting files from previous installation.') deleted = {...
[ "def", "_CleanState", "(", "output_dir", ",", "state", ",", "dry_run", "=", "False", ")", ":", "_LOGGER", ".", "debug", "(", "'Deleting files from previous installation.'", ")", "deleted", "=", "{", "}", "# Generate a list of files to delete, relative to |output_dir|.", ...
https://github.com/google/syzygy/blob/8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5/syzygy/build/get_syzygy_binaries.py#L200-L246
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/ros_comm/roslaunch/src/roslaunch/server.py
python
ROSLaunchNode.start
(self)
Startup roslaunch server XML-RPC services @raise RLException: if server fails to start
Startup roslaunch server XML-RPC services
[ "Startup", "roslaunch", "server", "XML", "-", "RPC", "services" ]
def start(self): """ Startup roslaunch server XML-RPC services @raise RLException: if server fails to start """ logger = logging.getLogger('roslaunch.server') logger.info("starting roslaunch XML-RPC server") super(ROSLaunchNode, self).start() # wa...
[ "def", "start", "(", "self", ")", ":", "logger", "=", "logging", ".", "getLogger", "(", "'roslaunch.server'", ")", "logger", ".", "info", "(", "\"starting roslaunch XML-RPC server\"", ")", "super", "(", "ROSLaunchNode", ",", "self", ")", ".", "start", "(", "...
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/ros_comm/roslaunch/src/roslaunch/server.py#L353-L406
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/urllib3/fields.py
python
RequestField.render_headers
(self)
return u"\r\n".join(lines)
Renders the headers for this request field.
Renders the headers for this request field.
[ "Renders", "the", "headers", "for", "this", "request", "field", "." ]
def render_headers(self): """ Renders the headers for this request field. """ lines = [] sort_keys = ["Content-Disposition", "Content-Type", "Content-Location"] for sort_key in sort_keys: if self.headers.get(sort_key, False): lines.append(u"%s...
[ "def", "render_headers", "(", "self", ")", ":", "lines", "=", "[", "]", "sort_keys", "=", "[", "\"Content-Disposition\"", ",", "\"Content-Type\"", ",", "\"Content-Location\"", "]", "for", "sort_key", "in", "sort_keys", ":", "if", "self", ".", "headers", ".", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/urllib3/fields.py#L229-L246
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/ed_style.py
python
StyleMgr.StyleDefault
(self)
Clears the editor styles to default @postcondition: style is reset to default
Clears the editor styles to default @postcondition: style is reset to default
[ "Clears", "the", "editor", "styles", "to", "default", "@postcondition", ":", "style", "is", "reset", "to", "default" ]
def StyleDefault(self): """Clears the editor styles to default @postcondition: style is reset to default """ self.StyleClearAll() self.SetCaretForeground(wx.BLACK) self.Colourise(0, -1)
[ "def", "StyleDefault", "(", "self", ")", ":", "self", ".", "StyleClearAll", "(", ")", "self", ".", "SetCaretForeground", "(", "wx", ".", "BLACK", ")", "self", ".", "Colourise", "(", "0", ",", "-", "1", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/ed_style.py#L917-L924
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/tpu/tpu_sharding.py
python
ShardingPolicy.set_number_of_partitions
(self, number_of_partitions)
Sets the number of partitions for the current policy. If the policy has been frozen then shard_dimension must match the existing setting. Args: number_of_partitions: The number of partitions to use in the policy. Raises: ValueError: If the policy has been frozen and shard_dimension ...
Sets the number of partitions for the current policy.
[ "Sets", "the", "number", "of", "partitions", "for", "the", "current", "policy", "." ]
def set_number_of_partitions(self, number_of_partitions): """Sets the number of partitions for the current policy. If the policy has been frozen then shard_dimension must match the existing setting. Args: number_of_partitions: The number of partitions to use in the policy. Raises: Val...
[ "def", "set_number_of_partitions", "(", "self", ",", "number_of_partitions", ")", ":", "if", "self", ".", "_frozen", ":", "if", "self", ".", "_number_of_partitions", "!=", "number_of_partitions", ":", "raise", "ValueError", "(", "f\"Can't set number_of_partitions to {nu...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/tpu/tpu_sharding.py#L94-L113
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/urllib3/contrib/_securetransport/low_level.py
python
_is_cert
(item)
return CoreFoundation.CFGetTypeID(item) == expected
Returns True if a given CFTypeRef is a certificate.
Returns True if a given CFTypeRef is a certificate.
[ "Returns", "True", "if", "a", "given", "CFTypeRef", "is", "a", "certificate", "." ]
def _is_cert(item): """ Returns True if a given CFTypeRef is a certificate. """ expected = Security.SecCertificateGetTypeID() return CoreFoundation.CFGetTypeID(item) == expected
[ "def", "_is_cert", "(", "item", ")", ":", "expected", "=", "Security", ".", "SecCertificateGetTypeID", "(", ")", "return", "CoreFoundation", ".", "CFGetTypeID", "(", "item", ")", "==", "expected" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/urllib3/contrib/_securetransport/low_level.py#L150-L155
mongodb/mongo
d8ff665343ad29cf286ee2cf4a1960d29371937b
src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Script/Interactive.py
python
SConsInteractiveCmd.do_clean
(self, argv)
return self.do_build(['build', '--clean'] + argv[1:])
\ clean [TARGETS] Clean (remove) the specified TARGETS and their dependencies. 'c' is a synonym.
\ clean [TARGETS] Clean (remove) the specified TARGETS and their dependencies. 'c' is a synonym.
[ "\\", "clean", "[", "TARGETS", "]", "Clean", "(", "remove", ")", "the", "specified", "TARGETS", "and", "their", "dependencies", ".", "c", "is", "a", "synonym", "." ]
def do_clean(self, argv): """\ clean [TARGETS] Clean (remove) the specified TARGETS and their dependencies. 'c' is a synonym. """ return self.do_build(['build', '--clean'] + argv[1:])
[ "def", "do_clean", "(", "self", ",", "argv", ")", ":", "return", "self", ".", "do_build", "(", "[", "'build'", ",", "'--clean'", "]", "+", "argv", "[", "1", ":", "]", ")" ]
https://github.com/mongodb/mongo/blob/d8ff665343ad29cf286ee2cf4a1960d29371937b/src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Script/Interactive.py#L267-L272
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/lib-tk/Tkinter.py
python
PhotoImage.blank
(self)
Display a transparent image.
Display a transparent image.
[ "Display", "a", "transparent", "image", "." ]
def blank(self): """Display a transparent image.""" self.tk.call(self.name, 'blank')
[ "def", "blank", "(", "self", ")", ":", "self", ".", "tk", ".", "call", "(", "self", ".", "name", ",", "'blank'", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/lib-tk/Tkinter.py#L3307-L3309
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/_osx_support.py
python
_find_appropriate_compiler
(_config_vars)
return _config_vars
Find appropriate C compiler for extension module builds
Find appropriate C compiler for extension module builds
[ "Find", "appropriate", "C", "compiler", "for", "extension", "module", "builds" ]
def _find_appropriate_compiler(_config_vars): """Find appropriate C compiler for extension module builds""" # Issue #13590: # The OSX location for the compiler varies between OSX # (or rather Xcode) releases. With older releases (up-to 10.5) # the compiler is in /usr/bin, with newer relea...
[ "def", "_find_appropriate_compiler", "(", "_config_vars", ")", ":", "# Issue #13590:", "# The OSX location for the compiler varies between OSX", "# (or rather Xcode) releases. With older releases (up-to 10.5)", "# the compiler is in /usr/bin, with newer releases the compiler", "# ca...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/_osx_support.py#L144-L203
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/contrib/distributions/python/ops/operator_pd_vdvt_update.py
python
OperatorPDSqrtVDVTUpdate.get_shape
(self)
return self._operator.get_shape()
Static `TensorShape` of entire operator. If this operator represents the batch matrix `A` with `A.shape = [N1,...,Nn, k, k]`, then this returns `TensorShape([N1,...,Nn, k, k])` Returns: `TensorShape`, statically determined, may be undefined.
Static `TensorShape` of entire operator.
[ "Static", "TensorShape", "of", "entire", "operator", "." ]
def get_shape(self): """Static `TensorShape` of entire operator. If this operator represents the batch matrix `A` with `A.shape = [N1,...,Nn, k, k]`, then this returns `TensorShape([N1,...,Nn, k, k])` Returns: `TensorShape`, statically determined, may be undefined. """ return self._o...
[ "def", "get_shape", "(", "self", ")", ":", "return", "self", ".", "_operator", ".", "get_shape", "(", ")" ]
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/contrib/distributions/python/ops/operator_pd_vdvt_update.py#L279-L289
apache/incubator-mxnet
f03fb23f1d103fec9541b5ae59ee06b1734a51d9
python/mxnet/ndarray/ndarray.py
python
modulo
(lhs, rhs)
return _ufunc_helper( lhs, rhs, op.broadcast_mod, operator.mod, _internal._mod_scalar, _internal._rmod_scalar)
Returns element-wise modulo of the input arrays with broadcasting. Equivalent to ``lhs % rhs`` and ``mx.nd.broadcast_mod(lhs, rhs)``. .. note:: If the corresponding dimensions of two arrays have the same size or one of them has size 1, then the arrays are broadcastable to a common shape. P...
Returns element-wise modulo of the input arrays with broadcasting.
[ "Returns", "element", "-", "wise", "modulo", "of", "the", "input", "arrays", "with", "broadcasting", "." ]
def modulo(lhs, rhs): """Returns element-wise modulo of the input arrays with broadcasting. Equivalent to ``lhs % rhs`` and ``mx.nd.broadcast_mod(lhs, rhs)``. .. note:: If the corresponding dimensions of two arrays have the same size or one of them has size 1, then the arrays are broadcasta...
[ "def", "modulo", "(", "lhs", ",", "rhs", ")", ":", "# pylint: disable= no-member, protected-access", "return", "_ufunc_helper", "(", "lhs", ",", "rhs", ",", "op", ".", "broadcast_mod", ",", "operator", ".", "mod", ",", "_internal", ".", "_mod_scalar", ",", "_i...
https://github.com/apache/incubator-mxnet/blob/f03fb23f1d103fec9541b5ae59ee06b1734a51d9/python/mxnet/ndarray/ndarray.py#L3901-L3954
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/Tkinter.py
python
Grid.grid_remove
(self)
Unmap this widget but remember the grid options.
Unmap this widget but remember the grid options.
[ "Unmap", "this", "widget", "but", "remember", "the", "grid", "options", "." ]
def grid_remove(self): """Unmap this widget but remember the grid options.""" self.tk.call('grid', 'remove', self._w)
[ "def", "grid_remove", "(", "self", ")", ":", "self", ".", "tk", ".", "call", "(", "'grid'", ",", "'remove'", ",", "self", ".", "_w", ")" ]
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/Tkinter.py#L1971-L1973
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
gpu/command_buffer/build_gles2_cmd_buffer.py
python
Argument.WriteDestinationInitalizationValidation
(self, file, func)
Writes the client side destintion initialization validation.
Writes the client side destintion initialization validation.
[ "Writes", "the", "client", "side", "destintion", "initialization", "validation", "." ]
def WriteDestinationInitalizationValidation(self, file, func): """Writes the client side destintion initialization validation.""" pass
[ "def", "WriteDestinationInitalizationValidation", "(", "self", ",", "file", ",", "func", ")", ":", "pass" ]
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/gpu/command_buffer/build_gles2_cmd_buffer.py#L5833-L5835
rampageX/firmware-mod-kit
c94cd6aeee50d92ec5280a6dba6d74828fd3606b
src/binwalk-2.1.1/src/binwalk/core/display.py
python
Display._fix_unicode
(self, line)
return bytes2str(line.encode('ascii', 'ignore'))
This is a hack, there must be a better way to handle it. In Python3, if the environment variable LANG=C is set, indicating that the terminal is ASCII only, but unicode characters need to be printed to the screen or to a file (e.g., file path, magic result format string), then an UnicodeE...
This is a hack, there must be a better way to handle it. In Python3, if the environment variable LANG=C is set, indicating that the terminal is ASCII only, but unicode characters need to be printed to the screen or to a file (e.g., file path, magic result format string), then an UnicodeE...
[ "This", "is", "a", "hack", "there", "must", "be", "a", "better", "way", "to", "handle", "it", ".", "In", "Python3", "if", "the", "environment", "variable", "LANG", "=", "C", "is", "set", "indicating", "that", "the", "terminal", "is", "ASCII", "only", "...
def _fix_unicode(self, line): ''' This is a hack, there must be a better way to handle it. In Python3, if the environment variable LANG=C is set, indicating that the terminal is ASCII only, but unicode characters need to be printed to the screen or to a file (e.g., file path, mag...
[ "def", "_fix_unicode", "(", "self", ",", "line", ")", ":", "return", "bytes2str", "(", "line", ".", "encode", "(", "'ascii'", ",", "'ignore'", ")", ")" ]
https://github.com/rampageX/firmware-mod-kit/blob/c94cd6aeee50d92ec5280a6dba6d74828fd3606b/src/binwalk-2.1.1/src/binwalk/core/display.py#L36-L47
cms-sw/cmssw
fd9de012d503d3405420bcbeec0ec879baa57cf2
PhysicsTools/Heppy/python/physicsobjects/Electron.py
python
Electron.edz
(self)
return self.gsfTrack().dzError()
returns the uncertainty on dxz (from gsf track)
returns the uncertainty on dxz (from gsf track)
[ "returns", "the", "uncertainty", "on", "dxz", "(", "from", "gsf", "track", ")" ]
def edz(self): '''returns the uncertainty on dxz (from gsf track)''' return self.gsfTrack().dzError()
[ "def", "edz", "(", "self", ")", ":", "return", "self", ".", "gsfTrack", "(", ")", ".", "dzError", "(", ")" ]
https://github.com/cms-sw/cmssw/blob/fd9de012d503d3405420bcbeec0ec879baa57cf2/PhysicsTools/Heppy/python/physicsobjects/Electron.py#L396-L398
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/threading.py
python
_Condition.notifyAll
(self)
Wake up all threads waiting on this condition. If the calling thread has not acquired the lock when this method is called, a RuntimeError is raised.
Wake up all threads waiting on this condition.
[ "Wake", "up", "all", "threads", "waiting", "on", "this", "condition", "." ]
def notifyAll(self): """Wake up all threads waiting on this condition. If the calling thread has not acquired the lock when this method is called, a RuntimeError is raised. """ self.notify(len(self.__waiters))
[ "def", "notifyAll", "(", "self", ")", ":", "self", ".", "notify", "(", "len", "(", "self", ".", "__waiters", ")", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/threading.py#L399-L406
mingchen/protobuf-ios
0958df34558cd54cb7b6e6ca5c8855bf3d475046
compiler/python/google/protobuf/internal/input_stream.py
python
InputStreamBuffer.ReadVarUInt32
(self)
return i
Reads a varint from the stream, interprets this varint as an unsigned, 32-bit integer, and returns the integer.
Reads a varint from the stream, interprets this varint as an unsigned, 32-bit integer, and returns the integer.
[ "Reads", "a", "varint", "from", "the", "stream", "interprets", "this", "varint", "as", "an", "unsigned", "32", "-", "bit", "integer", "and", "returns", "the", "integer", "." ]
def ReadVarUInt32(self): """Reads a varint from the stream, interprets this varint as an unsigned, 32-bit integer, and returns the integer. """ i = self.ReadVarUInt64() if i > wire_format.UINT32_MAX: raise message.DecodeError('Value out of range for uint32: %d' % i) return i
[ "def", "ReadVarUInt32", "(", "self", ")", ":", "i", "=", "self", ".", "ReadVarUInt64", "(", ")", "if", "i", ">", "wire_format", ".", "UINT32_MAX", ":", "raise", "message", ".", "DecodeError", "(", "'Value out of range for uint32: %d'", "%", "i", ")", "return...
https://github.com/mingchen/protobuf-ios/blob/0958df34558cd54cb7b6e6ca5c8855bf3d475046/compiler/python/google/protobuf/internal/input_stream.py#L178-L185
ukoethe/vigra
093d57d15c8c237adf1704d96daa6393158ce299
vigranumpy/lib/arraytypes.py
python
ImagePyramid.channelIndex
(self)
return getattr(self[self._highestLevel], 'channelIndex', self.ndim)
The channel dimension of the images in this pyramid. If the images have no axistags, or no channel axis is specified, this defaults to 'ndim'.
The channel dimension of the images in this pyramid. If the images have no axistags, or no channel axis is specified, this defaults to 'ndim'.
[ "The", "channel", "dimension", "of", "the", "images", "in", "this", "pyramid", ".", "If", "the", "images", "have", "no", "axistags", "or", "no", "channel", "axis", "is", "specified", "this", "defaults", "to", "ndim", "." ]
def channelIndex(self): '''The channel dimension of the images in this pyramid. If the images have no axistags, or no channel axis is specified, this defaults to 'ndim'. ''' return getattr(self[self._highestLevel], 'channelIndex', self.ndim)
[ "def", "channelIndex", "(", "self", ")", ":", "return", "getattr", "(", "self", "[", "self", ".", "_highestLevel", "]", ",", "'channelIndex'", ",", "self", ".", "ndim", ")" ]
https://github.com/ukoethe/vigra/blob/093d57d15c8c237adf1704d96daa6393158ce299/vigranumpy/lib/arraytypes.py#L1990-L1995
mapsme/omim
1892903b63f2c85b16ed4966d21fe76aba06b9ba
tools/python/maps_generator/checks/check.py
python
Check.check
(self)
Performs a logic of the check.
Performs a logic of the check.
[ "Performs", "a", "logic", "of", "the", "check", "." ]
def check(self): """ Performs a logic of the check. """ pass
[ "def", "check", "(", "self", ")", ":", "pass" ]
https://github.com/mapsme/omim/blob/1892903b63f2c85b16ed4966d21fe76aba06b9ba/tools/python/maps_generator/checks/check.py#L76-L80
vesoft-inc/nebula
25a06217ebaf169e1f0e5ff6a797ba6f0c41fc35
.linters/cpp/cpplint.py
python
FlagCxx11Features
(filename, clean_lines, linenum, error)
Flag those c++11 features that we only allow in certain places. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found.
Flag those c++11 features that we only allow in certain places.
[ "Flag", "those", "c", "++", "11", "features", "that", "we", "only", "allow", "in", "certain", "places", "." ]
def FlagCxx11Features(filename, clean_lines, linenum, error): """Flag those c++11 features that we only allow in certain places. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to ...
[ "def", "FlagCxx11Features", "(", "filename", ",", "clean_lines", ",", "linenum", ",", "error", ")", ":", "line", "=", "clean_lines", ".", "elided", "[", "linenum", "]", "include", "=", "Match", "(", "r'\\s*#\\s*include\\s+[<\"]([^<\"]+)[\">]'", ",", "line", ")",...
https://github.com/vesoft-inc/nebula/blob/25a06217ebaf169e1f0e5ff6a797ba6f0c41fc35/.linters/cpp/cpplint.py#L6111-L6160
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemFramework/v1/AWS/resource-manager-code/lib/setuptools/dist.py
python
Distribution.include
(self, **attrs)
Add items to distribution that are named in keyword arguments For example, 'dist.include(py_modules=["x"])' would add 'x' to the distribution's 'py_modules' attribute, if it was not already there. Currently, this method only supports inclusion for attributes that are lists or t...
Add items to distribution that are named in keyword arguments
[ "Add", "items", "to", "distribution", "that", "are", "named", "in", "keyword", "arguments" ]
def include(self, **attrs): """Add items to distribution that are named in keyword arguments For example, 'dist.include(py_modules=["x"])' would add 'x' to the distribution's 'py_modules' attribute, if it was not already there. Currently, this method only supports inclusion for...
[ "def", "include", "(", "self", ",", "*", "*", "attrs", ")", ":", "for", "k", ",", "v", "in", "attrs", ".", "items", "(", ")", ":", "include", "=", "getattr", "(", "self", ",", "'_include_'", "+", "k", ",", "None", ")", "if", "include", ":", "in...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemFramework/v1/AWS/resource-manager-code/lib/setuptools/dist.py#L785-L805
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
tools/grit/grit/tool/transl2tc.py
python
TranslationToTc.Setup
(self, globopt, args)
return self.rc2grd.ParseOptions(args)
Sets the instance up for use.
Sets the instance up for use.
[ "Sets", "the", "instance", "up", "for", "use", "." ]
def Setup(self, globopt, args): '''Sets the instance up for use. ''' self.SetOptions(globopt) self.rc2grd = rc2grd.Rc2Grd() self.rc2grd.SetOptions(globopt) self.limits = None if len(args) and args[0] == '-l': self.limits = util.ReadFile(args[1], util.RAW_TEXT).split('\n') args = ...
[ "def", "Setup", "(", "self", ",", "globopt", ",", "args", ")", ":", "self", ".", "SetOptions", "(", "globopt", ")", "self", ".", "rc2grd", "=", "rc2grd", ".", "Rc2Grd", "(", ")", "self", ".", "rc2grd", ".", "SetOptions", "(", "globopt", ")", "self", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/tools/grit/grit/tool/transl2tc.py#L53-L63
jiaxiang-wu/quantized-cnn
4d020e17026df90e40111d219e3eb74e0afb1588
cpplint.py
python
CheckCStyleCast
(filename, clean_lines, linenum, cast_type, pattern, error)
return True
Checks for a C-style cast by looking for the pattern. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. cast_type: The string for the C++ cast to recommend. This is either reinterpret_cast, static_...
Checks for a C-style cast by looking for the pattern.
[ "Checks", "for", "a", "C", "-", "style", "cast", "by", "looking", "for", "the", "pattern", "." ]
def CheckCStyleCast(filename, clean_lines, linenum, cast_type, pattern, error): """Checks for a C-style cast by looking for the pattern. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. cast_type: The ...
[ "def", "CheckCStyleCast", "(", "filename", ",", "clean_lines", ",", "linenum", ",", "cast_type", ",", "pattern", ",", "error", ")", ":", "line", "=", "clean_lines", ".", "elided", "[", "linenum", "]", "match", "=", "Search", "(", "pattern", ",", "line", ...
https://github.com/jiaxiang-wu/quantized-cnn/blob/4d020e17026df90e40111d219e3eb74e0afb1588/cpplint.py#L5337-L5438
vxl/vxl
f7358571ada5a4b4823fb86976d55f8d6500ce64
contrib/brl/bseg/boxm2/pyscripts/boxm2_scene_adaptor.py
python
rewriteScenePath
(boxm2_dir, scene_file)
Rewrites a given scene XML file with a new scene_paths element that points to its containing directory. :param boxm2_dir: The directory containing the given scene file. :param scene_file: Relative path from `boxm2_dir` to the given XML file to modify.
Rewrites a given scene XML file with a new scene_paths element that points to its containing directory.
[ "Rewrites", "a", "given", "scene", "XML", "file", "with", "a", "new", "scene_paths", "element", "that", "points", "to", "its", "containing", "directory", "." ]
def rewriteScenePath(boxm2_dir, scene_file): """Rewrites a given scene XML file with a new scene_paths element that points to its containing directory. :param boxm2_dir: The directory containing the given scene file. :param scene_file: Relative path from `boxm2_dir` to the given XML file to modify....
[ "def", "rewriteScenePath", "(", "boxm2_dir", ",", "scene_file", ")", ":", "abs_name", "=", "os", ".", "path", ".", "join", "(", "boxm2_dir", ",", "scene_file", ")", "if", "os", ".", "path", ".", "isfile", "(", "abs_name", ")", ":", "tree", "=", "Elemen...
https://github.com/vxl/vxl/blob/f7358571ada5a4b4823fb86976d55f8d6500ce64/contrib/brl/bseg/boxm2/pyscripts/boxm2_scene_adaptor.py#L842-L858
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/mailbox.py
python
Mailbox.iterkeys
(self)
Return an iterator over keys.
Return an iterator over keys.
[ "Return", "an", "iterator", "over", "keys", "." ]
def iterkeys(self): """Return an iterator over keys.""" raise NotImplementedError('Method must be implemented by subclass')
[ "def", "iterkeys", "(", "self", ")", ":", "raise", "NotImplementedError", "(", "'Method must be implemented by subclass'", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/mailbox.py#L97-L99
PaddlePaddle/Paddle
1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c
python/paddle/fluid/layers/loss.py
python
npair_loss
(anchor, positive, labels, l2_reg=0.002)
return l2loss + celoss
Npair loss requires paired data. Npair loss has two parts: the first part is L2 regularizer on the embedding vector; the second part is cross entropy loss which takes the similarity matrix of anchor and positive as logits. For more information, please refer to: `Improved Deep Metric Learning with Mul...
Npair loss requires paired data. Npair loss has two parts: the first part is L2 regularizer on the embedding vector; the second part is cross entropy loss which takes the similarity matrix of anchor and positive as logits. For more information, please refer to: `Improved Deep Metric Learning with Mul...
[ "Npair", "loss", "requires", "paired", "data", ".", "Npair", "loss", "has", "two", "parts", ":", "the", "first", "part", "is", "L2", "regularizer", "on", "the", "embedding", "vector", ";", "the", "second", "part", "is", "cross", "entropy", "loss", "which",...
def npair_loss(anchor, positive, labels, l2_reg=0.002): """ Npair loss requires paired data. Npair loss has two parts: the first part is L2 regularizer on the embedding vector; the second part is cross entropy loss which takes the similarity matrix of anchor and positive as logits. For more i...
[ "def", "npair_loss", "(", "anchor", ",", "positive", ",", "labels", ",", "l2_reg", "=", "0.002", ")", ":", "check_variable_and_dtype", "(", "anchor", ",", "'anchor'", ",", "[", "'float32'", ",", "'float64'", "]", ",", "'npair_loss'", ")", "check_variable_and_d...
https://github.com/PaddlePaddle/Paddle/blob/1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c/python/paddle/fluid/layers/loss.py#L1666-L1730
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/key_processor.py
python
KeyProcessor._get_matches
(self, key_presses: List[KeyPress])
return [b for b in self._bindings.get_bindings_for_keys(keys) if b.filter()]
For a list of :class:`KeyPress` instances. Give the matching handlers that would handle this.
For a list of :class:`KeyPress` instances. Give the matching handlers that would handle this.
[ "For", "a", "list", "of", ":", "class", ":", "KeyPress", "instances", ".", "Give", "the", "matching", "handlers", "that", "would", "handle", "this", "." ]
def _get_matches(self, key_presses: List[KeyPress]) -> List[Binding]: """ For a list of :class:`KeyPress` instances. Give the matching handlers that would handle this. """ keys = tuple(k.key for k in key_presses) # Try match, with mode flag return [b for b in sel...
[ "def", "_get_matches", "(", "self", ",", "key_presses", ":", "List", "[", "KeyPress", "]", ")", "->", "List", "[", "Binding", "]", ":", "keys", "=", "tuple", "(", "k", ".", "key", "for", "k", "in", "key_presses", ")", "# Try match, with mode flag", "retu...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/key_processor.py#L119-L127
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/asyncio/unix_events.py
python
AbstractChildWatcher.add_child_handler
(self, pid, callback, *args)
Register a new child handler. Arrange for callback(pid, returncode, *args) to be called when process 'pid' terminates. Specifying another callback for the same process replaces the previous handler. Note: callback() must be thread-safe.
Register a new child handler.
[ "Register", "a", "new", "child", "handler", "." ]
def add_child_handler(self, pid, callback, *args): """Register a new child handler. Arrange for callback(pid, returncode, *args) to be called when process 'pid' terminates. Specifying another callback for the same process replaces the previous handler. Note: callback() must be ...
[ "def", "add_child_handler", "(", "self", ",", "pid", ",", "callback", ",", "*", "args", ")", ":", "raise", "NotImplementedError", "(", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/asyncio/unix_events.py#L809-L818
turi-code/SFrame
796b9bdfb2fa1b881d82080754643c7e68629cd2
oss_src/unity/python/sframe/data_structures/sgraph.py
python
_edge_list_to_sframe
(ls, src_column_name, dst_column_name)
return sf
Convert a list of edges into an SFrame.
Convert a list of edges into an SFrame.
[ "Convert", "a", "list", "of", "edges", "into", "an", "SFrame", "." ]
def _edge_list_to_sframe(ls, src_column_name, dst_column_name): """ Convert a list of edges into an SFrame. """ sf = SFrame() if type(ls) == list: cols = reduce(set.union, (set(v.attr.keys()) for v in ls)) sf[src_column_name] = [e.src_vid for e in ls] sf[dst_column_name] = [...
[ "def", "_edge_list_to_sframe", "(", "ls", ",", "src_column_name", ",", "dst_column_name", ")", ":", "sf", "=", "SFrame", "(", ")", "if", "type", "(", "ls", ")", "==", "list", ":", "cols", "=", "reduce", "(", "set", ".", "union", ",", "(", "set", "(",...
https://github.com/turi-code/SFrame/blob/796b9bdfb2fa1b881d82080754643c7e68629cd2/oss_src/unity/python/sframe/data_structures/sgraph.py#L1404-L1424
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/Editra.py
python
Main
()
Configures and Runs an instance of Editra @summary: Parses command line options, loads the user profile, creates an instance of Editra and starts the main loop.
Configures and Runs an instance of Editra @summary: Parses command line options, loads the user profile, creates an instance of Editra and starts the main loop.
[ "Configures", "and", "Runs", "an", "instance", "of", "Editra", "@summary", ":", "Parses", "command", "line", "options", "loads", "the", "user", "profile", "creates", "an", "instance", "of", "Editra", "and", "starts", "the", "main", "loop", "." ]
def Main(): """Configures and Runs an instance of Editra @summary: Parses command line options, loads the user profile, creates an instance of Editra and starts the main loop. """ opts, args = ProcessCommandLine() if '-p' in opts: p_file = opts['-p'] opts.pop('-p') ...
[ "def", "Main", "(", ")", ":", "opts", ",", "args", "=", "ProcessCommandLine", "(", ")", "if", "'-p'", "in", "opts", ":", "p_file", "=", "opts", "[", "'-p'", "]", "opts", ".", "pop", "(", "'-p'", ")", "if", "not", "len", "(", "p_file", ")", ":", ...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/Editra.py#L1058-L1079
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
build/android/pylib/utils/emulator.py
python
LaunchEmulator
(avd_name, abi, kill_and_launch=True, enable_kvm=False, sdcard_size=DEFAULT_SDCARD_SIZE, storage_size=DEFAULT_STORAGE_SIZE, headless=False)
return emulator
Launch an existing emulator with name avd_name. Args: avd_name: name of existing emulator abi: the emulator target platform headless: running emulator with no ui Returns: emulator object.
Launch an existing emulator with name avd_name.
[ "Launch", "an", "existing", "emulator", "with", "name", "avd_name", "." ]
def LaunchEmulator(avd_name, abi, kill_and_launch=True, enable_kvm=False, sdcard_size=DEFAULT_SDCARD_SIZE, storage_size=DEFAULT_STORAGE_SIZE, headless=False): """Launch an existing emulator with name avd_name. Args: avd_name: name of existing emulator abi: the emulator...
[ "def", "LaunchEmulator", "(", "avd_name", ",", "abi", ",", "kill_and_launch", "=", "True", ",", "enable_kvm", "=", "False", ",", "sdcard_size", "=", "DEFAULT_SDCARD_SIZE", ",", "storage_size", "=", "DEFAULT_STORAGE_SIZE", ",", "headless", "=", "False", ")", ":",...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/build/android/pylib/utils/emulator.py#L227-L246
NVIDIAGameWorks/kaolin
e5148d05e9c1e2ce92a07881ce3593b1c5c3f166
kaolin/ops/batch.py
python
packed_to_padded
(packed_tensor, shape_per_tensor, first_idx, padding_value, max_shape=None)
return output
Converts a single packed tensor into a padded tensor. Args: packed_tensor (torch.Tensor): a :ref:`packed tensor<packed>`. shape_per_tensor (torch.LongTensor): the :ref:`shape_per_tensor<packed_shape_per_tensor>` tensor associated to the padded tensor. first_idx (torch.LongTensor...
Converts a single packed tensor into a padded tensor.
[ "Converts", "a", "single", "packed", "tensor", "into", "a", "padded", "tensor", "." ]
def packed_to_padded(packed_tensor, shape_per_tensor, first_idx, padding_value, max_shape=None): """Converts a single packed tensor into a padded tensor. Args: packed_tensor (torch.Tensor): a :ref:`packed tensor<packed>`. shape_per_tensor (torch.LongTensor): the :ref:`shape_per_tensor<packed_sh...
[ "def", "packed_to_padded", "(", "packed_tensor", ",", "shape_per_tensor", ",", "first_idx", ",", "padding_value", ",", "max_shape", "=", "None", ")", ":", "batch_size", "=", "shape_per_tensor", ".", "shape", "[", "0", "]", "last_dim", "=", "packed_tensor", ".", ...
https://github.com/NVIDIAGameWorks/kaolin/blob/e5148d05e9c1e2ce92a07881ce3593b1c5c3f166/kaolin/ops/batch.py#L332-L358
neoml-lib/neoml
a0d370fba05269a1b2258cef126f77bbd2054a3e
NeoML/Python/neoml/AutoDiff.py
python
less
(a, b)
return a < b
Compare blobs elementwise.
Compare blobs elementwise.
[ "Compare", "blobs", "elementwise", "." ]
def less(a, b): """Compare blobs elementwise. """ if not type(a) is Blob and not type(b) is Blob: raise ValueError('At least one of `a` and `b` should be neoml.Blob.') return a < b
[ "def", "less", "(", "a", ",", "b", ")", ":", "if", "not", "type", "(", "a", ")", "is", "Blob", "and", "not", "type", "(", "b", ")", "is", "Blob", ":", "raise", "ValueError", "(", "'At least one of `a` and `b` should be neoml.Blob.'", ")", "return", "a", ...
https://github.com/neoml-lib/neoml/blob/a0d370fba05269a1b2258cef126f77bbd2054a3e/NeoML/Python/neoml/AutoDiff.py#L248-L254
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/stc.py
python
StyledTextCtrl.StyleGetForeground
(*args, **kwargs)
return _stc.StyledTextCtrl_StyleGetForeground(*args, **kwargs)
StyleGetForeground(self, int style) -> Colour Get the foreground colour of a style.
StyleGetForeground(self, int style) -> Colour
[ "StyleGetForeground", "(", "self", "int", "style", ")", "-", ">", "Colour" ]
def StyleGetForeground(*args, **kwargs): """ StyleGetForeground(self, int style) -> Colour Get the foreground colour of a style. """ return _stc.StyledTextCtrl_StyleGetForeground(*args, **kwargs)
[ "def", "StyleGetForeground", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_stc", ".", "StyledTextCtrl_StyleGetForeground", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/stc.py#L2586-L2592
stitchEm/stitchEm
0f399501d41ab77933677f2907f41f80ceb704d7
lib/bindings/samples/metadata/plot_metadata.py
python
write_to_disk
(data_frame, last_written_idx, file_name)
return last_written_idx
Write the data_frame to `file_name`, or append to it if already present. May not write anything if fewer than NUM_ROWS_BLOCK_TO_WRITE were added to data_frame since last write. Returns new last_written_idx.
Write the data_frame to `file_name`, or append to it if already present. May not write anything if fewer than NUM_ROWS_BLOCK_TO_WRITE were added to data_frame since last write. Returns new last_written_idx.
[ "Write", "the", "data_frame", "to", "file_name", "or", "append", "to", "it", "if", "already", "present", ".", "May", "not", "write", "anything", "if", "fewer", "than", "NUM_ROWS_BLOCK_TO_WRITE", "were", "added", "to", "data_frame", "since", "last", "write", "....
def write_to_disk(data_frame, last_written_idx, file_name): """ Write the data_frame to `file_name`, or append to it if already present. May not write anything if fewer than NUM_ROWS_BLOCK_TO_WRITE were added to data_frame since last write. Returns new last_written_idx. """ # is there any d...
[ "def", "write_to_disk", "(", "data_frame", ",", "last_written_idx", ",", "file_name", ")", ":", "# is there any data to write yet?", "if", "len", "(", "data_frame", ".", "index", ")", "==", "0", ":", "return", "-", "1", "if", "last_written_idx", "<", "0", ":",...
https://github.com/stitchEm/stitchEm/blob/0f399501d41ab77933677f2907f41f80ceb704d7/lib/bindings/samples/metadata/plot_metadata.py#L221-L242
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/eager/lift_to_graph.py
python
lift_to_graph
(tensors, graph, sources=None, disallowed_placeholders=None, add_sources=False, handle_captures=False, base_graph=None, op_map=None)
Copies the tensor and all its inputs recursively to the outer graph. Args: tensors: The Tensors to lift. graph: The graph to lift to. sources: Optional sequence of nodes to start from. If omitted the whole subgraph which feeds into `init_tensor` is lifted. disallowed_placeholders: An optional s...
Copies the tensor and all its inputs recursively to the outer graph.
[ "Copies", "the", "tensor", "and", "all", "its", "inputs", "recursively", "to", "the", "outer", "graph", "." ]
def lift_to_graph(tensors, graph, sources=None, disallowed_placeholders=None, add_sources=False, handle_captures=False, base_graph=None, op_map=None): """Copies the tensor and all its inputs r...
[ "def", "lift_to_graph", "(", "tensors", ",", "graph", ",", "sources", "=", "None", ",", "disallowed_placeholders", "=", "None", ",", "add_sources", "=", "False", ",", "handle_captures", "=", "False", ",", "base_graph", "=", "None", ",", "op_map", "=", "None"...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/eager/lift_to_graph.py#L203-L357
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/_vendor/ordered_set.py
python
OrderedSet.__iter__
(self)
return iter(self.items)
Example: >>> list(iter(OrderedSet([1, 2, 3]))) [1, 2, 3]
Example: >>> list(iter(OrderedSet([1, 2, 3]))) [1, 2, 3]
[ "Example", ":", ">>>", "list", "(", "iter", "(", "OrderedSet", "(", "[", "1", "2", "3", "]", ")))", "[", "1", "2", "3", "]" ]
def __iter__(self): """ Example: >>> list(iter(OrderedSet([1, 2, 3]))) [1, 2, 3] """ return iter(self.items)
[ "def", "__iter__", "(", "self", ")", ":", "return", "iter", "(", "self", ".", "items", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/_vendor/ordered_set.py#L259-L265
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/msvc.py
python
RegistryInfo.vs
(self)
return join(self.sxs, 'VS7')
Microsoft Visual Studio VS7 registry key. Return ------ str Registry key
Microsoft Visual Studio VS7 registry key.
[ "Microsoft", "Visual", "Studio", "VS7", "registry", "key", "." ]
def vs(self): """ Microsoft Visual Studio VS7 registry key. Return ------ str Registry key """ return join(self.sxs, 'VS7')
[ "def", "vs", "(", "self", ")", ":", "return", "join", "(", "self", ".", "sxs", ",", "'VS7'", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/msvc.py#L538-L547
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/distutils/dist.py
python
Distribution._set_command_options
(self, command_obj, option_dict=None)
Set the options for 'command_obj' from 'option_dict'. Basically this means copying elements of a dictionary ('option_dict') to attributes of an instance ('command'). 'command_obj' must be a Command instance. If 'option_dict' is not supplied, uses the standard option dictionary for thi...
Set the options for 'command_obj' from 'option_dict'. Basically this means copying elements of a dictionary ('option_dict') to attributes of an instance ('command').
[ "Set", "the", "options", "for", "command_obj", "from", "option_dict", ".", "Basically", "this", "means", "copying", "elements", "of", "a", "dictionary", "(", "option_dict", ")", "to", "attributes", "of", "an", "instance", "(", "command", ")", "." ]
def _set_command_options(self, command_obj, option_dict=None): """Set the options for 'command_obj' from 'option_dict'. Basically this means copying elements of a dictionary ('option_dict') to attributes of an instance ('command'). 'command_obj' must be a Command instance. If 'option_...
[ "def", "_set_command_options", "(", "self", ",", "command_obj", ",", "option_dict", "=", "None", ")", ":", "command_name", "=", "command_obj", ".", "get_command_name", "(", ")", "if", "option_dict", "is", "None", ":", "option_dict", "=", "self", ".", "get_opti...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/distutils/dist.py#L860-L901
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/_pydecimal.py
python
Context.same_quantum
(self, a, b)
return a.same_quantum(b)
Returns True if the two operands have the same exponent. The result is never affected by either the sign or the coefficient of either operand. >>> ExtendedContext.same_quantum(Decimal('2.17'), Decimal('0.001')) False >>> ExtendedContext.same_quantum(Decimal('2.17'), Decimal('0....
Returns True if the two operands have the same exponent.
[ "Returns", "True", "if", "the", "two", "operands", "have", "the", "same", "exponent", "." ]
def same_quantum(self, a, b): """Returns True if the two operands have the same exponent. The result is never affected by either the sign or the coefficient of either operand. >>> ExtendedContext.same_quantum(Decimal('2.17'), Decimal('0.001')) False >>> ExtendedContext....
[ "def", "same_quantum", "(", "self", ",", "a", ",", "b", ")", ":", "a", "=", "_convert_other", "(", "a", ",", "raiseit", "=", "True", ")", "return", "a", ".", "same_quantum", "(", "b", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/_pydecimal.py#L5388-L5410
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py
python
SBStream.GetSize
(self)
return _lldb.SBStream_GetSize(self)
GetSize(self) -> size_t If this stream is not redirected to a file, it will maintain a local cache for the stream output whose length can be accessed using this accessor.
GetSize(self) -> size_t
[ "GetSize", "(", "self", ")", "-", ">", "size_t" ]
def GetSize(self): """ GetSize(self) -> size_t If this stream is not redirected to a file, it will maintain a local cache for the stream output whose length can be accessed using this accessor. """ return _lldb.SBStream_GetSize(self)
[ "def", "GetSize", "(", "self", ")", ":", "return", "_lldb", ".", "SBStream_GetSize", "(", "self", ")" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py#L7929-L7937