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
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/factorization/python/ops/gmm_ops.py
python
GmmAlgorithm._define_full_covariance_probs
(self, shard_id, shard)
Defines the full covariance probabilities per example in a class. Updates a matrix with dimension num_examples X num_classes. Args: shard_id: id of the current shard. shard: current data shard, 1 X num_examples X dimensions.
Defines the full covariance probabilities per example in a class.
[ "Defines", "the", "full", "covariance", "probabilities", "per", "example", "in", "a", "class", "." ]
def _define_full_covariance_probs(self, shard_id, shard): """Defines the full covariance probabilities per example in a class. Updates a matrix with dimension num_examples X num_classes. Args: shard_id: id of the current shard. shard: current data shard, 1 X num_examples X dimensions. """ ...
[ "def", "_define_full_covariance_probs", "(", "self", ",", "shard_id", ",", "shard", ")", ":", "diff", "=", "shard", "-", "self", ".", "_means", "cholesky", "=", "linalg_ops", ".", "cholesky", "(", "self", ".", "_covs", "+", "self", ".", "_min_var", ")", ...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/factorization/python/ops/gmm_ops.py#L282-L302
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/ma/core.py
python
_MaskedPrintOption.__init__
(self, display)
Create the masked_print_option object.
Create the masked_print_option object.
[ "Create", "the", "masked_print_option", "object", "." ]
def __init__(self, display): """ Create the masked_print_option object. """ self._display = display self._enabled = True
[ "def", "__init__", "(", "self", ",", "display", ")", ":", "self", ".", "_display", "=", "display", "self", ".", "_enabled", "=", "True" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/ma/core.py#L2395-L2401
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/numpy/py3/numpy/polynomial/_polybase.py
python
ABCPolyBase._generate_string
(self, term_method)
return out
Generate the full string representation of the polynomial, using ``term_method`` to generate each polynomial term.
Generate the full string representation of the polynomial, using ``term_method`` to generate each polynomial term.
[ "Generate", "the", "full", "string", "representation", "of", "the", "polynomial", "using", "term_method", "to", "generate", "each", "polynomial", "term", "." ]
def _generate_string(self, term_method): """ Generate the full string representation of the polynomial, using ``term_method`` to generate each polynomial term. """ # Get configuration for line breaks linewidth = np.get_printoptions().get('linewidth', 75) if linewi...
[ "def", "_generate_string", "(", "self", ",", "term_method", ")", ":", "# Get configuration for line breaks", "linewidth", "=", "np", ".", "get_printoptions", "(", ")", ".", "get", "(", "'linewidth'", ",", "75", ")", "if", "linewidth", "<", "1", ":", "linewidth...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/numpy/py3/numpy/polynomial/_polybase.py#L331-L367
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/codecs.py
python
IncrementalEncoder.reset
(self)
Resets the encoder to the initial state.
Resets the encoder to the initial state.
[ "Resets", "the", "encoder", "to", "the", "initial", "state", "." ]
def reset(self): """ Resets the encoder to the initial state. """
[ "def", "reset", "(", "self", ")", ":" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/codecs.py#L203-L206
glotzerlab/hoomd-blue
f7f97abfa3fcc2522fa8d458d65d0aeca7ba781a
hoomd/hpmc/external/wall.py
python
wall.set_volume
(self, volume)
R"""Set the volume associated with the intersection of all walls in the system. # noqa This number will subsequently change when the box is resized and walls are scaled appropriately. Example:: mc = hpmc.integrate.sphere(seed = 415236); ext_wall = hpmc.compute.wall(mc); ...
R"""Set the volume associated with the intersection of all walls in the system. # noqa
[ "R", "Set", "the", "volume", "associated", "with", "the", "intersection", "of", "all", "walls", "in", "the", "system", ".", "#", "noqa" ]
def set_volume(self, volume): R"""Set the volume associated with the intersection of all walls in the system. # noqa This number will subsequently change when the box is resized and walls are scaled appropriately. Example:: mc = hpmc.integrate.sphere(seed = 415236); e...
[ "def", "set_volume", "(", "self", ",", "volume", ")", ":", "self", ".", "cpp_compute", ".", "setVolume", "(", "volume", ")" ]
https://github.com/glotzerlab/hoomd-blue/blob/f7f97abfa3fcc2522fa8d458d65d0aeca7ba781a/hoomd/hpmc/external/wall.py#L415-L428
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/nanops.py
python
nanmean
(values, axis=None, skipna=True, mask=None)
return _wrap_results(the_mean, dtype)
Compute the mean of the element along an axis ignoring NaNs Parameters ---------- values : ndarray axis: int, optional skipna : bool, default True mask : ndarray[bool], optional nan-mask if known Returns ------- result : float Unless input is a float array, in which...
Compute the mean of the element along an axis ignoring NaNs
[ "Compute", "the", "mean", "of", "the", "element", "along", "an", "axis", "ignoring", "NaNs" ]
def nanmean(values, axis=None, skipna=True, mask=None): """ Compute the mean of the element along an axis ignoring NaNs Parameters ---------- values : ndarray axis: int, optional skipna : bool, default True mask : ndarray[bool], optional nan-mask if known Returns ------...
[ "def", "nanmean", "(", "values", ",", "axis", "=", "None", ",", "skipna", "=", "True", ",", "mask", "=", "None", ")", ":", "values", ",", "mask", ",", "dtype", ",", "dtype_max", ",", "_", "=", "_get_values", "(", "values", ",", "skipna", ",", "fill...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/nanops.py#L501-L554
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/turtle.py
python
RawTurtle.begin_fill
(self)
Called just before drawing a shape to be filled. No argument. Example (for a Turtle instance named turtle): >>> turtle.color("black", "red") >>> turtle.begin_fill() >>> turtle.circle(60) >>> turtle.end_fill()
Called just before drawing a shape to be filled.
[ "Called", "just", "before", "drawing", "a", "shape", "to", "be", "filled", "." ]
def begin_fill(self): """Called just before drawing a shape to be filled. No argument. Example (for a Turtle instance named turtle): >>> turtle.color("black", "red") >>> turtle.begin_fill() >>> turtle.circle(60) >>> turtle.end_fill() """ if not s...
[ "def", "begin_fill", "(", "self", ")", ":", "if", "not", "self", ".", "filling", "(", ")", ":", "self", ".", "_fillitem", "=", "self", ".", "screen", ".", "_createpoly", "(", ")", "self", ".", "items", ".", "append", "(", "self", ".", "_fillitem", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/turtle.py#L3310-L3328
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/smtplib.py
python
SMTP.auth_cram_md5
(self, challenge=None)
return self.user + " " + hmac.HMAC( self.password.encode('ascii'), challenge, 'md5').hexdigest()
Authobject to use with CRAM-MD5 authentication. Requires self.user and self.password to be set.
Authobject to use with CRAM-MD5 authentication. Requires self.user and self.password to be set.
[ "Authobject", "to", "use", "with", "CRAM", "-", "MD5", "authentication", ".", "Requires", "self", ".", "user", "and", "self", ".", "password", "to", "be", "set", "." ]
def auth_cram_md5(self, challenge=None): """ Authobject to use with CRAM-MD5 authentication. Requires self.user and self.password to be set.""" # CRAM-MD5 does not support initial-response. if challenge is None: return None return self.user + " " + hmac.HMAC( ...
[ "def", "auth_cram_md5", "(", "self", ",", "challenge", "=", "None", ")", ":", "# CRAM-MD5 does not support initial-response.", "if", "challenge", "is", "None", ":", "return", "None", "return", "self", ".", "user", "+", "\" \"", "+", "hmac", ".", "HMAC", "(", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/smtplib.py#L644-L651
baidu/bigflow
449245016c0df7d1252e85581e588bfc60cefad3
bigflow_python/python/bigflow/rpc/requests.py
python
launch
(pipeline_id, logical_plan_message, resource_message, commit_args=None, context=None)
Send the rpc command to the other end to launch the logical plan Args: Raises: error.BigflowRPCException: if any error happened
Send the rpc command to the other end to launch the logical plan
[ "Send", "the", "rpc", "command", "to", "the", "other", "end", "to", "launch", "the", "logical", "plan" ]
def launch(pipeline_id, logical_plan_message, resource_message, commit_args=None, context=None): """ Send the rpc command to the other end to launch the logical plan Args: Raises: error.BigflowRPCException: if any error happened """ request = service_pb2.LaunchRequest() request.pip...
[ "def", "launch", "(", "pipeline_id", ",", "logical_plan_message", ",", "resource_message", ",", "commit_args", "=", "None", ",", "context", "=", "None", ")", ":", "request", "=", "service_pb2", ".", "LaunchRequest", "(", ")", "request", ".", "pipeline_id", "="...
https://github.com/baidu/bigflow/blob/449245016c0df7d1252e85581e588bfc60cefad3/bigflow_python/python/bigflow/rpc/requests.py#L77-L113
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py3/pandas/io/formats/format.py
python
DataFrameFormatter._is_in_terminal
(self)
return bool(self.max_cols == 0 or self.max_rows == 0)
Check if the output is to be shown in terminal.
Check if the output is to be shown in terminal.
[ "Check", "if", "the", "output", "is", "to", "be", "shown", "in", "terminal", "." ]
def _is_in_terminal(self) -> bool: """Check if the output is to be shown in terminal.""" return bool(self.max_cols == 0 or self.max_rows == 0)
[ "def", "_is_in_terminal", "(", "self", ")", "->", "bool", ":", "return", "bool", "(", "self", ".", "max_cols", "==", "0", "or", "self", ".", "max_rows", "==", "0", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/io/formats/format.py#L690-L692
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
Framework/PythonInterface/mantid/fitfunctions.py
python
FunctionWrapper.fix
(self, name)
Fix a parameter. :param name: name of parameter to be fixed
Fix a parameter.
[ "Fix", "a", "parameter", "." ]
def fix(self, name): """ Fix a parameter. :param name: name of parameter to be fixed """ self.fun.fixParameter(name)
[ "def", "fix", "(", "self", ",", "name", ")", ":", "self", ".", "fun", ".", "fixParameter", "(", "name", ")" ]
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/Framework/PythonInterface/mantid/fitfunctions.py#L291-L297
oracle/graaljs
36a56e8e993d45fc40939a3a4d9c0c24990720f1
graal-nodejs/deps/v8/third_party/jinja2/utils.py
python
LRUCache.get
(self, key, default=None)
Return an item from the cache dict or `default`
Return an item from the cache dict or `default`
[ "Return", "an", "item", "from", "the", "cache", "dict", "or", "default" ]
def get(self, key, default=None): """Return an item from the cache dict or `default`""" try: return self[key] except KeyError: return default
[ "def", "get", "(", "self", ",", "key", ",", "default", "=", "None", ")", ":", "try", ":", "return", "self", "[", "key", "]", "except", "KeyError", ":", "return", "default" ]
https://github.com/oracle/graaljs/blob/36a56e8e993d45fc40939a3a4d9c0c24990720f1/graal-nodejs/deps/v8/third_party/jinja2/utils.py#L348-L353
intel/llvm
e6d0547e9d99b5a56430c4749f6c7e328bf221ab
llvm/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/intel/llvm/blob/e6d0547e9d99b5a56430c4749f6c7e328bf221ab/llvm/bindings/python/llvm/object.py#L204-L209
google/syzygy
8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5
third_party/numpy/files/numpy/ma/extras.py
python
mask_cols
(a, axis=None)
return mask_rowcols(a, 1)
Mask columns of a 2D array that contain masked values. This function is a shortcut to ``mask_rowcols`` with `axis` equal to 1. See Also -------- mask_rowcols : Mask rows and/or columns of a 2D array. masked_where : Mask where a condition is met. Examples -------- >>> import numpy.ma a...
Mask columns of a 2D array that contain masked values.
[ "Mask", "columns", "of", "a", "2D", "array", "that", "contain", "masked", "values", "." ]
def mask_cols(a, axis=None): """ Mask columns of a 2D array that contain masked values. This function is a shortcut to ``mask_rowcols`` with `axis` equal to 1. See Also -------- mask_rowcols : Mask rows and/or columns of a 2D array. masked_where : Mask where a condition is met. Exampl...
[ "def", "mask_cols", "(", "a", ",", "axis", "=", "None", ")", ":", "return", "mask_rowcols", "(", "a", ",", "1", ")" ]
https://github.com/google/syzygy/blob/8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5/third_party/numpy/files/numpy/ma/extras.py#L903-L946
Xilinx/XRT
dd071c90309df61d3ecdd92dca39f43804915c99
.github/scripts/clang-tidy-review.py
python
get_line_ranges
(diff, files)
return json.dumps(line_filter_json, separators=(",", ":"))
Return the line ranges of added lines in diff, suitable for the line-filter argument of clang-tidy
Return the line ranges of added lines in diff, suitable for the line-filter argument of clang-tidy
[ "Return", "the", "line", "ranges", "of", "added", "lines", "in", "diff", "suitable", "for", "the", "line", "-", "filter", "argument", "of", "clang", "-", "tidy" ]
def get_line_ranges(diff, files): """Return the line ranges of added lines in diff, suitable for the line-filter argument of clang-tidy """ lines_by_file = {} for filename in diff: if filename.target_file[2:] not in files: continue added_lines = [] for hunk in f...
[ "def", "get_line_ranges", "(", "diff", ",", "files", ")", ":", "lines_by_file", "=", "{", "}", "for", "filename", "in", "diff", ":", "if", "filename", ".", "target_file", "[", "2", ":", "]", "not", "in", "files", ":", "continue", "added_lines", "=", "[...
https://github.com/Xilinx/XRT/blob/dd071c90309df61d3ecdd92dca39f43804915c99/.github/scripts/clang-tidy-review.py#L118-L145
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/traceback.py
python
format_tb
(tb, limit = None)
return format_list(extract_tb(tb, limit))
A shorthand for 'format_list(extract_stack(f, limit)).
A shorthand for 'format_list(extract_stack(f, limit)).
[ "A", "shorthand", "for", "format_list", "(", "extract_stack", "(", "f", "limit", "))", "." ]
def format_tb(tb, limit = None): """A shorthand for 'format_list(extract_stack(f, limit)).""" return format_list(extract_tb(tb, limit))
[ "def", "format_tb", "(", "tb", ",", "limit", "=", "None", ")", ":", "return", "format_list", "(", "extract_tb", "(", "tb", ",", "limit", ")", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/traceback.py#L74-L76
y123456yz/reading-and-annotate-mongodb-3.6
93280293672ca7586dc24af18132aa61e4ed7fcf
mongo/buildscripts/idl/idl/parser.py
python
_parse_chained_types
(ctxt, node)
return chained_items
Parse a chained types section in a struct in the IDL file.
Parse a chained types section in a struct in the IDL file.
[ "Parse", "a", "chained", "types", "section", "in", "a", "struct", "in", "the", "IDL", "file", "." ]
def _parse_chained_types(ctxt, node): # type: (errors.ParserContext, yaml.nodes.MappingNode) -> List[syntax.ChainedType] """Parse a chained types section in a struct in the IDL file.""" chained_items = [] field_name_set = set() # type: Set[str] for [first_node, second_node] in node.value: ...
[ "def", "_parse_chained_types", "(", "ctxt", ",", "node", ")", ":", "# type: (errors.ParserContext, yaml.nodes.MappingNode) -> List[syntax.ChainedType]", "chained_items", "=", "[", "]", "field_name_set", "=", "set", "(", ")", "# type: Set[str]", "for", "[", "first_node", "...
https://github.com/y123456yz/reading-and-annotate-mongodb-3.6/blob/93280293672ca7586dc24af18132aa61e4ed7fcf/mongo/buildscripts/idl/idl/parser.py#L249-L275
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/python/keras/_impl/keras/backend.py
python
set_image_data_format
(data_format)
Sets the value of the image data format convention. Arguments: data_format: string. `'channels_first'` or `'channels_last'`. Example: ```python >>> from keras import backend as K >>> K.image_data_format() 'channels_first' >>> K.set_image_data_format('channels_last') >>> K.ima...
Sets the value of the image data format convention.
[ "Sets", "the", "value", "of", "the", "image", "data", "format", "convention", "." ]
def set_image_data_format(data_format): """Sets the value of the image data format convention. Arguments: data_format: string. `'channels_first'` or `'channels_last'`. Example: ```python >>> from keras import backend as K >>> K.image_data_format() 'channels_first' >>> K.set_image...
[ "def", "set_image_data_format", "(", "data_format", ")", ":", "global", "_IMAGE_DATA_FORMAT", "if", "data_format", "not", "in", "{", "'channels_last'", ",", "'channels_first'", "}", ":", "raise", "ValueError", "(", "'Unknown data_format:'", ",", "data_format", ")", ...
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/python/keras/_impl/keras/backend.py#L223-L245
sofa-framework/sofa
70628e35a44fcc258cf8250109b5e4eba8c5abe9
applications/plugins/PSL/python/pslparserhjson.py
python
treeToString
(node, space)
return res
Converts a Sofa node and its children & objects into an h-json representation
Converts a Sofa node and its children & objects into an h-json representation
[ "Converts", "a", "Sofa", "node", "and", "its", "children", "&", "objects", "into", "an", "h", "-", "json", "representation" ]
def treeToString(node, space): '''Converts a Sofa node and its children & objects into an h-json representation''' nspace=space+" " res = "" instanceof = node.getData("psl_instanceof") if instanceof != None: res += space+str(node.psl_instanceof)+" : {"+ "\n" ...
[ "def", "treeToString", "(", "node", ",", "space", ")", ":", "nspace", "=", "space", "+", "\" \"", "res", "=", "\"\"", "instanceof", "=", "node", ".", "getData", "(", "\"psl_instanceof\"", ")", "if", "instanceof", "!=", "None", ":", "res", "+=", "space...
https://github.com/sofa-framework/sofa/blob/70628e35a44fcc258cf8250109b5e4eba8c5abe9/applications/plugins/PSL/python/pslparserhjson.py#L71-L113
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/fitting_widgets/basic_fitting/basic_fitting_view.py
python
BasicFittingView.set_workspace_combo_box_label
(self, text: str)
Sets the label text next to the workspace selector combobox.
Sets the label text next to the workspace selector combobox.
[ "Sets", "the", "label", "text", "next", "to", "the", "workspace", "selector", "combobox", "." ]
def set_workspace_combo_box_label(self, text: str) -> None: """Sets the label text next to the workspace selector combobox.""" self.workspace_selector.set_data_combo_box_label(text)
[ "def", "set_workspace_combo_box_label", "(", "self", ",", "text", ":", "str", ")", "->", "None", ":", "self", ".", "workspace_selector", ".", "set_data_combo_box_label", "(", "text", ")" ]
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/fitting_widgets/basic_fitting/basic_fitting_view.py#L132-L134
weolar/miniblink49
1c4678db0594a4abde23d3ebbcc7cd13c3170777
third_party/WebKit/Source/bindings/scripts/v8_interface.py
python
effective_overload_set
(F)
return S
Returns the effective overload set of an overloaded function. An effective overload set is the set of overloaded functions + signatures (type list of arguments, with optional and variadic arguments included or not), and is used in the overload resolution algorithm. For example, given input [f1(optiona...
Returns the effective overload set of an overloaded function.
[ "Returns", "the", "effective", "overload", "set", "of", "an", "overloaded", "function", "." ]
def effective_overload_set(F): """Returns the effective overload set of an overloaded function. An effective overload set is the set of overloaded functions + signatures (type list of arguments, with optional and variadic arguments included or not), and is used in the overload resolution algorithm. ...
[ "def", "effective_overload_set", "(", "F", ")", ":", "# Code closely follows the algorithm in the spec, for clarity and", "# correctness, and hence is not very Pythonic.", "# 1. Initialize S to ∅.", "# (We use a list because we can't use a set, as noted above.)", "S", "=", "[", "]", "# 2...
https://github.com/weolar/miniblink49/blob/1c4678db0594a4abde23d3ebbcc7cd13c3170777/third_party/WebKit/Source/bindings/scripts/v8_interface.py#L776-L862
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py3/scipy/special/basic.py
python
jvp
(v, z, n=1)
Compute nth derivative of Bessel function Jv(z) with respect to `z`. Parameters ---------- v : float Order of Bessel function z : complex Argument at which to evaluate the derivative n : int, default 1 Order of derivative Notes ----- The derivative is computed u...
Compute nth derivative of Bessel function Jv(z) with respect to `z`.
[ "Compute", "nth", "derivative", "of", "Bessel", "function", "Jv", "(", "z", ")", "with", "respect", "to", "z", "." ]
def jvp(v, z, n=1): """Compute nth derivative of Bessel function Jv(z) with respect to `z`. Parameters ---------- v : float Order of Bessel function z : complex Argument at which to evaluate the derivative n : int, default 1 Order of derivative Notes ----- T...
[ "def", "jvp", "(", "v", ",", "z", ",", "n", "=", "1", ")", ":", "n", "=", "_nonneg_int_or_fail", "(", "n", ",", "'n'", ")", "if", "n", "==", "0", ":", "return", "jv", "(", "v", ",", "z", ")", "else", ":", "return", "_bessel_diff_formula", "(", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py3/scipy/special/basic.py#L436-L465
MythTV/mythtv
d282a209cb8be85d036f85a62a8ec971b67d45f4
mythtv/programs/scripts/internetcontent/nv_python_libs/xsltfunctions/cinemarv_api.py
python
xpathFunctions.cinemarvIsCustomHTML
(self, context, *args)
Check if the link is for a custom HTML Example call: mnvXpath:cinemarvIsCustomHTML(('dummy')) return True if the link does not starts with "http://" return False if the link starts with "http://"
Check if the link is for a custom HTML Example call: mnvXpath:cinemarvIsCustomHTML(('dummy')) return True if the link does not starts with "http://" return False if the link starts with "http://"
[ "Check", "if", "the", "link", "is", "for", "a", "custom", "HTML", "Example", "call", ":", "mnvXpath", ":", "cinemarvIsCustomHTML", "((", "dummy", "))", "return", "True", "if", "the", "link", "does", "not", "starts", "with", "http", ":", "//", "return", "...
def cinemarvIsCustomHTML(self, context, *args): '''Check if the link is for a custom HTML Example call: mnvXpath:cinemarvIsCustomHTML(('dummy')) return True if the link does not starts with "http://" return False if the link starts with "http://" ''' if self.persistence['...
[ "def", "cinemarvIsCustomHTML", "(", "self", ",", "context", ",", "*", "args", ")", ":", "if", "self", ".", "persistence", "[", "'cinemarvLinkGeneration'", "]", "is", "None", ":", "return", "False", "if", "self", ".", "persistence", "[", "'cinemarvLinkGeneratio...
https://github.com/MythTV/mythtv/blob/d282a209cb8be85d036f85a62a8ec971b67d45f4/mythtv/programs/scripts/internetcontent/nv_python_libs/xsltfunctions/cinemarv_api.py#L142-L154
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_controls.py
python
CheckListBox.Create
(*args, **kwargs)
return _controls_.CheckListBox_Create(*args, **kwargs)
Create(self, Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, long style=0, Validator validator=DefaultValidator, String name=ListBoxNameStr) -> bool
Create(self, Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, long style=0, Validator validator=DefaultValidator, String name=ListBoxNameStr) -> bool
[ "Create", "(", "self", "Window", "parent", "int", "id", "=", "-", "1", "Point", "pos", "=", "DefaultPosition", "Size", "size", "=", "DefaultSize", "wxArrayString", "choices", "=", "wxPyEmptyStringArray", "long", "style", "=", "0", "Validator", "validator", "="...
def Create(*args, **kwargs): """ Create(self, Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, long style=0, Validator validator=DefaultValidator, String name=ListBoxNameStr) -> bool """...
[ "def", "Create", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_controls_", ".", "CheckListBox_Create", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_controls.py#L1317-L1324
google/syzygy
8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5
third_party/numpy/files/numpy/lib/polynomial.py
python
polyder
(p, m=1)
return val
Return the derivative of the specified order of a polynomial. Parameters ---------- p : poly1d or sequence Polynomial to differentiate. A sequence is interpreted as polynomial coefficients, see `poly1d`. m : int, optional Order of differentiation (default: 1) Returns --...
Return the derivative of the specified order of a polynomial.
[ "Return", "the", "derivative", "of", "the", "specified", "order", "of", "a", "polynomial", "." ]
def polyder(p, m=1): """ Return the derivative of the specified order of a polynomial. Parameters ---------- p : poly1d or sequence Polynomial to differentiate. A sequence is interpreted as polynomial coefficients, see `poly1d`. m : int, optional Order of differentiation...
[ "def", "polyder", "(", "p", ",", "m", "=", "1", ")", ":", "m", "=", "int", "(", "m", ")", "if", "m", "<", "0", ":", "raise", "ValueError", ",", "\"Order of derivative must be positive (see polyint)\"", "truepoly", "=", "isinstance", "(", "p", ",", "poly1...
https://github.com/google/syzygy/blob/8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5/third_party/numpy/files/numpy/lib/polynomial.py#L326-L392
microsoft/TSS.MSR
0f2516fca2cd9929c31d5450e39301c9bde43688
TSS.Py/src/TpmTypes.py
python
TPM2_SelfTest_REQUEST.__init__
(self, fullTest = 0)
This command causes the TPM to perform a test of its capabilities. If the fullTest is YES, the TPM will test all functions. If fullTest = NO, the TPM will only test those functions that have not previously been tested. Attributes: fullTest (int): YES if full test to be perfo...
This command causes the TPM to perform a test of its capabilities. If the fullTest is YES, the TPM will test all functions. If fullTest = NO, the TPM will only test those functions that have not previously been tested.
[ "This", "command", "causes", "the", "TPM", "to", "perform", "a", "test", "of", "its", "capabilities", ".", "If", "the", "fullTest", "is", "YES", "the", "TPM", "will", "test", "all", "functions", ".", "If", "fullTest", "=", "NO", "the", "TPM", "will", "...
def __init__(self, fullTest = 0): """ This command causes the TPM to perform a test of its capabilities. If the fullTest is YES, the TPM will test all functions. If fullTest = NO, the TPM will only test those functions that have not previously been tested. Attributes: ...
[ "def", "__init__", "(", "self", ",", "fullTest", "=", "0", ")", ":", "self", ".", "fullTest", "=", "fullTest" ]
https://github.com/microsoft/TSS.MSR/blob/0f2516fca2cd9929c31d5450e39301c9bde43688/TSS.Py/src/TpmTypes.py#L9124-L9134
uber/neuropod
de304c40ec0634a868d7ef41ba7bf89ebc364f10
source/python/neuropod/utils/dtype_utils.py
python
get_dtype
(arg)
return np.dtype(arg)
Get numpy dtypes from strings in a python 2 and 3 compatible way
Get numpy dtypes from strings in a python 2 and 3 compatible way
[ "Get", "numpy", "dtypes", "from", "strings", "in", "a", "python", "2", "and", "3", "compatible", "way" ]
def get_dtype(arg): """ Get numpy dtypes from strings in a python 2 and 3 compatible way """ if arg == "string": arg = "str" return np.dtype(arg)
[ "def", "get_dtype", "(", "arg", ")", ":", "if", "arg", "==", "\"string\"", ":", "arg", "=", "\"str\"", "return", "np", ".", "dtype", "(", "arg", ")" ]
https://github.com/uber/neuropod/blob/de304c40ec0634a868d7ef41ba7bf89ebc364f10/source/python/neuropod/utils/dtype_utils.py#L18-L25
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
third_party/pexpect/screen.py
python
screen.cursor_restore_attrs
(self)
Restores cursor position after a Save Cursor.
Restores cursor position after a Save Cursor.
[ "Restores", "cursor", "position", "after", "a", "Save", "Cursor", "." ]
def cursor_restore_attrs (self): # <ESC>8 """Restores cursor position after a Save Cursor.""" self.cursor_home (self.cur_saved_r, self.cur_saved_c)
[ "def", "cursor_restore_attrs", "(", "self", ")", ":", "# <ESC>8", "self", ".", "cursor_home", "(", "self", ".", "cur_saved_r", ",", "self", ".", "cur_saved_c", ")" ]
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/third_party/pexpect/screen.py#L284-L288
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/syntax/_perl.py
python
KeywordString
(option=0)
Returns the specified Keyword String @note: not used by most modules
Returns the specified Keyword String @note: not used by most modules
[ "Returns", "the", "specified", "Keyword", "String", "@note", ":", "not", "used", "by", "most", "modules" ]
def KeywordString(option=0): """Returns the specified Keyword String @note: not used by most modules """ if option == synglob.ID_LANG_PERL: return PERL_KW[1] else: return u''
[ "def", "KeywordString", "(", "option", "=", "0", ")", ":", "if", "option", "==", "synglob", ".", "ID_LANG_PERL", ":", "return", "PERL_KW", "[", "1", "]", "else", ":", "return", "u''" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/syntax/_perl.py#L135-L143
eclipse/sumo
7132a9b8b6eea734bdec38479026b4d8c4336d03
tools/contributed/sumopy/agilepy/lib_base/arrayman.py
python
ArrayObjman.init_postload_external
(self)
Called after set state. Link internal states.
Called after set state. Link internal states.
[ "Called", "after", "set", "state", ".", "Link", "internal", "states", "." ]
def init_postload_external(self): """ Called after set state. Link internal states. """ TableMixin.init_postload_external(self) self._init_attributes() self._init_constants()
[ "def", "init_postload_external", "(", "self", ")", ":", "TableMixin", ".", "init_postload_external", "(", "self", ")", "self", ".", "_init_attributes", "(", ")", "self", ".", "_init_constants", "(", ")" ]
https://github.com/eclipse/sumo/blob/7132a9b8b6eea734bdec38479026b4d8c4336d03/tools/contributed/sumopy/agilepy/lib_base/arrayman.py#L1233-L1240
DayBreak-u/yolo-face-with-landmark
29cc7454a578cc9a23d95a712af70d467f69fedd
utils/utils.py
python
box_iou
(box1, box2)
return inter / (area1[:, None] + area2 - inter)
Return intersection-over-union (Jaccard index) of boxes. Both sets of boxes are expected to be in (x1, y1, x2, y2) format. Arguments: box1 (Tensor[N, 4]) box2 (Tensor[M, 4]) Returns: iou (Tensor[N, M]): the NxM matrix containing the pairwise IoU values for every element i...
Return intersection-over-union (Jaccard index) of boxes. Both sets of boxes are expected to be in (x1, y1, x2, y2) format. Arguments: box1 (Tensor[N, 4]) box2 (Tensor[M, 4]) Returns: iou (Tensor[N, M]): the NxM matrix containing the pairwise IoU values for every element i...
[ "Return", "intersection", "-", "over", "-", "union", "(", "Jaccard", "index", ")", "of", "boxes", ".", "Both", "sets", "of", "boxes", "are", "expected", "to", "be", "in", "(", "x1", "y1", "x2", "y2", ")", "format", ".", "Arguments", ":", "box1", "(",...
def box_iou(box1, box2): # https://github.com/pytorch/vision/blob/master/torchvision/ops/boxes.py """ Return intersection-over-union (Jaccard index) of boxes. Both sets of boxes are expected to be in (x1, y1, x2, y2) format. Arguments: box1 (Tensor[N, 4]) box2 (Tensor[M, 4]) Retu...
[ "def", "box_iou", "(", "box1", ",", "box2", ")", ":", "# https://github.com/pytorch/vision/blob/master/torchvision/ops/boxes.py", "def", "box_area", "(", "box", ")", ":", "# box = 4xn", "return", "(", "box", "[", "2", "]", "-", "box", "[", "0", "]", ")", "*", ...
https://github.com/DayBreak-u/yolo-face-with-landmark/blob/29cc7454a578cc9a23d95a712af70d467f69fedd/utils/utils.py#L143-L165
weolar/miniblink49
1c4678db0594a4abde23d3ebbcc7cd13c3170777
third_party/jinja2/environment.py
python
Template.from_module_dict
(cls, environment, module_dict, globals)
return cls._from_namespace(environment, module_dict, globals)
Creates a template object from a module. This is used by the module loader to create a template object. .. versionadded:: 2.4
Creates a template object from a module. This is used by the module loader to create a template object.
[ "Creates", "a", "template", "object", "from", "a", "module", ".", "This", "is", "used", "by", "the", "module", "loader", "to", "create", "a", "template", "object", "." ]
def from_module_dict(cls, environment, module_dict, globals): """Creates a template object from a module. This is used by the module loader to create a template object. .. versionadded:: 2.4 """ return cls._from_namespace(environment, module_dict, globals)
[ "def", "from_module_dict", "(", "cls", ",", "environment", ",", "module_dict", ",", "globals", ")", ":", "return", "cls", ".", "_from_namespace", "(", "environment", ",", "module_dict", ",", "globals", ")" ]
https://github.com/weolar/miniblink49/blob/1c4678db0594a4abde23d3ebbcc7cd13c3170777/third_party/jinja2/environment.py#L923-L929
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/cudnn_rnn/python/ops/cudnn_rnn_ops.py
python
CudnnParamsFormatConverterLSTM._cudnn_to_tf_weights
(self, *cu_weights)
r"""Stitching cudnn canonical weights to generate tf canonical weights.
r"""Stitching cudnn canonical weights to generate tf canonical weights.
[ "r", "Stitching", "cudnn", "canonical", "weights", "to", "generate", "tf", "canonical", "weights", "." ]
def _cudnn_to_tf_weights(self, *cu_weights): r"""Stitching cudnn canonical weights to generate tf canonical weights.""" if self._num_proj: w_i, w_f, w_c, w_o, r_i, r_f, r_c, r_o, pw = cu_weights else: w_i, w_f, w_c, w_o, r_i, r_f, r_c, r_o = cu_weights # pylint: disable=invalid-name W_i...
[ "def", "_cudnn_to_tf_weights", "(", "self", ",", "*", "cu_weights", ")", ":", "if", "self", ".", "_num_proj", ":", "w_i", ",", "w_f", ",", "w_c", ",", "w_o", ",", "r_i", ",", "r_f", ",", "r_c", ",", "r_o", ",", "pw", "=", "cu_weights", "else", ":",...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/cudnn_rnn/python/ops/cudnn_rnn_ops.py#L486-L505
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/contexts/fitting_contexts/basic_fitting_context.py
python
BasicFittingContext.chi_squared_for_undo
(self, chi_squared: list)
Sets the chi squared from previous fits used for single fitting.
Sets the chi squared from previous fits used for single fitting.
[ "Sets", "the", "chi", "squared", "from", "previous", "fits", "used", "for", "single", "fitting", "." ]
def chi_squared_for_undo(self, chi_squared: list) -> None: """Sets the chi squared from previous fits used for single fitting.""" self._chi_squared_for_undo = chi_squared
[ "def", "chi_squared_for_undo", "(", "self", ",", "chi_squared", ":", "list", ")", "->", "None", ":", "self", ".", "_chi_squared_for_undo", "=", "chi_squared" ]
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/contexts/fitting_contexts/basic_fitting_context.py#L202-L204
google/tink
59bb34495d1cb8f9d9dbc0f0a52c4f9e21491a14
python/tink/jwt/_raw_jwt.py
python
RawJwt.json_payload
(self)
return _json_util.json_dumps(self._payload)
Returns the payload encoded as JSON string.
Returns the payload encoded as JSON string.
[ "Returns", "the", "payload", "encoded", "as", "JSON", "string", "." ]
def json_payload(self) -> str: """Returns the payload encoded as JSON string.""" return _json_util.json_dumps(self._payload)
[ "def", "json_payload", "(", "self", ")", "->", "str", ":", "return", "_json_util", ".", "json_dumps", "(", "self", ".", "_payload", ")" ]
https://github.com/google/tink/blob/59bb34495d1cb8f9d9dbc0f0a52c4f9e21491a14/python/tink/jwt/_raw_jwt.py#L167-L169
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/AWSPythonSDK/1.5.8/docutils/utils/math/latex2mathml.py
python
parse_latex_math
(string, inline=True)
return tree
parse_latex_math(string [,inline]) -> MathML-tree Returns a MathML-tree parsed from string. inline=True is for inline math and inline=False is for displayed math. tree is the whole tree and node is the current element.
parse_latex_math(string [,inline]) -> MathML-tree
[ "parse_latex_math", "(", "string", "[", "inline", "]", ")", "-", ">", "MathML", "-", "tree" ]
def parse_latex_math(string, inline=True): """parse_latex_math(string [,inline]) -> MathML-tree Returns a MathML-tree parsed from string. inline=True is for inline math and inline=False is for displayed math. tree is the whole tree and node is the current element.""" # Normalize white-space: ...
[ "def", "parse_latex_math", "(", "string", ",", "inline", "=", "True", ")", ":", "# Normalize white-space:", "string", "=", "' '", ".", "join", "(", "string", ".", "split", "(", ")", ")", "if", "inline", ":", "node", "=", "mrow", "(", ")", "tree", "=", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/AWSPythonSDK/1.5.8/docutils/utils/math/latex2mathml.py#L361-L459
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/graphviz/py2/graphviz/files.py
python
File.unflatten
(self, stagger=None, fanout=False, chain=None)
return Source(out, filename=self.filename, directory=self.directory, format=self._format, engine=self._engine, encoding=self._encoding)
Return a new :class:`.Source` instance with the source piped through the Graphviz *unflatten* preprocessor. Args: stagger (int): Stagger the minimum length of leaf edges between 1 and this small integer. fanout (bool): Fanout nodes with indegree = outdegree = 1 when staggering (requires...
Return a new :class:`.Source` instance with the source piped through the Graphviz *unflatten* preprocessor.
[ "Return", "a", "new", ":", "class", ":", ".", "Source", "instance", "with", "the", "source", "piped", "through", "the", "Graphviz", "*", "unflatten", "*", "preprocessor", "." ]
def unflatten(self, stagger=None, fanout=False, chain=None): """Return a new :class:`.Source` instance with the source piped through the Graphviz *unflatten* preprocessor. Args: stagger (int): Stagger the minimum length of leaf edges between 1 and this small integer. fanout (boo...
[ "def", "unflatten", "(", "self", ",", "stagger", "=", "None", ",", "fanout", "=", "False", ",", "chain", "=", "None", ")", ":", "out", "=", "backend", ".", "unflatten", "(", "self", ".", "source", ",", "stagger", "=", "stagger", ",", "fanout", "=", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/graphviz/py2/graphviz/files.py#L116-L141
OAID/Caffe-HRT
aae71e498ab842c6f92bcc23fc668423615a4d65
scripts/cpp_lint.py
python
IsCppString
(line)
return ((line.count('"') - line.count(r'\"') - line.count("'\"'")) & 1) == 1
Does line terminate so, that the next symbol is in string constant. This function does not consider single-line nor multi-line comments. Args: line: is a partial line of code starting from the 0..n. Returns: True, if next character appended to 'line' is inside a string constant.
Does line terminate so, that the next symbol is in string constant.
[ "Does", "line", "terminate", "so", "that", "the", "next", "symbol", "is", "in", "string", "constant", "." ]
def IsCppString(line): """Does line terminate so, that the next symbol is in string constant. This function does not consider single-line nor multi-line comments. Args: line: is a partial line of code starting from the 0..n. Returns: True, if next character appended to 'line' is inside a string c...
[ "def", "IsCppString", "(", "line", ")", ":", "line", "=", "line", ".", "replace", "(", "r'\\\\'", ",", "'XX'", ")", "# after this, \\\\\" does not match to \\\"", "return", "(", "(", "line", ".", "count", "(", "'\"'", ")", "-", "line", ".", "count", "(", ...
https://github.com/OAID/Caffe-HRT/blob/aae71e498ab842c6f92bcc23fc668423615a4d65/scripts/cpp_lint.py#L1045-L1059
BitMEX/api-connectors
37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812
auto-generated/python/swagger_client/models/trade_bin.py
python
TradeBin.timestamp
(self, timestamp)
Sets the timestamp of this TradeBin. :param timestamp: The timestamp of this TradeBin. # noqa: E501 :type: datetime
Sets the timestamp of this TradeBin.
[ "Sets", "the", "timestamp", "of", "this", "TradeBin", "." ]
def timestamp(self, timestamp): """Sets the timestamp of this TradeBin. :param timestamp: The timestamp of this TradeBin. # noqa: E501 :type: datetime """ if timestamp is None: raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 ...
[ "def", "timestamp", "(", "self", ",", "timestamp", ")", ":", "if", "timestamp", "is", "None", ":", "raise", "ValueError", "(", "\"Invalid value for `timestamp`, must not be `None`\"", ")", "# noqa: E501", "self", ".", "_timestamp", "=", "timestamp" ]
https://github.com/BitMEX/api-connectors/blob/37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812/auto-generated/python/swagger_client/models/trade_bin.py#L119-L129
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/xml/etree/ElementTree.py
python
ProcessingInstruction
(target, text=None)
return element
Processing Instruction element factory. This function creates a special element which the standard serializer serializes as an XML comment. *target* is a string containing the processing instruction, *text* is a string containing the processing instruction contents, if any.
Processing Instruction element factory.
[ "Processing", "Instruction", "element", "factory", "." ]
def ProcessingInstruction(target, text=None): """Processing Instruction element factory. This function creates a special element which the standard serializer serializes as an XML comment. *target* is a string containing the processing instruction, *text* is a string containing the processing inst...
[ "def", "ProcessingInstruction", "(", "target", ",", "text", "=", "None", ")", ":", "element", "=", "Element", "(", "ProcessingInstruction", ")", "element", ".", "text", "=", "target", "if", "text", ":", "element", ".", "text", "=", "element", ".", "text", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/xml/etree/ElementTree.py#L476-L490
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/llvmlite/binding/transforms.py
python
PassManagerBuilder.loop_vectorize
(self)
return ffi.lib.LLVMPY_PassManagerBuilderGetLoopVectorize(self)
If true, allow vectorizing loops.
If true, allow vectorizing loops.
[ "If", "true", "allow", "vectorizing", "loops", "." ]
def loop_vectorize(self): """ If true, allow vectorizing loops. """ return ffi.lib.LLVMPY_PassManagerBuilderGetLoopVectorize(self)
[ "def", "loop_vectorize", "(", "self", ")", ":", "return", "ffi", ".", "lib", ".", "LLVMPY_PassManagerBuilderGetLoopVectorize", "(", "self", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/llvmlite/binding/transforms.py#L65-L69
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python3/src/Lib/asyncio/protocols.py
python
BaseProtocol.connection_made
(self, transport)
Called when a connection is made. The argument is the transport representing the pipe connection. To receive data, wait for data_received() calls. When the connection is closed, connection_lost() is called.
Called when a connection is made.
[ "Called", "when", "a", "connection", "is", "made", "." ]
def connection_made(self, transport): """Called when a connection is made. The argument is the transport representing the pipe connection. To receive data, wait for data_received() calls. When the connection is closed, connection_lost() is called. """
[ "def", "connection_made", "(", "self", ",", "transport", ")", ":" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python3/src/Lib/asyncio/protocols.py#L21-L27
glotzerlab/hoomd-blue
f7f97abfa3fcc2522fa8d458d65d0aeca7ba781a
hoomd/tune/attr_tuner.py
python
ScaleSolver.solve_one
(self, tunable)
return False
Solve one step.
Solve one step.
[ "Solve", "one", "step", "." ]
def solve_one(self, tunable): """Solve one step.""" x, y, target = tunable.x, tunable.y, tunable.target if abs(y - target) <= self.tol: return True if y > 0: if self.correlation == 'positive': scale = (self.gamma + target) / (y + self.gamma) ...
[ "def", "solve_one", "(", "self", ",", "tunable", ")", ":", "x", ",", "y", ",", "target", "=", "tunable", ".", "x", ",", "tunable", ".", "y", ",", "tunable", ".", "target", "if", "abs", "(", "y", "-", "target", ")", "<=", "self", ".", "tol", ":"...
https://github.com/glotzerlab/hoomd-blue/blob/f7f97abfa3fcc2522fa8d458d65d0aeca7ba781a/hoomd/tune/attr_tuner.py#L313-L336
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/webapp2/webapp2_extras/auth.py
python
AuthStore.get_session
(self, request)
return store.get_session(self.config['cookie_name'], backend=self.config['session_backend'])
Returns an auth session. :param request: A :class:`webapp2.Request` instance. :returns: A session dict.
Returns an auth session.
[ "Returns", "an", "auth", "session", "." ]
def get_session(self, request): """Returns an auth session. :param request: A :class:`webapp2.Request` instance. :returns: A session dict. """ store = sessions.get_store(request=request) return store.get_session(self.config['cookie_name'], ...
[ "def", "get_session", "(", "self", ",", "request", ")", ":", "store", "=", "sessions", ".", "get_store", "(", "request", "=", "request", ")", "return", "store", ".", "get_session", "(", "self", ".", "config", "[", "'cookie_name'", "]", ",", "backend", "=...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/webapp2/webapp2_extras/auth.py#L213-L223
KhronosGroup/SPIRV-LLVM
1eb85593f3fe2c39379b9a9b088d51eda4f42b8b
examples/Kaleidoscope/MCJIT/lazy/genk-timing.py
python
KScriptGenerator.setCallWeighting
(self, weight)
Sets the probably of generating a function call
Sets the probably of generating a function call
[ "Sets", "the", "probably", "of", "generating", "a", "function", "call" ]
def setCallWeighting(self, weight): """ Sets the probably of generating a function call""" self.callWeighting = weight
[ "def", "setCallWeighting", "(", "self", ",", "weight", ")", ":", "self", ".", "callWeighting", "=", "weight" ]
https://github.com/KhronosGroup/SPIRV-LLVM/blob/1eb85593f3fe2c39379b9a9b088d51eda4f42b8b/examples/Kaleidoscope/MCJIT/lazy/genk-timing.py#L80-L82
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/dataview.py
python
DataViewChoiceRenderer.GetChoice
(*args, **kwargs)
return _dataview.DataViewChoiceRenderer_GetChoice(*args, **kwargs)
GetChoice(self, size_t index) -> String
GetChoice(self, size_t index) -> String
[ "GetChoice", "(", "self", "size_t", "index", ")", "-", ">", "String" ]
def GetChoice(*args, **kwargs): """GetChoice(self, size_t index) -> String""" return _dataview.DataViewChoiceRenderer_GetChoice(*args, **kwargs)
[ "def", "GetChoice", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_dataview", ".", "DataViewChoiceRenderer_GetChoice", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/dataview.py#L1394-L1396
yyzybb537/libgo
4af17b7c67643c4d54aa354dcc77963ea07847d0
third_party/boost.context/tools/build/src/build/type.py
python
reset
()
Clear the module state. This is mainly for testing purposes. Note that this must be called _after_ resetting the module 'feature'.
Clear the module state. This is mainly for testing purposes. Note that this must be called _after_ resetting the module 'feature'.
[ "Clear", "the", "module", "state", ".", "This", "is", "mainly", "for", "testing", "purposes", ".", "Note", "that", "this", "must", "be", "called", "_after_", "resetting", "the", "module", "feature", "." ]
def reset (): """ Clear the module state. This is mainly for testing purposes. Note that this must be called _after_ resetting the module 'feature'. """ global __prefixes_suffixes, __suffixes_to_types, __types, __rule_names_to_types, __target_suffixes_cache __register_features () # Stores ...
[ "def", "reset", "(", ")", ":", "global", "__prefixes_suffixes", ",", "__suffixes_to_types", ",", "__types", ",", "__rule_names_to_types", ",", "__target_suffixes_cache", "__register_features", "(", ")", "# Stores suffixes for generated targets.", "__prefixes_suffixes", "=", ...
https://github.com/yyzybb537/libgo/blob/4af17b7c67643c4d54aa354dcc77963ea07847d0/third_party/boost.context/tools/build/src/build/type.py#L32-L54
PaddlePaddle/Paddle
1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c
python/paddle/fluid/layers/utils.py
python
assert_same_structure
(nest1, nest2, check_types=True)
Confirm two nested structures with the same structure.
Confirm two nested structures with the same structure.
[ "Confirm", "two", "nested", "structures", "with", "the", "same", "structure", "." ]
def assert_same_structure(nest1, nest2, check_types=True): """ Confirm two nested structures with the same structure. """ len_nest1 = len(flatten(nest1)) if is_sequence(nest1) else 1 len_nest2 = len(flatten(nest2)) if is_sequence(nest2) else 1 if len_nest1 != len_nest2: raise ValueError(...
[ "def", "assert_same_structure", "(", "nest1", ",", "nest2", ",", "check_types", "=", "True", ")", ":", "len_nest1", "=", "len", "(", "flatten", "(", "nest1", ")", ")", "if", "is_sequence", "(", "nest1", ")", "else", "1", "len_nest2", "=", "len", "(", "...
https://github.com/PaddlePaddle/Paddle/blob/1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c/python/paddle/fluid/layers/utils.py#L258-L269
microsoft/TSS.MSR
0f2516fca2cd9929c31d5450e39301c9bde43688
TSS.Py/src/TpmTypes.py
python
TPM2_PCR_Allocate_REQUEST.fromBytes
(buffer)
return TpmBuffer(buffer).createObj(TPM2_PCR_Allocate_REQUEST)
Returns new TPM2_PCR_Allocate_REQUEST object constructed from its marshaled representation in the given byte buffer
Returns new TPM2_PCR_Allocate_REQUEST object constructed from its marshaled representation in the given byte buffer
[ "Returns", "new", "TPM2_PCR_Allocate_REQUEST", "object", "constructed", "from", "its", "marshaled", "representation", "in", "the", "given", "byte", "buffer" ]
def fromBytes(buffer): """ Returns new TPM2_PCR_Allocate_REQUEST object constructed from its marshaled representation in the given byte buffer """ return TpmBuffer(buffer).createObj(TPM2_PCR_Allocate_REQUEST)
[ "def", "fromBytes", "(", "buffer", ")", ":", "return", "TpmBuffer", "(", "buffer", ")", ".", "createObj", "(", "TPM2_PCR_Allocate_REQUEST", ")" ]
https://github.com/microsoft/TSS.MSR/blob/0f2516fca2cd9929c31d5450e39301c9bde43688/TSS.Py/src/TpmTypes.py#L13921-L13925
psi4/psi4
be533f7f426b6ccc263904e55122899b16663395
psi4/driver/qcdb/libmintsgshell.py
python
ShellInfo.ncartesian
(self)
return self.PYncartesian
Return the total number of functions if this shell was Cartesian
Return the total number of functions if this shell was Cartesian
[ "Return", "the", "total", "number", "of", "functions", "if", "this", "shell", "was", "Cartesian" ]
def ncartesian(self): """Return the total number of functions if this shell was Cartesian""" return self.PYncartesian
[ "def", "ncartesian", "(", "self", ")", ":", "return", "self", ".", "PYncartesian" ]
https://github.com/psi4/psi4/blob/be533f7f426b6ccc263904e55122899b16663395/psi4/driver/qcdb/libmintsgshell.py#L274-L276
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemFramework/v1/AWS/common-code/lib/OpenSSL/crypto.py
python
X509.to_cryptography
(self)
return _Certificate(backend, self._x509)
Export as a ``cryptography`` certificate. :rtype: ``cryptography.x509.Certificate`` .. versionadded:: 17.1.0
Export as a ``cryptography`` certificate.
[ "Export", "as", "a", "cryptography", "certificate", "." ]
def to_cryptography(self): """ Export as a ``cryptography`` certificate. :rtype: ``cryptography.x509.Certificate`` .. versionadded:: 17.1.0 """ from cryptography.hazmat.backends.openssl.x509 import _Certificate backend = _get_backend() return _Certificat...
[ "def", "to_cryptography", "(", "self", ")", ":", "from", "cryptography", ".", "hazmat", ".", "backends", ".", "openssl", ".", "x509", "import", "_Certificate", "backend", "=", "_get_backend", "(", ")", "return", "_Certificate", "(", "backend", ",", "self", "...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemFramework/v1/AWS/common-code/lib/OpenSSL/crypto.py#L1071-L1081
HKUST-Aerial-Robotics/Fast-Planner
2ddd7793eecd573dbb5b47e2c985aa06606df3cf
uav_simulator/Utils/multi_map_server/quadrotor_msgs/build/catkin_generated/installspace/_setup_util.py
python
prepend_env_variables
(environ, env_var_subfolders, workspaces)
return lines
Generate shell code to prepend environment variables for the all workspaces.
Generate shell code to prepend environment variables for the all workspaces.
[ "Generate", "shell", "code", "to", "prepend", "environment", "variables", "for", "the", "all", "workspaces", "." ]
def prepend_env_variables(environ, env_var_subfolders, workspaces): ''' Generate shell code to prepend environment variables for the all workspaces. ''' lines = [] lines.append(comment('prepend folders of workspaces to environment variables')) paths = [path for path in workspaces.split(os.p...
[ "def", "prepend_env_variables", "(", "environ", ",", "env_var_subfolders", ",", "workspaces", ")", ":", "lines", "=", "[", "]", "lines", ".", "append", "(", "comment", "(", "'prepend folders of workspaces to environment variables'", ")", ")", "paths", "=", "[", "p...
https://github.com/HKUST-Aerial-Robotics/Fast-Planner/blob/2ddd7793eecd573dbb5b47e2c985aa06606df3cf/uav_simulator/Utils/multi_map_server/quadrotor_msgs/build/catkin_generated/installspace/_setup_util.py#L129-L146
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/numpy/py3/numpy/ma/mrecords.py
python
_guessvartypes
(arr)
return vartypes
Tries to guess the dtypes of the str_ ndarray `arr`. Guesses by testing element-wise conversion. Returns a list of dtypes. The array is first converted to ndarray. If the array is 2D, the test is performed on the first line. An exception is raised if the file is 3D or more.
Tries to guess the dtypes of the str_ ndarray `arr`.
[ "Tries", "to", "guess", "the", "dtypes", "of", "the", "str_", "ndarray", "arr", "." ]
def _guessvartypes(arr): """ Tries to guess the dtypes of the str_ ndarray `arr`. Guesses by testing element-wise conversion. Returns a list of dtypes. The array is first converted to ndarray. If the array is 2D, the test is performed on the first line. An exception is raised if the file is 3D ...
[ "def", "_guessvartypes", "(", "arr", ")", ":", "vartypes", "=", "[", "]", "arr", "=", "np", ".", "asarray", "(", "arr", ")", "if", "arr", ".", "ndim", "==", "2", ":", "arr", "=", "arr", "[", "0", "]", "elif", "arr", ".", "ndim", ">", "2", ":"...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/numpy/py3/numpy/ma/mrecords.py#L615-L649
thalium/icebox
99d147d5b9269222225443ce171b4fd46d8985d4
third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2class.py
python
xmlDoc.htmlSaveFile
(self, filename)
return ret
Dump an HTML document to a file. If @filename is "-" the stdout file is used.
Dump an HTML document to a file. If
[ "Dump", "an", "HTML", "document", "to", "a", "file", ".", "If" ]
def htmlSaveFile(self, filename): """Dump an HTML document to a file. If @filename is "-" the stdout file is used. """ ret = libxml2mod.htmlSaveFile(filename, self._o) return ret
[ "def", "htmlSaveFile", "(", "self", ",", "filename", ")", ":", "ret", "=", "libxml2mod", ".", "htmlSaveFile", "(", "filename", ",", "self", ".", "_o", ")", "return", "ret" ]
https://github.com/thalium/icebox/blob/99d147d5b9269222225443ce171b4fd46d8985d4/third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2class.py#L3263-L3267
qbittorrent/qBittorrent
78eaa49cd6b3b59c064cd461fe6d30eceaeac770
src/searchengine/nova3/nova2.py
python
displayCapabilities
(supported_engines)
Display capabilities in XML format <capabilities> <engine_short_name> <name>long name</name> <url>http://example.com</url> <categories>movies music games</categories> </engine_short_name> </capabilities>
Display capabilities in XML format <capabilities> <engine_short_name> <name>long name</name> <url>http://example.com</url> <categories>movies music games</categories> </engine_short_name> </capabilities>
[ "Display", "capabilities", "in", "XML", "format", "<capabilities", ">", "<engine_short_name", ">", "<name", ">", "long", "name<", "/", "name", ">", "<url", ">", "http", ":", "//", "example", ".", "com<", "/", "url", ">", "<categories", ">", "movies", "musi...
def displayCapabilities(supported_engines): """ Display capabilities in XML format <capabilities> <engine_short_name> <name>long name</name> <url>http://example.com</url> <categories>movies music games</categories> </engine_short_name> </capabilities> """ xml ...
[ "def", "displayCapabilities", "(", "supported_engines", ")", ":", "xml", "=", "\"\"", ".", "join", "(", "(", "\"<capabilities>\\n\"", ",", "\"\"", ".", "join", "(", "engines_to_xml", "(", "supported_engines", ")", ")", ",", "\"</capabilities>\"", ")", ")", "pr...
https://github.com/qbittorrent/qBittorrent/blob/78eaa49cd6b3b59c064cd461fe6d30eceaeac770/src/searchengine/nova3/nova2.py#L105-L119
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/calendar.py
python
Calendar.yeardatescalendar
(self, year, width=3)
return [months[i:i+width] for i in range(0, len(months), width) ]
Return the data for the specified year ready for formatting. The return value is a list of month rows. Each month row contains upto width months. Each month contains between 4 and 6 weeks and each week contains 1-7 days. Days are datetime.date objects.
Return the data for the specified year ready for formatting. The return value is a list of month rows. Each month row contains upto width months. Each month contains between 4 and 6 weeks and each week contains 1-7 days. Days are datetime.date objects.
[ "Return", "the", "data", "for", "the", "specified", "year", "ready", "for", "formatting", ".", "The", "return", "value", "is", "a", "list", "of", "month", "rows", ".", "Each", "month", "row", "contains", "upto", "width", "months", ".", "Each", "month", "...
def yeardatescalendar(self, year, width=3): """ Return the data for the specified year ready for formatting. The return value is a list of month rows. Each month row contains upto width months. Each month contains between 4 and 6 weeks and each week contains 1-7 days. Days are da...
[ "def", "yeardatescalendar", "(", "self", ",", "year", ",", "width", "=", "3", ")", ":", "months", "=", "[", "self", ".", "monthdatescalendar", "(", "year", ",", "i", ")", "for", "i", "in", "range", "(", "January", ",", "January", "+", "12", ")", "]...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/calendar.py#L220-L231
cms-sw/cmssw
fd9de012d503d3405420bcbeec0ec879baa57cf2
Validation/RecoTrack/python/plotting/ntupleDataFormat.py
python
BeamSpot.__init__
(self, tree)
Constructor. Arguments: tree -- TTree object
Constructor.
[ "Constructor", "." ]
def __init__(self, tree): """Constructor. Arguments: tree -- TTree object """ super(BeamSpot, self).__init__() self._tree = tree self._prefix = "bsp"
[ "def", "__init__", "(", "self", ",", "tree", ")", ":", "super", "(", "BeamSpot", ",", "self", ")", ".", "__init__", "(", ")", "self", ".", "_tree", "=", "tree", "self", ".", "_prefix", "=", "\"bsp\"" ]
https://github.com/cms-sw/cmssw/blob/fd9de012d503d3405420bcbeec0ec879baa57cf2/Validation/RecoTrack/python/plotting/ntupleDataFormat.py#L529-L537
echronos/echronos
c996f1d2c8af6c6536205eb319c1bf1d4d84569c
external_tools/ply_info/example/BASIC/basparse.py
python
p_program
(p)
program : program statement | statement
program : program statement | statement
[ "program", ":", "program", "statement", "|", "statement" ]
def p_program(p): '''program : program statement | statement''' if len(p) == 2 and p[1]: p[0] = { } line,stat = p[1] p[0][line] = stat elif len(p) ==3: p[0] = p[1] if not p[0]: p[0] = { } if p[2]: line,stat = p[2] p[0][line] = s...
[ "def", "p_program", "(", "p", ")", ":", "if", "len", "(", "p", ")", "==", "2", "and", "p", "[", "1", "]", ":", "p", "[", "0", "]", "=", "{", "}", "line", ",", "stat", "=", "p", "[", "1", "]", "p", "[", "0", "]", "[", "line", "]", "=",...
https://github.com/echronos/echronos/blob/c996f1d2c8af6c6536205eb319c1bf1d4d84569c/external_tools/ply_info/example/BASIC/basparse.py#L19-L32
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib-tk/Tkinter.py
python
getboolean
(s)
return _default_root.tk.getboolean(s)
Convert true and false to integer values 1 and 0.
Convert true and false to integer values 1 and 0.
[ "Convert", "true", "and", "false", "to", "integer", "values", "1", "and", "0", "." ]
def getboolean(s): """Convert true and false to integer values 1 and 0.""" return _default_root.tk.getboolean(s)
[ "def", "getboolean", "(", "s", ")", ":", "return", "_default_root", ".", "tk", ".", "getboolean", "(", "s", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib-tk/Tkinter.py#L367-L369
SpenceKonde/megaTinyCore
1c4a70b18a149fe6bcb551dfa6db11ca50b8997b
megaavr/tools/libs/pymcuprog/avr8target.py
python
TinyXAvrTarget.sib_read
(self)
return self.protocol.memory_read(Avr8Protocol.AVR8_MEMTYPE_SIB, 0, 32)
Reads the System Information Block :return: SIB bytes
Reads the System Information Block
[ "Reads", "the", "System", "Information", "Block" ]
def sib_read(self): """ Reads the System Information Block :return: SIB bytes """ return self.protocol.memory_read(Avr8Protocol.AVR8_MEMTYPE_SIB, 0, 32)
[ "def", "sib_read", "(", "self", ")", ":", "return", "self", ".", "protocol", ".", "memory_read", "(", "Avr8Protocol", ".", "AVR8_MEMTYPE_SIB", ",", "0", ",", "32", ")" ]
https://github.com/SpenceKonde/megaTinyCore/blob/1c4a70b18a149fe6bcb551dfa6db11ca50b8997b/megaavr/tools/libs/pymcuprog/avr8target.py#L206-L212
apache/singa
93fd9da72694e68bfe3fb29d0183a65263d238a1
python/singa/autograd.py
python
HardSigmoid.__init__
(self, alpha=0.2, gamma=0.5)
Args: alpha (float): Value of alpha. gamma (float): Value of beta.
Args: alpha (float): Value of alpha. gamma (float): Value of beta.
[ "Args", ":", "alpha", "(", "float", ")", ":", "Value", "of", "alpha", ".", "gamma", "(", "float", ")", ":", "Value", "of", "beta", "." ]
def __init__(self, alpha=0.2, gamma=0.5): """ Args: alpha (float): Value of alpha. gamma (float): Value of beta. """ super(HardSigmoid, self).__init__() self.alpha = alpha self.gamma = gamma
[ "def", "__init__", "(", "self", ",", "alpha", "=", "0.2", ",", "gamma", "=", "0.5", ")", ":", "super", "(", "HardSigmoid", ",", "self", ")", ".", "__init__", "(", ")", "self", ".", "alpha", "=", "alpha", "self", ".", "gamma", "=", "gamma" ]
https://github.com/apache/singa/blob/93fd9da72694e68bfe3fb29d0183a65263d238a1/python/singa/autograd.py#L3172-L3180
apache/incubator-mxnet
f03fb23f1d103fec9541b5ae59ee06b1734a51d9
python/mxnet/optimizer/optimizer.py
python
Optimizer._get_lr
(self, index)
return self._get_lrs([index])[0]
Gets the learning rate given the index of the weight. Parameters ---------- index : int The index corresponding to the weight. Returns ------- lr : float Learning rate for this index.
Gets the learning rate given the index of the weight.
[ "Gets", "the", "learning", "rate", "given", "the", "index", "of", "the", "weight", "." ]
def _get_lr(self, index): """Gets the learning rate given the index of the weight. Parameters ---------- index : int The index corresponding to the weight. Returns ------- lr : float Learning rate for this index. """ retur...
[ "def", "_get_lr", "(", "self", ",", "index", ")", ":", "return", "self", ".", "_get_lrs", "(", "[", "index", "]", ")", "[", "0", "]" ]
https://github.com/apache/incubator-mxnet/blob/f03fb23f1d103fec9541b5ae59ee06b1734a51d9/python/mxnet/optimizer/optimizer.py#L495-L508
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/python2_version/klampt/model/trajectory.py
python
SO3Trajectory.getPointTrajectory
(self,localPt)
return Trajectory(self.times,[so3.apply(m,localPt) for m in self.milestones])
Returns a Trajectory describing the movement of the point localPt attached to this rotating frame.
Returns a Trajectory describing the movement of the point localPt attached to this rotating frame.
[ "Returns", "a", "Trajectory", "describing", "the", "movement", "of", "the", "point", "localPt", "attached", "to", "this", "rotating", "frame", "." ]
def getPointTrajectory(self,localPt): """Returns a Trajectory describing the movement of the point localPt attached to this rotating frame. """ return Trajectory(self.times,[so3.apply(m,localPt) for m in self.milestones])
[ "def", "getPointTrajectory", "(", "self", ",", "localPt", ")", ":", "return", "Trajectory", "(", "self", ".", "times", ",", "[", "so3", ".", "apply", "(", "m", ",", "localPt", ")", "for", "m", "in", "self", ".", "milestones", "]", ")" ]
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/python2_version/klampt/model/trajectory.py#L658-L661
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/contrib/graph_editor/reroute.py
python
swap_inputs
(sgv0, sgv1)
return _reroute_sgv_inputs(sgv0, sgv1, _RerouteMode.swap)
Swap all the inputs of sgv0 and sgv1 (see reroute_inputs).
Swap all the inputs of sgv0 and sgv1 (see reroute_inputs).
[ "Swap", "all", "the", "inputs", "of", "sgv0", "and", "sgv1", "(", "see", "reroute_inputs", ")", "." ]
def swap_inputs(sgv0, sgv1): """Swap all the inputs of sgv0 and sgv1 (see reroute_inputs).""" return _reroute_sgv_inputs(sgv0, sgv1, _RerouteMode.swap)
[ "def", "swap_inputs", "(", "sgv0", ",", "sgv1", ")", ":", "return", "_reroute_sgv_inputs", "(", "sgv0", ",", "sgv1", ",", "_RerouteMode", ".", "swap", ")" ]
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/contrib/graph_editor/reroute.py#L398-L400
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
gpu/command_buffer/build_gles2_cmd_buffer.py
python
Function.WriteCmdComputeSize
(self, file)
Writes the ComputeSize function for the command.
Writes the ComputeSize function for the command.
[ "Writes", "the", "ComputeSize", "function", "for", "the", "command", "." ]
def WriteCmdComputeSize(self, file): """Writes the ComputeSize function for the command.""" file.Write(" static uint32 ComputeSize() {\n") file.Write( " return static_cast<uint32>(sizeof(ValueType)); // NOLINT\n") file.Write(" }\n") file.Write("\n")
[ "def", "WriteCmdComputeSize", "(", "self", ",", "file", ")", ":", "file", ".", "Write", "(", "\" static uint32 ComputeSize() {\\n\"", ")", "file", ".", "Write", "(", "\" return static_cast<uint32>(sizeof(ValueType)); // NOLINT\\n\"", ")", "file", ".", "Write", "(",...
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/gpu/command_buffer/build_gles2_cmd_buffer.py#L5280-L5286
twhui/LiteFlowNet
00925aebf2db9ac50f4b1666f718688b10dd10d1
scripts/cpp_lint.py
python
_FunctionState.End
(self)
Stop analyzing function body.
Stop analyzing function body.
[ "Stop", "analyzing", "function", "body", "." ]
def End(self): """Stop analyzing function body.""" self.in_a_function = False
[ "def", "End", "(", "self", ")", ":", "self", ".", "in_a_function", "=", "False" ]
https://github.com/twhui/LiteFlowNet/blob/00925aebf2db9ac50f4b1666f718688b10dd10d1/scripts/cpp_lint.py#L861-L863
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
scripts/SANS/sans/algorithm_detail/calculate_transmission_helper.py
python
apply_flat_background_correction_to_detectors
(workspace, flat_background_correction_start, flat_background_correction_stop)
return workspace
Applies the flat background correction to all detectors which are not monitors :param workspace: the workspace which contains detector spectra which will be corrected. :param flat_background_correction_start: the start of the flat background region :param flat_background_correction_stop: the end of the fla...
Applies the flat background correction to all detectors which are not monitors
[ "Applies", "the", "flat", "background", "correction", "to", "all", "detectors", "which", "are", "not", "monitors" ]
def apply_flat_background_correction_to_detectors(workspace, flat_background_correction_start, flat_background_correction_stop): """ Applies the flat background correction to all detectors which are not monitors :param workspace: the workspace which contain...
[ "def", "apply_flat_background_correction_to_detectors", "(", "workspace", ",", "flat_background_correction_start", ",", "flat_background_correction_stop", ")", ":", "if", "flat_background_correction_start", "is", "not", "None", "and", "flat_background_correction_stop", "is", "not...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/scripts/SANS/sans/algorithm_detail/calculate_transmission_helper.py#L12-L34
bulletphysics/bullet3
f0f2a952e146f016096db6f85cf0c44ed75b0b9a
examples/pybullet/gym/pybullet_envs/bullet/minitaur_duck_gym_env.py
python
MinitaurBulletDuckEnv.__init__
( self, urdf_root=pybullet_data.getDataPath(), action_repeat=1, distance_weight=1.0, energy_weight=0.005, shake_weight=0.0, drift_weight=0.0, distance_limit=float("inf"), observation_noise_stdev=0.0, self_collision_enabled=True, motor_velocity_limit=np.i...
Initialize the minitaur gym environment. Args: urdf_root: The path to the urdf data folder. action_repeat: The number of simulation steps before actions are applied. distance_weight: The weight of the distance term in the reward. energy_weight: The weight of the energy term in the reward. ...
Initialize the minitaur gym environment.
[ "Initialize", "the", "minitaur", "gym", "environment", "." ]
def __init__( self, urdf_root=pybullet_data.getDataPath(), action_repeat=1, distance_weight=1.0, energy_weight=0.005, shake_weight=0.0, drift_weight=0.0, distance_limit=float("inf"), observation_noise_stdev=0.0, self_collision_enabled=True, motor_velocit...
[ "def", "__init__", "(", "self", ",", "urdf_root", "=", "pybullet_data", ".", "getDataPath", "(", ")", ",", "action_repeat", "=", "1", ",", "distance_weight", "=", "1.0", ",", "energy_weight", "=", "0.005", ",", "shake_weight", "=", "0.0", ",", "drift_weight"...
https://github.com/bulletphysics/bullet3/blob/f0f2a952e146f016096db6f85cf0c44ed75b0b9a/examples/pybullet/gym/pybullet_envs/bullet/minitaur_duck_gym_env.py#L52-L166
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/distutils/cmd.py
python
Command.set_undefined_options
(self, src_cmd, *option_pairs)
Set the values of any "undefined" options from corresponding option values in some other command object. "Undefined" here means "is None", which is the convention used to indicate that an option has not been changed between 'initialize_options()' and 'finalize_options()'. Usually calle...
Set the values of any "undefined" options from corresponding option values in some other command object. "Undefined" here means "is None", which is the convention used to indicate that an option has not been changed between 'initialize_options()' and 'finalize_options()'. Usually calle...
[ "Set", "the", "values", "of", "any", "undefined", "options", "from", "corresponding", "option", "values", "in", "some", "other", "command", "object", ".", "Undefined", "here", "means", "is", "None", "which", "is", "the", "convention", "used", "to", "indicate",...
def set_undefined_options(self, src_cmd, *option_pairs): """Set the values of any "undefined" options from corresponding option values in some other command object. "Undefined" here means "is None", which is the convention used to indicate that an option has not been changed between 'in...
[ "def", "set_undefined_options", "(", "self", ",", "src_cmd", ",", "*", "option_pairs", ")", ":", "# Option_pairs: list of (src_option, dst_option) tuples", "src_cmd_obj", "=", "self", ".", "distribution", ".", "get_command_obj", "(", "src_cmd", ")", "src_cmd_obj", ".", ...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/distutils/cmd.py#L280-L302
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/logging/config.py
python
BaseConfigurator.ext_convert
(self, value)
return self.resolve(value)
Default converter for the ext:// protocol.
Default converter for the ext:// protocol.
[ "Default", "converter", "for", "the", "ext", ":", "//", "protocol", "." ]
def ext_convert(self, value): """Default converter for the ext:// protocol.""" return self.resolve(value)
[ "def", "ext_convert", "(", "self", ",", "value", ")", ":", "return", "self", ".", "resolve", "(", "value", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/logging/config.py#L399-L401
BestSonny/SSTD
174d452189f6bf9cf4b6957719392008bd974069
python/caffe/draw.py
python
get_layer_label
(layer, rankdir)
return node_label
Define node label based on layer type. Parameters ---------- layer : ? rankdir : {'LR', 'TB', 'BT'} Direction of graph layout. Returns ------- string : A label for the current layer
Define node label based on layer type.
[ "Define", "node", "label", "based", "on", "layer", "type", "." ]
def get_layer_label(layer, rankdir): """Define node label based on layer type. Parameters ---------- layer : ? rankdir : {'LR', 'TB', 'BT'} Direction of graph layout. Returns ------- string : A label for the current layer """ if rankdir in ('TB', 'BT'): ...
[ "def", "get_layer_label", "(", "layer", ",", "rankdir", ")", ":", "if", "rankdir", "in", "(", "'TB'", ",", "'BT'", ")", ":", "# If graph orientation is vertical, horizontal space is free and", "# vertical space is not; separate words with spaces", "separator", "=", "' '", ...
https://github.com/BestSonny/SSTD/blob/174d452189f6bf9cf4b6957719392008bd974069/python/caffe/draw.py#L62-L114
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scikit-learn/py3/sklearn/utils/__init__.py
python
all_estimators
(include_meta_estimators=None, include_other=None, type_filter=None, include_dont_test=None)
return sorted(set(estimators), key=itemgetter(0))
Get a list of all estimators from sklearn. This function crawls the module and gets all classes that inherit from BaseEstimator. Classes that are defined in test-modules are not included. By default meta_estimators such as GridSearchCV are also not included. Parameters ---------- include_m...
Get a list of all estimators from sklearn.
[ "Get", "a", "list", "of", "all", "estimators", "from", "sklearn", "." ]
def all_estimators(include_meta_estimators=None, include_other=None, type_filter=None, include_dont_test=None): """Get a list of all estimators from sklearn. This function crawls the module and gets all classes that inherit from BaseEstimator. Classes that are defined ...
[ "def", "all_estimators", "(", "include_meta_estimators", "=", "None", ",", "include_other", "=", "None", ",", "type_filter", "=", "None", ",", "include_dont_test", "=", "None", ")", ":", "# lazy import to avoid circular imports from sklearn.base", "from", ".", "_testing...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scikit-learn/py3/sklearn/utils/__init__.py#L1152-L1283
miyosuda/TensorFlowAndroidDemo
35903e0221aa5f109ea2dbef27f20b52e317f42d
jni-build/jni/include/tensorflow/contrib/distributions/python/ops/bijector.py
python
_Bijector.inverse_log_det_jacobian
(self, x, name='inverse_log_det_jacobian')
Returns the (log o det o Jacobian o inverse)(x). Mathematically, returns: log(det(dY/dX g^{-1}))(Y). Args: x: `Tensor`. The input to the "inverse" Jacobian evaluation. name: The name to give this op. Returns: `Tensor`.
Returns the (log o det o Jacobian o inverse)(x).
[ "Returns", "the", "(", "log", "o", "det", "o", "Jacobian", "o", "inverse", ")", "(", "x", ")", "." ]
def inverse_log_det_jacobian(self, x, name='inverse_log_det_jacobian'): """Returns the (log o det o Jacobian o inverse)(x). Mathematically, returns: log(det(dY/dX g^{-1}))(Y). Args: x: `Tensor`. The input to the "inverse" Jacobian evaluation. name: The name to give this op. Returns: ...
[ "def", "inverse_log_det_jacobian", "(", "self", ",", "x", ",", "name", "=", "'inverse_log_det_jacobian'", ")", ":", "with", "ops", ".", "name_scope", "(", "self", ".", "name", ")", ":", "with", "ops", ".", "op_scope", "(", "[", "x", "]", ",", "name", "...
https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/contrib/distributions/python/ops/bijector.py#L184-L202
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/lib2to3/fixes/fix_metaclass.py
python
fixup_indent
(suite)
If an INDENT is followed by a thing with a prefix then nuke the prefix Otherwise we get in trouble when removing __metaclass__ at suite start
If an INDENT is followed by a thing with a prefix then nuke the prefix Otherwise we get in trouble when removing __metaclass__ at suite start
[ "If", "an", "INDENT", "is", "followed", "by", "a", "thing", "with", "a", "prefix", "then", "nuke", "the", "prefix", "Otherwise", "we", "get", "in", "trouble", "when", "removing", "__metaclass__", "at", "suite", "start" ]
def fixup_indent(suite): """ If an INDENT is followed by a thing with a prefix then nuke the prefix Otherwise we get in trouble when removing __metaclass__ at suite start """ kids = suite.children[::-1] # find the first indent while kids: node = kids.pop() if node.type == tok...
[ "def", "fixup_indent", "(", "suite", ")", ":", "kids", "=", "suite", ".", "children", "[", ":", ":", "-", "1", "]", "# find the first indent", "while", "kids", ":", "node", "=", "kids", ".", "pop", "(", ")", "if", "node", ".", "type", "==", "token", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/lib2to3/fixes/fix_metaclass.py#L123-L142
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/html.py
python
HtmlPrintout.SetHtmlText
(*args, **kwargs)
return _html.HtmlPrintout_SetHtmlText(*args, **kwargs)
SetHtmlText(self, String html, String basepath=EmptyString, bool isdir=True)
SetHtmlText(self, String html, String basepath=EmptyString, bool isdir=True)
[ "SetHtmlText", "(", "self", "String", "html", "String", "basepath", "=", "EmptyString", "bool", "isdir", "=", "True", ")" ]
def SetHtmlText(*args, **kwargs): """SetHtmlText(self, String html, String basepath=EmptyString, bool isdir=True)""" return _html.HtmlPrintout_SetHtmlText(*args, **kwargs)
[ "def", "SetHtmlText", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_html", ".", "HtmlPrintout_SetHtmlText", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/html.py#L1276-L1278
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/httplib.py
python
HTTPResponse.getheaders
(self)
return self.msg.items()
Return list of (header, value) tuples.
Return list of (header, value) tuples.
[ "Return", "list", "of", "(", "header", "value", ")", "tuples", "." ]
def getheaders(self): """Return list of (header, value) tuples.""" if self.msg is None: raise ResponseNotReady() return self.msg.items()
[ "def", "getheaders", "(", "self", ")", ":", "if", "self", ".", "msg", "is", "None", ":", "raise", "ResponseNotReady", "(", ")", "return", "self", ".", "msg", ".", "items", "(", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/httplib.py#L673-L677
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_core.py
python
Image.ResampleBilinear
(*args, **kwargs)
return _core_.Image_ResampleBilinear(*args, **kwargs)
ResampleBilinear(self, int width, int height) -> Image
ResampleBilinear(self, int width, int height) -> Image
[ "ResampleBilinear", "(", "self", "int", "width", "int", "height", ")", "-", ">", "Image" ]
def ResampleBilinear(*args, **kwargs): """ResampleBilinear(self, int width, int height) -> Image""" return _core_.Image_ResampleBilinear(*args, **kwargs)
[ "def", "ResampleBilinear", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "Image_ResampleBilinear", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_core.py#L2926-L2928
SoarGroup/Soar
a1c5e249499137a27da60533c72969eef3b8ab6b
scons/scons-time.py
python
SConsTimer.outdent
(self, s)
return '\n'.join([strip_initial_spaces(l) for l in lines]) + '\n'
Strip as many spaces from each line as are found at the beginning of the first line in the list.
Strip as many spaces from each line as are found at the beginning of the first line in the list.
[ "Strip", "as", "many", "spaces", "from", "each", "line", "as", "are", "found", "at", "the", "beginning", "of", "the", "first", "line", "in", "the", "list", "." ]
def outdent(self, s): """ Strip as many spaces from each line as are found at the beginning of the first line in the list. """ lines = s.split('\n') if lines[0] == '': lines = lines[1:] spaces = re.match(' *', lines[0]).group(0) def strip_init...
[ "def", "outdent", "(", "self", ",", "s", ")", ":", "lines", "=", "s", ".", "split", "(", "'\\n'", ")", "if", "lines", "[", "0", "]", "==", "''", ":", "lines", "=", "lines", "[", "1", ":", "]", "spaces", "=", "re", ".", "match", "(", "' *'", ...
https://github.com/SoarGroup/Soar/blob/a1c5e249499137a27da60533c72969eef3b8ab6b/scons/scons-time.py#L594-L609
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/gsutil/third_party/boto/boto/storage_uri.py
python
FileStorageUri.names_directory
(self)
return os.path.isdir(self.object_name)
Returns True if this URI names a directory.
Returns True if this URI names a directory.
[ "Returns", "True", "if", "this", "URI", "names", "a", "directory", "." ]
def names_directory(self): """Returns True if this URI names a directory.""" if self.stream: return False return os.path.isdir(self.object_name)
[ "def", "names_directory", "(", "self", ")", ":", "if", "self", ".", "stream", ":", "return", "False", "return", "os", ".", "path", ".", "isdir", "(", "self", ".", "object_name", ")" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/gsutil/third_party/boto/boto/storage_uri.py#L854-L858
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib2to3/fixer_util.py
python
in_special_context
(node)
return False
Returns true if node is in an environment where all that is required of it is being iterable (ie, it doesn't matter if it returns a list or an iterator). See test_map_nochange in test_fixers.py for some examples and tests.
Returns true if node is in an environment where all that is required of it is being iterable (ie, it doesn't matter if it returns a list or an iterator). See test_map_nochange in test_fixers.py for some examples and tests.
[ "Returns", "true", "if", "node", "is", "in", "an", "environment", "where", "all", "that", "is", "required", "of", "it", "is", "being", "iterable", "(", "ie", "it", "doesn", "t", "matter", "if", "it", "returns", "a", "list", "or", "an", "iterator", ")",...
def in_special_context(node): """ Returns true if node is in an environment where all that is required of it is being iterable (ie, it doesn't matter if it returns a list or an iterator). See test_map_nochange in test_fixers.py for some examples and tests. """ global p0, p1, p2, ...
[ "def", "in_special_context", "(", "node", ")", ":", "global", "p0", ",", "p1", ",", "p2", ",", "pats_built", "if", "not", "pats_built", ":", "p0", "=", "patcomp", ".", "compile_pattern", "(", "p0", ")", "p1", "=", "patcomp", ".", "compile_pattern", "(", ...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib2to3/fixer_util.py#L208-L225
hughperkins/tf-coriander
970d3df6c11400ad68405f22b0c42a52374e94ca
tensorflow/python/framework/ops.py
python
register_tensor_conversion_function
(base_type, conversion_func, priority=100)
Registers a function for converting objects of `base_type` to `Tensor`. The conversion function must have the following signature: ```python def conversion_func(value, dtype=None, name=None, as_ref=False): # ... ``` It must return a `Tensor` with the given `dtype` if specified. If the convers...
Registers a function for converting objects of `base_type` to `Tensor`.
[ "Registers", "a", "function", "for", "converting", "objects", "of", "base_type", "to", "Tensor", "." ]
def register_tensor_conversion_function(base_type, conversion_func, priority=100): """Registers a function for converting objects of `base_type` to `Tensor`. The conversion function must have the following signature: ```python def conversion_func(value, dtype=None, ...
[ "def", "register_tensor_conversion_function", "(", "base_type", ",", "conversion_func", ",", "priority", "=", "100", ")", ":", "if", "not", "(", "isinstance", "(", "base_type", ",", "type", ")", "or", "(", "isinstance", "(", "base_type", ",", "tuple", ")", "...
https://github.com/hughperkins/tf-coriander/blob/970d3df6c11400ad68405f22b0c42a52374e94ca/tensorflow/python/framework/ops.py#L794-L847
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/telemetry/telemetry/internal/actions/action_runner.py
python
ActionRunner.ScrollBouncePage
(self, left_start_ratio=0.5, top_start_ratio=0.5, direction='down', distance=100, overscroll=10, repeat_count=10, speed_in_pixels_per_second=400)
Perform scroll bounce gesture on the page. This gesture scrolls the page by the number of pixels specified in distance, in the given direction, followed by a scroll by (distance + overscroll) pixels in the opposite direction. The above gesture is repeated repeat_count times. Args: left_start...
Perform scroll bounce gesture on the page.
[ "Perform", "scroll", "bounce", "gesture", "on", "the", "page", "." ]
def ScrollBouncePage(self, left_start_ratio=0.5, top_start_ratio=0.5, direction='down', distance=100, overscroll=10, repeat_count=10, speed_in_pixels_per_second=400): """Perform scroll bounce gesture on the page. This gesture scrolls the page...
[ "def", "ScrollBouncePage", "(", "self", ",", "left_start_ratio", "=", "0.5", ",", "top_start_ratio", "=", "0.5", ",", "direction", "=", "'down'", ",", "distance", "=", "100", ",", "overscroll", "=", "10", ",", "repeat_count", "=", "10", ",", "speed_in_pixels...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/telemetry/telemetry/internal/actions/action_runner.py#L471-L501
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_gdi.py
python
ColourRGB
(*args, **kwargs)
return val
ColourRGB(unsigned long colRGB) -> Colour Constructs a colour from a packed RGB value.
ColourRGB(unsigned long colRGB) -> Colour
[ "ColourRGB", "(", "unsigned", "long", "colRGB", ")", "-", ">", "Colour" ]
def ColourRGB(*args, **kwargs): """ ColourRGB(unsigned long colRGB) -> Colour Constructs a colour from a packed RGB value. """ val = _gdi_.new_ColourRGB(*args, **kwargs) return val
[ "def", "ColourRGB", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "val", "=", "_gdi_", ".", "new_ColourRGB", "(", "*", "args", ",", "*", "*", "kwargs", ")", "return", "val" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_gdi.py#L313-L320
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python/src/Lib/telnetlib.py
python
Telnet.__init__
(self, host=None, port=0, timeout=socket._GLOBAL_DEFAULT_TIMEOUT)
Constructor. When called without arguments, create an unconnected instance. With a hostname argument, it connects the instance; port number and timeout are optional.
Constructor.
[ "Constructor", "." ]
def __init__(self, host=None, port=0, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): """Constructor. When called without arguments, create an unconnected instance. With a hostname argument, it connects the instance; port number and timeout are optional. """ se...
[ "def", "__init__", "(", "self", ",", "host", "=", "None", ",", "port", "=", "0", ",", "timeout", "=", "socket", ".", "_GLOBAL_DEFAULT_TIMEOUT", ")", ":", "self", ".", "debuglevel", "=", "DEBUGLEVEL", "self", ".", "host", "=", "host", "self", ".", "port...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Lib/telnetlib.py#L188-L211
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/python/ops/nn.py
python
nce_loss
(weights, biases, inputs, labels, num_sampled, num_classes, num_true=1, sampled_values=None, remove_accidental_hits=False, partition_strategy="mod", name="nce_loss")
return _sum_rows(sampled_losses)
Computes and returns the noise-contrastive estimation training loss. See [Noise-contrastive estimation: A new estimation principle for unnormalized statistical models] (http://www.jmlr.org/proceedings/papers/v9/gutmann10a/gutmann10a.pdf). Also see our [Candidate Sampling Algorithms Reference] (../../extras/c...
Computes and returns the noise-contrastive estimation training loss.
[ "Computes", "and", "returns", "the", "noise", "-", "contrastive", "estimation", "training", "loss", "." ]
def nce_loss(weights, biases, inputs, labels, num_sampled, num_classes, num_true=1, sampled_values=None, remove_accidental_hits=False, partition_strategy="mod", name="nce_loss"): """Comput...
[ "def", "nce_loss", "(", "weights", ",", "biases", ",", "inputs", ",", "labels", ",", "num_sampled", ",", "num_classes", ",", "num_true", "=", "1", ",", "sampled_values", "=", "None", ",", "remove_accidental_hits", "=", "False", ",", "partition_strategy", "=", ...
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/python/ops/nn.py#L1122-L1198
llvm/llvm-project
ffa6262cb4e2a335d26416fad39a581b4f98c5f4
mlir/python/mlir/dialects/linalg/opdsl/ops/core_named_ops.py
python
pooling_ndhwc_max
( I=TensorDef(T1, S.N, S.OD * S.SD + S.KD * S.DD, S.OH * S.SH + S.KH * S.DH, S.OW * S.SW + S.KW * S.DW, S.C), K=TensorDef(T2, S.KD, S.KH, S.KW, index_dims=[D.kd, D.kh, D.kw]), O=TensorDef(U, S.N, S.OD, S.OH, S.OW, S.C, output=True), strides=IndexAttrDef(S.SD, S.SH, S.SW), dilations=I...
Performs 3D max pooling. Numeric casting is performed on the input operand, promoting it to the same data type as the accumulator/output.
Performs 3D max pooling.
[ "Performs", "3D", "max", "pooling", "." ]
def pooling_ndhwc_max( I=TensorDef(T1, S.N, S.OD * S.SD + S.KD * S.DD, S.OH * S.SH + S.KH * S.DH, S.OW * S.SW + S.KW * S.DW, S.C), K=TensorDef(T2, S.KD, S.KH, S.KW, index_dims=[D.kd, D.kh, D.kw]), O=TensorDef(U, S.N, S.OD, S.OH, S.OW, S.C, output=True), strides=IndexAttrDef(S.SD, S.SH, S...
[ "def", "pooling_ndhwc_max", "(", "I", "=", "TensorDef", "(", "T1", ",", "S", ".", "N", ",", "S", ".", "OD", "*", "S", ".", "SD", "+", "S", ".", "KD", "*", "S", ".", "DD", ",", "S", ".", "OH", "*", "S", ".", "SH", "+", "S", ".", "KH", "*...
https://github.com/llvm/llvm-project/blob/ffa6262cb4e2a335d26416fad39a581b4f98c5f4/mlir/python/mlir/dialects/linalg/opdsl/ops/core_named_ops.py#L589-L606
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/inspect.py
python
getmro
(cls)
return cls.__mro__
Return tuple of base classes (including cls) in method resolution order.
Return tuple of base classes (including cls) in method resolution order.
[ "Return", "tuple", "of", "base", "classes", "(", "including", "cls", ")", "in", "method", "resolution", "order", "." ]
def getmro(cls): "Return tuple of base classes (including cls) in method resolution order." return cls.__mro__
[ "def", "getmro", "(", "cls", ")", ":", "return", "cls", ".", "__mro__" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/inspect.py#L478-L480
facebook/mysql-5.6
65a650660ec7b4d627d1b738f397252ff4706207
arcanist/lint/cpp_linter/cpplint.py
python
_FunctionState.Check
(self, error, filename, linenum)
Report if too many lines in function body. Args: error: The function to call with any errors found. filename: The name of the current file. linenum: The number of the line to check.
Report if too many lines in function body.
[ "Report", "if", "too", "many", "lines", "in", "function", "body", "." ]
def Check(self, error, filename, linenum): """Report if too many lines in function body. Args: error: The function to call with any errors found. filename: The name of the current file. linenum: The number of the line to check. """ if Match(r'T(EST|est)', self.current_function): ...
[ "def", "Check", "(", "self", ",", "error", ",", "filename", ",", "linenum", ")", ":", "if", "Match", "(", "r'T(EST|est)'", ",", "self", ".", "current_function", ")", ":", "base_trigger", "=", "self", ".", "_TEST_TRIGGER", "else", ":", "base_trigger", "=", ...
https://github.com/facebook/mysql-5.6/blob/65a650660ec7b4d627d1b738f397252ff4706207/arcanist/lint/cpp_linter/cpplint.py#L830-L853
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/coverage/coverage/parser.py
python
PythonParser._raw_parse
(self)
Parse the source to find the interesting facts about its lines. A handful of member fields are updated.
Parse the source to find the interesting facts about its lines.
[ "Parse", "the", "source", "to", "find", "the", "interesting", "facts", "about", "its", "lines", "." ]
def _raw_parse(self): """Parse the source to find the interesting facts about its lines. A handful of member fields are updated. """ # Find lines which match an exclusion pattern. if self.exclude: self.excluded = self.lines_matching(self.exclude) # Tokenize...
[ "def", "_raw_parse", "(", "self", ")", ":", "# Find lines which match an exclusion pattern.", "if", "self", ".", "exclude", ":", "self", ".", "excluded", "=", "self", ".", "lines_matching", "(", "self", ".", "exclude", ")", "# Tokenize, to find excluded suites, to fin...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/coverage/coverage/parser.py#L91-L165
xiaolonw/caffe-video_triplet
c39ea1ad6e937ccf7deba4510b7e555165abf05f
scripts/cpp_lint.py
python
ReverseCloseExpression
(clean_lines, linenum, pos)
return (line, 0, -1)
If input points to ) or } or ] or >, finds the position that opens it. If lines[linenum][pos] points to a ')' or '}' or ']' or '>', finds the linenum/pos that correspond to the opening of the expression. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to ...
If input points to ) or } or ] or >, finds the position that opens it.
[ "If", "input", "points", "to", ")", "or", "}", "or", "]", "or", ">", "finds", "the", "position", "that", "opens", "it", "." ]
def ReverseCloseExpression(clean_lines, linenum, pos): """If input points to ) or } or ] or >, finds the position that opens it. If lines[linenum][pos] points to a ')' or '}' or ']' or '>', finds the linenum/pos that correspond to the opening of the expression. Args: clean_lines: A CleansedLines instance ...
[ "def", "ReverseCloseExpression", "(", "clean_lines", ",", "linenum", ",", "pos", ")", ":", "line", "=", "clean_lines", ".", "elided", "[", "linenum", "]", "endchar", "=", "line", "[", "pos", "]", "if", "endchar", "not", "in", "')}]>'", ":", "return", "("...
https://github.com/xiaolonw/caffe-video_triplet/blob/c39ea1ad6e937ccf7deba4510b7e555165abf05f/scripts/cpp_lint.py#L1327-L1369
borglab/gtsam
a5bee157efce6a0563704bce6a5d188c29817f39
wrap/gtwrap/interface_parser/namespace.py
python
Namespace.top_level
(self)
Return the top level namespace.
Return the top level namespace.
[ "Return", "the", "top", "level", "namespace", "." ]
def top_level(self) -> "Namespace": """Return the top level namespace.""" if self.name == '' or self.parent == '': return self else: return self.parent.top_level()
[ "def", "top_level", "(", "self", ")", "->", "\"Namespace\"", ":", "if", "self", ".", "name", "==", "''", "or", "self", ".", "parent", "==", "''", ":", "return", "self", "else", ":", "return", "self", ".", "parent", ".", "top_level", "(", ")" ]
https://github.com/borglab/gtsam/blob/a5bee157efce6a0563704bce6a5d188c29817f39/wrap/gtwrap/interface_parser/namespace.py#L117-L122
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/propgrid.py
python
PGCell.SetBitmap
(*args, **kwargs)
return _propgrid.PGCell_SetBitmap(*args, **kwargs)
SetBitmap(self, Bitmap bitmap)
SetBitmap(self, Bitmap bitmap)
[ "SetBitmap", "(", "self", "Bitmap", "bitmap", ")" ]
def SetBitmap(*args, **kwargs): """SetBitmap(self, Bitmap bitmap)""" return _propgrid.PGCell_SetBitmap(*args, **kwargs)
[ "def", "SetBitmap", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_propgrid", ".", "PGCell_SetBitmap", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/propgrid.py#L155-L157
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/prompt-toolkit/py2/prompt_toolkit/key_binding/bindings/vi.py
python
TextObject.cut
(self, buffer)
return new_document, clipboard_data
Turn text object into `ClipboardData` instance.
Turn text object into `ClipboardData` instance.
[ "Turn", "text", "object", "into", "ClipboardData", "instance", "." ]
def cut(self, buffer): """ Turn text object into `ClipboardData` instance. """ from_, to = self.operator_range(buffer.document) from_ += buffer.cursor_position to += buffer.cursor_position to -= 1 # SelectionState does not include the end position, `operator_ran...
[ "def", "cut", "(", "self", ",", "buffer", ")", ":", "from_", ",", "to", "=", "self", ".", "operator_range", "(", "buffer", ".", "document", ")", "from_", "+=", "buffer", ".", "cursor_position", "to", "+=", "buffer", ".", "cursor_position", "to", "-=", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/prompt-toolkit/py2/prompt_toolkit/key_binding/bindings/vi.py#L123-L137
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/ros_comm/rospy/src/rospy/impl/tcpros_service.py
python
ServiceProxy.__call__
(self, *args, **kwds)
return self.call(*args, **kwds)
Callable-style version of the service API. This accepts either a request message instance, or you can call directly with arguments to create a new request instance. e.g.:: add_two_ints(AddTwoIntsRequest(1, 2)) add_two_ints(1, 2) add_two_ints(a=1, b=2) ...
Callable-style version of the service API. This accepts either a request message instance, or you can call directly with arguments to create a new request instance. e.g.:: add_two_ints(AddTwoIntsRequest(1, 2)) add_two_ints(1, 2) add_two_ints(a=1, b=2)
[ "Callable", "-", "style", "version", "of", "the", "service", "API", ".", "This", "accepts", "either", "a", "request", "message", "instance", "or", "you", "can", "call", "directly", "with", "arguments", "to", "create", "a", "new", "request", "instance", ".", ...
def __call__(self, *args, **kwds): """ Callable-style version of the service API. This accepts either a request message instance, or you can call directly with arguments to create a new request instance. e.g.:: add_two_ints(AddTwoIntsRequest(1, 2)) add_two_ints(1, 2)...
[ "def", "__call__", "(", "self", ",", "*", "args", ",", "*", "*", "kwds", ")", ":", "return", "self", ".", "call", "(", "*", "args", ",", "*", "*", "kwds", ")" ]
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/ros_comm/rospy/src/rospy/impl/tcpros_service.py#L422-L436
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/image_ops_impl.py
python
combined_non_max_suppression
(boxes, scores, max_output_size_per_class, max_total_size, iou_threshold=0.5, score_threshold=float('-inf'), pad_per_class...
Greedily selects a subset of bounding boxes in descending order of score. This operation performs non_max_suppression on the inputs per batch, across all classes. Prunes away boxes that have high intersection-over-union (IOU) overlap with previously selected boxes. Bounding boxes are supplied as [y1, x1, y2...
Greedily selects a subset of bounding boxes in descending order of score.
[ "Greedily", "selects", "a", "subset", "of", "bounding", "boxes", "in", "descending", "order", "of", "score", "." ]
def combined_non_max_suppression(boxes, scores, max_output_size_per_class, max_total_size, iou_threshold=0.5, score_threshold=float('-inf'), ...
[ "def", "combined_non_max_suppression", "(", "boxes", ",", "scores", ",", "max_output_size_per_class", ",", "max_total_size", ",", "iou_threshold", "=", "0.5", ",", "score_threshold", "=", "float", "(", "'-inf'", ")", ",", "pad_per_class", "=", "False", ",", "clip_...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/image_ops_impl.py#L3871-L3939
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/code.py
python
InteractiveInterpreter.__init__
(self, locals=None)
Constructor. The optional 'locals' argument specifies the dictionary in which code will be executed; it defaults to a newly created dictionary with key "__name__" set to "__console__" and key "__doc__" set to None.
Constructor.
[ "Constructor", "." ]
def __init__(self, locals=None): """Constructor. The optional 'locals' argument specifies the dictionary in which code will be executed; it defaults to a newly created dictionary with key "__name__" set to "__console__" and key "__doc__" set to None. """ if loca...
[ "def", "__init__", "(", "self", ",", "locals", "=", "None", ")", ":", "if", "locals", "is", "None", ":", "locals", "=", "{", "\"__name__\"", ":", "\"__console__\"", ",", "\"__doc__\"", ":", "None", "}", "self", ".", "locals", "=", "locals", "self", "."...
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/code.py#L37-L49
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/contrib/distributions/python/ops/distribution_util.py
python
get_broadcast_shape
(*tensors)
return d_shape
Get broadcast shape as a Python list of integers (preferred) or `Tensor`. Args: *tensors: One or more `Tensor` objects (already converted!). Returns: broadcast shape: Python list (if shapes determined statically), otherwise an `int32` `Tensor`.
Get broadcast shape as a Python list of integers (preferred) or `Tensor`.
[ "Get", "broadcast", "shape", "as", "a", "Python", "list", "of", "integers", "(", "preferred", ")", "or", "Tensor", "." ]
def get_broadcast_shape(*tensors): """Get broadcast shape as a Python list of integers (preferred) or `Tensor`. Args: *tensors: One or more `Tensor` objects (already converted!). Returns: broadcast shape: Python list (if shapes determined statically), otherwise an `int32` `Tensor`. """ # Try...
[ "def", "get_broadcast_shape", "(", "*", "tensors", ")", ":", "# Try static.", "s_shape", "=", "tensors", "[", "0", "]", ".", "shape", "for", "t", "in", "tensors", "[", "1", ":", "]", ":", "s_shape", "=", "array_ops", ".", "broadcast_static_shape", "(", "...
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/contrib/distributions/python/ops/distribution_util.py#L381-L402
NVIDIA/TensorRT
42805f078052daad1a98bc5965974fcffaad0960
samples/python/yolov3_onnx/yolov3_to_onnx.py
python
GraphBuilderONNX.build_onnx_graph
( self, layer_configs, weights_file_path, verbose=True)
return model_def
Iterate over all layer configs (parsed from the DarkNet representation of YOLOv3-608), create an ONNX graph, populate it with weights from the weights file and return the graph definition. Keyword arguments: layer_configs -- an OrderedDict object with all parsed layers' configurations ...
Iterate over all layer configs (parsed from the DarkNet representation of YOLOv3-608), create an ONNX graph, populate it with weights from the weights file and return the graph definition.
[ "Iterate", "over", "all", "layer", "configs", "(", "parsed", "from", "the", "DarkNet", "representation", "of", "YOLOv3", "-", "608", ")", "create", "an", "ONNX", "graph", "populate", "it", "with", "weights", "from", "the", "weights", "file", "and", "return",...
def build_onnx_graph( self, layer_configs, weights_file_path, verbose=True): """Iterate over all layer configs (parsed from the DarkNet representation of YOLOv3-608), create an ONNX graph, populate it with weights from the weights file and return t...
[ "def", "build_onnx_graph", "(", "self", ",", "layer_configs", ",", "weights_file_path", ",", "verbose", "=", "True", ")", ":", "for", "layer_name", "in", "layer_configs", ".", "keys", "(", ")", ":", "layer_dict", "=", "layer_configs", "[", "layer_name", "]", ...
https://github.com/NVIDIA/TensorRT/blob/42805f078052daad1a98bc5965974fcffaad0960/samples/python/yolov3_onnx/yolov3_to_onnx.py#L385-L440
ricardoquesada/Spidermonkey
4a75ea2543408bd1b2c515aa95901523eeef7858
dom/bindings/Codegen.py
python
CGIncludeGuard.__init__
(self, prefix, child)
|prefix| is the filename without the extension.
|prefix| is the filename without the extension.
[ "|prefix|", "is", "the", "filename", "without", "the", "extension", "." ]
def __init__(self, prefix, child): """|prefix| is the filename without the extension.""" define = 'mozilla_dom_%s_h' % prefix CGWrapper.__init__(self, child, declarePre='#ifndef %s\n#define %s\n\n' % (define, define), declarePost='\n#endif //...
[ "def", "__init__", "(", "self", ",", "prefix", ",", "child", ")", ":", "define", "=", "'mozilla_dom_%s_h'", "%", "prefix", "CGWrapper", ".", "__init__", "(", "self", ",", "child", ",", "declarePre", "=", "'#ifndef %s\\n#define %s\\n\\n'", "%", "(", "define", ...
https://github.com/ricardoquesada/Spidermonkey/blob/4a75ea2543408bd1b2c515aa95901523eeef7858/dom/bindings/Codegen.py#L912-L917
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/botocore/paginate.py
python
TokenDecoder._decode
(self, token, encoded_keys)
return token
Find each encoded value and decode it.
Find each encoded value and decode it.
[ "Find", "each", "encoded", "value", "and", "decode", "it", "." ]
def _decode(self, token, encoded_keys): """Find each encoded value and decode it.""" for key in encoded_keys: encoded = self._path_get(token, key) decoded = base64.b64decode(encoded.encode('utf-8')) self._path_set(token, key, decoded) return token
[ "def", "_decode", "(", "self", ",", "token", ",", "encoded_keys", ")", ":", "for", "key", "in", "encoded_keys", ":", "encoded", "=", "self", ".", "_path_get", "(", "token", ",", "key", ")", "decoded", "=", "base64", ".", "b64decode", "(", "encoded", "....
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/botocore/paginate.py#L138-L144