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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
metashell/metashell | f4177e4854ea00c8dbc722cadab26ef413d798ea | 3rd/templight/compiler-rt/lib/sanitizer_common/scripts/cpplint.py | python | GetLineWidth | (line) | Determines the width of the line in column positions.
Args:
line: A string, which may be a Unicode string.
Returns:
The width of the line in column positions, accounting for Unicode
combining characters and wide characters. | Determines the width of the line in column positions. | [
"Determines",
"the",
"width",
"of",
"the",
"line",
"in",
"column",
"positions",
"."
] | def GetLineWidth(line):
"""Determines the width of the line in column positions.
Args:
line: A string, which may be a Unicode string.
Returns:
The width of the line in column positions, accounting for Unicode
combining characters and wide characters.
"""
if isinstance(line, unicode):
width =... | [
"def",
"GetLineWidth",
"(",
"line",
")",
":",
"if",
"isinstance",
"(",
"line",
",",
"unicode",
")",
":",
"width",
"=",
"0",
"for",
"uc",
"in",
"unicodedata",
".",
"normalize",
"(",
"'NFC'",
",",
"line",
")",
":",
"if",
"unicodedata",
".",
"east_asian_w... | https://github.com/metashell/metashell/blob/f4177e4854ea00c8dbc722cadab26ef413d798ea/3rd/templight/compiler-rt/lib/sanitizer_common/scripts/cpplint.py#L4279-L4308 | ||
eventql/eventql | 7ca0dbb2e683b525620ea30dc40540a22d5eb227 | deps/3rdparty/spidermonkey/mozjs/python/configobj/configobj.py | python | Section.keys | (self) | return (self.scalars + self.sections) | D.keys() -> list of D's keys | D.keys() -> list of D's keys | [
"D",
".",
"keys",
"()",
"-",
">",
"list",
"of",
"D",
"s",
"keys"
] | def keys(self):
"""D.keys() -> list of D's keys"""
return (self.scalars + self.sections) | [
"def",
"keys",
"(",
"self",
")",
":",
"return",
"(",
"self",
".",
"scalars",
"+",
"self",
".",
"sections",
")"
] | https://github.com/eventql/eventql/blob/7ca0dbb2e683b525620ea30dc40540a22d5eb227/deps/3rdparty/spidermonkey/mozjs/python/configobj/configobj.py#L727-L729 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | wx/tools/Editra/src/autocomp/htmlcomp.py | python | Completer.GetAutoCompList | (self, command) | return list() | Returns the list of possible completions for a
command string.
@param command: command lookup is done on | Returns the list of possible completions for a
command string.
@param command: command lookup is done on | [
"Returns",
"the",
"list",
"of",
"possible",
"completions",
"for",
"a",
"command",
"string",
".",
"@param",
"command",
":",
"command",
"lookup",
"is",
"done",
"on"
] | def GetAutoCompList(self, command):
"""Returns the list of possible completions for a
command string.
@param command: command lookup is done on
"""
if command in [None, u'', u'<']:
return list()
buff = self.GetBuffer()
cpos = buff.GetCurrentPos()
... | [
"def",
"GetAutoCompList",
"(",
"self",
",",
"command",
")",
":",
"if",
"command",
"in",
"[",
"None",
",",
"u''",
",",
"u'<'",
"]",
":",
"return",
"list",
"(",
")",
"buff",
"=",
"self",
".",
"GetBuffer",
"(",
")",
"cpos",
"=",
"buff",
".",
"GetCurre... | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/autocomp/htmlcomp.py#L102-L162 | |
facebookincubator/BOLT | 88c70afe9d388ad430cc150cc158641701397f70 | llvm/utils/gdb-scripts/prettyprinters.py | python | TwinePrinter.string_from_child | (self, child, kind) | return '(unhandled {})'.format(kind) | Return the string representation of the Twine::Child child. | Return the string representation of the Twine::Child child. | [
"Return",
"the",
"string",
"representation",
"of",
"the",
"Twine",
"::",
"Child",
"child",
"."
] | def string_from_child(self, child, kind):
'''Return the string representation of the Twine::Child child.'''
if self.is_twine_kind(kind, 'EmptyKind') or self.is_twine_kind(kind, 'NullKind'):
return ''
if self.is_twine_kind(kind, 'TwineKind'):
return self.string_from_twine_object(child['twine'].... | [
"def",
"string_from_child",
"(",
"self",
",",
"child",
",",
"kind",
")",
":",
"if",
"self",
".",
"is_twine_kind",
"(",
"kind",
",",
"'EmptyKind'",
")",
"or",
"self",
".",
"is_twine_kind",
"(",
"kind",
",",
"'NullKind'",
")",
":",
"return",
"''",
"if",
... | https://github.com/facebookincubator/BOLT/blob/88c70afe9d388ad430cc150cc158641701397f70/llvm/utils/gdb-scripts/prettyprinters.py#L291-L341 | |
catboost/catboost | 167f64f237114a4d10b2b4ee42adb4569137debe | contrib/python/pandas/py3/pandas/core/dtypes/common.py | python | ensure_str | (value: bytes | Any) | return value | Ensure that bytes and non-strings get converted into ``str`` objects. | Ensure that bytes and non-strings get converted into ``str`` objects. | [
"Ensure",
"that",
"bytes",
"and",
"non",
"-",
"strings",
"get",
"converted",
"into",
"str",
"objects",
"."
] | def ensure_str(value: bytes | Any) -> str:
"""
Ensure that bytes and non-strings get converted into ``str`` objects.
"""
if isinstance(value, bytes):
value = value.decode("utf-8")
elif not isinstance(value, str):
value = str(value)
return value | [
"def",
"ensure_str",
"(",
"value",
":",
"bytes",
"|",
"Any",
")",
"->",
"str",
":",
"if",
"isinstance",
"(",
"value",
",",
"bytes",
")",
":",
"value",
"=",
"value",
".",
"decode",
"(",
"\"utf-8\"",
")",
"elif",
"not",
"isinstance",
"(",
"value",
",",... | https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/core/dtypes/common.py#L105-L113 | |
tensorflow/tensorflow | 419e3a6b650ea4bd1b0cba23c4348f8a69f3272e | tensorflow/python/ops/init_ops_v2.py | python | he_uniform | (seed=None) | return VarianceScaling(
scale=2., mode="fan_in", distribution="uniform", seed=seed) | He uniform variance scaling initializer.
Initializers allow you to pre-specify an initialization strategy, encoded in
the Initializer object, without knowing the shape and dtype of the variable
being initialized.
Draws samples from a uniform distribution within [-limit, limit] where `limit`
is `sqrt(6 / fan... | He uniform variance scaling initializer. | [
"He",
"uniform",
"variance",
"scaling",
"initializer",
"."
] | def he_uniform(seed=None):
"""He uniform variance scaling initializer.
Initializers allow you to pre-specify an initialization strategy, encoded in
the Initializer object, without knowing the shape and dtype of the variable
being initialized.
Draws samples from a uniform distribution within [-limit, limit] ... | [
"def",
"he_uniform",
"(",
"seed",
"=",
"None",
")",
":",
"return",
"VarianceScaling",
"(",
"scale",
"=",
"2.",
",",
"mode",
"=",
"\"fan_in\"",
",",
"distribution",
"=",
"\"uniform\"",
",",
"seed",
"=",
"seed",
")"
] | https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/ops/init_ops_v2.py#L1000-L1037 | |
BitMEX/api-connectors | 37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812 | auto-generated/python/swagger_client/models/trade_bin.py | python | TradeBin.low | (self, low) | Sets the low of this TradeBin.
:param low: The low of this TradeBin. # noqa: E501
:type: float | Sets the low of this TradeBin. | [
"Sets",
"the",
"low",
"of",
"this",
"TradeBin",
"."
] | def low(self, low):
"""Sets the low of this TradeBin.
:param low: The low of this TradeBin. # noqa: E501
:type: float
"""
self._low = low | [
"def",
"low",
"(",
"self",
",",
"low",
")",
":",
"self",
".",
"_low",
"=",
"low"
] | https://github.com/BitMEX/api-connectors/blob/37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812/auto-generated/python/swagger_client/models/trade_bin.py#L207-L215 | ||
ziquan111/RobustPCLReconstruction | 35b9518dbf9ad3f06109cc0e3aaacafdb5c86e36 | py/sophus/complex.py | python | Complex.Db_a_mul_b | (a, b) | return sympy.Matrix([[a.real, -a.imag],
[a.imag, a.real]]) | derivatice of complex muliplication wrt right multiplicand b | derivatice of complex muliplication wrt right multiplicand b | [
"derivatice",
"of",
"complex",
"muliplication",
"wrt",
"right",
"multiplicand",
"b"
] | def Db_a_mul_b(a, b):
""" derivatice of complex muliplication wrt right multiplicand b """
return sympy.Matrix([[a.real, -a.imag],
[a.imag, a.real]]) | [
"def",
"Db_a_mul_b",
"(",
"a",
",",
"b",
")",
":",
"return",
"sympy",
".",
"Matrix",
"(",
"[",
"[",
"a",
".",
"real",
",",
"-",
"a",
".",
"imag",
"]",
",",
"[",
"a",
".",
"imag",
",",
"a",
".",
"real",
"]",
"]",
")"
] | https://github.com/ziquan111/RobustPCLReconstruction/blob/35b9518dbf9ad3f06109cc0e3aaacafdb5c86e36/py/sophus/complex.py#L78-L81 | |
pmq20/node-packer | 12c46c6e44fbc14d9ee645ebd17d5296b324f7e0 | lts/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py | python | MacTool._CopyXIBFile | (self, source, dest) | return ibtoolout.returncode | Compiles a XIB file with ibtool into a binary plist in the bundle. | Compiles a XIB file with ibtool into a binary plist in the bundle. | [
"Compiles",
"a",
"XIB",
"file",
"with",
"ibtool",
"into",
"a",
"binary",
"plist",
"in",
"the",
"bundle",
"."
] | def _CopyXIBFile(self, source, dest):
"""Compiles a XIB file with ibtool into a binary plist in the bundle."""
# ibtool sometimes crashes with relative paths. See crbug.com/314728.
base = os.path.dirname(os.path.realpath(__file__))
if os.path.relpath(source):
source = os.path.join(base, source)
... | [
"def",
"_CopyXIBFile",
"(",
"self",
",",
"source",
",",
"dest",
")",
":",
"# ibtool sometimes crashes with relative paths. See crbug.com/314728.",
"base",
"=",
"os",
".",
"path",
".",
"dirname",
"(",
"os",
".",
"path",
".",
"realpath",
"(",
"__file__",
")",
")",... | https://github.com/pmq20/node-packer/blob/12c46c6e44fbc14d9ee645ebd17d5296b324f7e0/lts/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py#L73-L97 | |
wlanjie/AndroidFFmpeg | 7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf | tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/json/encoder.py | python | encode_basestring | (s) | return '"' + ESCAPE.sub(replace, s) + '"' | Return a JSON representation of a Python string | Return a JSON representation of a Python string | [
"Return",
"a",
"JSON",
"representation",
"of",
"a",
"Python",
"string"
] | def encode_basestring(s):
"""Return a JSON representation of a Python string
"""
def replace(match):
return ESCAPE_DCT[match.group(0)]
return '"' + ESCAPE.sub(replace, s) + '"' | [
"def",
"encode_basestring",
"(",
"s",
")",
":",
"def",
"replace",
"(",
"match",
")",
":",
"return",
"ESCAPE_DCT",
"[",
"match",
".",
"group",
"(",
"0",
")",
"]",
"return",
"'\"'",
"+",
"ESCAPE",
".",
"sub",
"(",
"replace",
",",
"s",
")",
"+",
"'\"'... | https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/json/encoder.py#L33-L39 | |
natanielruiz/android-yolo | 1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f | jni-build/jni/include/tensorflow/contrib/linear_optimizer/python/ops/sdca_ops.py | python | SparseFeatureColumn.__init__ | (self, example_indices, feature_indices, feature_values) | Creates a `SparseFeatureColumn` representation.
Args:
example_indices: A 1-D int64 tensor of shape `[N]`. Also, accepts
python lists, or numpy arrays.
feature_indices: A 1-D int64 tensor of shape `[N]`. Also, accepts
python lists, or numpy arrays.
feature_values: An optional 1-D tenso... | Creates a `SparseFeatureColumn` representation. | [
"Creates",
"a",
"SparseFeatureColumn",
"representation",
"."
] | def __init__(self, example_indices, feature_indices, feature_values):
"""Creates a `SparseFeatureColumn` representation.
Args:
example_indices: A 1-D int64 tensor of shape `[N]`. Also, accepts
python lists, or numpy arrays.
feature_indices: A 1-D int64 tensor of shape `[N]`. Also, accepts
... | [
"def",
"__init__",
"(",
"self",
",",
"example_indices",
",",
"feature_indices",
",",
"feature_values",
")",
":",
"with",
"op_scope",
"(",
"[",
"example_indices",
",",
"feature_indices",
"]",
",",
"None",
",",
"'SparseFeatureColumn'",
")",
":",
"self",
".",
"_e... | https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/contrib/linear_optimizer/python/ops/sdca_ops.py#L210-L237 | ||
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/msw/html.py | python | HtmlRenderingInfo.__init__ | (self, *args, **kwargs) | __init__(self) -> HtmlRenderingInfo | __init__(self) -> HtmlRenderingInfo | [
"__init__",
"(",
"self",
")",
"-",
">",
"HtmlRenderingInfo"
] | def __init__(self, *args, **kwargs):
"""__init__(self) -> HtmlRenderingInfo"""
_html.HtmlRenderingInfo_swiginit(self,_html.new_HtmlRenderingInfo(*args, **kwargs)) | [
"def",
"__init__",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"_html",
".",
"HtmlRenderingInfo_swiginit",
"(",
"self",
",",
"_html",
".",
"new_HtmlRenderingInfo",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/html.py#L566-L568 | ||
bulletphysics/bullet3 | f0f2a952e146f016096db6f85cf0c44ed75b0b9a | examples/pybullet/gym/pybullet_envs/minitaur/agents/tools/wrappers.py | python | FrameHistory.__init__ | (self, env, past_indices, flatten) | Augment the observation with past observations.
Implemented as a Numpy ring buffer holding the necessary past observations.
Args:
env: OpenAI Gym environment to wrap.
past_indices: List of non-negative integers indicating the time offsets
from the current time step of observations to inclu... | Augment the observation with past observations. | [
"Augment",
"the",
"observation",
"with",
"past",
"observations",
"."
] | def __init__(self, env, past_indices, flatten):
"""Augment the observation with past observations.
Implemented as a Numpy ring buffer holding the necessary past observations.
Args:
env: OpenAI Gym environment to wrap.
past_indices: List of non-negative integers indicating the time offsets
... | [
"def",
"__init__",
"(",
"self",
",",
"env",
",",
"past_indices",
",",
"flatten",
")",
":",
"if",
"0",
"not",
"in",
"past_indices",
":",
"raise",
"KeyError",
"(",
"'Past indices should include 0 for the current frame.'",
")",
"self",
".",
"_env",
"=",
"env",
"s... | https://github.com/bulletphysics/bullet3/blob/f0f2a952e146f016096db6f85cf0c44ed75b0b9a/examples/pybullet/gym/pybullet_envs/minitaur/agents/tools/wrappers.py#L101-L122 | ||
xenia-project/xenia | 9b1fdac98665ac091b9660a5d0fbb259ed79e578 | third_party/google-styleguide/cpplint/cpplint.py | python | CleanseRawStrings | (raw_lines) | return lines_without_raw_strings | Removes C++11 raw strings from lines.
Before:
static const char kData[] = R"(
multi-line string
)";
After:
static const char kData[] = ""
(replaced by blank line)
"";
Args:
raw_lines: list of raw lines.
Returns:
list of lines with C++11 raw str... | Removes C++11 raw strings from lines. | [
"Removes",
"C",
"++",
"11",
"raw",
"strings",
"from",
"lines",
"."
] | def CleanseRawStrings(raw_lines):
"""Removes C++11 raw strings from lines.
Before:
static const char kData[] = R"(
multi-line string
)";
After:
static const char kData[] = ""
(replaced by blank line)
"";
Args:
raw_lines: list of raw lines.
Return... | [
"def",
"CleanseRawStrings",
"(",
"raw_lines",
")",
":",
"delimiter",
"=",
"None",
"lines_without_raw_strings",
"=",
"[",
"]",
"for",
"line",
"in",
"raw_lines",
":",
"if",
"delimiter",
":",
"# Inside a raw string, look for the end",
"end",
"=",
"line",
".",
"find",... | https://github.com/xenia-project/xenia/blob/9b1fdac98665ac091b9660a5d0fbb259ed79e578/third_party/google-styleguide/cpplint/cpplint.py#L1051-L1114 | |
msracver/Deep-Image-Analogy | 632b9287b42552e32dad64922967c8c9ec7fc4d3 | scripts/cpp_lint.py | python | _NestingState.CheckCompletedBlocks | (self, filename, error) | Checks that all classes and namespaces have been completely parsed.
Call this when all lines in a file have been processed.
Args:
filename: The name of the current file.
error: The function to call with any errors found. | Checks that all classes and namespaces have been completely parsed. | [
"Checks",
"that",
"all",
"classes",
"and",
"namespaces",
"have",
"been",
"completely",
"parsed",
"."
] | def CheckCompletedBlocks(self, filename, error):
"""Checks that all classes and namespaces have been completely parsed.
Call this when all lines in a file have been processed.
Args:
filename: The name of the current file.
error: The function to call with any errors found.
"""
# Note: Th... | [
"def",
"CheckCompletedBlocks",
"(",
"self",
",",
"filename",
",",
"error",
")",
":",
"# Note: This test can result in false positives if #ifdef constructs",
"# get in the way of brace matching. See the testBuildClass test in",
"# cpplint_unittest.py for an example of this.",
"for",
"obj"... | https://github.com/msracver/Deep-Image-Analogy/blob/632b9287b42552e32dad64922967c8c9ec7fc4d3/scripts/cpp_lint.py#L2172-L2191 | ||
hanpfei/chromium-net | 392cc1fa3a8f92f42e4071ab6e674d8e0482f83f | third_party/catapult/third_party/gsutil/third_party/boto/boto/glacier/__init__.py | python | regions | () | return get_regions('glacier', connection_cls=Layer2) | Get all available regions for the Amazon Glacier service.
:rtype: list
:return: A list of :class:`boto.regioninfo.RegionInfo` | Get all available regions for the Amazon Glacier service. | [
"Get",
"all",
"available",
"regions",
"for",
"the",
"Amazon",
"Glacier",
"service",
"."
] | def regions():
"""
Get all available regions for the Amazon Glacier service.
:rtype: list
:return: A list of :class:`boto.regioninfo.RegionInfo`
"""
from boto.glacier.layer2 import Layer2
return get_regions('glacier', connection_cls=Layer2) | [
"def",
"regions",
"(",
")",
":",
"from",
"boto",
".",
"glacier",
".",
"layer2",
"import",
"Layer2",
"return",
"get_regions",
"(",
"'glacier'",
",",
"connection_cls",
"=",
"Layer2",
")"
] | https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/gsutil/third_party/boto/boto/glacier/__init__.py#L27-L35 | |
tensorflow/tensorflow | 419e3a6b650ea4bd1b0cba23c4348f8a69f3272e | tensorflow/python/autograph/utils/ag_logging.py | python | trace | (*args) | Traces argument information at compilation time.
`trace` is useful when debugging, and it always executes during the tracing
phase, that is, when the TF graph is constructed.
_Example usage_
```python
import tensorflow as tf
for i in tf.range(10):
tf.autograph.trace(i)
# Output: <Tensor ...>
```... | Traces argument information at compilation time. | [
"Traces",
"argument",
"information",
"at",
"compilation",
"time",
"."
] | def trace(*args):
"""Traces argument information at compilation time.
`trace` is useful when debugging, and it always executes during the tracing
phase, that is, when the TF graph is constructed.
_Example usage_
```python
import tensorflow as tf
for i in tf.range(10):
tf.autograph.trace(i)
# Out... | [
"def",
"trace",
"(",
"*",
"args",
")",
":",
"print",
"(",
"*",
"args",
")"
] | https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/autograph/utils/ag_logging.py#L88-L107 | ||
catboost/catboost | 167f64f237114a4d10b2b4ee42adb4569137debe | contrib/python/ipython/py3/IPython/core/inputsplitter.py | python | IPythonInputSplitter.reset | (self) | Reset the input buffer and associated state. | Reset the input buffer and associated state. | [
"Reset",
"the",
"input",
"buffer",
"and",
"associated",
"state",
"."
] | def reset(self):
"""Reset the input buffer and associated state."""
super(IPythonInputSplitter, self).reset()
self._buffer_raw[:] = []
self.source_raw = ''
self.transformer_accumulating = False
self.within_python_line = False
for t in self.transforms:
... | [
"def",
"reset",
"(",
"self",
")",
":",
"super",
"(",
"IPythonInputSplitter",
",",
"self",
")",
".",
"reset",
"(",
")",
"self",
".",
"_buffer_raw",
"[",
":",
"]",
"=",
"[",
"]",
"self",
".",
"source_raw",
"=",
"''",
"self",
".",
"transformer_accumulatin... | https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/ipython/py3/IPython/core/inputsplitter.py#L602-L616 | ||
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/gtk/html.py | python | HtmlDCRenderer.SetStandardFonts | (*args, **kwargs) | return _html.HtmlDCRenderer_SetStandardFonts(*args, **kwargs) | SetStandardFonts(self, int size=-1, String normal_face=EmptyString, String fixed_face=EmptyString) | SetStandardFonts(self, int size=-1, String normal_face=EmptyString, String fixed_face=EmptyString) | [
"SetStandardFonts",
"(",
"self",
"int",
"size",
"=",
"-",
"1",
"String",
"normal_face",
"=",
"EmptyString",
"String",
"fixed_face",
"=",
"EmptyString",
")"
] | def SetStandardFonts(*args, **kwargs):
"""SetStandardFonts(self, int size=-1, String normal_face=EmptyString, String fixed_face=EmptyString)"""
return _html.HtmlDCRenderer_SetStandardFonts(*args, **kwargs) | [
"def",
"SetStandardFonts",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_html",
".",
"HtmlDCRenderer_SetStandardFonts",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/html.py#L1248-L1250 | |
daijifeng001/caffe-rfcn | 543f8f6a4b7c88256ea1445ae951a12d1ad9cffd | scripts/cpp_lint.py | python | _BlockInfo.CheckBegin | (self, filename, clean_lines, linenum, error) | Run checks that applies to text up to the opening brace.
This is mostly for checking the text after the class identifier
and the "{", usually where the base class is specified. For other
blocks, there isn't much to check, so we always pass.
Args:
filename: The name of the current file.
cl... | Run checks that applies to text up to the opening brace. | [
"Run",
"checks",
"that",
"applies",
"to",
"text",
"up",
"to",
"the",
"opening",
"brace",
"."
] | def CheckBegin(self, filename, clean_lines, linenum, error):
"""Run checks that applies to text up to the opening brace.
This is mostly for checking the text after the class identifier
and the "{", usually where the base class is specified. For other
blocks, there isn't much to check, so we always pas... | [
"def",
"CheckBegin",
"(",
"self",
",",
"filename",
",",
"clean_lines",
",",
"linenum",
",",
"error",
")",
":",
"pass"
] | https://github.com/daijifeng001/caffe-rfcn/blob/543f8f6a4b7c88256ea1445ae951a12d1ad9cffd/scripts/cpp_lint.py#L1763-L1776 | ||
wlanjie/AndroidFFmpeg | 7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf | tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/_pyio.py | python | IOBase.tell | (self) | return self.seek(0, 1) | Return current stream position. | Return current stream position. | [
"Return",
"current",
"stream",
"position",
"."
] | def tell(self):
"""Return current stream position."""
return self.seek(0, 1) | [
"def",
"tell",
"(",
"self",
")",
":",
"return",
"self",
".",
"seek",
"(",
"0",
",",
"1",
")"
] | https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/_pyio.py#L313-L315 | |
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/types.py | python | coroutine | (func) | return wrapped | Convert regular generator function to a coroutine. | Convert regular generator function to a coroutine. | [
"Convert",
"regular",
"generator",
"function",
"to",
"a",
"coroutine",
"."
] | def coroutine(func):
"""Convert regular generator function to a coroutine."""
if not callable(func):
raise TypeError('types.coroutine() expects a callable')
if (func.__class__ is FunctionType and
getattr(func, '__code__', None).__class__ is CodeType):
co_flags = func.__code__.co_f... | [
"def",
"coroutine",
"(",
"func",
")",
":",
"if",
"not",
"callable",
"(",
"func",
")",
":",
"raise",
"TypeError",
"(",
"'types.coroutine() expects a callable'",
")",
"if",
"(",
"func",
".",
"__class__",
"is",
"FunctionType",
"and",
"getattr",
"(",
"func",
","... | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/types.py#L237-L292 | |
natanielruiz/android-yolo | 1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f | jni-build/jni/include/tensorflow/python/ops/control_flow_ops.py | python | ControlFlowState.ExitGradWhileContext | (self, op, before) | Exit the WhileContext for gradient computation. | Exit the WhileContext for gradient computation. | [
"Exit",
"the",
"WhileContext",
"for",
"gradient",
"computation",
"."
] | def ExitGradWhileContext(self, op, before):
"""Exit the WhileContext for gradient computation."""
grad_state = self._GetGradState(op, before)
if grad_state:
grad_state.grad_context.Exit() | [
"def",
"ExitGradWhileContext",
"(",
"self",
",",
"op",
",",
"before",
")",
":",
"grad_state",
"=",
"self",
".",
"_GetGradState",
"(",
"op",
",",
"before",
")",
"if",
"grad_state",
":",
"grad_state",
".",
"grad_context",
".",
"Exit",
"(",
")"
] | https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/python/ops/control_flow_ops.py#L836-L840 | ||
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_internal/req/req_uninstall.py | python | _script_names | (dist, script_name, is_gui) | return paths_to_remove | Create the fully qualified name of the files created by
{console,gui}_scripts for the given ``dist``.
Returns the list of file names | Create the fully qualified name of the files created by | [
"Create",
"the",
"fully",
"qualified",
"name",
"of",
"the",
"files",
"created",
"by"
] | def _script_names(dist, script_name, is_gui):
# type: (Distribution, str, bool) -> List[str]
"""Create the fully qualified name of the files created by
{console,gui}_scripts for the given ``dist``.
Returns the list of file names
"""
if dist_in_usersite(dist):
bin_dir = bin_user
... | [
"def",
"_script_names",
"(",
"dist",
",",
"script_name",
",",
"is_gui",
")",
":",
"# type: (Distribution, str, bool) -> List[str]",
"if",
"dist_in_usersite",
"(",
"dist",
")",
":",
"bin_dir",
"=",
"bin_user",
"else",
":",
"bin_dir",
"=",
"bin_py",
"exe_name",
"=",... | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_internal/req/req_uninstall.py#L91-L129 | |
natanielruiz/android-yolo | 1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f | jni-build/jni/include/tensorflow/python/framework/ops.py | python | SparseTensor.op | (self) | return self.values.op | The `Operation` that produces `values` as an output. | The `Operation` that produces `values` as an output. | [
"The",
"Operation",
"that",
"produces",
"values",
"as",
"an",
"output",
"."
] | def op(self):
"""The `Operation` that produces `values` as an output."""
return self.values.op | [
"def",
"op",
"(",
"self",
")",
":",
"return",
"self",
".",
"values",
".",
"op"
] | https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/python/framework/ops.py#L1016-L1018 | |
gromacs/gromacs | 7dec3a3f99993cf5687a122de3e12de31c21c399 | docs/doxygen/reporter.py | python | Reporter.xml_assert | (self, xmlpath, message) | Report issues in Doxygen XML that violate assumptions in the script. | Report issues in Doxygen XML that violate assumptions in the script. | [
"Report",
"issues",
"in",
"Doxygen",
"XML",
"that",
"violate",
"assumptions",
"in",
"the",
"script",
"."
] | def xml_assert(self, xmlpath, message):
"""Report issues in Doxygen XML that violate assumptions in the script."""
self._report(Message('warning: ' + message, filename=xmlpath)) | [
"def",
"xml_assert",
"(",
"self",
",",
"xmlpath",
",",
"message",
")",
":",
"self",
".",
"_report",
"(",
"Message",
"(",
"'warning: '",
"+",
"message",
",",
"filename",
"=",
"xmlpath",
")",
")"
] | https://github.com/gromacs/gromacs/blob/7dec3a3f99993cf5687a122de3e12de31c21c399/docs/doxygen/reporter.py#L252-L254 | ||
shader-slang/slang | b8982fcf43b86c1e39dcc3dd19bff2821633eda6 | external/vulkan/registry/generator.py | python | OutputGenerator.makeProtoName | (self, name, tail) | return self.genOpts.apientry + name + tail | Turn a `<proto>` `<name>` into C-language prototype
and typedef declarations for that name.
- name - contents of `<name>` tag
- tail - whatever text follows that tag in the Element | Turn a `<proto>` `<name>` into C-language prototype
and typedef declarations for that name. | [
"Turn",
"a",
"<proto",
">",
"<name",
">",
"into",
"C",
"-",
"language",
"prototype",
"and",
"typedef",
"declarations",
"for",
"that",
"name",
"."
] | def makeProtoName(self, name, tail):
"""Turn a `<proto>` `<name>` into C-language prototype
and typedef declarations for that name.
- name - contents of `<name>` tag
- tail - whatever text follows that tag in the Element"""
return self.genOpts.apientry + name + tail | [
"def",
"makeProtoName",
"(",
"self",
",",
"name",
",",
"tail",
")",
":",
"return",
"self",
".",
"genOpts",
".",
"apientry",
"+",
"name",
"+",
"tail"
] | https://github.com/shader-slang/slang/blob/b8982fcf43b86c1e39dcc3dd19bff2821633eda6/external/vulkan/registry/generator.py#L760-L766 | |
catboost/catboost | 167f64f237114a4d10b2b4ee42adb4569137debe | contrib/python/pandas/py3/pandas/core/indexes/base.py | python | Index._maybe_cast_listlike_indexer | (self, target) | return ensure_index(target) | Analogue to maybe_cast_indexer for get_indexer instead of get_loc. | Analogue to maybe_cast_indexer for get_indexer instead of get_loc. | [
"Analogue",
"to",
"maybe_cast_indexer",
"for",
"get_indexer",
"instead",
"of",
"get_loc",
"."
] | def _maybe_cast_listlike_indexer(self, target) -> Index:
"""
Analogue to maybe_cast_indexer for get_indexer instead of get_loc.
"""
return ensure_index(target) | [
"def",
"_maybe_cast_listlike_indexer",
"(",
"self",
",",
"target",
")",
"->",
"Index",
":",
"return",
"ensure_index",
"(",
"target",
")"
] | https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/core/indexes/base.py#L5704-L5708 | |
openvinotoolkit/openvino | dedcbeafa8b84cccdc55ca64b8da516682b381c7 | src/bindings/python/src/openvino/runtime/utils/decorators.py | python | nameable_op | (node_factory_function: Callable) | return wrapper | Set the name to the openvino operator returned by the wrapped function. | Set the name to the openvino operator returned by the wrapped function. | [
"Set",
"the",
"name",
"to",
"the",
"openvino",
"operator",
"returned",
"by",
"the",
"wrapped",
"function",
"."
] | def nameable_op(node_factory_function: Callable) -> Callable:
"""Set the name to the openvino operator returned by the wrapped function."""
@wraps(node_factory_function)
def wrapper(*args: Any, **kwargs: Any) -> Node:
node = node_factory_function(*args, **kwargs)
node = _set_node_friendly_n... | [
"def",
"nameable_op",
"(",
"node_factory_function",
":",
"Callable",
")",
"->",
"Callable",
":",
"@",
"wraps",
"(",
"node_factory_function",
")",
"def",
"wrapper",
"(",
"*",
"args",
":",
"Any",
",",
"*",
"*",
"kwargs",
":",
"Any",
")",
"->",
"Node",
":",... | https://github.com/openvinotoolkit/openvino/blob/dedcbeafa8b84cccdc55ca64b8da516682b381c7/src/bindings/python/src/openvino/runtime/utils/decorators.py#L17-L26 | |
microsoft/ivy | 9f3c7ecc0b2383129fdd0953e10890d98d09a82d | ivy/ui_extensions_api.py | python | arg_join2 | (node) | Binary join | Binary join | [
"Binary",
"join"
] | def arg_join2(node):
"""
Binary join
"""
sels = _analysis_session_widget.arg.selected
if len(sels) == 0:
raise InteractionError("You must select at least one node to join with.")
if any(len(x) != 1 for x in sels):
raise InteractionError("You must select one node to with. " +
... | [
"def",
"arg_join2",
"(",
"node",
")",
":",
"sels",
"=",
"_analysis_session_widget",
".",
"arg",
".",
"selected",
"if",
"len",
"(",
"sels",
")",
"==",
"0",
":",
"raise",
"InteractionError",
"(",
"\"You must select at least one node to join with.\"",
")",
"if",
"a... | https://github.com/microsoft/ivy/blob/9f3c7ecc0b2383129fdd0953e10890d98d09a82d/ivy/ui_extensions_api.py#L391-L409 | ||
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/gtk/_core.py | python | MoveEvent.GetRect | (*args, **kwargs) | return _core_.MoveEvent_GetRect(*args, **kwargs) | GetRect(self) -> Rect | GetRect(self) -> Rect | [
"GetRect",
"(",
"self",
")",
"-",
">",
"Rect"
] | def GetRect(*args, **kwargs):
"""GetRect(self) -> Rect"""
return _core_.MoveEvent_GetRect(*args, **kwargs) | [
"def",
"GetRect",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_core_",
".",
"MoveEvent_GetRect",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_core.py#L6197-L6199 | |
ZhouWeikuan/DouDiZhu | 0d84ff6c0bc54dba6ae37955de9ae9307513dc99 | code/frameworks/cocos2d-x/tools/bindings-generator/clang/cindex.py | python | Cursor.extent | (self) | return self._extent | Return the source range (the range of text) occupied by the entity
pointed at by the cursor. | Return the source range (the range of text) occupied by the entity
pointed at by the cursor. | [
"Return",
"the",
"source",
"range",
"(",
"the",
"range",
"of",
"text",
")",
"occupied",
"by",
"the",
"entity",
"pointed",
"at",
"by",
"the",
"cursor",
"."
] | def extent(self):
"""
Return the source range (the range of text) occupied by the entity
pointed at by the cursor.
"""
if not hasattr(self, '_extent'):
self._extent = conf.lib.clang_getCursorExtent(self)
return self._extent | [
"def",
"extent",
"(",
"self",
")",
":",
"if",
"not",
"hasattr",
"(",
"self",
",",
"'_extent'",
")",
":",
"self",
".",
"_extent",
"=",
"conf",
".",
"lib",
".",
"clang_getCursorExtent",
"(",
"self",
")",
"return",
"self",
".",
"_extent"
] | https://github.com/ZhouWeikuan/DouDiZhu/blob/0d84ff6c0bc54dba6ae37955de9ae9307513dc99/code/frameworks/cocos2d-x/tools/bindings-generator/clang/cindex.py#L1292-L1300 | |
shedskin/shedskin | ae88dbca7b1d9671cd8be448cb0b497122758936 | examples/go.py | python | UCTNode.update_path | (self, board, color, path) | update win/loss count along path | update win/loss count along path | [
"update",
"win",
"/",
"loss",
"count",
"along",
"path"
] | def update_path(self, board, color, path):
""" update win/loss count along path """
wins = board.score(BLACK) >= board.score(WHITE)
for node in path:
if color == BLACK: color = WHITE
else: color = BLACK
if wins == (color == BLACK):
node.wins +=... | [
"def",
"update_path",
"(",
"self",
",",
"board",
",",
"color",
",",
"path",
")",
":",
"wins",
"=",
"board",
".",
"score",
"(",
"BLACK",
")",
">=",
"board",
".",
"score",
"(",
"WHITE",
")",
"for",
"node",
"in",
"path",
":",
"if",
"color",
"==",
"B... | https://github.com/shedskin/shedskin/blob/ae88dbca7b1d9671cd8be448cb0b497122758936/examples/go.py#L360-L371 | ||
catboost/catboost | 167f64f237114a4d10b2b4ee42adb4569137debe | contrib/python/pandas/py3/pandas/core/dtypes/cast.py | python | astype_array | (values: ArrayLike, dtype: DtypeObj, copy: bool = False) | return values | Cast array (ndarray or ExtensionArray) to the new dtype.
Parameters
----------
values : ndarray or ExtensionArray
dtype : dtype object
copy : bool, default False
copy if indicated
Returns
-------
ndarray or ExtensionArray | Cast array (ndarray or ExtensionArray) to the new dtype. | [
"Cast",
"array",
"(",
"ndarray",
"or",
"ExtensionArray",
")",
"to",
"the",
"new",
"dtype",
"."
] | def astype_array(values: ArrayLike, dtype: DtypeObj, copy: bool = False) -> ArrayLike:
"""
Cast array (ndarray or ExtensionArray) to the new dtype.
Parameters
----------
values : ndarray or ExtensionArray
dtype : dtype object
copy : bool, default False
copy if indicated
Returns... | [
"def",
"astype_array",
"(",
"values",
":",
"ArrayLike",
",",
"dtype",
":",
"DtypeObj",
",",
"copy",
":",
"bool",
"=",
"False",
")",
"->",
"ArrayLike",
":",
"if",
"(",
"values",
".",
"dtype",
".",
"kind",
"in",
"[",
"\"m\"",
",",
"\"M\"",
"]",
"and",
... | https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/core/dtypes/cast.py#L1219-L1263 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/osx_cocoa/_controls.py | python | ToolBar.SetToolDisabledBitmap | (*args, **kwargs) | return _controls_.ToolBar_SetToolDisabledBitmap(*args, **kwargs) | SetToolDisabledBitmap(self, int id, Bitmap bitmap) | SetToolDisabledBitmap(self, int id, Bitmap bitmap) | [
"SetToolDisabledBitmap",
"(",
"self",
"int",
"id",
"Bitmap",
"bitmap",
")"
] | def SetToolDisabledBitmap(*args, **kwargs):
"""SetToolDisabledBitmap(self, int id, Bitmap bitmap)"""
return _controls_.ToolBar_SetToolDisabledBitmap(*args, **kwargs) | [
"def",
"SetToolDisabledBitmap",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_controls_",
".",
"ToolBar_SetToolDisabledBitmap",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_controls.py#L3959-L3961 | |
catboost/catboost | 167f64f237114a4d10b2b4ee42adb4569137debe | contrib/python/pandas/py3/pandas/core/strings/accessor.py | python | StringMethods.slice_replace | (self, start=None, stop=None, repl=None) | return self._wrap_result(result) | Replace a positional slice of a string with another value.
Parameters
----------
start : int, optional
Left index position to use for the slice. If not specified (None),
the slice is unbounded on the left, i.e. slice from the start
of the string.
stop... | Replace a positional slice of a string with another value. | [
"Replace",
"a",
"positional",
"slice",
"of",
"a",
"string",
"with",
"another",
"value",
"."
] | def slice_replace(self, start=None, stop=None, repl=None):
"""
Replace a positional slice of a string with another value.
Parameters
----------
start : int, optional
Left index position to use for the slice. If not specified (None),
the slice is unbounded... | [
"def",
"slice_replace",
"(",
"self",
",",
"start",
"=",
"None",
",",
"stop",
"=",
"None",
",",
"repl",
"=",
"None",
")",
":",
"result",
"=",
"self",
".",
"_data",
".",
"array",
".",
"_str_slice_replace",
"(",
"start",
",",
"stop",
",",
"repl",
")",
... | https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/core/strings/accessor.py#L1693-L1766 | |
moderngl/moderngl | 32fe79927e02b0fa893b3603d677bdae39771e14 | moderngl/compute_shader.py | python | ComputeShader.__iter__ | (self) | Yields the internal members names as strings.
This includes all members such as uniforms, attributes etc. | Yields the internal members names as strings.
This includes all members such as uniforms, attributes etc. | [
"Yields",
"the",
"internal",
"members",
"names",
"as",
"strings",
".",
"This",
"includes",
"all",
"members",
"such",
"as",
"uniforms",
"attributes",
"etc",
"."
] | def __iter__(self) -> Generator[str, None, None]:
"""Yields the internal members names as strings.
This includes all members such as uniforms, attributes etc.
"""
yield from self._members | [
"def",
"__iter__",
"(",
"self",
")",
"->",
"Generator",
"[",
"str",
",",
"None",
",",
"None",
"]",
":",
"yield",
"from",
"self",
".",
"_members"
] | https://github.com/moderngl/moderngl/blob/32fe79927e02b0fa893b3603d677bdae39771e14/moderngl/compute_shader.py#L89-L93 | ||
troldal/OpenXLSX | 3eb9c748e3ecd865203fb9946ea86d3c02b3f7d9 | Benchmarks/gbench/setup.py | python | _get_version | () | Parse the version string from __init__.py. | Parse the version string from __init__.py. | [
"Parse",
"the",
"version",
"string",
"from",
"__init__",
".",
"py",
"."
] | def _get_version():
"""Parse the version string from __init__.py."""
with open(
os.path.join(HERE, "bindings", "python", "google_benchmark", "__init__.py")
) as init_file:
try:
version_line = next(
line for line in init_file if line.startswith("__version__")
... | [
"def",
"_get_version",
"(",
")",
":",
"with",
"open",
"(",
"os",
".",
"path",
".",
"join",
"(",
"HERE",
",",
"\"bindings\"",
",",
"\"python\"",
",",
"\"google_benchmark\"",
",",
"\"__init__.py\"",
")",
")",
"as",
"init_file",
":",
"try",
":",
"version_line... | https://github.com/troldal/OpenXLSX/blob/3eb9c748e3ecd865203fb9946ea86d3c02b3f7d9/Benchmarks/gbench/setup.py#L18-L32 | ||
anestisb/oatdump_plus | ba858c1596598f0d9ae79c14d08c708cecc50af3 | tools/cpplint.py | python | CheckBraces | (filename, clean_lines, linenum, error) | Looks for misplaced braces (e.g. at the end of line).
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. | Looks for misplaced braces (e.g. at the end of line). | [
"Looks",
"for",
"misplaced",
"braces",
"(",
"e",
".",
"g",
".",
"at",
"the",
"end",
"of",
"line",
")",
"."
] | def CheckBraces(filename, clean_lines, linenum, error):
"""Looks for misplaced braces (e.g. at the end of line).
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 er... | [
"def",
"CheckBraces",
"(",
"filename",
",",
"clean_lines",
",",
"linenum",
",",
"error",
")",
":",
"line",
"=",
"clean_lines",
".",
"elided",
"[",
"linenum",
"]",
"# get rid of comments and strings",
"if",
"Match",
"(",
"r'\\s*{\\s*$'",
",",
"line",
")",
":",
... | https://github.com/anestisb/oatdump_plus/blob/ba858c1596598f0d9ae79c14d08c708cecc50af3/tools/cpplint.py#L2603-L2676 | ||
miyosuda/TensorFlowAndroidMNIST | 7b5a4603d2780a8a2834575706e9001977524007 | jni-build/jni/include/external/bazel_tools/tools/android/incremental_install.py | python | Adb.Delete | (self, remote) | Delete the given file (or directory) on the device. | Delete the given file (or directory) on the device. | [
"Delete",
"the",
"given",
"file",
"(",
"or",
"directory",
")",
"on",
"the",
"device",
"."
] | def Delete(self, remote):
"""Delete the given file (or directory) on the device."""
self.DeleteMultiple([remote]) | [
"def",
"Delete",
"(",
"self",
",",
"remote",
")",
":",
"self",
".",
"DeleteMultiple",
"(",
"[",
"remote",
"]",
")"
] | https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/external/bazel_tools/tools/android/incremental_install.py#L252-L254 | ||
VowpalWabbit/vowpal_wabbit | 866b8fa88ff85a957c7eb72065ea44518b9ba416 | python/vowpalwabbit/pyvw.py | python | Example.push_feature | (
self,
ns: Union[NamespaceId, str, int],
feature: Union[str, int],
v: float = 1.0,
ns_hash: Optional[int] = None,
) | Add an unhashed feature to a given namespace
Args:
ns: namespace in which the feature is to be pushed
f: feature
v: The value of the feature, be default is 1.0
ns_hash : Optional, by default is None
The hash of the namespace | Add an unhashed feature to a given namespace | [
"Add",
"an",
"unhashed",
"feature",
"to",
"a",
"given",
"namespace"
] | def push_feature(
self,
ns: Union[NamespaceId, str, int],
feature: Union[str, int],
v: float = 1.0,
ns_hash: Optional[int] = None,
) -> None:
"""Add an unhashed feature to a given namespace
Args:
ns: namespace in which the feature is to be pushed
... | [
"def",
"push_feature",
"(",
"self",
",",
"ns",
":",
"Union",
"[",
"NamespaceId",
",",
"str",
",",
"int",
"]",
",",
"feature",
":",
"Union",
"[",
"str",
",",
"int",
"]",
",",
"v",
":",
"float",
"=",
"1.0",
",",
"ns_hash",
":",
"Optional",
"[",
"in... | https://github.com/VowpalWabbit/vowpal_wabbit/blob/866b8fa88ff85a957c7eb72065ea44518b9ba416/python/vowpalwabbit/pyvw.py#L1668-L1685 | ||
microsoft/CCF | 14801dc01f3f225fc85772eeb1c066d1b1b10a47 | python/ccf/ledger.py | python | PublicDomain.get_claims_digest | (self) | return self._claims_digest if self._entry_type.has_claims() else None | Return the claims digest when there is one | Return the claims digest when there is one | [
"Return",
"the",
"claims",
"digest",
"when",
"there",
"is",
"one"
] | def get_claims_digest(self) -> Optional[bytes]:
"""
Return the claims digest when there is one
"""
return self._claims_digest if self._entry_type.has_claims() else None | [
"def",
"get_claims_digest",
"(",
"self",
")",
"->",
"Optional",
"[",
"bytes",
"]",
":",
"return",
"self",
".",
"_claims_digest",
"if",
"self",
".",
"_entry_type",
".",
"has_claims",
"(",
")",
"else",
"None"
] | https://github.com/microsoft/CCF/blob/14801dc01f3f225fc85772eeb1c066d1b1b10a47/python/ccf/ledger.py#L274-L278 | |
Tencent/CMONGO | c40380caa14e05509f46993aa8b8da966b09b0b5 | buildscripts/packager.py | python | is_valid_file | (parser, filename) | Check if file exists, and return the filename | Check if file exists, and return the filename | [
"Check",
"if",
"file",
"exists",
"and",
"return",
"the",
"filename"
] | def is_valid_file(parser, filename):
"""Check if file exists, and return the filename"""
if not os.path.exists(filename):
parser.error("The file %s does not exist!" % filename)
else:
return filename | [
"def",
"is_valid_file",
"(",
"parser",
",",
"filename",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"exists",
"(",
"filename",
")",
":",
"parser",
".",
"error",
"(",
"\"The file %s does not exist!\"",
"%",
"filename",
")",
"else",
":",
"return",
"filena... | https://github.com/Tencent/CMONGO/blob/c40380caa14e05509f46993aa8b8da966b09b0b5/buildscripts/packager.py#L742-L747 | ||
natanielruiz/android-yolo | 1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f | jni-build/jni/include/tensorflow/python/ops/variable_scope.py | python | _VariableStore.__init__ | (self) | Create a variable store. | Create a variable store. | [
"Create",
"a",
"variable",
"store",
"."
] | def __init__(self):
"""Create a variable store."""
self._vars = {} # A dictionary of the stored TensorFlow variables.
self._partitioned_vars = {} # A dict of the stored PartitionedVariables.
self._variable_scopes_count = {} | [
"def",
"__init__",
"(",
"self",
")",
":",
"self",
".",
"_vars",
"=",
"{",
"}",
"# A dictionary of the stored TensorFlow variables.",
"self",
".",
"_partitioned_vars",
"=",
"{",
"}",
"# A dict of the stored PartitionedVariables.",
"self",
".",
"_variable_scopes_count",
"... | https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/python/ops/variable_scope.py#L53-L57 | ||
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/gtk/_gdi.py | python | Region.__init__ | (self, *args, **kwargs) | __init__(self, int x=0, int y=0, int width=0, int height=0) -> Region | __init__(self, int x=0, int y=0, int width=0, int height=0) -> Region | [
"__init__",
"(",
"self",
"int",
"x",
"=",
"0",
"int",
"y",
"=",
"0",
"int",
"width",
"=",
"0",
"int",
"height",
"=",
"0",
")",
"-",
">",
"Region"
] | def __init__(self, *args, **kwargs):
"""__init__(self, int x=0, int y=0, int width=0, int height=0) -> Region"""
_gdi_.Region_swiginit(self,_gdi_.new_Region(*args, **kwargs)) | [
"def",
"__init__",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"_gdi_",
".",
"Region_swiginit",
"(",
"self",
",",
"_gdi_",
".",
"new_Region",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_gdi.py#L1550-L1552 | ||
neopenx/Dragon | 0e639a7319035ddc81918bd3df059230436ee0a1 | Dragon/python/dragon/operators/arithmetic.py | python | Exp | (inputs, **kwargs) | return output | Calculate the exponential of input.
Parameters
----------
inputs : Tensor
The input tensor.
Returns
-------
Tensor
The exponential result. | Calculate the exponential of input. | [
"Calculate",
"the",
"exponential",
"of",
"input",
"."
] | def Exp(inputs, **kwargs):
"""Calculate the exponential of input.
Parameters
----------
inputs : Tensor
The input tensor.
Returns
-------
Tensor
The exponential result.
"""
CheckInputs(inputs, 1)
arguments = ParseArguments(locals())
output = Tensor.CreateO... | [
"def",
"Exp",
"(",
"inputs",
",",
"*",
"*",
"kwargs",
")",
":",
"CheckInputs",
"(",
"inputs",
",",
"1",
")",
"arguments",
"=",
"ParseArguments",
"(",
"locals",
"(",
")",
")",
"output",
"=",
"Tensor",
".",
"CreateOperator",
"(",
"nout",
"=",
"1",
",",... | https://github.com/neopenx/Dragon/blob/0e639a7319035ddc81918bd3df059230436ee0a1/Dragon/python/dragon/operators/arithmetic.py#L315-L337 | |
thalium/icebox | 99d147d5b9269222225443ce171b4fd46d8985d4 | third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2class.py | python | debugDumpString | (output, str) | Dumps informations about the string, shorten it if necessary | Dumps informations about the string, shorten it if necessary | [
"Dumps",
"informations",
"about",
"the",
"string",
"shorten",
"it",
"if",
"necessary"
] | def debugDumpString(output, str):
"""Dumps informations about the string, shorten it if necessary """
if output is not None: output.flush()
libxml2mod.xmlDebugDumpString(output, str) | [
"def",
"debugDumpString",
"(",
"output",
",",
"str",
")",
":",
"if",
"output",
"is",
"not",
"None",
":",
"output",
".",
"flush",
"(",
")",
"libxml2mod",
".",
"xmlDebugDumpString",
"(",
"output",
",",
"str",
")"
] | https://github.com/thalium/icebox/blob/99d147d5b9269222225443ce171b4fd46d8985d4/third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2class.py#L294-L297 | ||
lammps/lammps | b75c3065430a75b1b5543a10e10f46d9b4c91913 | tools/i-pi/ipi/utils/messages.py | python | warning | (text="", show=True) | Prints a warning message.
Args:
text: The text of the information message.
show: A boolean describing whether or not the message should be
printed. | Prints a warning message. | [
"Prints",
"a",
"warning",
"message",
"."
] | def warning(text="", show=True):
"""Prints a warning message.
Args:
text: The text of the information message.
show: A boolean describing whether or not the message should be
printed.
"""
if not show:
return
if verbosity.debug:
traceback.print_stack(file=sys.stdout)
... | [
"def",
"warning",
"(",
"text",
"=",
"\"\"",
",",
"show",
"=",
"True",
")",
":",
"if",
"not",
"show",
":",
"return",
"if",
"verbosity",
".",
"debug",
":",
"traceback",
".",
"print_stack",
"(",
"file",
"=",
"sys",
".",
"stdout",
")",
"print",
"\" !W! \... | https://github.com/lammps/lammps/blob/b75c3065430a75b1b5543a10e10f46d9b4c91913/tools/i-pi/ipi/utils/messages.py#L142-L155 | ||
krishauser/Klampt | 972cc83ea5befac3f653c1ba20f80155768ad519 | Python/python2_version/klampt/model/collide.py | python | group_collision_iter | (geomlist1,geomlist2,pairs='all') | Tests whether two sets of geometries collide.
Args:
geomlist1 (list of Geometry3D): set 1
geomlist2 (list of Geometry3D): set 2
pairs: can be:
* 'all': all pairs are tested.
* a function test(i,j) -> bool, taking geomlist1 index i and
geomlist2 index... | Tests whether two sets of geometries collide. | [
"Tests",
"whether",
"two",
"sets",
"of",
"geometries",
"collide",
"."
] | def group_collision_iter(geomlist1,geomlist2,pairs='all'):
"""Tests whether two sets of geometries collide.
Args:
geomlist1 (list of Geometry3D): set 1
geomlist2 (list of Geometry3D): set 2
pairs: can be:
* 'all': all pairs are tested.
* a function test(i,j) -... | [
"def",
"group_collision_iter",
"(",
"geomlist1",
",",
"geomlist2",
",",
"pairs",
"=",
"'all'",
")",
":",
"if",
"len",
"(",
"geomlist1",
")",
"==",
"0",
"or",
"len",
"(",
"geomlist2",
")",
"==",
"0",
":",
"return",
"bblist1",
"=",
"[",
"g",
".",
"getB... | https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/python2_version/klampt/model/collide.py#L73-L118 | ||
benoitsteiner/tensorflow-opencl | cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5 | tensorflow/contrib/rnn/python/ops/rnn_cell.py | python | UGRNNCell.call | (self, inputs, state) | return new_output, new_state | Run one step of UGRNN.
Args:
inputs: input Tensor, 2D, batch x input size.
state: state Tensor, 2D, batch x num units.
Returns:
new_output: batch x num units, Tensor representing the output of the UGRNN
after reading `inputs` when previous state was `state`. Identical to
`new... | Run one step of UGRNN. | [
"Run",
"one",
"step",
"of",
"UGRNN",
"."
] | def call(self, inputs, state):
"""Run one step of UGRNN.
Args:
inputs: input Tensor, 2D, batch x input size.
state: state Tensor, 2D, batch x num units.
Returns:
new_output: batch x num units, Tensor representing the output of the UGRNN
after reading `inputs` when previous state ... | [
"def",
"call",
"(",
"self",
",",
"inputs",
",",
"state",
")",
":",
"sigmoid",
"=",
"math_ops",
".",
"sigmoid",
"input_size",
"=",
"inputs",
".",
"get_shape",
"(",
")",
".",
"with_rank",
"(",
"2",
")",
"[",
"1",
"]",
"if",
"input_size",
".",
"value",
... | https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/contrib/rnn/python/ops/rnn_cell.py#L1559-L1598 | |
adobe/chromium | cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7 | tools/code_coverage/coverage_posix.py | python | Coverage.StartXvfb | (self) | Start Xvfb and set an appropriate DISPLAY environment. Linux only.
Copied from http://src.chromium.org/viewvc/chrome/trunk/tools/buildbot/
scripts/slave/slave_utils.py?view=markup
with some simplifications (e.g. no need to use xdisplaycheck, save
pid in var not file, etc) | Start Xvfb and set an appropriate DISPLAY environment. Linux only. | [
"Start",
"Xvfb",
"and",
"set",
"an",
"appropriate",
"DISPLAY",
"environment",
".",
"Linux",
"only",
"."
] | def StartXvfb(self):
"""Start Xvfb and set an appropriate DISPLAY environment. Linux only.
Copied from http://src.chromium.org/viewvc/chrome/trunk/tools/buildbot/
scripts/slave/slave_utils.py?view=markup
with some simplifications (e.g. no need to use xdisplaycheck, save
pid in var not file, etc)... | [
"def",
"StartXvfb",
"(",
"self",
")",
":",
"logging",
".",
"info",
"(",
"'Xvfb: starting'",
")",
"proc",
"=",
"subprocess",
".",
"Popen",
"(",
"[",
"\"Xvfb\"",
",",
"\":9\"",
",",
"\"-screen\"",
",",
"\"0\"",
",",
"\"1024x768x24\"",
",",
"\"-ac\"",
"]",
... | https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/tools/code_coverage/coverage_posix.py#L739-L767 | ||
ceph/ceph | 959663007321a369c83218414a29bd9dbc8bda3a | qa/tasks/cephfs/mount.py | python | CephFSMount.cleanup_netns | (self) | Cleanup the netns for the mountpoint. | Cleanup the netns for the mountpoint. | [
"Cleanup",
"the",
"netns",
"for",
"the",
"mountpoint",
"."
] | def cleanup_netns(self):
"""
Cleanup the netns for the mountpoint.
""" | [
"def",
"cleanup_netns",
"(",
"self",
")",
":"
] | https://github.com/ceph/ceph/blob/959663007321a369c83218414a29bd9dbc8bda3a/qa/tasks/cephfs/mount.py#L402-L405 | ||
natanielruiz/android-yolo | 1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f | jni-build/jni/include/tensorflow/python/ops/variables.py | python | Variable._set_save_slice_info | (self, save_slice_info) | Sets the slice info for this `Variable`.
Args:
save_slice_info: A `Variable.SaveSliceInfo` object. | Sets the slice info for this `Variable`. | [
"Sets",
"the",
"slice",
"info",
"for",
"this",
"Variable",
"."
] | def _set_save_slice_info(self, save_slice_info):
"""Sets the slice info for this `Variable`.
Args:
save_slice_info: A `Variable.SaveSliceInfo` object.
"""
self._save_slice_info = save_slice_info | [
"def",
"_set_save_slice_info",
"(",
"self",
",",
"save_slice_info",
")",
":",
"self",
".",
"_save_slice_info",
"=",
"save_slice_info"
] | https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/python/ops/variables.py#L753-L759 | ||
CaoWGG/TensorRT-CenterNet | f949252e37b51e60f873808f46d3683f15735e79 | onnx-tensorrt/third_party/onnx/third_party/pybind11/tools/clang/cindex.py | python | Cursor.lexical_parent | (self) | return self._lexical_parent | Return the lexical parent for this cursor. | Return the lexical parent for this cursor. | [
"Return",
"the",
"lexical",
"parent",
"for",
"this",
"cursor",
"."
] | def lexical_parent(self):
"""Return the lexical parent for this cursor."""
if not hasattr(self, '_lexical_parent'):
self._lexical_parent = conf.lib.clang_getCursorLexicalParent(self)
return self._lexical_parent | [
"def",
"lexical_parent",
"(",
"self",
")",
":",
"if",
"not",
"hasattr",
"(",
"self",
",",
"'_lexical_parent'",
")",
":",
"self",
".",
"_lexical_parent",
"=",
"conf",
".",
"lib",
".",
"clang_getCursorLexicalParent",
"(",
"self",
")",
"return",
"self",
".",
... | https://github.com/CaoWGG/TensorRT-CenterNet/blob/f949252e37b51e60f873808f46d3683f15735e79/onnx-tensorrt/third_party/onnx/third_party/pybind11/tools/clang/cindex.py#L1581-L1586 | |
chatopera/clause | dee31153d5ffdef33deedb6bff03e7806c296968 | var/assets/clients/gen-py/clause/Serving.py | python | Client.postSlot | (self, request) | return self.recv_postSlot() | Parameters:
- request | Parameters:
- request | [
"Parameters",
":",
"-",
"request"
] | def postSlot(self, request):
"""
Parameters:
- request
"""
self.send_postSlot(request)
return self.recv_postSlot() | [
"def",
"postSlot",
"(",
"self",
",",
"request",
")",
":",
"self",
".",
"send_postSlot",
"(",
"request",
")",
"return",
"self",
".",
"recv_postSlot",
"(",
")"
] | https://github.com/chatopera/clause/blob/dee31153d5ffdef33deedb6bff03e7806c296968/var/assets/clients/gen-py/clause/Serving.py#L1248-L1255 | |
omnisci/omniscidb | b9c95f1bd602b4ffc8b0edf18bfad61031e08d86 | Benchmarks/synthetic_benchmark/create_table.py | python | SyntheticTable.doesTableHasExpectedSchemaInDB | (self) | Verifies whether the existing table in the database has the expected
schema or not. | Verifies whether the existing table in the database has the expected
schema or not. | [
"Verifies",
"whether",
"the",
"existing",
"table",
"in",
"the",
"database",
"has",
"the",
"expected",
"schema",
"or",
"not",
"."
] | def doesTableHasExpectedSchemaInDB(self):
"""
Verifies whether the existing table in the database has the expected
schema or not.
"""
try:
con = pymapd.connect(
user=self.db_user,
password=self.db_password,
host... | [
"def",
"doesTableHasExpectedSchemaInDB",
"(",
"self",
")",
":",
"try",
":",
"con",
"=",
"pymapd",
".",
"connect",
"(",
"user",
"=",
"self",
".",
"db_user",
",",
"password",
"=",
"self",
".",
"db_password",
",",
"host",
"=",
"self",
".",
"db_server",
",",... | https://github.com/omnisci/omniscidb/blob/b9c95f1bd602b4ffc8b0edf18bfad61031e08d86/Benchmarks/synthetic_benchmark/create_table.py#L216-L251 | ||
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Tools/Python/3.7.10/windows/Lib/site-packages/dateutil/parser/isoparser.py | python | isoparser.__init__ | (self, sep=None) | :param sep:
A single character that separates date and time portions. If
``None``, the parser will accept any single character.
For strict ISO-8601 adherence, pass ``'T'``. | :param sep:
A single character that separates date and time portions. If
``None``, the parser will accept any single character.
For strict ISO-8601 adherence, pass ``'T'``. | [
":",
"param",
"sep",
":",
"A",
"single",
"character",
"that",
"separates",
"date",
"and",
"time",
"portions",
".",
"If",
"None",
"the",
"parser",
"will",
"accept",
"any",
"single",
"character",
".",
"For",
"strict",
"ISO",
"-",
"8601",
"adherence",
"pass",... | def __init__(self, sep=None):
"""
:param sep:
A single character that separates date and time portions. If
``None``, the parser will accept any single character.
For strict ISO-8601 adherence, pass ``'T'``.
"""
if sep is not None:
if (len(s... | [
"def",
"__init__",
"(",
"self",
",",
"sep",
"=",
"None",
")",
":",
"if",
"sep",
"is",
"not",
"None",
":",
"if",
"(",
"len",
"(",
"sep",
")",
"!=",
"1",
"or",
"ord",
"(",
"sep",
")",
">=",
"128",
"or",
"sep",
"in",
"'0123456789'",
")",
":",
"r... | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/dateutil/parser/isoparser.py#L43-L57 | ||
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/osx_carbon/_gdi.py | python | Pen.GetJoin | (*args, **kwargs) | return _gdi_.Pen_GetJoin(*args, **kwargs) | GetJoin(self) -> int | GetJoin(self) -> int | [
"GetJoin",
"(",
"self",
")",
"-",
">",
"int"
] | def GetJoin(*args, **kwargs):
"""GetJoin(self) -> int"""
return _gdi_.Pen_GetJoin(*args, **kwargs) | [
"def",
"GetJoin",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_gdi_",
".",
"Pen_GetJoin",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_gdi.py#L408-L410 | |
catboost/catboost | 167f64f237114a4d10b2b4ee42adb4569137debe | contrib/tools/python/src/Lib/cookielib.py | python | escape_path | (path) | return path | Escape any invalid characters in HTTP URL, and uppercase all escapes. | Escape any invalid characters in HTTP URL, and uppercase all escapes. | [
"Escape",
"any",
"invalid",
"characters",
"in",
"HTTP",
"URL",
"and",
"uppercase",
"all",
"escapes",
"."
] | def escape_path(path):
"""Escape any invalid characters in HTTP URL, and uppercase all escapes."""
# There's no knowing what character encoding was used to create URLs
# containing %-escapes, but since we have to pick one to escape invalid
# path characters, we pick UTF-8, as recommended in the HTML 4.0... | [
"def",
"escape_path",
"(",
"path",
")",
":",
"# There's no knowing what character encoding was used to create URLs",
"# containing %-escapes, but since we have to pick one to escape invalid",
"# path characters, we pick UTF-8, as recommended in the HTML 4.0",
"# specification:",
"# http://www.w3... | https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Lib/cookielib.py#L655-L669 | |
hanpfei/chromium-net | 392cc1fa3a8f92f42e4071ab6e674d8e0482f83f | third_party/catapult/third_party/gsutil/third_party/boto/boto/redshift/layer1.py | python | RedshiftConnection.modify_event_subscription | (self, subscription_name,
sns_topic_arn=None, source_type=None,
source_ids=None, event_categories=None,
severity=None, enabled=None) | return self._make_request(
action='ModifyEventSubscription',
verb='POST',
path='/', params=params) | Modifies an existing Amazon Redshift event notification
subscription.
:type subscription_name: string
:param subscription_name: The name of the modified Amazon Redshift
event notification subscription.
:type sns_topic_arn: string
:param sns_topic_arn: The Amazon Res... | Modifies an existing Amazon Redshift event notification
subscription. | [
"Modifies",
"an",
"existing",
"Amazon",
"Redshift",
"event",
"notification",
"subscription",
"."
] | def modify_event_subscription(self, subscription_name,
sns_topic_arn=None, source_type=None,
source_ids=None, event_categories=None,
severity=None, enabled=None):
"""
Modifies an existing Amazon Redshif... | [
"def",
"modify_event_subscription",
"(",
"self",
",",
"subscription_name",
",",
"sns_topic_arn",
"=",
"None",
",",
"source_type",
"=",
"None",
",",
"source_ids",
"=",
"None",
",",
"event_categories",
"=",
"None",
",",
"severity",
"=",
"None",
",",
"enabled",
"... | https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/gsutil/third_party/boto/boto/redshift/layer1.py#L2558-L2631 | |
catboost/catboost | 167f64f237114a4d10b2b4ee42adb4569137debe | contrib/tools/python3/src/Lib/turtle.py | python | RawTurtle.clearstamp | (self, stampid) | Delete stamp with given stampid
Argument:
stampid - an integer, must be return value of previous stamp() call.
Example (for a Turtle instance named turtle):
>>> turtle.color("blue")
>>> astamp = turtle.stamp()
>>> turtle.fd(50)
>>> turtle.clearstamp(astamp) | Delete stamp with given stampid | [
"Delete",
"stamp",
"with",
"given",
"stampid"
] | def clearstamp(self, stampid):
"""Delete stamp with given stampid
Argument:
stampid - an integer, must be return value of previous stamp() call.
Example (for a Turtle instance named turtle):
>>> turtle.color("blue")
>>> astamp = turtle.stamp()
>>> turtle.fd(50)
... | [
"def",
"clearstamp",
"(",
"self",
",",
"stampid",
")",
":",
"self",
".",
"_clearstamp",
"(",
"stampid",
")",
"self",
".",
"_update",
"(",
")"
] | https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python3/src/Lib/turtle.py#L3103-L3116 | ||
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/gtk/_core.py | python | Rect2D.SetLeftTop | (*args, **kwargs) | return _core_.Rect2D_SetLeftTop(*args, **kwargs) | SetLeftTop(self, Point2D pt) | SetLeftTop(self, Point2D pt) | [
"SetLeftTop",
"(",
"self",
"Point2D",
"pt",
")"
] | def SetLeftTop(*args, **kwargs):
"""SetLeftTop(self, Point2D pt)"""
return _core_.Rect2D_SetLeftTop(*args, **kwargs) | [
"def",
"SetLeftTop",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_core_",
".",
"Rect2D_SetLeftTop",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_core.py#L1907-L1909 | |
apple/turicreate | cce55aa5311300e3ce6af93cb45ba791fd1bdf49 | src/python/turicreate/data_structures/sframe.py | python | SFrame._read_csv_impl | (
cls,
url,
delimiter=",",
header=True,
error_bad_lines=False,
comment_char="",
escape_char="\\",
double_quote=True,
quote_char='"',
skip_initial_space=True,
column_type_hints=None,
na_values=["NA"],
line_terminator=... | return (cls(_proxy=proxy), {f: SArray(_proxy=es) for (f, es) in errors.items()}) | Constructs an SFrame from a CSV file or a path to multiple CSVs, and
returns a pair containing the SFrame and optionally
(if store_errors=True) a dict of filenames to SArrays
indicating for each file, what are the incorrectly parsed lines
encountered.
Parameters
--------... | Constructs an SFrame from a CSV file or a path to multiple CSVs, and
returns a pair containing the SFrame and optionally
(if store_errors=True) a dict of filenames to SArrays
indicating for each file, what are the incorrectly parsed lines
encountered. | [
"Constructs",
"an",
"SFrame",
"from",
"a",
"CSV",
"file",
"or",
"a",
"path",
"to",
"multiple",
"CSVs",
"and",
"returns",
"a",
"pair",
"containing",
"the",
"SFrame",
"and",
"optionally",
"(",
"if",
"store_errors",
"=",
"True",
")",
"a",
"dict",
"of",
"fil... | def _read_csv_impl(
cls,
url,
delimiter=",",
header=True,
error_bad_lines=False,
comment_char="",
escape_char="\\",
double_quote=True,
quote_char='"',
skip_initial_space=True,
column_type_hints=None,
na_values=["NA"],
... | [
"def",
"_read_csv_impl",
"(",
"cls",
",",
"url",
",",
"delimiter",
"=",
"\",\"",
",",
"header",
"=",
"True",
",",
"error_bad_lines",
"=",
"False",
",",
"comment_char",
"=",
"\"\"",
",",
"escape_char",
"=",
"\"\\\\\"",
",",
"double_quote",
"=",
"True",
",",... | https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/src/python/turicreate/data_structures/sframe.py#L891-L1118 | |
SFTtech/openage | d6a08c53c48dc1e157807471df92197f6ca9e04d | openage/convert/processor/conversion/swgbcc/tech_subprocessor.py | python | SWGBCCTechSubprocessor.get_patches | (cls, converter_group) | return patches | Returns the patches for a converter group, depending on the type
of its effects. | Returns the patches for a converter group, depending on the type
of its effects. | [
"Returns",
"the",
"patches",
"for",
"a",
"converter",
"group",
"depending",
"on",
"the",
"type",
"of",
"its",
"effects",
"."
] | def get_patches(cls, converter_group):
"""
Returns the patches for a converter group, depending on the type
of its effects.
"""
patches = []
dataset = converter_group.data
team_bonus = False
if isinstance(converter_group, CivTeamBonus):
effect... | [
"def",
"get_patches",
"(",
"cls",
",",
"converter_group",
")",
":",
"patches",
"=",
"[",
"]",
"dataset",
"=",
"converter_group",
".",
"data",
"team_bonus",
"=",
"False",
"if",
"isinstance",
"(",
"converter_group",
",",
"CivTeamBonus",
")",
":",
"effects",
"=... | https://github.com/SFTtech/openage/blob/d6a08c53c48dc1e157807471df92197f6ca9e04d/openage/convert/processor/conversion/swgbcc/tech_subprocessor.py#L104-L176 | |
openthread/openthread | 9fcdbed9c526c70f1556d1ed84099c1535c7cd32 | tools/harness-thci/OpenThread.py | python | OpenThreadTHCI.setBbrDataset | (self, SeqNumInc=False, SeqNum=None, MlrTimeout=None, ReRegDelay=None) | return self.__configBbrDataset(SeqNum=SeqNum, MlrTimeout=MlrTimeout, ReRegDelay=ReRegDelay) | set BBR Dataset
Args:
SeqNumInc: Increase `SeqNum` by 1 if True.
SeqNum: Set `SeqNum` to a given value if not None.
MlrTimeout: Set `MlrTimeout` to a given value.
ReRegDelay: Set `ReRegDelay` to a given value.
MUST NOT set SeqNumInc to True and ... | set BBR Dataset | [
"set",
"BBR",
"Dataset"
] | def setBbrDataset(self, SeqNumInc=False, SeqNum=None, MlrTimeout=None, ReRegDelay=None):
""" set BBR Dataset
Args:
SeqNumInc: Increase `SeqNum` by 1 if True.
SeqNum: Set `SeqNum` to a given value if not None.
MlrTimeout: Set `MlrTimeout` to a given value.
... | [
"def",
"setBbrDataset",
"(",
"self",
",",
"SeqNumInc",
"=",
"False",
",",
"SeqNum",
"=",
"None",
",",
"MlrTimeout",
"=",
"None",
",",
"ReRegDelay",
"=",
"None",
")",
":",
"assert",
"not",
"(",
"SeqNumInc",
"and",
"SeqNum",
"is",
"not",
"None",
")",
","... | https://github.com/openthread/openthread/blob/9fcdbed9c526c70f1556d1ed84099c1535c7cd32/tools/harness-thci/OpenThread.py#L3009-L3033 | |
luliyucoordinate/Leetcode | 96afcdc54807d1d184e881a075d1dbf3371e31fb | src/0187-Repeated-DNA-Sequences/0187.py | python | Solution.findRepeatedDnaSequences | (self, s) | return list(res) | :type s: str
:rtype: List[str] | :type s: str
:rtype: List[str] | [
":",
"type",
"s",
":",
"str",
":",
"rtype",
":",
"List",
"[",
"str",
"]"
] | def findRepeatedDnaSequences(self, s):
"""
:type s: str
:rtype: List[str]
"""
res, mem = set(), set()
for i in range(len(s)-9):
cur = s[i:i+10]
if cur in mem:
res.add(cur)
else:
mem.add(cur)
... | [
"def",
"findRepeatedDnaSequences",
"(",
"self",
",",
"s",
")",
":",
"res",
",",
"mem",
"=",
"set",
"(",
")",
",",
"set",
"(",
")",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"s",
")",
"-",
"9",
")",
":",
"cur",
"=",
"s",
"[",
"i",
":",
"i"... | https://github.com/luliyucoordinate/Leetcode/blob/96afcdc54807d1d184e881a075d1dbf3371e31fb/src/0187-Repeated-DNA-Sequences/0187.py#L2-L15 | |
asLody/whale | 6a661b27cc4cf83b7b5a3b02451597ee1ac7f264 | whale/cpplint.py | python | ParseArguments | (args) | return filenames | Parses the command line arguments.
This may set the output format and verbosity level as side-effects.
Args:
args: The command line arguments:
Returns:
The list of filenames to lint. | Parses the command line arguments. | [
"Parses",
"the",
"command",
"line",
"arguments",
"."
] | def ParseArguments(args):
"""Parses the command line arguments.
This may set the output format and verbosity level as side-effects.
Args:
args: The command line arguments:
Returns:
The list of filenames to lint.
"""
try:
(opts, filenames) = getopt.getopt(args, '', ['help', 'output=', 'verbose... | [
"def",
"ParseArguments",
"(",
"args",
")",
":",
"try",
":",
"(",
"opts",
",",
"filenames",
")",
"=",
"getopt",
".",
"getopt",
"(",
"args",
",",
"''",
",",
"[",
"'help'",
",",
"'output='",
",",
"'verbose='",
",",
"'counting='",
",",
"'filter='",
",",
... | https://github.com/asLody/whale/blob/6a661b27cc4cf83b7b5a3b02451597ee1ac7f264/whale/cpplint.py#L6146-L6221 | |
openvinotoolkit/openvino | dedcbeafa8b84cccdc55ca64b8da516682b381c7 | tools/mo/openvino/tools/mo/moc_frontend/extractor.py | python | decode_name_with_port | (input_model: InputModel, node_name: str, framework="") | return found_nodes[0] | Decode name with optional port specification w/o traversing all the nodes in the graph
TODO: in future node_name can specify input/output port groups as well as indices (58562)
:param input_model: Input Model
:param node_name: user provided node name
:return: decoded place in the graph | Decode name with optional port specification w/o traversing all the nodes in the graph
TODO: in future node_name can specify input/output port groups as well as indices (58562)
:param input_model: Input Model
:param node_name: user provided node name
:return: decoded place in the graph | [
"Decode",
"name",
"with",
"optional",
"port",
"specification",
"w",
"/",
"o",
"traversing",
"all",
"the",
"nodes",
"in",
"the",
"graph",
"TODO",
":",
"in",
"future",
"node_name",
"can",
"specify",
"input",
"/",
"output",
"port",
"groups",
"as",
"well",
"as... | def decode_name_with_port(input_model: InputModel, node_name: str, framework=""):
"""
Decode name with optional port specification w/o traversing all the nodes in the graph
TODO: in future node_name can specify input/output port groups as well as indices (58562)
:param input_model: Input Model
:para... | [
"def",
"decode_name_with_port",
"(",
"input_model",
":",
"InputModel",
",",
"node_name",
":",
"str",
",",
"framework",
"=",
"\"\"",
")",
":",
"found_nodes",
"=",
"[",
"]",
"found_node_names",
"=",
"[",
"]",
"node",
"=",
"input_model",
".",
"get_place_by_tensor... | https://github.com/openvinotoolkit/openvino/blob/dedcbeafa8b84cccdc55ca64b8da516682b381c7/tools/mo/openvino/tools/mo/moc_frontend/extractor.py#L14-L71 | |
pytorch/pytorch | 7176c92687d3cc847cc046bf002269c6949a21c2 | caffe2/python/muji.py | python | Allreduce4 | (net, blobs, reduced_affix, gpu_indices) | return a_reduced, b_reduced, c_reduced, d_reduced | Allreduce for 4 gpus.
Algorithm: 2 level reduction.
0r <- 0 + 1, 2r <- 2 + 3
0r <- 0r + 2r
2r <- 0r,
1r <- 0r, 3r <- 2r | Allreduce for 4 gpus. | [
"Allreduce",
"for",
"4",
"gpus",
"."
] | def Allreduce4(net, blobs, reduced_affix, gpu_indices):
"""Allreduce for 4 gpus.
Algorithm: 2 level reduction.
0r <- 0 + 1, 2r <- 2 + 3
0r <- 0r + 2r
2r <- 0r,
1r <- 0r, 3r <- 2r
"""
a, b, c, d = blobs
gpu_a, gpu_b, gpu_c, gpu_d = gpu_indices
# a_reduced <- a+b, c_reduced <-... | [
"def",
"Allreduce4",
"(",
"net",
",",
"blobs",
",",
"reduced_affix",
",",
"gpu_indices",
")",
":",
"a",
",",
"b",
",",
"c",
",",
"d",
"=",
"blobs",
"gpu_a",
",",
"gpu_b",
",",
"gpu_c",
",",
"gpu_d",
"=",
"gpu_indices",
"# a_reduced <- a+b, c_reduced <- c +... | https://github.com/pytorch/pytorch/blob/7176c92687d3cc847cc046bf002269c6949a21c2/caffe2/python/muji.py#L80-L117 | |
mantidproject/mantid | 03deeb89254ec4289edb8771e0188c2090a02f32 | qt/python/mantidqt/mantidqt/widgets/sliceviewer/lineplots.py | python | LinePlots.update_line_plot_limits | (self) | Update line plot limits based on the data in them | Update line plot limits based on the data in them | [
"Update",
"line",
"plot",
"limits",
"based",
"on",
"the",
"data",
"in",
"them"
] | def update_line_plot_limits(self):
"""
Update line plot limits based on the data in them
"""
# ensure plot labels are in sync with main axes
self._axx.relim()
self._axx.autoscale(axis='y')
self._axy.relim()
self._axy.autoscale(axis='x') | [
"def",
"update_line_plot_limits",
"(",
"self",
")",
":",
"# ensure plot labels are in sync with main axes",
"self",
".",
"_axx",
".",
"relim",
"(",
")",
"self",
".",
"_axx",
".",
"autoscale",
"(",
"axis",
"=",
"'y'",
")",
"self",
".",
"_axy",
".",
"relim",
"... | https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqt/mantidqt/widgets/sliceviewer/lineplots.py#L124-L132 | ||
SoarGroup/Soar | a1c5e249499137a27da60533c72969eef3b8ab6b | scons/scons-local-4.1.0/SCons/Tool/tex.py | python | TeXLaTeXFunction | (target = None, source= None, env=None) | return result | A builder for TeX and LaTeX that scans the source file to
decide the "flavor" of the source and then executes the appropriate
program. | A builder for TeX and LaTeX that scans the source file to
decide the "flavor" of the source and then executes the appropriate
program. | [
"A",
"builder",
"for",
"TeX",
"and",
"LaTeX",
"that",
"scans",
"the",
"source",
"file",
"to",
"decide",
"the",
"flavor",
"of",
"the",
"source",
"and",
"then",
"executes",
"the",
"appropriate",
"program",
"."
] | def TeXLaTeXFunction(target = None, source= None, env=None):
"""A builder for TeX and LaTeX that scans the source file to
decide the "flavor" of the source and then executes the appropriate
program."""
# find these paths for use in is_LaTeX to search for included files
basedir = os.path.split(str(s... | [
"def",
"TeXLaTeXFunction",
"(",
"target",
"=",
"None",
",",
"source",
"=",
"None",
",",
"env",
"=",
"None",
")",
":",
"# find these paths for use in is_LaTeX to search for included files",
"basedir",
"=",
"os",
".",
"path",
".",
"split",
"(",
"str",
"(",
"source... | https://github.com/SoarGroup/Soar/blob/a1c5e249499137a27da60533c72969eef3b8ab6b/scons/scons-local-4.1.0/SCons/Tool/tex.py#L571-L588 | |
gnuradio/gnuradio | 09c3c4fa4bfb1a02caac74cb5334dfe065391e3b | gr-filter/python/filter/optfir.py | python | band_pass | (gain, Fs, freq_sb1, freq_pb1, freq_pb2, freq_sb2,
passband_ripple_db, stopband_atten_db,
nextra_taps=2) | return taps | Builds a band pass filter.
Args:
gain: Filter gain in the passband (linear)
Fs: Sampling rate (sps)
freq_sb1: End of stop band (in Hz)
freq_pb1: Start of pass band (in Hz)
freq_pb2: End of pass band (in Hz)
freq_sb2: Start of stop band (in Hz)
passband_ripple... | Builds a band pass filter. | [
"Builds",
"a",
"band",
"pass",
"filter",
"."
] | def band_pass(gain, Fs, freq_sb1, freq_pb1, freq_pb2, freq_sb2,
passband_ripple_db, stopband_atten_db,
nextra_taps=2):
"""
Builds a band pass filter.
Args:
gain: Filter gain in the passband (linear)
Fs: Sampling rate (sps)
freq_sb1: End of stop band (in H... | [
"def",
"band_pass",
"(",
"gain",
",",
"Fs",
",",
"freq_sb1",
",",
"freq_pb1",
",",
"freq_pb2",
",",
"freq_sb2",
",",
"passband_ripple_db",
",",
"stopband_atten_db",
",",
"nextra_taps",
"=",
"2",
")",
":",
"passband_dev",
"=",
"passband_ripple_to_dev",
"(",
"pa... | https://github.com/gnuradio/gnuradio/blob/09c3c4fa4bfb1a02caac74cb5334dfe065391e3b/gr-filter/python/filter/optfir.py#L50-L76 | |
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/tseries/holiday.py | python | Holiday._apply_rule | (self, dates) | return dates | Apply the given offset/observance to a DatetimeIndex of dates.
Parameters
----------
dates : DatetimeIndex
Dates to apply the given offset/observance rule
Returns
-------
Dates with rules applied | Apply the given offset/observance to a DatetimeIndex of dates. | [
"Apply",
"the",
"given",
"offset",
"/",
"observance",
"to",
"a",
"DatetimeIndex",
"of",
"dates",
"."
] | def _apply_rule(self, dates):
"""
Apply the given offset/observance to a DatetimeIndex of dates.
Parameters
----------
dates : DatetimeIndex
Dates to apply the given offset/observance rule
Returns
-------
Dates with rules applied
"""
... | [
"def",
"_apply_rule",
"(",
"self",
",",
"dates",
")",
":",
"if",
"self",
".",
"observance",
"is",
"not",
"None",
":",
"return",
"dates",
".",
"map",
"(",
"lambda",
"d",
":",
"self",
".",
"observance",
"(",
"d",
")",
")",
"if",
"self",
".",
"offset"... | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/tseries/holiday.py#L281-L309 | |
bumptop/BumpTop | 466d23597a07ae738f4265262fa01087fc6e257c | trunk/mac/Build/cpplint.py | python | _Filters | () | return _cpplint_state.filters | Returns the module's list of output filters, as a list. | Returns the module's list of output filters, as a list. | [
"Returns",
"the",
"module",
"s",
"list",
"of",
"output",
"filters",
"as",
"a",
"list",
"."
] | def _Filters():
"""Returns the module's list of output filters, as a list."""
return _cpplint_state.filters | [
"def",
"_Filters",
"(",
")",
":",
"return",
"_cpplint_state",
".",
"filters"
] | https://github.com/bumptop/BumpTop/blob/466d23597a07ae738f4265262fa01087fc6e257c/trunk/mac/Build/cpplint.py#L435-L437 | |
NVIDIA/TensorRT | 42805f078052daad1a98bc5965974fcffaad0960 | samples/python/yolov3_onnx/yolov3_to_onnx.py | python | WeightLoader._create_param_tensors | (self, conv_params, param_category, suffix) | return initializer_tensor, input_tensor | Creates the initializers with weights from the weights file together with
the input tensors.
Keyword arguments:
conv_params -- a ConvParams object
param_category -- the category of parameters to be created ('bn' or 'conv')
suffix -- a string determining the sub-type of above par... | Creates the initializers with weights from the weights file together with
the input tensors. | [
"Creates",
"the",
"initializers",
"with",
"weights",
"from",
"the",
"weights",
"file",
"together",
"with",
"the",
"input",
"tensors",
"."
] | def _create_param_tensors(self, conv_params, param_category, suffix):
"""Creates the initializers with weights from the weights file together with
the input tensors.
Keyword arguments:
conv_params -- a ConvParams object
param_category -- the category of parameters to be created ... | [
"def",
"_create_param_tensors",
"(",
"self",
",",
"conv_params",
",",
"param_category",
",",
"suffix",
")",
":",
"param_name",
",",
"param_data",
",",
"param_data_shape",
"=",
"self",
".",
"_load_one_param_type",
"(",
"conv_params",
",",
"param_category",
",",
"su... | https://github.com/NVIDIA/TensorRT/blob/42805f078052daad1a98bc5965974fcffaad0960/samples/python/yolov3_onnx/yolov3_to_onnx.py#L316-L333 | |
krishauser/Klampt | 972cc83ea5befac3f653c1ba20f80155768ad519 | Python/klampt/vis/visualization.py | python | VisualizationScene.getItem | (self,item_name) | Returns an VisAppearance according to the given name or path | Returns an VisAppearance according to the given name or path | [
"Returns",
"an",
"VisAppearance",
"according",
"to",
"the",
"given",
"name",
"or",
"path"
] | def getItem(self,item_name):
"""Returns an VisAppearance according to the given name or path"""
if isinstance(item_name,(list,tuple)):
components = item_name
if len(components)==1:
return self.getItem(components[0])
if components[0] not in self.items:... | [
"def",
"getItem",
"(",
"self",
",",
"item_name",
")",
":",
"if",
"isinstance",
"(",
"item_name",
",",
"(",
"list",
",",
"tuple",
")",
")",
":",
"components",
"=",
"item_name",
"if",
"len",
"(",
"components",
")",
"==",
"1",
":",
"return",
"self",
"."... | https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/klampt/vis/visualization.py#L3413-L3423 | ||
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/gtk/html.py | python | HtmlWindow.SetRelatedStatusBar | (*args) | return _html.HtmlWindow_SetRelatedStatusBar(*args) | SetRelatedStatusBar(self, int bar)
SetRelatedStatusBar(self, StatusBar ?, int index=0) | SetRelatedStatusBar(self, int bar)
SetRelatedStatusBar(self, StatusBar ?, int index=0) | [
"SetRelatedStatusBar",
"(",
"self",
"int",
"bar",
")",
"SetRelatedStatusBar",
"(",
"self",
"StatusBar",
"?",
"int",
"index",
"=",
"0",
")"
] | def SetRelatedStatusBar(*args):
"""
SetRelatedStatusBar(self, int bar)
SetRelatedStatusBar(self, StatusBar ?, int index=0)
"""
return _html.HtmlWindow_SetRelatedStatusBar(*args) | [
"def",
"SetRelatedStatusBar",
"(",
"*",
"args",
")",
":",
"return",
"_html",
".",
"HtmlWindow_SetRelatedStatusBar",
"(",
"*",
"args",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/html.py#L1022-L1027 | |
natanielruiz/android-yolo | 1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f | jni-build/jni/include/tensorflow/python/framework/ops.py | python | _eval_using_default_session | (tensors, feed_dict, graph, session=None) | return session.run(tensors, feed_dict) | Uses the default session to evaluate one or more tensors.
Args:
tensors: A single Tensor, or a list of Tensor objects.
feed_dict: A dictionary that maps Tensor objects (or tensor names) to lists,
numpy ndarrays, TensorProtos, or strings.
graph: The graph in which the tensors are defined.
sessio... | Uses the default session to evaluate one or more tensors. | [
"Uses",
"the",
"default",
"session",
"to",
"evaluate",
"one",
"or",
"more",
"tensors",
"."
] | def _eval_using_default_session(tensors, feed_dict, graph, session=None):
"""Uses the default session to evaluate one or more tensors.
Args:
tensors: A single Tensor, or a list of Tensor objects.
feed_dict: A dictionary that maps Tensor objects (or tensor names) to lists,
numpy ndarrays, TensorProtos... | [
"def",
"_eval_using_default_session",
"(",
"tensors",
",",
"feed_dict",
",",
"graph",
",",
"session",
"=",
"None",
")",
":",
"if",
"session",
"is",
"None",
":",
"session",
"=",
"get_default_session",
"(",
")",
"if",
"session",
"is",
"None",
":",
"raise",
"... | https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/python/framework/ops.py#L3619-L3656 | |
apple/turicreate | cce55aa5311300e3ce6af93cb45ba791fd1bdf49 | deps/src/libxml2-2.9.1/python/libxml2class.py | python | xmlNode.lastChild | (self) | return __tmp | Search the last child of a node. | Search the last child of a node. | [
"Search",
"the",
"last",
"child",
"of",
"a",
"node",
"."
] | def lastChild(self):
"""Search the last child of a node. """
ret = libxml2mod.xmlGetLastChild(self._o)
if ret is None:raise treeError('xmlGetLastChild() failed')
__tmp = xmlNode(_obj=ret)
return __tmp | [
"def",
"lastChild",
"(",
"self",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlGetLastChild",
"(",
"self",
".",
"_o",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlGetLastChild() failed'",
")",
"__tmp",
"=",
"xmlNode",
"(",
"_obj",
... | https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/deps/src/libxml2-2.9.1/python/libxml2class.py#L2516-L2521 | |
trilinos/Trilinos | 6168be6dd51e35e1cd681e9c4b24433e709df140 | packages/seacas/scripts/exomerge3.py | python | ExodusModel.get_side_set_area | (self, side_set_ids) | return total_area | Return the total area of the given side sets.
Example:
>>> model.get_side_set_area('all') | Return the total area of the given side sets. | [
"Return",
"the",
"total",
"area",
"of",
"the",
"given",
"side",
"sets",
"."
] | def get_side_set_area(self, side_set_ids):
"""
Return the total area of the given side sets.
Example:
>>> model.get_side_set_area('all')
"""
side_set_ids = self._format_side_set_id_list(side_set_ids)
# we do this by first creating one or more new element block o... | [
"def",
"get_side_set_area",
"(",
"self",
",",
"side_set_ids",
")",
":",
"side_set_ids",
"=",
"self",
".",
"_format_side_set_id_list",
"(",
"side_set_ids",
")",
"# we do this by first creating one or more new element block out of",
"# the faces within the side sets and then calculat... | https://github.com/trilinos/Trilinos/blob/6168be6dd51e35e1cd681e9c4b24433e709df140/packages/seacas/scripts/exomerge3.py#L7958-L7974 | |
gimli-org/gimli | 17aa2160de9b15ababd9ef99e89b1bc3277bbb23 | pygimli/frameworks/methodManager.py | python | MethodManager.postRun | (self, *args, **kwargs) | Called just after the inversion run. | Called just after the inversion run. | [
"Called",
"just",
"after",
"the",
"inversion",
"run",
"."
] | def postRun(self, *args, **kwargs):
"""Called just after the inversion run."""
pass | [
"def",
"postRun",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"pass"
] | https://github.com/gimli-org/gimli/blob/17aa2160de9b15ababd9ef99e89b1bc3277bbb23/pygimli/frameworks/methodManager.py#L371-L373 | ||
Tencent/CMONGO | c40380caa14e05509f46993aa8b8da966b09b0b5 | src/third_party/scons-2.5.0/scons-local-2.5.0/SCons/Tool/packaging/rpm.py | python | build_specfile_header | (spec) | return str | Builds all sections but the %file of a rpm specfile | Builds all sections but the %file of a rpm specfile | [
"Builds",
"all",
"sections",
"but",
"the",
"%file",
"of",
"a",
"rpm",
"specfile"
] | def build_specfile_header(spec):
""" Builds all sections but the %file of a rpm specfile
"""
str = ""
# first the mandatory sections
mandatory_header_fields = {
'NAME' : '%%define name %s\nName: %%{name}\n',
'VERSION' : '%%define version %s\nVersion: %%{version}\n',... | [
"def",
"build_specfile_header",
"(",
"spec",
")",
":",
"str",
"=",
"\"\"",
"# first the mandatory sections",
"mandatory_header_fields",
"=",
"{",
"'NAME'",
":",
"'%%define name %s\\nName: %%{name}\\n'",
",",
"'VERSION'",
":",
"'%%define version %s\\nVersion: %%{version}\\n'",
... | https://github.com/Tencent/CMONGO/blob/c40380caa14e05509f46993aa8b8da966b09b0b5/src/third_party/scons-2.5.0/scons-local-2.5.0/SCons/Tool/packaging/rpm.py#L190-L244 | |
miyosuda/TensorFlowAndroidDemo | 35903e0221aa5f109ea2dbef27f20b52e317f42d | jni-build/jni/include/tensorflow/python/framework/common_shapes.py | python | conv2d_shape | (op) | return [tensor_shape.TensorShape(output_shape)] | Shape function for a Conv2D op.
This op has two inputs:
* input, a 4D tensor with shape = [batch_size, rows, cols, depth_in]
* filter, a 4D tensor with shape = [filter_rows, filter_cols,
depth_in, depth_out]
The output is a 4D tensor with shape = [batch_size, out_rows,
out_cols, depth_out], where out_... | Shape function for a Conv2D op. | [
"Shape",
"function",
"for",
"a",
"Conv2D",
"op",
"."
] | def conv2d_shape(op):
"""Shape function for a Conv2D op.
This op has two inputs:
* input, a 4D tensor with shape = [batch_size, rows, cols, depth_in]
* filter, a 4D tensor with shape = [filter_rows, filter_cols,
depth_in, depth_out]
The output is a 4D tensor with shape = [batch_size, out_rows,
out_c... | [
"def",
"conv2d_shape",
"(",
"op",
")",
":",
"input_shape",
"=",
"op",
".",
"inputs",
"[",
"0",
"]",
".",
"get_shape",
"(",
")",
".",
"with_rank",
"(",
"4",
")",
"filter_shape",
"=",
"op",
".",
"inputs",
"[",
"1",
"]",
".",
"get_shape",
"(",
")",
... | https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/python/framework/common_shapes.py#L187-L253 | |
apache/incubator-mxnet | f03fb23f1d103fec9541b5ae59ee06b1734a51d9 | python/mxnet/ndarray/numpy/linalg.py | python | cholesky | (a, upper=False) | return _api_internal.cholesky(a, not upper) | r"""
Cholesky decomposition.
Notes
-----
`upper` param is requested by API standardization in
https://data-apis.org/array-api/latest/extensions/generated/signatures.linalg.cholesky.html
instead of parameter in official NumPy operator.
Return the Cholesky decomposition, `L * L.T`, of the sq... | r"""
Cholesky decomposition. | [
"r",
"Cholesky",
"decomposition",
"."
] | def cholesky(a, upper=False):
r"""
Cholesky decomposition.
Notes
-----
`upper` param is requested by API standardization in
https://data-apis.org/array-api/latest/extensions/generated/signatures.linalg.cholesky.html
instead of parameter in official NumPy operator.
Return the Cholesky d... | [
"def",
"cholesky",
"(",
"a",
",",
"upper",
"=",
"False",
")",
":",
"return",
"_api_internal",
".",
"cholesky",
"(",
"a",
",",
"not",
"upper",
")"
] | https://github.com/apache/incubator-mxnet/blob/f03fb23f1d103fec9541b5ae59ee06b1734a51d9/python/mxnet/ndarray/numpy/linalg.py#L453-L519 | |
numworks/epsilon | 8952d2f8b1de1c3f064eec8ffcea804c5594ba4c | build/device/usb/core.py | python | Device.write | (self, endpoint, data, timeout = None) | return fn(
self._ctx.handle,
ep.bEndpointAddress,
intf.bInterfaceNumber,
_interop.as_array(data),
self.__get_timeout(timeout)
) | r"""Write data to the endpoint.
This method is used to send data to the device. The endpoint parameter
corresponds to the bEndpointAddress member whose endpoint you want to
communicate with.
The data parameter should be a sequence like type convertible to
the array type (see ar... | r"""Write data to the endpoint. | [
"r",
"Write",
"data",
"to",
"the",
"endpoint",
"."
] | def write(self, endpoint, data, timeout = None):
r"""Write data to the endpoint.
This method is used to send data to the device. The endpoint parameter
corresponds to the bEndpointAddress member whose endpoint you want to
communicate with.
The data parameter should be a sequenc... | [
"def",
"write",
"(",
"self",
",",
"endpoint",
",",
"data",
",",
"timeout",
"=",
"None",
")",
":",
"backend",
"=",
"self",
".",
"_ctx",
".",
"backend",
"fn_map",
"=",
"{",
"util",
".",
"ENDPOINT_TYPE_BULK",
":",
"backend",
".",
"bulk_write",
",",
"util"... | https://github.com/numworks/epsilon/blob/8952d2f8b1de1c3f064eec8ffcea804c5594ba4c/build/device/usb/core.py#L954-L985 | |
wlanjie/AndroidFFmpeg | 7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf | tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/lib2to3/btm_utils.py | python | MinNode.leaf_to_root | (self) | return subp | Internal method. Returns a characteristic path of the
pattern tree. This method must be run for all leaves until the
linear subpatterns are merged into a single | Internal method. Returns a characteristic path of the
pattern tree. This method must be run for all leaves until the
linear subpatterns are merged into a single | [
"Internal",
"method",
".",
"Returns",
"a",
"characteristic",
"path",
"of",
"the",
"pattern",
"tree",
".",
"This",
"method",
"must",
"be",
"run",
"for",
"all",
"leaves",
"until",
"the",
"linear",
"subpatterns",
"are",
"merged",
"into",
"a",
"single"
] | def leaf_to_root(self):
"""Internal method. Returns a characteristic path of the
pattern tree. This method must be run for all leaves until the
linear subpatterns are merged into a single"""
node = self
subp = []
while node:
if node.type == TYPE_ALTERNATIVES:
... | [
"def",
"leaf_to_root",
"(",
"self",
")",
":",
"node",
"=",
"self",
"subp",
"=",
"[",
"]",
"while",
"node",
":",
"if",
"node",
".",
"type",
"==",
"TYPE_ALTERNATIVES",
":",
"node",
".",
"alternatives",
".",
"append",
"(",
"subp",
")",
"if",
"len",
"(",... | https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/lib2to3/btm_utils.py#L33-L73 | |
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/http/server.py | python | BaseHTTPRequestHandler.end_headers | (self) | Send the blank line ending the MIME headers. | Send the blank line ending the MIME headers. | [
"Send",
"the",
"blank",
"line",
"ending",
"the",
"MIME",
"headers",
"."
] | def end_headers(self):
"""Send the blank line ending the MIME headers."""
if self.request_version != 'HTTP/0.9':
self._headers_buffer.append(b"\r\n")
self.flush_headers() | [
"def",
"end_headers",
"(",
"self",
")",
":",
"if",
"self",
".",
"request_version",
"!=",
"'HTTP/0.9'",
":",
"self",
".",
"_headers_buffer",
".",
"append",
"(",
"b\"\\r\\n\"",
")",
"self",
".",
"flush_headers",
"(",
")"
] | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/http/server.py#L524-L528 | ||
miyosuda/TensorFlowAndroidDemo | 35903e0221aa5f109ea2dbef27f20b52e317f42d | jni-build/jni/include/tensorflow/contrib/learn/python/learn/dataframe/transform.py | python | Transform.build_transitive | (self, input_series, cache=None, **kwargs) | return result | Apply this `Transform` to the provided `Series`, producing 'Tensor's.
Args:
input_series: None, a `Series`, or a list of input `Series`, acting as
positional arguments.
cache: a dict from Series reprs to Tensors.
**kwargs: Additional keyword arguments, unused here.
Returns:
A ... | Apply this `Transform` to the provided `Series`, producing 'Tensor's. | [
"Apply",
"this",
"Transform",
"to",
"the",
"provided",
"Series",
"producing",
"Tensor",
"s",
"."
] | def build_transitive(self, input_series, cache=None, **kwargs):
"""Apply this `Transform` to the provided `Series`, producing 'Tensor's.
Args:
input_series: None, a `Series`, or a list of input `Series`, acting as
positional arguments.
cache: a dict from Series reprs to Tensors.
**kw... | [
"def",
"build_transitive",
"(",
"self",
",",
"input_series",
",",
"cache",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"# pylint: disable=not-callable",
"if",
"cache",
"is",
"None",
":",
"cache",
"=",
"{",
"}",
"if",
"len",
"(",
"input_series",
")",
... | https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/contrib/learn/python/learn/dataframe/transform.py#L226-L265 | |
adobe/chromium | cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7 | gpu/command_buffer/build_gles2_cmd_buffer.py | python | CWriter.__FindSplit | (self, string) | Finds a place to split a string. | Finds a place to split a string. | [
"Finds",
"a",
"place",
"to",
"split",
"a",
"string",
"."
] | def __FindSplit(self, string):
"""Finds a place to split a string."""
splitter = string.find('=')
if splitter >= 1 and not string[splitter + 1] == '=' and splitter < 80:
return splitter
# parts = string.split('(')
parts = re.split("(?<=[^\"])\((?!\")", string)
fptr = re.compile('\*\w*\)')
... | [
"def",
"__FindSplit",
"(",
"self",
",",
"string",
")",
":",
"splitter",
"=",
"string",
".",
"find",
"(",
"'='",
")",
"if",
"splitter",
">=",
"1",
"and",
"not",
"string",
"[",
"splitter",
"+",
"1",
"]",
"==",
"'='",
"and",
"splitter",
"<",
"80",
":"... | https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/gpu/command_buffer/build_gles2_cmd_buffer.py#L1744-L1773 | ||
hanpfei/chromium-net | 392cc1fa3a8f92f42e4071ab6e674d8e0482f83f | third_party/catapult/telemetry/telemetry/internal/backends/chrome_inspector/inspector_backend_list.py | python | InspectorBackendList.ShouldIncludeContext | (self, _) | return True | Override this method to control which contexts are included. | Override this method to control which contexts are included. | [
"Override",
"this",
"method",
"to",
"control",
"which",
"contexts",
"are",
"included",
"."
] | def ShouldIncludeContext(self, _):
"""Override this method to control which contexts are included."""
return True | [
"def",
"ShouldIncludeContext",
"(",
"self",
",",
"_",
")",
":",
"return",
"True"
] | https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/telemetry/telemetry/internal/backends/chrome_inspector/inspector_backend_list.py#L41-L43 | |
google/mozc | 7329757e1ad30e327c1ae823a8302c79482d6b9c | src/unix/ibus/gen_mozc_xml.py | python | OutputXml | (component, ibus_mozc_path) | Outputs a XML data for ibus-daemon.
Args:
component: A dictionary from a property name to a property value of the
ibus-mozc component. For example, {'name': 'com.google.IBus.Mozc'}.
ibus_mozc_path: A path to ibus-engine-mozc. | Outputs a XML data for ibus-daemon. | [
"Outputs",
"a",
"XML",
"data",
"for",
"ibus",
"-",
"daemon",
"."
] | def OutputXml(component, ibus_mozc_path):
"""Outputs a XML data for ibus-daemon.
Args:
component: A dictionary from a property name to a property value of the
ibus-mozc component. For example, {'name': 'com.google.IBus.Mozc'}.
ibus_mozc_path: A path to ibus-engine-mozc.
"""
print('<component>')... | [
"def",
"OutputXml",
"(",
"component",
",",
"ibus_mozc_path",
")",
":",
"print",
"(",
"'<component>'",
")",
"for",
"key",
",",
"value",
"in",
"component",
".",
"items",
"(",
")",
":",
"print",
"(",
"GetXmlElement",
"(",
"key",
",",
"value",
")",
")",
"p... | https://github.com/google/mozc/blob/7329757e1ad30e327c1ae823a8302c79482d6b9c/src/unix/ibus/gen_mozc_xml.py#L119-L140 | ||
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/six.py | python | _import_module | (name) | return sys.modules[name] | Import module, returning the module after the last dot. | Import module, returning the module after the last dot. | [
"Import",
"module",
"returning",
"the",
"module",
"after",
"the",
"last",
"dot",
"."
] | def _import_module(name):
"""Import module, returning the module after the last dot."""
__import__(name)
return sys.modules[name] | [
"def",
"_import_module",
"(",
"name",
")",
":",
"__import__",
"(",
"name",
")",
"return",
"sys",
".",
"modules",
"[",
"name",
"]"
] | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/six.py#L79-L82 | |
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/xmlrpc/server.py | python | SimpleXMLRPCDispatcher._dispatch | (self, method, params) | Dispatches the XML-RPC method.
XML-RPC calls are forwarded to a registered function that
matches the called XML-RPC method name. If no such function
exists then the call is forwarded to the registered instance,
if available.
If the registered instance has a _dispatch method the... | Dispatches the XML-RPC method. | [
"Dispatches",
"the",
"XML",
"-",
"RPC",
"method",
"."
] | def _dispatch(self, method, params):
"""Dispatches the XML-RPC method.
XML-RPC calls are forwarded to a registered function that
matches the called XML-RPC method name. If no such function
exists then the call is forwarded to the registered instance,
if available.
If th... | [
"def",
"_dispatch",
"(",
"self",
",",
"method",
",",
"params",
")",
":",
"try",
":",
"# call the matching registered function",
"func",
"=",
"self",
".",
"funcs",
"[",
"method",
"]",
"except",
"KeyError",
":",
"pass",
"else",
":",
"if",
"func",
"is",
"not"... | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/xmlrpc/server.py#L383-L432 | ||
swift/swift | 12d031cf8177fdec0137f9aa7e2912fa23c4416b | 3rdParty/SCons/scons-3.0.1/engine/SCons/Tool/docbook/__init__.py | python | __xinclude_lxml | (target, source, env) | return None | Resolving XIncludes, using the lxml module. | Resolving XIncludes, using the lxml module. | [
"Resolving",
"XIncludes",
"using",
"the",
"lxml",
"module",
"."
] | def __xinclude_lxml(target, source, env):
"""
Resolving XIncludes, using the lxml module.
"""
from lxml import etree
doc = etree.parse(str(source[0]))
doc.xinclude()
try:
doc.write(str(target[0]), xml_declaration=True,
encoding="UTF-8", pretty_print=True)
... | [
"def",
"__xinclude_lxml",
"(",
"target",
",",
"source",
",",
"env",
")",
":",
"from",
"lxml",
"import",
"etree",
"doc",
"=",
"etree",
".",
"parse",
"(",
"str",
"(",
"source",
"[",
"0",
"]",
")",
")",
"doc",
".",
"xinclude",
"(",
")",
"try",
":",
... | https://github.com/swift/swift/blob/12d031cf8177fdec0137f9aa7e2912fa23c4416b/3rdParty/SCons/scons-3.0.1/engine/SCons/Tool/docbook/__init__.py#L372-L386 | |
aws/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | dev/Tools/Python/3.7.10/windows/Lib/tkinter/__init__.py | python | Menu.add_separator | (self, cnf={}, **kw) | Add separator. | Add separator. | [
"Add",
"separator",
"."
] | def add_separator(self, cnf={}, **kw):
"""Add separator."""
self.add('separator', cnf or kw) | [
"def",
"add_separator",
"(",
"self",
",",
"cnf",
"=",
"{",
"}",
",",
"*",
"*",
"kw",
")",
":",
"self",
".",
"add",
"(",
"'separator'",
",",
"cnf",
"or",
"kw",
")"
] | https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/tkinter/__init__.py#L2891-L2893 | ||
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/osx_carbon/aui.py | python | AuiManager.RestoreMaximizedPane | (*args, **kwargs) | return _aui.AuiManager_RestoreMaximizedPane(*args, **kwargs) | RestoreMaximizedPane(self) | RestoreMaximizedPane(self) | [
"RestoreMaximizedPane",
"(",
"self",
")"
] | def RestoreMaximizedPane(*args, **kwargs):
"""RestoreMaximizedPane(self)"""
return _aui.AuiManager_RestoreMaximizedPane(*args, **kwargs) | [
"def",
"RestoreMaximizedPane",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_aui",
".",
"AuiManager_RestoreMaximizedPane",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/aui.py#L699-L701 | |
h0x91b/redis-v8 | ac8b9d49701d75bcee3719892a2a6a50b437e47a | redis/deps/v8/tools/grokdump.py | python | InspectionShell.do_k | (self, arguments) | Teach V8 heap layout information to the inspector. This increases
the amount of annotations the inspector can produce while dumping
data. The first page of each heap space is of particular interest
because it contains known objects that do not move. | Teach V8 heap layout information to the inspector. This increases
the amount of annotations the inspector can produce while dumping
data. The first page of each heap space is of particular interest
because it contains known objects that do not move. | [
"Teach",
"V8",
"heap",
"layout",
"information",
"to",
"the",
"inspector",
".",
"This",
"increases",
"the",
"amount",
"of",
"annotations",
"the",
"inspector",
"can",
"produce",
"while",
"dumping",
"data",
".",
"The",
"first",
"page",
"of",
"each",
"heap",
"sp... | def do_k(self, arguments):
"""
Teach V8 heap layout information to the inspector. This increases
the amount of annotations the inspector can produce while dumping
data. The first page of each heap space is of particular interest
because it contains known objects that do not move.
"""
sel... | [
"def",
"do_k",
"(",
"self",
",",
"arguments",
")",
":",
"self",
".",
"padawan",
".",
"PrintKnowledge",
"(",
")"
] | https://github.com/h0x91b/redis-v8/blob/ac8b9d49701d75bcee3719892a2a6a50b437e47a/redis/deps/v8/tools/grokdump.py#L1744-L1751 | ||
XiaoMi/mace | 8c75d39fdacd6328d2a03a30f999bf104fd30546 | tools/python/transform/transformer.py | python | Transformer.transform_global_conv_to_fc | (self) | return False | Transform global conv to fc should be placed after transposing
input/output and filter | Transform global conv to fc should be placed after transposing
input/output and filter | [
"Transform",
"global",
"conv",
"to",
"fc",
"should",
"be",
"placed",
"after",
"transposing",
"input",
"/",
"output",
"and",
"filter"
] | def transform_global_conv_to_fc(self):
"""Transform global conv to fc should be placed after transposing
input/output and filter"""
net = self._model
for op in net.op:
if op.type == MaceOp.Conv2D.name \
and len(op.input) >= 2 \
and op.... | [
"def",
"transform_global_conv_to_fc",
"(",
"self",
")",
":",
"net",
"=",
"self",
".",
"_model",
"for",
"op",
"in",
"net",
".",
"op",
":",
"if",
"op",
".",
"type",
"==",
"MaceOp",
".",
"Conv2D",
".",
"name",
"and",
"len",
"(",
"op",
".",
"input",
")... | https://github.com/XiaoMi/mace/blob/8c75d39fdacd6328d2a03a30f999bf104fd30546/tools/python/transform/transformer.py#L1120-L1158 | |
wxWidgets/wxPython-Classic | 19571e1ae65f1ac445f5491474121998c97a1bf0 | src/osx_carbon/_gdi.py | python | Font.GetStyleString | (*args, **kwargs) | return _gdi_.Font_GetStyleString(*args, **kwargs) | GetStyleString(self) -> String
Returns a string representation of the font style. | GetStyleString(self) -> String | [
"GetStyleString",
"(",
"self",
")",
"-",
">",
"String"
] | def GetStyleString(*args, **kwargs):
"""
GetStyleString(self) -> String
Returns a string representation of the font style.
"""
return _gdi_.Font_GetStyleString(*args, **kwargs) | [
"def",
"GetStyleString",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"_gdi_",
".",
"Font_GetStyleString",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_gdi.py#L2413-L2419 | |
makefile/frcnn | 8d9b9ebf8be8315ba2f374d460121b0adf1df29c | scripts/cpp_lint.py | python | CleanseRawStrings | (raw_lines) | return lines_without_raw_strings | Removes C++11 raw strings from lines.
Before:
static const char kData[] = R"(
multi-line string
)";
After:
static const char kData[] = ""
(replaced by blank line)
"";
Args:
raw_lines: list of raw lines.
Returns:
list of lines with C++11 raw str... | Removes C++11 raw strings from lines. | [
"Removes",
"C",
"++",
"11",
"raw",
"strings",
"from",
"lines",
"."
] | def CleanseRawStrings(raw_lines):
"""Removes C++11 raw strings from lines.
Before:
static const char kData[] = R"(
multi-line string
)";
After:
static const char kData[] = ""
(replaced by blank line)
"";
Args:
raw_lines: list of raw lines.
Return... | [
"def",
"CleanseRawStrings",
"(",
"raw_lines",
")",
":",
"delimiter",
"=",
"None",
"lines_without_raw_strings",
"=",
"[",
"]",
"for",
"line",
"in",
"raw_lines",
":",
"if",
"delimiter",
":",
"# Inside a raw string, look for the end",
"end",
"=",
"line",
".",
"find",... | https://github.com/makefile/frcnn/blob/8d9b9ebf8be8315ba2f374d460121b0adf1df29c/scripts/cpp_lint.py#L1062-L1120 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.