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 | Joystick.GetUMax | (*args, **kwargs) | return _misc_.Joystick_GetUMax(*args, **kwargs) | GetUMax(self) -> int | GetUMax(self) -> int | [
"GetUMax",
"(",
"self",
")",
"-",
">",
"int"
] | def GetUMax(*args, **kwargs):
"""GetUMax(self) -> int"""
return _misc_.Joystick_GetUMax(*args, **kwargs) | [
"def",
"GetUMax",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_misc_",
".",
"Joystick_GetUMax",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_misc.py#L2246-L2248 | |
tensorflow/deepmath | b5b721f54de1d5d6a02d78f5da5995237f9995f9 | deepmath/deephol/prover.py | python | check_task | (task: proof_assistant_pb2.ProverTask,
prover_options: deephol_pb2.ProverOptions
) | return None | Check whether the task is valid or supported.
If the task is not valid and supported, then it returns a ProofLog with the
appropriate error message.
Args:
task: Prover task to be performed.
prover_options: Prover options.
Returns:
None at success or a proof log with error message otherwise. | Check whether the task is valid or supported. | [
"Check",
"whether",
"the",
"task",
"is",
"valid",
"or",
"supported",
"."
] | def check_task(task: proof_assistant_pb2.ProverTask,
prover_options: deephol_pb2.ProverOptions
) -> Optional[deephol_pb2.ProofLog]:
"""Check whether the task is valid or supported.
If the task is not valid and supported, then it returns a ProofLog with the
appropriate error message.
... | [
"def",
"check_task",
"(",
"task",
":",
"proof_assistant_pb2",
".",
"ProverTask",
",",
"prover_options",
":",
"deephol_pb2",
".",
"ProverOptions",
")",
"->",
"Optional",
"[",
"deephol_pb2",
".",
"ProofLog",
"]",
":",
"def",
"make_empty_log",
"(",
"error_message",
... | https://github.com/tensorflow/deepmath/blob/b5b721f54de1d5d6a02d78f5da5995237f9995f9/deepmath/deephol/prover.py#L57-L84 | |
y123456yz/reading-and-annotate-mongodb-3.6 | 93280293672ca7586dc24af18132aa61e4ed7fcf | mongo/src/third_party/scons-2.5.0/scons-local-2.5.0/SCons/Node/FS.py | python | File.remove | (self) | return None | Remove this file. | Remove this file. | [
"Remove",
"this",
"file",
"."
] | def remove(self):
"""Remove this file."""
if self.exists() or self.islink():
self.fs.unlink(self.get_internal_path())
return 1
return None | [
"def",
"remove",
"(",
"self",
")",
":",
"if",
"self",
".",
"exists",
"(",
")",
"or",
"self",
".",
"islink",
"(",
")",
":",
"self",
".",
"fs",
".",
"unlink",
"(",
"self",
".",
"get_internal_path",
"(",
")",
")",
"return",
"1",
"return",
"None"
] | https://github.com/y123456yz/reading-and-annotate-mongodb-3.6/blob/93280293672ca7586dc24af18132aa61e4ed7fcf/mongo/src/third_party/scons-2.5.0/scons-local-2.5.0/SCons/Node/FS.py#L3100-L3105 | |
swift/swift | 12d031cf8177fdec0137f9aa7e2912fa23c4416b | 3rdParty/SCons/scons-3.0.1/engine/SCons/Executor.py | python | Executor.get_action_side_effects | (self) | return result | Returns all side effects for all batches of this
Executor used by the underlying Action. | Returns all side effects for all batches of this
Executor used by the underlying Action. | [
"Returns",
"all",
"side",
"effects",
"for",
"all",
"batches",
"of",
"this",
"Executor",
"used",
"by",
"the",
"underlying",
"Action",
"."
] | def get_action_side_effects(self):
"""Returns all side effects for all batches of this
Executor used by the underlying Action.
"""
result = SCons.Util.UniqueList([])
for target in self.get_action_targets():
result.extend(target.side_effects)
return result | [
"def",
"get_action_side_effects",
"(",
"self",
")",
":",
"result",
"=",
"SCons",
".",
"Util",
".",
"UniqueList",
"(",
"[",
"]",
")",
"for",
"target",
"in",
"self",
".",
"get_action_targets",
"(",
")",
":",
"result",
".",
"extend",
"(",
"target",
".",
"... | https://github.com/swift/swift/blob/12d031cf8177fdec0137f9aa7e2912fa23c4416b/3rdParty/SCons/scons-3.0.1/engine/SCons/Executor.py#L336-L344 | |
Xilinx/Vitis-AI | fc74d404563d9951b57245443c73bef389f3657f | tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/util/loader.py | python | load_op_library | (path) | return ret | Loads a contrib op library from the given path.
NOTE(mrry): On Windows, we currently assume that some contrib op
libraries are statically linked into the main TensorFlow Python
extension DLL - use dynamically linked ops if the .so is present.
Args:
path: An absolute path to a shared object file.
Return... | Loads a contrib op library from the given path. | [
"Loads",
"a",
"contrib",
"op",
"library",
"from",
"the",
"given",
"path",
"."
] | def load_op_library(path):
"""Loads a contrib op library from the given path.
NOTE(mrry): On Windows, we currently assume that some contrib op
libraries are statically linked into the main TensorFlow Python
extension DLL - use dynamically linked ops if the .so is present.
Args:
path: An absolute path to... | [
"def",
"load_op_library",
"(",
"path",
")",
":",
"if",
"os",
".",
"name",
"==",
"'nt'",
":",
"# To avoid making every user_ops aware of windows, re-write",
"# the file extension from .so to .dll if .so file doesn't exist.",
"if",
"not",
"os",
".",
"path",
".",
"exists",
"... | https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/util/loader.py#L30-L58 | |
Tencent/CMONGO | c40380caa14e05509f46993aa8b8da966b09b0b5 | buildscripts/cpplint.py | python | CheckOperatorSpacing | (filename, clean_lines, linenum, error) | Checks for horizontal spacing around operators.
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. | Checks for horizontal spacing around operators. | [
"Checks",
"for",
"horizontal",
"spacing",
"around",
"operators",
"."
] | def CheckOperatorSpacing(filename, clean_lines, linenum, error):
"""Checks for horizontal spacing around operators.
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... | [
"def",
"CheckOperatorSpacing",
"(",
"filename",
",",
"clean_lines",
",",
"linenum",
",",
"error",
")",
":",
"line",
"=",
"clean_lines",
".",
"elided",
"[",
"linenum",
"]",
"# Don't try to do spacing checks for operator methods. Do this by",
"# replacing the troublesome cha... | https://github.com/Tencent/CMONGO/blob/c40380caa14e05509f46993aa8b8da966b09b0b5/buildscripts/cpplint.py#L3112-L3220 | ||
benoitsteiner/tensorflow-opencl | cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5 | tensorflow/contrib/tpu/python/tpu/tpu_estimator.py | python | _ModelFnWrapper._verify_estimator_spec | (self, estimator_spec) | return estimator_spec | Validates the estimator_spec. | Validates the estimator_spec. | [
"Validates",
"the",
"estimator_spec",
"."
] | def _verify_estimator_spec(self, estimator_spec):
"""Validates the estimator_spec."""
if isinstance(estimator_spec, TPUEstimatorSpec):
return estimator_spec
err_msg = '{} returned by EstimatorSpec is not supported in TPUEstimator.'
if estimator_spec.training_chief_hooks:
raise ValueError(er... | [
"def",
"_verify_estimator_spec",
"(",
"self",
",",
"estimator_spec",
")",
":",
"if",
"isinstance",
"(",
"estimator_spec",
",",
"TPUEstimatorSpec",
")",
":",
"return",
"estimator_spec",
"err_msg",
"=",
"'{} returned by EstimatorSpec is not supported in TPUEstimator.'",
"if",... | https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/contrib/tpu/python/tpu/tpu_estimator.py#L1066-L1078 | |
strukturag/libheif | 0082fea96ee70a20c8906a0373bedec0c01777bc | scripts/cpplint.py | python | CheckForNonStandardConstructs | (filename, clean_lines, linenum,
nesting_state, error) | r"""Logs an error if we see certain non-ANSI constructs ignored by gcc-2.
Complain about several constructs which gcc-2 accepts, but which are
not standard C++. Warning about these in lint is one way to ease the
transition to new compilers.
- put storage class first (e.g. "static const" instead of "const stat... | r"""Logs an error if we see certain non-ANSI constructs ignored by gcc-2. | [
"r",
"Logs",
"an",
"error",
"if",
"we",
"see",
"certain",
"non",
"-",
"ANSI",
"constructs",
"ignored",
"by",
"gcc",
"-",
"2",
"."
] | def CheckForNonStandardConstructs(filename, clean_lines, linenum,
nesting_state, error):
r"""Logs an error if we see certain non-ANSI constructs ignored by gcc-2.
Complain about several constructs which gcc-2 accepts, but which are
not standard C++. Warning about these in lint ... | [
"def",
"CheckForNonStandardConstructs",
"(",
"filename",
",",
"clean_lines",
",",
"linenum",
",",
"nesting_state",
",",
"error",
")",
":",
"# Remove comments from the line, but leave in strings for now.",
"line",
"=",
"clean_lines",
".",
"lines",
"[",
"linenum",
"]",
"i... | https://github.com/strukturag/libheif/blob/0082fea96ee70a20c8906a0373bedec0c01777bc/scripts/cpplint.py#L2659-L2816 | ||
windystrife/UnrealEngine_NVIDIAGameWorks | b50e6338a7c5b26374d66306ebc7807541ff815e | Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/tkFileDialog.py | python | askopenfilenames | (**options) | return Open(**options).show() | Ask for multiple filenames to open
Returns a list of filenames or empty list if
cancel button selected | Ask for multiple filenames to open | [
"Ask",
"for",
"multiple",
"filenames",
"to",
"open"
] | def askopenfilenames(**options):
"""Ask for multiple filenames to open
Returns a list of filenames or empty list if
cancel button selected
"""
options["multiple"]=1
return Open(**options).show() | [
"def",
"askopenfilenames",
"(",
"*",
"*",
"options",
")",
":",
"options",
"[",
"\"multiple\"",
"]",
"=",
"1",
"return",
"Open",
"(",
"*",
"*",
"options",
")",
".",
"show",
"(",
")"
] | https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/tkFileDialog.py#L132-L139 | |
windystrife/UnrealEngine_NVIDIAGameWorks | b50e6338a7c5b26374d66306ebc7807541ff815e | Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/site-packages/pip/vendor/distlib/_backport/tarfile.py | python | TarIter.__iter__ | (self) | return self | Return iterator object. | Return iterator object. | [
"Return",
"iterator",
"object",
"."
] | def __iter__(self):
"""Return iterator object.
"""
return self | [
"def",
"__iter__",
"(",
"self",
")",
":",
"return",
"self"
] | https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/site-packages/pip/vendor/distlib/_backport/tarfile.py#L2565-L2568 | |
CRYTEK/CRYENGINE | 232227c59a220cbbd311576f0fbeba7bb53b2a8c | Editor/Python/windows/Lib/site-packages/pkg_resources/_vendor/pyparsing.py | python | ParserElement.__or__ | (self, other ) | return MatchFirst( [ self, other ] ) | Implementation of | operator - returns C{L{MatchFirst}} | Implementation of | operator - returns C{L{MatchFirst}} | [
"Implementation",
"of",
"|",
"operator",
"-",
"returns",
"C",
"{",
"L",
"{",
"MatchFirst",
"}}"
] | def __or__(self, other ):
"""
Implementation of | operator - returns C{L{MatchFirst}}
"""
if isinstance( other, basestring ):
other = ParserElement._literalStringClass( other )
if not isinstance( other, ParserElement ):
warnings.warn("Cannot combine elemen... | [
"def",
"__or__",
"(",
"self",
",",
"other",
")",
":",
"if",
"isinstance",
"(",
"other",
",",
"basestring",
")",
":",
"other",
"=",
"ParserElement",
".",
"_literalStringClass",
"(",
"other",
")",
"if",
"not",
"isinstance",
"(",
"other",
",",
"ParserElement"... | https://github.com/CRYTEK/CRYENGINE/blob/232227c59a220cbbd311576f0fbeba7bb53b2a8c/Editor/Python/windows/Lib/site-packages/pkg_resources/_vendor/pyparsing.py#L1948-L1958 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/gtk/_core.py | python | Window.GetScrollRange | (*args, **kwargs) | return _core_.Window_GetScrollRange(*args, **kwargs) | GetScrollRange(self, int orientation) -> int
Returns the built-in scrollbar range. | GetScrollRange(self, int orientation) -> int | [
"GetScrollRange",
"(",
"self",
"int",
"orientation",
")",
"-",
">",
"int"
] | def GetScrollRange(*args, **kwargs):
"""
GetScrollRange(self, int orientation) -> int
Returns the built-in scrollbar range.
"""
return _core_.Window_GetScrollRange(*args, **kwargs) | [
"def",
"GetScrollRange",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_core_",
".",
"Window_GetScrollRange",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_core.py#L11252-L11258 | |
h0x91b/redis-v8 | ac8b9d49701d75bcee3719892a2a6a50b437e47a | redis/deps/v8/tools/grokdump.py | python | InspectionShell.do_s | (self, word) | Search for a given word in available memory regions. The given word
is expanded to full pointer size and searched at aligned as well as
un-aligned memory locations. Use 'sa' to search aligned locations
only. | Search for a given word in available memory regions. The given word
is expanded to full pointer size and searched at aligned as well as
un-aligned memory locations. Use 'sa' to search aligned locations
only. | [
"Search",
"for",
"a",
"given",
"word",
"in",
"available",
"memory",
"regions",
".",
"The",
"given",
"word",
"is",
"expanded",
"to",
"full",
"pointer",
"size",
"and",
"searched",
"at",
"aligned",
"as",
"well",
"as",
"un",
"-",
"aligned",
"memory",
"location... | def do_s(self, word):
"""
Search for a given word in available memory regions. The given word
is expanded to full pointer size and searched at aligned as well as
un-aligned memory locations. Use 'sa' to search aligned locations
only.
"""
try:
word = int(word, 0)
except ValueErr... | [
"def",
"do_s",
"(",
"self",
",",
"word",
")",
":",
"try",
":",
"word",
"=",
"int",
"(",
"word",
",",
"0",
")",
"except",
"ValueError",
":",
"print",
"\"Malformed word, prefix with '0x' to use hexadecimal format.\"",
"return",
"print",
"\"Searching for word %d/0x%s:\... | https://github.com/h0x91b/redis-v8/blob/ac8b9d49701d75bcee3719892a2a6a50b437e47a/redis/deps/v8/tools/grokdump.py#L1806-L1819 | ||
catboost/catboost | 167f64f237114a4d10b2b4ee42adb4569137debe | contrib/python/pandas/py3/pandas/core/nanops.py | python | nanstd | (values, *, axis=None, skipna=True, ddof=1, mask=None) | return _wrap_results(result, orig_dtype) | Compute the standard deviation along given axis while ignoring NaNs
Parameters
----------
values : ndarray
axis : int, optional
skipna : bool, default True
ddof : int, default 1
Delta Degrees of Freedom. The divisor used in calculations is N - ddof,
where N represents the number... | Compute the standard deviation along given axis while ignoring NaNs | [
"Compute",
"the",
"standard",
"deviation",
"along",
"given",
"axis",
"while",
"ignoring",
"NaNs"
] | def nanstd(values, *, axis=None, skipna=True, ddof=1, mask=None):
"""
Compute the standard deviation along given axis while ignoring NaNs
Parameters
----------
values : ndarray
axis : int, optional
skipna : bool, default True
ddof : int, default 1
Delta Degrees of Freedom. The d... | [
"def",
"nanstd",
"(",
"values",
",",
"*",
",",
"axis",
"=",
"None",
",",
"skipna",
"=",
"True",
",",
"ddof",
"=",
"1",
",",
"mask",
"=",
"None",
")",
":",
"if",
"values",
".",
"dtype",
"==",
"\"M8[ns]\"",
":",
"values",
"=",
"values",
".",
"view"... | https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/core/nanops.py#L839-L874 | |
SFTtech/openage | d6a08c53c48dc1e157807471df92197f6ca9e04d | openage/util/observer.py | python | Observable.notify_observers | (self, message=None) | Notify the observers if the object has changed. Include
an optional message.
:param message: An optional message of any type. | Notify the observers if the object has changed. Include
an optional message. | [
"Notify",
"the",
"observers",
"if",
"the",
"object",
"has",
"changed",
".",
"Include",
"an",
"optional",
"message",
"."
] | def notify_observers(self, message=None):
"""
Notify the observers if the object has changed. Include
an optional message.
:param message: An optional message of any type.
"""
if self.changed:
for observer in self.observers:
if observer() is n... | [
"def",
"notify_observers",
"(",
"self",
",",
"message",
"=",
"None",
")",
":",
"if",
"self",
".",
"changed",
":",
"for",
"observer",
"in",
"self",
".",
"observers",
":",
"if",
"observer",
"(",
")",
"is",
"not",
"None",
":",
"observer",
"(",
")",
".",... | https://github.com/SFTtech/openage/blob/d6a08c53c48dc1e157807471df92197f6ca9e04d/openage/util/observer.py#L94-L107 | ||
mindspore-ai/mindspore | fb8fd3338605bb34fa5cea054e535a8b1d753fab | mindspore/python/mindspore/_extends/graph_kernel/model/op_infer.py | python | _Elemwise.defaultformat_to_nz | (default_shape) | return more_two_d_shape + shape | default format shape to fractal_Nz format shape | default format shape to fractal_Nz format shape | [
"default",
"format",
"shape",
"to",
"fractal_Nz",
"format",
"shape"
] | def defaultformat_to_nz(default_shape):
"""default format shape to fractal_Nz format shape"""
# As shape (1,) can broadcast to any shape, it can be regarded as a special FractalNZ shape
if len(default_shape) == 1 and default_shape[0] == 1:
return default_shape
more_two_d_shap... | [
"def",
"defaultformat_to_nz",
"(",
"default_shape",
")",
":",
"# As shape (1,) can broadcast to any shape, it can be regarded as a special FractalNZ shape",
"if",
"len",
"(",
"default_shape",
")",
"==",
"1",
"and",
"default_shape",
"[",
"0",
"]",
"==",
"1",
":",
"return",... | https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/_extends/graph_kernel/model/op_infer.py#L122-L144 | |
jeog/TDAmeritradeAPI | 91c738afd7d57b54f6231170bd64c2550fafd34d | python/tdma_api/stream.py | python | StreamingSession.get_qos | (self) | return clib.get_val(self._abi("GetQOS"), c_int, self._obj) | Returns the quality-of-service. | Returns the quality-of-service. | [
"Returns",
"the",
"quality",
"-",
"of",
"-",
"service",
"."
] | def get_qos(self):
"""Returns the quality-of-service."""
return clib.get_val(self._abi("GetQOS"), c_int, self._obj) | [
"def",
"get_qos",
"(",
"self",
")",
":",
"return",
"clib",
".",
"get_val",
"(",
"self",
".",
"_abi",
"(",
"\"GetQOS\"",
")",
",",
"c_int",
",",
"self",
".",
"_obj",
")"
] | https://github.com/jeog/TDAmeritradeAPI/blob/91c738afd7d57b54f6231170bd64c2550fafd34d/python/tdma_api/stream.py#L281-L283 | |
bigartm/bigartm | 47e37f982de87aa67bfd475ff1f39da696b181b3 | 3rdparty/protobuf-3.0.0/python/google/protobuf/proto_builder.py | python | _MakeFileDescriptorProto | (proto_file_name, full_name, field_items) | return file_proto | Populate FileDescriptorProto for MessageFactory's DescriptorPool. | Populate FileDescriptorProto for MessageFactory's DescriptorPool. | [
"Populate",
"FileDescriptorProto",
"for",
"MessageFactory",
"s",
"DescriptorPool",
"."
] | def _MakeFileDescriptorProto(proto_file_name, full_name, field_items):
"""Populate FileDescriptorProto for MessageFactory's DescriptorPool."""
package, name = full_name.rsplit('.', 1)
file_proto = descriptor_pb2.FileDescriptorProto()
file_proto.name = os.path.join(package.replace('.', '/'), proto_file_name)
f... | [
"def",
"_MakeFileDescriptorProto",
"(",
"proto_file_name",
",",
"full_name",
",",
"field_items",
")",
":",
"package",
",",
"name",
"=",
"full_name",
".",
"rsplit",
"(",
"'.'",
",",
"1",
")",
"file_proto",
"=",
"descriptor_pb2",
".",
"FileDescriptorProto",
"(",
... | https://github.com/bigartm/bigartm/blob/47e37f982de87aa67bfd475ff1f39da696b181b3/3rdparty/protobuf-3.0.0/python/google/protobuf/proto_builder.py#L116-L130 | |
catboost/catboost | 167f64f237114a4d10b2b4ee42adb4569137debe | contrib/python/numpy/py2/numpy/polynomial/_polybase.py | python | ABCPolyBase.convert | (self, domain=None, kind=None, window=None) | return self(kind.identity(domain, window=window)) | Convert series to a different kind and/or domain and/or window.
Parameters
----------
domain : array_like, optional
The domain of the converted series. If the value is None,
the default domain of `kind` is used.
kind : class, optional
The polynomial s... | Convert series to a different kind and/or domain and/or window. | [
"Convert",
"series",
"to",
"a",
"different",
"kind",
"and",
"/",
"or",
"domain",
"and",
"/",
"or",
"window",
"."
] | def convert(self, domain=None, kind=None, window=None):
"""Convert series to a different kind and/or domain and/or window.
Parameters
----------
domain : array_like, optional
The domain of the converted series. If the value is None,
the default domain of `kind` i... | [
"def",
"convert",
"(",
"self",
",",
"domain",
"=",
"None",
",",
"kind",
"=",
"None",
",",
"window",
"=",
"None",
")",
":",
"if",
"kind",
"is",
"None",
":",
"kind",
"=",
"self",
".",
"__class__",
"if",
"domain",
"is",
"None",
":",
"domain",
"=",
"... | https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/numpy/py2/numpy/polynomial/_polybase.py#L624-L662 | |
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Gems/CloudGemDynamicContent/AWS/resource-manager-code/dynamic_content_migrator.py | python | command_migrate_table_entries | (context: object, args: dict) | Migrate existing staging settings information when content versioning is enabled or suspended
Arguments
context -- context to use
args -- arguments from the CLI command | Migrate existing staging settings information when content versioning is enabled or suspended | [
"Migrate",
"existing",
"staging",
"settings",
"information",
"when",
"content",
"versioning",
"is",
"enabled",
"or",
"suspended"
] | def command_migrate_table_entries(context: object, args: dict):
"""
Migrate existing staging settings information when content versioning is enabled or suspended
Arguments
context -- context to use
args -- arguments from the CLI command
"""
deployment_name = args.deployment... | [
"def",
"command_migrate_table_entries",
"(",
"context",
":",
"object",
",",
"args",
":",
"dict",
")",
":",
"deployment_name",
"=",
"args",
".",
"deployment_name",
"if",
"args",
".",
"deployment_name",
"else",
"context",
".",
"config",
".",
"default_deployment",
... | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemDynamicContent/AWS/resource-manager-code/dynamic_content_migrator.py#L25-L36 | ||
catboost/catboost | 167f64f237114a4d10b2b4ee42adb4569137debe | contrib/python/numpy/py3/numpy/lib/histograms.py | python | _hist_bin_rice | (x, range) | return _ptp(x) / (2.0 * x.size ** (1.0 / 3)) | Rice histogram bin estimator.
Another simple estimator with no normality assumption. It has better
performance for large data than Sturges, but tends to overestimate
the number of bins. The number of bins is proportional to the cube
root of data size (asymptotically optimal). The estimate depends
o... | Rice histogram bin estimator. | [
"Rice",
"histogram",
"bin",
"estimator",
"."
] | def _hist_bin_rice(x, range):
"""
Rice histogram bin estimator.
Another simple estimator with no normality assumption. It has better
performance for large data than Sturges, but tends to overestimate
the number of bins. The number of bins is proportional to the cube
root of data size (asymptoti... | [
"def",
"_hist_bin_rice",
"(",
"x",
",",
"range",
")",
":",
"del",
"range",
"# unused",
"return",
"_ptp",
"(",
"x",
")",
"/",
"(",
"2.0",
"*",
"x",
".",
"size",
"**",
"(",
"1.0",
"/",
"3",
")",
")"
] | https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/numpy/py3/numpy/lib/histograms.py#L76-L97 | |
usdot-fhwa-stol/carma-platform | d9d9b93f9689b2c7dd607cf5432d5296fc1000f5 | guidance_plugin_validator/src/guidance_plugin_validator/guidance_plugin_components.py | python | RequiredControlComponents.__init__ | (self, plugin_capability, plan_trajectory_topic) | Constructor for RequiredControlComponents | Constructor for RequiredControlComponents | [
"Constructor",
"for",
"RequiredControlComponents"
] | def __init__(self, plugin_capability, plan_trajectory_topic):
"""Constructor for RequiredControlComponents"""
# Validation result indicating whether control plugin's node successfully launches
self.has_node = False
# Validation result indicating whether control plugin's node subscribes... | [
"def",
"__init__",
"(",
"self",
",",
"plugin_capability",
",",
"plan_trajectory_topic",
")",
":",
"# Validation result indicating whether control plugin's node successfully launches",
"self",
".",
"has_node",
"=",
"False",
"# Validation result indicating whether control plugin's node... | https://github.com/usdot-fhwa-stol/carma-platform/blob/d9d9b93f9689b2c7dd607cf5432d5296fc1000f5/guidance_plugin_validator/src/guidance_plugin_validator/guidance_plugin_components.py#L368-L390 | ||
Tencent/Pebble | 68315f176d9e328a233ace29b7579a829f89879f | tools/blade/src/blade/java_targets.py | python | JavaTarget.__init__ | (self,
name,
type,
srcs,
deps,
prebuilt,
blade,
kwargs) | Init method.
Init the java jar target. | Init method. | [
"Init",
"method",
"."
] | def __init__(self,
name,
type,
srcs,
deps,
prebuilt,
blade,
kwargs):
"""Init method.
Init the java jar target.
"""
srcs = var_to_list(srcs)
deps = var_to_list(... | [
"def",
"__init__",
"(",
"self",
",",
"name",
",",
"type",
",",
"srcs",
",",
"deps",
",",
"prebuilt",
",",
"blade",
",",
"kwargs",
")",
":",
"srcs",
"=",
"var_to_list",
"(",
"srcs",
")",
"deps",
"=",
"var_to_list",
"(",
"deps",
")",
"Target",
".",
"... | https://github.com/Tencent/Pebble/blob/68315f176d9e328a233ace29b7579a829f89879f/tools/blade/src/blade/java_targets.py#L22-L44 | ||
mysql/mysql-router | cc0179f982bb9739a834eb6fd205a56224616133 | ext/gmock/scripts/upload.py | python | GetRpcServer | (options) | return rpc_server_class(options.server, GetUserCredentials,
host_override=options.host,
save_cookies=options.save_cookies) | Returns an instance of an AbstractRpcServer.
Returns:
A new AbstractRpcServer, on which RPC calls can be made. | Returns an instance of an AbstractRpcServer. | [
"Returns",
"an",
"instance",
"of",
"an",
"AbstractRpcServer",
"."
] | def GetRpcServer(options):
"""Returns an instance of an AbstractRpcServer.
Returns:
A new AbstractRpcServer, on which RPC calls can be made.
"""
rpc_server_class = HttpRpcServer
def GetUserCredentials():
"""Prompts the user for a username and password."""
email = options.email
if email is N... | [
"def",
"GetRpcServer",
"(",
"options",
")",
":",
"rpc_server_class",
"=",
"HttpRpcServer",
"def",
"GetUserCredentials",
"(",
")",
":",
"\"\"\"Prompts the user for a username and password.\"\"\"",
"email",
"=",
"options",
".",
"email",
"if",
"email",
"is",
"None",
":",... | https://github.com/mysql/mysql-router/blob/cc0179f982bb9739a834eb6fd205a56224616133/ext/gmock/scripts/upload.py#L458-L495 | |
windystrife/UnrealEngine_NVIDIAGameWorks | b50e6338a7c5b26374d66306ebc7807541ff815e | Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/locale.py | python | format_string | (f, val, grouping=False) | return new_f % val | Formats a string in the same way that the % formatting would use,
but takes the current locale into account.
Grouping is applied if the third parameter is true. | Formats a string in the same way that the % formatting would use,
but takes the current locale into account.
Grouping is applied if the third parameter is true. | [
"Formats",
"a",
"string",
"in",
"the",
"same",
"way",
"that",
"the",
"%",
"formatting",
"would",
"use",
"but",
"takes",
"the",
"current",
"locale",
"into",
"account",
".",
"Grouping",
"is",
"applied",
"if",
"the",
"third",
"parameter",
"is",
"true",
"."
] | def format_string(f, val, grouping=False):
"""Formats a string in the same way that the % formatting would use,
but takes the current locale into account.
Grouping is applied if the third parameter is true."""
percents = list(_percent_re.finditer(f))
new_f = _percent_re.sub('%s', f)
if operator... | [
"def",
"format_string",
"(",
"f",
",",
"val",
",",
"grouping",
"=",
"False",
")",
":",
"percents",
"=",
"list",
"(",
"_percent_re",
".",
"finditer",
"(",
"f",
")",
")",
"new_f",
"=",
"_percent_re",
".",
"sub",
"(",
"'%s'",
",",
"f",
")",
"if",
"ope... | https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/locale.py#L222-L254 | |
catboost/catboost | 167f64f237114a4d10b2b4ee42adb4569137debe | contrib/tools/python3/src/Lib/pickletools.py | python | read_bytes4 | (f) | r"""
>>> import io
>>> read_bytes4(io.BytesIO(b"\x00\x00\x00\x00abc"))
b''
>>> read_bytes4(io.BytesIO(b"\x03\x00\x00\x00abcdef"))
b'abc'
>>> read_bytes4(io.BytesIO(b"\x00\x00\x00\x03abcdef"))
Traceback (most recent call last):
...
ValueError: expected 50331648 bytes in a bytes4, but ... | r"""
>>> import io
>>> read_bytes4(io.BytesIO(b"\x00\x00\x00\x00abc"))
b''
>>> read_bytes4(io.BytesIO(b"\x03\x00\x00\x00abcdef"))
b'abc'
>>> read_bytes4(io.BytesIO(b"\x00\x00\x00\x03abcdef"))
Traceback (most recent call last):
...
ValueError: expected 50331648 bytes in a bytes4, but ... | [
"r",
">>>",
"import",
"io",
">>>",
"read_bytes4",
"(",
"io",
".",
"BytesIO",
"(",
"b",
"\\",
"x00",
"\\",
"x00",
"\\",
"x00",
"\\",
"x00abc",
"))",
"b",
">>>",
"read_bytes4",
"(",
"io",
".",
"BytesIO",
"(",
"b",
"\\",
"x03",
"\\",
"x00",
"\\",
"x... | def read_bytes4(f):
r"""
>>> import io
>>> read_bytes4(io.BytesIO(b"\x00\x00\x00\x00abc"))
b''
>>> read_bytes4(io.BytesIO(b"\x03\x00\x00\x00abcdef"))
b'abc'
>>> read_bytes4(io.BytesIO(b"\x00\x00\x00\x03abcdef"))
Traceback (most recent call last):
...
ValueError: expected 50331648... | [
"def",
"read_bytes4",
"(",
"f",
")",
":",
"n",
"=",
"read_uint4",
"(",
"f",
")",
"assert",
"n",
">=",
"0",
"if",
"n",
">",
"sys",
".",
"maxsize",
":",
"raise",
"ValueError",
"(",
"\"bytes4 byte count > sys.maxsize: %d\"",
"%",
"n",
")",
"data",
"=",
"f... | https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python3/src/Lib/pickletools.py#L500-L521 | ||
catboost/catboost | 167f64f237114a4d10b2b4ee42adb4569137debe | contrib/python/ipython/py3/IPython/utils/ipstruct.py | python | Struct.__iadd__ | (self, other) | return self | s += s2 is a shorthand for s.merge(s2).
Examples
--------
>>> s = Struct(a=10,b=30)
>>> s2 = Struct(a=20,c=40)
>>> s += s2
>>> sorted(s.keys())
['a', 'b', 'c'] | s += s2 is a shorthand for s.merge(s2). | [
"s",
"+",
"=",
"s2",
"is",
"a",
"shorthand",
"for",
"s",
".",
"merge",
"(",
"s2",
")",
"."
] | def __iadd__(self, other):
"""s += s2 is a shorthand for s.merge(s2).
Examples
--------
>>> s = Struct(a=10,b=30)
>>> s2 = Struct(a=20,c=40)
>>> s += s2
>>> sorted(s.keys())
['a', 'b', 'c']
"""
self.merge(other)
return self | [
"def",
"__iadd__",
"(",
"self",
",",
"other",
")",
":",
"self",
".",
"merge",
"(",
"other",
")",
"return",
"self"
] | https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/ipython/py3/IPython/utils/ipstruct.py#L153-L166 | |
apache/arrow | af33dd1157eb8d7d9bfac25ebf61445b793b7943 | cpp/build-support/cpplint.py | python | UpdateIncludeState | (filename, include_dict, io=codecs) | return True | Fill up the include_dict with new includes found from the file.
Args:
filename: the name of the header to read.
include_dict: a dictionary in which the headers are inserted.
io: The io factory to use to read the file. Provided for testability.
Returns:
True if a header was successfully added. Fals... | Fill up the include_dict with new includes found from the file. | [
"Fill",
"up",
"the",
"include_dict",
"with",
"new",
"includes",
"found",
"from",
"the",
"file",
"."
] | def UpdateIncludeState(filename, include_dict, io=codecs):
"""Fill up the include_dict with new includes found from the file.
Args:
filename: the name of the header to read.
include_dict: a dictionary in which the headers are inserted.
io: The io factory to use to read the file. Provided for testabilit... | [
"def",
"UpdateIncludeState",
"(",
"filename",
",",
"include_dict",
",",
"io",
"=",
"codecs",
")",
":",
"headerfile",
"=",
"None",
"try",
":",
"headerfile",
"=",
"io",
".",
"open",
"(",
"filename",
",",
"'r'",
",",
"'utf8'",
",",
"'replace'",
")",
"except... | https://github.com/apache/arrow/blob/af33dd1157eb8d7d9bfac25ebf61445b793b7943/cpp/build-support/cpplint.py#L5631-L5655 | |
apache/incubator-mxnet | f03fb23f1d103fec9541b5ae59ee06b1734a51d9 | python/mxnet/symbol/symbol.py | python | Symbol.attr_dict | (self) | return ret | Recursively gets all attributes from the symbol and its children.
Example
-------
>>> a = mx.sym.Variable('a', attr={'a1':'a2'})
>>> b = mx.sym.Variable('b', attr={'b1':'b2'})
>>> c = a+b
>>> c.attr_dict()
{'a': {'a1': 'a2'}, 'b': {'b1': 'b2'}}
Returns
... | Recursively gets all attributes from the symbol and its children. | [
"Recursively",
"gets",
"all",
"attributes",
"from",
"the",
"symbol",
"and",
"its",
"children",
"."
] | def attr_dict(self):
"""Recursively gets all attributes from the symbol and its children.
Example
-------
>>> a = mx.sym.Variable('a', attr={'a1':'a2'})
>>> b = mx.sym.Variable('b', attr={'b1':'b2'})
>>> c = a+b
>>> c.attr_dict()
{'a': {'a1': 'a2'}, 'b': ... | [
"def",
"attr_dict",
"(",
"self",
")",
":",
"size",
"=",
"mx_uint",
"(",
")",
"pairs",
"=",
"ctypes",
".",
"POINTER",
"(",
"ctypes",
".",
"c_char_p",
")",
"(",
")",
"f_handle",
"=",
"_LIB",
".",
"MXSymbolListAttr",
"check_call",
"(",
"f_handle",
"(",
"s... | https://github.com/apache/incubator-mxnet/blob/f03fb23f1d103fec9541b5ae59ee06b1734a51d9/python/mxnet/symbol/symbol.py#L634-L663 | |
ApolloAuto/apollo-platform | 86d9dc6743b496ead18d597748ebabd34a513289 | ros/dynamic_reconfigure/src/dynamic_reconfigure/client.py | python | Client.update_groups | (self, changes) | return descr | Changes the servers group configuration
@param changes: dictionary of key value pairs for the parameters that are changing
@type changes: {str: value} | Changes the servers group configuration | [
"Changes",
"the",
"servers",
"group",
"configuration"
] | def update_groups(self, changes):
"""
Changes the servers group configuration
@param changes: dictionary of key value pairs for the parameters that are changing
@type changes: {str: value}
"""
descr = self.get_group_descriptions()
groups = []
def updat... | [
"def",
"update_groups",
"(",
"self",
",",
"changes",
")",
":",
"descr",
"=",
"self",
".",
"get_group_descriptions",
"(",
")",
"groups",
"=",
"[",
"]",
"def",
"update_state",
"(",
"group",
",",
"description",
")",
":",
"for",
"p",
",",
"g",
"in",
"descr... | https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/dynamic_reconfigure/src/dynamic_reconfigure/client.py#L233-L255 | |
gabyx/ApproxMVBB | 838f3ff7690a938f1e4199a5f41b6feefc32a603 | example/kdTreeFiltering/python/Tools/Transformations/Transformations.py | python | reflection_from_matrix | (matrix) | return point, normal | Return mirror plane point and normal vector from reflection matrix.
>>> v0 = numpy.random.random(3) - 0.5
>>> v1 = numpy.random.random(3) - 0.5
>>> M0 = reflection_matrix(v0, v1)
>>> point, normal = reflection_from_matrix(M0)
>>> M1 = reflection_matrix(point, normal)
>>> is_same_transform(M0, M... | Return mirror plane point and normal vector from reflection matrix. | [
"Return",
"mirror",
"plane",
"point",
"and",
"normal",
"vector",
"from",
"reflection",
"matrix",
"."
] | def reflection_from_matrix(matrix):
"""Return mirror plane point and normal vector from reflection matrix.
>>> v0 = numpy.random.random(3) - 0.5
>>> v1 = numpy.random.random(3) - 0.5
>>> M0 = reflection_matrix(v0, v1)
>>> point, normal = reflection_from_matrix(M0)
>>> M1 = reflection_matrix(poi... | [
"def",
"reflection_from_matrix",
"(",
"matrix",
")",
":",
"M",
"=",
"numpy",
".",
"array",
"(",
"matrix",
",",
"dtype",
"=",
"numpy",
".",
"float64",
",",
"copy",
"=",
"False",
")",
"# normal: unit eigenvector corresponding to eigenvalue -1",
"w",
",",
"V",
"=... | https://github.com/gabyx/ApproxMVBB/blob/838f3ff7690a938f1e4199a5f41b6feefc32a603/example/kdTreeFiltering/python/Tools/Transformations/Transformations.py#L268-L294 | |
cms-sw/cmssw | fd9de012d503d3405420bcbeec0ec879baa57cf2 | PhysicsTools/HeppyCore/python/framework/eventstfile.py | python | Events.to | (self, iEv) | return self.tree | navigate to event iEv. | navigate to event iEv. | [
"navigate",
"to",
"event",
"iEv",
"."
] | def to(self, iEv):
'''navigate to event iEv.'''
self.tree.GetEntry(iEv)
return self.tree | [
"def",
"to",
"(",
"self",
",",
"iEv",
")",
":",
"self",
".",
"tree",
".",
"GetEntry",
"(",
"iEv",
")",
"return",
"self",
".",
"tree"
] | https://github.com/cms-sw/cmssw/blob/fd9de012d503d3405420bcbeec0ec879baa57cf2/PhysicsTools/HeppyCore/python/framework/eventstfile.py#L23-L26 | |
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Tools/build/waf-1.7.13/waflib/extras/msvs.py | python | msvs_generator.init | (self) | Some data that needs to be present | Some data that needs to be present | [
"Some",
"data",
"that",
"needs",
"to",
"be",
"present"
] | def init(self):
"""
Some data that needs to be present
"""
if not getattr(self, 'configurations', None):
self.configurations = ['Release'] # LocalRelease, RemoteDebug, etc
if not getattr(self, 'platforms', None):
self.platforms = ['Win32']
if not getattr(self, 'all_projects', None):
self.all_projec... | [
"def",
"init",
"(",
"self",
")",
":",
"if",
"not",
"getattr",
"(",
"self",
",",
"'configurations'",
",",
"None",
")",
":",
"self",
".",
"configurations",
"=",
"[",
"'Release'",
"]",
"# LocalRelease, RemoteDebug, etc",
"if",
"not",
"getattr",
"(",
"self",
"... | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/build/waf-1.7.13/waflib/extras/msvs.py#L696-L725 | ||
google-ar/WebARonTango | e86965d2cbc652156b480e0fcf77c716745578cd | chromium/src/gpu/command_buffer/build_gles2_cmd_buffer.py | python | Function.IsES3 | (self) | return self.GetInfo('es3', False) | Returns whether the function requires an ES3 context or not. | Returns whether the function requires an ES3 context or not. | [
"Returns",
"whether",
"the",
"function",
"requires",
"an",
"ES3",
"context",
"or",
"not",
"."
] | def IsES3(self):
"""Returns whether the function requires an ES3 context or not."""
return self.GetInfo('es3', False) | [
"def",
"IsES3",
"(",
"self",
")",
":",
"return",
"self",
".",
"GetInfo",
"(",
"'es3'",
",",
"False",
")"
] | https://github.com/google-ar/WebARonTango/blob/e86965d2cbc652156b480e0fcf77c716745578cd/chromium/src/gpu/command_buffer/build_gles2_cmd_buffer.py#L9302-L9304 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/msw/_core.py | python | Window.SetThemeEnabled | (*args, **kwargs) | return _core_.Window_SetThemeEnabled(*args, **kwargs) | SetThemeEnabled(self, bool enableTheme)
This function tells a window if it should use the system's "theme"
code to draw the windows' background instead if its own background
drawing code. This will only have an effect on platforms that support
the notion of themes in user defined win... | SetThemeEnabled(self, bool enableTheme) | [
"SetThemeEnabled",
"(",
"self",
"bool",
"enableTheme",
")"
] | def SetThemeEnabled(*args, **kwargs):
"""
SetThemeEnabled(self, bool enableTheme)
This function tells a window if it should use the system's "theme"
code to draw the windows' background instead if its own background
drawing code. This will only have an effect on platforms that... | [
"def",
"SetThemeEnabled",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_core_",
".",
"Window_SetThemeEnabled",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_core.py#L10099-L10113 | |
miyosuda/TensorFlowAndroidDemo | 35903e0221aa5f109ea2dbef27f20b52e317f42d | jni-build/jni/include/tensorflow/contrib/learn/python/learn/estimators/dnn.py | python | DNNRegressor.__init__ | (self,
hidden_units,
feature_columns=None,
model_dir=None,
weight_column_name=None,
optimizer=None,
activation_fn=nn.relu,
dropout=None,
gradient_clip_norm=None,
enable_centered_bias=Tr... | Initializes a `DNNRegressor` instance.
Args:
hidden_units: List of hidden units per layer. All layers are fully
connected. Ex. `[64, 32]` means first layer has 64 nodes and second one
has 32.
feature_columns: An iterable containing all the feature columns used by
the model. All ... | Initializes a `DNNRegressor` instance. | [
"Initializes",
"a",
"DNNRegressor",
"instance",
"."
] | def __init__(self,
hidden_units,
feature_columns=None,
model_dir=None,
weight_column_name=None,
optimizer=None,
activation_fn=nn.relu,
dropout=None,
gradient_clip_norm=None,
enable_cent... | [
"def",
"__init__",
"(",
"self",
",",
"hidden_units",
",",
"feature_columns",
"=",
"None",
",",
"model_dir",
"=",
"None",
",",
"weight_column_name",
"=",
"None",
",",
"optimizer",
"=",
"None",
",",
"activation_fn",
"=",
"nn",
".",
"relu",
",",
"dropout",
"=... | https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/contrib/learn/python/learn/estimators/dnn.py#L262-L322 | ||
krishauser/Klampt | 972cc83ea5befac3f653c1ba20f80155768ad519 | Python/python2_version/klampt/robotsim.py | python | RobotModelLink.getPointAcceleration | (self, plocal, ddq) | return _robotsim.RobotModelLink_getPointAcceleration(self, plocal, ddq) | getPointAcceleration(RobotModelLink self, double const [3] plocal, doubleVector ddq)
Returns the acceleration of the point given the robot's current joint
configuration and velocities, and the joint accelerations ddq.
Returns:
(list of 3 floats): the acceleration of the poin... | getPointAcceleration(RobotModelLink self, double const [3] plocal, doubleVector ddq) | [
"getPointAcceleration",
"(",
"RobotModelLink",
"self",
"double",
"const",
"[",
"3",
"]",
"plocal",
"doubleVector",
"ddq",
")"
] | def getPointAcceleration(self, plocal, ddq):
"""
getPointAcceleration(RobotModelLink self, double const [3] plocal, doubleVector ddq)
Returns the acceleration of the point given the robot's current joint
configuration and velocities, and the joint accelerations ddq.
Returns... | [
"def",
"getPointAcceleration",
"(",
"self",
",",
"plocal",
",",
"ddq",
")",
":",
"return",
"_robotsim",
".",
"RobotModelLink_getPointAcceleration",
"(",
"self",
",",
"plocal",
",",
"ddq",
")"
] | https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/python2_version/klampt/robotsim.py#L4148-L4163 | |
google/or-tools | 2cb85b4eead4c38e1c54b48044f92087cf165bce | ortools/constraint_solver/samples/vrp_time_windows_per_vehicles.py | python | create_data_model | () | return data | Stores the data for the problem. | Stores the data for the problem. | [
"Stores",
"the",
"data",
"for",
"the",
"problem",
"."
] | def create_data_model():
"""Stores the data for the problem."""
data = {}
data['time_matrix'] = [
[0, 6, 9, 8, 7, 3, 6, 2, 3, 2, 6, 6, 4, 4, 5, 9, 7],
[6, 0, 8, 3, 2, 6, 8, 4, 8, 8, 13, 7, 5, 8, 12, 10, 14],
[9, 8, 0, 11, 10, 6, 3, 9, 5, 8, 4, 15, 14, 13, 9, 18, 9],
[8, 3, 11... | [
"def",
"create_data_model",
"(",
")",
":",
"data",
"=",
"{",
"}",
"data",
"[",
"'time_matrix'",
"]",
"=",
"[",
"[",
"0",
",",
"6",
",",
"9",
",",
"8",
",",
"7",
",",
"3",
",",
"6",
",",
"2",
",",
"3",
",",
"2",
",",
"6",
",",
"6",
",",
... | https://github.com/google/or-tools/blob/2cb85b4eead4c38e1c54b48044f92087cf165bce/ortools/constraint_solver/samples/vrp_time_windows_per_vehicles.py#L39-L63 | |
FreeCAD/FreeCAD | ba42231b9c6889b89e064d6d563448ed81e376ec | src/Mod/Path/PathScripts/PathDressupAxisMap.py | python | ObjectDressup._linear2angular | (self, radius, length) | return 360 * (float(length) / circum) | returns an angular distance in degrees to achieve a linear move of a given length | returns an angular distance in degrees to achieve a linear move of a given length | [
"returns",
"an",
"angular",
"distance",
"in",
"degrees",
"to",
"achieve",
"a",
"linear",
"move",
"of",
"a",
"given",
"length"
] | def _linear2angular(self, radius, length):
"""returns an angular distance in degrees to achieve a linear move of a given length"""
circum = 2 * math.pi * float(radius)
return 360 * (float(length) / circum) | [
"def",
"_linear2angular",
"(",
"self",
",",
"radius",
",",
"length",
")",
":",
"circum",
"=",
"2",
"*",
"math",
".",
"pi",
"*",
"float",
"(",
"radius",
")",
"return",
"360",
"*",
"(",
"float",
"(",
"length",
")",
"/",
"circum",
")"
] | https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Path/PathScripts/PathDressupAxisMap.py#L81-L84 | |
eventql/eventql | 7ca0dbb2e683b525620ea30dc40540a22d5eb227 | deps/3rdparty/spidermonkey/mozjs/python/requests/requests/packages/urllib3/packages/ordered_dict.py | python | OrderedDict.__eq__ | (self, other) | return dict.__eq__(self, other) | od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive
while comparison to a regular mapping is order-insensitive. | od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive
while comparison to a regular mapping is order-insensitive. | [
"od",
".",
"__eq__",
"(",
"y",
")",
"<",
"==",
">",
"od",
"==",
"y",
".",
"Comparison",
"to",
"another",
"OD",
"is",
"order",
"-",
"sensitive",
"while",
"comparison",
"to",
"a",
"regular",
"mapping",
"is",
"order",
"-",
"insensitive",
"."
] | def __eq__(self, other):
'''od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive
while comparison to a regular mapping is order-insensitive.
'''
if isinstance(other, OrderedDict):
return len(self)==len(other) and self.items() == other.items()
return ... | [
"def",
"__eq__",
"(",
"self",
",",
"other",
")",
":",
"if",
"isinstance",
"(",
"other",
",",
"OrderedDict",
")",
":",
"return",
"len",
"(",
"self",
")",
"==",
"len",
"(",
"other",
")",
"and",
"self",
".",
"items",
"(",
")",
"==",
"other",
".",
"i... | https://github.com/eventql/eventql/blob/7ca0dbb2e683b525620ea30dc40540a22d5eb227/deps/3rdparty/spidermonkey/mozjs/python/requests/requests/packages/urllib3/packages/ordered_dict.py#L235-L242 | |
wlanjie/AndroidFFmpeg | 7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf | tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/threading.py | python | setprofile | (func) | Set a profile function for all threads started from the threading module.
The func will be passed to sys.setprofile() for each thread, before its
run() method is called. | Set a profile function for all threads started from the threading module. | [
"Set",
"a",
"profile",
"function",
"for",
"all",
"threads",
"started",
"from",
"the",
"threading",
"module",
"."
] | def setprofile(func):
"""Set a profile function for all threads started from the threading module.
The func will be passed to sys.setprofile() for each thread, before its
run() method is called.
"""
global _profile_hook
_profile_hook = func | [
"def",
"setprofile",
"(",
"func",
")",
":",
"global",
"_profile_hook",
"_profile_hook",
"=",
"func"
] | https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/threading.py#L89-L97 | ||
BogdanDIA/gr-dvbt | 79e1c54ef3bd66906c2d94dbc383c35c17b3f088 | python/ofdm_sync_pn.py | python | ofdm_sync_pn.__init__ | (self, fft_length, cp_length, logging=False) | OFDM synchronization using PN Correlation:
T. M. Schmidl and D. C. Cox, "Robust Frequency and Timing
Synchonization for OFDM," IEEE Trans. Communications, vol. 45,
no. 12, 1997. | OFDM synchronization using PN Correlation:
T. M. Schmidl and D. C. Cox, "Robust Frequency and Timing
Synchonization for OFDM," IEEE Trans. Communications, vol. 45,
no. 12, 1997. | [
"OFDM",
"synchronization",
"using",
"PN",
"Correlation",
":",
"T",
".",
"M",
".",
"Schmidl",
"and",
"D",
".",
"C",
".",
"Cox",
"Robust",
"Frequency",
"and",
"Timing",
"Synchonization",
"for",
"OFDM",
"IEEE",
"Trans",
".",
"Communications",
"vol",
".",
"45"... | def __init__(self, fft_length, cp_length, logging=False):
"""
OFDM synchronization using PN Correlation:
T. M. Schmidl and D. C. Cox, "Robust Frequency and Timing
Synchonization for OFDM," IEEE Trans. Communications, vol. 45,
no. 12, 1997.
"""
gr.hier_block2.__i... | [
"def",
"__init__",
"(",
"self",
",",
"fft_length",
",",
"cp_length",
",",
"logging",
"=",
"False",
")",
":",
"gr",
".",
"hier_block2",
".",
"__init__",
"(",
"self",
",",
"\"ofdm_sync_pn\"",
",",
"gr",
".",
"io_signature",
"(",
"1",
",",
"1",
",",
"gr",... | https://github.com/BogdanDIA/gr-dvbt/blob/79e1c54ef3bd66906c2d94dbc383c35c17b3f088/python/ofdm_sync_pn.py#L28-L123 | ||
trilinos/Trilinos | 6168be6dd51e35e1cd681e9c4b24433e709df140 | packages/seacas/scripts/exomerge2.py | python | ExodusModel.get_side_set_field_values | (self,
side_set_field_name,
side_set_id='auto',
timestep='last') | return fields[side_set_field_name][timestep_index] | Return the list of side set field values.
The actual list of values is returned, so any modifications to it will
be stored in the model.
Examples:
>>> model.get_side_set_field_values('contact_pressure', side_set_id=1)
>>> model.get_side_set_field_values('contact_pressure', time... | Return the list of side set field values. | [
"Return",
"the",
"list",
"of",
"side",
"set",
"field",
"values",
"."
] | def get_side_set_field_values(self,
side_set_field_name,
side_set_id='auto',
timestep='last'):
"""
Return the list of side set field values.
The actual list of values is returned, so any modifi... | [
"def",
"get_side_set_field_values",
"(",
"self",
",",
"side_set_field_name",
",",
"side_set_id",
"=",
"'auto'",
",",
"timestep",
"=",
"'last'",
")",
":",
"[",
"side_set_id",
"]",
"=",
"self",
".",
"_format_side_set_id_list",
"(",
"[",
"side_set_id",
"]",
",",
... | https://github.com/trilinos/Trilinos/blob/6168be6dd51e35e1cd681e9c4b24433e709df140/packages/seacas/scripts/exomerge2.py#L3162-L3202 | |
GoSSIP-SJTU/Armariris | ad5d868482956b2194a77b39c8d543c7c2318200 | tools/clang/bindings/python/clang/cindex.py | python | Type.translation_unit | (self) | return self._tu | The TranslationUnit to which this Type is associated. | The TranslationUnit to which this Type is associated. | [
"The",
"TranslationUnit",
"to",
"which",
"this",
"Type",
"is",
"associated",
"."
] | def translation_unit(self):
"""The TranslationUnit to which this Type is associated."""
# If this triggers an AttributeError, the instance was not properly
# instantiated.
return self._tu | [
"def",
"translation_unit",
"(",
"self",
")",
":",
"# If this triggers an AttributeError, the instance was not properly",
"# instantiated.",
"return",
"self",
".",
"_tu"
] | https://github.com/GoSSIP-SJTU/Armariris/blob/ad5d868482956b2194a77b39c8d543c7c2318200/tools/clang/bindings/python/clang/cindex.py#L1850-L1854 | |
windystrife/UnrealEngine_NVIDIAGameWorks | b50e6338a7c5b26374d66306ebc7807541ff815e | Engine/Source/ThirdParty/CEF3/cef_source/tools/cef_parser.py | python | obj_typedef.get_value | (self) | return self.value | Return an analysis of the value based on the class or header file
definition context. | Return an analysis of the value based on the class or header file
definition context. | [
"Return",
"an",
"analysis",
"of",
"the",
"value",
"based",
"on",
"the",
"class",
"or",
"header",
"file",
"definition",
"context",
"."
] | def get_value(self):
""" Return an analysis of the value based on the class or header file
definition context.
"""
return self.value | [
"def",
"get_value",
"(",
"self",
")",
":",
"return",
"self",
".",
"value"
] | https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Source/ThirdParty/CEF3/cef_source/tools/cef_parser.py#L1020-L1024 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/osx_carbon/_windows.py | python | PrintPreview.GetPrintDialogData | (*args, **kwargs) | return _windows_.PrintPreview_GetPrintDialogData(*args, **kwargs) | GetPrintDialogData(self) -> PrintDialogData | GetPrintDialogData(self) -> PrintDialogData | [
"GetPrintDialogData",
"(",
"self",
")",
"-",
">",
"PrintDialogData"
] | def GetPrintDialogData(*args, **kwargs):
"""GetPrintDialogData(self) -> PrintDialogData"""
return _windows_.PrintPreview_GetPrintDialogData(*args, **kwargs) | [
"def",
"GetPrintDialogData",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_windows_",
".",
"PrintPreview_GetPrintDialogData",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_windows.py#L5621-L5623 | |
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Tools/Python/3.7.10/windows/Lib/_pydecimal.py | python | Decimal.__repr__ | (self) | return "Decimal('%s')" % str(self) | Represents the number as an instance of Decimal. | Represents the number as an instance of Decimal. | [
"Represents",
"the",
"number",
"as",
"an",
"instance",
"of",
"Decimal",
"."
] | def __repr__(self):
"""Represents the number as an instance of Decimal."""
# Invariant: eval(repr(d)) == d
return "Decimal('%s')" % str(self) | [
"def",
"__repr__",
"(",
"self",
")",
":",
"# Invariant: eval(repr(d)) == d",
"return",
"\"Decimal('%s')\"",
"%",
"str",
"(",
"self",
")"
] | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/_pydecimal.py#L1026-L1029 | |
eric612/Caffe-YOLOv3-Windows | 6736ca6e16781789b828cc64218ff77cc3454e5d | scripts/cpp_lint.py | python | CheckMakePairUsesDeduction | (filename, clean_lines, linenum, error) | Check that make_pair's template arguments are deduced.
G++ 4.6 in C++0x mode fails badly if make_pair's template arguments are
specified explicitly, and such use isn't intended in any case.
Args:
filename: The name of the current file.
clean_lines: A CleansedLines instance containing the file.
linen... | Check that make_pair's template arguments are deduced. | [
"Check",
"that",
"make_pair",
"s",
"template",
"arguments",
"are",
"deduced",
"."
] | def CheckMakePairUsesDeduction(filename, clean_lines, linenum, error):
"""Check that make_pair's template arguments are deduced.
G++ 4.6 in C++0x mode fails badly if make_pair's template arguments are
specified explicitly, and such use isn't intended in any case.
Args:
filename: The name of the current fi... | [
"def",
"CheckMakePairUsesDeduction",
"(",
"filename",
",",
"clean_lines",
",",
"linenum",
",",
"error",
")",
":",
"line",
"=",
"clean_lines",
".",
"elided",
"[",
"linenum",
"]",
"match",
"=",
"_RE_PATTERN_EXPLICIT_MAKEPAIR",
".",
"search",
"(",
"line",
")",
"i... | https://github.com/eric612/Caffe-YOLOv3-Windows/blob/6736ca6e16781789b828cc64218ff77cc3454e5d/scripts/cpp_lint.py#L4583-L4601 | ||
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/osx_carbon/_misc.py | python | ToolTip.SetAutoPop | (*args, **kwargs) | return _misc_.ToolTip_SetAutoPop(*args, **kwargs) | SetAutoPop(long milliseconds) | SetAutoPop(long milliseconds) | [
"SetAutoPop",
"(",
"long",
"milliseconds",
")"
] | def SetAutoPop(*args, **kwargs):
"""SetAutoPop(long milliseconds)"""
return _misc_.ToolTip_SetAutoPop(*args, **kwargs) | [
"def",
"SetAutoPop",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_misc_",
".",
"ToolTip_SetAutoPop",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_misc.py#L689-L691 | |
apache/arrow | af33dd1157eb8d7d9bfac25ebf61445b793b7943 | cpp/build-support/cpplint.py | python | ProcessConfigOverrides | (filename) | return True | Loads the configuration files and processes the config overrides.
Args:
filename: The name of the file being processed by the linter.
Returns:
False if the current |filename| should not be processed further. | Loads the configuration files and processes the config overrides. | [
"Loads",
"the",
"configuration",
"files",
"and",
"processes",
"the",
"config",
"overrides",
"."
] | def ProcessConfigOverrides(filename):
""" Loads the configuration files and processes the config overrides.
Args:
filename: The name of the file being processed by the linter.
Returns:
False if the current |filename| should not be processed further.
"""
abs_filename = os.path.abspath(filename)
cf... | [
"def",
"ProcessConfigOverrides",
"(",
"filename",
")",
":",
"abs_filename",
"=",
"os",
".",
"path",
".",
"abspath",
"(",
"filename",
")",
"cfg_filters",
"=",
"[",
"]",
"keep_looking",
"=",
"True",
"while",
"keep_looking",
":",
"abs_path",
",",
"base_name",
"... | https://github.com/apache/arrow/blob/af33dd1157eb8d7d9bfac25ebf61445b793b7943/cpp/build-support/cpplint.py#L6107-L6200 | |
mindspore-ai/mindspore | fb8fd3338605bb34fa5cea054e535a8b1d753fab | mindspore/python/mindspore/dataset/audio/validators.py | python | check_time_stretch | (method) | return new_method | Wrapper method to check the parameters of TimeStretch. | Wrapper method to check the parameters of TimeStretch. | [
"Wrapper",
"method",
"to",
"check",
"the",
"parameters",
"of",
"TimeStretch",
"."
] | def check_time_stretch(method):
"""Wrapper method to check the parameters of TimeStretch."""
@wraps(method)
def new_method(self, *args, **kwargs):
[hop_length, n_freq, fixed_rate], _ = parse_user_args(method, *args, **kwargs)
if hop_length is not None:
type_check(hop_length, (i... | [
"def",
"check_time_stretch",
"(",
"method",
")",
":",
"@",
"wraps",
"(",
"method",
")",
"def",
"new_method",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"[",
"hop_length",
",",
"n_freq",
",",
"fixed_rate",
"]",
",",
"_",
"=",
... | https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/dataset/audio/validators.py#L422-L441 | |
mongodb/mongo | d8ff665343ad29cf286ee2cf4a1960d29371937b | src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/ipkg.py | python | generate | (env) | Add Builders and construction variables for ipkg to an Environment. | Add Builders and construction variables for ipkg to an Environment. | [
"Add",
"Builders",
"and",
"construction",
"variables",
"for",
"ipkg",
"to",
"an",
"Environment",
"."
] | def generate(env):
"""Add Builders and construction variables for ipkg to an Environment."""
try:
bld = env['BUILDERS']['Ipkg']
except KeyError:
bld = SCons.Builder.Builder(action='$IPKGCOM',
suffix='$IPKGSUFFIX',
source... | [
"def",
"generate",
"(",
"env",
")",
":",
"try",
":",
"bld",
"=",
"env",
"[",
"'BUILDERS'",
"]",
"[",
"'Ipkg'",
"]",
"except",
"KeyError",
":",
"bld",
"=",
"SCons",
".",
"Builder",
".",
"Builder",
"(",
"action",
"=",
"'$IPKGCOM'",
",",
"suffix",
"=",
... | https://github.com/mongodb/mongo/blob/d8ff665343ad29cf286ee2cf4a1960d29371937b/src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/ipkg.py#L42-L63 | ||
mantidproject/mantid | 03deeb89254ec4289edb8771e0188c2090a02f32 | Framework/PythonInterface/plugins/algorithms/FindGoniometerFromUB.py | python | FindGoniometerFromUB.createGoniometerTable | (self) | return gonioTable | :return: Empty table workspace with columns Run, Chi, Phi and GonioAxis (unit vector) | :return: Empty table workspace with columns Run, Chi, Phi and GonioAxis (unit vector) | [
":",
"return",
":",
"Empty",
"table",
"workspace",
"with",
"columns",
"Run",
"Chi",
"Phi",
"and",
"GonioAxis",
"(",
"unit",
"vector",
")"
] | def createGoniometerTable(self):
"""
:return: Empty table workspace with columns Run, Chi, Phi and GonioAxis (unit vector)
"""
gonioTable = CreateEmptyTableWorkspace(StoreInADS=False)
# Add some columns, Recognized types are: int,float,double,bool,str,V3D,long64
gonioTabl... | [
"def",
"createGoniometerTable",
"(",
"self",
")",
":",
"gonioTable",
"=",
"CreateEmptyTableWorkspace",
"(",
"StoreInADS",
"=",
"False",
")",
"# Add some columns, Recognized types are: int,float,double,bool,str,V3D,long64",
"gonioTable",
".",
"addColumn",
"(",
"type",
"=",
"... | https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/Framework/PythonInterface/plugins/algorithms/FindGoniometerFromUB.py#L261-L271 | |
facebook/ThreatExchange | 31914a51820c73c8a0daffe62ccca29a6e3d359e | python-threatexchange/threatexchange/content_type/meta.py | python | get_all_content_types | () | return [
text.TextContent,
video.VideoContent,
photo.PhotoContent,
pdf.PDFContent,
url.URL,
] | Returns all content_type implementations for commands | Returns all content_type implementations for commands | [
"Returns",
"all",
"content_type",
"implementations",
"for",
"commands"
] | def get_all_content_types() -> t.List[t.Type[content_base.ContentType]]:
"""Returns all content_type implementations for commands"""
return [
text.TextContent,
video.VideoContent,
photo.PhotoContent,
pdf.PDFContent,
url.URL,
] | [
"def",
"get_all_content_types",
"(",
")",
"->",
"t",
".",
"List",
"[",
"t",
".",
"Type",
"[",
"content_base",
".",
"ContentType",
"]",
"]",
":",
"return",
"[",
"text",
".",
"TextContent",
",",
"video",
".",
"VideoContent",
",",
"photo",
".",
"PhotoConten... | https://github.com/facebook/ThreatExchange/blob/31914a51820c73c8a0daffe62ccca29a6e3d359e/python-threatexchange/threatexchange/content_type/meta.py#L16-L24 | |
yrnkrn/zapcc | c6a8aa30006d997eff0d60fd37b0e62b8aa0ea50 | tools/clang/bindings/python/clang/cindex.py | python | Cursor.storage_class | (self) | return StorageClass.from_id(self._storage_class) | Retrieves the storage class (if any) of the entity pointed at by the
cursor. | Retrieves the storage class (if any) of the entity pointed at by the
cursor. | [
"Retrieves",
"the",
"storage",
"class",
"(",
"if",
"any",
")",
"of",
"the",
"entity",
"pointed",
"at",
"by",
"the",
"cursor",
"."
] | def storage_class(self):
"""
Retrieves the storage class (if any) of the entity pointed at by the
cursor.
"""
if not hasattr(self, '_storage_class'):
self._storage_class = conf.lib.clang_Cursor_getStorageClass(self)
return StorageClass.from_id(self._storage_c... | [
"def",
"storage_class",
"(",
"self",
")",
":",
"if",
"not",
"hasattr",
"(",
"self",
",",
"'_storage_class'",
")",
":",
"self",
".",
"_storage_class",
"=",
"conf",
".",
"lib",
".",
"clang_Cursor_getStorageClass",
"(",
"self",
")",
"return",
"StorageClass",
".... | https://github.com/yrnkrn/zapcc/blob/c6a8aa30006d997eff0d60fd37b0e62b8aa0ea50/tools/clang/bindings/python/clang/cindex.py#L1588-L1596 | |
ltcmelo/psychec | 46672204681d73b40772a7bf24137dca23175e81 | cnippet/wrapper/Python/PsycheCFacade.py | python | PsycheCFacade.solve_constraints | (self, unit: Unit) | Solve the constraint. | Solve the constraint. | [
"Solve",
"the",
"constraint",
"."
] | def solve_constraints(self, unit: Unit):
"""
Solve the constraint.
"""
cmd = [PsycheCFacade._SOLVER,
'--',
'-i',
unit.cstr_file,
'-o',
unit.cnip_file]
if not self.no_stdlib:
cmd.append('--mat... | [
"def",
"solve_constraints",
"(",
"self",
",",
"unit",
":",
"Unit",
")",
":",
"cmd",
"=",
"[",
"PsycheCFacade",
".",
"_SOLVER",
",",
"'--'",
",",
"'-i'",
",",
"unit",
".",
"cstr_file",
",",
"'-o'",
",",
"unit",
".",
"cnip_file",
"]",
"if",
"not",
"sel... | https://github.com/ltcmelo/psychec/blob/46672204681d73b40772a7bf24137dca23175e81/cnippet/wrapper/Python/PsycheCFacade.py#L78-L97 | ||
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/msw/_controls.py | python | SpinCtrlDouble.__init__ | (self, *args, **kwargs) | __init__(self, Window parent, int id=ID_ANY, String value=wxEmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
long style=wxSP_ARROW_KEYS|wxALIGN_RIGHT,
double min=0, double max=100, double initial=0,
double inc=1, String name="wxSpinCtrlDouble") -> SpinCt... | __init__(self, Window parent, int id=ID_ANY, String value=wxEmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
long style=wxSP_ARROW_KEYS|wxALIGN_RIGHT,
double min=0, double max=100, double initial=0,
double inc=1, String name="wxSpinCtrlDouble") -> SpinCt... | [
"__init__",
"(",
"self",
"Window",
"parent",
"int",
"id",
"=",
"ID_ANY",
"String",
"value",
"=",
"wxEmptyString",
"Point",
"pos",
"=",
"DefaultPosition",
"Size",
"size",
"=",
"DefaultSize",
"long",
"style",
"=",
"wxSP_ARROW_KEYS|wxALIGN_RIGHT",
"double",
"min",
... | def __init__(self, *args, **kwargs):
"""
__init__(self, Window parent, int id=ID_ANY, String value=wxEmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
long style=wxSP_ARROW_KEYS|wxALIGN_RIGHT,
double min=0, double max=100, double initial=0,
... | [
"def",
"__init__",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"_controls_",
".",
"SpinCtrlDouble_swiginit",
"(",
"self",
",",
"_controls_",
".",
"new_SpinCtrlDouble",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
")",
"self",
"... | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_controls.py#L2479-L2488 | ||
mindspore-ai/mindspore | fb8fd3338605bb34fa5cea054e535a8b1d753fab | mindspore/python/mindspore/dataset/vision/validators.py | python | check_cutout | (method) | return new_method | Wrapper method to check the parameters of cutout operation. | Wrapper method to check the parameters of cutout operation. | [
"Wrapper",
"method",
"to",
"check",
"the",
"parameters",
"of",
"cutout",
"operation",
"."
] | def check_cutout(method):
"""Wrapper method to check the parameters of cutout operation."""
@wraps(method)
def new_method(self, *args, **kwargs):
[length, num_patches], _ = parse_user_args(method, *args, **kwargs)
type_check(length, (int,), "length")
type_check(num_patches, (int,), ... | [
"def",
"check_cutout",
"(",
"method",
")",
":",
"@",
"wraps",
"(",
"method",
")",
"def",
"new_method",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"[",
"length",
",",
"num_patches",
"]",
",",
"_",
"=",
"parse_user_args",
"(",
... | https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/dataset/vision/validators.py#L698-L711 | |
mindspore-ai/mindspore | fb8fd3338605bb34fa5cea054e535a8b1d753fab | mindspore/python/mindspore/communication/management.py | python | create_group | (group, rank_ids) | Create a user collective communication group.
Note:
GPU version of MindSpore doesn't support this method.
The size of rank_ids should be larger than 1, rank_ids should not have duplicate data.
This method should be used after init().
Only support global single communication group in... | Create a user collective communication group. | [
"Create",
"a",
"user",
"collective",
"communication",
"group",
"."
] | def create_group(group, rank_ids):
"""
Create a user collective communication group.
Note:
GPU version of MindSpore doesn't support this method.
The size of rank_ids should be larger than 1, rank_ids should not have duplicate data.
This method should be used after init().
On... | [
"def",
"create_group",
"(",
"group",
",",
"rank_ids",
")",
":",
"if",
"not",
"isinstance",
"(",
"group",
",",
"str",
")",
":",
"raise",
"TypeError",
"(",
"\"For 'create_group', the argument 'group' must be type of string, \"",
"\"but got 'group' type : {}.\"",
".",
"for... | https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/communication/management.py#L395-L430 | ||
FreeCAD/FreeCAD | ba42231b9c6889b89e064d6d563448ed81e376ec | src/Mod/Arch/ArchWall.py | python | _CommandMergeWalls.IsActive | (self) | return bool(FreeCADGui.Selection.getSelection()) | Determines whether or not the Arch MergeWalls tool is active.
Inactive commands are indicated by a greyed-out icon in the menus and
toolbars. | Determines whether or not the Arch MergeWalls tool is active. | [
"Determines",
"whether",
"or",
"not",
"the",
"Arch",
"MergeWalls",
"tool",
"is",
"active",
"."
] | def IsActive(self):
"""Determines whether or not the Arch MergeWalls tool is active.
Inactive commands are indicated by a greyed-out icon in the menus and
toolbars.
"""
return bool(FreeCADGui.Selection.getSelection()) | [
"def",
"IsActive",
"(",
"self",
")",
":",
"return",
"bool",
"(",
"FreeCADGui",
".",
"Selection",
".",
"getSelection",
"(",
")",
")"
] | https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Arch/ArchWall.py#L634-L641 | |
Slicer/SlicerGitSVNArchive | 65e92bb16c2b32ea47a1a66bee71f238891ee1ca | Modules/Scripted/DICOMLib/DICOMUtils.py | python | loadSeriesWithVerification | (seriesUIDs, expectedSelectedPlugins=None, expectedLoadedNodes=None) | return success | Load series by UID, and verify loadable selection and loaded nodes.
``selectedPlugins`` example: { 'Scalar Volume':1, 'RT':2 }
``expectedLoadedNodes`` example: { 'vtkMRMLScalarVolumeNode':2, 'vtkMRMLSegmentationNode':1 } | Load series by UID, and verify loadable selection and loaded nodes. | [
"Load",
"series",
"by",
"UID",
"and",
"verify",
"loadable",
"selection",
"and",
"loaded",
"nodes",
"."
] | def loadSeriesWithVerification(seriesUIDs, expectedSelectedPlugins=None, expectedLoadedNodes=None):
""" Load series by UID, and verify loadable selection and loaded nodes.
``selectedPlugins`` example: { 'Scalar Volume':1, 'RT':2 }
``expectedLoadedNodes`` example: { 'vtkMRMLScalarVolumeNode':2, 'vtkMRMLSegmentati... | [
"def",
"loadSeriesWithVerification",
"(",
"seriesUIDs",
",",
"expectedSelectedPlugins",
"=",
"None",
",",
"expectedLoadedNodes",
"=",
"None",
")",
":",
"if",
"not",
"slicer",
".",
"dicomDatabase",
".",
"isOpen",
":",
"logging",
".",
"error",
"(",
"'DICOM module or... | https://github.com/Slicer/SlicerGitSVNArchive/blob/65e92bb16c2b32ea47a1a66bee71f238891ee1ca/Modules/Scripted/DICOMLib/DICOMUtils.py#L330-L395 | |
xlgames-inc/XLE | cdd8682367d9e9fdbdda9f79d72bb5b1499cec46 | Foreign/FreeType/src/tools/docmaker/sources.py | python | SourceProcessor.reset | ( self ) | Reset a block processor and clean up all its blocks. | Reset a block processor and clean up all its blocks. | [
"Reset",
"a",
"block",
"processor",
"and",
"clean",
"up",
"all",
"its",
"blocks",
"."
] | def reset( self ):
"""Reset a block processor and clean up all its blocks."""
self.blocks = []
self.format = None | [
"def",
"reset",
"(",
"self",
")",
":",
"self",
".",
"blocks",
"=",
"[",
"]",
"self",
".",
"format",
"=",
"None"
] | https://github.com/xlgames-inc/XLE/blob/cdd8682367d9e9fdbdda9f79d72bb5b1499cec46/Foreign/FreeType/src/tools/docmaker/sources.py#L324-L327 | ||
mitmedialab/Junkyard-Jumbotron | 7e32ecc8a01ea5a578fea6ea54f1f44c7f8f546e | python/artoolkit.py | python | ARMarkerInfo.init | (self, xform) | Initialize with the given xform, calculating python-only variables | Initialize with the given xform, calculating python-only variables | [
"Initialize",
"with",
"the",
"given",
"xform",
"calculating",
"python",
"-",
"only",
"variables"
] | def init(self, xform):
"""Initialize with the given xform, calculating python-only variables"""
self.xform = xform
corners = (Vec3(-0.5, -0.5),
Vec3(-0.5, 0.5),
Vec3( 0.5, 0.5),
Vec3( 0.5, -0.5))
self.world_vertices = [xform.tra... | [
"def",
"init",
"(",
"self",
",",
"xform",
")",
":",
"self",
".",
"xform",
"=",
"xform",
"corners",
"=",
"(",
"Vec3",
"(",
"-",
"0.5",
",",
"-",
"0.5",
")",
",",
"Vec3",
"(",
"-",
"0.5",
",",
"0.5",
")",
",",
"Vec3",
"(",
"0.5",
",",
"0.5",
... | https://github.com/mitmedialab/Junkyard-Jumbotron/blob/7e32ecc8a01ea5a578fea6ea54f1f44c7f8f546e/python/artoolkit.py#L35-L62 | ||
wlanjie/AndroidFFmpeg | 7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf | tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib-tk/Tkinter.py | python | Checkbutton.invoke | (self) | return self.tk.call(self._w, 'invoke') | Toggle the button and invoke a command if given as resource. | Toggle the button and invoke a command if given as resource. | [
"Toggle",
"the",
"button",
"and",
"invoke",
"a",
"command",
"if",
"given",
"as",
"resource",
"."
] | def invoke(self):
"""Toggle the button and invoke a command if given as resource."""
return self.tk.call(self._w, 'invoke') | [
"def",
"invoke",
"(",
"self",
")",
":",
"return",
"self",
".",
"tk",
".",
"call",
"(",
"self",
".",
"_w",
",",
"'invoke'",
")"
] | https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib-tk/Tkinter.py#L2424-L2426 | |
panda3d/panda3d | 833ad89ebad58395d0af0b7ec08538e5e4308265 | direct/src/showbase/ShowBase.py | python | ShowBase.setupRender | (self) | Creates the render scene graph, the primary scene graph for
rendering 3-d geometry. | Creates the render scene graph, the primary scene graph for
rendering 3-d geometry. | [
"Creates",
"the",
"render",
"scene",
"graph",
"the",
"primary",
"scene",
"graph",
"for",
"rendering",
"3",
"-",
"d",
"geometry",
"."
] | def setupRender(self):
"""
Creates the render scene graph, the primary scene graph for
rendering 3-d geometry.
"""
## This is the root of the 3-D scene graph.
self.render = NodePath('render')
self.render.setAttrib(RescaleNormalAttrib.makeDefault())
self.r... | [
"def",
"setupRender",
"(",
"self",
")",
":",
"## This is the root of the 3-D scene graph.",
"self",
".",
"render",
"=",
"NodePath",
"(",
"'render'",
")",
"self",
".",
"render",
".",
"setAttrib",
"(",
"RescaleNormalAttrib",
".",
"makeDefault",
"(",
")",
")",
"sel... | https://github.com/panda3d/panda3d/blob/833ad89ebad58395d0af0b7ec08538e5e4308265/direct/src/showbase/ShowBase.py#L1149-L1161 | ||
cms-sw/cmssw | fd9de012d503d3405420bcbeec0ec879baa57cf2 | Alignment/MuonAlignment/python/svgfig.py | python | Text.SVG | (self, trans=None) | return SVG("text", self.d, x=X, y=Y, **self.attr) | Apply the transformation "trans" and return an SVG object. | Apply the transformation "trans" and return an SVG object. | [
"Apply",
"the",
"transformation",
"trans",
"and",
"return",
"an",
"SVG",
"object",
"."
] | def SVG(self, trans=None):
"""Apply the transformation "trans" and return an SVG object."""
if isinstance(trans, str): trans = totrans(trans)
X, Y = self.x, self.y
if trans != None: X, Y = trans(X, Y)
return SVG("text", self.d, x=X, y=Y, **self.attr) | [
"def",
"SVG",
"(",
"self",
",",
"trans",
"=",
"None",
")",
":",
"if",
"isinstance",
"(",
"trans",
",",
"str",
")",
":",
"trans",
"=",
"totrans",
"(",
"trans",
")",
"X",
",",
"Y",
"=",
"self",
".",
"x",
",",
"self",
".",
"y",
"if",
"trans",
"!... | https://github.com/cms-sw/cmssw/blob/fd9de012d503d3405420bcbeec0ec879baa57cf2/Alignment/MuonAlignment/python/svgfig.py#L1855-L1861 | |
cms-sw/cmssw | fd9de012d503d3405420bcbeec0ec879baa57cf2 | Alignment/MillePedeAlignmentAlgorithm/scripts/mps_setup_new_align.py | python | copy_default_templates | (args, next_campaign) | Copies the default configuration templates.
Arguments:
- `args`: container with the needed information
- `next_campaign`: destination for the copy operation | Copies the default configuration templates. | [
"Copies",
"the",
"default",
"configuration",
"templates",
"."
] | def copy_default_templates(args, next_campaign):
"""Copies the default configuration templates.
Arguments:
- `args`: container with the needed information
- `next_campaign`: destination for the copy operation
"""
default_conf_dir = os.path.join(args.MPS_dir, "templates")
template_files = (... | [
"def",
"copy_default_templates",
"(",
"args",
",",
"next_campaign",
")",
":",
"default_conf_dir",
"=",
"os",
".",
"path",
".",
"join",
"(",
"args",
".",
"MPS_dir",
",",
"\"templates\"",
")",
"template_files",
"=",
"(",
"\"universalConfigTemplate.py\"",
",",
"\"a... | https://github.com/cms-sw/cmssw/blob/fd9de012d503d3405420bcbeec0ec879baa57cf2/Alignment/MillePedeAlignmentAlgorithm/scripts/mps_setup_new_align.py#L198-L224 | ||
catboost/catboost | 167f64f237114a4d10b2b4ee42adb4569137debe | contrib/python/prompt-toolkit/py3/prompt_toolkit/filters/app.py | python | is_multiline | () | return get_app().current_buffer.multiline() | True when the current buffer has been marked as multiline. | True when the current buffer has been marked as multiline. | [
"True",
"when",
"the",
"current",
"buffer",
"has",
"been",
"marked",
"as",
"multiline",
"."
] | def is_multiline() -> bool:
"""
True when the current buffer has been marked as multiline.
"""
return get_app().current_buffer.multiline() | [
"def",
"is_multiline",
"(",
")",
"->",
"bool",
":",
"return",
"get_app",
"(",
")",
".",
"current_buffer",
".",
"multiline",
"(",
")"
] | https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/prompt-toolkit/py3/prompt_toolkit/filters/app.py#L144-L148 | |
hanpfei/chromium-net | 392cc1fa3a8f92f42e4071ab6e674d8e0482f83f | third_party/catapult/devil/devil/android/device_utils.py | python | DeviceUtils.DumpCacheData | (self, timeout=None, retries=None) | return json.dumps(obj, separators=(',', ':')) | Dumps the current cache state to a string.
Args:
timeout: timeout in seconds
retries: number of retries
Returns:
A serialized cache as a string. | Dumps the current cache state to a string. | [
"Dumps",
"the",
"current",
"cache",
"state",
"to",
"a",
"string",
"."
] | def DumpCacheData(self, timeout=None, retries=None):
"""Dumps the current cache state to a string.
Args:
timeout: timeout in seconds
retries: number of retries
Returns:
A serialized cache as a string.
"""
self._EnsureCacheInitialized()
obj = {}
obj['token'] = self._cache[... | [
"def",
"DumpCacheData",
"(",
"self",
",",
"timeout",
"=",
"None",
",",
"retries",
"=",
"None",
")",
":",
"self",
".",
"_EnsureCacheInitialized",
"(",
")",
"obj",
"=",
"{",
"}",
"obj",
"[",
"'token'",
"]",
"=",
"self",
".",
"_cache",
"[",
"'token'",
"... | https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/devil/devil/android/device_utils.py#L2272-L2291 | |
Xilinx/Vitis-AI | fc74d404563d9951b57245443c73bef389f3657f | tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/debug/cli/command_parser.py | python | parse_command | (command) | return arguments | Parse command string into a list of arguments.
- Disregards whitespace inside double quotes and brackets.
- Strips paired leading and trailing double quotes in arguments.
- Splits the command at whitespace.
Nested double quotes and brackets are not handled.
Args:
command: (str) Input command.
Return... | Parse command string into a list of arguments. | [
"Parse",
"command",
"string",
"into",
"a",
"list",
"of",
"arguments",
"."
] | def parse_command(command):
"""Parse command string into a list of arguments.
- Disregards whitespace inside double quotes and brackets.
- Strips paired leading and trailing double quotes in arguments.
- Splits the command at whitespace.
Nested double quotes and brackets are not handled.
Args:
comman... | [
"def",
"parse_command",
"(",
"command",
")",
":",
"command",
"=",
"command",
".",
"strip",
"(",
")",
"if",
"not",
"command",
":",
"return",
"[",
"]",
"brackets_intervals",
"=",
"[",
"f",
".",
"span",
"(",
")",
"for",
"f",
"in",
"_BRACKETS_PATTERN",
"."... | https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/debug/cli/command_parser.py#L56-L101 | |
apple/swift-lldb | d74be846ef3e62de946df343e8c234bde93a8912 | scripts/Python/static-binding/lldb.py | python | SBEvent.GetDataFlavor | (self) | return _lldb.SBEvent_GetDataFlavor(self) | GetDataFlavor(SBEvent self) -> char const * | GetDataFlavor(SBEvent self) -> char const * | [
"GetDataFlavor",
"(",
"SBEvent",
"self",
")",
"-",
">",
"char",
"const",
"*"
] | def GetDataFlavor(self):
"""GetDataFlavor(SBEvent self) -> char const *"""
return _lldb.SBEvent_GetDataFlavor(self) | [
"def",
"GetDataFlavor",
"(",
"self",
")",
":",
"return",
"_lldb",
".",
"SBEvent_GetDataFlavor",
"(",
"self",
")"
] | https://github.com/apple/swift-lldb/blob/d74be846ef3e62de946df343e8c234bde93a8912/scripts/Python/static-binding/lldb.py#L4797-L4799 | |
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/array_analysis.py | python | ShapeEquivSet.get_equiv_var | (self, obj) | return vs[0] if vs != [] else None | If the given object is equivalent to some defined variable,
return the variable, or None otherwise. | If the given object is equivalent to some defined variable,
return the variable, or None otherwise. | [
"If",
"the",
"given",
"object",
"is",
"equivalent",
"to",
"some",
"defined",
"variable",
"return",
"the",
"variable",
"or",
"None",
"otherwise",
"."
] | def get_equiv_var(self, obj):
"""If the given object is equivalent to some defined variable,
return the variable, or None otherwise.
"""
names = self._get_names(obj)
if len(names) != 1:
return None
ind = self._get_ind(names[0])
vs = self.ind_to_var.get... | [
"def",
"get_equiv_var",
"(",
"self",
",",
"obj",
")",
":",
"names",
"=",
"self",
".",
"_get_names",
"(",
"obj",
")",
"if",
"len",
"(",
"names",
")",
"!=",
"1",
":",
"return",
"None",
"ind",
"=",
"self",
".",
"_get_ind",
"(",
"names",
"[",
"0",
"]... | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/array_analysis.py#L425-L434 | |
apache/parquet-cpp | 642da055adf009652689b20e68a198cffb857651 | build-support/cpplint.py | python | _OutputFormat | () | return _cpplint_state.output_format | Gets the module's output format. | Gets the module's output format. | [
"Gets",
"the",
"module",
"s",
"output",
"format",
"."
] | def _OutputFormat():
"""Gets the module's output format."""
return _cpplint_state.output_format | [
"def",
"_OutputFormat",
"(",
")",
":",
"return",
"_cpplint_state",
".",
"output_format"
] | https://github.com/apache/parquet-cpp/blob/642da055adf009652689b20e68a198cffb857651/build-support/cpplint.py#L851-L853 | |
VowpalWabbit/vowpal_wabbit | 866b8fa88ff85a957c7eb72065ea44518b9ba416 | python/docs/source/conf.py | python | _split_repo_url | (url) | return org, repo | Split a repository URL into an org / repo combination. | Split a repository URL into an org / repo combination. | [
"Split",
"a",
"repository",
"URL",
"into",
"an",
"org",
"/",
"repo",
"combination",
"."
] | def _split_repo_url(url):
"""Split a repository URL into an org / repo combination."""
if "github.com/" in url:
end = url.split("github.com/")[-1]
org, repo = end.split("/")[:2]
else:
raise ValueError(
f"Currently Binder/JupyterHub repositories must be on GitHub, got {url... | [
"def",
"_split_repo_url",
"(",
"url",
")",
":",
"if",
"\"github.com/\"",
"in",
"url",
":",
"end",
"=",
"url",
".",
"split",
"(",
"\"github.com/\"",
")",
"[",
"-",
"1",
"]",
"org",
",",
"repo",
"=",
"end",
".",
"split",
"(",
"\"/\"",
")",
"[",
":",
... | https://github.com/VowpalWabbit/vowpal_wabbit/blob/866b8fa88ff85a957c7eb72065ea44518b9ba416/python/docs/source/conf.py#L188-L197 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/osx_cocoa/aui.py | python | AuiManager.HideHint | (*args, **kwargs) | return _aui.AuiManager_HideHint(*args, **kwargs) | HideHint(self) | HideHint(self) | [
"HideHint",
"(",
"self",
")"
] | def HideHint(*args, **kwargs):
"""HideHint(self)"""
return _aui.AuiManager_HideHint(*args, **kwargs) | [
"def",
"HideHint",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_aui",
".",
"AuiManager_HideHint",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/aui.py#L727-L729 | |
thalium/icebox | 99d147d5b9269222225443ce171b4fd46d8985d4 | third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2class.py | python | xmlNs.newTextChild | (self, parent, name, content) | return __tmp | Creation of a new child element, added at the end of
@parent children list. @ns and @content parameters are
optional (None). If @ns is None, the newly created element
inherits the namespace of @parent. If @content is non None,
a child TEXT node will be created containing the stri... | Creation of a new child element, added at the end of | [
"Creation",
"of",
"a",
"new",
"child",
"element",
"added",
"at",
"the",
"end",
"of"
] | def newTextChild(self, parent, name, content):
"""Creation of a new child element, added at the end of
@parent children list. @ns and @content parameters are
optional (None). If @ns is None, the newly created element
inherits the namespace of @parent. If @content is non None,
... | [
"def",
"newTextChild",
"(",
"self",
",",
"parent",
",",
"name",
",",
"content",
")",
":",
"if",
"parent",
"is",
"None",
":",
"parent__o",
"=",
"None",
"else",
":",
"parent__o",
"=",
"parent",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlNewTextChild",
... | https://github.com/thalium/icebox/blob/99d147d5b9269222225443ce171b4fd46d8985d4/third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2class.py#L5189-L5206 | |
wlanjie/AndroidFFmpeg | 7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf | tools/fdk-aac-build/x86/toolchain/lib/python2.7/idlelib/AutoComplete.py | python | AutoComplete.get_entity | (self, name) | return eval(name, namespace) | Lookup name in a namespace spanning sys.modules and __main.dict__ | Lookup name in a namespace spanning sys.modules and __main.dict__ | [
"Lookup",
"name",
"in",
"a",
"namespace",
"spanning",
"sys",
".",
"modules",
"and",
"__main",
".",
"dict__"
] | def get_entity(self, name):
"""Lookup name in a namespace spanning sys.modules and __main.dict__"""
namespace = sys.modules.copy()
namespace.update(__main__.__dict__)
return eval(name, namespace) | [
"def",
"get_entity",
"(",
"self",
",",
"name",
")",
":",
"namespace",
"=",
"sys",
".",
"modules",
".",
"copy",
"(",
")",
"namespace",
".",
"update",
"(",
"__main__",
".",
"__dict__",
")",
"return",
"eval",
"(",
"name",
",",
"namespace",
")"
] | https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/idlelib/AutoComplete.py#L223-L227 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/osx_carbon/grid.py | python | GridCellNumberRenderer.__init__ | (self, *args, **kwargs) | __init__(self) -> GridCellNumberRenderer | __init__(self) -> GridCellNumberRenderer | [
"__init__",
"(",
"self",
")",
"-",
">",
"GridCellNumberRenderer"
] | def __init__(self, *args, **kwargs):
"""__init__(self) -> GridCellNumberRenderer"""
_grid.GridCellNumberRenderer_swiginit(self,_grid.new_GridCellNumberRenderer(*args, **kwargs))
self._setOORInfo(self) | [
"def",
"__init__",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"_grid",
".",
"GridCellNumberRenderer_swiginit",
"(",
"self",
",",
"_grid",
".",
"new_GridCellNumberRenderer",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
")",
"self... | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/grid.py#L165-L168 | ||
apache/trafodion | 8455c839ad6b6d7b6e04edda5715053095b78046 | core/sqf/src/seatrans/hbase-trx/src/main/python/thrift1/gen-py/hbase/Hbase.py | python | Iface.scannerOpenWithScan | (self, tableName, scan, attributes) | Get a scanner on the current table, using the Scan instance
for the scan parameters.
Parameters:
- tableName: name of table
- scan: Scan instance
- attributes: Scan attributes | Get a scanner on the current table, using the Scan instance
for the scan parameters. | [
"Get",
"a",
"scanner",
"on",
"the",
"current",
"table",
"using",
"the",
"Scan",
"instance",
"for",
"the",
"scan",
"parameters",
"."
] | def scannerOpenWithScan(self, tableName, scan, attributes):
"""
Get a scanner on the current table, using the Scan instance
for the scan parameters.
Parameters:
- tableName: name of table
- scan: Scan instance
- attributes: Scan attributes
"""
pass | [
"def",
"scannerOpenWithScan",
"(",
"self",
",",
"tableName",
",",
"scan",
",",
"attributes",
")",
":",
"pass"
] | https://github.com/apache/trafodion/blob/8455c839ad6b6d7b6e04edda5715053095b78046/core/sqf/src/seatrans/hbase-trx/src/main/python/thrift1/gen-py/hbase/Hbase.py#L432-L442 | ||
etotheipi/BitcoinArmory | 2a6fc5355bb0c6fe26e387ccba30a5baafe8cd98 | armoryengine/Transaction.py | python | PyTx.fetchCpp | (self) | return TheBDM.getTxByHash(self.getHash()) | Use the info in this PyTx to get the C++ version from TheBDM | Use the info in this PyTx to get the C++ version from TheBDM | [
"Use",
"the",
"info",
"in",
"this",
"PyTx",
"to",
"get",
"the",
"C",
"++",
"version",
"from",
"TheBDM"
] | def fetchCpp(self):
""" Use the info in this PyTx to get the C++ version from TheBDM """
return TheBDM.getTxByHash(self.getHash()) | [
"def",
"fetchCpp",
"(",
"self",
")",
":",
"return",
"TheBDM",
".",
"getTxByHash",
"(",
"self",
".",
"getHash",
"(",
")",
")"
] | https://github.com/etotheipi/BitcoinArmory/blob/2a6fc5355bb0c6fe26e387ccba30a5baafe8cd98/armoryengine/Transaction.py#L760-L762 | |
catboost/catboost | 167f64f237114a4d10b2b4ee42adb4569137debe | contrib/python/tornado/tornado-6/tornado/iostream.py | python | BaseIOStream.write_to_fd | (self, data: memoryview) | Attempts to write ``data`` to the underlying file.
Returns the number of bytes written. | Attempts to write ``data`` to the underlying file. | [
"Attempts",
"to",
"write",
"data",
"to",
"the",
"underlying",
"file",
"."
] | def write_to_fd(self, data: memoryview) -> int:
"""Attempts to write ``data`` to the underlying file.
Returns the number of bytes written.
"""
raise NotImplementedError() | [
"def",
"write_to_fd",
"(",
"self",
",",
"data",
":",
"memoryview",
")",
"->",
"int",
":",
"raise",
"NotImplementedError",
"(",
")"
] | https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/tornado/tornado-6/tornado/iostream.py#L298-L303 | ||
catboost/catboost | 167f64f237114a4d10b2b4ee42adb4569137debe | contrib/python/setuptools/py2/setuptools/_vendor/pyparsing.py | python | delimitedList | ( expr, delim=",", combine=False ) | Helper to define a delimited list of expressions - the delimiter defaults to ','.
By default, the list elements and delimiters can have intervening whitespace, and
comments, but this can be overridden by passing C{combine=True} in the constructor.
If C{combine} is set to C{True}, the matching tokens are ret... | Helper to define a delimited list of expressions - the delimiter defaults to ','.
By default, the list elements and delimiters can have intervening whitespace, and
comments, but this can be overridden by passing C{combine=True} in the constructor.
If C{combine} is set to C{True}, the matching tokens are ret... | [
"Helper",
"to",
"define",
"a",
"delimited",
"list",
"of",
"expressions",
"-",
"the",
"delimiter",
"defaults",
"to",
".",
"By",
"default",
"the",
"list",
"elements",
"and",
"delimiters",
"can",
"have",
"intervening",
"whitespace",
"and",
"comments",
"but",
"thi... | def delimitedList( expr, delim=",", combine=False ):
"""
Helper to define a delimited list of expressions - the delimiter defaults to ','.
By default, the list elements and delimiters can have intervening whitespace, and
comments, but this can be overridden by passing C{combine=True} in the constructor.... | [
"def",
"delimitedList",
"(",
"expr",
",",
"delim",
"=",
"\",\"",
",",
"combine",
"=",
"False",
")",
":",
"dlName",
"=",
"_ustr",
"(",
"expr",
")",
"+",
"\" [\"",
"+",
"_ustr",
"(",
"delim",
")",
"+",
"\" \"",
"+",
"_ustr",
"(",
"expr",
")",
"+",
... | https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/setuptools/py2/setuptools/_vendor/pyparsing.py#L4450-L4467 | ||
openmm/openmm | cb293447c4fc8b03976dfe11399f107bab70f3d9 | wrappers/python/openmm/app/charmmparameterset.py | python | CharmmParameterSet.condense | (self) | return self | This function goes through each of the parameter type dicts and
eliminates duplicate types. After calling this function, every unique
bond, angle, dihedral, improper, or cmap type will pair with EVERY key
in the type mapping dictionaries that points to the equivalent type
Example
... | This function goes through each of the parameter type dicts and
eliminates duplicate types. After calling this function, every unique
bond, angle, dihedral, improper, or cmap type will pair with EVERY key
in the type mapping dictionaries that points to the equivalent type | [
"This",
"function",
"goes",
"through",
"each",
"of",
"the",
"parameter",
"type",
"dicts",
"and",
"eliminates",
"duplicate",
"types",
".",
"After",
"calling",
"this",
"function",
"every",
"unique",
"bond",
"angle",
"dihedral",
"improper",
"or",
"cmap",
"type",
... | def condense(self):
"""
This function goes through each of the parameter type dicts and
eliminates duplicate types. After calling this function, every unique
bond, angle, dihedral, improper, or cmap type will pair with EVERY key
in the type mapping dictionaries that points to the... | [
"def",
"condense",
"(",
"self",
")",
":",
"# First scan through all of the bond types",
"self",
".",
"_condense_types",
"(",
"self",
".",
"bond_types",
")",
"self",
".",
"_condense_types",
"(",
"self",
".",
"angle_types",
")",
"self",
".",
"_condense_types",
"(",
... | https://github.com/openmm/openmm/blob/cb293447c4fc8b03976dfe11399f107bab70f3d9/wrappers/python/openmm/app/charmmparameterset.py#L655-L686 | |
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/fsspec/spec.py | python | AbstractBufferedFile._fetch_range | (self, start, end) | Get the specified set of bytes from remote | Get the specified set of bytes from remote | [
"Get",
"the",
"specified",
"set",
"of",
"bytes",
"from",
"remote"
] | def _fetch_range(self, start, end):
"""Get the specified set of bytes from remote"""
raise NotImplementedError | [
"def",
"_fetch_range",
"(",
"self",
",",
"start",
",",
"end",
")",
":",
"raise",
"NotImplementedError"
] | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/fsspec/spec.py#L1206-L1208 | ||
pytorch/pytorch | 7176c92687d3cc847cc046bf002269c6949a21c2 | torch/ao/quantization/fx/prepare.py | python | maybe_insert_observers_before_graph_output | (
graph_output_node: Node,
output_quantized_idxs: List[int],
node_name_to_target_dtype: Dict[str, Dict[str, Optional[torch.dtype]]],
qconfig_map: Dict[str, QConfigAny],
model: torch.nn.Module,
modules: Dict[str, torch.nn.Module],
graph: Graph,
) | If the output needs to be quantized and there are any nodes
in the output which are not already observed, inserts observers
for those nodes. | If the output needs to be quantized and there are any nodes
in the output which are not already observed, inserts observers
for those nodes. | [
"If",
"the",
"output",
"needs",
"to",
"be",
"quantized",
"and",
"there",
"are",
"any",
"nodes",
"in",
"the",
"output",
"which",
"are",
"not",
"already",
"observed",
"inserts",
"observers",
"for",
"those",
"nodes",
"."
] | def maybe_insert_observers_before_graph_output(
graph_output_node: Node,
output_quantized_idxs: List[int],
node_name_to_target_dtype: Dict[str, Dict[str, Optional[torch.dtype]]],
qconfig_map: Dict[str, QConfigAny],
model: torch.nn.Module,
modules: Dict[str, torch.nn.Module],
graph: Graph,
) ... | [
"def",
"maybe_insert_observers_before_graph_output",
"(",
"graph_output_node",
":",
"Node",
",",
"output_quantized_idxs",
":",
"List",
"[",
"int",
"]",
",",
"node_name_to_target_dtype",
":",
"Dict",
"[",
"str",
",",
"Dict",
"[",
"str",
",",
"Optional",
"[",
"torch... | https://github.com/pytorch/pytorch/blob/7176c92687d3cc847cc046bf002269c6949a21c2/torch/ao/quantization/fx/prepare.py#L684-L782 | ||
Xilinx/Vitis-AI | fc74d404563d9951b57245443c73bef389f3657f | tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/distribute/all_reduce.py | python | _apply_unary_to_chunks | (f, chunks_by_dev) | return output | Apply a unary op to each tensor in chunks_by_dev, on same device.
Args:
f: a unary function over T `tf.Tensor`.
chunks_by_dev: list of lists of T `tf.Tensor`.
Returns:
new list of lists of T `tf.Tensor` with the same structure as
chunks_by_dev containing the derived tensors. | Apply a unary op to each tensor in chunks_by_dev, on same device. | [
"Apply",
"a",
"unary",
"op",
"to",
"each",
"tensor",
"in",
"chunks_by_dev",
"on",
"same",
"device",
"."
] | def _apply_unary_to_chunks(f, chunks_by_dev):
"""Apply a unary op to each tensor in chunks_by_dev, on same device.
Args:
f: a unary function over T `tf.Tensor`.
chunks_by_dev: list of lists of T `tf.Tensor`.
Returns:
new list of lists of T `tf.Tensor` with the same structure as
chunks_by_dev con... | [
"def",
"_apply_unary_to_chunks",
"(",
"f",
",",
"chunks_by_dev",
")",
":",
"output",
"=",
"[",
"]",
"for",
"x",
"in",
"chunks_by_dev",
":",
"with",
"ops",
".",
"colocate_with",
"(",
"x",
"[",
"0",
"]",
")",
":",
"output",
".",
"append",
"(",
"[",
"f"... | https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/distribute/all_reduce.py#L359-L374 | |
tiann/android-native-debug | 198903ed9346dc4a74327a63cb98d449b97d8047 | app/source/art/tools/cpplint.py | python | CheckIncludeLine | (filename, clean_lines, linenum, include_state, error) | Check rules that are applicable to #include lines.
Strings on #include lines are NOT removed from elided line, to make
certain tasks easier. However, to prevent false positives, checks
applicable to #include lines in CheckLanguage must be put here.
Args:
filename: The name of the current file.
clean_l... | Check rules that are applicable to #include lines. | [
"Check",
"rules",
"that",
"are",
"applicable",
"to",
"#include",
"lines",
"."
] | def CheckIncludeLine(filename, clean_lines, linenum, include_state, error):
"""Check rules that are applicable to #include lines.
Strings on #include lines are NOT removed from elided line, to make
certain tasks easier. However, to prevent false positives, checks
applicable to #include lines in CheckLanguage m... | [
"def",
"CheckIncludeLine",
"(",
"filename",
",",
"clean_lines",
",",
"linenum",
",",
"include_state",
",",
"error",
")",
":",
"fileinfo",
"=",
"FileInfo",
"(",
"filename",
")",
"line",
"=",
"clean_lines",
".",
"lines",
"[",
"linenum",
"]",
"# \"include\" shoul... | https://github.com/tiann/android-native-debug/blob/198903ed9346dc4a74327a63cb98d449b97d8047/app/source/art/tools/cpplint.py#L3028-L3094 | ||
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | wx/lib/agw/ultimatelistctrl.py | python | UltimateListMainWindow.DragFinish | (self, event) | return True | A drag and drop operation has just finished.
:param `event`: a :class:`MouseEvent` event to be processed. | A drag and drop operation has just finished. | [
"A",
"drag",
"and",
"drop",
"operation",
"has",
"just",
"finished",
"."
] | def DragFinish(self, event):
"""
A drag and drop operation has just finished.
:param `event`: a :class:`MouseEvent` event to be processed.
"""
if not self._isDragging:
return False
self._isDragging = False
self._dragCount = 0
self._d... | [
"def",
"DragFinish",
"(",
"self",
",",
"event",
")",
":",
"if",
"not",
"self",
".",
"_isDragging",
":",
"return",
"False",
"self",
".",
"_isDragging",
"=",
"False",
"self",
".",
"_dragCount",
"=",
"0",
"self",
".",
"_dragItem",
"=",
"None",
"self",
"."... | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/ultimatelistctrl.py#L7815-L7837 | |
natanielruiz/android-yolo | 1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f | jni-build/jni/include/tensorflow/contrib/learn/python/learn/estimators/tensor_signature.py | python | create_placeholders_from_signatures | (signatures) | return {
key: signatures[key].get_placeholder()
for key in signatures} | Creates placeholders from given signatures.
Args:
signatures: Dict of `TensorSignature` objects or single `TensorSignature`,
or `None`.
Returns:
Dict of `tf.placeholder` objects or single `tf.placeholder`, or `None`. | Creates placeholders from given signatures. | [
"Creates",
"placeholders",
"from",
"given",
"signatures",
"."
] | def create_placeholders_from_signatures(signatures):
"""Creates placeholders from given signatures.
Args:
signatures: Dict of `TensorSignature` objects or single `TensorSignature`,
or `None`.
Returns:
Dict of `tf.placeholder` objects or single `tf.placeholder`, or `None`.
"""
if signatures is ... | [
"def",
"create_placeholders_from_signatures",
"(",
"signatures",
")",
":",
"if",
"signatures",
"is",
"None",
":",
"return",
"None",
"if",
"not",
"isinstance",
"(",
"signatures",
",",
"dict",
")",
":",
"return",
"signatures",
".",
"get_placeholder",
"(",
")",
"... | https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/contrib/learn/python/learn/estimators/tensor_signature.py#L140-L156 | |
miyosuda/TensorFlowAndroidMNIST | 7b5a4603d2780a8a2834575706e9001977524007 | jni-build/jni/include/tensorflow/contrib/lookup/lookup_ops.py | python | KeyValueTensorInitializer.initialize | (self, table) | return init_op | Initializes the given `table` with `keys` and `values` tensors.
Args:
table: The table to initialize.
Returns:
The operation that initializes the table.
Raises:
TypeError: when the keys and values data types do not match the table
key and value data types. | Initializes the given `table` with `keys` and `values` tensors. | [
"Initializes",
"the",
"given",
"table",
"with",
"keys",
"and",
"values",
"tensors",
"."
] | def initialize(self, table):
"""Initializes the given `table` with `keys` and `values` tensors.
Args:
table: The table to initialize.
Returns:
The operation that initializes the table.
Raises:
TypeError: when the keys and values data types do not match the table
key and value ... | [
"def",
"initialize",
"(",
"self",
",",
"table",
")",
":",
"# pylint: disable=protected-access",
"table",
".",
"_check_table_dtypes",
"(",
"self",
".",
"_keys",
".",
"dtype",
",",
"self",
".",
"_values",
".",
"dtype",
")",
"with",
"ops",
".",
"op_scope",
"(",... | https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/contrib/lookup/lookup_ops.py#L284-L306 | |
toggl-open-source/toggldesktop | 91865205885531cc8fd9e8d613dad49d625d56e7 | third_party/cpplint/cpplint.py | python | _GetTextInside | (text, start_pattern) | return text[start_position:position - 1] | r"""Retrieves all the text between matching open and close parentheses.
Given a string of lines and a regular expression string, retrieve all the text
following the expression and between opening punctuation symbols like
(, [, or {, and the matching close-punctuation symbol. This properly nested
occurrences of... | r"""Retrieves all the text between matching open and close parentheses. | [
"r",
"Retrieves",
"all",
"the",
"text",
"between",
"matching",
"open",
"and",
"close",
"parentheses",
"."
] | def _GetTextInside(text, start_pattern):
r"""Retrieves all the text between matching open and close parentheses.
Given a string of lines and a regular expression string, retrieve all the text
following the expression and between opening punctuation symbols like
(, [, or {, and the matching close-punctuation sy... | [
"def",
"_GetTextInside",
"(",
"text",
",",
"start_pattern",
")",
":",
"# TODO(unknown): Audit cpplint.py to see what places could be profitably",
"# rewritten to use _GetTextInside (and use inferior regexp matching today).",
"# Give opening punctuations to get the matching close-punctuations.",
... | https://github.com/toggl-open-source/toggldesktop/blob/91865205885531cc8fd9e8d613dad49d625d56e7/third_party/cpplint/cpplint.py#L4679-L4732 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | wx/tools/Editra/src/syntax/_groovy.py | python | SyntaxData.GetKeywords | (self) | return [MAIN_KEYWORDS, SECONDARY_KEYWORDS] | Returns Specified Keywords List | Returns Specified Keywords List | [
"Returns",
"Specified",
"Keywords",
"List"
] | def GetKeywords(self):
"""Returns Specified Keywords List """
return [MAIN_KEYWORDS, SECONDARY_KEYWORDS] | [
"def",
"GetKeywords",
"(",
"self",
")",
":",
"return",
"[",
"MAIN_KEYWORDS",
",",
"SECONDARY_KEYWORDS",
"]"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/syntax/_groovy.py#L103-L105 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/osx_carbon/aui.py | python | PreAuiMDIParentFrame | (*args, **kwargs) | return val | PreAuiMDIParentFrame() -> AuiMDIParentFrame | PreAuiMDIParentFrame() -> AuiMDIParentFrame | [
"PreAuiMDIParentFrame",
"()",
"-",
">",
"AuiMDIParentFrame"
] | def PreAuiMDIParentFrame(*args, **kwargs):
"""PreAuiMDIParentFrame() -> AuiMDIParentFrame"""
val = _aui.new_PreAuiMDIParentFrame(*args, **kwargs)
val._setOORInfo(val)
return val | [
"def",
"PreAuiMDIParentFrame",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"val",
"=",
"_aui",
".",
"new_PreAuiMDIParentFrame",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"val",
".",
"_setOORInfo",
"(",
"val",
")",
"return",
"val"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/aui.py#L1499-L1503 | |
htcondor/htcondor | 4829724575176d1d6c936e4693dfd78a728569b0 | src/condor_contrib/condor_pigeon/src/condor_pigeon_client/skype_linux_tools/Skype4Py/voicemail.py | python | IVoicemail.StopPlayback | (self) | Stops playing downloaded voicemail. | Stops playing downloaded voicemail. | [
"Stops",
"playing",
"downloaded",
"voicemail",
"."
] | def StopPlayback(self):
'''Stops playing downloaded voicemail.
'''
self._Alter('STOPPLAYBACK') | [
"def",
"StopPlayback",
"(",
"self",
")",
":",
"self",
".",
"_Alter",
"(",
"'STOPPLAYBACK'",
")"
] | https://github.com/htcondor/htcondor/blob/4829724575176d1d6c936e4693dfd78a728569b0/src/condor_contrib/condor_pigeon/src/condor_pigeon_client/skype_linux_tools/Skype4Py/voicemail.py#L145-L148 | ||
CRYTEK/CRYENGINE | 232227c59a220cbbd311576f0fbeba7bb53b2a8c | Code/Tools/waf-1.7.13/waflib/Scripting.py | python | Dist.get_tar_path | (self, node) | return node.abspath() | return the path to use for a node in the tar archive, the purpose of this
is to let subclases resolve symbolic links or to change file names | return the path to use for a node in the tar archive, the purpose of this
is to let subclases resolve symbolic links or to change file names | [
"return",
"the",
"path",
"to",
"use",
"for",
"a",
"node",
"in",
"the",
"tar",
"archive",
"the",
"purpose",
"of",
"this",
"is",
"to",
"let",
"subclases",
"resolve",
"symbolic",
"links",
"or",
"to",
"change",
"file",
"names"
] | def get_tar_path(self, node):
"""
return the path to use for a node in the tar archive, the purpose of this
is to let subclases resolve symbolic links or to change file names
"""
return node.abspath() | [
"def",
"get_tar_path",
"(",
"self",
",",
"node",
")",
":",
"return",
"node",
".",
"abspath",
"(",
")"
] | https://github.com/CRYTEK/CRYENGINE/blob/232227c59a220cbbd311576f0fbeba7bb53b2a8c/Code/Tools/waf-1.7.13/waflib/Scripting.py#L481-L486 | |
thalium/icebox | 99d147d5b9269222225443ce171b4fd46d8985d4 | third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2class.py | python | xmlDoc.saveFormatFile | (self, filename, format) | return ret | Dump an XML document to a file. Will use compression if
compiled in and enabled. If @filename is "-" the stdout
file is used. If @format is set then the document will be
indented on output. Note that @format = 1 provide node
indenting only if xmlIndentTreeOutput = 1 or
... | Dump an XML document to a file. Will use compression if
compiled in and enabled. If | [
"Dump",
"an",
"XML",
"document",
"to",
"a",
"file",
".",
"Will",
"use",
"compression",
"if",
"compiled",
"in",
"and",
"enabled",
".",
"If"
] | def saveFormatFile(self, filename, format):
"""Dump an XML document to a file. Will use compression if
compiled in and enabled. If @filename is "-" the stdout
file is used. If @format is set then the document will be
indented on output. Note that @format = 1 provide node
... | [
"def",
"saveFormatFile",
"(",
"self",
",",
"filename",
",",
"format",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlSaveFormatFile",
"(",
"filename",
",",
"self",
".",
"_o",
",",
"format",
")",
"return",
"ret"
] | https://github.com/thalium/icebox/blob/99d147d5b9269222225443ce171b4fd46d8985d4/third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2class.py#L3711-L3719 | |
windystrife/UnrealEngine_NVIDIAGameWorks | b50e6338a7c5b26374d66306ebc7807541ff815e | Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/tempfile.py | python | gettempdir | () | return tempdir | Accessor for tempfile.tempdir. | Accessor for tempfile.tempdir. | [
"Accessor",
"for",
"tempfile",
".",
"tempdir",
"."
] | def gettempdir():
"""Accessor for tempfile.tempdir."""
global tempdir
if tempdir is None:
_once_lock.acquire()
try:
if tempdir is None:
tempdir = _get_default_tempdir()
finally:
_once_lock.release()
return tempdir | [
"def",
"gettempdir",
"(",
")",
":",
"global",
"tempdir",
"if",
"tempdir",
"is",
"None",
":",
"_once_lock",
".",
"acquire",
"(",
")",
"try",
":",
"if",
"tempdir",
"is",
"None",
":",
"tempdir",
"=",
"_get_default_tempdir",
"(",
")",
"finally",
":",
"_once_... | https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/tempfile.py#L258-L268 | |
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Tools/Python/3.7.10/windows/Lib/asyncio/protocols.py | python | BaseProtocol.connection_lost | (self, exc) | Called when the connection is lost or closed.
The argument is an exception object or None (the latter
meaning a regular EOF is received or the connection was
aborted or closed). | Called when the connection is lost or closed. | [
"Called",
"when",
"the",
"connection",
"is",
"lost",
"or",
"closed",
"."
] | def connection_lost(self, exc):
"""Called when the connection is lost or closed.
The argument is an exception object or None (the latter
meaning a regular EOF is received or the connection was
aborted or closed).
""" | [
"def",
"connection_lost",
"(",
"self",
",",
"exc",
")",
":"
] | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/asyncio/protocols.py#L27-L33 | ||
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/gtk/_controls.py | python | TextCtrl.GetClassDefaultAttributes | (*args, **kwargs) | return _controls_.TextCtrl_GetClassDefaultAttributes(*args, **kwargs) | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
Get the default attributes for this class. This is useful if you want
to use the same font or colour in your own control as in a standard
control -- which is a much better idea than hard coding specific
co... | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | [
"GetClassDefaultAttributes",
"(",
"int",
"variant",
"=",
"WINDOW_VARIANT_NORMAL",
")",
"-",
">",
"VisualAttributes"
] | def GetClassDefaultAttributes(*args, **kwargs):
"""
GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
Get the default attributes for this class. This is useful if you want
to use the same font or colour in your own control as in a standard
control... | [
"def",
"GetClassDefaultAttributes",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_controls_",
".",
"TextCtrl_GetClassDefaultAttributes",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_controls.py#L2055-L2070 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/osx_carbon/_misc.py | python | DateSpan.__sub__ | (*args, **kwargs) | return _misc_.DateSpan___sub__(*args, **kwargs) | __sub__(self, DateSpan other) -> DateSpan | __sub__(self, DateSpan other) -> DateSpan | [
"__sub__",
"(",
"self",
"DateSpan",
"other",
")",
"-",
">",
"DateSpan"
] | def __sub__(*args, **kwargs):
"""__sub__(self, DateSpan other) -> DateSpan"""
return _misc_.DateSpan___sub__(*args, **kwargs) | [
"def",
"__sub__",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_misc_",
".",
"DateSpan___sub__",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_misc.py#L4725-L4727 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.