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
domino-team/openwrt-cc
8b181297c34d14d3ca521cc9f31430d561dbc688
package/gli-pub/openwrt-node-packages-master/node/node-v6.9.1/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py
python
VisualStudioVersion.Description
(self)
return self.description
Get the full description of the version.
Get the full description of the version.
[ "Get", "the", "full", "description", "of", "the", "version", "." ]
def Description(self): """Get the full description of the version.""" return self.description
[ "def", "Description", "(", "self", ")", ":", "return", "self", ".", "description" ]
https://github.com/domino-team/openwrt-cc/blob/8b181297c34d14d3ca521cc9f31430d561dbc688/package/gli-pub/openwrt-node-packages-master/node/node-v6.9.1/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py#L35-L37
klzgrad/naiveproxy
ed2c513637c77b18721fe428d7ed395b4d284c83
src/build/android/gyp/write_build_config.py
python
_ExtractMarkdownDocumentation
(input_text)
return result
Extract Markdown documentation from a list of input strings lines. This generates a list of strings extracted from |input_text|, by looking for '-- BEGIN_MARKDOWN --' and '-- END_MARKDOWN --' line markers.
Extract Markdown documentation from a list of input strings lines.
[ "Extract", "Markdown", "documentation", "from", "a", "list", "of", "input", "strings", "lines", "." ]
def _ExtractMarkdownDocumentation(input_text): """Extract Markdown documentation from a list of input strings lines. This generates a list of strings extracted from |input_text|, by looking for '-- BEGIN_MARKDOWN --' and '-- END_MARKDOWN --' line markers.""" in_markdown = False result = [] for line i...
[ "def", "_ExtractMarkdownDocumentation", "(", "input_text", ")", ":", "in_markdown", "=", "False", "result", "=", "[", "]", "for", "line", "in", "input_text", ".", "splitlines", "(", ")", ":", "if", "in_markdown", ":", "if", "'-- END_MARKDOWN --'", "in", "line"...
https://github.com/klzgrad/naiveproxy/blob/ed2c513637c77b18721fe428d7ed395b4d284c83/src/build/android/gyp/write_build_config.py#L606-L623
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/BaseHTTPServer.py
python
BaseHTTPRequestHandler.handle
(self)
Handle multiple requests if necessary.
Handle multiple requests if necessary.
[ "Handle", "multiple", "requests", "if", "necessary", "." ]
def handle(self): """Handle multiple requests if necessary.""" self.close_connection = 1 self.handle_one_request() while not self.close_connection: self.handle_one_request()
[ "def", "handle", "(", "self", ")", ":", "self", ".", "close_connection", "=", "1", "self", ".", "handle_one_request", "(", ")", "while", "not", "self", ".", "close_connection", ":", "self", ".", "handle_one_request", "(", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/BaseHTTPServer.py#L336-L342
OpenChemistry/tomviz
0a903679318f191cb7dd3eb5ff5bc3a7d3320d9a
tomviz/python/tomviz/state/_schemata.py
python
PipelineSchema.unwrap_datasource
(self, data, **kwargs)
return data['dataSource']
Extract DataSource from pipeline attribute.
Extract DataSource from pipeline attribute.
[ "Extract", "DataSource", "from", "pipeline", "attribute", "." ]
def unwrap_datasource(self, data, **kwargs): """ Extract DataSource from pipeline attribute. """ return data['dataSource']
[ "def", "unwrap_datasource", "(", "self", ",", "data", ",", "*", "*", "kwargs", ")", ":", "return", "data", "[", "'dataSource'", "]" ]
https://github.com/OpenChemistry/tomviz/blob/0a903679318f191cb7dd3eb5ff5bc3a7d3320d9a/tomviz/python/tomviz/state/_schemata.py#L283-L288
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/python/keras/_impl/keras/utils/conv_utils.py
python
convert_kernel
(kernel)
return np.copy(kernel[slices])
Converts a Numpy kernel matrix from Theano format to TensorFlow format. Also works reciprocally, since the transformation is its own inverse. Arguments: kernel: Numpy array (3D, 4D or 5D). Returns: The converted kernel. Raises: ValueError: in case of invalid kernel shape or invalid data_fo...
Converts a Numpy kernel matrix from Theano format to TensorFlow format.
[ "Converts", "a", "Numpy", "kernel", "matrix", "from", "Theano", "format", "to", "TensorFlow", "format", "." ]
def convert_kernel(kernel): """Converts a Numpy kernel matrix from Theano format to TensorFlow format. Also works reciprocally, since the transformation is its own inverse. Arguments: kernel: Numpy array (3D, 4D or 5D). Returns: The converted kernel. Raises: ValueError: in case of invali...
[ "def", "convert_kernel", "(", "kernel", ")", ":", "kernel", "=", "np", ".", "asarray", "(", "kernel", ")", "if", "not", "3", "<=", "kernel", ".", "ndim", "<=", "5", ":", "raise", "ValueError", "(", "'Invalid kernel shape:'", ",", "kernel", ".", "shape", ...
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/python/keras/_impl/keras/utils/conv_utils.py#L52-L72
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/telemetry/third_party/web-page-replay/third_party/dns/edns.py
python
Option._cmp
(self, other)
Compare an ENDS option with another option of the same type. Return < 0 if self < other, 0 if self == other, and > 0 if self > other.
Compare an ENDS option with another option of the same type. Return < 0 if self < other, 0 if self == other, and > 0 if self > other.
[ "Compare", "an", "ENDS", "option", "with", "another", "option", "of", "the", "same", "type", ".", "Return", "<", "0", "if", "self", "<", "other", "0", "if", "self", "==", "other", "and", ">", "0", "if", "self", ">", "other", "." ]
def _cmp(self, other): """Compare an ENDS option with another option of the same type. Return < 0 if self < other, 0 if self == other, and > 0 if self > other. """ raise NotImplementedError
[ "def", "_cmp", "(", "self", ",", "other", ")", ":", "raise", "NotImplementedError" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/telemetry/third_party/web-page-replay/third_party/dns/edns.py#L52-L56
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/share/doc/python3.7/examples/Tools/gdb/libpython.py
python
PyObjectPtr.write_field_repr
(self, name, out, visited)
Extract the PyObject* field named "name", and write its representation to file-like object "out"
Extract the PyObject* field named "name", and write its representation to file-like object "out"
[ "Extract", "the", "PyObject", "*", "field", "named", "name", "and", "write", "its", "representation", "to", "file", "-", "like", "object", "out" ]
def write_field_repr(self, name, out, visited): ''' Extract the PyObject* field named "name", and write its representation to file-like object "out" ''' field_obj = self.pyop_field(name) field_obj.write_repr(out, visited)
[ "def", "write_field_repr", "(", "self", ",", "name", ",", "out", ",", "visited", ")", ":", "field_obj", "=", "self", ".", "pyop_field", "(", "name", ")", "field_obj", ".", "write_repr", "(", "out", ",", "visited", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/share/doc/python3.7/examples/Tools/gdb/libpython.py#L232-L238
commaai/openpilot
4416c21b1e738ab7d04147c5ae52b5135e0cdb40
pyextra/acados_template/acados_ocp.py
python
AcadosOcpConstraints.ubx_e
(self)
return self.__ubx_e
:math:`\\bar{x}^e` - upper bounds on x at terminal shooting node N. Type: :code:`np.ndarray`; default: :code:`np.array([])`
:math:`\\bar{x}^e` - upper bounds on x at terminal shooting node N. Type: :code:`np.ndarray`; default: :code:`np.array([])`
[ ":", "math", ":", "\\\\", "bar", "{", "x", "}", "^e", "-", "upper", "bounds", "on", "x", "at", "terminal", "shooting", "node", "N", ".", "Type", ":", ":", "code", ":", "np", ".", "ndarray", ";", "default", ":", ":", "code", ":", "np", ".", "arr...
def ubx_e(self): """:math:`\\bar{x}^e` - upper bounds on x at terminal shooting node N. Type: :code:`np.ndarray`; default: :code:`np.array([])`""" return self.__ubx_e
[ "def", "ubx_e", "(", "self", ")", ":", "return", "self", ".", "__ubx_e" ]
https://github.com/commaai/openpilot/blob/4416c21b1e738ab7d04147c5ae52b5135e0cdb40/pyextra/acados_template/acados_ocp.py#L1132-L1135
rdiankov/openrave
d1a23023fd4b58f077d2ca949ceaf1b91f3f13d7
python/databases/visibilitymodel.py
python
VisibilityModel.ShowTransform
(self, relativepose, options=None)
moves the robot links temporarily to show a transform
moves the robot links temporarily to show a transform
[ "moves", "the", "robot", "links", "temporarily", "to", "show", "a", "transform" ]
def ShowTransform(self, relativepose, options=None): """moves the robot links temporarily to show a transform """ if self.robot != self.sensorrobot: pts = poseMult(self.sensorrobot.GetTransformPose(), InvertPose(relativepose))[4:7] else: pts = poseMult(self.target...
[ "def", "ShowTransform", "(", "self", ",", "relativepose", ",", "options", "=", "None", ")", ":", "if", "self", ".", "robot", "!=", "self", ".", "sensorrobot", ":", "pts", "=", "poseMult", "(", "self", ".", "sensorrobot", ".", "GetTransformPose", "(", ")"...
https://github.com/rdiankov/openrave/blob/d1a23023fd4b58f077d2ca949ceaf1b91f3f13d7/python/databases/visibilitymodel.py#L298-L341
svn2github/webrtc
0e4615a75ed555ec866cd5543bfea586f3385ceb
tools/refactoring/webrtc_reformat.py
python
PostfixToPrefixInForLoops
(text)
return re.sub(pattern, r'\1++\2)', text)
Converts x++ to ++x in the increment part of a for loop.
Converts x++ to ++x in the increment part of a for loop.
[ "Converts", "x", "++", "to", "++", "x", "in", "the", "increment", "part", "of", "a", "for", "loop", "." ]
def PostfixToPrefixInForLoops(text): """Converts x++ to ++x in the increment part of a for loop.""" pattern = r'(for \(.*;.*;) (\w+)\+\+\)' return re.sub(pattern, r'\1++\2)', text)
[ "def", "PostfixToPrefixInForLoops", "(", "text", ")", ":", "pattern", "=", "r'(for \\(.*;.*;) (\\w+)\\+\\+\\)'", "return", "re", ".", "sub", "(", "pattern", ",", "r'\\1++\\2)'", ",", "text", ")" ]
https://github.com/svn2github/webrtc/blob/0e4615a75ed555ec866cd5543bfea586f3385ceb/tools/refactoring/webrtc_reformat.py#L60-L63
H-uru/Plasma
c2140ea046e82e9c199e257a7f2e7edb42602871
Scripts/Python/plasma/Plasma.py
python
PtDisableControlKeyEvents
(selfKey)
Disable the control key events from calling OnControlKeyEvent
Disable the control key events from calling OnControlKeyEvent
[ "Disable", "the", "control", "key", "events", "from", "calling", "OnControlKeyEvent" ]
def PtDisableControlKeyEvents(selfKey): """Disable the control key events from calling OnControlKeyEvent""" pass
[ "def", "PtDisableControlKeyEvents", "(", "selfKey", ")", ":", "pass" ]
https://github.com/H-uru/Plasma/blob/c2140ea046e82e9c199e257a7f2e7edb42602871/Scripts/Python/plasma/Plasma.py#L206-L208
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
gpu/command_buffer/build_gles2_cmd_buffer.py
python
GLGenerator.WriteGLES2ImplementationUnitTests
(self, filename)
Writes the GLES2 helper header.
Writes the GLES2 helper header.
[ "Writes", "the", "GLES2", "helper", "header", "." ]
def WriteGLES2ImplementationUnitTests(self, filename): """Writes the GLES2 helper header.""" file = CHeaderWriter( filename, "// This file is included by gles2_implementation.h to declare the\n" "// GL api functions.\n") for func in self.original_functions: func.WriteGLES2Imple...
[ "def", "WriteGLES2ImplementationUnitTests", "(", "self", ",", "filename", ")", ":", "file", "=", "CHeaderWriter", "(", "filename", ",", "\"// This file is included by gles2_implementation.h to declare the\\n\"", "\"// GL api functions.\\n\"", ")", "for", "func", "in", "self",...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/gpu/command_buffer/build_gles2_cmd_buffer.py#L7513-L7521
PixarAnimationStudios/USD
faed18ce62c8736b02413635b584a2f637156bad
pxr/usdImaging/usdviewq/usdviewApi.py
python
UsdviewApi.GrabViewportShot
(self)
return self.__appController.GrabViewportShot()
Returns a QImage of the current stage view in usdview.
Returns a QImage of the current stage view in usdview.
[ "Returns", "a", "QImage", "of", "the", "current", "stage", "view", "in", "usdview", "." ]
def GrabViewportShot(self): """Returns a QImage of the current stage view in usdview.""" return self.__appController.GrabViewportShot()
[ "def", "GrabViewportShot", "(", "self", ")", ":", "return", "self", ".", "__appController", ".", "GrabViewportShot", "(", ")" ]
https://github.com/PixarAnimationStudios/USD/blob/faed18ce62c8736b02413635b584a2f637156bad/pxr/usdImaging/usdviewq/usdviewApi.py#L207-L210
alibaba/graph-learn
54cafee9db3054dc310a28b856be7f97c7d5aee9
graphlearn/python/nn/tf/data/feature_handler.py
python
FeatureGroup.forward
(self, x_list)
return tf.concat(outputs, -1)
Args: x_list: A Tensor of shape [batch_size, feature_num] or a list of Tensors of shape [batch_size]. Returns: The concatenated Tensor of outputs of `FeatureColumn` in feature_column_list.
Args: x_list: A Tensor of shape [batch_size, feature_num] or a list of Tensors of shape [batch_size]. Returns: The concatenated Tensor of outputs of `FeatureColumn` in feature_column_list.
[ "Args", ":", "x_list", ":", "A", "Tensor", "of", "shape", "[", "batch_size", "feature_num", "]", "or", "a", "list", "of", "Tensors", "of", "shape", "[", "batch_size", "]", ".", "Returns", ":", "The", "concatenated", "Tensor", "of", "outputs", "of", "Feat...
def forward(self, x_list): """ Args: x_list: A Tensor of shape [batch_size, feature_num] or a list of Tensors of shape [batch_size]. Returns: The concatenated Tensor of outputs of `FeatureColumn` in feature_column_list. """ outputs = [] if isinstance(x_list, tf.Tensor): ...
[ "def", "forward", "(", "self", ",", "x_list", ")", ":", "outputs", "=", "[", "]", "if", "isinstance", "(", "x_list", ",", "tf", ".", "Tensor", ")", ":", "num", "=", "x_list", ".", "shape", "[", "-", "1", "]", "x_list", "=", "tf", ".", "transpose"...
https://github.com/alibaba/graph-learn/blob/54cafee9db3054dc310a28b856be7f97c7d5aee9/graphlearn/python/nn/tf/data/feature_handler.py#L45-L69
thalium/icebox
99d147d5b9269222225443ce171b4fd46d8985d4
src/icebox/icebox_py/__init__.py
python
Vm.pause
(self)
Pause vm.
Pause vm.
[ "Pause", "vm", "." ]
def pause(self): """Pause vm.""" libicebox.pause()
[ "def", "pause", "(", "self", ")", ":", "libicebox", ".", "pause", "(", ")" ]
https://github.com/thalium/icebox/blob/99d147d5b9269222225443ce171b4fd46d8985d4/src/icebox/icebox_py/__init__.py#L654-L656
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/third_party/lib_x86_64/python2.7/dist-packages/numpy/core/defchararray.py
python
expandtabs
(a, tabsize=8)
return _to_string_or_unicode_array( _vec_string(a, object_, 'expandtabs', (tabsize,)))
Return a copy of each string element where all tab characters are replaced by one or more spaces. Calls `str.expandtabs` element-wise. Return a copy of each string element where all tab characters are replaced by one or more spaces, depending on the current column and the given `tabsize`. The colu...
Return a copy of each string element where all tab characters are replaced by one or more spaces.
[ "Return", "a", "copy", "of", "each", "string", "element", "where", "all", "tab", "characters", "are", "replaced", "by", "one", "or", "more", "spaces", "." ]
def expandtabs(a, tabsize=8): """ Return a copy of each string element where all tab characters are replaced by one or more spaces. Calls `str.expandtabs` element-wise. Return a copy of each string element where all tab characters are replaced by one or more spaces, depending on the current co...
[ "def", "expandtabs", "(", "a", ",", "tabsize", "=", "8", ")", ":", "return", "_to_string_or_unicode_array", "(", "_vec_string", "(", "a", ",", "object_", ",", "'expandtabs'", ",", "(", "tabsize", ",", ")", ")", ")" ]
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/third_party/lib_x86_64/python2.7/dist-packages/numpy/core/defchararray.py#L586-L618
google/sentencepiece
8420f2179007c398c8b70f63cb12d8aec827397c
python/src/sentencepiece/__init__.py
python
SentencePieceTrainer.Train
(arg=None, **kwargs)
return None
Train Sentencepiece model. Accept both kwargs and legacy string arg.
Train Sentencepiece model. Accept both kwargs and legacy string arg.
[ "Train", "Sentencepiece", "model", ".", "Accept", "both", "kwargs", "and", "legacy", "string", "arg", "." ]
def Train(arg=None, **kwargs): """Train Sentencepiece model. Accept both kwargs and legacy string arg.""" if arg is not None and type(arg) is str: return SentencePieceTrainer._TrainFromString(arg) def _encode(value): """Encode value to CSV..""" if type(value) is list: ...
[ "def", "Train", "(", "arg", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "arg", "is", "not", "None", "and", "type", "(", "arg", ")", "is", "str", ":", "return", "SentencePieceTrainer", ".", "_TrainFromString", "(", "arg", ")", "def", "_encod...
https://github.com/google/sentencepiece/blob/8420f2179007c398c8b70f63cb12d8aec827397c/python/src/sentencepiece/__init__.py#L404-L446
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
tools/grit/grit/format/policy_templates/writers/template_writer.py
python
TemplateWriter.IsFuturePolicySupported
(self, policy)
return False
Checks if the given future policy is supported by the writer. Args: policy: The dictionary of the policy. Returns: True if the writer chooses to include the deprecated 'policy' in its output.
Checks if the given future policy is supported by the writer.
[ "Checks", "if", "the", "given", "future", "policy", "is", "supported", "by", "the", "writer", "." ]
def IsFuturePolicySupported(self, policy): '''Checks if the given future policy is supported by the writer. Args: policy: The dictionary of the policy. Returns: True if the writer chooses to include the deprecated 'policy' in its output. ''' return False
[ "def", "IsFuturePolicySupported", "(", "self", ",", "policy", ")", ":", "return", "False" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/tools/grit/grit/format/policy_templates/writers/template_writer.py#L45-L55
PJunhyuk/people-counting-pose
8cdaab5281847c296b305643842053d496e2e4e8
lib/coco/PythonAPI/pycocotools/coco.py
python
COCO.loadRes
(self, resFile)
return res
Load result file and return a result api object. :param resFile (str) : file name of result file :return: res (obj) : result api object
Load result file and return a result api object. :param resFile (str) : file name of result file :return: res (obj) : result api object
[ "Load", "result", "file", "and", "return", "a", "result", "api", "object", ".", ":", "param", "resFile", "(", "str", ")", ":", "file", "name", "of", "result", "file", ":", "return", ":", "res", "(", "obj", ")", ":", "result", "api", "object" ]
def loadRes(self, resFile): """ Load result file and return a result api object. :param resFile (str) : file name of result file :return: res (obj) : result api object """ res = COCO() res.dataset['images'] = [img for img in self.dataset['images']] ...
[ "def", "loadRes", "(", "self", ",", "resFile", ")", ":", "res", "=", "COCO", "(", ")", "res", ".", "dataset", "[", "'images'", "]", "=", "[", "img", "for", "img", "in", "self", ".", "dataset", "[", "'images'", "]", "]", "print", "(", "'Loading and ...
https://github.com/PJunhyuk/people-counting-pose/blob/8cdaab5281847c296b305643842053d496e2e4e8/lib/coco/PythonAPI/pycocotools/coco.py#L292-L351
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_windows.py
python
FileDialog.SetPath
(*args, **kwargs)
return _windows_.FileDialog_SetPath(*args, **kwargs)
SetPath(self, String path) Sets the path (the combined directory and filename that will be returned when the dialog is dismissed).
SetPath(self, String path)
[ "SetPath", "(", "self", "String", "path", ")" ]
def SetPath(*args, **kwargs): """ SetPath(self, String path) Sets the path (the combined directory and filename that will be returned when the dialog is dismissed). """ return _windows_.FileDialog_SetPath(*args, **kwargs)
[ "def", "SetPath", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_windows_", ".", "FileDialog_SetPath", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_windows.py#L3150-L3157
v8/v8
fee3bf095260bf657a3eea4d3d41f90c42c6c857
tools/sanitizers/sancov_merger.py
python
generate_inputs
(keep, coverage_dir, file_map, cpus)
return inputs
Generate inputs for multiprocessed merging. Splits the sancov files into several buckets, so that each bucket can be merged in a separate process. We have only few executables in total with mostly lots of associated files. In the general case, with many executables we might need to avoid splitting buckets of e...
Generate inputs for multiprocessed merging.
[ "Generate", "inputs", "for", "multiprocessed", "merging", "." ]
def generate_inputs(keep, coverage_dir, file_map, cpus): """Generate inputs for multiprocessed merging. Splits the sancov files into several buckets, so that each bucket can be merged in a separate process. We have only few executables in total with mostly lots of associated files. In the general case, with ma...
[ "def", "generate_inputs", "(", "keep", ",", "coverage_dir", ",", "file_map", ",", "cpus", ")", ":", "inputs", "=", "[", "]", "for", "executable", ",", "files", "in", "file_map", ".", "iteritems", "(", ")", ":", "# What's the bucket size for distributing files fo...
https://github.com/v8/v8/blob/fee3bf095260bf657a3eea4d3d41f90c42c6c857/tools/sanitizers/sancov_merger.py#L92-L116
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py2/scipy/optimize/zeros.py
python
_newton_quadratic
(ab, fab, d, fd, k)
return r
Apply Newton-Raphson like steps, using divided differences to approximate f' ab is a real interval [a, b] containing a root, fab holds the real values of f(a), f(b) d is a real number outside [ab, b] k is the number of steps to apply
Apply Newton-Raphson like steps, using divided differences to approximate f'
[ "Apply", "Newton", "-", "Raphson", "like", "steps", "using", "divided", "differences", "to", "approximate", "f" ]
def _newton_quadratic(ab, fab, d, fd, k): """Apply Newton-Raphson like steps, using divided differences to approximate f' ab is a real interval [a, b] containing a root, fab holds the real values of f(a), f(b) d is a real number outside [ab, b] k is the number of steps to apply """ a, b = a...
[ "def", "_newton_quadratic", "(", "ab", ",", "fab", ",", "d", ",", "fd", ",", "k", ")", ":", "a", ",", "b", "=", "ab", "fa", ",", "fb", "=", "fab", "_", ",", "B", ",", "A", "=", "_compute_divided_differences", "(", "[", "a", ",", "b", ",", "d"...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py2/scipy/optimize/zeros.py#L978-L1010
google/syzygy
8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5
third_party/numpy/files/numpy/lib/function_base.py
python
sinc
(x)
return sin(y)/y
Return the sinc function. The sinc function is :math:`\\sin(\\pi x)/(\\pi x)`. Parameters ---------- x : ndarray Array (possibly multi-dimensional) of values for which to to calculate ``sinc(x)``. Returns ------- out : ndarray ``sinc(x)``, which has the same shape ...
Return the sinc function.
[ "Return", "the", "sinc", "function", "." ]
def sinc(x): """ Return the sinc function. The sinc function is :math:`\\sin(\\pi x)/(\\pi x)`. Parameters ---------- x : ndarray Array (possibly multi-dimensional) of values for which to to calculate ``sinc(x)``. Returns ------- out : ndarray ``sinc(x)``, ...
[ "def", "sinc", "(", "x", ")", ":", "x", "=", "np", ".", "asanyarray", "(", "x", ")", "y", "=", "pi", "*", "where", "(", "x", "==", "0", ",", "1.0e-20", ",", "x", ")", "return", "sin", "(", "y", ")", "/", "y" ]
https://github.com/google/syzygy/blob/8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5/third_party/numpy/files/numpy/lib/function_base.py#L2755-L2832
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/masked/ipaddrctrl.py
python
IpAddrCtrl.OnDot
(self, event)
return self._OnChangeField(event)
Defines what action to take when the '.' character is typed in the control. By default, the current field is right-justified, and the cursor is placed in the next field.
Defines what action to take when the '.' character is typed in the control. By default, the current field is right-justified, and the cursor is placed in the next field.
[ "Defines", "what", "action", "to", "take", "when", "the", ".", "character", "is", "typed", "in", "the", "control", ".", "By", "default", "the", "current", "field", "is", "right", "-", "justified", "and", "the", "cursor", "is", "placed", "in", "the", "nex...
def OnDot(self, event): """ Defines what action to take when the '.' character is typed in the control. By default, the current field is right-justified, and the cursor is placed in the next field. """ ## dbg('IpAddrCtrl::OnDot', indent=1) pos = self._adjustPos(se...
[ "def", "OnDot", "(", "self", ",", "event", ")", ":", "## dbg('IpAddrCtrl::OnDot', indent=1)", "pos", "=", "self", ".", "_adjustPos", "(", "self", ".", "_GetInsertionPoint", "(", ")", ",", "event", ".", "GetKeyCode", "(", ")", ")", "oldvalue", "=", "se...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/masked/ipaddrctrl.py#L125-L143
openthread/openthread
9fcdbed9c526c70f1556d1ed84099c1535c7cd32
tools/harness-thci/OpenThread.py
python
OpenThreadTHCI.__readCliLine
(self, ignoreLogs=True)
return line
Read the next line from OT CLI.d
Read the next line from OT CLI.d
[ "Read", "the", "next", "line", "from", "OT", "CLI", ".", "d" ]
def __readCliLine(self, ignoreLogs=True): """Read the next line from OT CLI.d""" line = self._cliReadLine() if ignoreLogs: while line is not None and LOGX.match(line): line = self._cliReadLine() return line
[ "def", "__readCliLine", "(", "self", ",", "ignoreLogs", "=", "True", ")", ":", "line", "=", "self", ".", "_cliReadLine", "(", ")", "if", "ignoreLogs", ":", "while", "line", "is", "not", "None", "and", "LOGX", ".", "match", "(", "line", ")", ":", "lin...
https://github.com/openthread/openthread/blob/9fcdbed9c526c70f1556d1ed84099c1535c7cd32/tools/harness-thci/OpenThread.py#L358-L365
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
PRESUBMIT.py
python
_CheckIncludeOrderInFile
(input_api, f, changed_linenums)
return warnings
Checks the #include order for the given file f.
Checks the #include order for the given file f.
[ "Checks", "the", "#include", "order", "for", "the", "given", "file", "f", "." ]
def _CheckIncludeOrderInFile(input_api, f, changed_linenums): """Checks the #include order for the given file f.""" system_include_pattern = input_api.re.compile(r'\s*#include \<.*') # Exclude the following includes from the check: # 1) #include <.../...>, e.g., <sys/...> includes often need to appear in a #...
[ "def", "_CheckIncludeOrderInFile", "(", "input_api", ",", "f", ",", "changed_linenums", ")", ":", "system_include_pattern", "=", "input_api", ".", "re", ".", "compile", "(", "r'\\s*#include \\<.*'", ")", "# Exclude the following includes from the check:", "# 1) #include <.....
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/PRESUBMIT.py#L611-L685
mhammond/pywin32
44afd86ba8485194df93234639243252deeb40d5
win32/Lib/regutil.py
python
GetRootKey
()
Retrieves the Registry root in use by Python.
Retrieves the Registry root in use by Python.
[ "Retrieves", "the", "Registry", "root", "in", "use", "by", "Python", "." ]
def GetRootKey(): """Retrieves the Registry root in use by Python.""" keyname = BuildDefaultPythonKey() try: k = win32api.RegOpenKey(win32con.HKEY_CURRENT_USER, keyname) k.close() return win32con.HKEY_CURRENT_USER except win32api.error: return win32con.HKEY_LOCAL_MACHINE
[ "def", "GetRootKey", "(", ")", ":", "keyname", "=", "BuildDefaultPythonKey", "(", ")", "try", ":", "k", "=", "win32api", ".", "RegOpenKey", "(", "win32con", ".", "HKEY_CURRENT_USER", ",", "keyname", ")", "k", ".", "close", "(", ")", "return", "win32con", ...
https://github.com/mhammond/pywin32/blob/44afd86ba8485194df93234639243252deeb40d5/win32/Lib/regutil.py#L26-L34
CaoWGG/TensorRT-YOLOv4
4d7c2edce99e8794a4cb4ea3540d51ce91158a36
onnx-tensorrt/third_party/onnx/third_party/pybind11/tools/clang/cindex.py
python
TranslationUnit.from_ast_file
(cls, filename, index=None)
return cls(ptr=ptr, index=index)
Create a TranslationUnit instance from a saved AST file. A previously-saved AST file (provided with -emit-ast or TranslationUnit.save()) is loaded from the filename specified. If the file cannot be loaded, a TranslationUnitLoadError will be raised. index is optional and is the...
Create a TranslationUnit instance from a saved AST file.
[ "Create", "a", "TranslationUnit", "instance", "from", "a", "saved", "AST", "file", "." ]
def from_ast_file(cls, filename, index=None): """Create a TranslationUnit instance from a saved AST file. A previously-saved AST file (provided with -emit-ast or TranslationUnit.save()) is loaded from the filename specified. If the file cannot be loaded, a TranslationUnitLoadError will...
[ "def", "from_ast_file", "(", "cls", ",", "filename", ",", "index", "=", "None", ")", ":", "if", "index", "is", "None", ":", "index", "=", "Index", ".", "create", "(", ")", "ptr", "=", "conf", ".", "lib", ".", "clang_createTranslationUnit", "(", "index"...
https://github.com/CaoWGG/TensorRT-YOLOv4/blob/4d7c2edce99e8794a4cb4ea3540d51ce91158a36/onnx-tensorrt/third_party/onnx/third_party/pybind11/tools/clang/cindex.py#L2541-L2560
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/selectors.py
python
BaseSelector.get_key
(self, fileobj)
Return the key associated to a registered file object. Returns: SelectorKey for this file object
Return the key associated to a registered file object.
[ "Return", "the", "key", "associated", "to", "a", "registered", "file", "object", "." ]
def get_key(self, fileobj): """Return the key associated to a registered file object. Returns: SelectorKey for this file object """ mapping = self.get_map() if mapping is None: raise RuntimeError('Selector is closed') try: return mapping[f...
[ "def", "get_key", "(", "self", ",", "fileobj", ")", ":", "mapping", "=", "self", ".", "get_map", "(", ")", "if", "mapping", "is", "None", ":", "raise", "RuntimeError", "(", "'Selector is closed'", ")", "try", ":", "return", "mapping", "[", "fileobj", "]"...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/selectors.py#L180-L192
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/site.py
python
setBEGINLIBPATH
()
The OS/2 EMX port has optional extension modules that do double duty as DLLs (and must use the .DLL file extension) for other extensions. The library search path needs to be amended so these will be found during module import. Use BEGINLIBPATH so that these are at the start of the library search path.
The OS/2 EMX port has optional extension modules that do double duty as DLLs (and must use the .DLL file extension) for other extensions. The library search path needs to be amended so these will be found during module import. Use BEGINLIBPATH so that these are at the start of the library search path.
[ "The", "OS", "/", "2", "EMX", "port", "has", "optional", "extension", "modules", "that", "do", "double", "duty", "as", "DLLs", "(", "and", "must", "use", "the", ".", "DLL", "file", "extension", ")", "for", "other", "extensions", ".", "The", "library", ...
def setBEGINLIBPATH(): """The OS/2 EMX port has optional extension modules that do double duty as DLLs (and must use the .DLL file extension) for other extensions. The library search path needs to be amended so these will be found during module import. Use BEGINLIBPATH so that these are at the start ...
[ "def", "setBEGINLIBPATH", "(", ")", ":", "dllpath", "=", "os", ".", "path", ".", "join", "(", "sys", ".", "prefix", ",", "\"Lib\"", ",", "\"lib-dynload\"", ")", "libpath", "=", "os", ".", "environ", "[", "'BEGINLIBPATH'", "]", ".", "split", "(", "';'",...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/site.py#L317-L331
MegEngine/MegEngine
ce9ad07a27ec909fb8db4dd67943d24ba98fb93a
imperative/python/megengine/functional/elemwise.py
python
logical_xor
(x, y)
return _elwise(x, y, mode=Elemwise.Mode.XOR)
r"""Element-wise `logical xor: x ^ y`.
r"""Element-wise `logical xor: x ^ y`.
[ "r", "Element", "-", "wise", "logical", "xor", ":", "x", "^", "y", "." ]
def logical_xor(x, y): r"""Element-wise `logical xor: x ^ y`.""" return _elwise(x, y, mode=Elemwise.Mode.XOR)
[ "def", "logical_xor", "(", "x", ",", "y", ")", ":", "return", "_elwise", "(", "x", ",", "y", ",", "mode", "=", "Elemwise", ".", "Mode", ".", "XOR", ")" ]
https://github.com/MegEngine/MegEngine/blob/ce9ad07a27ec909fb8db4dd67943d24ba98fb93a/imperative/python/megengine/functional/elemwise.py#L453-L455
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/tkinter/__init__.py
python
Text.tag_add
(self, tagName, index1, *args)
Add tag TAGNAME to all characters between INDEX1 and index2 in ARGS. Additional pairs of indices may follow in ARGS.
Add tag TAGNAME to all characters between INDEX1 and index2 in ARGS. Additional pairs of indices may follow in ARGS.
[ "Add", "tag", "TAGNAME", "to", "all", "characters", "between", "INDEX1", "and", "index2", "in", "ARGS", ".", "Additional", "pairs", "of", "indices", "may", "follow", "in", "ARGS", "." ]
def tag_add(self, tagName, index1, *args): """Add tag TAGNAME to all characters between INDEX1 and index2 in ARGS. Additional pairs of indices may follow in ARGS.""" self.tk.call( (self._w, 'tag', 'add', tagName, index1) + args)
[ "def", "tag_add", "(", "self", ",", "tagName", ",", "index1", ",", "*", "args", ")", ":", "self", ".", "tk", ".", "call", "(", "(", "self", ".", "_w", ",", "'tag'", ",", "'add'", ",", "tagName", ",", "index1", ")", "+", "args", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/tkinter/__init__.py#L3342-L3346
seqan/seqan
f5f658343c366c9c3d44ba358ffc9317e78a09ed
apps/ngs_roi/tool_shed/roi_plot_thumbnails.py
python
main
()
return app.run()
Program entry point.
Program entry point.
[ "Program", "entry", "point", "." ]
def main(): """Program entry point.""" parser = argparse.ArgumentParser(description='Plot ROI file.') ngs_roi.argparse.addFileArguments(parser) ngs_roi.argparse.addPlotGridArguments(parser) ngs_roi.argparse.addLinkArguments(parser) args = parser.parse_args() ngs_roi.argparse.applyFileDefault...
[ "def", "main", "(", ")", ":", "parser", "=", "argparse", ".", "ArgumentParser", "(", "description", "=", "'Plot ROI file.'", ")", "ngs_roi", ".", "argparse", ".", "addFileArguments", "(", "parser", ")", "ngs_roi", ".", "argparse", ".", "addPlotGridArguments", ...
https://github.com/seqan/seqan/blob/f5f658343c366c9c3d44ba358ffc9317e78a09ed/apps/ngs_roi/tool_shed/roi_plot_thumbnails.py#L179-L189
ucsb-seclab/difuze
bb59a12ff87ad5ae45d9c60e349891bf80d72877
helper_scripts/components/bear_parse_headers.py
python
BearParseHeaders.is_critical
(self)
return False
This component is not critical. :return: False
This component is not critical. :return: False
[ "This", "component", "is", "not", "critical", ".", ":", "return", ":", "False" ]
def is_critical(self): """ This component is not critical. :return: False """ return False
[ "def", "is_critical", "(", "self", ")", ":", "return", "False" ]
https://github.com/ucsb-seclab/difuze/blob/bb59a12ff87ad5ae45d9c60e349891bf80d72877/helper_scripts/components/bear_parse_headers.py#L86-L91
Cisco-Talos/moflow
ed71dfb0540d9e0d7a4c72f0881b58958d573728
BAP-0.7-moflow/libtracewrap/libtrace/protobuf/python/google/protobuf/internal/cpp_message.py
python
_AddMessageMethods
(message_descriptor, cls)
Adds the methods to a protocol message class.
Adds the methods to a protocol message class.
[ "Adds", "the", "methods", "to", "a", "protocol", "message", "class", "." ]
def _AddMessageMethods(message_descriptor, cls): """Adds the methods to a protocol message class.""" if message_descriptor.is_extendable: def ClearExtension(self, extension): self.Extensions.ClearExtension(extension) def HasExtension(self, extension): return self.Extensions.HasExtension(extens...
[ "def", "_AddMessageMethods", "(", "message_descriptor", ",", "cls", ")", ":", "if", "message_descriptor", ".", "is_extendable", ":", "def", "ClearExtension", "(", "self", ",", "extension", ")", ":", "self", ".", "Extensions", ".", "ClearExtension", "(", "extensi...
https://github.com/Cisco-Talos/moflow/blob/ed71dfb0540d9e0d7a4c72f0881b58958d573728/BAP-0.7-moflow/libtracewrap/libtrace/protobuf/python/google/protobuf/internal/cpp_message.py#L486-L607
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/autograph/operators/logical.py
python
not_
(a)
return _py_not(a)
Functional form of "not".
Functional form of "not".
[ "Functional", "form", "of", "not", "." ]
def not_(a): """Functional form of "not".""" if tensor_util.is_tensor(a): return _tf_not(a) return _py_not(a)
[ "def", "not_", "(", "a", ")", ":", "if", "tensor_util", ".", "is_tensor", "(", "a", ")", ":", "return", "_tf_not", "(", "a", ")", "return", "_py_not", "(", "a", ")" ]
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/autograph/operators/logical.py#L26-L30
eclipse/sumo
7132a9b8b6eea734bdec38479026b4d8c4336d03
tools/contributed/sumopy/agilepy/lib_base/classman.py
python
Attrsman.save_values
(self, state)
Called by the managed object during save to save the attribute values.
Called by the managed object during save to save the attribute values.
[ "Called", "by", "the", "managed", "object", "during", "save", "to", "save", "the", "attribute", "values", "." ]
def save_values(self, state): """ Called by the managed object during save to save the attribute values. """ for attrconfig in self.get_configs(): attrconfig.save_value(state)
[ "def", "save_values", "(", "self", ",", "state", ")", ":", "for", "attrconfig", "in", "self", ".", "get_configs", "(", ")", ":", "attrconfig", ".", "save_value", "(", "state", ")" ]
https://github.com/eclipse/sumo/blob/7132a9b8b6eea734bdec38479026b4d8c4336d03/tools/contributed/sumopy/agilepy/lib_base/classman.py#L2060-L2066
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/cli/parser.py
python
CustomOptionParser.option_list_all
(self)
return res
Get a list of all options, including those in option groups.
Get a list of all options, including those in option groups.
[ "Get", "a", "list", "of", "all", "options", "including", "those", "in", "option", "groups", "." ]
def option_list_all(self): """Get a list of all options, including those in option groups.""" res = self.option_list[:] for i in self.option_groups: res.extend(i.option_list) return res
[ "def", "option_list_all", "(", "self", ")", ":", "res", "=", "self", ".", "option_list", "[", ":", "]", "for", "i", "in", "self", ".", "option_groups", ":", "res", ".", "extend", "(", "i", ".", "option_list", ")", "return", "res" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/cli/parser.py#L144-L150
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/lib/shape_base.py
python
array_split
(ary, indices_or_sections, axis=0)
return sub_arys
Split an array into multiple sub-arrays. Please refer to the ``split`` documentation. The only difference between these functions is that ``array_split`` allows `indices_or_sections` to be an integer that does *not* equally divide the axis. For an array of length l that should be split into n sect...
Split an array into multiple sub-arrays.
[ "Split", "an", "array", "into", "multiple", "sub", "-", "arrays", "." ]
def array_split(ary, indices_or_sections, axis=0): """ Split an array into multiple sub-arrays. Please refer to the ``split`` documentation. The only difference between these functions is that ``array_split`` allows `indices_or_sections` to be an integer that does *not* equally divide the axis...
[ "def", "array_split", "(", "ary", ",", "indices_or_sections", ",", "axis", "=", "0", ")", ":", "try", ":", "Ntotal", "=", "ary", ".", "shape", "[", "axis", "]", "except", "AttributeError", ":", "Ntotal", "=", "len", "(", "ary", ")", "try", ":", "# ha...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/lib/shape_base.py#L738-L790
synfig/synfig
a5ec91db5b751dc12e4400ccfb5c063fd6d2d928
synfig-studio/plugins/lottie-exporter/common/Vector.py
python
Vector.is_equal_to
(self, other)
return common.misc.approximate_equal((self - other).mag_squared(), 0)
Tells if the current vector is equal to `other` vector Args: other (common.Vector.Vector) : The vector to be compared with Returns: (bool) : True if the vectors are equal : False otherwise
Tells if the current vector is equal to `other` vector
[ "Tells", "if", "the", "current", "vector", "is", "equal", "to", "other", "vector" ]
def is_equal_to(self, other): """ Tells if the current vector is equal to `other` vector Args: other (common.Vector.Vector) : The vector to be compared with Returns: (bool) : True if the vectors are equal : False otherwise """ ...
[ "def", "is_equal_to", "(", "self", ",", "other", ")", ":", "return", "common", ".", "misc", ".", "approximate_equal", "(", "(", "self", "-", "other", ")", ".", "mag_squared", "(", ")", ",", "0", ")" ]
https://github.com/synfig/synfig/blob/a5ec91db5b751dc12e4400ccfb5c063fd6d2d928/synfig-studio/plugins/lottie-exporter/common/Vector.py#L115-L126
tangzhenyu/Scene-Text-Understanding
0f7ffc7aea5971a50cdc03d33d0a41075285948b
SynthText_Chinese/gen_cartoon_viz.py
python
add_res_to_db
(imgname,res,db)
Add the synthetically generated text image instance and other metadata to the dataset.
Add the synthetically generated text image instance and other metadata to the dataset.
[ "Add", "the", "synthetically", "generated", "text", "image", "instance", "and", "other", "metadata", "to", "the", "dataset", "." ]
def add_res_to_db(imgname,res,db): """ Add the synthetically generated text image instance and other metadata to the dataset. """ ninstance = len(res) for i in xrange(ninstance): print colorize(Color.GREEN,'added into the db %s '%res[i]['txt']) dname = "%s_%d"%(imgname, i) db['data'].create...
[ "def", "add_res_to_db", "(", "imgname", ",", "res", ",", "db", ")", ":", "ninstance", "=", "len", "(", "res", ")", "for", "i", "in", "xrange", "(", "ninstance", ")", ":", "print", "colorize", "(", "Color", ".", "GREEN", ",", "'added into the db %s '", ...
https://github.com/tangzhenyu/Scene-Text-Understanding/blob/0f7ffc7aea5971a50cdc03d33d0a41075285948b/SynthText_Chinese/gen_cartoon_viz.py#L64-L97
apple/swift-lldb
d74be846ef3e62de946df343e8c234bde93a8912
scripts/Python/static-binding/lldb.py
python
SBTarget.BreakpointCreateFromScript
(self, class_name, extra_args, module_list, file_list, request_hardware=False)
return _lldb.SBTarget_BreakpointCreateFromScript(self, class_name, extra_args, module_list, file_list, request_hardware)
BreakpointCreateFromScript(SBTarget self, char const * class_name, SBStructuredData extra_args, SBFileSpecList module_list, SBFileSpecList file_list, bool request_hardware=False) -> SBBreakpoint BreakpointCreateFromScript(SBTarget self, char const * class_name, SBStructuredData extra_args, SBFileSpecList module...
BreakpointCreateFromScript(SBTarget self, char const * class_name, SBStructuredData extra_args, SBFileSpecList module_list, SBFileSpecList file_list, bool request_hardware=False) -> SBBreakpoint BreakpointCreateFromScript(SBTarget self, char const * class_name, SBStructuredData extra_args, SBFileSpecList module...
[ "BreakpointCreateFromScript", "(", "SBTarget", "self", "char", "const", "*", "class_name", "SBStructuredData", "extra_args", "SBFileSpecList", "module_list", "SBFileSpecList", "file_list", "bool", "request_hardware", "=", "False", ")", "-", ">", "SBBreakpoint", "Breakpoin...
def BreakpointCreateFromScript(self, class_name, extra_args, module_list, file_list, request_hardware=False): """ BreakpointCreateFromScript(SBTarget self, char const * class_name, SBStructuredData extra_args, SBFileSpecList module_list, SBFileSpecList file_list, bool request_hardware=False) -> SBBreakp...
[ "def", "BreakpointCreateFromScript", "(", "self", ",", "class_name", ",", "extra_args", ",", "module_list", ",", "file_list", ",", "request_hardware", "=", "False", ")", ":", "return", "_lldb", ".", "SBTarget_BreakpointCreateFromScript", "(", "self", ",", "class_nam...
https://github.com/apple/swift-lldb/blob/d74be846ef3e62de946df343e8c234bde93a8912/scripts/Python/static-binding/lldb.py#L10949-L11013
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/hypertreelist.py
python
HyperTreeList.GetClassDefaultAttributes
(self)
return attr
Returns the default font and colours which are used by the control. This is useful if you want to use the same font or colour in your own control as in a standard control -- which is a much better idea than hard coding specific colours or fonts which might look completely out of place on the use...
Returns the default font and colours which are used by the control. This is useful if you want to use the same font or colour in your own control as in a standard control -- which is a much better idea than hard coding specific colours or fonts which might look completely out of place on the use...
[ "Returns", "the", "default", "font", "and", "colours", "which", "are", "used", "by", "the", "control", ".", "This", "is", "useful", "if", "you", "want", "to", "use", "the", "same", "font", "or", "colour", "in", "your", "own", "control", "as", "in", "a"...
def GetClassDefaultAttributes(self): """ Returns the default font and colours which are used by the control. This is useful if you want to use the same font or colour in your own control as in a standard control -- which is a much better idea than hard coding specific colours or ...
[ "def", "GetClassDefaultAttributes", "(", "self", ")", ":", "attr", "=", "wx", ".", "VisualAttributes", "(", ")", "attr", ".", "colFg", "=", "wx", ".", "SystemSettings_GetColour", "(", "wx", ".", "SYS_COLOUR_WINDOWTEXT", ")", "attr", ".", "colBg", "=", "wx", ...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/hypertreelist.py#L4842-L4866
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/AudioEngineWwise/Tools/WwiseConfig/setup_wwise_config.py
python
get_matching_version_key
(project_version)
return version_key
Given a version string, match against all known installed versions of Wwise and return the version key. :param project_version: Wwise project version string. :return: A version key that closely matches the input version.
Given a version string, match against all known installed versions of Wwise and return the version key. :param project_version: Wwise project version string. :return: A version key that closely matches the input version.
[ "Given", "a", "version", "string", "match", "against", "all", "known", "installed", "versions", "of", "Wwise", "and", "return", "the", "version", "key", ".", ":", "param", "project_version", ":", "Wwise", "project", "version", "string", ".", ":", "return", "...
def get_matching_version_key(project_version): """ Given a version string, match against all known installed versions of Wwise and return the version key. :param project_version: Wwise project version string. :return: A version key that closely matches the input version. """ installed_versions =...
[ "def", "get_matching_version_key", "(", "project_version", ")", ":", "installed_versions", "=", "[", "key", "for", "key", "in", "wwise_versions", ".", "keys", "(", ")", "if", "'ltx'", "not", "in", "key", "]", "version_key", "=", "None", "for", "ver", "in", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/AudioEngineWwise/Tools/WwiseConfig/setup_wwise_config.py#L203-L216
quantOS-org/DataCore
e2ef9bd2c22ee9e2845675b6435a14fa607f3551
mdlink/deps/windows/protobuf-2.5.0/python/google/protobuf/message.py
python
Message.IsInitialized
(self)
Checks if the message is initialized. Returns: The method returns True if the message is initialized (i.e. all of its required fields are set).
Checks if the message is initialized.
[ "Checks", "if", "the", "message", "is", "initialized", "." ]
def IsInitialized(self): """Checks if the message is initialized. Returns: The method returns True if the message is initialized (i.e. all of its required fields are set). """ raise NotImplementedError
[ "def", "IsInitialized", "(", "self", ")", ":", "raise", "NotImplementedError" ]
https://github.com/quantOS-org/DataCore/blob/e2ef9bd2c22ee9e2845675b6435a14fa607f3551/mdlink/deps/windows/protobuf-2.5.0/python/google/protobuf/message.py#L134-L141
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/RNN/rnn_quantizer/tensorflow/tf_nndct/utils/logging.py
python
_log_prefix
(level, timestamp=None, file_and_line=None)
return s
Generate a nndct logline prefix.
Generate a nndct logline prefix.
[ "Generate", "a", "nndct", "logline", "prefix", "." ]
def _log_prefix(level, timestamp=None, file_and_line=None): """Generate a nndct logline prefix.""" # pylint: disable=global-variable-not-assigned global _level_names # pylint: enable=global-variable-not-assigned # Record current time now = timestamp or _time.time() now_tuple = _time.localtime(now) now_...
[ "def", "_log_prefix", "(", "level", ",", "timestamp", "=", "None", ",", "file_and_line", "=", "None", ")", ":", "# pylint: disable=global-variable-not-assigned", "global", "_level_names", "# pylint: enable=global-variable-not-assigned", "# Record current time", "now", "=", ...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/RNN/rnn_quantizer/tensorflow/tf_nndct/utils/logging.py#L99-L129
miyosuda/TensorFlowAndroidDemo
35903e0221aa5f109ea2dbef27f20b52e317f42d
jni-build/jni/include/tensorflow/python/ops/control_flow_ops.py
python
_SwitchRefOrTensor
(data, pred, name="Switch")
Forwards `data` to an output determined by `pred`. If `pred` is true, the `data` input is forwared to the first output. Otherwise, the data goes to the second output. This op handles `Tensor`s and `IndexedSlices`. Args: data: The tensor to be forwarded to the appropriate output. pred: A scalar that s...
Forwards `data` to an output determined by `pred`.
[ "Forwards", "data", "to", "an", "output", "determined", "by", "pred", "." ]
def _SwitchRefOrTensor(data, pred, name="Switch"): """Forwards `data` to an output determined by `pred`. If `pred` is true, the `data` input is forwared to the first output. Otherwise, the data goes to the second output. This op handles `Tensor`s and `IndexedSlices`. Args: data: The tensor to be forwar...
[ "def", "_SwitchRefOrTensor", "(", "data", ",", "pred", ",", "name", "=", "\"Switch\"", ")", ":", "data", "=", "ops", ".", "convert_to_tensor_or_indexed_slices", "(", "data", ",", "name", "=", "\"data\"", ")", "# NOTE(vrv): ops.colocate_with(data, ignore_existing=True)...
https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/python/ops/control_flow_ops.py#L285-L326
vxl/vxl
f7358571ada5a4b4823fb86976d55f8d6500ce64
contrib/brl/bseg/boxm2/pyscripts/boxm2_uncertainty_adaptor.py
python
UncertainScene.compute_uncertainty
(self)
Store voxel uncertainty in cubic (float8)
Store voxel uncertainty in cubic (float8)
[ "Store", "voxel", "uncertainty", "in", "cubic", "(", "float8", ")" ]
def compute_uncertainty(self): """Store voxel uncertainty in cubic (float8) """ self.store_all_uncertainty_aux() self.batch_uncertainty()
[ "def", "compute_uncertainty", "(", "self", ")", ":", "self", ".", "store_all_uncertainty_aux", "(", ")", "self", ".", "batch_uncertainty", "(", ")" ]
https://github.com/vxl/vxl/blob/f7358571ada5a4b4823fb86976d55f8d6500ce64/contrib/brl/bseg/boxm2/pyscripts/boxm2_uncertainty_adaptor.py#L42-L45
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/_gdi.py
python
Pen._SetDashes
(*args, **kwargs)
return _gdi_.Pen__SetDashes(*args, **kwargs)
_SetDashes(self, PyObject _self, PyObject pyDashes)
_SetDashes(self, PyObject _self, PyObject pyDashes)
[ "_SetDashes", "(", "self", "PyObject", "_self", "PyObject", "pyDashes", ")" ]
def _SetDashes(*args, **kwargs): """_SetDashes(self, PyObject _self, PyObject pyDashes)""" return _gdi_.Pen__SetDashes(*args, **kwargs)
[ "def", "_SetDashes", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_gdi_", ".", "Pen__SetDashes", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_gdi.py#L453-L455
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
mojo/public/bindings/generators/mojom_js_generator.py
python
GetConstants
(module)
Returns a generator that enumerates all constants that can be referenced from this module.
Returns a generator that enumerates all constants that can be referenced from this module.
[ "Returns", "a", "generator", "that", "enumerates", "all", "constants", "that", "can", "be", "referenced", "from", "this", "module", "." ]
def GetConstants(module): """Returns a generator that enumerates all constants that can be referenced from this module.""" class Constant: pass for enum in module.enums: for field in enum.fields: constant = Constant() constant.namespace = module.namespace constant.is_current_namespace...
[ "def", "GetConstants", "(", "module", ")", ":", "class", "Constant", ":", "pass", "for", "enum", "in", "module", ".", "enums", ":", "for", "field", "in", "enum", ".", "fields", ":", "constant", "=", "Constant", "(", ")", "constant", ".", "namespace", "...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/mojo/public/bindings/generators/mojom_js_generator.py#L150-L173
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/inspect.py
python
iscode
(object)
return isinstance(object, types.CodeType)
Return true if the object is a code object. Code objects provide these attributes: co_argcount number of arguments (not including * or ** args) co_code string of raw compiled bytecode co_consts tuple of constants used in the bytecode co_filename name of file in...
Return true if the object is a code object.
[ "Return", "true", "if", "the", "object", "is", "a", "code", "object", "." ]
def iscode(object): """Return true if the object is a code object. Code objects provide these attributes: co_argcount number of arguments (not including * or ** args) co_code string of raw compiled bytecode co_consts tuple of constants used in the bytecode co_f...
[ "def", "iscode", "(", "object", ")", ":", "return", "isinstance", "(", "object", ",", "types", ".", "CodeType", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/inspect.py#L209-L225
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py
python
SBTypeMemberFunction.GetDescription
(self, *args)
return _lldb.SBTypeMemberFunction_GetDescription(self, *args)
GetDescription(self, SBStream description, DescriptionLevel description_level) -> bool
GetDescription(self, SBStream description, DescriptionLevel description_level) -> bool
[ "GetDescription", "(", "self", "SBStream", "description", "DescriptionLevel", "description_level", ")", "-", ">", "bool" ]
def GetDescription(self, *args): """GetDescription(self, SBStream description, DescriptionLevel description_level) -> bool""" return _lldb.SBTypeMemberFunction_GetDescription(self, *args)
[ "def", "GetDescription", "(", "self", ",", "*", "args", ")", ":", "return", "_lldb", ".", "SBTypeMemberFunction_GetDescription", "(", "self", ",", "*", "args", ")" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py#L10244-L10246
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_core.py
python
SizerFlags.GetProportion
(*args, **kwargs)
return _core_.SizerFlags_GetProportion(*args, **kwargs)
GetProportion(self) -> int Returns the proportion value to be used in the sizer item.
GetProportion(self) -> int
[ "GetProportion", "(", "self", ")", "-", ">", "int" ]
def GetProportion(*args, **kwargs): """ GetProportion(self) -> int Returns the proportion value to be used in the sizer item. """ return _core_.SizerFlags_GetProportion(*args, **kwargs)
[ "def", "GetProportion", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "SizerFlags_GetProportion", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_core.py#L13927-L13933
ideawu/ssdb-rocks
a3cbb322cafb2f493252829c608e2239df98c9ac
deps/cpy/antlr3/streams.py
python
CommonTokenStream.fillBuffer
(self)
Load all tokens from the token source and put in tokens. This is done upon first LT request because you might want to set some token type / channel overrides before filling buffer.
Load all tokens from the token source and put in tokens. This is done upon first LT request because you might want to set some token type / channel overrides before filling buffer.
[ "Load", "all", "tokens", "from", "the", "token", "source", "and", "put", "in", "tokens", ".", "This", "is", "done", "upon", "first", "LT", "request", "because", "you", "might", "want", "to", "set", "some", "token", "type", "/", "channel", "overrides", "b...
def fillBuffer(self): """ Load all tokens from the token source and put in tokens. This is done upon first LT request because you might want to set some token type / channel overrides before filling buffer. """ index = 0 t = self.tokenSource.nextToken() ...
[ "def", "fillBuffer", "(", "self", ")", ":", "index", "=", "0", "t", "=", "self", ".", "tokenSource", ".", "nextToken", "(", ")", "while", "t", "is", "not", "None", "and", "t", ".", "type", "!=", "EOF", ":", "discard", "=", "False", "if", "self", ...
https://github.com/ideawu/ssdb-rocks/blob/a3cbb322cafb2f493252829c608e2239df98c9ac/deps/cpy/antlr3/streams.py#L660-L702
microsoft/Azure-Kinect-Sensor-SDK
d87ef578676c05b9a5d23c097502942753bf3777
src/python/k4a/src/k4a/_bindings/device.py
python
Device.set_color_control
( self, color_ctrl_command:EColorControlCommand, color_ctrl_mode:EColorControlMode, color_ctrl_value:int)
return status
! Set the Azure Kinect color sensor control value. @param color_ctrl_command (EColorControlCommand): Color sensor control command to set. @param color_ctrl_mode (EColorControlMode): Color sensor control mode to set. This mode represents whether the command is in automatic ...
! Set the Azure Kinect color sensor control value.
[ "!", "Set", "the", "Azure", "Kinect", "color", "sensor", "control", "value", "." ]
def set_color_control( self, color_ctrl_command:EColorControlCommand, color_ctrl_mode:EColorControlMode, color_ctrl_value:int)->EStatus: '''! Set the Azure Kinect color sensor control value. @param color_ctrl_command (EColorControlCommand): Color sensor control ...
[ "def", "set_color_control", "(", "self", ",", "color_ctrl_command", ":", "EColorControlCommand", ",", "color_ctrl_mode", ":", "EColorControlMode", ",", "color_ctrl_value", ":", "int", ")", "->", "EStatus", ":", "value", "=", "_ctypes", ".", "c_int32", "(", "color_...
https://github.com/microsoft/Azure-Kinect-Sensor-SDK/blob/d87ef578676c05b9a5d23c097502942753bf3777/src/python/k4a/src/k4a/_bindings/device.py#L537-L573
microsoft/LightGBM
904b2d5158703c4900b68008617951dd2f9ff21b
python-package/lightgbm/basic.py
python
Dataset.create_valid
(self, data, label=None, weight=None, group=None, init_score=None, params=None)
return ret
Create validation data align with current Dataset. Parameters ---------- data : str, pathlib.Path, numpy array, pandas DataFrame, H2O DataTable's Frame, scipy.sparse, Sequence, list of Sequence or list of numpy array Data source of Dataset. If str or pathlib.Path, it rep...
Create validation data align with current Dataset.
[ "Create", "validation", "data", "align", "with", "current", "Dataset", "." ]
def create_valid(self, data, label=None, weight=None, group=None, init_score=None, params=None): """Create validation data align with current Dataset. Parameters ---------- data : str, pathlib.Path, numpy array, pandas DataFrame, H2O DataTable's Frame, scipy.sparse, Sequence, list of Se...
[ "def", "create_valid", "(", "self", ",", "data", ",", "label", "=", "None", ",", "weight", "=", "None", ",", "group", "=", "None", ",", "init_score", "=", "None", ",", "params", "=", "None", ")", ":", "ret", "=", "Dataset", "(", "data", ",", "label...
https://github.com/microsoft/LightGBM/blob/904b2d5158703c4900b68008617951dd2f9ff21b/python-package/lightgbm/basic.py#L1809-L1842
miyosuda/TensorFlowAndroidDemo
35903e0221aa5f109ea2dbef27f20b52e317f42d
jni-build/jni/include/tensorflow/python/summary/impl/io_wrapper.py
python
ListRecursively
(top)
Walks a directory tree, yielding (dir_path, file_paths) tuples. For each of `top` and its subdirectories, yields a tuple containing the path to the directory and the path to each of the contained files. Note that unlike os.Walk()/gfile.Walk(), this does not list subdirectories and the file paths are all absol...
Walks a directory tree, yielding (dir_path, file_paths) tuples.
[ "Walks", "a", "directory", "tree", "yielding", "(", "dir_path", "file_paths", ")", "tuples", "." ]
def ListRecursively(top): """Walks a directory tree, yielding (dir_path, file_paths) tuples. For each of `top` and its subdirectories, yields a tuple containing the path to the directory and the path to each of the contained files. Note that unlike os.Walk()/gfile.Walk(), this does not list subdirectories and...
[ "def", "ListRecursively", "(", "top", ")", ":", "if", "gcs", ".", "IsGCSPath", "(", "top", ")", ":", "for", "x", "in", "gcs", ".", "ListRecursively", "(", "top", ")", ":", "yield", "x", "else", ":", "for", "dir_path", ",", "_", ",", "filenames", "i...
https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/python/summary/impl/io_wrapper.py#L57-L78
chuckcho/video-caffe
fc232b3e3a90ea22dd041b9fc5c542f170581f20
scripts/cpp_lint.py
python
PrintUsage
(message)
Prints a brief usage string and exits, optionally with an error message. Args: message: The optional error message.
Prints a brief usage string and exits, optionally with an error message.
[ "Prints", "a", "brief", "usage", "string", "and", "exits", "optionally", "with", "an", "error", "message", "." ]
def PrintUsage(message): """Prints a brief usage string and exits, optionally with an error message. Args: message: The optional error message. """ sys.stderr.write(_USAGE) if message: sys.exit('\nFATAL ERROR: ' + message) else: sys.exit(1)
[ "def", "PrintUsage", "(", "message", ")", ":", "sys", ".", "stderr", ".", "write", "(", "_USAGE", ")", "if", "message", ":", "sys", ".", "exit", "(", "'\\nFATAL ERROR: '", "+", "message", ")", "else", ":", "sys", ".", "exit", "(", "1", ")" ]
https://github.com/chuckcho/video-caffe/blob/fc232b3e3a90ea22dd041b9fc5c542f170581f20/scripts/cpp_lint.py#L4763-L4773
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py
python
SBTypeCategory.GetLanguageAtIndex
(self, *args)
return _lldb.SBTypeCategory_GetLanguageAtIndex(self, *args)
GetLanguageAtIndex(self, uint32_t idx) -> LanguageType
GetLanguageAtIndex(self, uint32_t idx) -> LanguageType
[ "GetLanguageAtIndex", "(", "self", "uint32_t", "idx", ")", "-", ">", "LanguageType" ]
def GetLanguageAtIndex(self, *args): """GetLanguageAtIndex(self, uint32_t idx) -> LanguageType""" return _lldb.SBTypeCategory_GetLanguageAtIndex(self, *args)
[ "def", "GetLanguageAtIndex", "(", "self", ",", "*", "args", ")", ":", "return", "_lldb", ".", "SBTypeCategory_GetLanguageAtIndex", "(", "self", ",", "*", "args", ")" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py#L10752-L10754
BlzFans/wke
b0fa21158312e40c5fbd84682d643022b6c34a93
cygwin/lib/python2.6/email/charset.py
python
Charset.convert
(self, s)
Convert a string from the input_codec to the output_codec.
Convert a string from the input_codec to the output_codec.
[ "Convert", "a", "string", "from", "the", "input_codec", "to", "the", "output_codec", "." ]
def convert(self, s): """Convert a string from the input_codec to the output_codec.""" if self.input_codec != self.output_codec: return unicode(s, self.input_codec).encode(self.output_codec) else: return s
[ "def", "convert", "(", "self", ",", "s", ")", ":", "if", "self", ".", "input_codec", "!=", "self", ".", "output_codec", ":", "return", "unicode", "(", "s", ",", "self", ".", "input_codec", ")", ".", "encode", "(", "self", ".", "output_codec", ")", "e...
https://github.com/BlzFans/wke/blob/b0fa21158312e40c5fbd84682d643022b6c34a93/cygwin/lib/python2.6/email/charset.py#L264-L269
BestSonny/SSTD
174d452189f6bf9cf4b6957719392008bd974069
python/caffe/io.py
python
Transformer.set_input_scale
(self, in_, scale)
Set the scale of preprocessed inputs s.t. the blob = blob * scale. N.B. input_scale is done AFTER mean subtraction and other preprocessing while raw_scale is done BEFORE. Parameters ---------- in_ : which input to assign this scale factor scale : scale coefficient
Set the scale of preprocessed inputs s.t. the blob = blob * scale. N.B. input_scale is done AFTER mean subtraction and other preprocessing while raw_scale is done BEFORE.
[ "Set", "the", "scale", "of", "preprocessed", "inputs", "s", ".", "t", ".", "the", "blob", "=", "blob", "*", "scale", ".", "N", ".", "B", ".", "input_scale", "is", "done", "AFTER", "mean", "subtraction", "and", "other", "preprocessing", "while", "raw_scal...
def set_input_scale(self, in_, scale): """ Set the scale of preprocessed inputs s.t. the blob = blob * scale. N.B. input_scale is done AFTER mean subtraction and other preprocessing while raw_scale is done BEFORE. Parameters ---------- in_ : which input to assign...
[ "def", "set_input_scale", "(", "self", ",", "in_", ",", "scale", ")", ":", "self", ".", "__check_input", "(", "in_", ")", "self", ".", "input_scale", "[", "in_", "]", "=", "scale" ]
https://github.com/BestSonny/SSTD/blob/174d452189f6bf9cf4b6957719392008bd974069/python/caffe/io.py#L262-L274
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/python2_version/klampt/src/robotsim.py
python
Geometry3D.setCollisionMargin
(self, margin)
return _robotsim.Geometry3D_setCollisionMargin(self, margin)
setCollisionMargin(Geometry3D self, double margin) Sets a padding around the base geometry which affects the results of proximity queries.
setCollisionMargin(Geometry3D self, double margin)
[ "setCollisionMargin", "(", "Geometry3D", "self", "double", "margin", ")" ]
def setCollisionMargin(self, margin): """ setCollisionMargin(Geometry3D self, double margin) Sets a padding around the base geometry which affects the results of proximity queries. """ return _robotsim.Geometry3D_setCollisionMargin(self, margin)
[ "def", "setCollisionMargin", "(", "self", ",", "margin", ")", ":", "return", "_robotsim", ".", "Geometry3D_setCollisionMargin", "(", "self", ",", "margin", ")" ]
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/python2_version/klampt/src/robotsim.py#L2223-L2233
pytorch/pytorch
7176c92687d3cc847cc046bf002269c6949a21c2
torch/fx/experimental/fx_acc/acc_ops.py
python
packed_quantized_convrelu2d_mapper
( node: torch.fx.Node, mod: nn.Module )
Mapping from quantized ConvReLU2d module to acc_op.relu. We use packed_quantized_conv2d_mapper to unpack all the parameters in this mapper and pass the returned conv2d node directly to relu node.
Mapping from quantized ConvReLU2d module to acc_op.relu. We use packed_quantized_conv2d_mapper to unpack all the parameters in this mapper and pass the returned conv2d node directly to relu node.
[ "Mapping", "from", "quantized", "ConvReLU2d", "module", "to", "acc_op", ".", "relu", ".", "We", "use", "packed_quantized_conv2d_mapper", "to", "unpack", "all", "the", "parameters", "in", "this", "mapper", "and", "pass", "the", "returned", "conv2d", "node", "dire...
def packed_quantized_convrelu2d_mapper( node: torch.fx.Node, mod: nn.Module ) -> torch.fx.Node: """ Mapping from quantized ConvReLU2d module to acc_op.relu. We use packed_quantized_conv2d_mapper to unpack all the parameters in this mapper and pass the returned conv2d node directly to relu node. """ ...
[ "def", "packed_quantized_convrelu2d_mapper", "(", "node", ":", "torch", ".", "fx", ".", "Node", ",", "mod", ":", "nn", ".", "Module", ")", "->", "torch", ".", "fx", ".", "Node", ":", "with", "node", ".", "graph", ".", "inserting_before", "(", "node", "...
https://github.com/pytorch/pytorch/blob/7176c92687d3cc847cc046bf002269c6949a21c2/torch/fx/experimental/fx_acc/acc_ops.py#L1883-L1900
NVlabs/fermat
06e8c03ac59ab440cbb13897f90631ef1861e769
contrib/assimp-4.1.0/port/PyAssimp/scripts/transformations.py
python
superimposition_matrix
(v0, v1, scaling=False, usesvd=True)
return M
Return matrix to transform given vector set into second vector set. v0 and v1 are shape (3, \*) or (4, \*) arrays of at least 3 vectors. If usesvd is True, the weighted sum of squared deviations (RMSD) is minimized according to the algorithm by W. Kabsch [8]. Otherwise the quaternion based algorithm b...
Return matrix to transform given vector set into second vector set.
[ "Return", "matrix", "to", "transform", "given", "vector", "set", "into", "second", "vector", "set", "." ]
def superimposition_matrix(v0, v1, scaling=False, usesvd=True): """Return matrix to transform given vector set into second vector set. v0 and v1 are shape (3, \*) or (4, \*) arrays of at least 3 vectors. If usesvd is True, the weighted sum of squared deviations (RMSD) is minimized according to the alg...
[ "def", "superimposition_matrix", "(", "v0", ",", "v1", ",", "scaling", "=", "False", ",", "usesvd", "=", "True", ")", ":", "v0", "=", "numpy", ".", "array", "(", "v0", ",", "dtype", "=", "numpy", ".", "float64", ",", "copy", "=", "False", ")", "[",...
https://github.com/NVlabs/fermat/blob/06e8c03ac59ab440cbb13897f90631ef1861e769/contrib/assimp-4.1.0/port/PyAssimp/scripts/transformations.py#L866-L965
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
gpu/command_buffer/build_gles2_cmd_buffer.py
python
TypeHandler.WriteImmediateServiceUnitTest
(self, func, file)
Writes the service unit test for an immediate command.
Writes the service unit test for an immediate command.
[ "Writes", "the", "service", "unit", "test", "for", "an", "immediate", "command", "." ]
def WriteImmediateServiceUnitTest(self, func, file): """Writes the service unit test for an immediate command.""" file.Write("// TODO(gman): %s\n" % func.name)
[ "def", "WriteImmediateServiceUnitTest", "(", "self", ",", "func", ",", "file", ")", ":", "file", ".", "Write", "(", "\"// TODO(gman): %s\\n\"", "%", "func", ".", "name", ")" ]
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/gpu/command_buffer/build_gles2_cmd_buffer.py#L2999-L3001
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/pdb.py
python
Pdb.do_whatis
(self, arg)
whatis arg Print the type of the argument.
whatis arg Print the type of the argument.
[ "whatis", "arg", "Print", "the", "type", "of", "the", "argument", "." ]
def do_whatis(self, arg): """whatis arg Print the type of the argument. """ try: value = self._getval(arg) except: # _getval() already printed the error return code = None # Is it a function? try: code = valu...
[ "def", "do_whatis", "(", "self", ",", "arg", ")", ":", "try", ":", "value", "=", "self", ".", "_getval", "(", "arg", ")", "except", ":", "# _getval() already printed the error", "return", "code", "=", "None", "# Is it a function?", "try", ":", "code", "=", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/pdb.py#L1299-L1330
openvinotoolkit/openvino
dedcbeafa8b84cccdc55ca64b8da516682b381c7
src/bindings/python/src/compatibility/ngraph/opset8/ops.py
python
multiclass_nms
( boxes: NodeInput, scores: NodeInput, sort_result_type: str = "none", sort_result_across_batch: bool = False, output_type: str = "i64", iou_threshold: float = 0.0, score_threshold: float = 0.0, nms_top_k: int = -1, keep_top_k: int = -1, ba...
return _get_node_factory_opset8().create("MulticlassNms", inputs, attributes)
Return a node which performs MulticlassNms. @param boxes: Tensor with box coordinates. @param scores: Tensor with box scores. @param sort_result_type: Specifies order of output elements, possible values: 'class': sort selected boxes by class id (ascending) ...
Return a node which performs MulticlassNms.
[ "Return", "a", "node", "which", "performs", "MulticlassNms", "." ]
def multiclass_nms( boxes: NodeInput, scores: NodeInput, sort_result_type: str = "none", sort_result_across_batch: bool = False, output_type: str = "i64", iou_threshold: float = 0.0, score_threshold: float = 0.0, nms_top_k: int = -1, keep_top_k: in...
[ "def", "multiclass_nms", "(", "boxes", ":", "NodeInput", ",", "scores", ":", "NodeInput", ",", "sort_result_type", ":", "str", "=", "\"none\"", ",", "sort_result_across_batch", ":", "bool", "=", "False", ",", "output_type", ":", "str", "=", "\"i64\"", ",", "...
https://github.com/openvinotoolkit/openvino/blob/dedcbeafa8b84cccdc55ca64b8da516682b381c7/src/bindings/python/src/compatibility/ngraph/opset8/ops.py#L130-L182
gnuradio/gnuradio
09c3c4fa4bfb1a02caac74cb5334dfe065391e3b
gr-utils/modtool/templates/gr-newmod/docs/doxygen/other/doxypy.py
python
Doxypy.appendCommentLine
(self, match)
Appends a comment line. The comment delimiter is removed from multiline start and ends as well as singleline comments.
Appends a comment line.
[ "Appends", "a", "comment", "line", "." ]
def appendCommentLine(self, match): """Appends a comment line. The comment delimiter is removed from multiline start and ends as well as singleline comments. """ if args.debug: print("# CALLBACK: appendCommentLine", file=sys.stderr) (from_state, to_state, con...
[ "def", "appendCommentLine", "(", "self", ",", "match", ")", ":", "if", "args", ".", "debug", ":", "print", "(", "\"# CALLBACK: appendCommentLine\"", ",", "file", "=", "sys", ".", "stderr", ")", "(", "from_state", ",", "to_state", ",", "condition", ",", "ca...
https://github.com/gnuradio/gnuradio/blob/09c3c4fa4bfb1a02caac74cb5334dfe065391e3b/gr-utils/modtool/templates/gr-newmod/docs/doxygen/other/doxypy.py#L304-L345
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
tools/perf/metrics/histogram_util.py
python
SubtractHistogram
(histogram_json, start_histogram_json)
return json.dumps(histogram)
Subtracts a previous histogram from a histogram. Both parameters and the returned result are json serializations.
Subtracts a previous histogram from a histogram.
[ "Subtracts", "a", "previous", "histogram", "from", "a", "histogram", "." ]
def SubtractHistogram(histogram_json, start_histogram_json): """Subtracts a previous histogram from a histogram. Both parameters and the returned result are json serializations. """ start_histogram = json.loads(start_histogram_json) # It's ok if the start histogram is empty (we had no data, maybe even no #...
[ "def", "SubtractHistogram", "(", "histogram_json", ",", "start_histogram_json", ")", ":", "start_histogram", "=", "json", ".", "loads", "(", "start_histogram_json", ")", "# It's ok if the start histogram is empty (we had no data, maybe even no", "# histogram at all, at the start of...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/tools/perf/metrics/histogram_util.py#L23-L59
weolar/miniblink49
1c4678db0594a4abde23d3ebbcc7cd13c3170777
third_party/WebKit/Source/bindings/scripts/v8_types.py
python
v8_set_return_value
(idl_type, cpp_value, extended_attributes=None, script_wrappable='', release=False, for_main_world=False, is_static=False)
return statement
Returns a statement that converts a C++ value to a V8 value and sets it as a return value.
Returns a statement that converts a C++ value to a V8 value and sets it as a return value.
[ "Returns", "a", "statement", "that", "converts", "a", "C", "++", "value", "to", "a", "V8", "value", "and", "sets", "it", "as", "a", "return", "value", "." ]
def v8_set_return_value(idl_type, cpp_value, extended_attributes=None, script_wrappable='', release=False, for_main_world=False, is_static=False): """Returns a statement that converts a C++ value to a V8 value and sets it as a return value. """ def dom_wrapper_conversion_type(): if is_static: ...
[ "def", "v8_set_return_value", "(", "idl_type", ",", "cpp_value", ",", "extended_attributes", "=", "None", ",", "script_wrappable", "=", "''", ",", "release", "=", "False", ",", "for_main_world", "=", "False", ",", "is_static", "=", "False", ")", ":", "def", ...
https://github.com/weolar/miniblink49/blob/1c4678db0594a4abde23d3ebbcc7cd13c3170777/third_party/WebKit/Source/bindings/scripts/v8_types.py#L820-L849
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_gdi.py
python
PseudoDC.DrawArc
(*args, **kwargs)
return _gdi_.PseudoDC_DrawArc(*args, **kwargs)
DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc) Draws an arc of a circle, centred on the *center* point (xc, yc), from the first point to the second. The current pen is used for the outline and the current brush for filling the shape. The arc is drawn in an anticlockwise ...
DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
[ "DrawArc", "(", "self", "int", "x1", "int", "y1", "int", "x2", "int", "y2", "int", "xc", "int", "yc", ")" ]
def DrawArc(*args, **kwargs): """ DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc) Draws an arc of a circle, centred on the *center* point (xc, yc), from the first point to the second. The current pen is used for the outline and the current brush for filling the sha...
[ "def", "DrawArc", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_gdi_", ".", "PseudoDC_DrawArc", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_gdi.py#L7822-L7833
hfinkel/llvm-project-cxxjit
91084ef018240bbb8e24235ff5cd8c355a9c1a1e
clang/bindings/python/clang/cindex.py
python
Cursor.is_move_constructor
(self)
return conf.lib.clang_CXXConstructor_isMoveConstructor(self)
Returns True if the cursor refers to a C++ move constructor.
Returns True if the cursor refers to a C++ move constructor.
[ "Returns", "True", "if", "the", "cursor", "refers", "to", "a", "C", "++", "move", "constructor", "." ]
def is_move_constructor(self): """Returns True if the cursor refers to a C++ move constructor. """ return conf.lib.clang_CXXConstructor_isMoveConstructor(self)
[ "def", "is_move_constructor", "(", "self", ")", ":", "return", "conf", ".", "lib", ".", "clang_CXXConstructor_isMoveConstructor", "(", "self", ")" ]
https://github.com/hfinkel/llvm-project-cxxjit/blob/91084ef018240bbb8e24235ff5cd8c355a9c1a1e/clang/bindings/python/clang/cindex.py#L1462-L1465
google/llvm-propeller
45c226984fe8377ebfb2ad7713c680d652ba678d
compiler-rt/lib/sanitizer_common/scripts/cpplint.py
python
CheckSpacingForFunctionCall
(filename, clean_lines, linenum, error)
Checks for the correctness of various spacing around function calls. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found.
Checks for the correctness of various spacing around function calls.
[ "Checks", "for", "the", "correctness", "of", "various", "spacing", "around", "function", "calls", "." ]
def CheckSpacingForFunctionCall(filename, clean_lines, linenum, error): """Checks for the correctness of various spacing around function calls. 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: T...
[ "def", "CheckSpacingForFunctionCall", "(", "filename", ",", "clean_lines", ",", "linenum", ",", "error", ")", ":", "line", "=", "clean_lines", ".", "elided", "[", "linenum", "]", "# Since function calls often occur inside if/for/while/switch", "# expressions - which have th...
https://github.com/google/llvm-propeller/blob/45c226984fe8377ebfb2ad7713c680d652ba678d/compiler-rt/lib/sanitizer_common/scripts/cpplint.py#L2940-L3014
NVIDIA/MDL-SDK
aa9642b2546ad7b6236b5627385d882c2ed83c5d
src/mdl/jit/llvm/dist/bindings/python/llvm/object.py
python
Section.size
(self)
return lib.LLVMGetSectionSize(self)
The size of the section, in long bytes.
The size of the section, in long bytes.
[ "The", "size", "of", "the", "section", "in", "long", "bytes", "." ]
def size(self): """The size of the section, in long bytes.""" if self.expired: raise Exception('Section instance has expired.') return lib.LLVMGetSectionSize(self)
[ "def", "size", "(", "self", ")", ":", "if", "self", ".", "expired", ":", "raise", "Exception", "(", "'Section instance has expired.'", ")", "return", "lib", ".", "LLVMGetSectionSize", "(", "self", ")" ]
https://github.com/NVIDIA/MDL-SDK/blob/aa9642b2546ad7b6236b5627385d882c2ed83c5d/src/mdl/jit/llvm/dist/bindings/python/llvm/object.py#L205-L210
lballabio/quantlib-old
136336947ed4fea9ecc1da6edad188700e821739
gensrc/gensrc/addins/calc.py
python
CalcAddin.loopName
(self, param)
return param.name()
Return the name of the given parameter as required for loop code - in this case no conversion is performed.
Return the name of the given parameter as required for loop code - in this case no conversion is performed.
[ "Return", "the", "name", "of", "the", "given", "parameter", "as", "required", "for", "loop", "code", "-", "in", "this", "case", "no", "conversion", "is", "performed", "." ]
def loopName(self, param): """Return the name of the given parameter as required for loop code - in this case no conversion is performed.""" return param.name()
[ "def", "loopName", "(", "self", ",", "param", ")", ":", "return", "param", ".", "name", "(", ")" ]
https://github.com/lballabio/quantlib-old/blob/136336947ed4fea9ecc1da6edad188700e821739/gensrc/gensrc/addins/calc.py#L246-L249
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py
python
BaseWidget.destroy
(self)
Destroy this and all descendants widgets.
Destroy this and all descendants widgets.
[ "Destroy", "this", "and", "all", "descendants", "widgets", "." ]
def destroy(self): """Destroy this and all descendants widgets.""" for c in list(self.children.values()): c.destroy() self.tk.call('destroy', self._w) if self._name in self.master.children: del self.master.children[self._name] Misc.destroy(self)
[ "def", "destroy", "(", "self", ")", ":", "for", "c", "in", "list", "(", "self", ".", "children", ".", "values", "(", ")", ")", ":", "c", ".", "destroy", "(", ")", "self", ".", "tk", ".", "call", "(", "'destroy'", ",", "self", ".", "_w", ")", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py#L2302-L2308
eventql/eventql
7ca0dbb2e683b525620ea30dc40540a22d5eb227
deps/3rdparty/spidermonkey/mozjs/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/msvs.py
python
_GenerateMSBuildFiltersFile
(filters_path, source_files, extension_to_rule_name)
Generate the filters file. This file is used by Visual Studio to organize the presentation of source files into folders. Arguments: filters_path: The path of the file to be created. source_files: The hierarchical structure of all the sources. extension_to_rule_name: A dictionary mapping file e...
Generate the filters file.
[ "Generate", "the", "filters", "file", "." ]
def _GenerateMSBuildFiltersFile(filters_path, source_files, extension_to_rule_name): """Generate the filters file. This file is used by Visual Studio to organize the presentation of source files into folders. Arguments: filters_path: The path of the file to be created. ...
[ "def", "_GenerateMSBuildFiltersFile", "(", "filters_path", ",", "source_files", ",", "extension_to_rule_name", ")", ":", "filter_group", "=", "[", "]", "source_group", "=", "[", "]", "_AppendFiltersForMSBuild", "(", "''", ",", "source_files", ",", "extension_to_rule_n...
https://github.com/eventql/eventql/blob/7ca0dbb2e683b525620ea30dc40540a22d5eb227/deps/3rdparty/spidermonkey/mozjs/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/msvs.py#L1880-L1907
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/python/ops/candidate_sampling_ops.py
python
compute_accidental_hits
(true_classes, sampled_candidates, num_true, seed=None, name=None)
return gen_candidate_sampling_ops._compute_accidental_hits( true_classes, sampled_candidates, num_true, seed=seed1, seed2=seed2, name=name)
Compute the position ids in `sampled_candidates` matching `true_classes`. In Candidate Sampling, this operation facilitates virtually removing sampled classes which happen to match target classes. This is done in Sampled Softmax and Sampled Logistic. See our [Candidate Sampling Algorithms Reference](http:/...
Compute the position ids in `sampled_candidates` matching `true_classes`.
[ "Compute", "the", "position", "ids", "in", "sampled_candidates", "matching", "true_classes", "." ]
def compute_accidental_hits(true_classes, sampled_candidates, num_true, seed=None, name=None): """Compute the position ids in `sampled_candidates` matching `true_classes`. In Candidate Sampling, this operation facilitates virtually removing sampled classes which happen to match target...
[ "def", "compute_accidental_hits", "(", "true_classes", ",", "sampled_candidates", ",", "num_true", ",", "seed", "=", "None", ",", "name", "=", "None", ")", ":", "seed1", ",", "seed2", "=", "random_seed", ".", "get_seed", "(", "seed", ")", "return", "gen_cand...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/python/ops/candidate_sampling_ops.py#L323-L368
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/contrib/distributions/python/ops/operator_pd_vdvt_update.py
python
OperatorPDSqrtVDVTUpdate.__init__
(self, operator, v, diag=None, verify_pd=True, verify_shapes=True, name='OperatorPDSqrtVDVTUpdate')
Initialize an `OperatorPDSqrtVDVTUpdate`. Args: operator: Subclass of `OperatorPDBase`. Represents the (batch) positive definite matrix `M` in `R^{k x k}`. v: `Tensor` defining batch matrix of same `dtype` and `batch_shape` as `operator`, and last two dimensions of shape `(k, r)`. ...
Initialize an `OperatorPDSqrtVDVTUpdate`.
[ "Initialize", "an", "OperatorPDSqrtVDVTUpdate", "." ]
def __init__(self, operator, v, diag=None, verify_pd=True, verify_shapes=True, name='OperatorPDSqrtVDVTUpdate'): """Initialize an `OperatorPDSqrtVDVTUpdate`. Args: operator: Subclass of `OperatorPDBase`. Represent...
[ "def", "__init__", "(", "self", ",", "operator", ",", "v", ",", "diag", "=", "None", ",", "verify_pd", "=", "True", ",", "verify_shapes", "=", "True", ",", "name", "=", "'OperatorPDSqrtVDVTUpdate'", ")", ":", "if", "not", "isinstance", "(", "operator", "...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/contrib/distributions/python/ops/operator_pd_vdvt_update.py#L79-L135
kitao/pyxel
f58bd6fe84153219a1e5edc506ae9606614883dc
pyxel/examples/07_snake.py
python
define_sound_and_music
()
Define sound and music.
Define sound and music.
[ "Define", "sound", "and", "music", "." ]
def define_sound_and_music(): """Define sound and music.""" # Sound effects pyxel.sound(0).set( notes="c3e3g3c4c4", tones="s", volumes="4", effects=("n" * 4 + "f"), speed=7 ) pyxel.sound(1).set( notes="f3 b2 f2 b1 f1 f1 f1 f1", tones="p", volumes=("4" * 4 + "4321"),...
[ "def", "define_sound_and_music", "(", ")", ":", "# Sound effects", "pyxel", ".", "sound", "(", "0", ")", ".", "set", "(", "notes", "=", "\"c3e3g3c4c4\"", ",", "tones", "=", "\"s\"", ",", "volumes", "=", "\"4\"", ",", "effects", "=", "(", "\"n\"", "*", ...
https://github.com/kitao/pyxel/blob/f58bd6fe84153219a1e5edc506ae9606614883dc/pyxel/examples/07_snake.py#L217-L283
wujian16/Cornell-MOE
df299d1be882d2af9796d7a68b3f9505cac7a53e
moe/optimal_learning/python/interfaces/covariance_interface.py
python
CovarianceInterface.grad_covariance
(self, point_one, point_two)
r"""Compute the gradient of self.covariance(point_one, point_two) with respect to the FIRST argument, point_one. .. Note:: comments are copied from the matching method comments of CovarianceInterface in gpp_covariance.hpp and comments are copied to the matching method comments of :mod:`moe....
r"""Compute the gradient of self.covariance(point_one, point_two) with respect to the FIRST argument, point_one.
[ "r", "Compute", "the", "gradient", "of", "self", ".", "covariance", "(", "point_one", "point_two", ")", "with", "respect", "to", "the", "FIRST", "argument", "point_one", "." ]
def grad_covariance(self, point_one, point_two): r"""Compute the gradient of self.covariance(point_one, point_two) with respect to the FIRST argument, point_one. .. Note:: comments are copied from the matching method comments of CovarianceInterface in gpp_covariance.hpp and comments are copie...
[ "def", "grad_covariance", "(", "self", ",", "point_one", ",", "point_two", ")", ":", "pass" ]
https://github.com/wujian16/Cornell-MOE/blob/df299d1be882d2af9796d7a68b3f9505cac7a53e/moe/optimal_learning/python/interfaces/covariance_interface.py#L95-L117
Tencent/CMONGO
c40380caa14e05509f46993aa8b8da966b09b0b5
src/third_party/scons-2.5.0/scons-local-2.5.0/SCons/SConsign.py
python
DirFile.write
(self, sync=1)
Write the .sconsign file to disk. Try to write to a temporary file first, and rename it if we succeed. If we can't write to the temporary file, it's probably because the directory isn't writable (and if so, how did we build anything in this directory, anyway?), so try to write ...
Write the .sconsign file to disk.
[ "Write", "the", ".", "sconsign", "file", "to", "disk", "." ]
def write(self, sync=1): """ Write the .sconsign file to disk. Try to write to a temporary file first, and rename it if we succeed. If we can't write to the temporary file, it's probably because the directory isn't writable (and if so, how did we build anything in this ...
[ "def", "write", "(", "self", ",", "sync", "=", "1", ")", ":", "if", "not", "self", ".", "dirty", ":", "return", "self", ".", "merge", "(", ")", "temp", "=", "os", ".", "path", ".", "join", "(", "self", ".", "dir", ".", "get_internal_path", "(", ...
https://github.com/Tencent/CMONGO/blob/c40380caa14e05509f46993aa8b8da966b09b0b5/src/third_party/scons-2.5.0/scons-local-2.5.0/SCons/SConsign.py#L332-L390
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/contrib/learn/python/learn/datasets/base.py
python
load_csv_with_header
(filename, target_dtype, features_dtype, target_column=-1)
return Dataset(data=data, target=target)
Load dataset from CSV file with a header row.
Load dataset from CSV file with a header row.
[ "Load", "dataset", "from", "CSV", "file", "with", "a", "header", "row", "." ]
def load_csv_with_header(filename, target_dtype, features_dtype, target_column=-1): """Load dataset from CSV file with a header row.""" with gfile.Open(filename) as csv_file: data_file = csv.reader(csv_file) header = next(data_file) ...
[ "def", "load_csv_with_header", "(", "filename", ",", "target_dtype", ",", "features_dtype", ",", "target_column", "=", "-", "1", ")", ":", "with", "gfile", ".", "Open", "(", "filename", ")", "as", "csv_file", ":", "data_file", "=", "csv", ".", "reader", "(...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/contrib/learn/python/learn/datasets/base.py#L53-L69
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/python/ops/io_ops.py
python
_RestoreShape
(op)
return [tensor_shape.unknown_shape()]
Shape function for Restore op.
Shape function for Restore op.
[ "Shape", "function", "for", "Restore", "op", "." ]
def _RestoreShape(op): """Shape function for Restore op.""" # Validate input shapes. unused_file_pattern = op.inputs[0].get_shape().merge_with( tensor_shape.scalar()) unused_tensor_name = op.inputs[1].get_shape().merge_with( tensor_shape.scalar()) return [tensor_shape.unknown_shape()]
[ "def", "_RestoreShape", "(", "op", ")", ":", "# Validate input shapes.", "unused_file_pattern", "=", "op", ".", "inputs", "[", "0", "]", ".", "get_shape", "(", ")", ".", "merge_with", "(", "tensor_shape", ".", "scalar", "(", ")", ")", "unused_tensor_name", "...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/python/ops/io_ops.py#L207-L214
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/botocore/paginate.py
python
TokenEncoder._encode
(self, data, path)
Encode bytes in given data, keeping track of the path traversed.
Encode bytes in given data, keeping track of the path traversed.
[ "Encode", "bytes", "in", "given", "data", "keeping", "track", "of", "the", "path", "traversed", "." ]
def _encode(self, data, path): """Encode bytes in given data, keeping track of the path traversed.""" if isinstance(data, dict): return self._encode_dict(data, path) elif isinstance(data, list): return self._encode_list(data, path) elif isinstance(data, six.binary...
[ "def", "_encode", "(", "self", ",", "data", ",", "path", ")", ":", "if", "isinstance", "(", "data", ",", "dict", ")", ":", "return", "self", ".", "_encode_dict", "(", "data", ",", "path", ")", "elif", "isinstance", "(", "data", ",", "list", ")", ":...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/botocore/paginate.py#L70-L79
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/results_tab_widget/results_tab_model.py
python
ResultsTabModel.create_results_table
(self, log_selection, results_selection)
return results_table
Create a TableWorkspace with the fit results and logs combined. The format is a single row per workspace with columns: |workspace_name|selected_log_1|selected_log_2|...|param1_|param1_err|param2|param2_err|...| Any time-series log values are averaged. The workspace is added to the ADS ...
Create a TableWorkspace with the fit results and logs combined. The format is a single row per workspace with columns: |workspace_name|selected_log_1|selected_log_2|...|param1_|param1_err|param2|param2_err|...| Any time-series log values are averaged. The workspace is added to the ADS ...
[ "Create", "a", "TableWorkspace", "with", "the", "fit", "results", "and", "logs", "combined", ".", "The", "format", "is", "a", "single", "row", "per", "workspace", "with", "columns", ":", "|workspace_name|selected_log_1|selected_log_2|", "...", "|param1_|param1_err|par...
def create_results_table(self, log_selection, results_selection): """Create a TableWorkspace with the fit results and logs combined. The format is a single row per workspace with columns: |workspace_name|selected_log_1|selected_log_2|...|param1_|param1_err|param2|param2_err|...| Any ti...
[ "def", "create_results_table", "(", "self", ",", "log_selection", ",", "results_selection", ")", ":", "self", ".", "_raise_error_on_incompatible_selection", "(", "log_selection", ",", "results_selection", ")", "all_fits", "=", "self", ".", "_fit_context", ".", "all_la...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/results_tab_widget/results_tab_model.py#L124-L153
mapsme/omim
1892903b63f2c85b16ed4966d21fe76aba06b9ba
tools/python/maps_generator/maps_generator.py
python
generate_maps
(env: Env, from_stage: Optional[AnyStr] = None)
Runs maps generation.
Runs maps generation.
[ "Runs", "maps", "generation", "." ]
def generate_maps(env: Env, from_stage: Optional[AnyStr] = None): """"Runs maps generation.""" stages = ( sd.StageDownloadAndConvertPlanet(), sd.StageUpdatePlanet(), sd.StageCoastline(), sd.StagePreprocess(), sd.StageFeatures(), sd.StageDownloadDescriptions(), ...
[ "def", "generate_maps", "(", "env", ":", "Env", ",", "from_stage", ":", "Optional", "[", "AnyStr", "]", "=", "None", ")", ":", "stages", "=", "(", "sd", ".", "StageDownloadAndConvertPlanet", "(", ")", ",", "sd", ".", "StageUpdatePlanet", "(", ")", ",", ...
https://github.com/mapsme/omim/blob/1892903b63f2c85b16ed4966d21fe76aba06b9ba/tools/python/maps_generator/maps_generator.py#L27-L44
msitt/blpapi-python
bebcf43668c9e5f5467b1f685f9baebbfc45bc87
src/blpapi/constant.py
python
Constant._sessions
(self)
return self.__sessions
Return session(s) this object is related to. For internal use.
Return session(s) this object is related to. For internal use.
[ "Return", "session", "(", "s", ")", "this", "object", "is", "related", "to", ".", "For", "internal", "use", "." ]
def _sessions(self): """Return session(s) this object is related to. For internal use.""" return self.__sessions
[ "def", "_sessions", "(", "self", ")", ":", "return", "self", ".", "__sessions" ]
https://github.com/msitt/blpapi-python/blob/bebcf43668c9e5f5467b1f685f9baebbfc45bc87/src/blpapi/constant.py#L167-L169
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
components/policy/tools/make_policy_zip.py
python
main
(argv)
Pack a list of files into a zip archive. Args: zip_path: The file name of the zip archive. base_dir: Base path of input files. locales: The list of locales that are used to generate the list of file names using INPUT_FILES.
Pack a list of files into a zip archive.
[ "Pack", "a", "list", "of", "files", "into", "a", "zip", "archive", "." ]
def main(argv): """Pack a list of files into a zip archive. Args: zip_path: The file name of the zip archive. base_dir: Base path of input files. locales: The list of locales that are used to generate the list of file names using INPUT_FILES. """ parser = optparse.OptionParser() parser.ad...
[ "def", "main", "(", "argv", ")", ":", "parser", "=", "optparse", ".", "OptionParser", "(", ")", "parser", ".", "add_option", "(", "\"--output\"", ",", "dest", "=", "\"output\"", ")", "parser", ".", "add_option", "(", "\"--basedir\"", ",", "dest", "=", "\...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/components/policy/tools/make_policy_zip.py#L45-L79
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/python/ops/control_flow_ops.py
python
GradLoopState.forward_index
(self)
return self._forward_index
The loop index of forward loop.
The loop index of forward loop.
[ "The", "loop", "index", "of", "forward", "loop", "." ]
def forward_index(self): """The loop index of forward loop.""" return self._forward_index
[ "def", "forward_index", "(", "self", ")", ":", "return", "self", ".", "_forward_index" ]
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/python/ops/control_flow_ops.py#L571-L573
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/dataview.py
python
DataViewTreeStoreNodeList.__contains__
(*args, **kwargs)
return _dataview.DataViewTreeStoreNodeList___contains__(*args, **kwargs)
__contains__(self, DataViewTreeStoreNode obj) -> bool
__contains__(self, DataViewTreeStoreNode obj) -> bool
[ "__contains__", "(", "self", "DataViewTreeStoreNode", "obj", ")", "-", ">", "bool" ]
def __contains__(*args, **kwargs): """__contains__(self, DataViewTreeStoreNode obj) -> bool""" return _dataview.DataViewTreeStoreNodeList___contains__(*args, **kwargs)
[ "def", "__contains__", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_dataview", ".", "DataViewTreeStoreNodeList___contains__", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/dataview.py#L2297-L2299
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py3/pandas/core/indexes/base.py
python
Index._maybe_disallow_fill
(self, allow_fill: bool, fill_value, indices)
return allow_fill
We only use pandas-style take when allow_fill is True _and_ fill_value is not None.
We only use pandas-style take when allow_fill is True _and_ fill_value is not None.
[ "We", "only", "use", "pandas", "-", "style", "take", "when", "allow_fill", "is", "True", "_and_", "fill_value", "is", "not", "None", "." ]
def _maybe_disallow_fill(self, allow_fill: bool, fill_value, indices) -> bool: """ We only use pandas-style take when allow_fill is True _and_ fill_value is not None. """ if allow_fill and fill_value is not None: # only fill if we are passing a non-None fill_value ...
[ "def", "_maybe_disallow_fill", "(", "self", ",", "allow_fill", ":", "bool", ",", "fill_value", ",", "indices", ")", "->", "bool", ":", "if", "allow_fill", "and", "fill_value", "is", "not", "None", ":", "# only fill if we are passing a non-None fill_value", "if", "...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/core/indexes/base.py#L967-L987
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/getopt.py
python
gnu_getopt
(args, shortopts, longopts = [])
return opts, prog_args
getopt(args, options[, long_options]) -> opts, args This function works like getopt(), except that GNU style scanning mode is used by default. This means that option and non-option arguments may be intermixed. The getopt() function stops processing options as soon as a non-option argument is encoun...
getopt(args, options[, long_options]) -> opts, args
[ "getopt", "(", "args", "options", "[", "long_options", "]", ")", "-", ">", "opts", "args" ]
def gnu_getopt(args, shortopts, longopts = []): """getopt(args, options[, long_options]) -> opts, args This function works like getopt(), except that GNU style scanning mode is used by default. This means that option and non-option arguments may be intermixed. The getopt() function stops processing...
[ "def", "gnu_getopt", "(", "args", ",", "shortopts", ",", "longopts", "=", "[", "]", ")", ":", "opts", "=", "[", "]", "prog_args", "=", "[", "]", "if", "isinstance", "(", "longopts", ",", "str", ")", ":", "longopts", "=", "[", "longopts", "]", "else...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/getopt.py#L94-L142
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/contrib/graph_editor/subgraph.py
python
_check_graph
(sgv, graph)
return sgv
Check if sgv belongs to the given graph. Args: sgv: a SubGraphView. graph: a graph or None. Returns: The SubGraphView sgv. Raises: TypeError: if sgv is not a SubGraphView or if graph is not None and not a tf.Graph. ValueError: if the graph of sgv and the given graph are not None and ...
Check if sgv belongs to the given graph.
[ "Check", "if", "sgv", "belongs", "to", "the", "given", "graph", "." ]
def _check_graph(sgv, graph): """Check if sgv belongs to the given graph. Args: sgv: a SubGraphView. graph: a graph or None. Returns: The SubGraphView sgv. Raises: TypeError: if sgv is not a SubGraphView or if graph is not None and not a tf.Graph. ValueError: if the graph of sgv and t...
[ "def", "_check_graph", "(", "sgv", ",", "graph", ")", ":", "if", "not", "isinstance", "(", "sgv", ",", "SubGraphView", ")", ":", "raise", "TypeError", "(", "\"Expected a SubGraphView, got: {}\"", ".", "format", "(", "type", "(", "graph", ")", ")", ")", "if...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/contrib/graph_editor/subgraph.py#L604-L626
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/OSIRISDiffractionReduction.py
python
rebin_to_smallest
(*workspaces)
return rebinned_workspaces
Rebins the specified list to the workspace with the smallest x-range in the list. :param workspaces: The list of workspaces to rebin to the smallest. :return: The rebinned list of workspaces.
Rebins the specified list to the workspace with the smallest x-range in the list.
[ "Rebins", "the", "specified", "list", "to", "the", "workspace", "with", "the", "smallest", "x", "-", "range", "in", "the", "list", "." ]
def rebin_to_smallest(*workspaces): """ Rebins the specified list to the workspace with the smallest x-range in the list. :param workspaces: The list of workspaces to rebin to the smallest. :return: The rebinned list of workspaces. """ if len(workspaces) == 1: return works...
[ "def", "rebin_to_smallest", "(", "*", "workspaces", ")", ":", "if", "len", "(", "workspaces", ")", "==", "1", ":", "return", "workspaces", "smallest_idx", ",", "smallest_ws", "=", "min", "(", "enumerate", "(", "workspaces", ")", ",", "key", "=", "lambda", ...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/OSIRISDiffractionReduction.py#L304-L334
llvm-mirror/lldb
d01083a850f577b85501a0902b52fd0930de72c7
examples/python/mach_o.py
python
TerminalColors.black
(self, fg=True)
return ''
Set the foreground or background color to black. The foreground color will be set if "fg" tests True. The background color will be set if "fg" tests False.
Set the foreground or background color to black. The foreground color will be set if "fg" tests True. The background color will be set if "fg" tests False.
[ "Set", "the", "foreground", "or", "background", "color", "to", "black", ".", "The", "foreground", "color", "will", "be", "set", "if", "fg", "tests", "True", ".", "The", "background", "color", "will", "be", "set", "if", "fg", "tests", "False", "." ]
def black(self, fg=True): '''Set the foreground or background color to black. The foreground color will be set if "fg" tests True. The background color will be set if "fg" tests False.''' if self.enabled: if fg: return "\x1b[30m" else: retu...
[ "def", "black", "(", "self", ",", "fg", "=", "True", ")", ":", "if", "self", ".", "enabled", ":", "if", "fg", ":", "return", "\"\\x1b[30m\"", "else", ":", "return", "\"\\x1b[40m\"", "return", "''" ]
https://github.com/llvm-mirror/lldb/blob/d01083a850f577b85501a0902b52fd0930de72c7/examples/python/mach_o.py#L271-L279
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/stc.py
python
StyledTextCtrl.StyleGetHotSpot
(*args, **kwargs)
return _stc.StyledTextCtrl_StyleGetHotSpot(*args, **kwargs)
StyleGetHotSpot(self, int style) -> bool Get is a style a hotspot or not.
StyleGetHotSpot(self, int style) -> bool
[ "StyleGetHotSpot", "(", "self", "int", "style", ")", "-", ">", "bool" ]
def StyleGetHotSpot(*args, **kwargs): """ StyleGetHotSpot(self, int style) -> bool Get is a style a hotspot or not. """ return _stc.StyledTextCtrl_StyleGetHotSpot(*args, **kwargs)
[ "def", "StyleGetHotSpot", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_stc", ".", "StyledTextCtrl_StyleGetHotSpot", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/stc.py#L2683-L2689
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py3/pandas/io/date_converters.py
python
parse_date_time
(date_col, time_col)
return parsing.try_parse_date_and_time(date_col, time_col)
Parse columns with dates and times into a single datetime column. .. deprecated:: 1.2
Parse columns with dates and times into a single datetime column.
[ "Parse", "columns", "with", "dates", "and", "times", "into", "a", "single", "datetime", "column", "." ]
def parse_date_time(date_col, time_col): """ Parse columns with dates and times into a single datetime column. .. deprecated:: 1.2 """ warnings.warn( """ Use pd.to_datetime(date_col + " " + time_col) instead to get a Pandas Series. Use pd.to_datetime(date_col + " " + time_co...
[ "def", "parse_date_time", "(", "date_col", ",", "time_col", ")", ":", "warnings", ".", "warn", "(", "\"\"\"\n Use pd.to_datetime(date_col + \" \" + time_col) instead to get a Pandas Series.\n Use pd.to_datetime(date_col + \" \" + time_col).to_pydatetime() instead to get a Numpy...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/io/date_converters.py#L9-L25
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/protobuf/third_party/six/six.py
python
_SixMetaPathImporter.is_package
(self, fullname)
return hasattr(self.__get_module(fullname), "__path__")
Return true, if the named module is a package. We need this method to get correct spec objects with Python 3.4 (see PEP451)
Return true, if the named module is a package.
[ "Return", "true", "if", "the", "named", "module", "is", "a", "package", "." ]
def is_package(self, fullname): """ Return true, if the named module is a package. We need this method to get correct spec objects with Python 3.4 (see PEP451) """ return hasattr(self.__get_module(fullname), "__path__")
[ "def", "is_package", "(", "self", ",", "fullname", ")", ":", "return", "hasattr", "(", "self", ".", "__get_module", "(", "fullname", ")", ",", "\"__path__\"", ")" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/protobuf/third_party/six/six.py#L209-L216
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/richtext.py
python
RichTextParagraphLayoutBox.GetStyle
(*args, **kwargs)
return _richtext.RichTextParagraphLayoutBox_GetStyle(*args, **kwargs)
GetStyle(self, long position, RichTextAttr style) -> bool
GetStyle(self, long position, RichTextAttr style) -> bool
[ "GetStyle", "(", "self", "long", "position", "RichTextAttr", "style", ")", "-", ">", "bool" ]
def GetStyle(*args, **kwargs): """GetStyle(self, long position, RichTextAttr style) -> bool""" return _richtext.RichTextParagraphLayoutBox_GetStyle(*args, **kwargs)
[ "def", "GetStyle", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_richtext", ".", "RichTextParagraphLayoutBox_GetStyle", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/richtext.py#L1732-L1734